/* ============================================================
   SissyLover — Base Styles
   Reset, typography, global components (buttons, forms,
   badges, avatars, cards, toasts).
   Import AFTER variables.css.
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

small {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

code, pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
}

code {
  padding: 0.15em 0.4em;
}

pre {
  padding: var(--space-4);
  overflow-x: auto;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-base);
  user-select: none;
}

.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* Sizes */
.btn-sm { padding: 0.4rem 0.9rem; font-size: var(--text-xs); }
.btn-lg { padding: 0.85rem 1.75rem; font-size: var(--text-base); }

/* Variants */
.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: var(--shadow-pink);
  color: var(--color-white);
}

.btn-secondary {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-text-primary);
}
.btn-secondary:hover {
  background: var(--color-secondary-dark);
  border-color: var(--color-secondary-dark);
  box-shadow: var(--shadow-sm);
  color: var(--color-white);
}

.btn-accent {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-primary);
}
.btn-accent:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  box-shadow: var(--shadow-sm);
  color: var(--color-white);
}

.btn-success {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-white);
}
.btn-success:hover {
  background: var(--color-mint-dark);
  border-color: var(--color-mint-dark);
  box-shadow: var(--shadow-sm);
}

.btn-danger {
  background: var(--color-error);
  border-color: var(--color-error);
  color: var(--color-white);
}
.btn-danger:hover {
  background: #d4606e;
  border-color: #d4606e;
  box-shadow: var(--shadow-sm);
}

.btn-warm {
  background: var(--color-warm);
  border-color: var(--color-warm);
  color: var(--color-text-primary);
}
.btn-warm:hover {
  background: var(--color-warm-dark);
  border-color: var(--color-warm-dark);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
}
.btn-outline:hover {
  background: var(--color-surface-alt);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-secondary);
}
.btn-ghost:hover {
  background: var(--color-surface-alt);
  color: var(--color-text-primary);
}

/* Icon-only square button */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  text-decoration: none;
  flex-shrink: 0;
}
.btn-icon:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  background: var(--color-primary-light);
}
.btn-icon.btn-icon-danger:hover {
  border-color: var(--color-error);
  color: var(--color-error);
  background: var(--color-error-light);
}
.btn-icon.btn-icon-warning:hover {
  border-color: var(--color-warning);
  color: #b07d20;
  background: var(--color-warning-light);
}
.btn-icon.btn-icon-success:hover {
  border-color: var(--color-success);
  color: #3d9e74;
  background: var(--color-success-light);
}

/* Table action buttons row */
.table-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

/* Loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  margin-left: var(--space-2);
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.form-label .required {
  color: var(--color-error);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.65rem var(--space-4);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control::placeholder {
  color: var(--color-text-muted);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(232, 164, 200, 0.18);
}

.form-control:disabled {
  background: var(--color-surface-alt);
  cursor: not-allowed;
  opacity: 0.7;
}

.form-control.is-invalid {
  border-color: var(--color-error);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A5C7A' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: calc(var(--space-4) * 2.5);
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

/* ── Badges / Tags ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.65em;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1;
  white-space: nowrap;
}

.badge-primary  { background: var(--color-primary-light);  color: var(--color-primary-dark);  }
.badge-secondary{ background: var(--color-secondary-light);color: var(--color-secondary-dark);}
.badge-accent   { background: var(--color-accent-light);   color: var(--color-accent-dark);   }
.badge-success  { background: var(--color-success-light);  color: #3d9e74;                    }
.badge-warning  { background: var(--color-warning-light);  color: #b07d20;                    }
.badge-error    { background: var(--color-error-light);    color: #c0404f;                    }
.badge-info     { background: var(--color-info-light);     color: var(--color-secondary-dark);}
.badge-muted    { background: var(--color-surface-alt);    color: var(--color-text-muted);    }

/* ── Avatars ───────────────────────────────────────────────── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--color-primary-light);
  overflow: hidden;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-weight: var(--weight-semibold);
  font-family: var(--font-body);
  flex-shrink: 0;
}

/* img inside a div.avatar wrapper */
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-xs  { width: 24px;  height: 24px;  font-size: 0.6rem;  }
.avatar-sm  { width: 32px;  height: 32px;  font-size: var(--text-xs); }
.avatar-md  { width: 48px;  height: 48px;  font-size: var(--text-sm); }
.avatar-lg  { width: 64px;  height: 64px;  font-size: var(--text-base); }
.avatar-xl  { width: 96px;  height: 96px;  font-size: var(--text-xl); }
.avatar-2xl { width: 128px; height: 128px; font-size: var(--text-2xl); }

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  border: 1px solid transparent;
}

.alert-success { background: var(--color-success-light); border-color: var(--color-success);  color: #3d9e74; }
.alert-warning { background: var(--color-warning-light); border-color: var(--color-warning);  color: #b07d20; }
.alert-error   { background: var(--color-error-light);   border-color: var(--color-error);    color: #c0404f; }
.alert-info    { background: var(--color-info-light);    border-color: var(--color-info);     color: var(--color-secondary-dark); }

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

/* ── Toast notifications ───────────────────────────────────── */
#toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  border-left: 4px solid var(--color-primary);
  min-width: 260px;
  max-width: 380px;
  pointer-events: all;
  animation: toast-in var(--transition-entrance) both;
}

.toast.toast-success { border-color: var(--color-success); }
.toast.toast-error   { border-color: var(--color-error);   }
.toast.toast-warning { border-color: var(--color-warning); }
.toast.toast-info    { border-color: var(--color-info);    }

.toast.toast-sissy-locked {
  position: fixed;
  left: 50%;
  bottom: var(--space-8);
  transform: translate(-50%, 0);
  background: #ff2a85;
  color: #ffffff;
  border-left: none;
  border-radius: 50px;
  box-shadow: 0 8px 30px rgba(255, 42, 133, 0.4);
  padding: var(--space-3) var(--space-5);
  white-space: nowrap;
  max-width: 95vw;
  width: max-content;
  justify-content: center;
  animation: toast-sissy-in var(--transition-entrance) both;
}

.toast.toast-sissy-locked span {
  color: #ffffff;
}

@media (max-width: 480px) {
  .toast.toast-sissy-locked {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-4);
    gap: var(--space-2);
  }
  .toast.toast-sissy-locked svg {
    width: 14px;
    height: 14px;
  }
}

.toast.toast-sissy-locked.toast-out {
  animation: toast-sissy-out var(--transition-base) both;
}

@keyframes toast-sissy-in {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes toast-sissy-out {
  from { opacity: 1; transform: translate(-50%, 0); }
  to   { opacity: 0; transform: translate(-50%, 20px); }
}

.toast.toast-out {
  animation: toast-out var(--transition-base) both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ── Modals ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 43, 61, 0.45);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  animation: fade-in var(--transition-base) forwards;
}

.modal {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-8);
  animation: modal-in var(--transition-bounce) both;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text-primary);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-alt);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

table.table th {
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-3) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

table.table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-primary);
  vertical-align: middle;
}

table.table tr:last-child td {
  border-bottom: none;
}

table.table tbody tr:nth-child(even) td {
  background: var(--color-surface-alt);
}

table.table tbody tr:hover td {
  background: var(--color-primary-light);
  transition: background var(--transition-fast);
}

/* ── Utility classes ───────────────────────────────────────── */
.text-muted    { color: var(--color-text-muted); }
.text-secondary{ color: var(--color-text-secondary); }
.text-primary  { color: var(--color-text-primary); }
.text-success  { color: var(--color-success); }
.text-warning  { color: var(--color-warning); }
.text-error    { color: var(--color-error); }
.text-info     { color: var(--color-info); }

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }

.font-medium   { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold); }
.font-display  { font-family: var(--font-display); }

.d-none    { display: none !important; }
.d-flex    { display: flex; }
.d-grid    { display: grid; }
.d-inline  { display: inline; }
.d-block   { display: block; }

.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-wrap     { flex-wrap: wrap; }

.w-full  { width: 100%; }
.h-full  { height: 100%; }

.rounded-full { border-radius: var(--radius-full); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-md   { border-radius: var(--radius-md); }

/* ── Page fade-in entrance ─────────────────────────────────── */
.page-enter {
  animation: page-enter var(--transition-entrance) both;
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive breakpoints (mobile-first) ─────────────────── */
/* sm:  640px  */
/* md:  768px  */
/* lg:  1024px */
/* xl:  1280px */
/* 2xl: 1536px */

/* ── Site Header (student-facing) ─────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
}

.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  justify-content: flex-start;
}

.site-header__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

/* ── Site Nav ──────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
}

.site-nav__link:hover {
  background: var(--color-surface-alt);
  color: var(--color-text-primary);
}

.site-nav__link.is-active {
  color: var(--color-primary-dark);
  background: var(--color-primary-light);
}

.site-nav__link svg {
  flex-shrink: 0;
}

/* Message unread badge */
.messages-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.65rem;
  font-weight: var(--weight-bold);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ── User menu ─────────────────────────────────────────────── */
.site-header__user {
  display: flex;
  justify-content: flex-end;
}

.user-menu {
  position: relative;
}

.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.user-menu__trigger:hover {
  background: var(--color-surface-alt);
}

.user-menu__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 180px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  padding: var(--space-2);
  animation: fade-in 0.15s ease;
}

.user-menu__dropdown.is-open {
  display: block;
}

.user-menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: background var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.user-menu__item:hover {
  background: var(--color-surface-alt);
}

.user-menu__item--danger {
  color: var(--color-error);
}

.user-menu__item--danger:hover {
  background: var(--color-error-light);
}

/* ── Mobile header button ──────────────────────────────────── */
.mobile-menu-wrap {
  display: none;
  position: relative;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
}

/* Unread messages dot — only shown on mobile */
.mobile-msg-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  background: var(--color-accent-dark);
  border-radius: 50%;
  border: 2px solid var(--color-white);
  animation: msg-dot-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes msg-dot-pulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.45); opacity: 0.85; }
}

/* ── Site footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--color-surface-alt);
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) 0;
}

.site-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer__copy {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ── Site main content ─────────────────────────────────────── */
.site-main {
  min-height: calc(100vh - 72px - 60px);
}

/* ── Toggle switches ───────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #C8C8C8;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--color-white);
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── Table wrapper alias ───────────────────────────────────── */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-white);
}

/* ── Z-index scale ─────────────────────────────────────────── */
/* (defined here for reference — actual values in variables.css) */

/* ── Responsive header ─────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header__inner {
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    gap: var(--space-3);
  }

  .site-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3);
    gap: var(--space-1);
    box-shadow: var(--shadow-md);
    z-index: var(--z-sticky);
    justify-content: flex-start;
  }

  .site-nav.is-open {
    display: flex;
  }

  .mobile-menu-wrap {
    display: flex;
  }

  .site-header__user {
    margin-left: auto;
    justify-content: flex-end;
  }

  .site-footer__inner {
    padding: 0 var(--space-4);
  }
}
