/* =====================================
   ExamDesk Design Tokens
   Light and Dark Mode Foundation
   -- Palette shifted from navy/gold to ink-slate/seal-green.
   -- Variable names unchanged so layout.css / components.css /
      utilities.css / base.css need no structural edits.
===================================== */

:root {
  color-scheme: light;

  --ed-bg: #f5f6f0;
  --ed-bg-subtle: #eef0e7;

  --ed-surface: #ffffff;
  --ed-surface-raised: #ffffff;
  --ed-surface-muted: #fafaf5;

  --ed-text: #1c2420;
  --ed-text-strong: #10160f;
  --ed-muted: #6b756e;

  --ed-border: #e1e2d9;
  --ed-border-strong: #c9cbbe;

  --ed-navy: #16211f;
  --ed-navy-2: #1c2b27;

  --ed-primary: #2563eb;
  --ed-primary-soft: #dbeafe;

  /* was gold (#f5b301) -- now the certification/brand accent, seal-green */
  --ed-gold: #1f6f54;
  --ed-gold-soft: #eaf3ee;
  --ed-gold-rgb: 31, 111, 84;

  --ed-success: #16a34a;
  --ed-success-soft: #dcfce7;

  --ed-warning: #f59e0b;
  --ed-warning-soft: #fef3c7;

  --ed-danger: #dc2626;
  --ed-danger-soft: #fee2e2;

  --ed-info: #0284c7;
  --ed-info-soft: #e0f2fe;

  /* text sitting on a solid accent/warning fill (avatars, gold buttons) */
  --ed-on-accent: #ffffff;

  --ed-radius-sm: 6px;
  --ed-radius-md: 10px;
  --ed-radius-lg: 14px;
  --ed-radius-pill: 999px;

  --ed-shadow-sm: 0 1px 3px rgba(16, 22, 15, 0.06);
  --ed-shadow-md: 0 6px 18px rgba(16, 22, 15, 0.08);
  --ed-shadow-lg: 0 14px 34px rgba(16, 22, 15, 0.12);

  --ed-sidebar-bg: #16211f;
  --ed-sidebar-text: rgba(238, 241, 236, 0.76);
  --ed-sidebar-active: rgba(31, 111, 84, 0.16);
  --ed-sidebar-active-text: #ffffff;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --ed-bg: #10160f;
  --ed-bg-subtle: #151d13;

  --ed-surface: #182420;
  --ed-surface-raised: #1c2b26;
  --ed-surface-muted: #22322c;

  --ed-text: #e8ece7;
  --ed-text-strong: #ffffff;
  --ed-muted: #93a099;

  --ed-border: #2a3a34;
  --ed-border-strong: #3c4e46;

  --ed-navy: #0b100e;
  --ed-navy-2: #10160f;

  --ed-primary: #60a5fa;
  --ed-primary-soft: rgba(96, 165, 250, 0.16);

  /* lighter seal-green so it holds contrast on dark surfaces */
  --ed-gold: #4fb894;
  --ed-gold-soft: rgba(79, 184, 148, 0.18);
  --ed-gold-rgb: 79, 184, 148;

  --ed-success: #22c55e;
  --ed-success-soft: rgba(34, 197, 94, 0.16);

  --ed-warning: #fbbf24;
  --ed-warning-soft: rgba(251, 191, 36, 0.16);

  --ed-danger: #f87171;
  --ed-danger-soft: rgba(248, 113, 113, 0.16);

  --ed-info: #38bdf8;
  --ed-info-soft: rgba(56, 189, 248, 0.16);

  /* accent is lighter in dark mode, so pair it with dark text instead of white */
  --ed-on-accent: #0e1512;

  --ed-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.28);
  --ed-shadow-md: 0 8px 22px rgba(0, 0, 0, 0.34);
  --ed-shadow-lg: 0 16px 38px rgba(0, 0, 0, 0.42);

  --ed-sidebar-bg: #0e1512;
  --ed-sidebar-text: rgba(255, 255, 255, 0.72);
  --ed-sidebar-active: rgba(79, 184, 148, 0.18);
  --ed-sidebar-active-text: #ffffff;
}

html.ed-dark body,
html.ed-dark .ed-main,
html.ed-dark .ed-app-content {
  background: #0f1f1b;
  color: #f8fafc;
}

html.ed-dark .ed-page-header,
html.ed-dark .ed-card,
html.ed-dark .ed-stat-card,
html.ed-dark .ed-table-card {
  background: #142822;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

html.ed-dark .ed-card-header {
  border-color: rgba(255, 255, 255, 0.08);
}

html.ed-dark .ed-input,
html.ed-dark input,
html.ed-dark select,
html.ed-dark textarea {
  background: #10221d;
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}

html.ed-dark .ed-text-muted,
html.ed-dark .ed-small,
html.ed-dark .ed-stat-note,
html.ed-dark .ed-stat-label {
  color: #a7b7af;
}

html.ed-dark .ed-table th,
html.ed-dark .ed-table td {
  border-color: rgba(255, 255, 255, 0.08);
}

html.ed-dark .ed-table tr:hover {
  background: rgba(255, 255, 255, 0.04);
}