/* Type: Barlow Condensed (headings), IBM Plex Sans (body), IBM Plex Mono (numbers). */
@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

/* ============================================================================
   The shell design system.

   ONE stylesheet for the whole product. Every module draws from it and none
   ships CSS of its own - that is what makes modules look like one tool rather
   than several apps behind one login (Wall #5, Bill's "one shell", 2026-08-27).

   2026-10-13 redesign (Bill: "MUCH more polished since we are moving away from
   Streamlit"). The look is the Line Book family Todd and Bill approved on 9/24:
   deep teal, condensed display type, mono figures - finished to product grade.

   Rules that shaped it:
     * Brand lives in TOKENS, never in a rule. A tenant theme overrides the
       :root block and nothing else - Pillar 2, no branded strings in logic.
     * Dollars are the loudest thing on the page. An operator opening this at
       2am is looking for a number (Pillar 4.4).
     * Every state has a design: loading, empty, error, stale, zero.
     * Light and dark are both designed, token by token.
   ========================================================================= */

/* --- tokens ------------------------------------------------------------- */
:root {
  color-scheme: light;
  /* A tenant theme overrides these and gets a coherent tool. */
  --brand:        #0d6f70;   /* deep teal: actions, focus, the live series   */
  --brand-deep:   #0a4c4d;
  --brand-ink:    #ffffff;
  --brand-soft:   #dcefef;
  --accent:       #c57a10;   /* amber: used sparingly, for "look here"        */
  --ok:           #2c7539;
  --warn:         #8f5600;
  --bad:          #a8231c;
  --ok-soft:      #e1efe3;
  --warn-soft:    #f8ecd8;
  --bad-soft:     #fadfdc;
  --radius:       8px;    /* v6 panels */
  --radius-sm:    6px;

  --bg:           #eef1f1;
  --surface:      #ffffff;
  --surface-2:    #f5f8f8;
  --raise:        #e7eded;
  --line:         #d9e0e1;
  --line-strong:  #bfcacc;
  --ink:          #111a1d;
  --ink-2:        #455659;
  --ink-3:        #6b7c81;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  --fs-xs: 12px; --fs-sm: 13.5px; --fs-md: 15px;
  --fs-lg: 19px; --fs-xl: 28px; --fs-2xl: 38px; --fs-3xl: 44px;

  --shadow-1: 0 1px 2px rgba(16,30,34,.06);
  --shadow:   0 1px 2px rgba(16,30,34,.06), 0 8px 24px -14px rgba(16,30,34,.28);
  --shadow-2: 0 2px 4px rgba(16,30,34,.06), 0 18px 40px -18px rgba(16,30,34,.35);

  --font:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --frame: 1180px;   /* v6 main container */
  --header-h: 60px;
}

/* Dark: every surface token redefined, so no rule needs a dark override. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #43bfbb; --brand-deep: #2c9e9a; --brand-ink: #062220; --brand-soft: #12312f;
    --accent: #e3a23f;
    --ok: #62c778; --warn: #dfa33d; --bad: #ff7d70;
    --ok-soft: #12301a; --warn-soft: #302413; --bad-soft: #351815;
    --bg: #0d1316; --surface: #161e22; --surface-2: #1b2529; --raise: #222e33;
    --line: #283439; --line-strong: #3a4950;
    --ink: #e6eef0; --ink-2: #a5b5ba; --ink-3: #8193a0;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 26px -14px rgba(0,0,0,.75);
    --shadow-2: 0 2px 4px rgba(0,0,0,.4), 0 20px 44px -18px rgba(0,0,0,.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #43bfbb; --brand-deep: #2c9e9a; --brand-ink: #062220; --brand-soft: #12312f;
  --accent: #e3a23f;
  --ok: #62c778; --warn: #dfa33d; --bad: #ff7d70;
  --ok-soft: #12301a; --warn-soft: #302413; --bad-soft: #351815;
  --bg: #0d1316; --surface: #161e22; --surface-2: #1b2529; --raise: #222e33;
  --line: #283439; --line-strong: #3a4950;
  --ink: #e6eef0; --ink-2: #a5b5ba; --ink-3: #8193a0;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 26px -14px rgba(0,0,0,.75);
  --shadow-2: 0 2px 4px rgba(0,0,0,.4), 0 20px 44px -18px rgba(0,0,0,.8);
}

/* --- reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: var(--fs-md)/1.5 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-soft); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- page frame --------------------------------------------------------- */
.shell-header {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.shell-header__bar {
  max-width: var(--frame); margin: 0 auto; min-height: var(--header-h);
  padding: 0 var(--sp-5);
  display: flex; align-items: center; gap: var(--sp-5);
}
.shell-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.shell-brand:hover { text-decoration: none; }
.shell-brand__mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18);
}
.shell-brand__mark svg { width: 18px; height: 18px; display: block; }
.shell-brand__name {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  letter-spacing: .03em; text-transform: uppercase; line-height: 1;
}
.shell-context {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; white-space: nowrap;
  padding-left: var(--sp-4); border-left: 1px solid var(--line);
}
.shell-header__spacer { flex: 1 1 auto; }

/* nav lives in the header bar on wide screens: the v6 segmented tabs */
.shell-tabs { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line);
              border-radius: 6px; padding: 2px; }
.shell-tabs a {
  display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 4px;
  font-family: var(--display); font-size: 15px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1.2;
  color: var(--ink-2); white-space: nowrap; transition: background-color .15s, color .15s;
}
.shell-tabs a:hover { color: var(--ink); background: var(--raise); text-decoration: none; }
.shell-tabs a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }

/* profile menu: a <details>, so it works with no script */
.shell-user { position: relative; }
.shell-user > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--sp-2);
  padding: 4px 6px 4px 4px; border-radius: 999px; border: 1px solid transparent;
}
.shell-user > summary::-webkit-details-marker { display: none; }
.shell-user > summary:hover, .shell-user[open] > summary { border-color: var(--line); background: var(--surface-2); }
.shell-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-deep);
  font-weight: 650; font-size: 12.5px; letter-spacing: .02em;
}
.shell-user__chev { width: 14px; height: 14px; color: var(--ink-3); }
.shell-user__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: var(--sp-2); z-index: 50;
}
.shell-user__who { padding: var(--sp-2) var(--sp-3) var(--sp-3); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-2); }
.shell-user__email { font-weight: 600; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.shell-user__org { font-size: var(--fs-xs); color: var(--ink-3); }
.shell-user__menu form { margin: 0; }
.shell-user__menu button {
  width: 100%; text-align: left; font: inherit; font-size: var(--fs-sm); color: var(--ink);
  background: none; border: 0; border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); cursor: pointer;
}
.shell-user__menu button:hover { background: var(--surface-2); }
.shell-user__switch {
  display: block; font-size: var(--fs-sm); color: var(--ink); border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
}
.shell-user__switch:hover { background: var(--surface-2); text-decoration: none; }

/* narrow screens: the tabs drop to their own scrolling row */
.shell-nav { display: none; }
@media (max-width: 880px) {
  .shell-header__bar { padding: 0 var(--sp-4); gap: var(--sp-3); }
  .shell-header .shell-tabs { display: none; }
  .shell-context { display: none; }
  .shell-nav {
    display: block; background: var(--surface); border-bottom: 1px solid var(--line);
    position: sticky; top: var(--header-h); z-index: 39;
  }
  .shell-nav { padding: var(--sp-2) var(--sp-4); }
  .shell-nav .shell-tabs { overflow-x: auto; scrollbar-width: none; width: max-content; max-width: 100%; }
  .shell-nav .shell-tabs::-webkit-scrollbar { display: none; }
}

.shell-main { max-width: var(--frame); margin: 0 auto; padding: var(--sp-6) var(--sp-5) var(--sp-7); }
.shell-foot {
  max-width: var(--frame); margin: 0 auto; padding: var(--sp-5) var(--sp-5) var(--sp-6);
  color: var(--ink-3); font-size: var(--fs-xs); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
}
.shell-foot p { margin: 0; }
@media (max-width: 560px) {
  .shell-main { padding: var(--sp-5) var(--sp-4) var(--sp-6); }
  .shell-foot { padding: var(--sp-4); }
}

/* --- headings ----------------------------------------------------------- */
.page-title { font-family: var(--display); font-size: var(--fs-2xl); font-weight: 650;
              letter-spacing: .005em; line-height: 1.05; margin: 0 0 var(--sp-2); text-wrap: balance; }
.page-sub { color: var(--ink-2); font-size: var(--fs-md); margin: 0 0 var(--sp-5); max-width: 66ch; }
.section-title { font-family: var(--display); font-size: 20px; font-weight: 650; letter-spacing: .03em;
                 text-transform: uppercase; margin: var(--sp-6) 0 var(--sp-3); }

/* --- the money row ------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
         gap: var(--sp-3); margin-bottom: var(--sp-5); }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow);
}
.stat__label { font-size: 11.5px; text-transform: uppercase;
               letter-spacing: .1em; color: var(--ink-3); font-weight: 600; }
.stat__value { font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: -.02em;
               margin-top: var(--sp-1); font-variant-numeric: tabular-nums; }
.stat__note { font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--sp-1); }
.stat--money .stat__value { color: var(--ink); }
.stat--zero .stat__value { color: var(--ink-3); }

/* --- cards -------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 19px; margin-bottom: var(--sp-4);
}
.card--link { display: block; color: inherit; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card--link:hover { text-decoration: none; border-color: var(--line-strong);
                    transform: translateY(-1px); box-shadow: var(--shadow-2); }
.card__top { display: flex; align-items: baseline; gap: var(--sp-3); }
.card__title { font-size: var(--fs-md); font-weight: 600; margin: 0; flex: 1 1 auto; }
.card__amount { font-family: var(--mono); font-size: var(--fs-lg); font-weight: 600;
                font-variant-numeric: tabular-nums; white-space: nowrap; }
.card__amount--advisory { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); }
.card__meta { color: var(--ink-2); font-size: var(--fs-sm); margin-top: var(--sp-2);
              display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.card__evidence { margin: var(--sp-3) 0 0; padding: var(--sp-3) var(--sp-4);
                  background: var(--surface-2); border-radius: var(--radius-sm);
                  font-size: var(--fs-sm); color: var(--ink-2); }
.card__evidence ul { margin: 0; padding-left: var(--sp-4); }
.card__evidence li + li { margin-top: var(--sp-1); }

/* --- pills -------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; line-height: 1.4;
  border: 1px solid transparent; color: var(--ink-2); background: var(--raise); white-space: nowrap;
}
.pill--money { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.pill--advisory { color: var(--ink-3); }
.pill--ok   { color: var(--ok);   background: var(--ok-soft); }
.pill--warn { color: var(--warn); background: var(--warn-soft); }
.pill--bad  { color: var(--bad);  background: var(--bad-soft); }
.pill--ok::before, .pill--warn::before, .pill--bad::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 1;
  min-height: 40px; padding: 0 var(--sp-5); border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--brand-deep); background: var(--brand); color: var(--brand-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px rgba(16,30,34,.18);
  text-align: center; white-space: nowrap;
  transition: background-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { text-decoration: none; background: var(--brand-deep); }
.btn:active { transform: translateY(1px); }
.btn--wide { display: flex; width: 100%; }
.btn--quiet { background: var(--surface); color: var(--ink); border-color: var(--line-strong);
              box-shadow: var(--shadow-1); }
.btn--quiet:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); align-items: center; }

/* --- forms -------------------------------------------------------------- */
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600;
               margin-bottom: 6px; color: var(--ink); }
.field input {
  width: 100%; font: inherit; min-height: 44px; padding: 0 var(--sp-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--brand);
                     box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.hint { font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--sp-2); }
/* The 6-digit sign-in code: big, mono, easy to type on a phone. */
.field input.code-input { font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 1.6rem; letter-spacing: .35em; text-align: center; min-height: 56px; }
.divider { display: flex; align-items: center; gap: var(--sp-3);
           color: var(--ink-3); font-size: var(--fs-xs); margin: var(--sp-4) 0;
           text-transform: uppercase; letter-spacing: .1em; }
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line); }

/* --- the four states every screen owes you ------------------------------ */
.state {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-7) var(--sp-6);
  text-align: center; box-shadow: var(--shadow);
}
.state::before {
  content: ""; display: block; width: 44px; height: 44px; margin: 0 auto var(--sp-4);
  border-radius: 12px; background: var(--brand-soft);
  -webkit-mask: none;
}
.state__title { font-family: var(--display); font-size: 24px; font-weight: 650; letter-spacing: .01em; margin: 0 0 var(--sp-2); }
.state__body { color: var(--ink-2); font-size: var(--fs-md); margin: 0 auto; max-width: 52ch; }
.state__next { margin-top: var(--sp-5); }
.state--error { border-left: 4px solid var(--bad); text-align: left; padding: var(--sp-5) var(--sp-6); }
.state--error::before { display: none; }
.state--error .state__title { color: var(--bad); }

.banner {
  /* Block, not flex: a banner is one run of text with <b> and links inside it.
     Flex would split every inline piece into its own column. */
  display: block; position: relative;
  border-radius: var(--radius); padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-4) + 30px);
  font-size: var(--fs-sm); margin-bottom: var(--sp-5); line-height: 1.5;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
  color: var(--ink); background: var(--warn-soft);
}
.banner::before {
  content: "!"; position: absolute; left: var(--sp-4); top: calc(var(--sp-3) + 1px);
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--warn); color: var(--surface);
}
.banner b, .banner strong { font-weight: 650; }
.banner--bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: var(--bad-soft); }
.banner--bad::before { background: var(--bad); }
.banner--sample {
  background: repeating-linear-gradient(135deg, var(--warn-soft) 0 14px,
              color-mix(in srgb, var(--warn-soft) 55%, var(--surface)) 14px 28px);
}
.banner--sample::before { content: "i"; font-style: italic; font-family: Georgia, serif; }

/* --- table -------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
              box-shadow: var(--shadow); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--surface); }
.table-wrap > table.data { border: 0; }
table.data th, table.data td {
  text-align: left; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
table.data th { font-size: 11px; text-transform: uppercase; font-weight: 650;
                letter-spacing: .09em; color: var(--ink-3); background: var(--surface-2); }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* --- filters ------------------------------------------------------------ */
.filters { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.filters a {
  font-size: var(--fs-sm); font-weight: 550; padding: 6px var(--sp-4);
  border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2);
  background: var(--surface); }
.filters a:hover { text-decoration: none; border-color: var(--ink-3); color: var(--ink); }
.filters a[aria-current="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* --- price history sparkline -------------------------------------------- */
.spark { display: block; width: 100%; height: 90px; margin-top: var(--sp-3); }
.spark__line { fill: none; stroke: var(--brand); stroke-width: 2;
               stroke-linejoin: round; stroke-linecap: round; }
.spark__last { fill: var(--accent); }
.spark__axis { stroke: var(--line); stroke-width: 1; }

/* --- auth screens: two panels, the tool's promise on the left ------------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-hero {
  position: relative; overflow: hidden; color: #eaf6f5;
  background:
    radial-gradient(120% 90% at 0% 0%, #13807f 0%, transparent 55%),
    radial-gradient(90% 80% at 100% 100%, #062f30 0%, transparent 60%),
    #0a4c4d;
  padding: var(--sp-7) clamp(28px, 5vw, 72px);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-6);
}
.auth-hero .shell-brand { color: var(--brand-ink); }
.auth-hero .shell-brand__mark { background: #fff; color: #0a4c4d; }
.auth-hero__copy h1 {
  font-family: var(--display); font-weight: 650; font-size: clamp(38px, 4.4vw, 56px);
  line-height: 1.02; letter-spacing: .005em; margin: 0 0 var(--sp-4); text-wrap: balance; color: #fff;
}
.auth-hero__copy p { font-size: 16.5px; line-height: 1.6; max-width: 44ch; margin: 0; color: #c7e6e4; }
.auth-week {
  display: grid; grid-template-columns: 40px repeat(7, minmax(0, 1fr)); gap: 5px;
  max-width: 460px; font-family: var(--mono); font-size: 10.5px; color: #9fd0cd;
}
.auth-week span { display: grid; place-items: center; }
.auth-week i { display: block; height: 22px; border-radius: 5px; background: rgba(255,255,255,.12); }
.auth-week i.b { background: rgba(255,255,255,.32); }
.auth-week i.c { background: #6fd1cc; }
.auth-week i.s { background: #f0a58f; }
.auth-hero__foot { font-size: var(--fs-xs); color: #8fc3c0; }
.auth-side { display: grid; place-items: center; padding: var(--sp-7) var(--sp-5); background: var(--bg); }
.auth { width: 100%; max-width: 400px; margin: 0; padding: 0; }
.auth__card { background: var(--surface); border: 1px solid var(--line);
              border-radius: 10px; padding: var(--sp-6); box-shadow: var(--shadow-2); }
.auth__eyebrow { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
                 color: var(--brand); font-weight: 650; margin: 0 0 var(--sp-2); }
.auth__title { font-family: var(--display); font-size: 32px; font-weight: 650; letter-spacing: .01em;
               line-height: 1.05; margin: 0 0 var(--sp-2); }
.auth__sub { color: var(--ink-2); font-size: var(--fs-md); margin: 0 0 var(--sp-5); }
.auth__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
              background: var(--brand-soft); color: var(--brand); margin-bottom: var(--sp-4); }
.auth__icon svg { width: 26px; height: 26px; }
.auth__legal { margin-top: var(--sp-5); font-size: var(--fs-xs); color: var(--ink-3); text-align: center; }
@media (max-width: 880px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { padding: var(--sp-5) var(--sp-4) var(--sp-6); gap: var(--sp-5); }
  .auth-hero__copy h1 { font-size: 34px; }
  .auth-week, .auth-hero__foot { display: none; }
  .auth-side { padding: var(--sp-5) var(--sp-4) var(--sp-7); place-items: start center; }
  .auth__card { padding: var(--sp-5); }
}

/* --- utility ------------------------------------------------------------ */
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 560px) {
  .stat__value { font-size: 26px; }
  .card { padding: var(--sp-4); }
  .card__top { flex-wrap: wrap; }
}

/* ============================================================================
   Planning screens (Shift Book).

   Same rule as everything above: no module ships CSS, so the plan grid, the
   coverage matrix and the shift editor live here, built only from the shell's
   tokens. Everything is scoped under .sb and prefixed sb- so none of it can
   restyle a Purchasing screen. Words carry the meaning on every cell (short,
   heavy, covered, below min); color only repeats it.
   ========================================================================= */
:root { --boh: #5c3d73; --boh-soft: #ece3f3;
        --ch-dine: #0d6f70; --ch-pick: #5a9e9f; --ch-del: #a9cfcf; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --boh: #b79ad0; --boh-soft: #2a1f36; --ch-dine: #43bfbb; --ch-pick: #2c8a87; --ch-del: #1d5452; } }
:root[data-theme="dark"] { --boh: #b79ad0; --boh-soft: #2a1f36;
  --ch-dine: #43bfbb; --ch-pick: #2c8a87; --ch-del: #1d5452; }

.sb {
  --sb-front: var(--brand);
  --sb-kitchen: var(--boh);
  --sb-front-soft: var(--brand-soft);
  --sb-kitchen-soft: var(--boh-soft);
  --sb-ok-soft: var(--ok-soft);
  --sb-warn-soft: var(--warn-soft);
  --sb-bad-soft: var(--bad-soft);
  --sb-ch-dine: var(--ch-dine);
  --sb-ch-pick: var(--ch-pick);
  --sb-ch-del: var(--ch-del);
}
.sb-loading { margin: var(--sp-7) 0; text-align: center; }
.sb-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* page head */
.sb-eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
              color: var(--brand); font-weight: 650; margin: 0 0 var(--sp-2); }
.sb-h1 { font-family: var(--display); font-size: clamp(28px, 3.6vw, 40px); font-weight: 650; letter-spacing: .005em;
         line-height: 1.02; margin: 0; text-wrap: balance; }
.sb-lede { color: var(--ink-2); max-width: 70ch; margin: var(--sp-3) 0 0; font-size: var(--fs-md); }

/* the number band: one card, figures divided by hairlines */
.sb-metaline {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin: var(--sp-5) 0; padding: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.sb-meta { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-4) var(--sp-5);
           border-left: 1px solid var(--line); justify-content: flex-end; min-width: 0; }
.sb-meta:first-child { border-left: 0; }
.sb-meta__k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
              color: var(--ink-3); font-weight: 650; }
.sb-meta__v { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: -.01em;
              font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.25; }
.sb-meta__s { font-size: var(--fs-xs); color: var(--ink-3); }
.sb-meta--big { background: linear-gradient(180deg, var(--brand-soft), transparent 140%); }
.sb-meta--big .sb-meta__k { color: var(--brand); }
.sb-meta--big .sb-meta__v { font-size: 36px; font-weight: 600; letter-spacing: -.03em; }
@media (max-width: 560px) {
  .sb-metaline { grid-template-columns: 1fr 1fr; }
  .sb-meta { border-left: 0; border-top: 1px solid var(--line); padding: var(--sp-3) var(--sp-4); }
  .sb-meta--big { grid-column: 1 / -1; border-top: 0; }
  .sb-meta--big .sb-meta__v { font-size: 30px; }
}
.sb-stateline { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap;
                font-size: var(--fs-sm); color: var(--ink-2); margin: calc(-1 * var(--sp-2)) 0 var(--sp-5); }

.sb .pill--acc { color: var(--sb-front); background: var(--sb-front-soft); }
.sb .pill--kitchen { color: var(--sb-kitchen); background: var(--sb-kitchen-soft); }
.sb .pill--mute { color: var(--ink-3); }
.sb .btn-row { margin-top: var(--sp-4); }

/* layout */
.sb-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
           gap: var(--sp-5); align-items: start; }
@media (max-width: 880px) { .sb-cols { grid-template-columns: 1fr; } }
.sb-cols--stack { grid-template-columns: 1fr; }
@media (min-width: 881px) { .sb-cols--r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
@media (min-width: 881px) { .sb-cols--stack > .sb-sect + .sb-sect { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-5); align-items: start; } .sb-cols--stack > .sb-sect + .sb-sect > .sb-secthead { grid-row: 1; margin-top: 0; } }
.sb-sect { margin-bottom: var(--sp-6); min-width: 0; }
.sb-secthead { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap;
               margin-bottom: var(--sp-3); }
.sb-secthead--gap { margin-top: var(--sp-6); }
.sb-secthead h2 { font-family: var(--display); font-size: 21px; font-weight: 650;
                  letter-spacing: .04em; text-transform: uppercase; margin: 0; line-height: 1.1; }
.sb-secthead .sb-count { font-size: var(--fs-xs); color: var(--ink-3); }
.sb .card { padding: 18px 19px; }   /* v6 panel padding */
.sb .card h3 { font-family: var(--display); font-size: 19px; letter-spacing: .02em; margin: 0 0 var(--sp-2); font-weight: 650; }
.sb .card > p:first-child { margin-top: 0; }

/* callouts */
.sb-callout { display: block; border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
              background: var(--sb-warn-soft); border-left: 4px solid var(--warn);
              padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); line-height: 1.5;
              border-radius: var(--radius-sm); margin-bottom: var(--sp-3); }
.sb-callout--ok  { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); border-left-color: var(--ok); background: var(--sb-ok-soft); }
.sb-callout--acc { border-color: color-mix(in srgb, var(--sb-front) 30%, var(--line)); border-left-color: var(--sb-front); background: var(--sb-front-soft); }
.sb-callout--bad { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); border-left-color: var(--bad); background: var(--sb-bad-soft); }
.sb-lnk { background: none; border: none; padding: 0; font: inherit; font-size: inherit; font-weight: 600;
          color: var(--brand); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sb-err { color: var(--bad); font-size: var(--fs-sm); font-weight: 600; margin: var(--sp-2) 0 0; }
.sb-err:empty { display: none; }

/* inputs */
.sb input, .sb select { font: inherit; font-size: var(--fs-md); color: var(--ink); background: var(--surface);
                        border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
                        min-height: 42px; padding: 0 var(--sp-3); max-width: 100%;
                        transition: border-color .15s, box-shadow .15s; }
.sb input:focus, .sb select:focus { outline: none; border-color: var(--brand);
                                    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.sb input[type=checkbox] { min-height: 0; width: 16px; height: 16px; accent-color: var(--brand); }
.sb-fl { display: flex; flex-direction: column; gap: 6px; font-size: 11px;
         letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; }
.sb-fl input, .sb-fl select { text-transform: none; letter-spacing: 0; font-weight: 400; width: 100%; }
.sb-frow { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-3); }
@media (max-width: 560px) { .sb-frow { grid-template-columns: 1fr; } }

/* segmented controls */
.sb-segs { display: inline-flex; gap: 3px; background: var(--raise); border: 1px solid var(--line);
           border-radius: 10px; padding: 3px; flex-wrap: wrap; max-width: 100%; }
.sb-segs button { font: inherit; font-size: var(--fs-sm); font-weight: 550; padding: 7px 14px;
                  border-radius: 7px; border: none; background: none; color: var(--ink-2); cursor: pointer;
                  text-align: center; line-height: 1.25; transition: background-color .15s, color .15s; }
.sb-segs button:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.sb-segs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 650;
                                       box-shadow: 0 1px 2px rgba(16,30,34,.12), 0 2px 6px -2px rgba(16,30,34,.18); }
.sb-segs button small { display: block; font-size: 10.5px; font-weight: 500; color: var(--ink-3);
                        letter-spacing: .02em; margin-top: 1px; }
.sb-segs button[data-short] small { color: var(--bad); font-weight: 650; }
.sb-days-pick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
@media (max-width: 720px) { .sb-days-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* the build stepper */
.sb-stepper { display: flex; align-items: stretch; gap: 0; margin: 0 0 var(--sp-6); padding: 0; list-style: none;
              background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
              box-shadow: var(--shadow); overflow: hidden; }
.sb-stepper button { flex: 1 1 0; display: flex; align-items: center; gap: var(--sp-3);
                     font: inherit; text-align: left; cursor: pointer; background: none; border: 0;
                     padding: var(--sp-4) var(--sp-5); color: var(--ink-2); position: relative; min-width: 0; }
.sb-stepper button + button { border-left: 1px solid var(--line); }
.sb-stepper button:hover { background: var(--surface-2); }
.sb-step__n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
              font-family: var(--mono); font-weight: 600; font-size: 13px;
              border: 1.5px solid var(--line-strong); color: var(--ink-3); background: var(--surface); }
.sb-step__t { display: flex; flex-direction: column; min-width: 0; }
.sb-step__t b { font-family: var(--display); font-size: 17px; font-weight: 650; letter-spacing: .04em;
                text-transform: uppercase; color: var(--ink); line-height: 1.1; }
.sb-step__t small { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-stepper button[data-done] .sb-step__n { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.sb-stepper button[aria-current="step"] { background: var(--sb-front-soft); }
.sb-stepper button[aria-current="step"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0;
                                                 height: 3px; background: var(--brand); }
.sb-stepper button[aria-current="step"] .sb-step__n { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
@media (max-width: 640px) {
  .sb-stepper button { padding: var(--sp-3); gap: var(--sp-2); }
  .sb-step__t small { display: none; }
  .sb-step__t b { font-size: 15px; }
  /* On a phone only the current step carries its name; the others are numbered dots. */
  .sb-stepper button:not([aria-current="step"]) { flex: 0 0 auto; padding-inline: var(--sp-4); }
  .sb-stepper button:not([aria-current="step"]) .sb-step__t {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* day bars on Plan next week */
.sb-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(6px, 1.4vw, 14px);
           align-items: end; height: 270px; padding: var(--sp-3) var(--sp-1) 0;
           background: repeating-linear-gradient(to top, transparent 0 53px, var(--line) 53px 54px) 0 0 / 100% calc(100% - 52px) no-repeat; }
.sb-day { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
          height: 100%; min-width: 0; }
.sb-day__amt { font-size: 11.5px; text-align: center; color: var(--ink-2); white-space: nowrap; overflow: hidden; font-weight: 500; }
.sb-day__stack { display: flex; flex-direction: column-reverse; border-radius: 6px 6px 2px 2px;
                 overflow: hidden; min-height: 4px; box-shadow: 0 1px 0 rgba(16,30,34,.06);
                 transition: filter .15s; }
.sb-day:hover .sb-day__stack { filter: brightness(1.06) saturate(1.1); }
.sb-day__stack i { display: block; }
.sb-day__stack i + i { box-shadow: inset 0 -1px 0 rgba(255,255,255,.35); }
.sb-day__label { font-family: var(--display); font-size: 16px; font-weight: 650; letter-spacing: .05em;
                 text-transform: uppercase; text-align: center;
                 border-top: 2px solid var(--line-strong); padding-top: var(--sp-2); }
.sb-day__date { font-size: 11px; color: var(--ink-3); text-align: center; }
.sb-legend { display: flex; gap: var(--sp-5); flex-wrap: wrap; font-size: var(--fs-xs);
             color: var(--ink-2); margin-top: var(--sp-4); }
.sb-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px;
                          border-radius: 3px; margin-right: 7px; vertical-align: -1px; background: var(--c); }

/* the plan grid */
.sb-gridwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
               background: var(--surface); box-shadow: var(--shadow); }
table.sb-grid { border-collapse: collapse; width: 100%; min-width: 680px; }
table.sb-grid th, table.sb-grid td { padding: var(--sp-2) 6px; border-bottom: 1px solid var(--line); text-align: center; }
table.sb-grid thead th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
                         color: var(--ink-3); background: var(--surface-2); font-weight: 650; padding: var(--sp-3) 6px; }
table.sb-grid tbody th { text-align: left; font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; padding-left: var(--sp-4); }
table.sb-grid tbody th small { display: block; color: var(--ink-3); font-weight: 400; font-size: 11.5px; }
table.sb-grid tr:last-child td, table.sb-grid tr:last-child th { border-bottom: none; }
table.sb-grid tbody tr:hover { background: var(--surface-2); }
.sb-cell { width: 100%; border-radius: var(--radius-sm); padding: 7px 2px; display: flex; flex-direction: column;
           align-items: center; gap: 1px; border: 1px solid transparent; background: none;
           font: inherit; color: inherit; cursor: pointer; transition: border-color .12s, background-color .12s; }
.sb-cell:hover { border-color: var(--line-strong); background: var(--surface); }
.sb-cell[aria-pressed="true"] { border-color: var(--sb-front); background: var(--sb-front-soft); }
.sb-cell__n { font-family: var(--mono); font-weight: 600; font-size: 18px; line-height: 1.1; }
.sb-cell__fb { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.sb-cell__fb em { color: var(--sb-front); font-style: normal; font-weight: 650; }
.sb-cell__fb b { color: var(--sb-kitchen); font-weight: 650; }
.sb-cell--floor .sb-cell__n::after { content: ""; display: inline-block; width: 6px; height: 6px;
                                     border-radius: 50%; background: var(--accent); margin-left: 3px; vertical-align: 6px; }
.sb-cell--edited { box-shadow: inset 0 0 0 2px var(--sb-kitchen); }
.sb-cell--below { box-shadow: inset 0 0 0 2px var(--bad); background: var(--sb-bad-soft); }
.sb-cell--below .sb-cell__n { color: var(--bad); }
.sb-dept { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; }
.sb-dept--foh { background: var(--sb-front); } .sb-dept--boh { background: var(--sb-kitchen); }
table.sb-plain { width: 100%; border-collapse: collapse; }
table.sb-plain th, table.sb-plain td { padding: 10px 8px; border-bottom: 1px solid var(--line);
                                       text-align: left; font-size: var(--fs-sm); vertical-align: baseline; }
table.sb-plain th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
                    color: var(--ink-3); font-weight: 650; }
table.sb-plain .sb-r { text-align: right; }
table.sb-plain tr:last-child td { border-bottom: none; }
table.sb-plain tbody tr:hover td { background: var(--surface-2); }
.sb-reasonrow td { background: var(--sb-bad-soft); }
.sb-causes, .sb-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px var(--sp-4);
                     font-size: var(--fs-sm); margin-top: var(--sp-3); }
.sb-causes .sb-amt, .sb-kv .sb-amt { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.sb-tot { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 650; }

/* shifts and the coverage matrix */
table.sb-sh { border-collapse: collapse; width: 100%; min-width: 720px; }
table.sb-sh th, table.sb-sh td { padding: 7px 6px; border-bottom: 1px solid var(--line);
                                 text-align: left; font-size: var(--fs-sm); vertical-align: middle; }
table.sb-sh th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
                 color: var(--ink-3); font-weight: 650; background: var(--surface-2); padding-top: 10px; padding-bottom: 10px; }
table.sb-sh tbody tr:hover td { background: var(--surface-2); }
table.sb-sh input, table.sb-sh select { min-height: 36px; padding: 0 8px; font-size: var(--fs-sm); }
table.sb-sh input[type=time] { width: 124px; font-family: var(--mono); }
table.sb-sh input[type=checkbox] { width: 16px; }
.sb .card:has(> table.sb-sh), .sb .card:has(> .sb-shwrap) { padding: 0; overflow: hidden; }
.sb .card:has(> table.sb-sh) > :not(table) { margin-left: var(--sp-4); margin-right: var(--sp-4); }
.sb-x { width: 30px; height: 30px; display: inline-grid; place-items: center; color: var(--ink-3);
        font-weight: 600; border: 1px solid var(--line); border-radius: var(--radius-sm);
        background: var(--surface); cursor: pointer; font: inherit; line-height: 1; transition: .12s; }
.sb-x:hover { color: var(--bad); border-color: var(--bad); background: var(--sb-bad-soft); }
table.sb-cm { border-collapse: separate; border-spacing: 4px; width: 100%; min-width: 600px; }
table.sb-cm th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
                 color: var(--ink-3); font-weight: 650; padding: 6px 4px; text-align: center; }
table.sb-cm tbody th { text-align: right; font-family: var(--mono); text-transform: none; color: var(--ink-2);
                       letter-spacing: 0; white-space: nowrap; padding-right: 8px; }
.sb-cc { border-radius: var(--radius-sm); padding: 7px 4px; font-size: 12px; line-height: 1.3;
         text-align: center; border: 1px solid transparent; }
.sb-cc__need { font-family: var(--mono); color: var(--ink-2); }
.sb-cc__st { display: block; font-weight: 700; text-transform: uppercase; font-size: 9.5px; letter-spacing: .1em; margin-top: 1px; }
.sb-cc--short { background: var(--sb-bad-soft); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.sb-cc--short .sb-cc__st, .sb-cc--short .sb-cc__need { color: var(--bad); }
.sb-cc--heavy { background: var(--sb-warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.sb-cc--heavy .sb-cc__st { color: var(--warn); }
.sb-cc--covered { background: color-mix(in srgb, var(--ok-soft) 70%, var(--surface)); }
.sb-cc--covered .sb-cc__st { color: color-mix(in srgb, var(--ok) 80%, var(--ink-3)); }
.sb-cc--none { background: none; color: var(--ink-3); border: 1px dashed var(--line-strong); }
.sb-cc--none .sb-cc__st { color: var(--ink-3); }
.sb-cc--bm { box-shadow: inset 0 0 0 2px var(--bad); }
.sb-confirm { border: 1px solid color-mix(in srgb, var(--sb-front) 35%, var(--line)); background: var(--sb-front-soft);
              border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); margin-top: var(--sp-4); }

/* scorecard and setup */
.sb-feel { display: inline-flex; gap: 3px; background: var(--raise); padding: 3px; border-radius: 9px; border: 1px solid var(--line); }
.sb-feel button { font: inherit; font-size: var(--fs-xs); font-weight: 550; padding: 4px 10px; border: 0;
                  border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; }
.sb-feel button:hover:not([disabled]) { background: var(--surface); }
.sb-feel button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.sb-feel button[disabled] { cursor: default; opacity: .55; }
.sb-chart { overflow-x: auto; }
.sb-chart svg text { fill: var(--ink-3); font-family: var(--font); font-size: 11px; }
.sb-conn, .sb-gate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--sp-3);
                     padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); align-items: center; }
.sb-conn:last-child, .sb-gate:last-child { border-bottom: none; }
.sb-conn__t { font-weight: 650; }
.sb-conn__next { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--fs-xs); }
.sb-gate { grid-template-columns: 48px minmax(0, 1fr) auto; }
.sb-gate__id { font-family: var(--mono); font-weight: 600; color: var(--brand); background: var(--brand-soft);
               border-radius: 6px; padding: 2px 6px; text-align: center; font-size: 12px; }
details.sb-launch { margin-top: var(--sp-6); background: var(--surface); border: 1px solid var(--line);
                    border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow); }
details.sb-launch summary { cursor: pointer; font-family: var(--display); font-size: 18px; font-weight: 650;
                            letter-spacing: .04em; text-transform: uppercase; }
details.sb-launch[open] summary { margin-bottom: var(--sp-3); }

/* the first frame: a calm skeleton while the script draws the screen */
.sb-loading::before { content: ""; display: block; width: 36px; height: 36px; margin: 0 auto var(--sp-3);
                      border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand);
                      animation: sb-spin .9s linear infinite; }
@keyframes sb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  #sb-app > * { animation: sb-in .28s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes sb-in { from { opacity: .001; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* --- Shift Book: Needs attention (owners and admins) --------------------- */
.at-store { margin-top: 16px; }
.at-store .card__top { gap: 8px; flex-wrap: wrap; }
.at-list { list-style: none; margin: 10px 0 0; padding: 0; }
.at-item { display: flex; gap: 14px; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-left: 4px solid var(--line); border-top: 1px solid var(--line); }
.at-item:first-child { border-top: none; }
.at-item--act { border-left-color: var(--bad); }
.at-item--watch { border-left-color: var(--warn); }
.at-item--setup { border-left-color: var(--line); }
.at-item__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.at-item__detail { color: var(--ink-3); font-size: 14px; }
.at-item__go { flex: none; }
.at-rules { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.at-rules summary { cursor: pointer; color: var(--ink-3); font-size: 14px; }
.at-rules__form { margin-top: 10px; }
@media (max-width: 600px) {
  .at-item { flex-direction: column; align-items: stretch; }
  .at-item__go { align-self: flex-start; }
}

/* --- Shift Book: Settings (email alerts) --------------------------------- */
.st-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.st-row:first-child { border-top: none; }
.st-row input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.st-row__text { display: flex; flex-direction: column; gap: 2px; }

/* --- Needs attention: tool label, item actions, hidden list ------------- */
.at-item__tool { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.at-item__acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; font-size: 13px; }
.at-hidden, .at-bill { margin-top: 16px; }
.at-bill summary { cursor: pointer; }

/* Shift Book: Setup check */
.sc-h2 { margin: 26px 0 6px; font-size: 20px; }
.sc-h3 { margin: 4px 0 8px; font-size: 16px; }
.sc-sec, .sc-top, .sc-bill { margin-top: 14px; }
.sc-sec .card__top, .sc-top .card__top { gap: 8px; flex-wrap: wrap; }
.sc-q { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.sc-q__head { display: flex; flex-direction: column; gap: 2px; }
.sc-q__shows { color: var(--ink-2, var(--ink)); }
.sc-q__state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sc-q__act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sc-fix { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; }
.sc-fix textarea, .sc-text, .sc-q__act input[name="note"] { width: 100%; max-width: 520px; }
.sc-choices, .sc-alerts { display: flex; flex-direction: column; gap: 6px; flex-basis: 100%; }
.sc-choice { display: flex; gap: 10px; align-items: center; }
.sc-choice input { width: 18px; height: 18px; margin: 0; flex: none; }
.sc-changed { color: var(--warn); }
.sc-print-only { display: none; }
.sc-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.sc-bar span { display: block; height: 100%; background: var(--ok, #2e7d32); }
.sc-openlist { margin-top: 10px; }
.sc-openlist summary { cursor: pointer; }
.sc-reqs { margin: 10px 0 0; padding-left: 18px; }
.sc-person, .sc-rules { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
@media print {
  .shell-header, .shell-nav, .sc-q__act, .sc-person, .sc-print, .sc-bill, .sc-rules .btn-row, script { display: none !important; }
  .sc-q { break-inside: avoid; }
  .sc-print-only { display: block; margin-top: 4px; }
  .sc-sec { break-inside: auto; box-shadow: none; }
}
.sc-fix[hidden] { display: none; }
.sc-apply { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 6px 0; padding: 8px; border-radius: 6px; background: var(--ok-soft, #e1efe3); }
.sc-apply .sb-fl input { width: 110px; }
.sc-fix .btn { align-self: flex-start; }
.sc-fix textarea { font: inherit; }

/* Shift Book: Help */
.hp-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 10px 0 14px; }
.hp-tabs { display: flex; gap: 6px; }
.hp-tab { padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); }
.hp-tab--on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.hp-dl { color: var(--ink-3); font-size: 14px; }
.hp-cols { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.hp-toc { position: sticky; top: 12px; font-size: 14px; }
.hp-toc ul { list-style: none; margin: 8px 0 0; padding: 0; }
.hp-toc li { margin: 4px 0; }
.hp-body { line-height: 1.55; }
.hp-body p, .hp-body ul, .hp-body ol { max-width: 760px; }
.hp-h1 { font-size: 22px; margin: 26px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--brand); scroll-margin-top: 12px; }
.hp-h1:first-child { margin-top: 0; }
.hp-h2 { font-size: 17px; margin: 18px 0 6px; }
.hp-fig { margin: 12px 0 16px; }
.hp-fig img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.hp-fig figcaption { color: var(--ink-3); font-size: 13px; font-style: italic; text-align: center; margin-top: 4px; }
.hp-tablewrap { overflow-x: auto; margin: 10px 0 14px; }
.hp-table th { white-space: nowrap; }
.hp-callout { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 10px 14px; margin: 12px 0; border-radius: 4px; }
.hp-callout--warn { background: var(--warn-soft); }
.hp-callout p { margin: 4px 0; }
@media (max-width: 860px) {
  .hp-cols { grid-template-columns: 1fr; }
  .hp-toc { position: static; }
}

/* Shift Book: forecast by week or by day */
.sb-fcmode { display: flex; gap: 16px; }
.sb-fcmode label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.sb-fcdays { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.sb-fcdays input { width: 100%; text-align: right; }

/* Shift Book: names on shifts */
.sb-sh .sb-who { width: 9.5em; min-width: 7em; }
.sb-sh .sb-who::placeholder { color: var(--ink-3); font-style: italic; }
.sb-sh .sb-who--open { border-style: dashed; border-color: var(--warn); }
.sb-who__note { display: block; font-size: 11px; color: var(--warn); margin-top: 2px; }
/* Who box pick list */
.sb-combo { position: absolute; z-index: 60; max-height: 300px; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.sb-combo ul { list-style: none; margin: 0; padding: 4px 0; }
.sb-combo__item { display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 7px 12px; cursor: pointer; font-size: 14px; }
.sb-combo__item small { color: var(--ink-3); font-size: 12px; }
.sb-combo__item:hover, .sb-combo__item.is-active { background: var(--accent-soft, rgba(13,111,112,.10)); }
.sb-combo__open span { font-style: italic; color: var(--ink-2, inherit); }
.sb-combo__head { padding: 8px 12px 3px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sb-combo__none { padding: 8px 12px; font-size: 13px; color: var(--ink-3); }
.sb-sh .sb-ends { margin-top: 4px; font-size: 12px; }

/* ============================================================================
   Inventory (module three). Phone first: the count sheet is used one-handed in
   a walk-in, so rows are tall, the number box is big, and every line says
   whether it saved. Same tokens as everything else; nothing new is invented.
   ========================================================================= */
.inv-eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
               color: var(--brand); font-weight: 650; margin: 0 0 var(--sp-2); }
.inv-eyebrow a { color: inherit; }
.inv-h1 { font-family: var(--display); font-size: clamp(28px, 3.6vw, 40px); font-weight: 650;
          line-height: 1.02; margin: 0 0 var(--sp-3); text-wrap: balance; }
.inv-lede { color: var(--ink-2); max-width: 70ch; margin: 0 0 var(--sp-4); font-size: var(--fs-md); }
.inv .card { margin-bottom: var(--sp-4); }
.inv-stores, .inv-areas { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.inv-stores a, .inv-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  padding: 0 var(--sp-3); border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm); font-weight: 600;
}
.inv-stores a:hover, .inv-chip:hover { text-decoration: none; border-color: var(--ink-3); }
.inv-stores a[aria-current="page"], .inv-chip--on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.inv-chip b { font-family: var(--mono); font-weight: 600; opacity: .8; }
.inv-start .btn-row .btn { min-height: 48px; }
.inv-check { display: flex; gap: var(--sp-2); align-items: center; font-size: var(--fs-sm); margin: var(--sp-3) 0; }
.inv-check input { width: 22px; height: 22px; }

/* the count sheet */
.inv-bar {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  gap: var(--sp-3); margin: 0 calc(-1 * var(--sp-2)) var(--sp-3); padding: var(--sp-3) var(--sp-3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.inv-bar__n { font-size: var(--fs-md); }
.inv-bar__n b { font-family: var(--mono); }
.inv-bar__save { font-size: var(--fs-xs); font-weight: 650; color: var(--ok); }
.inv-bar__save--busy { color: var(--warn); }
.inv-wait { position: sticky; top: 64px; z-index: 19; }
.inv-wait[hidden] { display: none; }
.inv-jump { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-3); font-size: var(--fs-sm); }
.inv-jump select { min-height: 44px; flex: 1; font: inherit; padding: 0 var(--sp-2);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.inv-sec { margin: 0 0 var(--sp-5); scroll-margin-top: 80px; }
.inv-sec__t { font-family: var(--display); font-size: 22px; font-weight: 650; margin: var(--sp-4) 0 var(--sp-2);
  padding-bottom: var(--sp-1); border-bottom: 2px solid var(--brand); }
.inv-row {
  display: grid; grid-template-columns: 1fr 104px; grid-template-rows: auto auto; column-gap: var(--sp-3);
  align-items: center; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); min-height: 64px;
}
.inv-row__name { grid-row: 1 / span 2; font-size: var(--fs-md); font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.inv-row__meta { display: block; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.inv-row__q {
  width: 104px; height: 52px; text-align: right; font-family: var(--mono); font-size: 22px; font-weight: 600;
  padding: 0 var(--sp-3); border: 2px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}
.inv-row__q:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.inv-row--done .inv-row__q { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); background: var(--ok-soft); }
.inv-row__st { grid-column: 2; font-size: 11px; text-align: right; color: var(--ink-3); min-height: 14px; }
.inv-row__st--ok { color: var(--ok); }
.inv-row__st--busy { color: var(--warn); }
.inv-row__st--bad { color: var(--bad); font-weight: 650; }
.inv-post { margin-top: var(--sp-6); }
.inv-abandon { margin: var(--sp-4) 0 var(--sp-6); font-size: var(--fs-sm); color: var(--ink-3); }
.inv-total td { font-weight: 700; border-top: 2px solid var(--line-strong); }

/* items + areas */
.inv-areaform summary { cursor: pointer; font-weight: 650; }
.inv-arearow { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-3); }
.inv-arearow input[type=text], .inv-filter input, .inv-filter select, .inv-bulk__bar select {
  min-height: 40px; font: inherit; padding: 0 var(--sp-3); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
}
.inv-arearow input[type=text] { flex: 1 1 180px; }
.inv-filter { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.inv-filter input { flex: 1 1 200px; }
.inv-bulk__bar {
  position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center;
  padding: var(--sp-2) var(--sp-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.inv-bulk__bar .inv-check { margin: 0 var(--sp-2) 0 0; }
.inv-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.inv-item { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3); border-bottom: 1px solid var(--line); }
.inv-item:last-child { border-bottom: 0; }
.inv-item > input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.inv-item__main { flex: 1; min-width: 0; }
.inv-item__name { font-weight: 600; overflow-wrap: anywhere; }
.inv-item__meta { font-size: var(--fs-xs); color: var(--ink-3); }
.inv-item__move { display: flex; gap: 4px; flex: none; }
.inv-item__move .btn { min-width: 40px; padding: 0 var(--sp-2); }
@media (max-width: 560px) {
  .inv-row { grid-template-columns: 1fr 92px; }
  .inv-row__q { width: 92px; }
}

/* Shift Book: hour by hour (sales per hour + headcount by role; Bill 10/26) */
.sb-hv__days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sb-hv__day { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 8px; padding: 4px 10px; font: inherit; cursor: pointer; }
.sb-hv__day[aria-pressed="true"] { border-color: var(--brand); color: var(--ink); font-weight: 600; }
.sb-hv__t { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 13px; }
.sb-hv__t th { font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 4px 6px; text-align: center; white-space: nowrap; }
.sb-hv__t th:first-child, .sb-hv__h { text-align: left; }
.sb-hv__h { color: var(--ink-3); font-weight: 400; white-space: nowrap; padding-right: 8px; }
.sb-hv__h--peak { color: var(--ink); font-weight: 600; }
.sb-hv__s { min-width: 160px; text-align: left !important; }
td.sb-hv__s { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 0; }
.sb-hv__bar { flex: 1; height: 10px; background: var(--line); border-radius: 3px; overflow: hidden; display: block; }
.sb-hv__bar > span { display: block; height: 100%; background: var(--brand); }
td.sb-hv__s .sb-num { min-width: 52px; text-align: right; font-size: 12px; color: var(--ink-2); }
.sb-hv__c { text-align: center; border: 1px solid var(--line); padding: 4px 0; min-width: 44px; color: var(--ink-3); }
.sb-hv__c--plan { color: var(--ink-2); }
.sb-hv__c--short { background: var(--sb-bad-soft); color: var(--bad); font-weight: 600; }
.sb-hv__c--heavy { background: var(--sb-warn-soft); color: var(--warn); }
.sb-hv__c--ok { color: var(--ink-2); }

/* Inventory Stage 1: areas with states, numbers held on the phone, late lines */
.inv-bar__save--bad { color: var(--bad); }
.inv-arealist { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.inv-areachip { display: inline-flex; flex-direction: column; gap: 2px; padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--ink); font-size: var(--fs-sm); line-height: 1.2; min-height: 44px; }
.inv-areachip:hover { text-decoration: none; border-color: var(--ink-3); }
.inv-areachip small { font-size: 11px; color: var(--ink-3); }
.inv-areachip--saved, .inv-areachip--not_stocked { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); background: var(--ok-soft); }
.inv-areachip--counting, .inv-areachip--done_on_phone, .inv-areachip--assigned { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--warn-soft); }
.inv-areachip--unassigned, .inv-areachip--left_out { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.inv-sec__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3);
  border-bottom: 2px solid var(--brand); margin: var(--sp-4) 0 var(--sp-2); }
.inv-sec__head .inv-sec__t { border-bottom: 0; margin: 0; padding-bottom: var(--sp-1); }
.inv-sec__meta { font-size: var(--fs-sm); color: var(--ink-2); margin: 0 0 var(--sp-2); }
.inv-sec__fix { color: var(--bad); font-weight: 650; }
.inv-sec__note { color: var(--warn); }
.inv-sec__acts { margin: 0 0 var(--sp-2); }
.inv-sec__acts .btn { min-height: 44px; }
.inv-areastate--saved, .inv-areastate--not_stocked { background: var(--ok-soft); color: var(--ok); }
.inv-areastate--counting, .inv-areastate--done_on_phone, .inv-areastate--assigned { background: var(--warn-soft); color: var(--warn); }
.inv-areastate--unassigned, .inv-areastate--left_out { background: var(--bad-soft); color: var(--bad); }
.inv-row__ns { grid-column: 2; justify-self: end; font: inherit; font-size: 11px; color: var(--ink-3);
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 8px; min-height: 32px; }
.inv-row__fix { grid-column: 1 / span 2; display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center;
  font-size: var(--fs-sm); color: var(--bad); margin-top: var(--sp-2); }
.inv-row__fix .btn { min-height: 44px; }
.inv-manage { margin: var(--sp-2) 0 var(--sp-4); font-size: var(--fs-sm); }
.inv-manage summary { cursor: pointer; color: var(--ink-2); }
.inv-add summary { cursor: pointer; font-weight: 650; }
.inv-add select, .inv-add input[type=text] { width: 100%; min-height: 44px; font: inherit; padding: 0 var(--sp-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.inv-notes { margin: 0; padding-left: var(--sp-4); }
.inv-late { margin: var(--sp-4) 0; }
.inv-places { font-size: var(--fs-xs); color: var(--ink-2); }
.inv-drain[hidden] { display: none; }
.inv-catrow { margin-bottom: var(--sp-3); }
.cap-list { list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
.cap-entry { padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.cap-entry--pending { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--warn-soft); }
.cap-entry--refused { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); background: var(--bad-soft); }
.cap-door-row { grid-template-columns: 1fr 92px 92px; }
.cap-door-row .inv-row__q { width: 92px; font-size: 18px; }
.cap-door-row .cap-ref { grid-column: 3; grid-row: 1; }
.inv-check-inv { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: var(--sp-2) 0; padding: var(--sp-2) var(--sp-3);
  display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.inv-check-inv input { flex: 1 1 160px; min-height: 44px; font: inherit; padding: 0 var(--sp-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
/* Inventory Stage 1, step 7: delivery split, recount, moves, paper */
.cap-into { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.cap-into select, .cap-into input { flex: 1 1 30%; min-width: 96px; min-height: 40px; font: inherit; font-size: var(--fs-sm);
  padding: 0 var(--sp-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.inv-recount { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--warn-soft); }
.inv-recount__t { margin: var(--sp-3) 0 0; }
.inv-recount__t .hint { display: block; margin-top: 2px; }
.inv-move { margin-bottom: var(--sp-2); }
.inv-move--needs_recount, .inv-move--waiting { color: var(--bad); }
.inv-paper .inv-row { grid-template-columns: 1fr 104px; }
.inv-paper .inv-check { grid-column: 2; font-size: var(--fs-xs); }
