/* Design tokens. Every colour, space, radius, shadow and timing used by the
   application resolves to a value declared here.

   The palette follows the reference admin panel: a dark #1C1C1C header and
   sidebar with the #EBC42A brand yellow, over a light content area. Text placed
   on the yellow is always the dark chrome colour, which keeps it readable. */

:root {
  color-scheme: light;

  /* Brand */
  --color-brand: #ebc42a;
  --color-brand-hover: #d6af1d;
  --color-brand-soft: #fdf6d8;
  --color-brand-contrast: #1c1c1c;

  /* Dark chrome: header and sidebar */
  --color-chrome: #1c1c1c;
  --color-chrome-raised: #2a2a2a;
  --color-chrome-border: #333333;
  --color-chrome-text: #f5f5f5;
  --color-chrome-text-muted: #a3a3a3;

  /* Accent used for links, focus and informational actions */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-active: #1e40af;
  --color-primary-contrast: #ffffff;
  --color-primary-soft: #eff6ff;
  --color-accent: #10b981;

  /* Surfaces */
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-muted: #f1f5f9;
  --color-surface-inverse: #1c1c1c;

  /* Text */
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-subtle: #64748b;
  --color-text-inverse: #f5f5f5;

  /* Lines */
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --color-focus-ring: #2563eb;

  /* Status */
  --color-success: #047857;
  --color-success-soft: #ecfdf5;
  --color-warning: #b45309;
  --color-warning-soft: #fffbeb;
  --color-error: #b91c1c;
  --color-error-hover: #991b1b;
  --color-error-contrast: #ffffff;
  --color-error-soft: #fef2f2;
  --color-info: #1d4ed8;
  --color-info-soft: #eff6ff;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  /* Brand wordmark and display numbers: a bold, modern display face from the
     operating system (Segoe UI Variable Display on Windows, SF Pro Display on
     Apple devices), so no font file has to be downloaded. */
  --font-brand: "Segoe UI Variable Display", "SF Pro Display", -apple-system,
    BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.8125rem;
  --font-size-base: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.375rem;
  --font-size-2xl: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  --font-size-3xl: clamp(1.875rem, 1.5rem + 1.4vw, 2.375rem);

  --line-height-tight: 1.25;
  --line-height-normal: 1.55;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-brand: 800;
  --letter-spacing-brand: -0.02em;

  /* Spacing */
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* Motion */
  --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --header-height: 64px;
  --sidebar-width: 260px;
  --field-height: 44px;
  --control-height-sm: 36px;

  /* Layers */
  --z-sticky: 200;
  --z-header: 300;
  --z-overlay: 900;
  --z-sidebar: 1000;
}
