/* FoodServe Admin design tokens.

   This file is the single source of truth for reusable visual decisions such as
   colours, spacing, radii, typography and shadows. Shared components and page CSS
   should consume these variables instead of repeating literal values.

   Prefer semantic tokens such as --fs-color-surface and --fs-color-text-muted in
   components. Palette tokens such as --fs-color-neutral-500 are building blocks
   for semantic tokens and are useful only when no semantic meaning applies.

   Breakpoint variables document the agreed values, but cannot be interpolated in
   CSS media-query conditions. Keep the numeric media queries in the other style
   files aligned with the breakpoint values recorded below. */
:root {
    /* Typography
       Heading sizes and weights are shared by base.css and component titles. */
    --fs-base: 14px;
    --fs-small: 12px;
    --fs-title: 18px;
    --fs-h1: 24px;
    --fs-h2: 20px;
    --fs-h3: 16px;
    --fw-normal: 400;
    --fw-semibold: 600;
    --fw-bold: 700;
    --ff-body: "Roboto", sans-serif;
    --ff-brand: "Roboto", sans-serif;

    /* Raw colour palette
       Avoid using these directly when a semantic colour below expresses intent. */
    --fs-color-brand: #6d28d9;
    --fs-color-brand-soft: #f5f1ff;
    --fs-color-brand-border: #ddd6fe;
    --fs-color-neutral-0: #ffffff;
    --fs-color-neutral-50: #f9fafb;
    --fs-color-neutral-100: #f3f4f6;
    --fs-color-neutral-200: #e5e7eb;
    --fs-color-neutral-300: #d1d5db;
    --fs-color-neutral-400: #9ca3af;
    --fs-color-neutral-500: #6b7280;
    --fs-color-neutral-600: #4b5563;
    --fs-color-neutral-700: #374151;
    --fs-color-neutral-800: #1f2937;
    --fs-color-text-emphasis: #242424;
    --fs-color-neutral-900: #111827;
    --fs-color-black: #000000;
    --fs-color-slate-50: #f8fafc;
    --fs-color-slate-100: #f1f5f9;
    --fs-color-slate-200: #e2e8f0;
    --fs-color-slate-300: #cbd5e1;
    --fs-color-slate-400: #94a3b8;
    --fs-color-slate-500: #64748b;
    --fs-color-slate-600: #475569;
    --fs-color-slate-700: #334155;
    --fs-color-slate-800: #1e293b;
    --fs-color-slate-900: #0f172a;
    --fs-color-canvas: #f7f7f7;
    --fs-color-chrome: #f0eeeb;

    /* Semantic colours
       These describe purpose, allowing the raw palette to change without pages
       having to understand which exact shade represents a border or surface. */
    --fs-color-surface: var(--fs-color-neutral-0);
    --fs-color-surface-subtle: var(--fs-color-neutral-50);
    --fs-color-surface-muted: var(--fs-color-neutral-100);
    --fs-color-text: #383838;
    --fs-color-text-strong: var(--fs-color-neutral-900);
    --fs-color-text-muted: var(--fs-color-neutral-500);
    --fs-color-border: var(--fs-color-neutral-200);
    --fs-color-border-strong: var(--fs-color-neutral-300);
    --fs-color-border-translucent: rgba(15, 23, 42, .1);
    --fs-color-focus: var(--fs-color-brand);
    --fs-color-overlay: rgba(0, 0, 0, .6);
    --fs-color-navigation: #004b75;
    --fs-color-navigation-muted: #5b7a98;
    --fs-color-navigation-deep: #05163c;
    --fs-color-navigation-gradient-end: #3a0647;
    --fs-color-code: #d946ef;
    --fs-color-success: #16a34a;
    --fs-color-success-hover: #15803d;
    --fs-color-success-bg-subtle: #f0fdf4;
    --fs-color-success-bg: #dcfce7;
    --fs-color-success-text: #166534;
    --fs-color-success-border: #bbf7d0;
    --fs-color-danger: #dc2626;
    --fs-color-danger-hover: #b91c1c;
    --fs-color-danger-bright: #ef4444;
    --fs-color-danger-bg-subtle: #fef2f2;
    --fs-color-danger-bg: #fee2e2;
    --fs-color-danger-text: #991b1b;
    --fs-color-danger-border: #fecaca;
    --fs-color-warning: #f59e0b;
    --fs-color-warning-hover: #d97706;
    --fs-color-warning-bg-subtle: #fffbeb;
    --fs-color-warning-bg: #fef3c7;
    --fs-color-warning-text: #92400e;
    --fs-color-warning-border: #fde68a;
    --fs-color-info: #2563eb;
    --fs-color-info-hover: var(--fs-color-info-text);
    --fs-color-info-bg-subtle: #eff6ff;
    --fs-color-info-bg: #dbeafe;
    --fs-color-info-text: #1d4ed8;
    --fs-color-info-border: #bfdbfe;

    /* Legacy editor palette
       Kept central while older editor screens are migrated. Do not use these for
       new Admin pages; new work should use the semantic colours above. */
    --fs-color-editor-canvas: #f4f6f8;
    --fs-color-editor-primary: #2c3e50;
    --fs-color-editor-danger: #d32f2f;
    --fs-color-editor-success: #27ae60;
    --fs-color-editor-accent: #16a085;

    /* Spacing: 4px base scale
       Use this scale for gaps, padding and margins so page rhythm stays consistent. */
    --fs-space-0: 0;
    --fs-space-1: .25rem;
    --fs-space-2: .5rem;
    --fs-space-3: .75rem;
    --fs-space-4: 1rem;
    --fs-space-5: 1.25rem;
    --fs-space-6: 1.5rem;
    --fs-space-8: 2rem;
    --fs-space-10: 2.5rem;
    --fs-space-12: 3rem;

    /* Corner radii
       Components choose a size from this scale instead of inventing local radii. */
    --fs-radius-xs: .25rem;
    --fs-radius-sm: .5rem;
    --fs-radius-md: .625rem;
    --fs-radius-lg: .75rem;
    --fs-radius-xl: 1rem;
    --fs-radius-pill: 9999px;

    /* Elevation and focus
       Focus rings are interaction feedback; shadows describe component elevation. */
    --fs-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --fs-shadow-md: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .07);
    --fs-shadow-sidebar: 1px 0 16px rgba(0, 0, 0, .1);
    --fs-shadow-flyout: 0 6px 20px rgba(0, 0, 0, .12);
    --fs-focus-ring: 0 0 0 3px rgba(109, 40, 217, .25);

    /* Breakpoint reference values. CSS custom properties cannot be used in
       media-query conditions, so media queries should mirror these values. */
    --fs-breakpoint-sm: 36rem; /* 576px */
    --fs-breakpoint-md: 48rem; /* 768px */
    --fs-breakpoint-admin-shell: 62.5rem; /* 1000px */
    --fs-breakpoint-xl: 75rem; /* 1200px */

    /* Admin shell component tokens
       These aliases isolate sidebar/navigation theming from general page surfaces. */
    --sidebar-bg: var(--fs-color-chrome);
    --sidebar-text: var(--fs-color-text-strong);
    --sidebar-muted: var(--fs-color-text-muted);
    --sidebar-border: var(--fs-color-border);
    --sidebar-hover: var(--fs-color-surface-subtle);
    --sidebar-active-bg: var(--fs-color-brand-soft);
    --sidebar-active: var(--fs-color-brand);
    --sidebar-icon-bg: var(--fs-color-slate-50);
    --submenu-bg: var(--fs-color-surface);
    --footer-bg: var(--fs-color-chrome);
}
