/* Hallmark · checked: 2026-10-29 · genre: modern-minimal · theme: dusk (by request) · shape: app screen
 * dusk: signals green-apricot · surface: slate, no glass · motion: state only · built: the project · redesign: restyle · v2.0.0 */
/* Shared design tokens for the web app and the extension side panel (UI-Dusk).
   apps/web/tokens.css and apps/extension/tokens.css are byte-identical (tests/test_ui_tokens.py), because the unpacked
   extension cannot import from apps/web. Edit one, copy it to the other.
   This is the only stylesheet that holds raw colour values. Components use names, never hex.
   Spec: docs/designs/admin-web-redesign.md (Part A, mockup 7). Light and dark are two renderings of one set of names.
   Rhino green (the logo's hue) is the done, current, on and focus signal; amber is open, waiting and owed.
   Three layers. The theme layer holds the --color-* tokens that change with the scheme. The fixed layer (the bone wells,
   the bright greens, the apricot family) is the same in both schemes: a rule that paints a bone well takes its text from
   the fixed layer, a rule that paints a theme surface takes theme text. The older names (--bg, --text, --accent ...)
   alias the theme. The dark block below swaps theme values only; no rule outside it knows about the scheme. */

:root {
  /* theme layer. paper: the page behind the canvas and the sidebar. canvas: the content surface and the field fill.
     paper-2: card and notice. paper-3: raised (tour bubble, toast). hover: the hover fill. */
  --color-paper: #EEF2EC;
  --color-canvas: #FFFFFF;
  --color-paper-2: #F5F8F4;
  --color-paper-3: #FFFFFF;
  --color-hover: #E2E9E0;
  --color-ink: #14201A;
  --color-ink-2: #2E3B33;
  --color-muted: #56645B;
  --color-rule: #E1E8E0;
  /* edge draws fields, buttons and switches, 3:1 on its surfaces; rule is only a hairline between rows */
  --color-edge: #738279;
  --color-light: oklch(100% 0 0);
  --color-shade: oklch(10% 0.022 268);

  /* signal: link, current page, done, on. action: the one primary button. open: due soon, waiting, at risk. */
  --color-signal: #17642B;
  --color-signal-soft: #DFF0E3;
  --color-action: #1F7D36;
  --color-action-ink: #FFFFFF;
  --color-focus: #1F7D36;
  --color-open: #8A4B08;
  --color-open-soft: #FBF1DE;
  --color-open-rule: #E8CB98;
  --color-knob-on: var(--color-card);

  /* errors and destructive actions only, always with a word and an icon */
  --color-danger: #A3261D;
  --danger-bg: #FCE9E6;

  /* fixed layer. Rhino green (logo green #1f7d36 is oklch(52% 0.137 147)): the same in both themes. */
  --color-green: oklch(78% 0.135 147);
  --color-green-hi: oklch(84% 0.115 147);
  --color-green-ink: oklch(22% 0.045 147);
  --color-green-deep: oklch(45% 0.11 147);
  --color-green-soft: oklch(30% 0.045 147);

  /* fixed layer. apricot */
  --color-apricot: oklch(83% 0.095 62);
  --color-apricot-ink: oklch(24% 0.04 62);
  --color-apricot-deep: oklch(50% 0.11 55);
  --color-apricot-soft: oklch(30% 0.04 62);
  --color-danger-deep: oklch(50% 0.16 28);

  /* fixed layer. bone wells: the hand-off surface, light in both themes. One raised card sits inside. */
  --color-well: oklch(95.5% 0.008 75);
  --color-well-2: oklch(92% 0.010 75);
  --color-card: oklch(99.5% 0.003 75);
  --color-well-ink: oklch(21% 0.016 268);
  --color-well-muted: oklch(47% 0.016 265);
  --color-well-rule: oklch(87.5% 0.009 75);
  --color-well-edge: oklch(58% 0.014 265);
  --color-logo-tile: var(--color-card);

  /* surfaces: cards are flat fills. The canvas has a soft shadow on light and a 1px ring on dark; the tour bubble and
     the toast have a drop shadow. --shadow-panel stays defined for the older rules that still name it. */
  --lit-edge: inset 0 1px 0 color-mix(in oklab, var(--color-light) 70%, transparent);
  --panel-ring: inset 0 0 0 1px var(--color-rule);
  --shadow-panel: none;
  --shadow-canvas: 0 1px 2px rgba(20, 32, 26, 0.05), 0 8px 28px rgba(20, 32, 26, 0.07);
  --shadow-pop: 0 2px 6px rgba(20, 32, 26, 0.08), 0 18px 44px rgba(20, 32, 26, 0.18);
  --ghost-fill: color-mix(in oklab, var(--color-ink) 4%, transparent);
  --ghost-ring: color-mix(in oklab, var(--color-ink) 30%, transparent);

  /* type: Wix Madefor Display for h1 and h2, Text for everything else. Root size stays 16px. */
  --font-display: "Wix Madefor Display", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Wix Madefor Text", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --tracking-display: -0.022em;
  /* the side panel still reads this one; web headings use the --weight-* tokens */
  --display-weight: 500;
  --text-meta: 0.75rem;
  --text-small: 0.8125rem;
  --text-label: 0.8125rem;
  --text-body: 0.9375rem;
  --text-title: 1rem;
  --text-section: 1.3125rem;
  --text-page: 2.125rem;
  --text-page-narrow: 1.75rem;
  --text-figure: 2.125rem;
  --weight-page: 700;
  --weight-section: 700;
  --weight-title: 600;
  --weight-label: 600;
  --leading-page: 1.15;
  --leading-heading: 1.25;
  --leading-title: 1.35;
  --leading-label: 1.4;
  --leading-body: 1.5;

  /* space 4/8/12/16/24/32/48, radii 10/16/20/pill, motion */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --radius-inner: 10px;
  --radius-card: 16px;
  --radius-canvas: 20px;
  --radius-pill: 999px;
  --dur-micro: 100ms;
  --dur-short: 160ms;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* space by role */
  --pad-canvas: 2rem 2.5rem;
  --pad-canvas-narrow: 1.25rem 1rem;
  --measure-page: 1080px;
  --gap-head: 1.5rem;
  --gap-head-after: 2rem;
  --gap-section: 2rem;
  --gap-stack: 1.5rem;
  --pad-card: 1.25rem;
  --gap-title: 0.75rem;
  --gap-field: 0.75rem;
  --gap-label: 0.25rem;
  --pad-row: 0.75rem;

  /* aliases: the names the stylesheets use */
  --bg: var(--color-paper);
  --surface: var(--color-paper-2);
  --surface-muted: var(--color-paper-3);
  --text: var(--color-ink);
  --text-muted: var(--color-muted);
  --border: var(--color-rule);
  --border-strong: color-mix(in oklab, var(--color-ink) 22%, transparent);
  --border-input: var(--color-edge);
  --accent: var(--color-green);
  --accent-on: var(--color-green-ink);
  --primary: var(--color-signal);
  --primary-soft: var(--color-signal-soft);
  --danger: var(--color-danger);
  --primary-hover: color-mix(in oklab, var(--color-signal) 72%, var(--color-ink));
  --success: var(--color-signal);
  --success-bg: var(--color-signal-soft);
  --warning: var(--color-open);
  --warning-bg: var(--color-open-soft);
  --confirmed: var(--color-signal);
  --confirmed-bg: var(--color-signal-soft);
  --focus: var(--color-focus);
  --logo-bg: var(--color-logo-tile);
  --font: var(--font-body);
  --display: var(--font-display);
  --text-secondary: var(--text-small);
  --text-h1: var(--text-page);
  --text-h2: var(--text-section);
  --text-h3: var(--text-title);
  --shadow: 0 0 transparent;
  --shadow-overlay: var(--shadow-pop);
  --radius-control: var(--radius-inner);
  --radius: var(--radius-card);
  --fast: var(--dur-micro);
  --medium: var(--dur-short);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-paper: #0B130F;
    --color-canvas: #121D17;
    --color-paper-2: #0F1914;
    --color-paper-3: #1B2B22;
    --color-hover: #18261E;
    --color-ink: #E7EEE8;
    --color-ink-2: #C9D5CC;
    --color-muted: #A2B2A7;
    --color-rule: #24352B;
    --color-edge: #5E7667;
    --color-signal: #8BDBA1;
    --color-signal-soft: #1A3524;
    --color-action: #6FD08A;
    --color-action-ink: #0A1D11;
    --color-focus: #6FD08A;
    --color-open: #F2B866;
    --color-open-soft: #2E2610;
    --color-open-rule: #6A5422;
    --color-knob-on: var(--color-green-ink);
    --color-danger: #FF9A8F;
    --danger-bg: #3A1512;
    --lit-edge: inset 0 1px 0 color-mix(in oklab, var(--color-light) 7%, transparent);
    --panel-ring: inset 0 0 0 1px color-mix(in oklab, var(--color-light) 6%, transparent);
    --shadow-canvas: 0 0 0 1px #1D2C23;
    --shadow-pop: 0 0 0 1px #2C4235, 0 18px 44px rgba(0, 0, 0, 0.55);
    --ghost-fill: color-mix(in oklab, var(--color-light) 4%, transparent);
    --ghost-ring: color-mix(in oklab, var(--color-light) 14%, transparent);
    color-scheme: dark;
  }
}

/* Browser surfaces, shared by the web app and the side panel. */
html { font-synthesis: none; scrollbar-color: var(--color-edge) var(--color-paper); }
html, body { overflow-x: clip; }
body { caret-color: var(--color-signal); }
::selection { background: var(--color-signal-soft); color: var(--color-ink); }
strong, b { font-weight: 600; }

/* Buttons. One shape for the web app and the side panel: 10px corners, a thin border, no pill, no shadow, no gradient.
   Default: a 1px edge border, a transparent fill, an ink label. Primary: the action pair, no border, at most one per
   card. Quiet: no border, a muted label. Disabled: a muted label in an outline. The component sheets load after this
   file and set the layout (size, padding, gap) on a single .btn class, so these rules carry :root or a doubled class to
   outrank them. They set no label colour on the default button, so .btn-danger keeps its own. */
:root .btn {
  border: 1px solid var(--color-edge);
  border-radius: var(--radius-inner);
  background: transparent;
  box-shadow: none;
  font-weight: 600;
}
:root .btn:hover { background: var(--color-hover); filter: none; }
:root .btn:active { filter: brightness(0.94); }
:root .btn.btn-quiet { border-color: transparent; background: transparent; }
:root .btn.btn-quiet:not(.btn-danger) { color: var(--color-muted); }
:root .btn.btn-quiet:hover { background: var(--color-hover); }
.btn.btn-primary,
.btn.btn-cool {
  min-height: 40px;
  padding: 0 var(--space-5);
  border: 0;
  border-radius: var(--radius-inner);
  background: var(--color-action);
  color: var(--color-action-ink);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: none;
  transition: filter var(--dur-micro) var(--ease-out);
}
.btn.btn-primary:hover, .btn.btn-cool:hover { background: var(--color-action); color: var(--color-action-ink); filter: brightness(1.08); }
.btn.btn-primary:active, .btn.btn-cool:active { filter: brightness(0.94); transform: none; }
.btn.btn-primary:focus-visible, .btn.btn-cool:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
/* Disabled keeps a 3:1 outline (an inset ring in the edge colour) so a button that carries its reason stays findable. */
:root .btn:disabled, :root .btn:disabled:hover,
.btn.btn-primary:disabled, .btn.btn-primary:disabled:hover, .btn.btn-cool:disabled, .btn.btn-cool:disabled:hover {
  background: transparent; color: var(--color-muted); border-color: transparent; box-shadow: inset 0 0 0 1px var(--color-edge); filter: none; cursor: not-allowed;
}
:root .btn.btn-quiet:disabled { box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .btn.btn-primary, .btn.btn-cool { transition: none; }
}
