/* Copied from backa-cloud src/app/tokens.css by site/sync-tokens.mjs. Do not edit here. */
/*
 * Design tokens for backa.ai: the only place raw values live.
 * Every colour, surface, text size, radius and shadow in the app comes from here,
 * and test/style-tokens.test.mjs fails if a raw value shows up anywhere else.
 *
 * Dark first (like backa.dev), with a cream light mode. Every grey is neutral (no blue tint).
 * Colour only where something needs you: warnings (a stopped undo) are text colour with a dot; red only for real failures and a confirmed delete.
 * Dark by default. The user picks Dark, Light or System under Settings, Account (cookie backa_theme);
 * the server puts data-theme="dark|light" on <html>, and with no attribute the theme follows the system.
 *
 * Surfaces, from the back to the front:
 *   --bg          standalone screens (sign-in, approval, older pages)
 *   --desk        the app's page around the sheet (side menu sits on it)
 *   --sheet-bg    the sheet the content lies on (gradient in light mode); --sheet-solid where a flat fill is needed
 *   --panel       a card on --bg (sign-in cards, consent)
 *   --panel-2     a card, tile or well on the sheet
 *   --pop         menus, tooltips and calendars: anything that floats
 *   --nt-bg       notices after an action: a hair off the sheet, so they sit on it instead of floating
 * State layers on top of any surface: --tint (resting fill), --hover, --sel (selected, highlight).
 */
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0b0b0b; --panel: #171717; --panel-2: #1f1f1f; --pop: #1c1c1c;
  --hover: rgba(255,255,255,.035); --sel: rgba(255,255,255,.06); --tint: rgba(255,255,255,.025);
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.15); --line-3: rgba(255,255,255,.3);
  --text: #ededed; --text-2: #a3a3a3; --text-3: #737373; --body: #c7c7c7;
  --inv: #ededed; --inv-fg: #0b0b0b; --inv-hover: #ffffff;
  /* warnings are nearly colourless: text colour plus a dot, so red stays for real failures */ --amber: var(--text); --amber-bg: var(--tint); --amber-line: var(--line-3);
  --red: #ff8f8f; --red-bg: rgba(255,143,143,.06); --red-line: rgba(255,143,143,.32);
  --logo-f: brightness(0) invert(1);
  --shadow: 0 20px 50px -12px rgba(0,0,0,.7);
  --scrim: rgba(0,0,0,.5);
  --dot: rgba(255,255,255,.09);
  --glow: rgba(255,255,255,.05); --glow-2: rgba(255,255,255,.07); /* soft light behind sign-in panels */
  /* the desk: the page around the sheet, and the sheet the content lies on */
  --desk: #1b1b1b; --sheet-bg: #050505; --sheet-solid: #050505; --sheet: #0e0e0e;
  --sheet-hi: inset 0 1px 0 rgba(255,255,255,.05);
  --nt-bg: color-mix(in oklab, var(--sheet-solid), #fff 5%); --nt-ring: inset 0 0 0 1px rgba(255,255,255,.09); --nt-lift: 0 18px 40px -18px rgba(0,0,0,.9);
  /* a card you can pick up (Systems, AI apps): the light that falls on it on hover, and the lift */
  --card-sheen: rgba(255,255,255,.06); --card-lift: 0 14px 30px -18px rgba(0,0,0,.8);

  --thumb: rgba(255,255,255,.13); --thumb-h: rgba(255,255,255,.24);
  /* marks: "/" a change, "\" undone */
  --mk: rgba(237,237,237,.8); --mk-u: rgba(237,237,237,.36);
  --flare: drop-shadow(0 0 3px rgba(255,255,255,.95)) drop-shadow(0 0 12px rgba(255,255,255,.6)) drop-shadow(0 0 28px rgba(255,255,255,.25)); --flare-c: #fff;
  /* the soft light that runs through a slash when its pieces join (approve) */
  --lit: drop-shadow(0 0 3px currentColor) drop-shadow(0 0 9px rgba(255,255,255,.35));
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(.22,1,.36,1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ece9e3; --panel: #faf8f4; --panel-2: #f1eee8; --pop: #fcfbf8;
    --hover: rgba(0,0,0,.035); --sel: rgba(0,0,0,.055); --tint: rgba(0,0,0,.02);
    --line: rgba(0,0,0,.09); --line-2: rgba(0,0,0,.17); --line-3: rgba(0,0,0,.32);
    --text: #0a0a0a; --text-2: #525252; --text-3: #8a8a8a; --body: #333333;
    --inv: #0a0a0a; --inv-fg: #ffffff; --inv-hover: #262626;
    /* warnings are nearly colourless: text colour plus a dot, so red stays for real failures */ --amber: var(--text); --amber-bg: var(--tint); --amber-line: var(--line-3);
    --red: #b42d2d; --red-bg: rgba(180,45,45,.05); --red-line: rgba(180,45,45,.3);
    --logo-f: brightness(0); --shadow: 0 20px 50px -16px rgba(0,0,0,.25); --scrim: rgba(0,0,0,.25); --dot: rgba(0,0,0,.1); --glow: rgba(0,0,0,.04); --glow-2: rgba(0,0,0,.04);
    --desk: #e9e6df; --sheet-bg: linear-gradient(180deg, #fbf9f5 0%, #f7f5f0 100%); --sheet-solid: #faf8f3; --sheet: #faf8f4;
    --sheet-hi: 0 1px 2px rgba(60,40,10,.05);
    --nt-bg: color-mix(in oklab, var(--sheet-solid), #000 3.5%); --nt-ring: inset 0 0 0 1px rgba(0,0,0,.08); --nt-lift: 0 16px 34px -20px rgba(40,30,10,.35);
    --card-sheen: rgba(255,255,255,.7); --card-lift: 0 14px 28px -18px rgba(60,40,10,.35);

    --thumb: rgba(0,0,0,.14); --thumb-h: rgba(0,0,0,.26);
    --mk: rgba(0,0,0,.72); --mk-u: rgba(0,0,0,.3);
    --flare: drop-shadow(0 0 3px rgba(0,0,0,.35)) drop-shadow(0 0 10px rgba(0,0,0,.15)); --flare-c: #000;
    --lit: drop-shadow(0 0 3px rgba(0,0,0,.35)) drop-shadow(0 0 8px rgba(0,0,0,.18));
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #ece9e3; --panel: #faf8f4; --panel-2: #f1eee8; --pop: #fcfbf8;
  --hover: rgba(0,0,0,.035); --sel: rgba(0,0,0,.055); --tint: rgba(0,0,0,.02);
  --line: rgba(0,0,0,.09); --line-2: rgba(0,0,0,.17); --line-3: rgba(0,0,0,.32);
  --text: #0a0a0a; --text-2: #525252; --text-3: #8a8a8a; --body: #333333;
  --inv: #0a0a0a; --inv-fg: #ffffff; --inv-hover: #262626;
  /* warnings are nearly colourless: text colour plus a dot, so red stays for real failures */ --amber: var(--text); --amber-bg: var(--tint); --amber-line: var(--line-3);
  --red: #b42d2d; --red-bg: rgba(180,45,45,.05); --red-line: rgba(180,45,45,.3);
  --logo-f: brightness(0); --shadow: 0 20px 50px -16px rgba(0,0,0,.25); --scrim: rgba(0,0,0,.25); --dot: rgba(0,0,0,.1); --glow: rgba(0,0,0,.04); --glow-2: rgba(0,0,0,.04);
  --desk: #e9e6df; --sheet-bg: linear-gradient(180deg, #fbf9f5 0%, #f7f5f0 100%); --sheet-solid: #faf8f3; --sheet: #faf8f4;
  --sheet-hi: 0 1px 2px rgba(60,40,10,.05);
  --nt-bg: color-mix(in oklab, var(--sheet-solid), #000 3.5%); --nt-ring: inset 0 0 0 1px rgba(0,0,0,.08); --nt-lift: 0 16px 34px -20px rgba(40,30,10,.35);
  --card-sheen: rgba(255,255,255,.7); --card-lift: 0 14px 28px -18px rgba(60,40,10,.35);

  --thumb: rgba(0,0,0,.14); --thumb-h: rgba(0,0,0,.26);
  --mk: rgba(0,0,0,.72); --mk-u: rgba(0,0,0,.3);
  --flare: drop-shadow(0 0 3px rgba(0,0,0,.35)) drop-shadow(0 0 10px rgba(0,0,0,.15)); --flare-c: #000;
  --lit: drop-shadow(0 0 3px rgba(0,0,0,.35)) drop-shadow(0 0 8px rgba(0,0,0,.18));
  color-scheme: light;
}

/* ---------- scale: the same in both themes ---------- */
:root {
  /* text: seven sizes, one per role. Pick by role, never by pixel.
     micro    mono labels, counts, keys, avatar letters
     caption  sub-lines under a row, timestamps, hints, field labels, small buttons
     body     row text, menus, controls, buttons, tables, facts (the default)
     lead     section headings, intro lines, big inputs and block buttons
     heading  drawer titles, page title on phones, code entry
     title    page title
     display  sign-in and first-run headlines */
  --fs-micro: 11px; --fs-caption: 12.5px; --fs-body: 14px; --fs-lead: 15px; --fs-heading: 20px; --fs-title: 24px; --fs-display: 28px;
  /* the one brand headline (sign-in panel, same as backa.dev), fluid */
  --fs-hero: clamp(32px, 3.3vw, 46px);
  /* tracking that goes with the bigger sizes, and caps labels */
  --ls-tight: -0.01em; --ls-title: -0.025em; --ls-display: -0.035em; --ls-caps: .1em;
  /* radii: xs bars and marks, sm small chips, md small controls, base buttons/inputs/rows, lg cards/menus, xl sheet/drawers/big panels */
  --r-xs: 2px; --r-sm: 4px; --r-md: 6px; --r: 8px; --r-lg: 12px; --r-xl: 18px; --r-pill: 999px;
  /* rings (hairline borders drawn as shadows) and lifts */
  --ring: inset 0 0 0 1px var(--line); --ring-2: inset 0 0 0 1px var(--line-2); --ring-3: inset 0 0 0 1px var(--line-3);
  --lift-sm: 0 1px 2px rgba(0,0,0,.25);
  --lift-pop: 0 0 0 1px var(--line-2), 0 10px 28px rgba(0,0,0,.28);
  --focus-halo: 0 0 0 3px var(--sel);
  --qr-bg: #fff; /* a QR code needs white behind it in both themes */
}
