/* Vesta Design System v4: tokens
   Every property carries the v- prefix (--v-text, --v-radius-md) so the file
   can sit next to Tailwind 4, Onsen or MUI without rewriting their theme
   variables (--text-sm, --radius-md, --shadow-sm, --ease-out are all
   Tailwind 4 names). Pure custom properties, no selectors. Import this file
   alone when an app only needs the values (MUI theme, Tailwind @theme, Onsen).
   Light values live on :root, so light is the default. Dark values apply
   only under data-theme="dark" (set from localStorage before first paint).
   .v-light pins any subtree to the light values whatever the page theme
   (the guest kiosk is a public device and is always light). */

:root, .v-light {
  /* Brand: the Vesta flame. 500 is the identity colour (logo, focus ring,
     highlights). 600 is the action fill because white text on 500 is only
     3.4:1; on 600 it is 4.6:1 (AA). 700 is for text and links on light. */
  --v-flame-50: #fff4ed;
  --v-flame-100: #ffe6d8;
  --v-flame-200: #ffc9ad;
  --v-flame-300: #ffa278;
  --v-flame-400: #ff7340;
  --v-flame-500: #ff4500;
  --v-flame-600: #d93a00;
  --v-flame-700: #b33000;
  --v-flame-800: #8a2500;
  --v-flame-900: #5c1900;
  --v-brand-gradient: linear-gradient(160deg, #e64a19 0%, #f7891c 55%, #fbb40a 100%);

  /* Warm stone neutrals (same family superadmin already ships). */
  --v-stone-50: #faf9f7;
  --v-stone-100: #f3f1ec;
  --v-stone-200: #ebe8e1;
  --v-stone-300: #e0dcd2;
  --v-stone-400: #c9c3b6;
  --v-stone-500: #8a8579;
  --v-stone-600: #6b665c;
  --v-stone-700: #57534a;
  --v-stone-800: #35322c;
  --v-stone-900: #23211d;
  --v-stone-950: #161512;

  /* Roles: surfaces */
  --v-bg: #faf9f7;            /* page, a step lighter than v2.0 (#f7f6f3) */
  --v-surface: #ffffff;       /* cards, panels, inputs, sidebar */
  --v-surface-2: #f3f1ec;     /* table head, hover, segmented track */
  --v-surface-3: #ebe8e1;     /* pressed, selected neutral */
  --v-border: #e4e0d7;        /* hairlines, card edges */
  --v-border-strong: #c9c3b6; /* input edges, dividers that must read */
  --v-scrim: rgba(22, 21, 18, 0.48);

  /* Roles: text (all AA on --v-surface and --v-surface-2) */
  --v-text: #1c1a17;          /* 17.4:1 */
  --v-text-2: #57534a;        /* 7.7:1  secondary */
  --v-text-3: #6b665c;        /* 5.7:1  meta, captions */
  --v-text-4: #8a8579;        /* placeholder, disabled, decorative icons only */

  /* Roles: interaction */
  --v-primary: var(--v-flame-600);
  --v-primary-hover: var(--v-flame-700);
  --v-on-primary: #ffffff;
  --v-accent: var(--v-flame-700);      /* links, active nav text */
  --v-accent-soft: #fff0e8;          /* active nav fill, selection */
  --v-accent-border: #ffd3bd;
  --v-focus: var(--v-flame-500);       /* 3.4:1 on white, meets the 3:1 focus floor */

  /* Status tones. Each tone: fg (text, AA on bg), bg (soft fill),
     line (border), solid (dot, bar, icon). Meaning is fixed:
     blue = in motion, green = done, amber = waiting, red = failed/overdue,
     violet = needs sign-off, smoke = quiet, neutral = no state.
     Smoke comes from v3: fire tended is health, smoke is neglect. It is the
     cool, desaturated counterpart to the flame, for anything that has gone
     quiet (parked, snoozed, paused, offline, not seen for a while). Hard
     failure stays red. --v-slate-* are aliases kept for one release. */
  --v-blue-fg: #1d5fb8;    --v-blue-bg: #e8f1fd;    --v-blue-line: #c4dbf7;    --v-blue: #2a78d6;
  --v-green-fg: #17703a;   --v-green-bg: #e6f4ea;   --v-green-line: #bfe3c9;   --v-green: #1f9d55;
  --v-amber-fg: #8a5300;   --v-amber-bg: #fdf3dc;   --v-amber-line: #f3d99a;   --v-amber: #e09a00;
  --v-red-fg: #b42318;     --v-red-bg: #fdecea;     --v-red-line: #f6c7c2;     --v-red: #d92d20;
  --v-violet-fg: #5b3aa8;  --v-violet-bg: #f0ebfb;  --v-violet-line: #d8cdf3;  --v-violet: #6d4ad1;
  --v-smoke-fg: #4b5a6e;   --v-smoke-bg: #edf0f4;   --v-smoke-line: #cfd7e1;   --v-smoke: #6b7a8e;
  --v-slate-fg: var(--v-smoke-fg); --v-slate-bg: var(--v-smoke-bg); --v-slate-line: var(--v-smoke-line); --v-slate: var(--v-smoke);
  --v-neutral-fg: #57534a; --v-neutral-bg: #f1efea; --v-neutral-line: #e0dcd2; --v-neutral: #8a8579;
  --v-flame-fg: #b33000;   --v-flame-bg: #fff0e8;   --v-flame-line: #ffd3bd;   --v-flame: #ff4500;

  /* Charts: categorical order is fixed and CVD-validated (adjacent pairs,
     both themes). Assign in order, never cycle; a 9th series folds to Other. */
  --v-c1: #eb6834; --v-c2: #2a78d6; --v-c3: #1baf7a; --v-c4: #eda100;
  --v-c5: #e87ba4; --v-c6: #008300; --v-c7: #4a3aa7; --v-c8: #e34948;
  --v-chart-grid: #ece9e2;
  --v-chart-axis: #c9c3b6;
  --v-chart-label: #6b665c;
  --v-chart-muted: #e6e1d5;

  /* Guest rating scale 1 to 5 (diverging: red, neutral midpoint, teal-green). */
  --v-rate-1: #c8372d;
  --v-rate-2: #ec835a;
  --v-rate-3: #b9b2a2;
  --v-rate-4: #4fb39a;
  --v-rate-5: #148066;

  /* Type: one family everywhere. Public Sans is already loaded by the admin
     app, has tabular figures, and covers Latin well. */
  --v-font-sans: "Public Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --v-font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --v-text-xs: 0.75rem;    /* 12 captions, table meta */
  --v-text-sm: 0.8125rem;  /* 13 dense table cells, labels */
  --v-text-md: 0.875rem;   /* 14 desktop body */
  --v-text-lg: 1rem;       /* 16 mobile body, card titles */
  --v-text-xl: 1.125rem;   /* 18 section titles */
  --v-text-2xl: 1.375rem;  /* 22 page titles (desktop) */
  --v-text-3xl: 1.75rem;   /* 28 KPI values, mobile hero */
  --v-text-4xl: 2.25rem;   /* 36 kiosk headings */
  --v-text-5xl: 3rem;      /* 48 kiosk display */
  --v-weight-regular: 400;
  --v-weight-medium: 500;
  --v-weight-semibold: 600;
  --v-weight-bold: 700;
  --v-leading-tight: 1.2;
  --v-leading-normal: 1.5;
  --v-tracking-caps: 0.06em;

  /* Space: 4px grid. */
  --v-space-1: 4px;
  --v-space-2: 8px;
  --v-space-3: 12px;
  --v-space-4: 16px;
  --v-space-5: 20px;
  --v-space-6: 24px;
  --v-space-8: 32px;
  --v-space-10: 40px;
  --v-space-12: 48px;
  --v-space-16: 64px;

  /* Shape */
  --v-radius-xs: 4px;   /* tags, kbd */
  --v-radius-sm: 6px;   /* chips, small controls */
  --v-radius-md: 8px;   /* buttons, inputs */
  --v-radius-lg: 12px;  /* cards, panels */
  --v-radius-xl: 16px;  /* dialogs, sheets, kiosk tiles */
  --v-radius-full: 999px;

  /* Sizing: controls. 36 desktop default, 44 touch minimum, 56 mobile
     primary, 96 kiosk targets. */
  --v-control-sm: 32px;
  --v-control-md: 36px;
  --v-control-lg: 44px;
  --v-control-xl: 56px;
  --v-control-kiosk: 96px;

  /* Elevation: borders do most of the work; shadows only lift what floats. */
  --v-shadow-xs: 0 1px 2px rgba(28, 26, 23, 0.05);
  --v-shadow-sm: 0 1px 2px rgba(28, 26, 23, 0.04), 0 2px 8px rgba(28, 26, 23, 0.05);
  --v-shadow-md: 0 4px 12px rgba(28, 26, 23, 0.08), 0 16px 32px -12px rgba(28, 26, 23, 0.18);
  --v-shadow-lg: 0 24px 56px -12px rgba(28, 26, 23, 0.32);

  /* Motion */
  --v-dur-fast: 120ms;
  --v-dur-base: 200ms;
  --v-dur-slow: 380ms;   /* entrances: page content, icon swaps */
  --v-dur-theme: 320ms;  /* every colour eases once when the theme flips */
  --v-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layers */
  --v-z-sticky: 10;
  --v-z-nav: 20;
  --v-z-drawer: 40;
  --v-z-dialog: 50;
  --v-z-menu: 60;
  --v-z-toast: 70;

  /* Layout */
  --v-sidebar-w: 248px;
  --v-sidebar-w-collapsed: 64px;
  --v-topbar-h: 56px;
  --v-content-max: 1440px;
  --v-page-pad: 24px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --v-bg: #121110;
  --v-surface: #1a1917;
  --v-surface-2: #22201d;
  --v-surface-3: #2c2a26;
  --v-border: #312e29;
  --v-border-strong: #48443b;
  --v-scrim: rgba(0, 0, 0, 0.62);
  --v-text: #f2f0ea;
  --v-text-2: #bdb7aa;
  --v-text-3: #a39d90;
  --v-text-4: #7d786c;
  --v-accent: #ff9a70;
  --v-accent-soft: #2f1a10;
  --v-accent-border: #5a2a14;
  --v-blue-fg: #8cbcf5;    --v-blue-bg: #16263b;    --v-blue-line: #23406a;    --v-blue: #4b8fe6;
  --v-green-fg: #7fd49b;   --v-green-bg: #12281b;   --v-green-line: #1e4a2f;   --v-green: #34b36a;
  --v-amber-fg: #f2c063;   --v-amber-bg: #2c2210;   --v-amber-line: #574217;   --v-amber: #e6a21a;
  --v-red-fg: #f59a90;     --v-red-bg: #321815;     --v-red-line: #5e2a24;     --v-red: #ef5a4c;
  --v-violet-fg: #bba6f2;  --v-violet-bg: #221b36;  --v-violet-line: #3d3166;  --v-violet: #8f6ef0;
  --v-smoke-fg: #93a3b8;   --v-smoke-bg: #1e242c;   --v-smoke-line: #35404d;   --v-smoke: #93a3b8;
  --v-neutral-fg: #bdb7aa; --v-neutral-bg: #24221f; --v-neutral-line: #3a372f; --v-neutral: #8f8a7d;
  --v-flame-fg: #ff9a70;   --v-flame-bg: #2f1a10;   --v-flame-line: #5a2a14;   --v-flame: #ff5a1f;
  --v-c1: #d95926; --v-c2: #3987e5; --v-c3: #199e70; --v-c4: #c98500;
  --v-c5: #d55181; --v-c6: #008300; --v-c7: #9085e9; --v-c8: #e66767;
  --v-chart-grid: #2a2723;
  --v-chart-axis: #48443b;
  --v-chart-label: #a39d90;
  --v-chart-muted: #2e2b26;
  --v-rate-3: #6f695d;
  --v-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --v-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
  --v-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35), 0 16px 32px -12px rgba(0, 0, 0, 0.6);
  --v-shadow-lg: 0 24px 56px -12px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}
