:root {
  /* Brand Accent Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-ring: rgba(37, 99, 235, 0.25);

  /* Status Colors */
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --info: #0284c7;
  --info-light: #f0f9ff;

  /* Neutral Surface & Text - Light Theme */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #3b82f6;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;

  /* Typography */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px (minimum readable per UI-04) */
  --font-size-base: 1rem;     /* 16px base */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px (POS total >= 28px per UI-04) */

  /* Spacing */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Touch Target */
  --touch-target: 44px;

  /* Motion */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Responsive Typography & Spacing Scaling */
@media (max-width: 767px) {
  :root {
    --font-size-xs: 0.6875rem;  /* 11px */
    --font-size-sm: 0.8125rem;  /* 13px */
    --font-size-base: 0.875rem; /* 14px base on mobile */
    --font-size-lg: 1rem;       /* 16px */
    --font-size-xl: 1.125rem;   /* 18px */
    --font-size-2xl: 1.25rem;   /* 20px */
    --font-size-3xl: 1.5rem;    /* 24px */

    --space-3: 0.625rem; /* 10px */
    --space-4: 0.75rem;  /* 12px */
    --space-5: 1rem;     /* 16px */
    --space-6: 1.25rem;  /* 20px */
    --space-8: 1.5rem;   /* 24px */

    --touch-target: 38px;
  }
}

/* Dark Theme Overrides (UI-06) */
[data-theme="dark"] {
  --bg-app: #0f172a;
  --bg-surface: #1e293b;
  --bg-card: #1e293b;
  --bg-subtle: #334155;
  --border: #334155;
  --border-focus: #60a5fa;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --text-inverse: #0f172a;

  --primary-light: #1e3a8a;
  --success-light: #064e3b;
  --warning-light: #78350f;
  --danger-light: #7f1d1d;
  --info-light: #0c4a6e;
}
