@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ═══════════════════════════════════════════════════
   SaaS Admin Panel — HTML/CSS Kit v1.0.0 — CommandHQ design system
   © 2026 Ashlar Studio · https://ohgotit.com/creator/ashlar-studio
   Support: seller-ashlar@ohgotit.com
   ═══════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  /* Colors — Slate professional palette with emerald accents */
  --bg-primary:      #0f1117;
  --bg-secondary:    #161921;
  --bg-tertiary:     #1e2130;
  --bg-elevated:     #262a3a;
  --bg-hover:        #2d3244;
  --bg-input:        #1a1d28;

  --surface-glass:   rgba(255, 255, 255, 0.03);
  --surface-glass-hover: rgba(255, 255, 255, 0.06);

  --text-primary:    #eaeaf0;
  --text-secondary:  #8b8da0;
  --text-tertiary:   #7f8298;
  --text-inverse:    #0f1117;

  --accent-primary:  #10b981;
  --accent-light:    #34d399;
  --accent-dark:     #059669;
  --accent-glow:     rgba(16, 185, 129, 0.2);
  --accent-subtle:   rgba(16, 185, 129, 0.1);

  --blue:            #3b82f6;
  --blue-subtle:     rgba(59, 130, 246, 0.12);
  --red:             #ef4444;
  --red-subtle:      rgba(239, 68, 68, 0.12);
  --amber:           #f59e0b;
  --amber-subtle:    rgba(245, 158, 11, 0.12);
  --purple:          #8b5cf6;
  --purple-subtle:   rgba(139, 92, 246, 0.12);
  --cyan:            #06b6d4;

  --border:          rgba(255, 255, 255, 0.07);
  --border-strong:   rgba(255, 255, 255, 0.12);
  --border-accent:   rgba(16, 185, 129, 0.3);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.8125rem;
  --text-base: 0.875rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;

  /* Spacing */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem;
  --s-4: 1rem; --s-5: 1.25rem; --s-6: 1.5rem;
  --s-8: 2rem; --s-10: 2.5rem; --s-12: 3rem;
  --s-16: 4rem;

  /* Radius */
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px;
  --r-xl: 16px; --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 16px var(--accent-glow);

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 68px;
  --header-height: 56px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}
a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── App Shell ── */
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.main__header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s-6);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.main__content {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-6);
  scrollbar-width: thin;
  scrollbar-color: var(--bg-elevated) transparent;
}
.main__content::-webkit-scrollbar { width: 6px; }
.main__content::-webkit-scrollbar-track { background: transparent; }
.main__content::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: var(--r-full); }

/* ── Sidebar ── */
.sidebar__header {
  height: var(--header-height);
  padding: 0 var(--s-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-primary);
}

.sidebar__logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
}

.sidebar__nav { flex: 1; padding: var(--s-3); overflow-y: auto; }

.sidebar__section {
  margin-bottom: var(--s-4);
}

.sidebar__label {
  padding: var(--s-2) var(--s-3);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  text-decoration: none;
}
.sidebar__item:hover { background: var(--surface-glass-hover); color: var(--text-primary); text-decoration: none; }
.sidebar__item.active { background: var(--accent-subtle); color: var(--accent-light); }

.sidebar__item-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.6; }
.sidebar__item.active .sidebar__item-icon { opacity: 1; }

.sidebar__item-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--r-full);
  min-width: 20px;
  text-align: center;
}

.sidebar__footer {
  border-top: 1px solid var(--border);
  padding: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-1);
}

.sidebar__user {
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.sidebar__user:hover { background: var(--surface-glass-hover); }

.sidebar__avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--accent-primary), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: var(--text-sm); color: white;
}

.sidebar__user-info { flex: 1; min-width: 0; }
.sidebar__username { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.sidebar__role { font-size: var(--text-xs); color: var(--text-tertiary); }

/* ── Header ── */
.header__left { display: flex; align-items: center; gap: var(--s-4); }

.header__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.header__breadcrumb-sep { color: var(--text-tertiary); }
.header__breadcrumb-current { color: var(--text-primary); font-weight: 600; }

.header__right { display: flex; align-items: center; gap: var(--s-3); }

.header__search {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-2) var(--s-3);
  width: 240px;
}

.header__search input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
  width: 100%;
}
.header__search input::placeholder { color: var(--text-tertiary); }

.header__icon-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: var(--s-2);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.header__icon-btn:hover { background: var(--surface-glass-hover); color: var(--text-primary); }

.header__notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: var(--r-full);
  border: 2px solid var(--bg-secondary);
}

/* ── Page Layout ── */
.page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-6);
}

.page__title {
  font-size: var(--text-xl);
  font-weight: 700;
}

.page__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--s-1);
}

.page__actions { display: flex; gap: var(--s-2); }

/* ── Cards ── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-4);
}

.card__title {
  font-size: var(--text-base);
  font-weight: 600;
}

/* ── Stats ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}

.stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}

.stat__icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s-3);
}

.stat__label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  margin-bottom: var(--s-1);
}

.stat__value {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.2;
}

.stat__change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-xs);
  font-weight: 500;
  margin-top: var(--s-2);
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.stat__change--up { background: var(--accent-subtle); color: var(--accent-light); }
.stat__change--down { background: var(--red-subtle); color: var(--red); }

/* ── Tables ── */
.table-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.table-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
}

.table-card__title { font-size: var(--text-base); font-weight: 600; }

.table-card__actions { display: flex; gap: var(--s-2); }

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  padding: var(--s-3) var(--s-5);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

td {
  padding: var(--s-3) var(--s-5);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-glass); }

.table__user {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.table__user-avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: var(--text-xs); color: white;
  flex-shrink: 0;
}

.table__user-name { font-weight: 500; color: var(--text-primary); }
.table__user-email { font-size: var(--text-xs); color: var(--text-tertiary); }

.table__actions {
  display: flex;
  gap: var(--s-1);
}

.table__action-btn {
  background: none; border: none;
  color: var(--text-tertiary);
  padding: var(--s-1);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.table__action-btn:hover { background: var(--surface-glass-hover); color: var(--text-primary); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 500;
}
.badge--green   { background: var(--accent-subtle); color: var(--accent-light); }
.badge--red     { background: var(--red-subtle); color: var(--red); }
.badge--amber   { background: var(--amber-subtle); color: var(--amber); }
.badge--blue    { background: var(--blue-subtle); color: var(--blue); }
.badge--purple  { background: var(--purple-subtle); color: var(--purple); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: var(--font-sans);
}
.btn--primary {
  background: var(--accent-primary);
  color: #04261b;
  font-weight: 600;
}
.btn--primary:hover { background: var(--accent-light); box-shadow: var(--shadow-glow); }
.btn:hover { text-decoration: none; }

.btn--secondary {
  background: var(--surface-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn--secondary:hover { background: var(--surface-glass-hover); border-color: var(--border-strong); }

.btn--danger { background: var(--red-subtle); color: var(--red); }
.btn--danger:hover { background: rgba(239, 68, 68, 0.2); }

.btn--sm { padding: var(--s-1) var(--s-3); font-size: var(--text-xs); }
.btn--icon {
  width: 32px; height: 32px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
}
.btn--icon:hover { background: var(--surface-glass-hover); color: var(--text-primary); }

/* ── Forms ── */
.input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-2) var(--s-3);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  outline: none;
  width: 100%;
  transition: border-color 0.2s var(--ease);
}
.input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-subtle); }
.input::placeholder { color: var(--text-tertiary); }

.select {
  appearance: none;
  background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237f8298' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-2) var(--s-8) var(--s-2) var(--s-3);
  color: var(--text-primary);
  font-size: var(--text-sm);
  cursor: pointer;
  outline: none;
}
.select:focus { border-color: var(--accent-primary); }

.checkbox {
  width: 16px; height: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.toggle {
  position: relative;
  display: block;
  flex-shrink: 0;
  border: none;
  padding: 0;
  width: 40px; height: 22px;
  background: var(--bg-elevated);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.toggle.active { background: var(--accent-primary); }
.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: white;
  border-radius: var(--r-full);
  transition: transform 0.2s var(--ease);
}
.toggle.active::after { transform: translateX(18px); }

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: var(--s-1);
  margin-bottom: var(--s-5);
}
.tab {
  padding: var(--s-3) var(--s-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent-light); border-bottom-color: var(--accent-primary); }

/* ── Filters Bar ── */
.filters {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.filters__search {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.filters__search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
}
.filters__search input {
  padding-left: 32px;
}

/* ── Activity Log ── */
.activity-item {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.activity-item__icon {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.activity-item__content { flex: 1; min-width: 0; }
.activity-item__text { font-size: var(--text-sm); line-height: 1.5; }
.activity-item__text strong { color: var(--text-primary); font-weight: 600; }
.activity-item__time { font-size: var(--text-xs); color: var(--text-tertiary); margin-top: 2px; }

/* ── Progress Bar ── */
.progress { margin-bottom: var(--s-4); }
.progress__header {
  display: flex; justify-content: space-between;
  font-size: var(--text-xs); margin-bottom: var(--s-1);
}
.progress__label { color: var(--text-secondary); }
.progress__value { font-weight: 600; color: var(--text-primary); }
.progress__bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 0.5s var(--ease);
}

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s-4); }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--border);
}
.pagination__info { font-size: var(--text-xs); color: var(--text-tertiary); }
.pagination__btns { display: flex; gap: var(--s-2); }

/* ── Modal styles ── */
.modal-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  max-width: 520px;
  margin: var(--s-8) auto;
  overflow: hidden;
}
.modal-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-5);
  border-bottom: 1px solid var(--border);
}
.modal-preview__body { padding: var(--s-5); }
.modal-preview__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
}

/* ── Role permission grid ── */
.perm-grid {
  display: grid;
  grid-template-columns: 180px repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.perm-grid__cell {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.perm-grid__cell:nth-child(5n) { border-right: none; }
.perm-grid__cell--header {
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.perm-grid__cell--label {
  justify-content: flex-start;
  font-weight: 500;
  color: var(--text-primary);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(var(--sidebar-width), 85vw);
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .sidebar--open { transform: none; }
  .header__menu-btn { display: inline-flex; }
  .header__search { display: none; }
  .main__header { padding: 0 var(--s-4); gap: var(--s-3); }
  .header__actions .btn { padding-inline: var(--s-3); }
  .main__content { padding: var(--s-4); }
  .page__header { flex-wrap: wrap; gap: var(--s-3); }
  .stats-row { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════
   LIGHT MODE
   Toggle via: document.documentElement.setAttribute('data-theme','light')
   ══════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg-primary:      #f4f5f7;
  --bg-secondary:    #ffffff;
  --bg-tertiary:     #f0f1f3;
  --bg-elevated:     #e8eaed;
  --bg-hover:        #dde0e6;
  --bg-input:        #ffffff;

  --surface-glass:        rgba(0,0,0,0.03);
  --surface-glass-hover:  rgba(0,0,0,0.06);

  --text-primary:    #111827;
  --text-secondary:  #4b5563;
  --text-tertiary:   #6b7280;
  --text-inverse:    #ffffff;

  --accent-glow:     rgba(16, 185, 129, 0.15);

  --border:          rgba(0,0,0,0.08);
  --border-strong:   rgba(0,0,0,0.14);
  --border-accent:   rgba(16, 185, 129, 0.35);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

/* ── Theme Toggle Button ── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.theme-toggle:hover { background: var(--surface-glass-hover); color: var(--text-primary); }

/* ── Alert Banners ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  margin-bottom: var(--s-4);
  border: 1px solid transparent;
}
.alert__icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.alert__body { flex: 1; }
.alert__title { font-weight: 600; margin-bottom: 2px; }
.alert__desc { color: inherit; opacity: 0.85; }
.alert--info    { background: var(--blue-subtle); color: var(--blue); border-color: rgba(59,130,246,0.2); }
.alert--warning { background: var(--amber-subtle); color: var(--amber); border-color: rgba(245,158,11,0.2); }
.alert--danger  { background: var(--red-subtle); color: var(--red); border-color: rgba(239,68,68,0.2); }
.alert--success { background: var(--accent-subtle); color: var(--accent-light); border-color: rgba(16,185,129,0.2); }

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s-16) var(--s-8);
}
.empty-state__icon {
  width: 56px; height: 56px;
  border-radius: var(--r-xl);
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s-4);
  color: var(--text-tertiary);
}
.empty-state__title { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--s-2); }
.empty-state__desc  { font-size: var(--text-sm); color: var(--text-secondary); max-width: 360px; margin-bottom: var(--s-5); }

/* ── Modal Overlay ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  width: 100%; max-width: 520px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border);
}
.modal__title { font-size: var(--text-lg); font-weight: 600; }
.modal__close {
  background: none; border: none;
  color: var(--text-tertiary);
  cursor: pointer; padding: var(--s-1);
  border-radius: var(--r-sm);
}
.modal__close:hover { color: var(--text-primary); background: var(--surface-glass-hover); }
.modal__body   { padding: var(--s-6); }
.modal__footer {
  display: flex; justify-content: flex-end; gap: var(--s-3);
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex; align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}
.breadcrumb__sep { color: var(--text-tertiary); }
.breadcrumb__item:last-child { color: var(--text-primary); font-weight: 600; }
.breadcrumb__item a { color: var(--text-secondary); }
.breadcrumb__item a:hover { color: var(--text-primary); }

/* ── Tag / Chip ── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: 500;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.tag--removable { cursor: pointer; }
.tag__remove {
  background: none; border: none;
  color: var(--text-tertiary);
  cursor: pointer; padding: 0; margin-left: 2px;
  line-height: 1;
}
.tag__remove:hover { color: var(--red); }

/* ── Avatar Group (stacked) ── */
.avatar-group {
  display: flex;
  align-items: center;
}
.avatar-group .table__user-avatar {
  width: 28px; height: 28px;
  font-size: 0.625rem;
  border: 2px solid var(--bg-secondary);
  margin-left: -8px;
}
.avatar-group .table__user-avatar:first-child { margin-left: 0; }
.avatar-group__count {
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: var(--text-xs); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-left: -8px;
  border: 2px solid var(--bg-secondary);
}

/* ── Priority Indicators ── */
.priority {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); font-weight: 500;
}
.priority__dot {
  width: 7px; height: 7px;
  border-radius: var(--r-full);
}
.priority--critical .priority__dot { background: var(--red); }
.priority--high     .priority__dot { background: var(--amber); }
.priority--medium   .priority__dot { background: var(--blue); }
.priority--low      .priority__dot { background: var(--text-tertiary); }
.priority--critical { color: var(--red); }
.priority--high     { color: var(--amber); }
.priority--medium   { color: var(--blue); }
.priority--low      { color: var(--text-tertiary); }

/* ── Status Timeline ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex; gap: var(--s-4);
  padding-bottom: var(--s-5);
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px; top: 32px;
  width: 2px; bottom: 0;
  background: var(--border);
}
.timeline-item__dot {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  z-index: 1;
}
.timeline-item__dot--active { background: var(--accent-subtle); border-color: var(--accent-primary); color: var(--accent-light); }
.timeline-item__content { flex: 1; padding-top: 5px; }
.timeline-item__title { font-size: var(--text-sm); font-weight: 600; margin-bottom: 2px; }
.timeline-item__meta  { font-size: var(--text-xs); color: var(--text-tertiary); }

/* ── Bulk Action Bar ── */
.bulk-bar {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  background: var(--accent-subtle);
  border-bottom: 1px solid var(--border-accent);
  font-size: var(--text-sm);
}
.bulk-bar__count { font-weight: 600; color: var(--accent-light); }
.bulk-bar__actions { display: flex; gap: var(--s-2); margin-left: auto; }

/* ── Stepper ── */
.stepper {
  display: flex; align-items: center; gap: 0;
  margin-bottom: var(--s-6);
}
.stepper__step {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--text-sm); font-weight: 500;
  color: var(--text-tertiary);
}
.stepper__step--active { color: var(--accent-light); }
.stepper__step--done   { color: var(--accent-primary); }
.stepper__num {
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
}
.stepper__step--active .stepper__num { background: var(--accent-subtle); border-color: var(--accent-primary); color: var(--accent-light); }
.stepper__step--done   .stepper__num { background: var(--accent-primary); border-color: var(--accent-primary); color: white; }
.stepper__line { flex: 1; height: 2px; background: var(--border); min-width: 32px; }
.stepper__line--done { background: var(--accent-primary); }

/* ── Accordion ── */
.accordion { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.accordion + .accordion { margin-top: var(--s-2); }
.accordion__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  font-size: var(--text-sm); font-weight: 600;
  background: var(--bg-secondary);
  transition: background 0.15s var(--ease);
}
.accordion__header:hover { background: var(--surface-glass-hover); }
.accordion__chevron { transition: transform 0.2s var(--ease); color: var(--text-tertiary); }
.accordion.open .accordion__chevron { transform: rotate(180deg); }
.accordion__body { padding: var(--s-5); border-top: 1px solid var(--border); display: none; }
.accordion.open .accordion__body { display: block; }

/* ── Loading Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-primary);
  border-radius: var(--r-full);
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner--lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Billing Plan Card ── */
.plan-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  position: relative;
  transition: border-color 0.2s var(--ease);
}
.plan-card--current { border-color: var(--accent-primary); }
.plan-card__badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent-primary); color: white;
  font-size: var(--text-xs); font-weight: 700;
  padding: 2px 12px; border-radius: var(--r-full);
}
.plan-card__name  { font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary); margin-bottom: var(--s-2); }
.plan-card__price { font-size: var(--text-3xl); font-weight: 700; line-height: 1; margin-bottom: var(--s-1); }
.plan-card__cycle { font-size: var(--text-xs); color: var(--text-tertiary); margin-bottom: var(--s-5); }
.plan-card__features { list-style: none; display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); }
.plan-card__feature { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-sm); }
.plan-card__check { color: var(--accent-primary); flex-shrink: 0; }

/* ── Invoice Row ── */
.invoice-row {
  display: flex; align-items: center;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  gap: var(--s-4);
  font-size: var(--text-sm);
}
.invoice-row:last-child { border-bottom: none; }
.invoice-row:hover { background: var(--surface-glass); }
.invoice-row__id   { font-family: var(--font-mono); color: var(--text-tertiary); font-size: var(--text-xs); flex: 0 0 auto; }
.invoice-row__desc { flex: 1; font-weight: 500; }
.invoice-row__date { color: var(--text-secondary); flex: 0 0 120px; }
.invoice-row__amount { font-weight: 700; flex: 0 0 80px; text-align: right; }
.invoice-row__actions { flex: 0 0 auto; display: flex; gap: var(--s-1); }

/* ── Ticket Item ── */
.ticket-item {
  display: flex; align-items: flex-start; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.ticket-item:hover { background: var(--surface-glass); }
.ticket-item:last-child { border-bottom: none; }
.ticket-item__icon {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}
.ticket-item__body { flex: 1; min-width: 0; }
.ticket-item__subject { font-size: var(--text-sm); font-weight: 600; margin-bottom: 2px; }
.ticket-item__preview { font-size: var(--text-xs); color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-item__meta { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-1); }
.ticket-item__time { font-size: var(--text-xs); color: var(--text-tertiary); }

/* ── System Health Meter ── */
.health-meter { margin-bottom: var(--s-4); }
.health-meter__header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-1);
}
.health-meter__label { font-size: var(--text-sm); color: var(--text-secondary); }
.health-meter__value { font-size: var(--text-xs); font-weight: 700; font-family: var(--font-mono); }
.health-meter__bar { height: 8px; background: var(--bg-elevated); border-radius: var(--r-full); overflow: hidden; }
.health-meter__fill { height: 100%; border-radius: var(--r-full); transition: width 0.5s var(--ease); }
.health-meter__fill--ok      { background: var(--accent-primary); }
.health-meter__fill--warn    { background: var(--amber); }
.health-meter__fill--danger  { background: var(--red); }

/* ── Notification Item ── */
.notif-item {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s var(--ease);
  position: relative;
}
.notif-item:hover { background: var(--surface-glass); }
.notif-item:last-child { border-bottom: none; }
.notif-item--unread { background: var(--surface-glass); }
.notif-item--unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-primary);
  border-radius: 0 2px 2px 0;
}
.notif-item__icon {
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-item__icon--critical { background: var(--red-subtle); color: var(--red); }
.notif-item__icon--warning  { background: var(--amber-subtle); color: var(--amber); }
.notif-item__icon--info     { background: var(--blue-subtle); color: var(--blue); }
.notif-item__icon--success  { background: var(--accent-subtle); color: var(--accent-light); }
.notif-item__body { flex: 1; min-width: 0; }
.notif-item__title { font-size: var(--text-sm); font-weight: 600; margin-bottom: 2px; }
.notif-item__desc  { font-size: var(--text-xs); color: var(--text-secondary); }
.notif-item__time  { font-size: var(--text-xs); color: var(--text-tertiary); flex-shrink: 0; }

/* ── Checkbox ── (enhanced) */
.checkbox-label {
  display: flex; align-items: center; gap: var(--s-2);
  cursor: pointer; font-size: var(--text-sm);
}

/* ── Radio Group ── */
.radio-group { display: flex; flex-direction: column; gap: var(--s-2); }
.radio-label {
  display: flex; align-items: center; gap: var(--s-2);
  cursor: pointer; font-size: var(--text-sm);
}
.radio-label input[type="radio"] { accent-color: var(--accent-primary); }

/* ── Import / Export Dropdown ── */
.action-dropdown { position: relative; display: inline-block; }
.action-dropdown__menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  min-width: 160px;
  box-shadow: var(--shadow-md);
  z-index: 50;
  overflow: hidden;
}
.action-dropdown__item {
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.action-dropdown__item:hover { background: var(--surface-glass-hover); color: var(--text-primary); }
.action-dropdown__divider { height: 1px; background: var(--border); margin: var(--s-1) 0; }

/* ── Metric Card (compact) ── */
.metric {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.metric__icon {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.metric__body { flex: 1; }
.metric__label { font-size: var(--text-xs); color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.metric__value { font-size: var(--text-xl); font-weight: 700; }
.metric__delta { font-size: var(--text-xs); padding: 1px 7px; border-radius: var(--r-full); font-weight: 500; display: inline-flex; align-items: center; gap: 3px; }
.metric__delta--up   { background: var(--accent-subtle); color: var(--accent-light); }
.metric__delta--down { background: var(--red-subtle); color: var(--red); }

/* ── Section divider with label ── */
.section-divider {
  display: flex; align-items: center; gap: var(--s-3);
  margin: var(--s-6) 0;
  color: var(--text-tertiary);
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.section-divider::before,
.section-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Tooltip ── */
.tooltip-wrap { position: relative; display: inline-flex; }
.tooltip-wrap:hover .tooltip { opacity: 1; transform: translateY(0); pointer-events: auto; }
.tooltip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--bg-elevated); color: var(--text-primary);
  font-size: var(--text-xs); white-space: nowrap;
  padding: 4px 10px; border-radius: var(--r-sm);
  pointer-events: none; opacity: 0;
  transition: all 0.15s var(--ease);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-strong);
  z-index: 50;
}

/* ── Content Row (data management) ── */
.content-row {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
  transition: background 0.15s var(--ease);
}
.content-row:hover { background: var(--surface-glass); }
.content-row:last-child { border-bottom: none; }
.content-row--selected { background: var(--accent-subtle); }
.content-row__check { flex: 0 0 20px; }
.content-row__title { flex: 1; font-weight: 500; color: var(--text-primary); }
.content-row__meta  { color: var(--text-secondary); flex: 0 0 140px; }
.content-row__size  { color: var(--text-tertiary); flex: 0 0 80px; text-align: right; font-family: var(--font-mono); font-size: var(--text-xs); }
.content-row__actions { flex: 0 0 auto; display: flex; gap: var(--s-1); }


/* ── Accessibility & shell ── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--accent-primary); color: var(--text-inverse);
  padding: var(--s-2) var(--s-4); border-radius: var(--r-md); font-weight: 600;
}
.skip-link:focus { top: var(--s-3); text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.input:focus-visible, .select:focus-visible, .header__search input:focus-visible { outline: none; }
.header__search:focus-within { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-subtle); }
.main__content:focus { outline: none; }
.icon { width: 16px; height: 16px; flex-shrink: 0; }
.header__icon-btn { display: inline-flex; align-items: center; justify-content: center; }
.header__icon-btn .icon { width: 18px; height: 18px; }
.header__menu-btn { display: none; }
.header__search-icon { color: var(--text-tertiary); }
.header__breadcrumb a { color: var(--text-secondary); }
.header__breadcrumb a:hover { color: var(--text-primary); }
.header__actions { display: flex; align-items: center; gap: var(--s-2); }
.header__actions .select { width: auto; }
[data-theme="dark"] .icon--moon, [data-theme="light"] .icon--sun { display: none; }
.sidebar__item[aria-current="page"] { background: var(--accent-subtle); color: var(--accent-light); }
.sidebar__signout {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--r-md);
  color: var(--text-tertiary); flex-shrink: 0;
}
.sidebar__signout:hover { background: var(--surface-glass-hover); color: var(--red); }
.sidebar__signout .icon { width: 18px; height: 18px; }
.sidebar-backdrop {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(0, 0, 0, 0.5);
}
@media (min-width: 769px) { .sidebar-backdrop { display: none !important; } }
.table-scroll { overflow-x: auto; }
.field-label {
  display: block; font-size: var(--text-xs); font-weight: 500;
  color: var(--text-secondary); margin-bottom: var(--s-1);
}

/* ── File icons ── */
.file-icon { width: 18px; height: 18px; margin-right: var(--s-2); vertical-align: -4px; }
.file-icon--image   { color: var(--purple); }
.file-icon--data    { color: var(--accent-light); }
.file-icon--doc     { color: var(--red); }
.file-icon--video   { color: var(--blue); }
.file-icon--archive { color: var(--amber); }

/* ── Settings panels ── */
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-3) 0; border-bottom: 1px solid var(--border);
}
.setting-row:last-of-type { border-bottom: none; }
.setting-row__label { font-weight: 500; font-size: var(--text-sm); color: var(--text-primary); }
.setting-row__desc { font-size: var(--text-xs); color: var(--text-tertiary); }
.plan-summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.plan-summary__name { font-size: var(--text-lg); font-weight: 600; display: flex; align-items: center; gap: var(--s-2); }
.plan-summary__meta { font-size: var(--text-sm); color: var(--text-secondary); }
.api-key {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-3) 0; border-bottom: 1px solid var(--border);
}
.api-key__value { display: block; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-secondary); margin: 2px 0; }
.integrations { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); }
.integration {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4); background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--r-lg);
}
.integration__logo {
  width: 40px; height: 40px; border-radius: var(--r-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-subtle); color: var(--accent-light); font-weight: 700;
}
.integration__body { flex: 1; min-width: 0; }
.sidebar__username, .sidebar__role { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content-row__meta { flex-basis: 170px; }
.badge { white-space: nowrap; }
@media (max-width: 768px) {
  .header__menu-btn { display: inline-flex; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tab { white-space: nowrap; }
  .filters { flex-wrap: wrap; }
  .filters__search { flex: 1 1 100%; max-width: none; }
  .filters .select { flex: 1 1 auto; }
  .table-card { overflow-x: auto; }
  .table-card table { min-width: 760px; }
  .content-row { min-width: 640px; }
  .page__actions, .page__header > div:last-child { flex-wrap: wrap; }
  .header__actions .btn--secondary, .header__actions .select { display: none; }
}

/* ── Auth & error pages ── */
.auth {
  min-height: 100vh; min-height: 100dvh; overflow-y: auto;
  display: grid; place-items: center; padding: var(--s-6) var(--s-4);
  background: radial-gradient(ellipse at top, var(--accent-subtle), transparent 60%), var(--bg-primary);
}
.auth__card {
  width: 100%; max-width: 400px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--s-8); box-shadow: var(--shadow-lg);
}
.auth__brand { display: flex; align-items: center; justify-content: center; gap: var(--s-2); font-weight: 700; font-size: var(--text-lg); color: var(--text-primary); margin-bottom: var(--s-6); }
.auth__brand:hover { text-decoration: none; }
.auth__title { font-size: var(--text-xl); font-weight: 700; text-align: center; }
.auth__subtitle { color: var(--text-secondary); text-align: center; font-size: var(--text-sm); margin: var(--s-1) 0 var(--s-6); }
.auth__field { margin-bottom: var(--s-4); }
.auth__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-5); font-size: var(--text-sm); }
.auth__submit { width: 100%; justify-content: center; }
.auth__divider { margin: var(--s-5) 0; }
.auth__sso { width: 100%; justify-content: center; }
.auth__footer { text-align: center; color: var(--text-tertiary); font-size: var(--text-xs); margin-top: var(--s-6); }
.auth__status { margin-top: var(--s-4); font-size: var(--text-sm); color: var(--accent-light); text-align: center; }
.auth__theme { position: fixed; top: var(--s-4); right: var(--s-4); z-index: 5; }
.auth__reset { display: none; margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--border); }
.auth__reset:target { display: block; }
.auth__reset .card__title { margin-bottom: var(--s-1); }
.auth__reset-row { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
tr.is-selected td { background: var(--accent-subtle); }
.error-page { text-align: center; max-width: 440px; }
.error-page__code { font-size: 5rem; font-weight: 700; line-height: 1; color: var(--accent-light); font-family: var(--font-mono); }
.error-page__title { font-size: var(--text-2xl); font-weight: 700; margin: var(--s-4) 0 var(--s-2); }
.error-page__text { color: var(--text-secondary); margin-bottom: var(--s-6); }
.error-page__actions { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
