/* =============================================================================
   Tidewater — the shared Arbot design system.

   SINGLE SOURCE OF TRUTH for both surfaces:
     - the Vue app (frontend/) imports this directly
     - the Go operator dashboard (dashboard/) embeds a SYNCED COPY at
       dashboard/web/design/tidewater.css (run scripts/sync-design.sh; a Go
       test guards drift). Do not hand-edit the dashboard copy.

   Self-hosted fonts (./fonts/*.woff2) are served same-origin, which the
   dashboard CSP (font-src 'self') requires — external font hosts are blocked.

   Structure: canonical --tw-* tokens, then two alias blocks that map the
   frontend's token names and the dashboard's token names onto the canonical
   set, so neither app needs a mass rename. Dark mode redefines only --tw-*;
   every alias references --tw-* and follows automatically.
   ========================================================================== */

/* ---- Fonts (variable, self-hosted) --------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./fonts/fraunces-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./fonts/fraunces-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* Hebrew (ar-0kw8), behind the Latin faces in the font tokens: Heebo for the body,
   Frank Ruhl Libre for display. Their Hebrew range only, so a Latin page draws
   exactly as before. Both OFL-1.1, from @fontsource-variable 5.3.0. */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./fonts/heebo-hebrew-wght-normal.woff2) format('woff2');
  unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;
}
@font-face {
  font-family: 'Frank Ruhl Libre';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(./fonts/frank-ruhl-libre-hebrew-wght-normal.woff2) format('woff2');
  unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;
}

/* ---- Canonical tokens + alias schemes (light) ---------------------------- */
:root {
  color-scheme: light;

  /* The page's direction as a number (ar-0kw8): 1 left to right, -1 right to left
     (<html dir="rtl">, Hebrew). What logical properties cannot turn, a sideways
     transform or gradient, multiplies by it. */
  --dir: 1;

  /* Brand / accent — Amber Glass (molten terracotta) */
  --tw-accent: #bb4a2a;
  --tw-accent-strong: #a03d20;
  --tw-accent-ink: #9a3a1e;
  --tw-accent-soft: #f6e2d8;
  /* Ink for anything that sits ON an accent fill. It FLIPS with the theme: the
     light accent is dark enough to carry white (5.09:1 on --tw-accent, 6.60:1
     on --tw-accent-strong), the dark one is not — see the dark blocks. Never
     hardcode #fff on an accent background; use this (ARB-360). */
  --tw-accent-on: #fff;
  --tw-accent-rgb: 187, 74, 42;

  /* Ground & surfaces — warm cream */
  --tw-ground: #faf5ee;
  --tw-surface: #fffdf8;
  --tw-surface-2: #f1e7da;

  /* Ink — warm espresso */
  --tw-ink: #2a1e15;
  --tw-ink-2: #655141;
  --tw-ink-faint: #9a8876;

  /* Lines & shadow */
  --tw-border: rgba(58, 40, 24, 0.12);
  --tw-border-subtle: rgba(58, 40, 24, 0.06);
  --tw-shadow-sm: 0 8px 22px -16px rgba(58, 40, 24, 0.28);
  --tw-shadow-md: 0 14px 34px -18px rgba(58, 40, 24, 0.36);

  /* Frosted glass (warm white) */
  --tw-glass-bg: rgba(255, 253, 248, 0.60);
  --tw-glass-strong: rgba(255, 253, 248, 0.74);
  --tw-glass-border: rgba(255, 255, 255, 0.72);
  --tw-glass-blur: 18px;

  /* Status (warm-harmonized). The light status colour is ALSO the TEXT that
     sits on its own -soft fill (the "registered/waitlist/full" chips), so it
     has to clear 4.5:1 there, not just look right as a line or a fill. The old
     mid-tones did not: #4f7a3a/#b0741a/#c0342a/#2e7d9a on their -soft fills read
     4.20 / 3.27 / 4.42 / 3.81:1 — all under the bar (ARB-382). Deepened to the
     values below they read 4.61 / 4.63 / 4.66 / 4.61:1, hue kept. The -soft and
     -mark tokens are unchanged, and darkening the colour only RAISES the
     white-on-fill contrast (good/danger/info keep white; warn — see below). */
  --tw-good: #4a7337;      --tw-good-soft: #e4eed9;  --tw-good-mark: #4f7a3a;
  --tw-warn: #8f5e15;      --tw-warn-soft: #f7e9ce;  --tw-warn-mark: #c98a00;
  --tw-danger: #ba3229;    --tw-danger-soft: #f7e0dc; --tw-danger-mark: #d6473c;
  --tw-info: #296f89;      --tw-info-soft: #dcebf0;
  --tw-gray-line: #d8cdbe;
  /* Ink for anything that sits ON a filled good/danger/warn/info surface — the
     same flip --tw-accent-on makes, for the status palette. The light good and
     danger fills are dark enough to carry white (5.53:1 on --tw-good, 5.87:1 on
     --tw-danger after ARB-382's deepening); the dark ones are not — see the dark
     blocks. Never hardcode #fff on a status FILL; use these (ARB-375, ARB-380).
     Status-coloured TEXT on a neutral ground is a different question and keeps
     its own colour.

     --tw-warn-on now flips too (ARB-382). It USED to stay dark in both themes,
     because the old light amber #b0741a was too light for white (3.92:1 — the
     one light fill that was). ARB-382 deepened the amber to #8f5e15 so its text
     clears the bar on the -soft fill, and that same amber now carries white at
     5.56:1 (dark ink would only be 3.28:1 on it), so warn joins its neighbours
     instead of being the exception. --tw-info-on flips as well: white is 5.63:1
     on the light teal and 2.25:1 on the dark one. */
  --tw-good-on: #fff;
  --tw-danger-on: #fff;
  --tw-warn-on: #fff;
  --tw-info-on: #fff;

  /* Type & shape */
  --tw-font-display: 'Fraunces', 'Frank Ruhl Libre', Georgia, 'Times New Roman', serif;
  --tw-font-body: 'Inter', 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --tw-radius-sm: 12px;
  --tw-radius: 16px;
  --tw-radius-lg: 22px;
  --tw-radius-pill: 999px;

  /* Aurora ground (paint under the ground color on <body>) — honey/rose/peach */
  --tw-aurora:
    radial-gradient(58% 46% at calc(50% - 44% * var(--dir)) 0%, rgba(246, 166, 35, 0.22), transparent 66%),
    radial-gradient(54% 40% at calc(50% + 50% * var(--dir)) 4%, rgba(242, 103, 140, 0.16), transparent 70%),
    radial-gradient(72% 54% at calc(50% + 38% * var(--dir)) 100%, rgba(255, 140, 90, 0.18), transparent 66%);
  /* The aurora's three tones as colours of their own, the same in both themes (ar-46pi). */
  --tw-aurora-honey: #f6a623;
  --tw-aurora-rose: #f2678c;
  --tw-aurora-peach: #ff8c5a;

  /* The sunrise (ar-46pi): the free month's welcome screen (board 0c-2b). Its ground,
     the sun behind the headline, the glow the headline wears (the rays are this glow,
     thinner) and the gift card's light. Dark keeps the dark ground and aurora. */
  --tw-sunrise: linear-gradient(168deg, #fbe2b2 0%, #f6c6a6 42%, #eea7ab 78%, #e59aa8 100%);
  --tw-sunrise-sun: radial-gradient(closest-side, rgba(255, 253, 245, 1) 0%, rgba(255, 238, 196, 0.92) 24%, rgba(255, 208, 156, 0.55) 48%, rgba(255, 190, 150, 0) 76%);
  --tw-sunrise-glow: rgba(255, 255, 255, 0.95);
  --tw-sunrise-card-shadow: 0 0 40px 10px rgba(255, 244, 220, 0.75), 0 22px 44px -22px rgba(122, 45, 22, 0.4);
  /* Gold that stays gold in both themes (ar-46pi): the logo's turning ring and its
     halo, and the gold button with its glow. */
  --tw-gold-ring: conic-gradient(from 0deg, #e8a33d 0 18%, #f6d38c 28% 42%, #fff8e6 46% 48%, #e8a33d 54% 70%, #f6d38c 80% 95%, #e8a33d 100%);
  --tw-gold-halo: radial-gradient(circle, rgba(255, 240, 200, 0.95) 0%, rgba(255, 214, 150, 0.55) 42%, rgba(255, 214, 150, 0) 72%);
  --tw-gold-button: linear-gradient(180deg, #f8dc98 0%, #edb24f 48%, #d18a2b 100%);
  --tw-gold-button-shadow: 0 0 30px 6px rgba(255, 214, 150, 0.75), 0 14px 28px -12px rgba(150, 90, 20, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.7);

  /* Rose (ar-9oc0): Lover mode's look, the people a member follows: its tab, the
     Overview's card and the Schedule's pink rows. The heart and a pink card's edge
     (3.99:1 on the surface, 3.15:1 on the picked heart's -soft ground), the ink for text
     on the pink grounds (7.07:1 on the card's middle, 6.66:1 on -soft), the card's title,
     the lines, and the two pink grounds with their glow. Dark keeps the look in wine. */
  --tw-rose: #d94a72;
  --tw-rose-ink: #8c2346;
  --tw-rose-ink-strong: #7c1f3f;
  --tw-rose-soft: #f9dbe3;
  --tw-rose-line: rgba(217, 74, 114, 0.38);
  --tw-rose-rule: rgba(217, 74, 114, 0.18);
  --tw-rose-card: linear-gradient(160deg, #fff2f6 0%, #fde2eb 55%, #fbd0de 100%);
  --tw-rose-card-shadow: 0 0 0 4px rgba(255, 255, 255, 0.55), 0 18px 36px -22px rgba(217, 74, 114, 0.7);
  --tw-rose-row: linear-gradient(135deg, #fff3f7 0%, #fde3ec 100%);
  --tw-rose-row-shadow: 0 10px 22px -16px rgba(217, 74, 114, 0.75);

  /* ---- frontend (Vue app) alias scheme ---- */
  --primary-color: var(--tw-accent);
  --primary-dark: var(--tw-accent-strong);
  --primary-color-rgb: var(--tw-accent-rgb);
  /* Un-prefixed on-fill inks — shared by BOTH surfaces (the Vue app's primary
     buttons and the dashboard's .btn-primary; the app's .btn-danger and toast
     icons and the dashboard's .toast.err), so each lives once. The app and the
     dashboard spell the FILLS differently (--red-line/--green vs
     --danger/--success), so the ink deliberately has one name for both. */
  --accent-on: var(--tw-accent-on);
  --good-on: var(--tw-good-on);
  --danger-on: var(--tw-danger-on);
  --warn-on: var(--tw-warn-on);
  --info-on: var(--tw-info-on);
  --bg-primary: var(--tw-surface);
  --bg-secondary: var(--tw-surface-2);
  --bg-page: var(--tw-ground);
  --text-primary: var(--tw-ink);
  --text-secondary: var(--tw-ink-2);
  --text-faint: var(--tw-ink-faint);
  --border-color: var(--tw-border);
  --border-subtle: var(--tw-border-subtle);
  --shadow-sm: var(--tw-shadow-sm);
  --shadow-md: var(--tw-shadow-md);
  --glass-bg: var(--tw-glass-bg);
  --glass-strong: var(--tw-glass-strong);
  --glass-border: var(--tw-glass-border);
  --glass-blur: var(--tw-glass-blur);
  --font-display: var(--tw-font-display);
  --font-body: var(--tw-font-body);
  --radius-sm: var(--tw-radius-sm);
  --radius: var(--tw-radius);
  --radius-lg: var(--tw-radius-lg);
  --radius-pill: var(--tw-radius-pill);
  --green: var(--tw-good);       --green-bg: var(--tw-good-soft);  --green-line: var(--tw-good);
  --amber: var(--tw-warn);       --amber-bg: var(--tw-warn-soft);  --amber-line: var(--tw-warn);
  --red-line: var(--tw-danger);  --red-bg: var(--tw-danger-soft);
  --info: var(--tw-info);        --info-line: var(--tw-info);      --info-bg: var(--tw-info-soft);
  --gray-line: var(--tw-gray-line);
  --aurora: var(--tw-aurora);
  --rose: var(--tw-rose);        --rose-ink: var(--tw-rose-ink);   --rose-ink-strong: var(--tw-rose-ink-strong);
  --rose-soft: var(--tw-rose-soft); --rose-line: var(--tw-rose-line); --rose-rule: var(--tw-rose-rule);
  --rose-card: var(--tw-rose-card); --rose-card-shadow: var(--tw-rose-card-shadow);
  --rose-row: var(--tw-rose-row);   --rose-row-shadow: var(--tw-rose-row-shadow);

  /* ---- dashboard (Go operator UI) alias scheme ---- */
  --bg: var(--tw-ground);
  --surface: var(--tw-surface);
  --surface-2: var(--tw-surface-2);
  --text: var(--tw-ink);
  --text-2: var(--tw-ink-2);
  --muted: var(--tw-ink-faint);
  --border: var(--tw-border);
  --accent: var(--tw-accent);
  --accent-ink: var(--tw-accent-ink);
  --accent-soft: var(--tw-accent-soft);
  --success: var(--tw-good);       --success-mark: var(--tw-good-mark);  --success-soft: var(--tw-good-soft);
  --warn-mark: var(--tw-warn-mark); --warn-soft: var(--tw-warn-soft);
  --danger: var(--tw-danger);      --danger-mark: var(--tw-danger-mark); --danger-soft: var(--tw-danger-soft);
  --shadow: var(--tw-shadow-md);
  /* NB: --border, --warn, --grid and the chart series (--c-*, --s1..s5) are
     shared names too; --border/--warn map here, the chart palette lives in the
     dashboard's own stylesheet (retuned to Tidewater there). */
  --warn: var(--tw-warn);
}

/* ---- Dark (system) ------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --tw-accent: #e8815a;
    --tw-accent-strong: #d06a44;
    --tw-accent-ink: #f0a583;
    --tw-accent-soft: rgba(232, 129, 90, 0.16);
    /* A light accent on a dark ground wants DARK ink. White read 2.72:1 on
       --tw-accent and 3.60:1 on --tw-accent-strong — below even the 3:1
       large-text bar. This is 6.70:1 and 5.06:1 (ARB-360). */
    --tw-accent-on: #1a1410;
    --tw-accent-rgb: 232, 129, 90;
    --tw-ground: #1a1410;
    --tw-surface: #241c15;
    --tw-surface-2: #1f1811;
    --tw-ink: #f3e9dc;
    --tw-ink-2: #c2b2a0;
    --tw-ink-faint: #8a7a68;
    --tw-border: rgba(220, 190, 160, 0.14);
    --tw-border-subtle: rgba(220, 190, 160, 0.08);
    --tw-shadow-sm: 0 8px 22px -16px rgba(0, 0, 0, 0.5);
    --tw-shadow-md: 0 14px 34px -18px rgba(0, 0, 0, 0.55);
    --tw-glass-bg: rgba(44, 34, 26, 0.55);
    --tw-glass-strong: rgba(48, 38, 28, 0.70);
    --tw-glass-border: rgba(220, 190, 160, 0.14);
    --tw-good: #7fb86a;   --tw-good-soft: rgba(127, 184, 106, 0.16);  --tw-good-mark: #7fb86a;
    --tw-warn: #e0a24a;   --tw-warn-soft: rgba(224, 162, 74, 0.16);  --tw-warn-mark: #e0a24a;
    --tw-danger: #f0897e; --tw-danger-soft: rgba(240, 137, 126, 0.16); --tw-danger-mark: #e8695c;
    --tw-info: #6fb6d6;   --tw-info-soft: rgba(111, 182, 214, 0.16);
    --tw-gray-line: rgba(220, 190, 160, 0.20);
    /* Light status fills on a dark ground want DARK ink, exactly as the accent
       does. White read 2.34:1 on --tw-good, 2.45:1 on --tw-danger (ARB-375),
       2.23:1 on --tw-warn and 2.25:1 on --tw-info (ARB-380) — all below even
       the 3:1 large-text bar. This is 7.79 / 7.46 / 8.20 / 8.11:1. */
    --tw-good-on: #1a1410;
    --tw-danger-on: #1a1410;
    --tw-warn-on: #1a1410;
    --tw-info-on: #1a1410;
    --tw-aurora:
      radial-gradient(58% 46% at calc(50% - 44% * var(--dir)) 0%, rgba(246, 166, 35, 0.14), transparent 66%),
      radial-gradient(54% 40% at calc(50% + 50% * var(--dir)) 4%, rgba(242, 103, 140, 0.10), transparent 70%),
      radial-gradient(72% 54% at calc(50% + 38% * var(--dir)) 100%, rgba(255, 140, 90, 0.12), transparent 66%);
    --tw-sunrise: var(--tw-aurora), var(--tw-ground);
    --tw-sunrise-sun: radial-gradient(closest-side, rgba(255, 214, 150, 0.26) 0%, rgba(246, 166, 35, 0.14) 40%, rgba(242, 103, 140, 0.05) 60%, rgba(242, 103, 140, 0) 76%);
    --tw-sunrise-glow: rgba(255, 214, 150, 0.30);
    --tw-sunrise-card-shadow: 0 0 40px 6px rgba(246, 166, 35, 0.08), 0 22px 44px -22px rgba(0, 0, 0, 0.6);
    /* Rose in wine (ar-9oc0): the ink is 8.56:1 on the card's middle and 6.47:1 on
       -soft over the surface, the heart 5.95:1 on the card and 6.6:1 on the surface. */
    --tw-rose: #f0809f;
    --tw-rose-ink: #f6a5bd;
    --tw-rose-ink-strong: #f9bccd;
    --tw-rose-soft: rgba(240, 128, 159, 0.18);
    --tw-rose-line: rgba(240, 128, 159, 0.40);
    --tw-rose-rule: rgba(240, 128, 159, 0.20);
    --tw-rose-card: linear-gradient(160deg, #3b1d29 0%, #321823 55%, #2a141d 100%);
    --tw-rose-card-shadow: 0 0 0 4px rgba(240, 128, 159, 0.06), 0 18px 36px -22px rgba(0, 0, 0, 0.7);
    --tw-rose-row: linear-gradient(135deg, #34192a 0%, #2c1520 100%);
    --tw-rose-row-shadow: 0 10px 22px -16px rgba(0, 0, 0, 0.7);
  }
}

/* ---- Dark (explicit toggle — wins over a light OS) ----------------------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --tw-accent: #e8815a;
  --tw-accent-strong: #d06a44;
  --tw-accent-ink: #f0a583;
  --tw-accent-soft: rgba(232, 129, 90, 0.16);
  /* A light accent on a dark ground wants DARK ink — 6.70:1 on --tw-accent,
     5.06:1 on --tw-accent-strong, against white's 2.72:1 / 3.60:1 (ARB-360). */
  --tw-accent-on: #1a1410;
  --tw-accent-rgb: 232, 129, 90;
  --tw-ground: #1a1410;
  --tw-surface: #241c15;
  --tw-surface-2: #1f1811;
  --tw-ink: #f3e9dc;
  --tw-ink-2: #c2b2a0;
  --tw-ink-faint: #8a7a68;
  --tw-border: rgba(220, 190, 160, 0.14);
  --tw-border-subtle: rgba(220, 190, 160, 0.08);
  --tw-shadow-sm: 0 8px 22px -16px rgba(0, 0, 0, 0.5);
  --tw-shadow-md: 0 14px 34px -18px rgba(0, 0, 0, 0.55);
  --tw-glass-bg: rgba(44, 34, 26, 0.55);
  --tw-glass-strong: rgba(48, 38, 28, 0.70);
  --tw-glass-border: rgba(220, 190, 160, 0.14);
  --tw-good: #7fb86a;   --tw-good-soft: rgba(127, 184, 106, 0.16);  --tw-good-mark: #7fb86a;
  --tw-warn: #e0a24a;   --tw-warn-soft: rgba(224, 162, 74, 0.16);  --tw-warn-mark: #e0a24a;
  --tw-danger: #f0897e; --tw-danger-soft: rgba(240, 137, 126, 0.16); --tw-danger-mark: #e8695c;
  --tw-info: #6fb6d6;   --tw-info-soft: rgba(111, 182, 214, 0.16);
  --tw-gray-line: rgba(220, 190, 160, 0.20);
  /* Light status fills on a dark ground want DARK ink — 7.79:1 on --tw-good,
     7.46:1 on --tw-danger (ARB-375), 8.20:1 on --tw-warn and 8.11:1 on
     --tw-info (ARB-380), against white's 2.34 / 2.45 / 2.23 / 2.25:1. */
  --tw-good-on: #1a1410;
  --tw-danger-on: #1a1410;
  --tw-warn-on: #1a1410;
  --tw-info-on: #1a1410;
  --tw-aurora:
    radial-gradient(58% 46% at calc(50% - 44% * var(--dir)) 0%, rgba(246, 166, 35, 0.12), transparent 66%),
    radial-gradient(54% 40% at calc(50% + 50% * var(--dir)) 4%, rgba(242, 103, 140, 0.10), transparent 70%),
    radial-gradient(72% 54% at calc(50% + 38% * var(--dir)) 100%, rgba(255, 140, 90, 0.12), transparent 66%);
  --tw-sunrise: var(--tw-aurora), var(--tw-ground);
  --tw-sunrise-sun: radial-gradient(closest-side, rgba(255, 214, 150, 0.26) 0%, rgba(246, 166, 35, 0.14) 40%, rgba(242, 103, 140, 0.05) 60%, rgba(242, 103, 140, 0) 76%);
  --tw-sunrise-glow: rgba(255, 214, 150, 0.30);
  --tw-sunrise-card-shadow: 0 0 40px 6px rgba(246, 166, 35, 0.08), 0 22px 44px -22px rgba(0, 0, 0, 0.6);
  /* Rose in wine (ar-9oc0): the same values as the system dark block above. */
  --tw-rose: #f0809f;
  --tw-rose-ink: #f6a5bd;
  --tw-rose-ink-strong: #f9bccd;
  --tw-rose-soft: rgba(240, 128, 159, 0.18);
  --tw-rose-line: rgba(240, 128, 159, 0.40);
  --tw-rose-rule: rgba(240, 128, 159, 0.20);
  --tw-rose-card: linear-gradient(160deg, #3b1d29 0%, #321823 55%, #2a141d 100%);
  --tw-rose-card-shadow: 0 0 0 4px rgba(240, 128, 159, 0.06), 0 18px 36px -22px rgba(0, 0, 0, 0.7);
  --tw-rose-row: linear-gradient(135deg, #34192a 0%, #2c1520 100%);
  --tw-rose-row-shadow: 0 10px 22px -16px rgba(0, 0, 0, 0.7);
}

:root[dir="rtl"] { --dir: -1; }

/* ---- Shared opt-in primitives (either surface may use `tw-` classes) ------
   Existing app/dashboard component classes keep their own rules and simply
   inherit the new look through the tokens above; these `tw-` primitives are
   the convergence target (see ARB-255). */
.tw-glass,
.tw-card,
.tw-kpi {
  background: var(--tw-glass-bg);
  -webkit-backdrop-filter: blur(var(--tw-glass-blur)) saturate(1.3);
  backdrop-filter: blur(var(--tw-glass-blur)) saturate(1.3);
  border: 1px solid var(--tw-glass-border);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .tw-glass, .tw-card, .tw-kpi { background: var(--tw-surface); }
}
.tw-card { border-radius: var(--tw-radius); box-shadow: var(--tw-shadow-sm); padding: 16px; }
.tw-kpi { border-radius: var(--tw-radius); padding: 12px 14px; }
.tw-btn {
  font-family: var(--tw-font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
  border-radius: var(--tw-radius-pill);
  border: 1px solid var(--tw-border);
  background: var(--tw-surface);
  color: var(--tw-ink);
  padding: 8px 16px;
  cursor: pointer;
}
.tw-btn:hover { border-color: var(--tw-accent); }
.tw-btn-primary { background: var(--tw-accent); border-color: var(--tw-accent); color: var(--tw-accent-on); }
.tw-btn-primary:hover { background: var(--tw-accent-strong); border-color: var(--tw-accent-strong); }
.tw-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: var(--tw-radius-pill);
  padding: 2px 9px;
}
