/* AEG UI — Design Tokens */
:root {
  /* ── Brand ─────────────────────────────────────────── */
  --color-accent: #f5f5f5;
  --color-accent-hover: #d4d4d4;
  --color-on-accent: #0a0a0a;

  /* ── Backgrounds ────────────────────────────────────── */
  --bg-app: #0a0a0a;
  --bg-surface: #161616;
  --bg-surface-2: #1e1e1e;
  --bg-surface-3: #111111;
  --bg-border: #2c2c2c;
  --bg-overlay: rgba(0,0,0,0.7);

  /* ── Human / Agent distinction (RF-3.7) ─────────────── */
  --bg-human: #14532d;
  --bg-human-light: #166534;
  --color-human: #4ade80;
  --bg-agent: #1e3a5f;
  --bg-agent-light: #1e40af;
  --color-agent: #60a5fa;

  /* ── FSM State colors (18 states) ───────────────────── */
  --fsm-draft:                    #374151;
  --fsm-draft-text:               #9ca3af;
  --fsm-ready:                    #1d4ed8;
  --fsm-ready-text:               #93c5fd;
  --fsm-agent-running:            #0891b2;
  --fsm-agent-running-text:       #67e8f9;
  --fsm-maker-done:               #0e7490;
  --fsm-maker-done-text:          #a5f3fc;
  --fsm-adversarial-in-progress:  #7c3aed;
  --fsm-adversarial-in-progress-text: #c4b5fd;
  --fsm-adversarial-done:         #6d28d9;
  --fsm-adversarial-done-text:    #ddd6fe;
  --fsm-human-pending:            #d97706;
  --fsm-human-pending-text:       #fde68a;
  --fsm-approved:                 #059669;
  --fsm-approved-text:            #6ee7b7;
  --fsm-children-pending-review:  #0369a1;
  --fsm-children-pending-review-text: #7dd3fc;
  --fsm-done:                     #16a34a;
  --fsm-done-text:                #bbf7d0;
  --fsm-rejected:                 #dc2626;
  --fsm-rejected-text:            #fca5a5;
  --fsm-failed-recoverable:       #b45309;
  --fsm-failed-recoverable-text:  #fcd34d;
  --fsm-blocked:                  #7f1d1d;
  --fsm-blocked-text:             #fca5a5;
  --fsm-merge-conflict:           #92400e;
  --fsm-merge-conflict-text:      #fde68a;
  --fsm-stale:                    #44403c;
  --fsm-stale-text:               #a8a29e;
  --fsm-invalidated:              #1c1917;
  --fsm-invalidated-text:         #78716c;
  --fsm-killed:                   #0c0a09;
  --fsm-killed-text:              #57534e;
  --fsm-deadlock-human-pending:   #9a3412;
  --fsm-deadlock-human-pending-text: #fdba74;

  /* ── Semantic colors ─────────────────────────────────── */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error:   #ef4444;
  --color-info:    #3b82f6;
  --color-muted:   #737373;
  --color-text:    #e8e8e8;
  --color-text-dim:#9a9a9a;

  /* ── Token dot colors ───────────────────────────────── */
  --token-ok:      #22c55e;
  --token-warn:    #f59e0b;
  --token-expired: #ef4444;

  /* ── Tollgate highlight ──────────────────────────────── */
  --bg-tollgate: #7c2d12;
  --border-tollgate: #f97316;

  /* ── Typography ─────────────────────────────────────── */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-size-xs:   11px;
  --font-size-sm:   13px;
  --font-size-base: 14px;
  --font-size-md:   15px;
  --font-size-lg:   16px;
  --font-size-xl:   18px;

  /* ── Spacing ─────────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* ── Borders & radius ────────────────────────────────── */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --border-color: var(--bg-border);

  /* ── Z-index layers ──────────────────────────────────── */
  --z-detail: 100;
  --z-sidebar-drawer: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-fab: 500;

  /* ── Layout ──────────────────────────────────────────── */
  --header-height: 52px;
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 48px;
  --detail-width: 380px;
  --detail-width-mobile: 100vw;

  /* ── Transitions ─────────────────────────────────────── */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}
