/* Frozen & Turnt — back of house.
   The same night, plum and gold as the public site, tuned for a phone held in a hot rig:
   big tap targets, high contrast, quiet chrome, and one neon moment on Today. */
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../fonts/playfair.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400 900; font-display: swap; src: url('../fonts/playfair-italic.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/jost.woff2') format('woff2'); }
@font-face { font-family: 'Yellowtail'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/yellowtail.woff2') format('woff2'); }

:root {
  /* surfaces: night → plum, each step one level closer to the guest */
  --bg: #0A0612; --panel: #130A20; --panel2: #1C0E30; --raise: #2A1445; --field: #0E0819;
  --line: #2A1B3F; --line2: #3E2A5C;
  /* ink */
  --text: #F7F0E3; --muted: #BDB2C6; --faint: #8C7FA0;
  /* brand */
  --gold: #E3B866; --gold-hi: #F9E7B4; --gold-lo: #A9782A; --gold-ink: #1A1003; --pink: #FF4DB8; --cyan: #45E3FF;
  /* status: reserved, always shipped with words */
  --ok: #7BE0A0; --warn: #FFB648; --bad: #FF7A8A; --info: #45E3FF;
  --r: 14px; --r-s: 10px;
  --font: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --serif: 'Playfair Display', Georgia, serif; --script: 'Yellowtail', 'Brush Script MT', cursive;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); font: 400 16px/1.55 var(--font); font-feature-settings: 'kern', 'lnum';
  background: radial-gradient(1100px 620px at 92% -12%, rgba(42, 20, 69, .75), transparent 62%), radial-gradient(900px 520px at -10% 108%, rgba(17, 74, 66, .22), transparent 60%), var(--bg);
  background-attachment: fixed; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #9DF0FF; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
h1 { font: 700 clamp(1.75rem, 1.25rem + 1.9vw, 2.6rem)/1.08 var(--serif); letter-spacing: -.01em; }
h2 { font: 700 1.35rem/1.2 var(--serif); margin-top: 1.4em; }
h3 { font: 600 1.05rem/1.3 var(--font); margin-top: 1.2em; }
p { margin: 0 0 .8em; } ul, ol { margin: 0 0 .8em; padding-left: 1.3em; }
strong { font-weight: 600; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .center { text-align: center; } .nowrap { white-space: nowrap; } .bad { color: var(--bad); } .strong { font-weight: 700; }
.code { font: 500 .8rem/1.4 var(--font); color: var(--faint); letter-spacing: .03em; font-variant-numeric: tabular-nums; } .tbl .code { white-space: nowrap; }
.print-only { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--gold); color: var(--gold-ink); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
::selection { background: rgba(227, 184, 102, .35); }

/* ---------- shell ---------- */
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, rgba(28, 14, 48, .92), rgba(13, 7, 23, .96)); border-right: 1px solid var(--line); padding: 22px 14px 16px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; padding: 0 6px 6px; color: var(--text); }
.brand img { width: 52px; height: auto; flex: none; filter: drop-shadow(0 0 10px rgba(255, 77, 184, .25)); }
.brand-a { display: block; font: 700 1.2rem/1.05 var(--serif); color: var(--text); } .brand-a em { color: var(--gold); font-style: italic; } .brand-a.big { font-size: 2rem; }
.brand-b { display: block; font: 400 1.2rem/1 var(--script); color: var(--pink); margin-top: 3px; text-shadow: 0 0 12px rgba(255, 77, 184, .45); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-g { font: 500 .78rem var(--font); color: var(--faint); padding: 14px 12px 4px; }
.nav-g:first-child { padding-top: 4px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; color: var(--muted); text-decoration: none; padding: 9px 12px; border-radius: var(--r-s); font-weight: 500; }
.nav a svg, .tabbar svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav a:hover { color: var(--text); background: rgba(42, 20, 69, .55); }
.nav a.on { color: var(--gold-hi); background: linear-gradient(90deg, rgba(227, 184, 102, .16), rgba(227, 184, 102, .03)); font-weight: 600; }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); box-shadow: 0 0 10px rgba(227, 184, 102, .6); }
.nav a.on svg { opacity: 1; color: var(--gold); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; align-items: stretch; font-size: .88rem; padding: 12px 6px 0; border-top: 1px solid var(--line); }
.who { color: var(--muted); word-break: break-word; }
.body { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px 28px; border-bottom: 1px solid transparent; position: sticky; top: 0; background: rgba(10, 6, 18, .78); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); z-index: 5; min-height: 54px; }
.top-brand { display: none; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font: 700 1.05rem var(--serif); } .top-brand img { width: 34px; height: auto; } .top-brand em { color: var(--gold); }
.top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.burger { display: none; }
main { padding: 26px 28px 48px; max-width: 1320px; } main:focus { outline: none; }
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--muted); gap: 6px; } .boot-mark { font: 700 2rem var(--serif); color: var(--text); } .boot-mark em { color: var(--gold); }
.boot img { width: 120px; margin: 0 auto 6px; filter: drop-shadow(0 0 18px rgba(255, 77, 184, .35)); }
.nav-backdrop { display: none; }
.tabbar { display: none; }

/* ---------- page furniture ---------- */
.page-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; } .sub { color: var(--muted); margin: 6px 0 0; }
.actions, .row-actions, .toolbar, .filters, .form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar, .filters { margin: 14px 0; } .form-actions { margin-top: 12px; justify-content: flex-end; }
.crumbs { margin-bottom: 10px; font-size: .92rem; color: var(--muted); }
.card { background: linear-gradient(180deg, rgba(28, 14, 48, .55), rgba(19, 10, 32, .85)); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin: 16px 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; } .card-h h2 { margin: 0; } .card-h .sub { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 12px; margin: 16px 0; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s; }
.tile:hover { border-color: var(--line2); }
.tile h3, .tile h2 { margin: 0; } .tile h2 { font-size: 1.2rem; } .tile p { margin: 0; } .tile .row-actions { margin-top: auto; padding-top: 12px; }
.tile.hero { grid-column: 1 / -1; border-color: var(--gold-lo); background: linear-gradient(135deg, #24123B, #140B22 65%); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 16px 0; } .stats.tight { margin: 10px 0; }
.stat { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 16px 12px; overflow: hidden; }
.stat::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.stat.ok::after { background: var(--ok); } .stat.warn::after { background: var(--warn); } .stat.bad::after { background: var(--bad); }
.stat-l { font: 500 .84rem var(--font); color: var(--muted); }
.stat-v { font: 600 1.6rem/1.2 var(--font); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.01em; margin-top: 2px; }
.stat.bad .stat-v { color: #FFC2CA; }
.stat-n { font-size: .82rem; color: var(--faint); margin-top: 2px; }
.note { border-radius: var(--r-s); padding: 11px 16px; margin: 14px 0; border: 1px solid var(--line2); background: rgba(19, 10, 32, .8); font-size: .95rem; position: relative; padding-left: 18px; }
.note::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--line2); }
.note.warn { border-color: rgba(255, 182, 72, .35); background: rgba(255, 182, 72, .06); } .note.warn::before { background: var(--warn); }
.note.bad { border-color: rgba(255, 122, 138, .4); background: rgba(255, 122, 138, .07); } .note.bad::before { background: var(--bad); }
.note.ok { border-color: rgba(123, 224, 160, .35); background: rgba(123, 224, 160, .06); } .note.ok::before { background: var(--ok); }
.note.info { border-color: rgba(69, 227, 255, .22); background: rgba(69, 227, 255, .04); } .note.info::before { background: var(--info); }
.empty { text-align: center; padding: 40px 18px; border: 1px dashed var(--line2); border-radius: var(--r); margin: 16px 0; color: var(--muted); background: rgba(19, 10, 32, .5); }
.empty h3 { color: var(--text); margin-top: 0; font: 700 1.2rem var(--serif); }
.empty p { max-width: 46ch; margin: 0 auto 14px; }
.basis { font-size: .9rem; color: var(--muted); margin: 8px 0 12px; }

/* ---------- controls ---------- */
.btn { font: 500 .93rem/1 var(--font); color: var(--text); background: rgba(42, 20, 69, .5); border: 1px solid var(--line2); border-radius: 999px; padding: 10px 18px; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: border-color .15s, background .15s, color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--gold); color: var(--gold-hi); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.primary { background: linear-gradient(180deg, #EEC67A, var(--gold)); color: var(--gold-ink); border-color: var(--gold); font-weight: 600; box-shadow: 0 0 0 0 rgba(227, 184, 102, 0); }
.btn.primary:hover { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-hi), #EEC67A); box-shadow: 0 0 18px rgba(227, 184, 102, .35); }
.btn.danger { color: var(--bad); border-color: rgba(255, 122, 138, .45); background: transparent; } .btn.danger:hover { background: rgba(255, 122, 138, .1); color: #FFC2CA; border-color: var(--bad); }
.btn.ghost { background: transparent; } .btn.small { padding: 6px 13px; min-height: 32px; font-size: .85rem; } .btn.wide { width: 100%; margin-top: 12px; min-height: 46px; } .btn.left { margin-right: auto; }
.btn.link { background: none; border: none; color: var(--cyan); padding: 4px 2px; min-height: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 400; } .btn.link:hover { color: #9DF0FF; }
input, select, textarea { font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--line2); border-radius: var(--r-s); padding: 9px 12px; min-height: 42px; max-width: 100%; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #56407A; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227, 184, 102, .18); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { width: 100%; resize: vertical; line-height: 1.5; } input[type=checkbox] { min-height: 0; width: 18px; height: 18px; accent-color: var(--gold); vertical-align: -3px; padding: 0; }
input[type=date], input[type=time] { color-scheme: dark; }
input.bad, select.bad, textarea.bad { border-color: var(--bad); } input.narrow { width: 6.4em; } input.wide-in { width: 100%; } input[type=search] { min-width: 220px; }
::placeholder { color: #7A6D8E; } input[readonly] { opacity: .7; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; background: var(--field); }
.seg button { font: 500 .88rem var(--font); background: transparent; color: var(--muted); border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; min-height: 34px; }
.seg button:hover { color: var(--text); } .seg button.on { background: var(--gold); color: var(--gold-ink); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 16px; overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.tab { font: 500 .96rem var(--font); background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 14px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--text); } .tab.on { color: var(--gold-hi); border-bottom-color: var(--gold); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.chipbtn { font: 500 .86rem var(--font); background: transparent; color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 6px 14px; cursor: pointer; min-height: 34px; } .chipbtn:hover { color: var(--text); border-color: #56407A; }
.chipbtn.on { background: rgba(227, 184, 102, .14); color: var(--gold-hi); border-color: var(--gold); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding: 4px 11px; border-radius: 99px; border: 1px solid var(--line2); color: var(--muted); text-transform: capitalize; white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip.ok { color: var(--ok); border-color: rgba(123, 224, 160, .35); } .chip.warn { color: var(--warn); border-color: rgba(255, 182, 72, .4); text-transform: none; } .chip.bad { color: var(--bad); border-color: rgba(255, 122, 138, .45); text-transform: none; }
.role-pick { font-size: .88rem; min-height: 36px; padding: 6px 30px 6px 12px; width: 100%; }
.badge { display: inline-block; font: 500 .76rem/1.55 var(--font); padding: 1px 9px; border-radius: 99px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; margin-left: 4px; }
td > .badge:first-child, .badges .badge, p > .badge:first-child { margin-left: 0; }
.badge.ok { color: var(--ok); border-color: rgba(123, 224, 160, .35); background: rgba(123, 224, 160, .07); } .badge.warn { color: var(--warn); border-color: rgba(255, 182, 72, .38); background: rgba(255, 182, 72, .07); } .badge.bad { color: var(--bad); border-color: rgba(255, 122, 138, .42); background: rgba(255, 122, 138, .08); }
.badge.allergen { color: #FF9AD6; border-color: rgba(255, 77, 184, .4); background: rgba(255, 77, 184, .07); } .badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
label.inline { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: .92rem; }
.count-in { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: rgba(19, 10, 32, .85); margin: 8px 0 16px; }
.tbl { border-collapse: collapse; width: 100%; font-size: .94rem; } .tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font: 500 .82rem var(--font); color: var(--muted); white-space: nowrap; background: rgba(28, 14, 48, .96); position: sticky; top: 0; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--text); } .tbl th.sorted { color: var(--gold); }
.tbl tbody tr:last-child td { border-bottom: 0; } .tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: rgba(42, 20, 69, .45); } .tbl tr.click:focus-visible { outline-offset: -2px; }
.tbl td:first-child a, .tbl tr.click td:nth-child(2) { font-weight: 500; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; } .tbl.compact th, .tbl.compact td { padding: 8px 12px; }
.tbl tfoot td { font-weight: 600; border-top: 1px solid var(--line2); border-bottom: 0; background: rgba(28, 14, 48, .6); }
.tbl tr.row-bad td { background: rgba(255, 122, 138, .07); }
.tbl.statement td { padding: 9px 16px; } .tbl.statement tr.total td { font-weight: 600; border-top: 1px solid var(--line2); background: rgba(28, 14, 48, .7); } .tbl.statement tr.sub td { font-weight: 600; }
.tbl.statement tr.grand td { font: 700 1.15rem var(--serif); color: var(--gold-hi); border-top: 1px solid var(--gold-lo); }
.tbl.statement tr.grand td.num { font: 600 1.15rem var(--font); font-variant-numeric: tabular-nums; }
.card .table-wrap, .card > .tbl { border: 0; background: transparent; }

/* ---------- charts ---------- */
.chart { position: relative; margin: 6px 0 4px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line2); stroke-width: 1; }
.chart .ax { fill: var(--faint); font: 400 12px var(--font); font-variant-numeric: tabular-nums; }
.chart .ax.x { fill: var(--muted); }
.chart .ax.x.now { fill: var(--gold-hi); font-weight: 600; }
.chart .bar-m { fill: var(--gold); transition: fill .12s; pointer-events: none; }
.chart .lbl, .chart .ax, .chart .grid, .chart .base { pointer-events: none; }
.chart .bar-m.zero { fill: var(--line2); }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .col.on .bar-m { fill: var(--gold-hi); }
.chart .col.on .hit, .chart .hit:focus-visible { fill: rgba(227, 184, 102, .07); }
.chart .lbl { fill: var(--text); font: 600 12px var(--font); font-variant-numeric: tabular-nums; }
.tip { position: absolute; pointer-events: none; z-index: 6; background: #241238; border: 1px solid var(--line2); border-radius: 10px; padding: 8px 12px; font-size: .86rem; line-height: 1.4; min-width: 150px; max-width: 260px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .1s; }
.tip.on { opacity: 1; } .tip b { display: block; font-weight: 600; margin-bottom: 2px; } .tip .tv { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gold-hi); } .tip .tn { color: var(--muted); display: block; }
.chart-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--faint); margin-top: 6px; }

/* ---------- Today: the board ---------- */
.board { position: relative; border-radius: 22px; padding: 26px 28px 24px; margin: 6px 0 20px; background: radial-gradient(700px 280px at 0% 0%, rgba(255, 77, 184, .10), transparent 70%), radial-gradient(600px 300px at 100% 100%, rgba(69, 227, 255, .06), transparent 70%), linear-gradient(160deg, #22103A, #12091F 70%); border: 1.5px solid rgba(255, 77, 184, .55); box-shadow: 0 0 0 1px rgba(255, 77, 184, .12), 0 0 32px rgba(255, 77, 184, .18), inset 0 0 40px rgba(255, 77, 184, .06); overflow: hidden; }
.board + .board { margin-top: -6px; }
.board-k { font: 400 2.1rem/1 var(--script); color: #FF7CCB; text-shadow: 0 0 6px rgba(255, 77, 184, .9), 0 0 22px rgba(255, 77, 184, .55); margin: 0 0 6px; display: inline-block; }
.board-v { font: 700 clamp(1.7rem, 1.2rem + 2.2vw, 2.9rem)/1.05 var(--serif); margin: 0 0 8px; letter-spacing: -.01em; }
.board-m { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); margin: 0 0 18px; }
.board-m span { display: inline-flex; align-items: center; gap: 7px; } .board-m svg { width: 16px; height: 16px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.board-n { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border-top: 1px solid rgba(255, 77, 184, .22); border-bottom: 1px solid rgba(255, 77, 184, .22); margin: 0 0 18px; }
.board-n div { padding: 14px 16px 12px 0; } .board-n div + div { padding-left: 16px; border-left: 1px solid rgba(255, 77, 184, .16); }
.board-n b { display: block; font: 600 clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem)/1.05 var(--font); font-variant-numeric: tabular-nums lining-nums; color: var(--gold-hi); letter-spacing: -.01em; }
.board-n span { color: var(--muted); font-size: .88rem; }
.board.quiet { border-color: var(--line2); box-shadow: none; background: linear-gradient(160deg, #1D0E31, #12091F 70%); }
.board.quiet .board-k { color: var(--gold); text-shadow: none; font-size: 1.8rem; }
@media (prefers-reduced-motion: no-preference) {
  .board.lit .board-k { animation: neon-on 1.4s steps(1, end) .25s both; }
  .board.lit { animation: tube-on 1.4s steps(1, end) .25s both; }
}
@keyframes neon-on { 0% { opacity: .15; text-shadow: none; } 8% { opacity: 1; } 12% { opacity: .2; text-shadow: none; } 22% { opacity: 1; } 26% { opacity: .35; text-shadow: none; } 34%, 100% { opacity: 1; } }
@keyframes tube-on { 0% { border-color: rgba(255, 77, 184, .15); box-shadow: none; } 8% { border-color: rgba(255, 77, 184, .55); } 12% { border-color: rgba(255, 77, 184, .15); box-shadow: none; } 34%, 100% { border-color: rgba(255, 77, 184, .55); } }
.today-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 18px; align-items: start; }
.today-grid > .card { margin-top: 0; }
.week { list-style: none; padding: 0; margin: 4px 0 0; }
.week li { display: grid; grid-template-columns: 7.2em minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); } .week li:last-child { border: 0; }
.week .wd { color: var(--gold); font-weight: 600; white-space: nowrap; } .week .wg { color: var(--muted); font-size: .88rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.week a { color: var(--text); text-decoration: none; font-weight: 500; } .week a:hover { color: var(--gold-hi); text-decoration: underline; }
.week .wz { display: block; color: var(--faint); font-size: .85rem; }

/* ---------- forms + modal ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; } .field { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .field.full, .form .full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 500; color: var(--muted); } .field.check label { font-weight: 500; color: var(--text); font-size: .95rem; display: flex; gap: 8px; align-items: center; } .req { color: var(--gold); } .hint { font-size: .82rem; color: var(--faint); } .ferr { font-size: .85rem; color: var(--bad); min-height: 0; }
.form-h { margin: 16px 0 2px; padding-top: 12px; border-top: 1px solid var(--line); font: 700 1.02rem var(--serif); color: var(--gold-hi); }
.form .form-h:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.modal { position: fixed; inset: 0; background: rgba(5, 2, 10, .74); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; place-items: center; padding: 14px; z-index: 50; overflow-y: auto; }
.modal-box { background: linear-gradient(180deg, #1C0E30, #130A20 40%); border: 1px solid var(--line2); border-radius: 18px; min-width: 0; max-width: 100%; width: min(580px, 100%); max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 0 1px rgba(227, 184, 102, .06); }
@media (prefers-reduced-motion: no-preference) { .modal-box { animation: rise .16s ease-out; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-box.wide { width: min(880px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); } .modal-head h2 { margin: 0; font-size: 1.25rem; }
.modal-body { padding: 18px 20px; overflow-y: auto; overflow-x: hidden; min-width: 0; } .modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.x { background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 2px 10px; border-radius: 999px; min-height: 36px; } .x:hover { color: var(--text); background: var(--raise); }
body.modal-open { overflow: hidden; }
.lines-edit { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; } .li-row { display: grid; grid-template-columns: minmax(0, 3fr) 5.5em 5.5em minmax(0, 2fr) auto; gap: 6px; align-items: center; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; } .pick-list { display: flex; flex-direction: column; gap: 6px; }
.pick { text-align: left; background: var(--panel2); border: 1px solid var(--line2); border-radius: var(--r-s); padding: 12px 14px; color: var(--text); cursor: pointer; display: flex; flex-direction: column; font: inherit; } .pick span { color: var(--muted); font-size: .86rem; } .pick:hover { border-color: var(--gold); }
#toasts { position: fixed; right: 18px; top: 64px; display: flex; flex-direction: column; gap: 8px; z-index: 80; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: #10261D; border: 1px solid rgba(123, 224, 160, .45); color: #DCFFE9; padding: 11px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.toast.err { background: #2E1220; border-color: rgba(255, 122, 138, .55); color: #FFE0E5; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .18s ease-out; } }

/* ---------- sign in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 18px; background: radial-gradient(800px 480px at 50% -8%, rgba(255, 77, 184, .16), transparent 70%), radial-gradient(900px 520px at 50% 110%, rgba(42, 20, 69, .8), transparent 70%), var(--bg); }
.auth-card { width: min(440px, 100%); background: linear-gradient(180deg, rgba(28, 14, 48, .9), rgba(19, 10, 32, .95)); border: 1px solid var(--line2); border-radius: 22px; padding: 30px 30px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.auth-logo { display: block; width: 150px; margin: -6px auto 2px; filter: drop-shadow(0 0 22px rgba(255, 77, 184, .35)); }
.auth-card .brand-b { text-align: center; font-size: 1.6rem; }
.auth-card h1 { font-size: 1.6rem; margin: 20px 0 6px; } .auth-card .form { grid-template-columns: 1fr; margin-top: 16px; } .auth-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 14px; }

/* ---------- recipe card ---------- */
.rcard-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; } .rcard-head h2 { margin: 2px 0; font-size: 1.7rem; }
.rcard-meta { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; font-weight: 600; font-variant-numeric: tabular-nums; } .k { display: block; font: 500 .8rem var(--font); color: var(--muted); }
.rcard-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 26px; } .rcard-grid h3 { color: var(--gold-hi); font: 700 1.08rem var(--serif); }
.lines td { border-bottom: 1px dashed var(--line); } .method li { margin-bottom: .55em; } .method li::marker { color: var(--gold); font-weight: 600; }
.rcard-foot { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; } .ccp { border: 1px solid rgba(255, 122, 138, .45); background: rgba(255, 122, 138, .07); border-radius: var(--r-s); padding: 10px 14px; margin-bottom: 10px; }
.rcard-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; font-size: .92rem; } .links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cards-print .rcard { margin-bottom: 18px; }

/* ---------- sheets ---------- */
.sheet-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; } .sheet-head h2 { margin: 0; } .sheet-head .stats { min-width: min(520px, 100%); }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 0 20px; align-items: start; } .sheet-sec h3 { margin-top: .9em; font: 700 1.08rem var(--serif); color: var(--gold-hi); }
.sticky-total { position: sticky; top: 60px; z-index: 4; background: rgba(28, 14, 48, .95); backdrop-filter: blur(6px); border: 1px solid var(--gold-lo); border-radius: var(--r-s); padding: 10px 16px; margin: 10px 0; }

/* ---------- rig ---------- */
.checklist { list-style: none; padding: 0; } .checklist li { border: 1px solid var(--line); border-radius: var(--r-s); margin-bottom: 6px; background: var(--panel); transition: border-color .15s, background .15s; }
.checklist li:has(input:checked) { background: rgba(123, 224, 160, .05); border-color: rgba(123, 224, 160, .3); }
.checklist li.critical { border-color: rgba(255, 122, 138, .45); }
.checklist label { display: flex; gap: 14px; padding: 14px 16px; cursor: pointer; align-items: flex-start; } .checklist input { width: 24px; height: 24px; flex: none; margin-top: 0; }
.temp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 8px; }
.temp-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-s); padding: 11px 14px; } .temp-row.bad { border-color: var(--bad); background: rgba(255, 122, 138, .06); }
.eq-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 12px; align-items: start; } .eq { margin: 0; padding: 14px 16px; min-width: 0; overflow-x: auto; } .eq-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.alerts, .ready { list-style: none; padding: 0; margin: 0; }
.alerts li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 11px 14px 11px 16px; position: relative; background: rgba(28, 14, 48, .6); border: 1px solid var(--line); border-radius: var(--r-s); margin-bottom: 6px; }
.alerts li::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--line2); }
.alerts li.bad::before { background: var(--bad); } .alerts li.warn::before { background: var(--warn); } .alerts li.info::before { background: var(--info); }
.alerts .ak { font-size: .8rem; font-weight: 600; margin-right: 8px; } .alerts li.bad .ak { color: var(--bad); } .alerts li.warn .ak { color: var(--warn); } .alerts li.info .ak { color: var(--info); }
.all-clear { display: flex; gap: 10px; align-items: center; color: var(--muted); margin: 0; } .all-clear::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); flex: none; }
.ready li { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(70px, 1fr) auto; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); } .ready li:last-child { border: 0; } .ready-l strong { display: block; line-height: 1.3; } .ready-l .muted { font-size: .86rem; font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: var(--field); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); } .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-lo), var(--gold)); border-radius: 99px; min-width: 0; }

/* ---------- SOP ---------- */
.sop header { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; } .sop h2 { margin: 2px 0 6px; font-size: 1.6rem; } .sop-meta { color: var(--muted); font-size: .92rem; white-space: pre-wrap; }
.sop-sec h3 { color: var(--gold-hi); font: 700 1.08rem var(--serif); } .sop-sec li { margin-bottom: .45em; } .sop-sec li::marker { color: var(--gold); }
.sop-sec.limits, .sop-sec.fix, .sop-sec.verify { border-radius: var(--r-s); padding: 4px 16px 8px; margin: 12px 0; border: 1px solid var(--line2); }
.sop-sec.limits { border-color: rgba(255, 122, 138, .45); background: rgba(255, 122, 138, .06); } .sop-sec.verify { border-color: rgba(255, 182, 72, .4); background: rgba(255, 182, 72, .06); }

/* ---------- tablets and phones ---------- */
/* menu photos */
.with-thumb { display: inline-flex; align-items: center; gap: 10px; } .thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--field); } .thumb.none { display: inline-block; }
.rcard-ph { width: 168px; height: 168px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--line2); flex: none; } .rcard-title { flex: 1 1 240px; min-width: 0; }
.photo-pick img { width: 100%; max-height: 340px; object-fit: contain; border-radius: var(--r-s); background: var(--field); margin-bottom: 10px; }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; } .pub-item { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px; font-size: .9rem; } .pub-item.out { opacity: .55; } .pub-item b { display: block; font-weight: 600; } .pub-item .muted { font-size: .8rem; }
.diff li { margin: 2px 0; } .diff .add { color: var(--ok, #6fe3a1); } .diff .rm { color: var(--bad, #ff7a8a); }
.cmp td.up { color: var(--ok, #6fe3a1); } .cmp td.down { color: var(--bad, #ff7a8a); }
.guide { max-width: 980px; } .guide h2 { margin-top: 26px; } .guide ol, .guide ul { padding-left: 1.25rem; } .guide li { margin: 5px 0; }
.routine { list-style: none; padding: 0; margin: 0; } .routine li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); } .routine li:last-child { border-bottom: 0; } .routine input { width: 20px; height: 20px; margin-top: 2px; flex: none; } .routine .r-t { flex: 1; } .routine .r-t small { display: block; color: var(--muted); } .routine li.done .r-t > span { text-decoration: line-through; color: var(--muted); }
.help-btn { min-width: 40px; } .help-body h3 { margin: 14px 0 4px; color: var(--gold-hi); font: 700 1.02rem var(--serif); } .help-body ul { padding-left: 1.2rem; } .help-body li { margin: 4px 0; }
.glossary dt { font-weight: 700; color: var(--gold-hi); margin-top: 10px; } .glossary dd { margin: 2px 0 0; }
@media (max-width: 1100px) { .today-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 20px 0 60px rgba(0, 0, 0, .5); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  body.nav-open .side { transform: none; }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(5, 2, 10, .66); z-index: 20; }
  .top-brand { display: inline-flex; } .top { padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); }
  main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: rgba(13, 7, 23, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 4px; min-height: 52px; color: var(--muted); text-decoration: none; font: 500 .72rem var(--font); background: none; border: 0; border-radius: 12px; cursor: pointer; }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar .on { color: var(--gold-hi); } .tabbar .on svg { color: var(--gold); filter: drop-shadow(0 0 6px rgba(227, 184, 102, .5)); }
  .rcard-grid, .form { grid-template-columns: 1fr; } .li-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; padding-bottom: 8px; border-bottom: 1px dashed var(--line); } .li-row .li-item { grid-column: 1 / -1; } .li-row .li-note { grid-column: 1 / -1; order: 5; } .li-row input, .li-row select { width: 100%; min-width: 0; }
  .ready li { grid-template-columns: 1fr auto; } .ready .bar { grid-column: 1 / -1; order: 3; } .sticky-total { top: 56px; }
  #toasts { top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); right: 16px; left: 16px; max-width: none; }
}
/* phones: a table row becomes a small card, so nothing needs a sideways scroll */
@media (max-width: 640px) {
  .rcard-ph { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  h1 { font-size: 1.85rem; }
  .board { padding: 20px 18px 18px; border-radius: 18px; } .board-k { font-size: 1.8rem; }
  .board-n { grid-template-columns: repeat(2, 1fr); } .board-n div:nth-child(3) { padding-left: 0; border-left: 0; } .board-n div:nth-child(n+3) { border-top: 1px solid rgba(255, 77, 184, .16); }
  .board .row-actions .btn { flex: 1 1 auto; }
  .card { padding: 16px; }
  .week li { grid-template-columns: 1fr auto; } .week .wd { grid-column: 1 / -1; }
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tfoot { display: block; }
  .tbl.stack tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .tbl.stack td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; border: 0; padding: 3px 0; text-align: right; }
  .tbl.stack td::before { content: attr(data-label); color: var(--faint); font: 500 .8rem var(--font); text-align: left; flex: none; }
  .tbl.stack td:first-child { display: block; text-align: left; font-size: 1rem; } .tbl.stack td:first-child::before, .tbl.stack td[data-label=""]::before { content: none; }
  .tbl.stack td:empty, .tbl.stack td.print-only { display: none !important; }
  .tbl.stack td .row-actions, .tbl.stack td .count-in { justify-content: flex-end; }
  .tbl:not(.stack) th, .tbl:not(.stack) td { padding: 7px 7px; } input.narrow { width: 4.8em; }
  .temp-row { flex-wrap: wrap; } .page-head .actions { width: 100%; }
  input[type=search] { min-width: 0; width: 100%; } .filters > * { max-width: 100%; }
  .stat-v { font-size: 1.35rem; } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- print: white paper, black ink, no chrome ---------- */
@media print {
  .rcard-ph { width: 1.5in; height: 1.5in; border: 1px solid #000; } .thumb, .help-btn { display: none; }
  @page { margin: 12mm; }
  :root { --field: #fff; --bg: #fff; --panel: #fff; --panel2: #fff; --raise: #fff; --line: #999; --line2: #666; --text: #000; --muted: #333; --faint: #333; --gold: #000; --gold-hi: #000; --gold-lo: #000; --cyan: #000; --pink: #000; --ok: #000; --warn: #000; --bad: #000; --info: #000; }
  body { background: #fff; color: #000; font-size: 11pt; } .no-print, .side, .top, .tabbar, #toasts, .modal { display: none !important; } .print-only { display: block !important; } td.print-only, th.print-only { display: table-cell !important; }
  .layout { display: block; } main { padding: 0; max-width: none; } a { color: #000; text-decoration: none; }
  .card, .tile, .stat, .note, .table-wrap, .board { border-color: #999; background: #fff; box-shadow: none; } .table-wrap { overflow: visible; border: 0; } .tbl th { position: static; background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tbl th, .tbl td { border: 1px solid #999; padding: 4px 6px; } .tbl { font-size: 9.5pt; } td.box, th.box { min-width: 46px; } .badge { border-color: #666; color: #000; background: none; }
  .note::before, .stat::after { display: none; } .board-k { text-shadow: none; color: #000; } .chart, .tip { display: none; }
  h1, h2, h3, .tbl.statement tr.grand td { color: #000; }
  .sheet-grid { display: block; columns: 2; column-gap: 10mm; } .sheet-sec { break-inside: avoid; } h2, h3 { break-after: avoid; } tr, li { break-inside: avoid; }
  .cards-print .rcard, .sop-book .sop { break-before: page; border: 0; padding: 0; margin: 0; } .cards-print .rcard:first-child, .sop-book .sop:first-of-type { break-before: auto; }
  .sop ol, .sop ul, .method { padding-left: 2.2em; }
  .note.info, .view-par .page-head, .view-inventory .page-head, .temp-list, .view-truck .stats, .view-inventory .stats, .crumbs, .tabs { display: none !important; }
  input, select, textarea { border: 1px solid #666; color: #000; background: #fff; }
  .rcard-head h2 { font-size: 16pt; } .rcard .lines td, .method li { font-size: 10pt; }
  .rcard-grid { grid-template-columns: 5fr 6fr; } .ccp, .sop-sec.limits, .sop-sec.verify { border: 2px solid #000; background: #fff; }
  .stats { grid-template-columns: repeat(4, 1fr); } .stat-v { font-size: 13pt; } .sheet-head .stats { min-width: 0; }
  body.solo-print #app { display: none !important; } .print-solo { display: block !important; }
}
