/* public/backoffice/bo-tokens.css — THE back-office token file (H1 Brand Guidelines v1.0).
   Every back-office page links it: /backoffice/index.html (every section, the
   Dashboard included) and /backoffice/modifiers.html (framed in Menu & VAT).
   Loaded after /shared/h1-tokens.css and after the page's own <style>, so the
   values below win over the page's old :root and every rule that reads a
   token follows. The till and the website never load this file.

   Six colours, and only these (25 Oct 2026, Andrea):
     Cream    #F6F1E7  page and cards
     Charcoal #2B2A28  text and dark surfaces (the sidebar, dark buttons)
     Bronze   #A67A3E  highlights and the ONE primary button a screen; never a large area
     Linen    #D9CDB8  borders and dividers
     Stone    #6E675D  secondary text
     Sage     #3E5C4B  success and savings only
   Every other colour here is a mix of those six (color-mix), plus one
   terracotta kept for problems (errors, overdue, over budget), as before.

   Two typefaces, self-hosted from /vendor/ (font-src 'self'), declared once in /shared/h1-fonts.css
   (linked before this file), no serif:
     Inter Tight 600  headings, the logo text, figures and prices (--display, and --serif points at it)
     Inter 400        body and interface text; Inter 600 for small uppercase labels

   ONE LOOK (29 Oct 2026, Andrea): every back-office page looks like Menu & VAT › Items & prices and the
   Dashboard: the H1 UI standard's warm grey page with white cards on it (docs/design/h1-ui-standard.md,
   "Cards"). The surfaces below point at the standard's tokens in /shared/h1-ui.css, which every page that
   links this file links too: the page is --ui-page, every card, panel, list box and table container is
   --ui-card, its border --ui-line. The old names (--bg, --panel, --paper, --cream, --line…) are read by
   1,000+ rules in index.html, so re-pointing them here moves every page at once. Never point a surface
   back at the cream: cream cards on a cream page is what this replaced. */

:root {
  /* THE SIX */
  --h1-cream: #F6F1E7;
  --h1-charcoal: #2B2A28;
  --h1-bronze: #A67A3E;
  --h1-linen: #D9CDB8;
  --h1-stone: #6E675D;
  --h1-sage: #3E5C4B;
  /* mixes of the six */
  --h1-charcoal-2: color-mix(in srgb, var(--h1-cream) 9%, var(--h1-charcoal));   /* hover on a dark surface */
  --h1-charcoal-3: color-mix(in srgb, var(--h1-cream) 16%, var(--h1-charcoal));  /* dividers on a dark surface */
  --h1-bronze-ink: color-mix(in srgb, var(--h1-bronze) 75%, var(--h1-charcoal)); /* bronze as small text: 4.6:1 on cream */
  --h1-bronze-tint: color-mix(in srgb, var(--h1-bronze) 14%, var(--h1-cream));
  --h1-linen-tint: color-mix(in srgb, var(--h1-linen) 42%, var(--h1-cream));     /* quiet fills: tabs, chips */
  --h1-linen-strong: color-mix(in srgb, var(--h1-linen) 78%, var(--h1-stone));   /* input borders */
  --h1-sage-tint: color-mix(in srgb, var(--h1-sage) 12%, var(--h1-cream));
  --h1-problem: #A4392E;
  --h1-problem-tint: color-mix(in srgb, var(--h1-problem) 11%, var(--h1-cream));
  --display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* THE NAMES THE COMPONENTS READ (bo-components.css, dashboard-v2.css), on the six */
  --forest: var(--h1-charcoal); --forest-2: var(--h1-charcoal-2); --forest-3: var(--h1-charcoal-3);
  /* the surfaces: the standard's page and its one card token */
  --cream: var(--ui-page); --sand: var(--ui-label-neutral); --paper: var(--ui-card);
  --line: var(--ui-line); --line-2: var(--ui-btn-line);
  --amber: var(--h1-bronze); --amber-d: var(--h1-bronze-ink); --amber-t: var(--h1-bronze-tint);
  --green: var(--h1-sage); --green-t: var(--h1-sage-tint); --sage: var(--h1-sage-tint); --mint: var(--h1-sage-tint);
  --ink: var(--h1-charcoal); --ink-2: var(--h1-stone); --muted: var(--h1-stone);
  --red: var(--h1-problem); --red-t: var(--h1-problem-tint);
  --serif: var(--display);
  --sans: var(--text);
  --r: var(--ui-radius-card);
  --white: #FFFFFF; /* input fills only */
  --row-hover: var(--ui-page);
  --focus: var(--h1-bronze);

  /* THE OLD BACK-OFFICE NAMES, RE-POINTED. index.html's own :root (and
     modifiers.html's) still declare these; this file loads after them, so the
     1,000+ var() reads in the old rules take the H1 value without a single
     rule being touched. */
  --bg: var(--ui-page);
  --panel: var(--ui-card);
  --panel-soft: var(--ui-page);
  --line-strong: var(--ui-btn-line);
  --bronze: var(--h1-bronze-ink);
  --pine: var(--h1-charcoal);
  --pine-deep: var(--h1-charcoal);
  --ok: var(--h1-sage);
  --danger: var(--h1-problem);
  --warn: var(--h1-bronze);
  --warn-ink: var(--h1-charcoal);
  --ink-soft: var(--h1-stone);
  --radius: var(--r);
  --shadow: none;

  /* THE VENUE'S COLOURS ARE NOT THE BACK OFFICE'S. /shared/branding.js writes
     --brand / --accent and their companions inline on :root (the venue's own
     colours, and a forest green #1C3A2E when it has none). An inline style
     beats any stylesheet rule except an !important one, so the back-office
     chrome pins them to H1 here. The till, the website and the customer pages
     still take the venue's colours; the Branding section's preview gets them
     on its own element (paintBrandPreview in index.html). */
  --brand: var(--h1-charcoal) !important;
  --brand-strong: var(--h1-charcoal-2) !important;
  --brand-tint: var(--ui-label-neutral) !important;
  --on-brand: var(--h1-cream) !important;
  --accent: var(--h1-bronze) !important;
  --accent-ink: var(--h1-bronze-ink) !important;
  --on-accent: var(--h1-cream) !important;
}

/* BASE */
body {
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--ui-page);
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.12; }
:focus-visible { outline: 3px solid var(--h1-bronze); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--h1-bronze-ink); }
