:root {
  --bg: #F4F3EE;
  --panel: #FFFFFF;
  --ink: #1D1B16;
  --ink-soft: #55524A;
  --muted: #6B6656;
  --line: #D9DCE3;
  --rule: #2A3A55;
  --brand: #2A3A55;
  --brand-dark: #1B2438;
  --brand-light: #E7EAF0;
  --clay: #B23A2E;
  --clay-light: #F5E1DD;
  --gold: #836322;
  --navy-2: #1B2438;
  --navy-3: #26314A;
  --shadow-color: 27,33,45;
  --success: #2F6B2F;
  --success-light: #DCEAD4;
  --warning: #8A5A20;
  --warning-light: #FCE9D6;
  --info: #2A5B8C;
  --info-light: #E3EEF9;
  --neutral: #6B6656;
  --neutral-light: #E5E0D3;
  --highlight: #8A6A20;
  --highlight-light: #EFE2C4;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'IBM Plex Sans', sans-serif; color: var(--ink);
  background:
    repeating-linear-gradient(180deg, rgba(42,58,85,0.09) 0 1px, transparent 1px 34px),
    var(--bg);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.font-display { font-family: 'Parastoo', 'IBM Plex Serif', serif; }
.font-mono { font-family: 'Reddit Mono', monospace; font-variant-numeric: tabular-nums; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; outline: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.input:focus-visible { outline: none; }

.skip-link {
  position: fixed; top: -48px; left: 12px; z-index: 200;
  background: var(--brand-dark); color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 16px; border-radius: 4px; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* min-height:100vh then :100dvh - mobile browsers resize the vh unit as the
   address bar shows/hides while scrolling, which visibly stretches/jumps
   full-height layout on Android/iOS. dvh tracks the actual visible viewport
   instead; browsers that don't support it just keep the vh value above. */
.shell { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
@media (min-width: 640px) { .shell { flex-direction: row; } }

/* Flat ink-navy panel, no gradients/noise - the sidebar reads as a stack of
   page-edge tab dividers (folder tabs on a ledger book), not a lit surface. */
.sidebar {
  position: relative; overflow: hidden;
  background: var(--brand-dark);
  padding: 18px 14px; display: flex; gap: 4px;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.06);
}
.sidebar > * { position: relative; z-index: 1; }
@media (min-width: 640px) { .sidebar { flex-direction: column; width: 232px; flex-shrink: 0; min-height: 100vh; min-height: 100dvh; padding: 32px 16px; } }

/* Mobile (<640px): the sidebar becomes an off-canvas drawer instead of a
   horizontal icon-only bar - a Owner account has 13 nav items, which never
   fit in one row on a phone in portrait (this is why landscape "worked"
   before: just enough extra width to squeeze them all in). */
.mobile-topbar { display: none; }
@media (max-width: 639.98px) {
  .mobile-topbar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--brand-dark); padding: 12px 16px; position: sticky; top: 0; z-index: 40;
    border-bottom: 1px solid var(--line);
  }
  .mobile-topbar-brand { display: flex; align-items: center; gap: 9px; }
  .mobile-topbar-badge { width: 24px; height: auto; object-fit: contain; }
  .mobile-topbar-brand span { color: #fff; font-weight: 700; font-size: 16px; font-family: 'Parastoo', 'IBM Plex Serif', serif; }
  .mobile-nav-toggle { color: #fff; padding: 8px; border-radius: 4px; display: inline-flex; transition: background .12s; }
  .mobile-nav-toggle:hover, .mobile-nav-toggle:active { background: rgba(255,255,255,0.12); }

  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; width: 268px; max-width: 82vw;
    flex-direction: column; overflow-y: auto; z-index: 60;
    transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
    box-shadow: 8px 0 32px rgba(var(--shadow-color),0.28);
  }
  .sidebar.sidebar-open { transform: translateX(0); }
  .sidebar .brand { display: flex; } /* full wordmark+tagline inside the open drawer, same as desktop */
  .sidebar .navbtn span.label { display: inline; } /* full labels inside the drawer, same as desktop */
  /* Pre-existing bug, not new: .sidebar-user (name/role/Log out) was gated
     to >=640px only, meaning there was no way to log out on a phone at any
     screen size. Now shown inside the open drawer, same as desktop. */
  .sidebar .sidebar-user { display: flex; }
  .sidebar .sidebar-spacer { display: block; } /* so the user/logout block still sits pinned at the bottom of the drawer, not right after the last nav item */
  .sidebar .nav-group-label { display: block; }

  .sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(14,20,33,0.55); z-index: 55;
    opacity: 0; transition: opacity .2s;
  }
  .sidebar-backdrop.visible { display: block; opacity: 1; }
}
/* Wordmark + monogram lockup, given room to breathe rather than a cramped
   small badge jammed against the text (the approved comp is type-only, but
   the mark is real brand identity - the fix for "generic" is a considered
   pairing, not deleting it). */
.brand { display: none; align-items: center; gap: 13px; padding: 0 14px 18px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.14); }
@media (min-width: 640px) { .brand { display: flex; } }
.brand-badge-img { width: 38px; height: auto; object-fit: contain; flex-shrink: 0; }
.brand-name { font-family: 'Parastoo', 'IBM Plex Serif', serif; font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -0.01em; display: block; }
.brand-tag { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.55; color: rgba(255,255,255,0.5); margin: 5px 0 0; }
/* Nav items read as a stack of page-edge tab dividers, like folder tabs
   filed against a ledger's spine: bold ruled-book capitals + a custom
   ledger/trade glyph (receipts, tallies, roster sheets - see the navX
   entries in ICONS, not a generic icon pack) carry the item; the active
   tab is cut flush with the content it opens (a notch clipped from its
   trailing edge, no colored accent needed on top). */
.navbtn {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255,255,255,0.62); text-align: left; line-height: 1.35; transition: background .15s, color .15s;
}
.navbtn svg { flex-shrink: 0; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.navbtn:hover { background: rgba(255,255,255,0.06); color: #fff; }
.navbtn.active {
  background: var(--bg);
  color: var(--brand-dark);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}
@media (max-width: 639.98px) { .navbtn.active { clip-path: none; border-radius: 0 4px 4px 0; } }
.navbtn span.label { display: none; }
@media (min-width: 640px) { .navbtn span.label { display: inline; } }
.nav-group-label { display: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,0.6); margin: 16px 0 6px; padding: 12px 14px 0; border-top: 1px solid rgba(255,255,255,0.12); }
.nav-group-label:first-of-type { margin-top: 4px; padding-top: 0; border-top: none; }
@media (min-width: 640px) { .nav-group-label { display: block; } }
.main { flex: 1; min-width: 0; padding: 22px 18px; max-width: 1080px; }
@media (min-width: 640px) { .main { padding: 48px 56px; } }
.sidebar-spacer { flex: 1; display: none; }
@media (min-width: 640px) { .sidebar-spacer { display: block; } }
.sidebar-user { display: none; flex-direction: column; gap: 10px; padding: 14px 4px 0; margin-top: 8px; border-top: 1px solid rgba(255,255,255,0.14); }
@media (min-width: 640px) { .sidebar-user { display: flex; } }
.sidebar-user-row { display: flex; flex-direction: column; padding: 0 14px; }
.sidebar-user-name { font-family: 'Parastoo', 'IBM Plex Serif', serif; font-size: 14px; font-weight: 700; color: #fff; margin: 0; }
.sidebar-user-role { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin: 3px 0 0; }

h2.page-title { font-family: 'Parastoo', 'IBM Plex Serif', serif; font-size: 36px; font-weight: 700; margin: 0; color: var(--ink); letter-spacing: -0.01em; text-wrap: balance; line-height: 1.1; }
@media (max-width: 639.98px) { h2.page-title { font-size: 27px; } }
.subtle { color: var(--muted); font-size: 13px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
.eyebrow::after { content: ''; flex: 1; max-width: 64px; height: 1px; background: var(--line); }

.main-content-inner { animation: contentFadeIn .2s ease; }
@keyframes contentFadeIn { from { opacity: 0; } to { opacity: 1; } }

.btn { font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 4px; display: inline-flex; align-items: center; gap: 6px; transition: filter .15s, background .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary { background: var(--brand-dark); color: #fff; }
.btn-primary:hover { background: var(--brand); }
.btn-secondary { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-danger { background: var(--clay-light); color: var(--clay); }
.btn-danger:hover { filter: brightness(0.97); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { padding: 6px; border-radius: 4px; display: inline-flex; transition: background .12s; }
.icon-btn:hover { background: rgba(29,27,22,0.06); }

.field-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-size: 14px; padding: 10px 12px; border-radius: 4px; transition: border-color .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
select.input {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237A7568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
  padding-right: 34px; cursor: pointer;
}
select.input:hover { border-color: var(--muted); }

.product-search-wrap { position: relative; }
.product-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 8px 24px -8px rgba(var(--shadow-color),0.3);
  max-height: 260px; overflow-y: auto; padding: 4px;
}
.product-search-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.product-search-item:hover, .product-search-item.active { background: var(--brand-light); }
.product-search-empty { padding: 12px; text-align: center; color: var(--muted); font-size: 13px; }

/* Flat ruled card - a hairline border stands in for the old shadow stack,
   the same way a bounded entry sits inside a ledger book rather than
   floating above the page. */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 26px;
}
.card-center { display: flex; flex-direction: column; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
/* Single column all the way up to 1280px (accounting for the 232px sidebar
   + 112px of .main's own padding eating into whatever's left) - a cramped
   2-column tier in between just wraps these long money values mid-digit.
   Better to let the cards breathe full-width than fight for a tight column. */
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 1280px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Small uppercase label - the one piece of the old stat-card component
   still used directly (peak/low day callouts, client detail fields), now
   that every KPI grid has moved to the dash-hero/dash-rail treatment below. */
.stat-card-label { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin: 0; }

/* ---------------- Dashboard: ledger masthead figure + rail. The flagship
   number is the day's tallied entry, ruled off from the two smaller stat
   columns the way a cash-ledger page rules its totals row. ---------------- */
.dash-hero { display: flex; gap: 0; flex-wrap: wrap; align-items: stretch; margin-top: 6px; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--line); }
.dash-hero-figure { flex: 2 1 340px; position: relative; padding: 26px 28px; border-right: 1px solid var(--line); }
.dash-hero-figure .eyebrow { color: var(--muted); }
.dash-hero-number { font-family: 'Reddit Mono', monospace; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 38px; line-height: 1.05; letter-spacing: -0.01em; margin: 4px 0 10px; }
@media (min-width: 900px) { .dash-hero-number { font-size: 52px; } }
.dash-hero-context { font-size: 13px; color: var(--muted); margin: 0; max-width: 48ch; }
.dash-hero-secondary { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.dash-hero-secondary strong { display: block; font-family: 'Reddit Mono', monospace; font-size: 14.5px; font-weight: 600; }
.dash-hero-secondary span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 2px; }
.dash-rail { flex: 1 1 240px; max-width: 300px; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .dash-rail { max-width: none; } }
.dash-rail-item { padding: 16px 15px; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-left: 1px solid var(--line); }
.dash-rail-item:nth-child(2n+1) { border-left: none; }
.dash-rail-item:nth-child(n+3) { border-top: 1px solid var(--line); }
.dash-rail-value { font-family: 'Reddit Mono', monospace; font-variant-numeric: tabular-nums; font-size: 15.5px; font-weight: 600; color: var(--ink); overflow-wrap: break-word; }
.dash-rail-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 0; }
.dash-rail-sub { font-size: 10.5px; color: var(--muted); margin: 0; }

.dash-split { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) {
  .dash-split { grid-template-columns: 2fr 1fr; }
  .dash-split > div + div { border-left: 1px solid var(--line); padding-left: 28px; }
}

/* Flat ruled section - a hairline above, no box, no shadow. Replaces .card
   for the dashboard's below-fold blocks so the page reads as one continuous
   ledger sheet rather than a grid of cards (the direction this surface is
   built to, see .impeccable/surfaces/public-index-html.md). */
.ledger-block { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
/* A titled sub-list nested right under its own h3 - no separate top rule
   (the heading already separates it from whatever's above). The 10px
   horizontal padding contains .list-row's own -10px bleed margin (for its
   hover highlight), which otherwise collides across a grid gap when two of
   these sit side by side (Cash In/Cash Out, Assets/Liabilities). */
.ledger-group { padding-left: 10px; padding-right: 10px; }

/* "Needs attention" - flagged rows ruled off the page, not a bubble card
   stack. Red rule + label mark it as an exception entry in the ledger. */
.dash-attention { border-top: 2px solid var(--clay); padding-top: 12px; }
.dash-attention-label { margin: 0 0 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--clay); display: flex; align-items: center; gap: 6px; }
.dash-attention-list { display: flex; flex-direction: column; }
.dash-attention-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; text-align: left; background: none; border: none; border-top: 1px solid var(--line); padding: 10px 2px; width: 100%; cursor: pointer; font: inherit; color: inherit; }
.dash-attention-row:first-child { border-top: none; }
.dash-attention-row:hover, .dash-attention-row:focus-visible { background: var(--brand-light); }
.dash-attention-title { margin: 0; font-size: 13.5px; font-weight: 600; }
.dash-attention-flag { flex-shrink: 0; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* Segmented bar (replaces a donut for the 4-stage breakdown - a proportion
   read left-to-right needs a bar, not a pie, when there's only ever 4 slices). */
.stage-bar-track { display: flex; height: 12px; overflow: hidden; background: var(--neutral-light); border: 1px solid var(--line); }
.stage-bar-seg { height: 100%; }
.stage-bar-legend { display: flex; flex-direction: column; gap: 11px; margin-top: 18px; }
.stage-bar-legend-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-soft); }
.stage-bar-dot { width: 9px; height: 9px; flex-shrink: 0; }
.stage-bar-legend-row .amt { margin-left: auto; font-family: 'Reddit Mono', monospace; font-weight: 600; color: var(--ink); }

.dash-order-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.dash-order-row:first-child { border-top: none; }
.dash-order-no { font-family: 'Reddit Mono', monospace; font-size: 12px; font-weight: 600; color: var(--muted); width: 26px; flex-shrink: 0; }

/* overflow-x:auto (not just hidden) so a wide table scrolls horizontally
   inside its own box on a narrow phone instead of forcing the whole page
   wider than the viewport - that's what was making the page "too big or
   too small" (the browser auto-zooms out to fit an overflowing table). */
.data-table { border: 1px solid var(--line); border-radius: 4px; overflow-x: auto; overflow-y: hidden; }
.data-table table { width: 100%; }
.data-table thead tr { background: var(--brand-dark); }
.data-table th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,0.7); padding: 12px 14px; white-space: nowrap; }
.data-table td { padding: 12px 14px; font-size: 14px; border-top: 1px solid var(--line); background: var(--panel); }
.data-table tbody tr:first-child td { border-top: none; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover td { background: #FAFAF7; }

/* Ledger-style "stamped" mark for a record that is locked and can no longer
   silently change (a commission/COGS snapshot). Text-first, never color
   alone: the word LOCKED is the signal, the red outline reinforces it. */
.stamp-badge {
  display: inline-flex; align-items: center; gap: 4px; font-family: 'Reddit Mono', monospace;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--clay); border: 1.5px solid var(--clay); border-radius: 3px; padding: 2px 7px;
  transform: rotate(-2deg);
}

/* Generic switchable-section pill row (subview tabs, filters) - reused
   across pages instead of the plain btn-primary/btn-secondary toggle so
   "which section am I in" reads the same way everywhere. */
.tab-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-pill { font-size: 12.5px; font-weight: 700; letter-spacing: .01em; padding: 8px 15px; border-radius: 4px; background: var(--brand-light); color: var(--brand-dark); transition: background .15s, color .15s; }
.tab-pill:hover { background: #DCE1EA; }
.tab-pill.active { background: var(--brand-dark); color: #fff; }

.list-row { transition: background .12s; border-radius: 4px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
.list-row:hover { background: #FAFAF7; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 4px 10px; border-radius: 3px; }

/* Order-workflow status: plain colored text, no chip - "status always
   paired with a text label, never color alone" (the ledger already reads
   fine as a scan column without a filled pill on every row). */
.status-label { font-size: 12.5px; font-weight: 700; }
/* Locked commission/COGS snapshot on a completed order - a stamped mark,
   not another colored chip, echoing the red ink reserved for this exact
   case (see .impeccable/mocks/shell-dashboard-v1-hero-total.png). */
.locked-stamp {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  border: 1.5px solid var(--clay); border-radius: 2px; color: var(--clay);
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  transform: rotate(-3deg);
}

.overlay {
  position: fixed; inset: 0; background: rgba(14,20,33,0.5); display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 50; opacity: 0; animation: overlayFadeIn .16s ease forwards;
}
.modal {
  width: 100%; max-width: 480px; background: var(--panel); border-radius: 4px; padding: 26px; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 24px 56px rgba(var(--shadow-color),0.24), 0 4px 14px rgba(var(--shadow-color),0.12);
}
@keyframes overlayFadeIn { to { opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-title { font-family: 'Parastoo', 'IBM Plex Serif', serif; font-size: 19px; font-weight: 700; }

.empty { border: 1px dashed var(--line); border-radius: 4px; padding: 64px 20px; text-align: center; }
.empty p.title { font-size: 14px; font-weight: 600; margin: 8px 0 2px; }
.empty p.sub { font-size: 12px; color: var(--muted); margin: 0; }

.li-table input { border: none; background: transparent; width: 100%; font-size: 14px; padding: 6px; }
.li-table input:focus { background: var(--brand-light); border-radius: 4px; }

.sheet { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 40px; max-width: 720px; margin: 0 auto; }
@media (max-width: 639.98px) { .sheet { padding: 20px; } } /* 40px padding on each side ate ~21% of a phone's screen width */
.sheet .items-table th { border-bottom: 2px solid var(--brand-dark); text-transform: uppercase; letter-spacing: .04em; font-size: 11px; font-weight: 600; color: var(--brand-dark); text-align: left; padding-bottom: 8px; }
.sheet .items-table td { border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 14px; }

/* ---------------- Auth: portal's secondary screens (check-email, reset,
   verify-error) still use this plain centered card - shared with
   src/portal/portal.js. The staff sign-in below is its own composition. */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 32px 28px; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-title { font-family: 'Parastoo', 'IBM Plex Serif', serif; font-size: 22px; font-weight: 700; text-align: center; margin: 0 0 4px; letter-spacing: -0.005em; }
.auth-sub { font-size: 13px; color: var(--muted); text-align: center; margin: 0 0 24px; }
.auth-error { background: var(--clay-light); color: var(--clay); font-size: 13px; padding: 10px 12px; border-radius: 4px; margin-bottom: 16px; }

/* ---------------- Staff sign-in: an instrument panel, not a marketing
   split-screen. Full-bleed navy, a live clock as the one dominant visual
   element, the sign-in row docked below a rule - precision instead of a
   brand pitch staff have already seen. ---------------- */
.staff-console {
  min-height: 100vh; min-height: 100dvh; background: var(--brand-dark); color: #fff;
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.staff-console::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.7;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 34px);
}
.staff-console-inner { position: relative; width: 100%; max-width: 760px; }
.console-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.console-brand { display: flex; align-items: center; gap: 10px; }
.console-brand img { width: 26px; height: auto; }
.console-brand span { font-family: 'Parastoo', 'IBM Plex Serif', serif; font-size: 15px; font-weight: 700; }
.console-status { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
/* Static, not pulsing - this dot isn't wired to a real health check, so a
   pulse would fake liveness it doesn't have. A calm dot + label is honest. */
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #6FBF73; flex-shrink: 0; }
.console-readout { text-align: center; margin: 56px 0 40px; }
.console-clock {
  font-family: 'Reddit Mono', monospace; font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: clamp(44px, 9vw, 84px); line-height: 1; letter-spacing: -0.01em; margin: 0; color: #fff;
}
.console-date { margin: 12px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: rgba(255,255,255,0.5); }
.console-rule { height: 1px; background: rgba(255,255,255,0.16); margin-bottom: 36px; }
.console-form-label { margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.console-form { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.console-form label { flex: 1 1 180px; min-width: 180px; text-align: left; }
.console-form .field-label { color: rgba(255,255,255,0.5); }
.console-form .input { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.22); color: #fff; }
.console-form .input::placeholder { color: rgba(255,255,255,0.35); }
.console-form .input:focus { border-color: rgba(255,255,255,0.5); box-shadow: 0 0 0 3px rgba(255,255,255,0.08); }
.console-form .btn-primary { flex: 0 0 auto; }
.staff-console .auth-error { background: rgba(178,58,46,0.22); color: #F2B9AE; border: 1px solid rgba(178,58,46,0.4); flex-basis: 100%; }
.console-foot { margin: 32px 0 0; font-size: 11px; letter-spacing: .05em; color: rgba(255,255,255,0.5); }
@media (max-width: 639.98px) { .console-readout { margin: 40px 0 32px; } .console-form { flex-direction: column; align-items: stretch; } .console-form label { flex: 0 0 auto; min-width: 0; } .console-form .btn-primary { width: 100%; justify-content: center; } }

/* Loading state (replaces plain "Loading…" text) */
.loading-state { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: spin .7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toasts (replaces native alert()) */
.toast-host { position: fixed; top: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--toast-accent, var(--brand)); border-radius: 4px; padding: 12px 14px;
  box-shadow: 0 14px 32px rgba(var(--shadow-color),0.16), 0 2px 8px rgba(var(--shadow-color),0.07);
  opacity: 0; transform: translateX(24px); transition: opacity .22s ease, transform .22s ease;
}
.toast.toast-in { opacity: 1; transform: translateX(0); }
.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-msg { font-size: 13px; line-height: 1.4; flex: 1; }
.toast-close { flex-shrink: 0; opacity: .55; padding: 2px; border-radius: 4px; transition: opacity .12s, background .12s; }
.toast-close:hover { opacity: 1; background: rgba(29,27,22,0.06); }

@media print {
  .no-print { display: none !important; }
  .sidebar { display: none !important; }
  body { background: #fff; }
  .sheet { border: none; padding: 0; max-width: 100%; }
}
