/* ══════════════════════════════════════════════════
   FRESHNewAdmin — Theme-First Design System
   All colors are CSS custom properties.
   To add a theme: copy a theme block, change values.
   ══════════════════════════════════════════════════ */

/* ─── Dyslexia-friendly font (loaded only when needed via class) ─── */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');

/* ══════════════════════════════════════════════════
   1. THEME VARIABLES
   ══════════════════════════════════════════════════ */

/* Base values that don't change with themes */
:root {
  /* ── Spacing scale ── */
  --space-2xs: .25rem;
  --space-xs:  .375rem;
  --space-sm:  .5rem;
  --space-md:  .75rem;
  --space-lg:  1rem;
  --space-xl:  1.5rem;
  --space-2xl: 2rem;
  --space-3xl: 3rem;

  /* ── Radii ── */
  --radius-sm:  0.375rem;
  --radius-md:  0.5rem;
  --radius-lg:  0.75rem;
  --radius-xl:  1rem;
  --radius-2xl: 1.25rem;
  
  /* ── Misc ── */
  --font-scale: 1;
  --transition: 200ms ease;

  /* ── Danger (stays red across all themes) ── */
  --danger:       #dc2626;
  --danger-hover: #b91c1c;
  --danger-soft:  #fef2f2;

  /* ── Success ── */
  --success:      #16a34a;
  --success-soft: #f0fdf4;

  /* ── Warning ── */
  --warning:      #d97706;
  --warning-soft: #fffbeb;

  /* ── Info ── */
  --info:         #2563eb;
  --info-soft:    #eff6ff;
}

/* Default theme (FRESH Green) - applied to body for proper inheritance */
body {
  /* ── Brand palette ── */
  --brand-50:  #f0fdf4;
  --brand-100: #dcfce7;
  --brand-200: #bbf7d0;
  --brand-300: #86efac;
  --brand-400: #4ade80;
  --brand-500: #22c55e;
  --brand-600: #16a34a;
  --brand-700: #15803d;
  --brand-800: #166534;


  /* Cancel button style override */
  .btn--cancel {
    background: var(--danger);
    color: #fff;
    border: none;
    transition: background var(--transition);
  }
  .btn--cancel:hover,
  .btn--cancel:focus {
    background: var(--danger-hover);
    color: #fff;
  }
  /* ── Semantic colors (inherit from brand) ── */
  --accent:       var(--brand-600);
  --accent-hover: var(--brand-700);
  --accent-soft:  var(--brand-100);
  --accent-muted: var(--brand-200);

  /* ── Page backgrounds ── */
  --page-bg:          #f3f4f6;
  --page-bg-alt:      var(--brand-50);
  --page-gradient:    linear-gradient(135deg, var(--brand-50) 0%, var(--brand-100) 100%);

  /* ── Surface (cards, modals) ── */
  --surface:          #ffffff;
  --surface-hover:    #fafafa;
  --surface-border:   #e5e7eb;
  --surface-shadow:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --surface-shadow-lg:0 10px 25px rgba(0,0,0,.1), 0 4px 10px rgba(0,0,0,.06);

  /* ── Text ── */
  --text:          #111827;
  --text-secondary:#4b5563;
  --text-muted:    #6b7280;
  --text-on-accent:#ffffff;
  --heading:       var(--brand-700);

  /* ── Inputs ── */
  --input-bg:       #ffffff;
  --input-border:   #d1d5db;
  --input-focus:    var(--accent);
  --input-text:     var(--text);

  /* ── Buttons ── */
  --btn-primary-bg:     var(--accent);
  --btn-primary-hover:  var(--accent-hover);
  --btn-primary-text:   #ffffff;
  --btn-secondary-bg:   var(--surface);
  --btn-secondary-hover:var(--brand-50);
  --btn-secondary-text: var(--text);
  --btn-secondary-border:var(--surface-border);

  /* ── Modal ── */
  --modal-bg:       var(--surface);
  --modal-border:   var(--accent);
  --modal-shadow:   0 10px 40px rgba(0,0,0,.15);
  --modal-header-bg:var(--brand-50);

  /* ── Footer (themed) ── */
  --footer-bg:    var(--brand-800);
  --footer-text:  var(--brand-100);
  --footer-accent: var(--brand-300);

  /* ── Form section tints ── */
  --section-blue-bg:     var(--info-soft);
  --section-blue-border: #bfdbfe;
  --section-purple-bg:   #faf5ff;
  --section-purple-border: #e9d5ff;

  /* ── Dashboard ── */
  --dashboard-gradient-from: var(--brand-600);
  --dashboard-gradient-to:   var(--brand-800);
  --card-hover-glow:  rgba(22, 163, 74, .12);

  /* ── Focus ring ── */
  --focus-ring: 0 0 0 3px rgba(22, 163, 74, .35);
}

/* ─── FRESH GREEN (default) ─── */
body.theme-fresh-green {
  /* Uses body defaults — nothing to override.
     Keeping this selector so linters can see the class exists. */
  color: inherit;
}

/* ─── NARWHAL (2025 REEFSCAPE) ─── */
body.theme-narwhal {
  --brand-50:  #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-800: #1e40af;
  --heading:   var(--brand-700);
  --card-hover-glow: rgba(37, 99, 235, .12);
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, .35);
}

/* ─── VECTOR (2024 CRESCENDO) ─── */
body.theme-vector {
  --brand-50:  #fff7ed;
  --brand-100: #ffedd5;
  --brand-200: #fed7aa;
  --brand-300: #fdba74;
  --brand-400: #fb923c;
  --brand-500: #f97316;
  --brand-600: #ea580c;
  --brand-700: #c2410c;
  --brand-800: #9a3412;
  --heading:   var(--brand-700);
  --card-hover-glow: rgba(234, 88, 12, .12);
  --focus-ring: 0 0 0 3px rgba(234, 88, 12, .35);
}

/* ─── REBUILT (2026 ARCHAEOLOGY) ─── */
body.theme-rebuilt {
  --brand-50:  #fffbeb;
  --brand-100: #fef3c7;
  --brand-200: #fde68a;
  --brand-300: #fcd34d;
  --brand-400: #fbbf24;
  --brand-500: #f59e0b;
  --brand-600: #d97706;
  --brand-700: #b45309;
  --brand-800: #92400e;
  --heading:   var(--brand-700);
  --card-hover-glow: rgba(217, 119, 6, .12);
  --focus-ring: 0 0 0 3px rgba(217, 119, 6, .35);
}

/* ─── DARK MODE ─── */
body.theme-dark-mode {
  --brand-50:  #1e293b;
  --brand-100: #334155;
  --brand-200: #475569;
  --brand-300: #64748b;
  --brand-400: #94a3b8;
  --brand-500: #0ea5e9;
  --brand-600: #0284c7;
  --brand-700: #0369a1;
  --brand-800: #075985;

  --page-bg:      #0f172a;
  --page-bg-alt:  #1e293b;

  --surface:        #1e293b;
  --surface-hover:  #334155;
  --surface-border: #334155;
  --surface-shadow: 0 1px 3px rgba(0,0,0,.3);

  --text:          #f1f5f9;
  --text-secondary:#cbd5e1;
  --text-muted:    #94a3b8;
  --heading:       #e2e8f0;

  --input-bg:     #1e293b;
  --input-border: #475569;
  --input-text:   #f1f5f9;

  --btn-secondary-bg:    #334155;
  --btn-secondary-hover: #475569;
  --btn-secondary-text:  #f1f5f9;
  --btn-secondary-border:#64748b;

  --modal-bg:       #1e293b;
  --modal-border:   #475569;
  --modal-header-bg:#334155;

  --footer-bg:     #0f172a;
  --footer-text:   #94a3b8;
  --footer-accent: #38bdf8;

  --danger-soft:  #451a1a;
  --success-soft: #14352a;
  --warning-soft: #451a03;
  --info-soft:    #1e3a5f;

  --section-blue-bg:      #1e293b;
  --section-blue-border:  #334155;
  --section-purple-bg:    #1e293b;
  --section-purple-border:#334155;

  --card-hover-glow: rgba(14, 165, 233, .1);
  --focus-ring: 0 0 0 3px rgba(14, 165, 233, .35);
}


/* ══════════════════════════════════════════════════
   2. RESET & BASE
   ══════════════════════════════════════════════════ */

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

html {
  font-size: calc(16px * var(--font-scale, 1));
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--page-bg) 0%, var(--page-bg-alt) 100%);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

:focus:not(:focus-visible) { outline: none; }


/* ══════════════════════════════════════════════════
   3. UTILITY CLASSES
   ══════════════════════════════════════════════════ */

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.link { color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; }

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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;
}


/* ══════════════════════════════════════════════════
   4. SCREENS
   ══════════════════════════════════════════════════ */

.screen {
  min-height: 100vh;
  width: 100%;
}

.screen--login,
.screen--create {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: transparent;
}

.screen--dashboard {
  padding: 0;
}


/* ══════════════════════════════════════════════════
   5. CARDS
   ══════════════════════════════════════════════════ */

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-lg);
  box-shadow: 
    0 4px 24px rgba(0,0,0,.08),
    0 2px 8px rgba(0,0,0,.04),
    inset 0 1px 0 rgba(255,255,255,.5);
  width: 100%;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(10px);
}

.card--wide { max-width: 56rem; }

.card-header {
  padding: 2rem 2rem 0;
  text-align: center;
}

.card-header--accent {
  background: var(--modal-header-bg);
  border-bottom: 1px solid var(--surface-border);
  padding: 1.5rem 2rem;
  text-align: left;
}

.card-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: .25rem;
}

.card-subtitle {
  font-size: .875rem;
  color: var(--text-secondary);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--surface-border);
  background: var(--page-bg-alt);
}


/* ══════════════════════════════════════════════════
   6. FORMS
   ══════════════════════════════════════════════════ */

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 2rem;
}

.form-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  max-height: 65vh;
  overflow-y: auto;
}

.form-section {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  border: 2px solid var(--surface-border);
}

/* These use CSS variables so they auto-theme — no body.theme-X override needed */
.form-section--blue {
  background: var(--section-blue-bg);
  border-color: var(--section-blue-border);
}

.form-section--purple {
  background: var(--section-purple-bg);
  border-color: var(--section-purple-border);
}

/* ─── BEM Section blocks with color variants ─── */
.section {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 2px solid var(--surface-border);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-bottom: 1px solid inherit;
}

.section__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.section__desc {
  margin: var(--space-2xs) 0 0;
  font-size: var(--font-sm, .875rem);
  opacity: .85;
}

.section__body {
  padding: var(--space-lg);
  background: var(--surface);
}

/* Color variants */
.section--emerald {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
}
.section--emerald .section__header { color: #065f46; }

.section--cyan {
  background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
  border-color: #a5f3fc;
}
.section--cyan .section__header { color: #155e75; }

.section--sky {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bae6fd;
}
.section--sky .section__header { color: #0369a1; }

.section--blue {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
}
.section--blue .section__header { color: #1d4ed8; }

.section--indigo {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border-color: #c7d2fe;
}
.section--indigo .section__header { color: #4338ca; }

.section--violet {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: #ddd6fe;
}
.section--violet .section__header { color: #6d28d9; }

.section--purple {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border-color: #e9d5ff;
}
.section--purple .section__header { color: #7e22ce; }

.section--rose {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fecdd3;
}
.section--rose .section__header { color: #be123c; }

.section--amber {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}
.section--amber .section__header { color: #b45309; }

.section--lime {
  background: linear-gradient(135deg, #f7fee7 0%, #ecfccb 100%);
  border-color: #d9f99d;
}
.section--lime .section__header { color: #4d7c0f; }

/* Dark mode overrides */
body.theme-cyberpunk .section,
body.theme-midnight .section {
  background: var(--surface) !important;
  border-color: var(--surface-border) !important;
}
body.theme-cyberpunk .section .section__header,
body.theme-midnight .section .section__header { color: var(--text) !important; }

/* Notification Hub Grid */
.notif-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 640px) {
  .notif-hub-grid { grid-template-columns: 1fr; }
}
.notif-hub-grid .section {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.notif-hub-grid .section:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.notif-hub-audience {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* Subscription Stats Grid */
.subscription-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 640px) {
  .subscription-stats-grid { grid-template-columns: 1fr; }
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.stat-row:last-of-type { border-bottom: none; }
.stat-label {
  font-size: var(--font-sm);
  color: var(--text-muted);
}
.stat-value {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text);
}
.stat-value--muted {
  font-size: var(--font-base);
  color: var(--success);
}

/* Developer Actions Grid */
.dev-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 640px) {
  .dev-actions-grid { grid-template-columns: 1fr; }
}

/* Logs List */
.logs-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.log-item {
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.log-item__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}
.pagination .btn {
  min-width: 36px;
}
.dev-actions-grid .section {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dev-actions-grid .section:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Danger Actions Grid */
.danger-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 640px) {
  .danger-actions-grid { grid-template-columns: 1fr; }
}

.section-title {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row--triple {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 640px) {
  .form-row,
  .form-row--triple {
    grid-template-columns: 1fr;
  }
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  margin-bottom: .5rem;
}

.input-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input {
  width: 100%;
  padding: .625rem .875rem;
  font-size: .9375rem;
  font-family: inherit;
  color: var(--input-text);
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--radius-lg);
  transition: all .3s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.06);
}

.input:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 
    var(--focus-ring),
    inset 0 1px 3px rgba(0,0,0,.06);
  transform: translateY(-1px);
  background: var(--surface);
}

.input::placeholder { color: var(--text-muted); }

.input--textarea {
  resize: vertical;
  min-height: 5rem;
}

.input-with-icon { position: relative; }
.input-with-icon .input { padding-right: 2.75rem; }

.input-icon-btn {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: .25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}

.input-icon-btn:hover { color: var(--text); }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .875rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox {
  width: 1rem;
  height: 1rem;
  margin-top: .125rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.checkbox-inline input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.info-box {
  background: var(--page-bg-alt);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  font-size: .875rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.help-text {
  font-size: .75rem;
  color: var(--text-muted);
}

.error-msg {
  color: var(--danger);
  font-size: .8125rem;
  text-align: center;
  min-height: 1.25rem;
  padding: .25rem 0;
}

.success-msg {
  color: var(--success);
  font-size: .8125rem;
  text-align: center;
  min-height: 1.25rem;
  padding: .25rem 0;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .875rem;
  margin-bottom: var(--space-xs);
  color: var(--text);
}


/* ══════════════════════════════════════════════════
   7. BUTTONS
   ══════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  font-size: .9375rem;
  font-weight: 600;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(.97); }
.btn--full { width: 100%; }

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn--primary:hover {
  background: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}
.btn--primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}
.btn--secondary:hover { background: var(--btn-secondary-hover); }

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--surface-border);
}
.btn--ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.btn--ghost.btn--danger {
  background: transparent;
  color: var(--danger);
  border-color: transparent;
}
.btn--ghost.btn--danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.btn--accent {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: var(--text-on-accent);
  border-color: var(--brand-600);
  box-shadow: 
    0 2px 8px var(--card-hover-glow),
    inset 0 1px 0 rgba(255,255,255,.2);
}
.btn--accent:hover {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-800));
  border-color: var(--brand-700);
  box-shadow: 
    0 8px 24px var(--card-hover-glow),
    inset 0 1px 0 rgba(255,255,255,.25);
  transform: translateY(-2px);
}

.btn--biometric {
  background: linear-gradient(135deg, #9333ea, #6366f1) !important;
  color: #ffffff !important;
  border-color: #9333ea !important;
  box-shadow: 
    0 2px 8px rgba(147, 51, 234, 0.3),
    inset 0 1px 0 rgba(255,255,255,.2) !important;
}
.btn--biometric:hover {
  background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
  border-color: #7c3aed !important;
  box-shadow: 
    0 8px 24px rgba(147, 51, 234, 0.4),
    inset 0 1px 0 rgba(255,255,255,.25) !important;
  transform: translateY(-2px);
}

.btn--danger {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn--danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}
.btn--success {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn--success:hover {
  background: var(--success-hover, #059669);
  border-color: var(--success-hover, #059669);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

/* Button sizes */
.btn--sm {
  padding: .375rem .75rem;
  font-size: .8125rem;
}
.btn--xs {
  padding: .25rem .5rem;
  font-size: .75rem;
}
.btn--lg {
  padding: .75rem 1.5rem;
  font-size: 1rem;
}
.btn--full {
  width: 100%;
}

.btn--back {
  background: none;
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  padding: .5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: .8125rem;
  transition: all var(--transition);
}
.btn--back:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn-stack {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 0 2rem 2rem;
}


/* ══════════════════════════════════════════════════
   8. LOGIN SCREEN
   ══════════════════════════════════════════════════ */

.login-card {
  padding: 0;
  max-width: 28rem;
}

.login-header {
  text-align: center;
  padding: 2rem 2rem 0;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--heading);
}

.login-subtitle {
  font-size: .875rem;
  color: var(--text-secondary);
  margin-top: .25rem;
}

.join-code-group {
  padding: 1.5rem 2rem;
  text-align: center;
}

.digit-inputs {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin: 1rem 0;
}

.digit-input {
  width: 2.75rem;
  height: 3.25rem;
  text-align: center;
  font-size: 1.5rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace, inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--radius-lg);
  transition: all .3s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.08);
}

.digit-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 
    var(--focus-ring),
    inset 0 1px 3px rgba(0,0,0,.08);
  background: var(--surface);
  transform: scale(1.05);
}

.create-user-wrapper {
  width: 100%;
  max-width: 56rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


/* ══════════════════════════════════════════════════
   9. DASHBOARD
   ══════════════════════════════════════════════════ */

/* ─── Hero header ─── */
.dashboard-hero {
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--brand-100) 50%, var(--brand-50) 100%);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--surface-border);
}

.dashboard-hero__inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.dashboard-greeting {
  font-size: 2rem;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.dashboard-greeting .wave-emoji {
  display: inline-block;
  margin-right: 0.25rem;
}

.dashboard-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.dashboard-notif {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* User info badge */
.dashboard-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 100px;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dashboard-user-badge__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
}

.dashboard-user-badge__stats {
  display: flex;
  gap: 1rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--surface-border);
}

.dashboard-user-badge__stat {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.dashboard-user-badge__stat-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
}

.dashboard-user-badge__stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ─── Action bar ─── */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.action-btn--danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

.action-btn .icon {
  width: 1rem;
  height: 1rem;
}

/* ─── Main content area ─── */
.dashboard-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ─── Tool category section ─── */
.tool-category {
  margin-bottom: 2.5rem;
}

.tool-category__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-muted);
}

.tool-category__icon {
  font-size: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
}

.tool-category__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tool-category__count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  background: var(--page-bg);
  border-radius: 100px;
}

/* ─── Tool grid ─── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

/* ─── Tool card ─── */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.75rem 1rem 1.5rem;
  background: var(--surface);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  user-select: none;
}

.tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}

.tool-card:active {
  transform: translateY(-2px);
}

.tool-card__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.tool-card__name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.tool-card__desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 140px;
}

/* Rank badge */
.tool-card__rank {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  font-size: 0.625rem;
  font-weight: 700;
}

/* Status badge */
.tool-card__status {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background: var(--accent);
  color: var(--text-on-accent);
  border-radius: 100px;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tool-card__status--new { background: var(--success); }
.tool-card__status--beta { background: var(--warning); }

/* Check-in done indicator */
.tool-card--checked {
  border-color: var(--success);
  background: var(--success-soft);
}

.tool-card--checked .tool-card__rank {
  display: none;
}

.tool-card--checked::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--success);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ─── Dashboard footer ─── */
.dashboard-footer {
  text-align: center;
  color: var(--footer-text);
  font-size: 0.8125rem;
  padding: 3rem 1.5rem 1.5rem;
  background: var(--footer-bg);
  border-top: 1px solid var(--brand-700);
}

.dashboard-footer .link {
  font-weight: 500;
  color: var(--footer-accent);
}

.dashboard-footer .link:hover {
  color: #ffffff;
}

/* Quick check-in banner */
.quick-checkin-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--accent-muted);
}

.quick-checkin-bar__text {
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}


/* ══════════════════════════════════════════════════
   10. MODAL
   ══════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0);
  opacity: 0;
  transition: all 0.2s ease;
}

.modal-overlay.is-open {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  opacity: 1;
}

.modal-shell {
  position: relative;
  width: 100%;
  max-width: min(95vw, 1100px);
  max-height: 94vh;
  background: var(--modal-bg);
  border: 2px solid var(--modal-border);
  border-radius: var(--radius-2xl);
  box-shadow: 
    0 24px 80px rgba(0,0,0,.25),
    0 8px 32px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(.9) translateY(32px);
  opacity: 0;
  transition: transform 350ms cubic-bezier(.34, 1.56, .64, 1), opacity 350ms ease;
}

.modal-overlay.is-open .modal-shell {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-header {
  position: relative;
  padding: 1rem 1.5rem;
  min-height: 2.5rem;
  background: var(--modal-header-bg);
  border-bottom: 1px solid var(--surface-border);
}

.modal-close-x {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}

.modal-close-x:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  display: flex;
  justify-content: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--surface-border);
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--heading);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: var(--space-sm);
}

.modal-title .icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--accent);
}

/* Panel sizing */
.modal-panel--wide .modal-shell { max-width: min(95vw, 1400px); }
.modal-panel--full .modal-shell { max-width: 100vw; width: 100%; }


/* ══════════════════════════════════════════════════
   11. TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: .875rem;
  font-weight: 500;
  color: #ffffff;
  pointer-events: auto;
  animation: toastIn 300ms ease;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  max-width: 24rem;
}

.toast--success { background: var(--success); }
.toast--error   { background: var(--danger); }
.toast--info    { background: var(--info); }
.toast--warning { background: var(--warning); }

.toast.toast--exit { animation: toastOut 300ms ease forwards; }

.toast .icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════════════
   12. CONFIRM DIALOG
   ══════════════════════════════════════════════════ */

.confirm-host {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}

.confirm-host.is-open { opacity: 1; }

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}

.confirm-shell {
  position: relative;
  z-index: 1;
  max-width: 26rem;
  width: 90%;
  transform: scale(0.95) translateY(10px);
  transition: transform 200ms ease;
}

.confirm-host.is-open .confirm-shell {
  transform: scale(1) translateY(0);
}

.confirm-surface {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  padding: 1.75rem 2rem 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  border: 1px solid var(--surface-border);
  text-align: center;
}

.confirm-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

.confirm-message {
  font-size: .9375rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
}

.confirm-btn {
  padding: .625rem 1.5rem;
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 150ms ease;
  min-width: 100px;
}

.confirm-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.confirm-btn--cancel {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}
.confirm-btn--cancel:hover { 
  background: var(--btn-secondary-hover);
  transform: translateY(-1px);
}

.confirm-btn--danger {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
  box-shadow: 0 2px 4px rgba(220,38,38,.3);
}
.confirm-btn--danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220,38,38,.4);
}

.confirm-btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
  box-shadow: 0 2px 4px rgba(22,163,74,.3);
}
.confirm-btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(22,163,74,.4);
}


/* ══════════════════════════════════════════════════
   13. SETTINGS PANEL (inside modal)
   ══════════════════════════════════════════════════ */

.settings-wrapper {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.settings-tabs {
  display: flex;
  border-bottom: 1px solid var(--surface-border);
}

.settings-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .875rem 1rem;
  text-align: center;
  font-size: .875rem;
  font-weight: 500;
  font-family: inherit;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}

.settings-tab:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.settings-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ─── Admin Manager Colored Tabs ─── */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: var(--space-sm);
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 2px solid var(--surface-border);
  margin-bottom: var(--space-md);
}

.admin-tab {
  flex: 1;
  min-width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface-hover);
  color: var(--text-muted);
}

.admin-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* Colored tab variants (inactive state) */
.admin-tab--emerald { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.admin-tab--purple  { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.admin-tab--amber   { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.admin-tab--rose    { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.admin-tab--indigo  { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.admin-tab--cyan    { background: #ecfeff; color: #155e75; border-color: #a5f3fc; }

/* Active state: solid fill */
.admin-tab--emerald.active { background: linear-gradient(135deg, #10b981, #059669); color: #fff; border-color: #059669; box-shadow: 0 4px 12px rgba(16,185,129,.35); }
.admin-tab--purple.active  { background: linear-gradient(135deg, #a855f7, #9333ea); color: #fff; border-color: #9333ea; box-shadow: 0 4px 12px rgba(168,85,247,.35); }
.admin-tab--amber.active   { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border-color: #d97706; box-shadow: 0 4px 12px rgba(245,158,11,.35); }
.admin-tab--rose.active    { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; border-color: #e11d48; box-shadow: 0 4px 12px rgba(244,63,94,.35); }
.admin-tab--indigo.active  { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; border-color: #4f46e5; box-shadow: 0 4px 12px rgba(99,102,241,.35); }
.admin-tab--cyan.active    { background: linear-gradient(135deg, #06b6d4, #0891b2); color: #fff; border-color: #0891b2; box-shadow: 0 4px 12px rgba(6,182,212,.35); }

/* Dark mode subtle bg */
body.theme-cyberpunk .admin-tab,
body.theme-midnight .admin-tab {
  background: var(--surface) !important;
  border-color: var(--surface-border);
}
body.theme-cyberpunk .admin-tab.active,
body.theme-midnight .admin-tab.active {
  background: var(--accent) !important;
  color: var(--text-on-accent) !important;
}

@media (max-width: 640px) {
  .admin-tabs { flex-direction: column; }
  .admin-tab { min-width: 100%; }
}

.settings-panel {
  padding: 1.5rem;
}

.settings-panel[hidden] { display: none; }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.theme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1rem;
  background: var(--surface);
  border: 2px solid var(--surface-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition);
}

.theme-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.theme-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.theme-card.locked {
  opacity: .5;
  cursor: not-allowed;
}

.theme-card__header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .25rem;
}

.theme-card__icon { font-size: 1.5rem; }

.theme-card__desc {
  font-size: .8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: .5rem;
}

.theme-card__name {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
}

.theme-swatch {
  width: 100%;
  height: 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,.1);
}

.theme-swatch-row {
  display: flex;
  gap: .375rem;
  margin-top: .375rem;
}

.theme-swatch-row span {
  display: block;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
}

/* Settings option row */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 0;
  border-bottom: 1px solid var(--surface-border);
}

.setting-row:last-child { border-bottom: none; }

.setting-info { flex: 1; }

.setting-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
}

.setting-desc {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .125rem;
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--input-border);
  border-radius: 99px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.5rem - 4px);
  height: calc(1.5rem - 4px);
  background: #ffffff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(1.25rem); }

.setting-select {
  padding: .375rem .75rem;
  font-size: .8125rem;
  font-family: inherit;
  color: var(--input-text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

/* Settings group */
.settings-group {
  margin-bottom: var(--space-xl);
}

.settings-group__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: var(--space-md);
}

.settings-row-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .settings-row-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.toggle-setting {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-setting:hover { background: var(--surface-hover); }

.toggle-setting input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: .125rem;
}

.toggle-setting div {
  display: flex;
  flex-direction: column;
}

.toggle-setting strong {
  font-size: .875rem;
  color: var(--text);
}

.toggle-setting span {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .125rem;
}


/* ══════════════════════════════════════════════════
   14. TABLES
   ══════════════════════════════════════════════════ */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.data-table th {
  text-align: left;
  padding: .75rem 1rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--surface-border);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.data-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--surface-border);
  color: var(--text);
}

.data-table tr:hover td { background: var(--surface-hover); }


/* ══════════════════════════════════════════════════
   15. BADGES
   ══════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .125rem .625rem;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 99px;
  white-space: nowrap;
}

.badge--accent  { background: var(--accent-soft); color: var(--accent); }
.badge--danger  { background: var(--danger-soft);  color: var(--danger); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--info    { background: var(--info-soft);    color: var(--info); }
.badge--muted   { background: var(--page-bg-alt);  color: var(--text-muted); }

.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: .125rem .5rem;
  font-size: .6875rem;
  font-weight: 600;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .025em;
}


/* ══════════════════════════════════════════════════
   16. PAGINATION
   ══════════════════════════════════════════════════ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: 1rem 0;
}

.page-btn,
.pagination__btn {
  min-width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8125rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  padding: 0 .75rem;
}

.page-btn:hover,
.pagination__btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active,
.pagination__btn.active {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
  font-weight: 600;
}

.page-btn:disabled,
.pagination__btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}


/* ══════════════════════════════════════════════════
   17. LOADING
   ══════════════════════════════════════════════════ */

.spinner,
.loading-spinner {
  border: 3px solid var(--surface-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

.spinner {
  width: 2rem;
  height: 2rem;
}

.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  margin: 3rem auto;
}

.spinner--sm {
  width: 1.25rem;
  height: 1.25rem;
  border-width: 2px;
}

.loading-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}


/* ══════════════════════════════════════════════════
   18. EMPTY STATE
   ══════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: .75rem;
}

.empty-state__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: .25rem;
}

.empty-state__text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.empty-state__desc { font-size: .875rem; }

.card-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}


/* ══════════════════════════════════════════════════
   18B. NOTIFICATION BELL & PANEL
   ══════════════════════════════════════════════════ */

.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  cursor: pointer;
  transition: all var(--transition);
}
.notif-bell:hover {
  background: var(--surface-hover);
  border-color: var(--brand-400);
}
.notif-bell .icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--brand-500);
}
.notif-dot {
  position: absolute;
  top: .125rem;
  right: .125rem;
  width: .625rem;
  height: .625rem;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--surface);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: .8; }
}

.notif-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
  z-index: 999;
}
.notif-overlay.open {
  opacity: 1;
  visibility: visible;
}

.notif-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 22rem;
  max-width: 90vw;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--surface-border);
  box-shadow: -4px 0 24px rgba(0,0,0,.1);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notif-panel.open {
  transform: translateX(0);
}

.notif-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--surface-border);
  background: var(--modal-header-bg);
}
.notif-panel__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--heading);
}
.notif-panel__actions {
  display: flex;
  gap: var(--space-sm);
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm);
}

.notif-item {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  margin-bottom: var(--space-sm);
}
.notif-item--unread {
  background: var(--accent-soft);
  border-color: var(--brand-200);
}
.notif-item__title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: .25rem;
}
.notif-item__body {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: .5rem;
  line-height: 1.4;
}
.notif-item__time {
  font-size: .75rem;
  color: var(--text-muted);
}

.notif-divider {
  text-align: center;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: var(--space-sm) 0;
}

.notif-empty {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
  font-size: .9rem;
}


/* ══════════════════════════════════════════════════
   19. ACCESSIBILITY OVERRIDES
   ══════════════════════════════════════════════════ */

body.dyslexia-font,
body.dyslexia-font * {
  font-family: 'Atkinson Hyperlegible', sans-serif !important;
}

body.high-contrast {
  --surface-border: var(--text);
  --input-border:   var(--text);
}

body.high-contrast .btn,
body.high-contrast .action-btn {
  border-width: 3px;
}

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

body.reduced-motion,
body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}

body.enhanced-focus :focus-visible {
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .5) !important;
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px;
}

body.text-spacing {
  letter-spacing: 0.05em;
  word-spacing: 0.1em;
}

body.link-underlines a { text-decoration: underline !important; }

body.large-cursor,
body.large-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M5 2L5 28L12 21L19 28L22 25L15 18L24 18Z' fill='black' stroke='white' stroke-width='2'/%3E%3C/svg%3E") 5 2, auto !important;
}


/* ══════════════════════════════════════════════════
   20. ANIMATIONS
   ══════════════════════════════════════════════════ */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes wave {
  0%   { transform: rotate(0deg); }
  10%  { transform: rotate(14deg); }
  20%  { transform: rotate(-8deg); }
  30%  { transform: rotate(14deg); }
  40%  { transform: rotate(-4deg); }
  50%  { transform: rotate(10deg); }
  60%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

@keyframes holographic-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.wave-emoji {
  display: inline-block;
  animation: wave 1.6s ease-in-out 1;
  transform-origin: 70% 70%;
}


/* ══════════════════════════════════════════════════
   21. RESPONSIVE
   ══════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .screen--login,
  .screen--create { padding: 1rem; }

  .card { border-radius: var(--radius-xl); }

  .login-title,
  .card-title { font-size: 1.5rem; }

  .dashboard-greeting { 
    font-size: 1.5rem;
    letter-spacing: -0.01em;
  }

  .dashboard-hero { 
    padding: var(--space-2xl) var(--space-lg) var(--space-xl);
  }

  .dashboard-user-badge {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .dashboard-user-badge__stats {
    border-left: none;
    border-top: 1px solid var(--surface-border);
    padding-left: 0;
    padding-top: var(--space-sm);
  }

  .action-bar {
    gap: .375rem;
    padding: var(--space-md) var(--space-lg);
  }

  .action-btn {
    font-size: .75rem;
    padding: .375rem .625rem;
  }

  .action-btn span:not(.icon) { display: none; }

  .tool-category__header {
    padding: var(--space-sm) var(--space-md);
  }

  .tool-category__icon {
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
  }

  .tool-category__title {
    font-size: .75rem;
  }

  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
  }

  .tool-card { 
    padding: 1.25rem .75rem;
    border-width: 1.5px;
  }
  
  .tool-card:hover {
    transform: translateY(-3px) scale(1.01);
  }

  .tool-card__icon { font-size: 2rem; }
  .tool-card__name { font-size: .75rem; }
  .tool-card__desc { display: none; }
  .tool-card__rank { 
    width: 1.25rem;
    height: 1.25rem;
    font-size: .5625rem;
  }

  .modal-shell {
    max-width: 100vw;
    max-height: 100vh;
    border-radius: var(--radius-xl);
    margin: 0;
  }

  .form-sections { padding: 1rem; }
  .dashboard-body { padding: var(--space-xl) var(--space-lg); }
}

@media (min-width: 1024px) {
  .modal-shell { max-width: min(90vw, 1200px); }
}


/* ══════════════════════════════════════════════════
   22. SYSTEM THEME AUTO-DETECTION
   ══════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
  body:not(.theme-fresh-green):not(.theme-narwhal):not(.theme-vector):not(.theme-rebuilt):not(.theme-dark-mode) {
    --page-bg:      #0f172a;
    --page-bg-alt:  #1e293b;
    --surface:      #1e293b;
    --surface-hover:#334155;
    --surface-border:#334155;
    --text:         #f1f5f9;
    --text-secondary:#cbd5e1;
    --text-muted:   #94a3b8;
    --heading:      #e2e8f0;
    --input-bg:     #1e293b;
    --input-border: #475569;
    --input-text:   #f1f5f9;
    --modal-bg:     #1e293b;
    --modal-border: #475569;
    --modal-header-bg:#334155;
    --footer-bg:     #0f172a;
    --footer-text:   #94a3b8;
    --footer-accent: #38bdf8;
    --btn-secondary-bg:    #334155;
    --btn-secondary-hover: #475569;
    --btn-secondary-text:  #f1f5f9;
    --btn-secondary-border:#64748b;
    --danger-soft:  #451a1a;
    --success-soft: #14352a;
    --warning-soft: #451a03;
    --info-soft:    #1e3a5f;
    --section-blue-bg:      #1e293b;
    --section-blue-border:  #334155;
    --section-purple-bg:    #1e293b;
    --section-purple-border:#334155;
  }
}


/* ══════════════════════════════════════════════════
   23. DEBUG & MISC
   ══════════════════════════════════════════════════ */

.debug-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: var(--warning);
  color: #000;
  text-align: center;
  padding: .375rem 1rem;
  font-size: .75rem;
  font-weight: 600;
}

body.nav-collapsed .tool-grid { max-width: 100%; }

.tab-scroll-arrow-left,
.tab-scroll-arrow-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, var(--surface) 60%, transparent);
  z-index: 2;
  cursor: pointer;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
}

.tab-scroll-arrow-left { left: 0; }
.tab-scroll-arrow-right {
  right: 0;
  background: linear-gradient(270deg, var(--surface) 60%, transparent);
}


/* ══════════════════════════════════════════════════
   24. THEME DECORATIONS (cosmetic flair per theme)
   ══════════════════════════════════════════════════ */

/* ============================================= */
/* NARWHAL / REEFSCAPE THEME DECORATIONS         */
/* Underwater coral reef ambiance                */
/* ============================================= */

/* Left coral/reef decoration */
.reef-decoration-left {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 200px;
  height: 300px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 300'%3E%3C!-- Main coral branch --%3E%3Cpath d='M30 300 Q25 250 40 200 Q55 150 35 100 Q25 70 45 40' stroke='%23f97316' stroke-width='12' fill='none' stroke-linecap='round'/%3E%3Cpath d='M40 180 Q60 160 75 175' stroke='%23fb923c' stroke-width='8' fill='none' stroke-linecap='round'/%3E%3Cpath d='M35 130 Q15 110 25 85' stroke='%23fdba74' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C!-- Secondary coral --%3E%3Cpath d='M80 300 Q85 260 70 220 Q55 180 80 140' stroke='%23ec4899' stroke-width='10' fill='none' stroke-linecap='round'/%3E%3Cpath d='M70 200 Q90 185 100 200' stroke='%23f472b6' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C!-- Seaweed --%3E%3Cpath d='M120 300 Q115 270 125 240 Q135 210 120 180 Q105 150 120 120' stroke='%2322c55e' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3Cpath d='M140 300 Q145 260 135 220 Q125 180 145 140' stroke='%234ade80' stroke-width='5' fill='none' stroke-linecap='round'/%3E%3C!-- Small details --%3E%3Ccircle cx='50' cy='250' r='8' fill='%23fbbf24'/%3E%3Ccircle cx='100' cy='270' r='5' fill='%23a78bfa'/%3E%3Ccircle cx='160' cy='285' r='6' fill='%2338bdf8'/%3E%3C!-- Sea floor --%3E%3Cellipse cx='100' cy='300' rx='100' ry='15' fill='%23a8a29e' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: contain;
}

/* Right coral/reef decoration */
.reef-decoration-right {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 200px;
  height: 300px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 300'%3E%3C!-- Main coral branch --%3E%3Cpath d='M170 300 Q175 250 160 200 Q145 150 165 100 Q175 70 155 40' stroke='%23f97316' stroke-width='12' fill='none' stroke-linecap='round'/%3E%3Cpath d='M160 180 Q140 160 125 175' stroke='%23fb923c' stroke-width='8' fill='none' stroke-linecap='round'/%3E%3Cpath d='M165 130 Q185 110 175 85' stroke='%23fdba74' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C!-- Brain coral --%3E%3Cellipse cx='80' cy='270' rx='35' ry='25' fill='%23a78bfa' opacity='0.8'/%3E%3Cpath d='M55 265 Q65 260 75 265 Q85 270 95 265 Q105 260 110 265' stroke='%238b5cf6' stroke-width='2' fill='none'/%3E%3Cpath d='M55 275 Q65 270 75 275 Q85 280 95 275 Q105 270 110 275' stroke='%238b5cf6' stroke-width='2' fill='none'/%3E%3C!-- Seaweed --%3E%3Cpath d='M40 300 Q45 270 35 240 Q25 210 40 180' stroke='%2322c55e' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C!-- Anemone --%3E%3Cpath d='M130 285 Q130 260 125 250' stroke='%23ec4899' stroke-width='3' fill='none'/%3E%3Cpath d='M140 285 Q140 255 145 245' stroke='%23ec4899' stroke-width='3' fill='none'/%3E%3Cpath d='M135 285 Q135 250 135 240' stroke='%23f472b6' stroke-width='3' fill='none'/%3E%3C!-- Sea floor --%3E%3Cellipse cx='100' cy='300' rx='100' ry='15' fill='%23a8a29e' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: contain;
}

/* Swimming fish */
.reef-fish {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M5 10 Q15 2 30 10 Q15 18 5 10' fill='%2338bdf8'/%3E%3Cpath d='M0 10 L8 5 L8 15 Z' fill='%2338bdf8'/%3E%3Ccircle cx='26' cy='9' r='2' fill='%230c4a6e'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M5 10 Q15 2 30 10 Q15 18 5 10' fill='%23fbbf24'/%3E%3Cpath d='M0 10 L8 5 L8 15 Z' fill='%23fbbf24'/%3E%3Ccircle cx='26' cy='9' r='2' fill='%2378350f'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M5 10 Q15 2 30 10 Q15 18 5 10' fill='%23f472b6'/%3E%3Cpath d='M0 10 L8 5 L8 15 Z' fill='%23f472b6'/%3E%3Ccircle cx='26' cy='9' r='2' fill='%239d174d'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M5 10 Q15 2 30 10 Q15 18 5 10' fill='%234ade80'/%3E%3Cpath d='M0 10 L8 5 L8 15 Z' fill='%234ade80'/%3E%3Ccircle cx='26' cy='9' r='2' fill='%23166534'/%3E%3C/svg%3E");
  background-size: 50px 25px, 40px 20px, 35px 18px, 45px 22px;
  background-repeat: no-repeat;
  animation: fish-swim 25s linear infinite;
}

@keyframes fish-swim {
  0%   { background-position: -60px 20%, -50px 50%, -45px 70%, -55px 35%; }
  25%  { background-position: 25% 22%, 15% 48%, 10% 68%, 20% 38%; }
  50%  { background-position: 55% 18%, 45% 52%, 40% 72%, 50% 32%; }
  75%  { background-position: 85% 24%, 75% 46%, 70% 66%, 80% 40%; }
  100% { background-position: calc(100% + 60px) 20%, calc(100% + 50px) 50%, calc(100% + 45px) 70%, calc(100% + 55px) 35%; }
}

/* Rising bubbles */
.reef-bubbles {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.4;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='6' fill='none' stroke='%2393c5fd' stroke-width='1.5' opacity='0.7'/%3E%3Ccircle cx='8' cy='8' r='2' fill='%23bfdbfe' opacity='0.9'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='4' fill='none' stroke='%2393c5fd' stroke-width='1' opacity='0.6'/%3E%3Ccircle cx='7' cy='7' r='1.5' fill='%23bfdbfe' opacity='0.8'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='3' fill='none' stroke='%2393c5fd' stroke-width='1' opacity='0.5'/%3E%3Ccircle cx='5' cy='5' r='1' fill='%23bfdbfe' opacity='0.7'/%3E%3C/svg%3E");
  background-size: 25px 25px, 18px 18px, 14px 14px;
  background-repeat: no-repeat;
  animation: bubbles-rise 12s ease-in-out infinite;
}

@keyframes bubbles-rise {
  0%   { background-position: 20% 100%, 60% 100%, 80% 100%; }
  25%  { background-position: 22% 70%, 58% 80%, 78% 90%; }
  50%  { background-position: 18% 40%, 62% 55%, 82% 70%; }
  75%  { background-position: 24% 15%, 56% 30%, 76% 45%; }
  100% { background-position: 20% -10%, 60% 5%, 80% 20%; }
}

/* Mobile adjustments for reef */
@media screen and (max-width: 768px) {
  .reef-decoration-left,
  .reef-decoration-right {
    width: 150px;
    height: 225px;
    opacity: 0.8;
  }
  
  .reef-fish {
    opacity: 0.4;
  }
  
  .reef-bubbles {
    opacity: 0.5;
  }
}

/* ============================================= */
/* VECTOR / CRESCENDO THEME DECORATIONS          */
/* Music/sound wave ambiance                     */
/* ============================================= */

/* Left speaker cabinet decoration */
.crescendo-decoration-left {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 180px;
  height: 280px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 280'%3E%3C!-- Speaker cabinet body --%3E%3Crect x='20' y='40' width='120' height='230' rx='8' fill='%231e1e1e' stroke='%23374151' stroke-width='2'/%3E%3C!-- Metal grille --%3E%3Crect x='30' y='50' width='100' height='210' rx='4' fill='%232d2d2d'/%3E%3C!-- Top speaker (tweeter) --%3E%3Ccircle cx='80' cy='90' r='25' fill='%231f2937' stroke='%23f97316' stroke-width='2'/%3E%3Ccircle cx='80' cy='90' r='15' fill='%23111827'/%3E%3Ccircle cx='80' cy='90' r='8' fill='%23f97316' opacity='0.8'/%3E%3C!-- Bottom speaker (woofer) --%3E%3Ccircle cx='80' cy='180' r='45' fill='%231f2937' stroke='%23f97316' stroke-width='2'/%3E%3Ccircle cx='80' cy='180' r='32' fill='%23111827'/%3E%3Ccircle cx='80' cy='180' r='18' fill='%231f2937'/%3E%3Ccircle cx='80' cy='180' r='8' fill='%23f97316' opacity='0.7'/%3E%3C!-- Sound waves emanating --%3E%3Cpath d='M140 90 Q155 90 155 110 Q155 130 140 130' stroke='%23f97316' stroke-width='2' fill='none' opacity='0.5'/%3E%3Cpath d='M145 85 Q165 85 165 115 Q165 145 145 145' stroke='%23f97316' stroke-width='2' fill='none' opacity='0.3'/%3E%3C!-- Power LED --%3E%3Ccircle cx='80' cy='250' r='4' fill='%2322c55e'%3E%3Canimate attributeName='opacity' values='1;0.5;1' dur='2s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: contain;
}

/* Right speaker cabinet decoration */
.crescendo-decoration-right {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 180px;
  height: 280px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 280'%3E%3C!-- Speaker cabinet body --%3E%3Crect x='40' y='40' width='120' height='230' rx='8' fill='%231e1e1e' stroke='%23374151' stroke-width='2'/%3E%3C!-- Metal grille --%3E%3Crect x='50' y='50' width='100' height='210' rx='4' fill='%232d2d2d'/%3E%3C!-- Top speaker (tweeter) --%3E%3Ccircle cx='100' cy='90' r='25' fill='%231f2937' stroke='%23f97316' stroke-width='2'/%3E%3Ccircle cx='100' cy='90' r='15' fill='%23111827'/%3E%3Ccircle cx='100' cy='90' r='8' fill='%23f97316' opacity='0.8'/%3E%3C!-- Bottom speaker (woofer) --%3E%3Ccircle cx='100' cy='180' r='45' fill='%231f2937' stroke='%23f97316' stroke-width='2'/%3E%3Ccircle cx='100' cy='180' r='32' fill='%23111827'/%3E%3Ccircle cx='100' cy='180' r='18' fill='%231f2937'/%3E%3Ccircle cx='100' cy='180' r='8' fill='%23f97316' opacity='0.7'/%3E%3C!-- Sound waves emanating (mirrored) --%3E%3Cpath d='M40 90 Q25 90 25 110 Q25 130 40 130' stroke='%23f97316' stroke-width='2' fill='none' opacity='0.5'/%3E%3Cpath d='M35 85 Q15 85 15 115 Q15 145 35 145' stroke='%23f97316' stroke-width='2' fill='none' opacity='0.3'/%3E%3C!-- Power LED --%3E%3Ccircle cx='100' cy='250' r='4' fill='%2322c55e'%3E%3Canimate attributeName='opacity' values='1;0.5;1' dur='2s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: contain;
}

/* Floating music notes */
.crescendo-notes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 40'%3E%3Cellipse cx='8' cy='32' rx='7' ry='5' fill='%23f97316'/%3E%3Cpath d='M15 32 L15 8' stroke='%23f97316' stroke-width='2'/%3E%3Cpath d='M15 8 Q22 6 22 12 Q22 18 15 16' fill='%23f97316'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cellipse cx='8' cy='32' rx='6' ry='4' fill='%23fb923c'/%3E%3Cellipse cx='28' cy='26' rx='6' ry='4' fill='%23fb923c'/%3E%3Cpath d='M14 32 L14 10 L34 4 L34 26' stroke='%23fb923c' stroke-width='2' fill='none'/%3E%3Cpath d='M14 10 L34 4' stroke='%23fb923c' stroke-width='3'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 40'%3E%3Cellipse cx='8' cy='32' rx='7' ry='5' fill='%23fdba74'/%3E%3Cpath d='M15 32 L15 8' stroke='%23fdba74' stroke-width='2'/%3E%3Cpath d='M15 8 Q22 6 22 12 Q22 18 15 16' fill='%23fdba74'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cellipse cx='8' cy='32' rx='6' ry='4' fill='%23fbbf24'/%3E%3Cellipse cx='28' cy='26' rx='6' ry='4' fill='%23fbbf24'/%3E%3Cpath d='M14 32 L14 10 L34 4 L34 26' stroke='%23fbbf24' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-size: 35px 45px, 50px 50px, 30px 40px, 45px 45px;
  background-repeat: no-repeat;
  animation: notes-float 18s ease-in-out infinite;
}

@keyframes notes-float {
  0%   { background-position: 15% 80%, 70% 90%, 40% 85%, 85% 75%; }
  25%  { background-position: 20% 60%, 65% 70%, 45% 65%, 80% 55%; }
  50%  { background-position: 18% 40%, 72% 50%, 38% 45%, 88% 35%; }
  75%  { background-position: 22% 20%, 68% 30%, 42% 25%, 82% 15%; }
  100% { background-position: 15% 0%, 70% 10%, 40% 5%, 85% -5%; }
}

/* Animated equalizer bars */
.crescendo-equalizer {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

.crescendo-equalizer span {
  width: 8px;
  background: linear-gradient(to top, var(--brand-primary), var(--brand-secondary, var(--brand-primary)));
  border-radius: 2px 2px 0 0;
  animation: equalizer-bar 0.8s ease-in-out infinite alternate;
}

.crescendo-equalizer span:nth-child(1)  { height: 20px; animation-delay: 0s; }
.crescendo-equalizer span:nth-child(2)  { height: 35px; animation-delay: 0.1s; }
.crescendo-equalizer span:nth-child(3)  { height: 25px; animation-delay: 0.2s; }
.crescendo-equalizer span:nth-child(4)  { height: 45px; animation-delay: 0.15s; }
.crescendo-equalizer span:nth-child(5)  { height: 55px; animation-delay: 0.05s; }
.crescendo-equalizer span:nth-child(6)  { height: 40px; animation-delay: 0.25s; }
.crescendo-equalizer span:nth-child(7)  { height: 50px; animation-delay: 0.08s; }
.crescendo-equalizer span:nth-child(8)  { height: 30px; animation-delay: 0.18s; }
.crescendo-equalizer span:nth-child(9)  { height: 38px; animation-delay: 0.12s; }
.crescendo-equalizer span:nth-child(10) { height: 22px; animation-delay: 0.22s; }

@keyframes equalizer-bar {
  0%   { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

/* Mobile adjustments for crescendo */
@media screen and (max-width: 768px) {
  .crescendo-decoration-left,
  .crescendo-decoration-right {
    width: 160px;
    height: 250px;
    opacity: 0.8;
  }
  
  .crescendo-notes {
    opacity: 0.5;
  }
  
  .crescendo-equalizer {
    opacity: 0.6;
  }
}

/* ============================================= */
/* REBUILT THEME DECORATIONS                     */
/* Archaeology/excavation/past games ambiance    */
/* ============================================= */

/* Left ruins/dig site decoration */
.rebuilt-decoration-left {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 200px;
  height: 300px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 300'%3E%3C!-- Ground strata layers --%3E%3Crect x='0' y='260' width='200' height='40' fill='%2392400e'/%3E%3Crect x='0' y='230' width='200' height='30' fill='%23a8520f'/%3E%3Crect x='0' y='210' width='200' height='20' fill='%23b8621a'/%3E%3C!-- Ancient column ruins --%3E%3Crect x='20' y='120' width='25' height='140' fill='%23d4c5a9' rx='2'/%3E%3Crect x='15' y='110' width='35' height='15' fill='%23e8dcc6' rx='2'/%3E%3Crect x='18' y='255' width='30' height='10' fill='%23c9b896' rx='2'/%3E%3C!-- Broken column piece --%3E%3Crect x='55' y='200' width='20' height='60' fill='%23d4c5a9' rx='2' transform='rotate(15 65 230)'/%3E%3C!-- Fossil/artifact in wall --%3E%3Cpath d='M100 240 Q105 235 110 240 Q115 245 110 250 Q105 255 100 250 Q95 245 100 240' fill='%23f5f0e1' stroke='%23b8a07a' stroke-width='1'/%3E%3Cpath d='M100 245 Q103 243 106 245' stroke='%23a08060' stroke-width='1' fill='none'/%3E%3C!-- Pickaxe --%3E%3Cpath d='M140 180 L170 210' stroke='%2378350f' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M168 195 L180 200 L175 210 L165 205' fill='%236b7280' stroke='%234b5563' stroke-width='1'/%3E%3C!-- Ancient gear/cog (past games symbol) --%3E%3Ccircle cx='160' cy='140' r='18' fill='none' stroke='%23d97706' stroke-width='3' opacity='0.6'/%3E%3Ccircle cx='160' cy='140' r='8' fill='%23d97706' opacity='0.5'/%3E%3Cpath d='M160 118 L160 125 M160 155 L160 162 M138 140 L145 140 M175 140 L182 140' stroke='%23d97706' stroke-width='3' opacity='0.6'/%3E%3C!-- Small fossils scattered --%3E%3Ccircle cx='80' cy='275' r='3' fill='%23f5f0e1' stroke='%23b8a07a'/%3E%3Ccircle cx='120' cy='268' r='2' fill='%23f5f0e1' stroke='%23b8a07a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: contain;
}

/* Right ruins/dig site decoration */
.rebuilt-decoration-right {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 200px;
  height: 300px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 300'%3E%3C!-- Ground strata layers --%3E%3Crect x='0' y='260' width='200' height='40' fill='%2392400e'/%3E%3Crect x='0' y='230' width='200' height='30' fill='%23a8520f'/%3E%3Crect x='0' y='210' width='200' height='20' fill='%23b8621a'/%3E%3C!-- Broken arch --%3E%3Cpath d='M120 260 L120 180 Q150 140 180 180 L180 260' fill='none' stroke='%23d4c5a9' stroke-width='12' stroke-linecap='round'/%3E%3C!-- Ancient temple base --%3E%3Crect x='100' y='245' width='90' height='15' fill='%23e8dcc6' rx='2'/%3E%3C!-- Coral fossil (REEFSCAPE reference) --%3E%3Cpath d='M50 240 Q55 220 52 200 Q48 180 55 165' stroke='%23f97316' stroke-width='4' fill='none' opacity='0.5' stroke-linecap='round'/%3E%3Cpath d='M55 180 Q62 175 68 182' stroke='%23f97316' stroke-width='3' fill='none' opacity='0.5'/%3E%3C!-- Music note fossil (CRESCENDO reference) --%3E%3Cellipse cx='40' cy='265' rx='6' ry='4' fill='%23fbbf24' opacity='0.6'/%3E%3Cpath d='M46 265 L46 250' stroke='%23fbbf24' stroke-width='2' opacity='0.6'/%3E%3C!-- Ancient robot parts (generic past games) --%3E%3Crect x='70' y='250' width='12' height='8' fill='%236b7280' rx='1' opacity='0.7'/%3E%3Ccircle cx='76' cy='248' r='3' fill='%234b5563' opacity='0.7'/%3E%3C!-- Hieroglyph-style symbols --%3E%3Cpath d='M25 200 L30 190 L35 200 L30 195 Z' fill='%23d97706' opacity='0.5'/%3E%3Cpath d='M25 215 L35 215 M30 210 L30 220' stroke='%23d97706' stroke-width='2' opacity='0.5'/%3E%3C!-- Brush tool --%3E%3Crect x='145' y='130' width='4' height='35' fill='%2378350f' rx='1'/%3E%3Crect x='140' y='125' width='14' height='8' fill='%23a1a1aa' rx='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: contain;
}

/* Floating artifacts (past game symbols) */
.rebuilt-artifacts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: 
    /* Gear/cog (generic robotics) */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='10' fill='none' stroke='%23d97706' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='4' fill='%23d97706'/%3E%3Cpath d='M16 4v4M16 24v4M4 16h4M24 16h4M8 8l3 3M21 21l3 3M8 24l3-3M21 11l3-3' stroke='%23d97706' stroke-width='2'/%3E%3C/svg%3E"),
    /* Power cell/battery */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Crect x='2' y='4' width='20' height='26' rx='2' fill='%2322c55e' opacity='0.8'/%3E%3Crect x='8' y='0' width='8' height='4' rx='1' fill='%2316a34a'/%3E%3Cpath d='M12 10l-4 6h3v6l4-6h-3z' fill='white'/%3E%3C/svg%3E"),
    /* Star/award */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M14 2l3.5 7 7.5 1-5.5 5.3 1.3 7.7-6.8-3.6-6.8 3.6 1.3-7.7L3 10l7.5-1z' fill='%23fbbf24' stroke='%23d97706' stroke-width='1'/%3E%3C/svg%3E"),
    /* Wrench tool */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M8 4c3 0 5.5 2.5 5.5 5.5 0 .8-.2 1.6-.5 2.3l9.2 9.2c.8.8.8 2 0 2.8-.8.8-2 .8-2.8 0l-9.2-9.2c-.7.3-1.5.5-2.3.5C5 15 2.5 12.5 2.5 9.5c0-1 .3-2 .7-2.8l3.5 3.5 2.1-2.1-3.5-3.5c.8-.4 1.8-.7 2.7-.7z' fill='%236b7280' stroke='%234b5563'/%3E%3C/svg%3E");
  background-size: 40px 40px, 30px 40px, 35px 35px, 32px 32px;
  background-position: 
    15% 20%,
    80% 30%,
    35% 65%,
    70% 55%;
  background-repeat: no-repeat;
  animation: artifacts-float 30s ease-in-out infinite;
}

@keyframes artifacts-float {
  0%   { background-position: 15% 20%, 80% 30%, 35% 65%, 70% 55%; }
  25%  { background-position: 20% 18%, 75% 35%, 40% 60%, 65% 50%; }
  50%  { background-position: 18% 25%, 82% 28%, 32% 68%, 72% 58%; }
  75%  { background-position: 22% 22%, 78% 32%, 38% 62%, 68% 52%; }
  100% { background-position: 15% 20%, 80% 30%, 35% 65%, 70% 55%; }
}

/* Dust particles */
.rebuilt-dust {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.3;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Ccircle cx='4' cy='4' r='2' fill='%23d4b896'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 6'%3E%3Ccircle cx='3' cy='3' r='1.5' fill='%23c9a870'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23b8986a'/%3E%3C/svg%3E");
  background-size: 10px 10px, 8px 8px, 6px 6px;
  background-repeat: no-repeat;
  animation: dust-drift 15s ease-in-out infinite;
}

@keyframes dust-drift {
  0%   { background-position: 20% 70%, 60% 80%, 85% 75%; }
  33%  { background-position: 25% 65%, 55% 75%, 90% 70%; }
  66%  { background-position: 18% 75%, 65% 85%, 80% 80%; }
  100% { background-position: 20% 70%, 60% 80%, 85% 75%; }
}

/* Mobile adjustments for rebuilt */
@media screen and (max-width: 768px) {
  .rebuilt-decoration-left,
  .rebuilt-decoration-right {
    width: 180px;
    height: 270px;
    opacity: 0.8;
  }
  
  .rebuilt-artifacts {
    opacity: 0.5;
  }
  
  .rebuilt-dust {
    opacity: 0.4;
  }
}

/* ══════════════════════════════════════════════════
   SETTINGS HELPERS: DENSITY, MODAL WIDTH, CARD ELEVATION, NAV COLLAPSE
   ══════════════════════════════════════════════════ */

/* Density: adjusts spacing and paddings */
body.density-compact .card {
  padding: 0.75rem !important;
}
body.density-compact .card-stack {
  gap: 0.5rem !important;
}

body.density-normal .card {
  padding: 1rem !important;
}
body.density-normal .card-stack {
  gap: 1rem !important;
}

body.density-relaxed .card {
  padding: 1.5rem !important;
}
body.density-relaxed .card-stack {
  gap: 1.25rem !important;
}

/* Nav collapsed: shrink action bar to icons only */
body.nav-collapsed .dashboard-actions .action-btn span:not(.icon),
body.nav-collapsed .dashboard-actions .action-btn svg + span {
  display: none !important;
}
body.nav-collapsed .dashboard-actions .action-btn {
  padding: 0.5rem !important;
  min-width: auto !important;
}
body.nav-collapsed .dashboard-actions {
  gap: 0.5rem !important;
}

/* Modal width variants */
body.modal-width-comfortable .modal-shell {
  max-width: 900px !important;
  width: min(96vw, 900px) !important;
}
body.modal-width-wide .modal-shell {
  max-width: 1200px !important;
  width: min(98vw, 1200px) !important;
}
body.modal-width-full .modal-shell {
  max-width: calc(100vw - 2rem) !important;
  width: calc(100vw - 2rem) !important;
}

/* Card elevation via data attribute */
body[data-card-elevation="none"] .card {
  box-shadow: none !important;
}
body[data-card-elevation="subtle"] .card {
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04) !important;
}
body[data-card-elevation="pronounced"] .card {
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12) !important;
  transform: translateY(-1px);
}

/* Chevron rotation for collapsible sections */
.create-chevron.rotated,
.chevron.rotated {
  transform: rotate(180deg);
}