/*
 * ActuateCMS design tokens — scoped to the admin root.
 * Source: design-system/tokens.json (v1.0).
 * Appearance accent overrides set --acc / --primary at runtime.
 */

.actuate-admin {
  /* Surfaces */
  --bg: #f5f4fa;
  --sb: #ffffff;
  --card: #ffffff;
  --bdr: #e8e6f2;

  /* Text */
  --txt: #1a1827;
  --sub: #6b6878;
  /* Deviates from tokens.json's #B0ADBE (2.2:1 on white — illegible). The
     admin uses --muted as real text (section labels, hints, icons), so it
     must meet WCAG AA (>=4.5:1) on --card and --bg while staying one step
     lighter than --sub to preserve the text hierarchy. */
  --muted: #716e83;

  /* Accent */
  --acc: #7c3aed;
  --acc-l: #ede9fe;
  --acc-m: #c4b5fd;

  /* Semantic */
  --suc: #059669;
  --suc-l: #ecfdf5;
  --warn: #d97706;
  --warn-l: #fffbeb;
  --err: #dc2626;
  --err-l: #fef2f2;
  --info: #0891b2;
  --info-l: #e0f7fa;

  /* AI */
  --ai1: #7c3aed;
  --ai2: #c026d3;
  --ai-soft: linear-gradient(135deg, rgba(124, 58, 237, 0.09), rgba(192, 38, 211, 0.07));

  /* Layout */
  --sbw: 224px;
  --sbw-col: 60px;
  --tbh: 56px;
  --r: 10px;
  --r-control: 8px;
  --r-sm: 6px;
  --r-pill: 99px;

  /* Elevation */
  --shd: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shd2: 0 4px 16px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, 'SFMono-Regular', monospace;
  --fs-page: 21px;
  --fs-card: 14px;
  --fs-body: 13px;
  --fs-sub: 12px;
  --fs-hint: 11.5px;
  --fs-label: 10px;

  /* Motion */
  --motion-fast: 0.12s;
  --motion-base: 0.18s;
  --motion-layout: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  /* Controls — the toggle thumb stays white in both modes per the design
     system (.tog-thumb { background: #fff }), tokenized for themeability. */
  --toggle-thumb: #ffffff;
}

.dark .actuate-admin,
.actuate-admin.dark,
.actuate-admin[data-theme='dark'] {
  --bg: #0d0c18;
  --sb: #141222;
  --card: #1c1a2e;
  --bdr: #2c2a42;

  --txt: #eae8f5;
  --sub: #8e8ba8;
  /* Same AA deviation as light mode (tokens.json #504E68 is 2.1:1 on card). */
  --muted: #8784a2;

  --acc: #9d71f0;
  --acc-l: #231950;
  --acc-m: #5e3eaa;

  --suc: #10b981;
  --suc-l: #022c22;
  --warn: #fbbf24;
  --warn-l: #1a1000;
  --err: #f87171;
  --err-l: #200808;
  --info: #38bdf8;
  --info-l: #0a2838;

  --ai-soft: linear-gradient(135deg, rgba(157, 113, 240, 0.16), rgba(192, 38, 211, 0.12));

  --shd: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
  --shd2: 0 4px 20px rgba(0, 0, 0, 0.45);
}
