/* ---------------------------------------------------------------------------
   Đặt hàng Bếp Tổng — the web client.

   Built for a phone held in one hand at the back door of a restaurant, by
   someone holding a crate with the other: 48px targets, big numerals, one
   job per screen. The laptop screens (accounting, the owner) are the same
   pages with more room. Palette as the accounting system: ink blue, seal
   red, the warm off-white of government paper.
   --------------------------------------------------------------------------- */
:root {
  --ink: #16263d; --ink-2: #334a68; --ink-3: #60748f; --ink-4: #9aa8bb;
  --line: #d9dfe8; --line-2: #e9edf3;
  --paper: #fbfaf7; --surface: #ffffff; --surface-2: #f4f6f9;
  --seal: #a8221f; --seal-soft: #fdf1f0;
  --ok: #1d6b4f; --ok-soft: #eef7f2;
  --warn: #8a5a09; --warn-soft: #fdf5e7;
  --accent: #1c4f8f; --accent-soft: #eef3fa;
  --shadow: 0 1px 2px rgba(22,38,61,.06), 0 4px 12px rgba(22,38,61,.05);
  --radius: 12px;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --tap: 48px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8edf4; --ink-2: #c2cde0; --ink-3: #93a2b8; --ink-4: #6b7d96;
    --line: #2c3a4e; --line-2: #243041; --paper: #11161f; --surface: #182130; --surface-2: #1e2938;
    --seal: #e8706c; --seal-soft: #2e1c1d; --ok: #6cc69f; --ok-soft: #16281f; --warn: #e0ab5a; --warn-soft: #2a2316;
    --accent: #7fb0ea; --accent-soft: #19253a; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  --ink: #e8edf4; --ink-2: #c2cde0; --ink-3: #93a2b8; --ink-4: #6b7d96;
  --line: #2c3a4e; --line-2: #243041; --paper: #11161f; --surface: #182130; --surface-2: #1e2938;
  --seal: #e8706c; --seal-soft: #2e1c1d; --ok: #6cc69f; --ok-soft: #16281f; --warn: #e0ab5a; --warn-soft: #2a2316;
  --accent: #7fb0ea; --accent-soft: #19253a; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.3rem; } h2 { font-size: 1.05rem; } h3 { font-size: .9rem; color: var(--ink-2); }
a { color: var(--accent); text-decoration: none; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { text-align: right; white-space: nowrap; }
.sub { color: var(--ink-3); font-size: .85rem; }
.small { font-size: .8rem; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.boot { padding: 40px; color: var(--ink-3); text-align: center; }
.hide { display: none !important; }

/* --- shell ------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 14px; display: flex; align-items: center; gap: 10px; padding-top: max(10px, env(safe-area-inset-top)); }
.top .brand b { display: block; font-size: 1rem; line-height: 1.1; }
.top .brand span { display: block; font-size: .68rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .12em; }
.top .who { text-align: right; font-size: .8rem; color: var(--ink-3); line-height: 1.2; }
.top .who b { display: block; color: var(--ink); font-weight: 500; }
.lang { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: .8rem; color: var(--ink-2); min-height: 36px; }

main { padding: 14px; max-width: 980px; margin: 0 auto; padding-bottom: calc(var(--tap) + 40px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { main { padding: 22px 28px; } }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; font-size: .72rem; color: var(--ink-3); gap: 2px; }
.tabs a .ic { font-size: 1.25rem; line-height: 1; }
.tabs a.on { color: var(--accent); font-weight: 600; }
.tabs a .badge { position: absolute; margin-left: 26px; margin-top: -4px; }
@media (min-width: 900px) {
  .tabs { position: sticky; top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--line); justify-content: center; }
  .tabs a { flex: 0 0 auto; flex-direction: row; min-height: 44px; padding: 0 16px; font-size: .9rem; gap: 8px; }
  main { padding-bottom: 40px; }
}

/* --- cards, lists ------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card.flat { box-shadow: none; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 64px; color: inherit; }
.item:active { background: var(--surface-2); }
.item .main { flex: 1; min-width: 0; }
.item .main b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .main span { display: block; color: var(--ink-3); font-size: .82rem; }
.item .chev { color: var(--ink-4); font-size: 1.2rem; }
.empty { padding: 28px 14px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius); }
.section-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-4); margin: 18px 4px 8px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.badge.placed { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.packing { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.dispatched, .badge.picked_up { background: #eef0ff; color: #4a3fb3; border-color: transparent; }
.badge.received { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.cancelled, .badge.refused { background: var(--seal-soft); color: var(--seal); border-color: transparent; }
.badge.late { background: var(--seal-soft); color: var(--seal); border-color: transparent; }
.badge.n { background: var(--seal); color: #fff; border-color: transparent; }

/* --- buttons, fields --------------------------------------------------- */
button, .btn { font: inherit; font-size: .95rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; min-height: var(--tap); padding: 0 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:disabled { opacity: .5; cursor: default; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
button.danger { background: var(--surface); border-color: var(--seal); color: var(--seal); }
button.ghost { border-color: transparent; background: transparent; color: var(--accent); }
button.sm, .btn.sm { min-height: 36px; font-size: .82rem; padding: 0 12px; }
button.wide { width: 100%; }
button.icon { width: var(--tap); padding: 0; font-size: 1.3rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.actions > * { flex: 1; min-width: 140px; }
.sticky-foot { position: sticky; bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 10; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; box-shadow: 0 -4px 16px rgba(22,38,61,.08); margin-top: 14px; }
@media (min-width: 900px) { .sticky-foot { bottom: 12px; } }

label { display: block; font-size: .82rem; color: var(--ink-2); font-weight: 500; margin-bottom: 4px; }
input, select, textarea { font: inherit; font-size: 1rem; width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; min-height: var(--tap); padding: 8px 12px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
textarea { min-height: 72px; resize: vertical; }
input[type="number"], input.qty { font-family: var(--mono); font-size: 1.15rem; text-align: right; }
.field { margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-size: .95rem; }
.check input { width: 24px; height: 24px; min-height: 0; margin: 0; }
.search { position: sticky; top: 58px; z-index: 9; background: var(--paper); padding: 6px 0 8px; }
.search input { font-size: 1rem; border-radius: 999px; padding-left: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2360748f' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center; }

/* --- the catalogue line, the packing line ------------------------------ */
.cat { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 6px; }
.cat.has { border-color: var(--accent); background: var(--accent-soft); }
.cat .nm { font-weight: 600; line-height: 1.25; }
.cat .un { color: var(--ink-3); font-size: .8rem; }
.cat .hint { color: var(--ink-4); font-size: .76rem; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: var(--tap); min-height: var(--tap); padding: 0; font-size: 1.4rem; border-radius: 10px; }
.stepper input { width: 72px; min-height: var(--tap); text-align: center; font-family: var(--mono); font-size: 1.2rem; padding: 0 4px; border-radius: 10px; }
.stepper input:placeholder-shown { color: var(--ink-4); }

.line { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; }
.line.diff { border-color: var(--warn); }
.line.ok { border-color: var(--ok); }
.line .nm { font-weight: 600; }
.line .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-3); font-size: .82rem; margin: 2px 0 8px; }
.line .meta b { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.line .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.line .fields.one { grid-template-columns: 1fr; }
.line .fields label { font-size: .74rem; }
.line .added { color: var(--warn); font-size: .78rem; font-weight: 600; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .rd { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(22,38,61,.75); color: #fff; font-family: var(--mono); font-size: .72rem; padding: 2px 4px; text-align: center; }
.thumb .x { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; border-radius: 50%; background: rgba(22,38,61,.8); color: #fff; border: 0; min-height: 0; padding: 0; font-size: .9rem; }
.thumb.big { width: 100%; height: auto; max-height: 70vh; }
.photo-btn { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; border: 1px dashed var(--accent); color: var(--accent); background: var(--accent-soft); border-radius: 10px; font-weight: 600; cursor: pointer; font-size: .9rem; }
.photo-btn input { display: none; }
.photo-btn.need { border-color: var(--seal); color: var(--seal); background: var(--seal-soft); }

/* --- timeline, tables -------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 10px 0; }
.step { text-align: center; font-size: .72rem; color: var(--ink-4); padding: 8px 2px; border-top: 3px solid var(--line-2); }
.step b { display: block; font-size: .8rem; color: var(--ink-3); }
.step.done { border-top-color: var(--ok); color: var(--ink-2); } .step.done b { color: var(--ok); }
.step.now { border-top-color: var(--accent); } .step.now b { color: var(--accent); }
.step .by { display: block; font-size: .7rem; color: var(--ink-3); }
.step .at { display: block; font-size: .68rem; color: var(--ink-4); font-family: var(--mono); }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 8px 8px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-2); }
.diffcell { color: var(--seal); font-weight: 600; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.filters .field { margin: 0; }
.days { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; -webkit-overflow-scrolling: touch; }
.day { flex: 0 0 auto; min-width: 72px; min-height: 62px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 6px 8px; text-align: center; font-size: .78rem; color: var(--ink-3); cursor: pointer; }
.day b { display: block; font-size: 1.05rem; color: var(--ink); font-family: var(--mono); }
.day.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.day .n { display: inline-block; margin-top: 2px; font-size: .7rem; }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.kpi .card { margin: 0; padding: 10px 12px; }
.kpi .v { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; }
.kpi .l { font-size: .75rem; color: var(--ink-3); }

/* --- notices, modals --------------------------------------------------- */
.note { padding: 10px 12px; border-radius: 10px; font-size: .9rem; margin-bottom: 12px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.bad { background: var(--seal-soft); color: var(--seal); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note.info { background: var(--accent-soft); color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); max-width: min(92vw, 520px); font-size: .9rem; }
.toast.bad { background: var(--seal); color: #fff; }
.sheet-bg { position: fixed; inset: 0; background: rgba(22,38,61,.45); z-index: 40; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--surface); border-radius: 16px 16px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 92vh; overflow-y: auto; box-shadow: 0 -8px 30px rgba(0,0,0,.2); }
.sheet header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
@media (min-width: 900px) { .sheet { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(640px, 92vw); border-radius: 16px; } }

/* --- sign-in ----------------------------------------------------------- */
.signin { max-width: 380px; margin: 8vh auto 0; }
.signin .logo { text-align: center; margin-bottom: 22px; }
.signin .logo b { display: block; font-size: 1.5rem; }
.signin .logo span { color: var(--ink-3); font-size: .85rem; }

/* --- the production order ---------------------------------------------- */
.progress { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin: 0 2px 10px; }
.progress span { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .2s; }
.prep { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; cursor: pointer; min-height: 64px; user-select: none; -webkit-user-select: none; }
.prep:active { background: var(--surface-2); }
.prep .tick { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; color: #fff; margin-top: 2px; }
.prep .nm { font-weight: 600; line-height: 1.25; }
.prep .total { flex: 0 0 auto; text-align: right; font-family: var(--mono); line-height: 1.1; }
.prep .total b { display: block; font-size: 1.5rem; font-weight: 600; }
.prep .total span { font-size: .72rem; color: var(--ink-3); }
.prep.done { border-color: var(--ok); background: var(--ok-soft); }
.prep.done .tick { background: var(--ok); border-color: var(--ok); }
.prep.done .tick::after { content: '✓'; }
.prep.done .nm, .prep.done .total b { text-decoration: line-through; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; gap: 4px; align-items: center; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .78rem; font-family: var(--mono); color: var(--ink-2); min-height: 28px; }
.chip b { color: var(--accent); font-weight: 600; }

/* --- out of stock, the Drive placeholder, the overview ------------------- */
.cat.out { border-style: dashed; background: var(--surface-2); cursor: pointer; }
.cat.out .nm { color: var(--ink-3); }
.cat.out .outmsg { color: var(--seal); font-size: .8rem; margin-top: 2px; }
.cat.out:active { background: var(--seal-soft); }
.outlist .item { min-height: 52px; }
.thumb.archived { display: flex; align-items: center; justify-content: center; border-style: dashed; cursor: pointer; }
.thumb .arch { text-align: center; font-size: 1.2rem; line-height: 1.1; padding: 6px; color: var(--ink-3); }
.thumb .arch span { display: block; font-size: .6rem; margin-top: 2px; }
.period { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.period input[type="date"] { width: auto; min-height: 36px; font-size: .85rem; }
.fillbar { position: relative; height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; min-width: 60px; }
.fillbar span { display: block; height: 100%; background: var(--ok); }
.fillbar.low span { background: var(--warn); } .fillbar.bad span { background: var(--seal); }
.kpi .card.warn .v { color: var(--seal); }
.stuck { border-left: 4px solid var(--warn); }
.flag { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.flag.seen { opacity: .6; }
@media (min-width: 900px) { .cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; } }
.flag .main b { white-space: normal; }

/* --- stations and several kitchens ---------------------------------------- */
.badge.bar { background: #f3e8ff; color: #6b3fa0; border-color: transparent; }
.pickers { gap: 10px; }
.seg { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seg .sub { margin-right: 2px; }

/* --- the owner's lists (008): places, item lists, people ----------------- */
.admtabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.admtabs a { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.admtabs a.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.back { display: inline-block; margin-bottom: 8px; font-size: .9rem; min-height: 32px; }
.item.off, .pick.inactive { opacity: .55; }
.item.slim { min-height: 52px; padding: 8px 12px; box-shadow: none; }
.item .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.item.place:hover { border-color: var(--ink-4); }
.chip.warnchip { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: .9rem; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }
.danger-zone { border-color: var(--line); }
.fixed { min-height: var(--tap); display: flex; align-items: center; padding: 0 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.pick { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 6px; cursor: pointer; }
.pick input, .placepick input, .cat.admin .tick input { width: 24px; height: 24px; min-height: 0; margin: 0; flex: none; }
.pick b { display: block; font-weight: 600; line-height: 1.25; }
.pick:has(input:not(:checked)) { background: var(--surface-2); }
.pick:has(input:not(:checked)) b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.pick-h .check { min-height: 32px; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); gap: 8px; }
.pick-h .check input { width: 18px; height: 18px; }
.placepick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; margin-bottom: 8px; }
.placepick .check { min-height: 40px; }
.fchips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .82rem; white-space: nowrap; }
.fchip span { font-family: var(--mono); color: var(--ink-4); font-size: .75rem; }
.fchip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.fchip.on span { color: var(--accent); }
.kitpick { display: flex; flex-wrap: wrap; gap: 6px; }
.cat.admin { grid-template-columns: auto 1fr auto; cursor: pointer; }
.cat.admin .tick { display: none; }
.selecting .cat.admin .tick { display: flex; }
.cat.admin .acts { display: flex; align-items: center; gap: 6px; }
.cat.admin .acts .chev { color: var(--ink-4); font-size: 1.2rem; }
.selecting .cat.admin .acts { display: none; }
.cat.admin .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cat.admin .chips:empty { display: none; }
.cat.admin.inactive { opacity: .6; }
.cat.admin.gone { opacity: .55; border-style: dashed; }
.cat.admin.sel { border-color: var(--accent); background: var(--accent-soft); }
.cat.admin:hover { border-color: var(--ink-4); }
.section-h span { letter-spacing: 0; }
.bulkbtns { gap: 6px; }
button.choice { justify-content: flex-start; }
.daypick .check { min-height: 40px; }
.item .main .chips span { display: inline-flex; }
.item .chips .chip { font-family: var(--sans); font-size: .74rem; min-height: 24px; padding: 2px 9px; }
@media (max-width: 600px) { .hdr > h2 { flex: 1 1 100%; } }
.item .main span.badge, .item .main span.sub { display: inline-block; }

/* --- ordering: the review before sending, the draft, "only what I picked" -- */
.search.row { gap: 8px; }
.search button.chosen { flex: none; min-height: 44px; border-radius: 999px; font-family: var(--mono); }
.review-head { margin-bottom: 10px; }
.review-head .big { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.review-list { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px 8px; max-height: 46vh; overflow-y: auto; }
.review-list .section-h { margin: 12px 0 4px; }
.rline { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.rline:last-child { border-bottom: 0; }
.rline b { font-size: 1.1rem; }
#notepeek { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.ready { border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: .9rem; }
.ready.no { background: var(--warn-soft); color: var(--warn); }
.ready.no ul { margin: 6px 0 0 18px; padding: 0; }
.ready.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.photo-btn.busy { opacity: .65; pointer-events: none; }

/* --- after signing: corrections (010) ------------------------------------------ */
.fixlist { display: grid; gap: 10px; }
.fixrow { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); }
.fixrow .nm { margin-bottom: 6px; }
.fixgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fixgrid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .fixgrid { grid-template-columns: repeat(2, 1fr); } }
.fixgrid label { font-size: 12px; color: var(--ink-3); display: flex; flex-direction: column; gap: 3px; }
.fixgrid input { width: 100%; }
.fixgrid input.changed { border-color: var(--warn); background: var(--warn-soft); font-weight: 700; }
.fixact { margin-bottom: 8px; }
.fixact .note { margin: 6px 0; }
.fixline { padding: 4px 0; border-top: 1px dashed var(--line); }
.fixline s { color: var(--ink-3); }
a.card.guidelink { display: block; text-decoration: none; color: inherit; border-left: 4px solid var(--accent); }

/* --- the role guide (010) ---------------------------------------------------------- */
.guide { max-width: 560px; margin: 0 auto; }
.guide .ghead { align-items: center; margin-bottom: 6px; }
.gdots { display: flex; gap: 6px; }
.gdots span { width: 22px; height: 6px; border-radius: 3px; background: var(--line); }
.gdots span.done { background: var(--accent-soft); }
.gdots span.on { background: var(--accent); }
.gtitle { font-size: 22px; line-height: 1.25; margin: 6px 0 10px; }
.gfig { margin: 0 0 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.glines { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; }
.gnav { display: flex; justify-content: space-between; gap: 10px; margin: 16px 0 24px; }
.gnav button { min-width: 120px; min-height: var(--tap); }
#gpush { margin: 8px 0; }
.gsvg { width: 100%; height: auto; display: block; overflow: visible; }
.gsvg text { fill: var(--ink); font-family: var(--sans); font-size: 12px; }
.gsvg .sm { font-size: 11px; } .gsvg .xs { font-size: 10px; } .gsvg .tb { font-weight: 700; }
.gsvg .t2 { fill: var(--ink-3); font-size: 10.5px; }
.gsvg .big { font-size: 20px; font-weight: 700; font-family: var(--mono); }
.gsvg .tag { fill: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.gsvg .wt { fill: #fff; }
.gsvg .neq { fill: var(--seal); font-size: 26px; font-weight: 700; }
.gsvg .bx { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.gsvg .hi { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.8; }
.gsvg .cacc { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.5; }
.gsvg .okbox { fill: var(--ok-soft); stroke: var(--ok); stroke-width: 1.5; }
.gsvg .warnbox { fill: var(--warn-soft); stroke: var(--warn); stroke-width: 1.5; }
.gsvg .sealsoft { fill: var(--seal-soft); stroke: var(--seal); stroke-width: 1.5; }
.gsvg .cok { fill: var(--ok); stroke: var(--ok); }
.gsvg .chip { fill: var(--surface-2); stroke: var(--line); }
.gsvg .phone { fill: var(--surface-2); stroke: var(--ink-3); stroke-width: 2; }
.gsvg .phone2 { fill: var(--surface); stroke: var(--ink-4); stroke-dasharray: 4 3; }
.gsvg .disp { fill: var(--ink); }
.gsvg .dispt { fill: var(--ok-soft); font-family: var(--mono); font-size: 12px; font-weight: 700; }
.gsvg .btnacc { fill: var(--accent); } .gsvg .btnok { fill: var(--ok); }
.gsvg .barok { fill: var(--ok); opacity: .85; } .gsvg .barwarn { fill: var(--seal); opacity: .75; }
.gsvg .sealbox { fill: var(--seal); }
.gsvg .ln { stroke: var(--ink-4); stroke-width: 2; fill: none; } .gsvg .lnh { fill: var(--ink-4); }
.gsvg .lnseal { stroke: var(--seal); stroke-width: 2.5; }
.gsvg .gnum circle { fill: var(--seal); } .gsvg .gnum text { fill: #fff; font-weight: 700; font-size: 11px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gsvg .btnacc { fill: #2f6db3; } :root:not([data-theme="light"]) .gsvg .btnok { fill: #2b7d5c; } }
:root[data-theme="dark"] .gsvg .btnacc { fill: #2f6db3; } :root[data-theme="dark"] .gsvg .btnok { fill: #2b7d5c; }
