:root {
  --bg: #f5f6f8; --surface: #fff; --ink: #1b1f27; --muted: #667085; --line: #e4e7ec;
  --side: #141922; --side-ink: #c9cfda; --accent: #c2410c; --accent-soft: #fff1e8;
  --ok: #15803d; --ok-soft: #e8f6ee; --warn: #b45309; --warn-soft: #fef6e4; --bad: #b42318; --bad-soft: #fdecec;
  --blue: #1d4ed8; --blue-soft: #eaf0ff; --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { display: flex; font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; color: var(--ink); background: var(--bg); }
.sidebar { width: 248px; flex: none; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; padding-bottom: 8px; }
.brand { padding: 18px 18px 10px; font-weight: 700; font-size: 18px; color: #fff; letter-spacing: .2px; }
.brand .logo { color: #f97316; }
.brand small { font-weight: 500; font-size: 10px; color: #8a93a6; text-transform: uppercase; letter-spacing: 1px; margin-left: 4px; }
nav a { display: flex; align-items: center; gap: 10px; padding: 10px 18px; color: var(--side-ink); text-decoration: none; border-left: 3px solid transparent; }
nav a i { font-style: normal; width: 18px; text-align: center; opacity: .8; }
nav a:hover { background: #1d2430; color: #fff; }
nav a.active { background: #1f2734; color: #fff; border-left-color: #f97316; }
.side-foot { margin-top: auto; padding: 16px 18px; font-size: 12px; color: #8a93a6; }
main { flex: 1; min-width: 0; padding: 26px 32px 60px; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 12px; }
h3 { margin: 0; font-size: 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.sub { color: var(--muted); margin: 4px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2, .card.flush > .card-head { padding: 16px 18px 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid2 > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.kpi .value { font-size: 26px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .hint { color: var(--muted); font-size: 12px; }
.kpi.warn .value { color: var(--warn); } .kpi.bad .value { color: var(--bad); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; background: #fafbfc; position: sticky; top: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; } tr.click:hover td { background: #fafbfc; }
tr.group td { background: #f3f4f6; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.hscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.table-wrap { overflow: auto; max-height: calc(100vh - 230px); }
.small { font-size: 12px; } .muted { color: var(--muted); } .mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.neg { color: var(--bad); } .pos { color: var(--ok); }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #c5cad3; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 8px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

input, select, textarea { font: inherit; padding: 7px 10px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: var(--ink); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid #fdba74; border-color: #f97316; }
input.qty { width: 80px; text-align: right; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.f input, label.f select, label.f textarea { color: var(--ink); font-size: 14px; }
label.chk { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: #eef0f3; color: #475467; text-transform: capitalize; }
.badge.receive { background: var(--ok-soft); color: var(--ok); }
.badge.checkout { background: var(--blue-soft); color: var(--blue); }
.badge.return { background: #eef7ff; color: #0369a1; }
.badge.empty { background: #f4f0ff; color: #6d28d9; }
.badge.waste, .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.sale { background: var(--accent-soft); color: var(--accent); }
.badge.count, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }

.parbar { width: 90px; height: 8px; background: #eef0f3; border-radius: 99px; overflow: hidden; display: inline-block; vertical-align: middle; }
.parbar > span { display: block; height: 100%; background: var(--ok); }
.parbar.low > span { background: var(--warn); } .parbar.crit > span { background: var(--bad); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; padding: 5px 12px; border-radius: 99px; cursor: pointer; font-size: 13px; white-space: nowrap; flex: none; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.bars .bar-row { display: grid; grid-template-columns: 90px 1fr 90px; gap: 10px; align-items: center; margin: 8px 0; }
.bars .track { background: #f1f2f4; height: 12px; border-radius: 99px; overflow: hidden; }
.bars .fill { background: var(--accent); height: 100%; border-radius: 99px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.spark .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.spark .u { background: #fdba74; border-radius: 3px 3px 0 0; }
.spark .s { background: var(--bad); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--c); }

/* scan station */
.station { display: grid; grid-template-columns: minmax(380px, 1.1fr) 1fr; gap: 18px; }
@media (max-width: 1100px) { .station { grid-template-columns: 1fr; } }
.modes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.mode { border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 12px 6px; text-align: center; cursor: pointer; font-weight: 600; }
.mode small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; margin-top: 2px; }
.mode.on { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 9%, white); color: var(--mc); }
.scan-input { width: 100%; font-size: 22px; padding: 16px; border-width: 2px; font-family: ui-monospace, Menlo, monospace; }
.who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: #f3f4f6; margin-bottom: 14px; }
.who.set { background: var(--ok-soft); }
.who .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; }
.last-scan { margin-top: 14px; border-radius: 10px; padding: 14px; border: 2px dashed var(--line); min-height: 86px; }
.last-scan.ok { border: 2px solid var(--ok); background: var(--ok-soft); }
.last-scan.err { border: 2px solid var(--bad); background: var(--bad-soft); }
.last-scan .big { font-size: 18px; font-weight: 700; }
video#cam { width: 100%; border-radius: 10px; background: #000; margin-top: 10px; max-height: 260px; object-fit: cover; }
.stepper { display: inline-flex; align-items: center; border: 1px solid #d0d5dd; border-radius: 8px; overflow: hidden; }
.stepper button { border: 0; background: #f3f4f6; width: 34px; height: 34px; font-size: 18px; cursor: pointer; }
.stepper input { border: 0; width: 56px; text-align: center; border-radius: 0; }

/* modal */
.modal-wrap { position: fixed; inset: 0; background: rgba(16,20,28,.45); display: grid; place-items: center; z-index: 50; padding: 20px; overscroll-behavior: contain;
  grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); } /* never let content widen the pop-up past the screen */
.modal, .modal-body, .modal form, .modal .form-grid > * { min-width: 0; }
.modal { background: #fff; border-radius: 14px; width: min(620px, 100%); max-height: 90vh; max-height: 90dvh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(920px, 100%); }
.modal header, .modal footer { padding: 16px 20px; display: flex; align-items: center; gap: 10px; }
.modal header { border-bottom: 1px solid var(--line); justify-content: space-between; }
.modal footer { border-top: 1px solid var(--line); justify-content: flex-end; }
.modal-body { padding: 18px 20px; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; }
.modal header, .modal footer { flex: none; }
body.modal-open { position: fixed; left: 0; right: 0; overflow: hidden; }
.icon.x { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--muted); }

#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 99; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: 380px; animation: pop .15s ease-out; }
.toast.err { background: var(--bad); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.empty-state { padding: 30px; text-align: center; color: var(--muted); }
.callout { background: var(--blue-soft); color: #1e3a8a; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.roadmap li { margin: 6px 0; }
.row-hl td { background: #fff7ed !important; transition: background 1s; }

@media print {
  .sidebar, .no-print, #toasts { display: none !important; }
  main { padding: 0; } .card { border: 0; }
}
#tabbar, #more-sheet { display: none; }
.phone-only { display: none; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  body { flex-direction: column; }
  .sidebar { display: none; }
  main { padding: 14px 14px calc(84px + env(safe-area-inset-bottom)); }
  .modes { grid-template-columns: repeat(3, 1fr); } .form-grid { grid-template-columns: 1fr; }
  .desk-only { display: none !important; }
  .phone-only { display: revert; }

  /* bottom tab bar */
  #tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; background: var(--side);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(0,0,0,.18); }
  #tabbar a, #tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0;
    color: #9aa3b2; text-decoration: none; background: none; border: 0; font: inherit; font-size: 11px; font-weight: 600; border-radius: 10px; }
  #tabbar i { font-style: normal; font-size: 20px; line-height: 1; }
  #tabbar .active { color: #fff; }
  #tabbar .active i { color: #f97316; }
  #tabbar .tab-scan i { background: #f97316; color: #fff !important; width: 44px; height: 30px; border-radius: 15px; display: grid; place-items: center; font-size: 18px; }
  #more-sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(16,20,28,.45); }
  #more-sheet .sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0;
    padding: 10px 10px calc(76px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
  #more-sheet a { display: grid; grid-template-columns: 36px 1fr; column-gap: 8px; padding: 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; }
  #more-sheet a i { grid-row: span 2; font-style: normal; font-size: 20px; color: var(--accent); align-self: center; text-align: center; }
  #more-sheet a small { font-weight: 400; color: var(--muted); font-size: 12px; }
  #more-sheet a.active { background: var(--accent-soft); }

  /* compact page header */
  .page-head { margin-bottom: 12px; gap: 10px; }
  .page-head h1 { font-size: 20px; }
  .page-head .sub { display: none; }
  .page-head > .row { width: 100%; }
  .page-head > .row .btn { flex: 1; justify-content: center; }
  .card { padding: 14px; margin-bottom: 12px; border-radius: 12px; }
  .kpis { gap: 10px; margin-bottom: 12px; }
  .kpi { padding: 12px; } .kpi .value { font-size: 21px; } .kpi .hint { display: none; }
}

/* photos, receiving, phone */
.thumb { border-radius: 8px; object-fit: cover; flex: none; background: #eef0f3; border: 1px solid var(--line); }
.thumb.ph { display: inline-grid; place-items: center; color: #98a2b3; font-weight: 700; }
.namecell { display: flex; align-items: center; gap: 10px; }
.photo-edit { display: flex; gap: 14px; align-items: center; }
.btn.big { padding: 12px 18px; font-size: 15px; }
.pages { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.pages .page { position: relative; }
.pages img, .pages .pdf { height: 110px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.pages .pdf { width: 86px; display: grid; place-items: center; text-align: center; background: #f3f4f6; font-weight: 700; padding: 6px; overflow: hidden; }
.pages .page button { position: absolute; top: 4px; right: 4px; padding: 1px 6px; }
table.inv input.qty { width: 74px; }
table.inv td { vertical-align: top; }
.flags { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.flags .badge { text-transform: none; }
.inv-totals { margin: 14px 0 0 auto; max-width: 420px; }
.inv-totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.inv-totals .grand { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-size: 16px; }
#reader { margin-top: 10px; border-radius: 10px; overflow: hidden; }
#reader video { border-radius: 10px; }
pre.mono { background: #f3f4f6; padding: 8px 12px; border-radius: 8px; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .btn.big { width: 100%; justify-content: center; } .station .row .btn { flex: 1; justify-content: center; } }

/* phones: pop-ups become a full-screen panel with the action buttons pinned at the bottom */
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  .modal-wrap { padding: 0; place-items: stretch; }
  .modal, .modal.wide { width: 100%; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
  .modal header { padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
  .modal footer { padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom)); flex-wrap: wrap; background: #fff; }
  .modal footer .spacer { display: none; }
  .modal footer .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
  .modal-body { padding: 14px 16px; }
  .icon.x { min-width: 44px; min-height: 44px; }
  .btn { min-height: 40px; }
  .btn.sm { min-height: 34px; padding: 6px 10px; }
  input, select, textarea { font-size: 16px !important; min-height: 40px; } /* 16px stops iPhone auto-zooming into fields (and staying zoomed): no smaller field text on phones */
  input[type=checkbox] { min-height: 0; width: 20px; height: 20px; }
  .modal table { font-size: 13px; }
}

@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  td, th { padding: 8px; }
  td.small, td.n, th { white-space: nowrap; } /* keep short columns on one line; swipe sideways to see them */
}

/* bottle measuring */
.cv-host { display: flex; justify-content: center; background: #f3f4f6; border-radius: 10px; padding: 6px; }
.level-canvas { touch-action: none; border-radius: 8px; cursor: ns-resize; max-width: 100%; }
.count-cell { display: inline-flex; gap: 6px; align-items: center; }
.total-line { font-size: 15px; margin-bottom: 4px; }
.chip.on[data-rm] { cursor: pointer; }

/* phone layouts: cards instead of wide tables */
.inv-tools #q { width: 280px; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  .grid2 .below-par { order: -1; }
  .table-wrap { max-height: none !important; } /* one scroll (the page) on phones, not boxes inside boxes */
  .inv-tools { flex-direction: column; align-items: stretch; padding: 12px !important; }
  .inv-tools #q { width: 100%; }
  .inv-tools .chips, .count-tools .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cards { display: flex; flex-direction: column; }
  .cgroup { position: sticky; top: 0; z-index: 1; background: #f3f4f6; padding: 6px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
  .icard, .ccard { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .icard:active { background: #f9fafb; }
  .ic-main { flex: 1; min-width: 0; }
  .ic-main b { display: block; line-height: 1.25; }
  .ic-qty { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 64px; }
  .ic-qty b { font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1; }
  .ic-qty small { color: var(--muted); font-size: 11px; }
  .ic-qty .parbar { width: 60px; }
  .ccard.done { background: #f6fbf8; }
  .ccard input.qty { width: 74px; height: 44px; font-size: 18px; text-align: center; }
  .ccard .btn { min-width: 44px; min-height: 44px; justify-content: center; padding: 0; }
  .count-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .count-tools .spacer { display: none; }
  .count-tools .f select, .count-tools .f input { width: 100%; }
  .savebar { position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 39; display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
  .savebar span { flex: 1; color: var(--muted); font-size: 13px; }
  .savebar .btn { min-height: 44px; padding: 0 22px; }
  main:has(.savebar) { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .txlist .tx { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .txlist .tx > .badge { flex: none; margin-top: 2px; min-width: 64px; text-align: center; }
  .tx-main { flex: 1; min-width: 0; }
  .tx-qty { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
  .modal .txlist .tx { padding: 8px 0; }
}

/* phone setup steps */
.steps { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.qr-sm { background: #fff; padding: 4px; border-radius: 6px; border: 1px solid var(--line); flex: none; width: 106px; height: 106px; }
.step-n { flex: none; width: 106px; display: grid; place-items: center; font-size: 28px; font-weight: 700; color: var(--muted); }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .qr-sm, .step-n { display: none; } }

/* bar program */
.mrow { display: grid; grid-template-columns: 32px minmax(0, 1fr) 80px 96px 64px 80px; gap: 10px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); }
.mrow small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.mrow .m-cost, .mrow .m-profit, .mrow .m-pc { text-align: right; font-variant-numeric: tabular-nums; }
.mrow .m-name .click { cursor: pointer; } .mrow .m-name .click:hover { text-decoration: underline; }
.mrow input.qty { width: 84px; }
.star { border: 0; background: none; font-size: 20px; color: #d0d5dd; cursor: pointer; padding: 0; }
.star.on { color: #f59e0b; }
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 18px; }
.idea-grid.compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 0; }
.idea { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.slow-card .idea { background: #fafbfc; }
.idea.missing { opacity: .75; }
.idea-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 15px; }
.idea-ing { margin: 6px 0; padding-left: 18px; font-size: 13px; flex: 1; }
.idea-ing li { margin: 2px 0; }
.idea-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.cost-box { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; padding: 12px; background: #f6f7f9; border-radius: 10px; }
.cost-box small { display: block; font-size: 11px; color: var(--muted); }
.cost-box b { font-size: 17px; }
h3.sec { font-size: 14px; margin: 18px 0 8px; }
.pantry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tsel { font-size: 12px; padding: 4px 6px; max-width: 190px; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  .mrow { grid-template-columns: 28px minmax(0, 1fr) 84px; grid-template-areas: "star name price" "star cost pc"; padding: 10px 14px; row-gap: 6px; }
  .mrow .star { grid-area: star; } .mrow .m-name { grid-area: name; } .mrow .m-price { grid-area: price; }
  .mrow .m-cost { grid-area: cost; text-align: left; display: flex; gap: 6px; align-items: baseline; }
  .mrow .m-pc { grid-area: pc; display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
  .mrow .m-profit { display: none; }
  .mrow .m-cost small, .mrow .m-pc small { display: inline; }
  .cost-box { grid-template-columns: 1fr 1fr; }
  .idea-grid { grid-template-columns: 1fr; }
}
.slow-tabs .chip { padding: 8px 14px; font-size: 14px; }
.slow-tabs .chip span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.slow-tabs .chip.on span { color: #cbd5e1; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .slow-cfg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .slow-tabs { flex-wrap: nowrap; overflow-x: auto; } }

/* tags */
.tags { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
.ic-main .tags { display: flex; margin: 3px 0 2px; }
.tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; line-height: 18px; white-space: nowrap; background: #f1f2f4; color: #475467; border: 1px solid transparent; }
.tag.well { background: #e7efff; color: #1d4ed8; }
.tag.menu { background: #fff1e8; color: #c2410c; }
.tag.backbar { background: #f1f2f4; color: #667085; }
.tag.custom { background: #fff; color: #344054; border-color: #d0d5dd; }
.tag.custom button { border: 0; background: none; color: #98a2b3; cursor: pointer; padding: 0 0 0 2px; font-size: 11px; }
.tag-filter { padding: 0 18px 12px; align-items: center; }
.chip.tagchip-well.on { background: #1d4ed8; border-color: #1d4ed8; }
.chip.tagchip-menu.on { background: #c2410c; border-color: #c2410c; }
.chip.tagchip-backbar.on { background: #667085; border-color: #667085; }
.tag-edit { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.tag-edit-title { font-size: 12px; font-weight: 600; color: var(--muted); }
.tag-toggle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; }
.tag-toggle input { width: 18px; height: 18px; }
.tag-custom { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag-custom #tag-list { display: contents; }
.tag-custom input { flex: 1; min-width: 180px; font-size: 13px; padding: 5px 9px; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .tag-filter { padding: 0 12px 10px; flex-wrap: nowrap; overflow-x: auto; } }
/* custom tag colors + pickers */
.tag.c-gray { background: #f2f4f7; color: #344054; border-color: #d0d5dd; }
.tag.c-green { background: #e8f6ee; color: #15803d; border-color: #a6e0bd; }
.tag.c-purple { background: #f4f0ff; color: #6d28d9; border-color: #d5c6fb; }
.tag.c-pink { background: #fdf0f6; color: #be185d; border-color: #f7c1da; }
.tag.c-teal { background: #e6f7f7; color: #0f766e; border-color: #a7e0dc; }
.tag.c-amber { background: #fff7e6; color: #b45309; border-color: #f5d18c; }
.tag.pick { cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; padding: 4px 11px; opacity: .55; }
.tag.pick.on { opacity: 1; box-shadow: inset 0 0 0 1.5px currentColor; }
.tag-defs { display: flex; flex-direction: column; gap: 2px; }
.tdef { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tdef .tag { min-width: 96px; justify-content: center; }
.color-pick { cursor: pointer; padding: 4px 10px; text-transform: capitalize; }
.color-pick input { margin: 0 4px 0 0; }
/* default (built-in) tags in all caps */
.tag.well, .tag.menu, .tag.backbar, .chip.tagchip-well, .chip.tagchip-menu, .chip.tagchip-backbar { text-transform: uppercase; letter-spacing: .4px; }
/* deals & velocity */
.tag.deal { background: #e8f6ee; color: #15803d; text-transform: uppercase; letter-spacing: .4px; }
.chip.tagchip-deal { text-transform: uppercase; letter-spacing: .4px; } .chip.tagchip-deal.on { background: #15803d; border-color: #15803d; }
.deal-note { font-size: 12px; margin-top: 3px; }
.vel { font-size: 11px; font-weight: 700; }
.vel.up { color: #c2410c; } .vel.down { color: #1d4ed8; }
.deal-edit { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.deal-edit summary { cursor: pointer; display: flex; gap: 8px; align-items: center; list-style: none; }
.deal-edit summary::before { content: "▸"; color: var(--muted); } .deal-edit[open] summary::before { content: "▾"; }
.deal-sum { background: #f6f7f9; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.deal-sum:empty { display: none; }
/* trends */
.trow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.badge.hot { background: #fff1e8; color: #c2410c; }
.badge.cold { background: #eaf0ff; color: #1d4ed8; }
th.sortable { cursor: pointer; user-select: none; } th.sortable.on { color: var(--ink); }
/* item window sections + rep card */
h4.sec-h { grid-column: 1 / -1; margin: 6px 0 -4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.rep-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #f6f7f9; border-radius: 10px; padding: 8px 12px; }
.rep-card:empty { display: none; }
.rep-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.contact-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sup-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.sup-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sup-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 2px 4px 2px 12px; font-size: 13px; }
.spell-hint { color: var(--blue); font-weight: 500; } .spell-hint:empty { display: none; }

/* back bar planogram */
.bb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.bb-card { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px; cursor: pointer; font: inherit; }
.bb-card img, .bb-card .bb-ph { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; background: #2b2118; color: #c9a77c; display: grid; place-items: center; font-size: 36px; }
.bb-stage-card { padding: 10px; }
.bb-stage { position: relative; width: 100%; background-size: 100% 100%; background-color: #1e1712; border-radius: 10px; overflow: hidden; user-select: none; touch-action: pan-y; }
.bb-stage.no-photo { background: linear-gradient(#2b2118, #1a140f); }
.bb-line { position: absolute; left: 0; right: 0; height: 0; border-top: 3px solid rgba(249, 115, 22, .85); pointer-events: auto; }
.bb-stage.no-photo .bb-line { border-top: 10px solid #6b4f36; box-shadow: 0 4px 6px rgba(0,0,0,.4); }
.bb-line span { position: absolute; right: 8px; top: -22px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 1px 7px; border-radius: 99px; white-space: nowrap; cursor: pointer; }
.bb-stage.no-photo .bb-line span { top: -24px; }
.bb-drop { position: absolute; left: 0; right: 0; }
.bb-drop.over { background: rgba(249, 115, 22, .18); outline: 2px dashed rgba(249, 115, 22, .8); }
.bb-bottle { position: absolute; display: flex; flex-direction: column; justify-content: flex-end; cursor: grab; touch-action: none; z-index: 2; }
.bb-bottle img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px 6px 3px 3px; box-shadow: 0 3px 8px rgba(0,0,0,.45); background: #fff; }
.bb-shape { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
  background: linear-gradient(90deg, #8a6a3e, #d8b77a 45%, #8a6a3e); clip-path: polygon(38% 0, 62% 0, 62% 18%, 90% 32%, 90% 100%, 10% 100%, 10% 32%, 38% 18%); }
.bb-shape span { font-size: 9px; font-weight: 700; color: #2b1d0e; text-align: center; line-height: 1.1; padding: 0 14%; overflow: hidden; max-height: 40%; }
.bb-label { position: absolute; left: -10%; right: -10%; bottom: -16px; font-size: 9px; line-height: 1.1; color: #fff; text-align: center; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-bottle.sel img, .bb-bottle.sel .bb-shape { outline: 3px solid #f97316; outline-offset: 2px; }
.bb-ghost { position: fixed; z-index: 100; pointer-events: none; opacity: .9; transform: scale(1.06); }
.bb-ghost.bb-chip { width: auto !important; height: auto !important; }
.bb-tray { display: flex; flex-wrap: wrap; gap: 6px; min-height: 60px; border-radius: 10px; padding: 4px; }
.bb-tray.over { background: #fff7ed; outline: 2px dashed #f97316; }
.bb-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px 3px 3px; font-size: 12px; background: #fff; cursor: grab; touch-action: none; }
.bb-chip.sel { border-color: #f97316; box-shadow: 0 0 0 2px #fdba74; }
.staples { display: flex; flex-wrap: wrap; gap: 6px; }
.staple { font-size: 12px; padding: 3px 9px; border-radius: 99px; }
.staple.ok { background: var(--ok-soft); color: var(--ok); } .staple.warn { background: var(--warn-soft); color: var(--warn); } .staple.miss { background: var(--bad-soft); color: var(--bad); }
/* cut-out (background removed) bottle photos */
.thumb.cut { object-fit: contain; background: #f6f7f9; padding: 2px; }
.bb-bottle img.cut { object-fit: contain; object-position: bottom; background: none; box-shadow: none; border-radius: 0; filter: drop-shadow(0 3px 4px rgba(0,0,0,.55)); }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  .bb-line span, .bb-stage.no-photo .bb-line span { top: 4px; right: 6px; font-size: 10px; padding: 0 6px; }
  .bb-stage.no-photo .bb-line span { top: 12px; }
  .bb-label { display: none; }
}
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .bb-line.last span, .bb-stage.no-photo .bb-line.last span { top: -20px; } }
.fee-rows { display: flex; flex-direction: column; gap: 2px; max-width: 520px; }
.fee-row { display: grid; grid-template-columns: minmax(110px, 1fr) 140px 110px 36px; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.fee-row.head { border-bottom: 0; padding-bottom: 0; }
.fee-row input { width: 100%; } .fee-row select { width: 100%; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .fee-row { grid-template-columns: 1fr 1fr 0.9fr 32px; gap: 6px; } }
.tier { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.tier-sizes { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 6px; }
/* contacts */
.sup-team:empty { display: none; }
.team-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.team-row > div:first-child { flex: 1; min-width: 150px; }
.link-btn { border: 0; background: none; color: var(--blue); cursor: pointer; padding: 6px 0; font: inherit; text-align: left; }
.clist { max-height: 420px; overflow: auto; }
.cgroup-h { font-weight: 700; margin: 12px 0 2px; display: flex; gap: 6px; align-items: center; }
.cgroup-h:first-child { margin-top: 0; }
.cutoff { font-size: 12px; font-weight: 500; color: var(--muted); background: #f3f4f6; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.cutoff.soon { background: var(--warn-soft); color: var(--warn); }
h2 .cutoff { margin-left: 6px; vertical-align: middle; }
/* order cutoff banner */
#cutoff-banner { position: fixed; top: 0; left: 248px; right: 0; z-index: 30; background: #fff7e6; border-bottom: 2px solid #f59e0b; color: #7c4a03; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
#cutoff-banner.urgent { background: #fdecec; border-color: var(--bad); color: #7a1610; }
.cb-row { display: flex; align-items: center; gap: 8px; padding: 8px 18px; flex-wrap: wrap; font-size: 14px; }
.cb-row + .cb-row { border-top: 1px solid rgba(0,0,0,.06); }
.cb-left { font-weight: 600; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  #cutoff-banner { left: 0; }
  .cb-row { padding: 8px 12px; font-size: 13px; }
}
/* top bar + account */
#topbar { position: fixed; top: 0; left: 248px; right: 0; height: 52px; z-index: 31; display: flex; align-items: center; padding: 0 18px; background: rgba(245,246,248,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
main { padding-top: 76px; }
#cutoff-banner { top: 52px; }
#acct-btn { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 14px 4px 4px; cursor: pointer; font: inherit; max-width: 320px; }
#acct-btn:hover { border-color: #c5cad3; }
#acct-menu { position: fixed; z-index: 60; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.16); padding: 6px; }
#acct-menu .acct-head { padding: 8px 8px 10px; margin: 0 0 4px; border-bottom: 1px solid var(--line); }
#acct-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; font: inherit; text-align: left; padding: 11px 10px; border-radius: 8px; cursor: pointer; color: inherit; }
#acct-menu button .muted { margin-left: auto; }
#acct-menu button:hover, #acct-menu button:focus-visible { background: #f3f4f6; }
.acct-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; min-width: 0; }
.acct-text b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-text small { font-size: 11px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--side); color: #f97316; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.acct-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.tb-brand { font-weight: 700; font-size: 17px; } .tb-brand .logo { color: #f97316; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  #topbar { left: 0; height: 50px; padding: 0 12px; background: var(--side); border-bottom: 0; }
  .tb-brand { color: #fff; }
  #acct-btn { padding: 3px; border-color: #2c3442; background: #1d2430; }
  #acct-btn .acct-text { display: none; }
  main { padding-top: 64px; }
  #cutoff-banner { top: 50px; }
}
/* rearrangeable cards */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.dash-grid > * { margin: 0 !important; min-width: 0; }
.dash-grid > .span-2 { grid-column: 1 / -1; }
.dash-grid > .kpis { margin: 0; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .dash-grid { gap: 12px; } }
.grid2[data-sortable] { align-items: start; }
.masonry { grid-auto-rows: 2px; row-gap: 0 !important; align-items: start; }
.masonry > * { margin-bottom: 0 !important; }
.movable { position: relative; }
.drag-handle { position: absolute; top: 6px; right: 6px; z-index: 3; width: 28px; height: 28px; border: 0; background: transparent; color: #98a2b3; font-size: 16px; line-height: 1; border-radius: 6px; cursor: grab; touch-action: none; opacity: .45; }
.movable:hover > .drag-handle, .drag-handle:focus-visible { opacity: 1; background: #f3f4f6; }
.movable.dragging { opacity: .85; outline: 2px dashed #f97316; outline-offset: 2px; box-shadow: 0 12px 30px rgba(0,0,0,.15); }
.movable.dragging > .drag-handle { cursor: grabbing; opacity: 1; }
.movable > .card-head { padding-right: 34px; }
.card.movable > h2:first-of-type { padding-right: 30px; }
.kpis.movable { padding-top: 0; }
.kpis.movable > .drag-handle { top: -4px; right: -4px; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .drag-handle { opacity: .6; } }

/* Vendors page: vendor → reps (division pill + one Contact button), supplier partners */
.page-search { width: 100%; margin: 0 0 16px; }
.vgroup { padding: 4px 0 10px; }
.vgroup + .vgroup { border-top: 1px solid var(--line); padding-top: 12px; }
.vg-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.vg-h .link-btn { font-weight: 600; font-size: 15px; color: inherit; }
.rep-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.rr-who { flex: 1; min-width: 0; }
.rr-who .small { margin-top: 1px; }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; background: #f3f4f6; color: #475467; flex: none; }
.main-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #16a34a; margin-left: 6px; vertical-align: 2px; }
.div-pill { position: relative; font-size: 12px; padding: 3px 10px; border-radius: 99px; background: #f3f4f6; color: #475467; cursor: default; white-space: nowrap; outline: none; }
.div-pill:hover, .div-pill:focus-visible, .div-pill.open { background: #e8ebf0; }
.div-pop { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; max-width: 260px; white-space: normal; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 10px 12px; font-size: 13px; color: #1b1f27; line-height: 1.45; }
.div-pill:hover .div-pop, .div-pill:focus-visible .div-pop, .div-pill.open .div-pop { display: block; }
.dp-list { display: block; margin-top: 6px; color: #475467; }
.gap-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: #667085; }
.pt-group + .pt-group { margin-top: 12px; }
.pt-sup { font-size: 13px; font-weight: 600; color: #475467; margin-bottom: 2px; }
.pt-row { display: flex; align-items: center; gap: 10px; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); }
.pt-who { flex: 1; min-width: 0; }
.pt-who .link-btn { color: inherit; }
.pt-direct { font-size: 12px; color: #15803d; }
.pop-menu { position: fixed; z-index: 70; width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.16); padding: 6px; }
.pop-menu .pm-h { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop-menu a, .pop-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; font: inherit; color: inherit; text-decoration: none; text-align: left; padding: 10px; border-radius: 8px; cursor: pointer; }
.pop-menu a span, .pop-menu button span { margin-left: auto; color: #98a2b3; font-size: 12px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-menu a:hover, .pop-menu button:hover { background: #f3f4f6; }
.add-pick { display: grid; gap: 10px; }
.add-pick .btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; text-align: left; height: auto; }
.div-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.db-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.db-rep { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .rep-row { gap: 10px; } .div-pop { right: auto; left: 0; } }
.ven-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.ven-row + .ven-row { border-top: 1px solid var(--line); }
.vr-who { flex: 1; min-width: 0; }
.vr-who .link-btn { color: inherit; font-size: 15px; }
.vr-divs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vr-divs .div-pop { right: auto; left: 0; }
.rr-who .link-btn { color: inherit; }
.chip-x { border: 0; background: none; padding: 0 0 0 4px; font: inherit; color: inherit; cursor: pointer; opacity: .7; }
.chip-x:hover { opacity: 1; }
.brand-add { flex: 1; min-width: 160px; }
.div-box .sup-picks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Sign-in, bar picker and admin console: full-page screens without the app's navigation */
body.authing .sidebar, body.authing #topbar, body.authing #tabbar, body.authing #more-sheet, body.authing #cutoff-banner, body.authing #support-bar { display: none !important; }
body.authing #main { padding-top: 0 !important; margin-left: 0; max-width: none; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 0; }
.auth-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: 0 20px 50px rgba(17,24,39,.08); }
.auth-card h1 { font-size: 24px; margin: 18px 0 6px; }
.auth-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.auth-brand .logo { color: var(--accent, #ea580c); }
.auth-form { display: grid; gap: 12px; margin-top: 16px; }
.auth-form .f input { width: 100%; }
.auth-err { background: #fef2f2; color: #b91c1c; border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.bar-pick { display: grid; gap: 8px; margin-top: 14px; }
.bar-pick .btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; height: auto; text-align: left; }
.bar-pick .btn.on { border-color: var(--accent, #ea580c); }
.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 18px 0 40px; }
.admin-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.adm-table td { vertical-align: middle; }
.nowrap { white-space: nowrap; }
.nowrap .btn + .btn { margin-left: 4px; }
.setup-bar { display: inline-block; width: 70px; height: 6px; border-radius: 99px; background: #eef0f3; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.setup-bar span { display: block; height: 100%; background: #16a34a; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.audit { display: grid; gap: 6px; }
.link-box input { font: 13px ui-monospace, Menlo, monospace; }
#support-bar { position: fixed; top: 52px; left: 248px; right: 0; z-index: 30; background: #1e293b; color: #fff; padding: 8px 18px; font-size: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#support-bar[hidden] { display: none; }
#support-bar .btn { margin-left: auto; }
body:has(#support-bar:not([hidden])) #main { padding-top: 112px; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { #support-bar { top: 50px; left: 0; padding: 8px 12px; } }
/* account menu additions */
.menu-sep { border-top: 1px solid var(--line); margin: 6px 0; }
.menu-who { padding: 4px 10px 6px; }
/* plan locks */
[data-page].locked::after { content: "🔒"; font-size: 11px; margin-left: 6px; opacity: .7; }
.locked-card { text-align: center; padding: 40px 24px; max-width: 560px; margin: 20px auto; }
.locked-card .lock-ico { font-size: 34px; }
.locked-card h2 { margin: 10px 0 8px; }
/* roles: staff don't see Settings */
body.role-staff [data-page="settings"] { display: none !important; }
/* getting-started checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.checklist li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cbd2dc; display: grid; place-items: center; font-size: 13px; color: #fff; }
.checklist li.done .ck { background: #16a34a; border-color: #16a34a; }
.checklist li.done b { color: #667085; text-decoration: line-through; text-decoration-color: #cbd2dc; }

/* quick setup */
.q-card { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fcfcfd; }
.q-card h3 { margin: 6px 0 10px; }
.q-src { font-size: 13px; color: #667085; margin-bottom: 8px; }
.q-src.ok { color: #15803d; }
.q-howmany input { font-size: 18px; }

/* shared iPad lock screen */
.lock-card { width: min(560px, 100%); }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.who { display: flex; align-items: center; gap: 10px; padding: 12px; height: auto; font-size: 16px; justify-content: flex-start; }
.pin-who { font-weight: 600; font-size: 20px; text-align: center; }
.pin-dots { font-size: 24px; letter-spacing: 8px; margin: 8px 0 12px; text-align: center; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.pin-key { height: 60px; font-size: 22px; }
body.device [data-page="settings"], body.device [data-page="vendors"], body.device [data-page="sales"] { display: none !important; }
/* bar devices: which bar and which device, always on screen */
.dev-strip { background: #1e293b; color: #fff; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 15px; }
.dev-strip .muted { color: #cbd5e1; }
.dev-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dev-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 120px; border: 1px solid var(--line); border-radius: 14px;
            background: var(--card, #fff); font: inherit; font-size: 17px; font-weight: 600; color: var(--ink); cursor: pointer; }
.dev-tile:active { transform: scale(.98); }
.dt-ico { font-size: 34px; line-height: 1; }
#dev-bar { position: fixed; top: 52px; left: 248px; right: 0; z-index: 30; background: #1e293b; color: #fff; padding: 6px 18px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
#dev-bar .dv-name { color: #cbd5e1; }
#dev-bar .btn { background: #fff; color: #1e293b; }
body:has(#dev-bar) #main { padding-top: 104px; }
body.authing #dev-bar { display: none; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { #dev-bar { top: 50px; left: 0; padding: 6px 12px; } #dev-bar .dv-name { display: none; } }
.pair-box { text-align: center; margin-top: 14px; }
.pair-code { font-size: 40px; font-weight: 700; letter-spacing: 6px; margin: 6px 0; }
.adm-tabs { margin: 0 0 0 12px; }
.adm-tabs button { padding: 6px 12px; }
.attn-card { border-left: 4px solid #f59e0b; border-radius: 0 12px 12px 0; }
.attn-card.ok { border-left-color: #16a34a; }
.attn-card h2 { margin-bottom: 8px; }
.attn-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; }
.attn-row + .attn-row { border-top: 1px solid var(--line); }
.attn-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.attn-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; vertical-align: 1px; }
.backups { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; margin-top: 8px; }
/* barcode scanner */
.scan-cam { width: 100%; max-width: 480px; min-height: 120px; margin: 10px auto; border-radius: 12px; overflow: hidden; background: #0b0f14; }
.scan-cam video { width: 100% !important; display: block; }
.scan-alts { margin: 10px 0; }
.found-note { font-size: 14px; padding: 10px 12px; border-radius: 10px; background: #f3f4f6; color: #475467; }
.found-note.ok { background: #ecfdf3; color: #166534; }
.add-pick .add-scan { border-color: var(--accent, #ea580c); }
/* scan registered: big, green, unmissable */
.scan-ok { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 10px; text-align: center; animation: scan-pop .25s ease-out; }
.scan-ok.compact { flex-direction: row; justify-content: flex-start; gap: 14px; text-align: left; padding: 14px 0; }
.scan-ok-mark { width: 72px; height: 72px; border-radius: 50%; background: #16a34a; color: #fff; font-size: 40px; line-height: 72px; font-weight: 700; box-shadow: 0 0 0 8px #dcfce7; }
.scan-ok.compact .scan-ok-mark { width: 52px; height: 52px; line-height: 52px; font-size: 28px; flex: none; }
.scan-ok-title { font-size: 20px; font-weight: 700; color: #15803d; }
.scan-ok-code { font-size: 18px; letter-spacing: 1px; }
@keyframes scan-pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
input.just-scanned { animation: field-flash 1.6s ease-out; border-color: #16a34a; }
@keyframes field-flash { 0%, 30% { background: #dcfce7; box-shadow: 0 0 0 3px #86efac; } 100% { background: inherit; box-shadow: none; } }
.scan-cam.scan-flash { animation: cam-flash .7s ease-out; }
@keyframes cam-flash { 0% { box-shadow: 0 0 0 6px #22c55e; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .scan-ok, input.just-scanned, .scan-cam.scan-flash { animation: none; } }
.q-photo { display: flex; gap: 12px; align-items: center; margin: 4px 0 12px; }
.q-photo .thumb { width: 64px; height: 64px; display: inline-grid; place-items: center; }
.ok-text { color: #15803d; margin-bottom: 6px; }
.cat-shot { display: grid; justify-items: center; gap: 4px; }
.cat-shot .thumb { width: 72px; height: 72px; }
.cat-shot.official { padding-right: 18px; border-right: 1px solid var(--line); }
.why { color: #0e6b74; }
/* combo deals on the order screen */
.combos { padding: 0 18px 6px; display: grid; gap: 10px; }
.combo-card { border: 1.5px dashed #c7d2fe; border-radius: 12px; padding: 12px 14px; background: #fafaff; }
.combo-card.on { border-style: solid; border-color: #16a34a; background: #f6fef9; }
.combo-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.combo-t td { padding: 6px 0; }
.badge.combo { background: #eef2ff; color: #4338ca; }
tr.combo-short td { background: #fff7ed; }
tr.combo-row td { background: #f3f4f6; font-size: 13px; }
.cb-line { display: grid; grid-template-columns: minmax(0, 2.2fr) 90px minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cb-line label { display: grid; gap: 2px; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .cb-line { grid-template-columns: 1fr 1fr; } .cb-line select { grid-column: 1 / -1; } }
.send-to { display: grid; gap: 6px; }
.send-pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.send-btns { margin-top: 10px; }
#po-msg { width: 100%; font: 13px ui-monospace, Menlo, monospace; }
.tier-row { display: grid; grid-template-columns: 100px minmax(0, 180px) auto; gap: 8px; align-items: end; padding: 4px 0; }
.tier-row label { display: grid; gap: 2px; }
.tier-sum { font-size: 14px; }
.tier-sum tr.best td { background: #f0fdf4; font-weight: 600; }
.deal-combos { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
/* new order: browse on the left, the order on the right (stacked on phones) */
.ob-top { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.ob-top #ob-q { flex: 1; min-width: 180px; }
.ob-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .ob-cols { grid-template-columns: minmax(0, 1fr); } }
.ob-list { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.ob-group { position: sticky; top: 0; background: #f3f4f6; font-size: 12px; font-weight: 600; color: #475467; padding: 5px 10px; z-index: 1; }
.ob-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.ob-item.in { background: #f0fdf4; }
.ob-name { flex: 1; min-width: 0; }
.ob-add { display: flex; gap: 4px; flex: none; }
.ob-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ob-qty { display: flex; align-items: center; gap: 4px; }
.ob-qty input { width: 56px; }
.ob-price input { width: 72px; }
.ob-total { text-align: right; padding-top: 8px; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .ob-line { grid-template-columns: minmax(0, 1fr) auto; } .ob-line .ob-name { grid-column: 1 / -1; } }
.deal-txt { color: #0e6b74; font-weight: 600; }
/* small remove button for rows (tiers, combo lines, order lines, fees): no box, red on hover */
.x-btn { width: 26px; height: 26px; flex: none; border: 0; border-radius: 50%; background: transparent; color: #98a2b3; font-size: 20px; line-height: 1; cursor: pointer; padding: 0; align-self: center; }
.x-btn:hover, .x-btn:focus-visible { background: #fee2e2; color: #b91c1c; }
@media (pointer: coarse) { .x-btn { width: 34px; height: 34px; } }
.tier-row, .cb-line { align-items: end; }
.tier-row .x-btn, .cb-line .x-btn { align-self: end; margin-bottom: 7px; }
.budget-card { border-left: 4px solid #16a34a; border-radius: 0 12px 12px 0; }
.budget-card.warn { border-left-color: #f59e0b; }
.budget-why { color: #92400e; }
.xline { display: grid; grid-template-columns: minmax(0, 1.6fr) 80px minmax(0, 1.3fr) 64px auto; gap: 8px; align-items: end; padding: 4px 0; }
.xline [name=newname] { grid-column: 1 / -1; grid-row: 2; }
.xline label { display: grid; gap: 2px; }
.xline label .row input { width: 70px; }
.xline .xcost { text-align: right; align-self: center; padding-top: 14px; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .xline { grid-template-columns: 1fr 1fr; } .xline select[name=name] { grid-column: 1 / -1; } }
.feat-row { gap: 8px; margin-top: 10px; align-items: center; }
.tag-toggle.feat { padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; }
.badge.feat-slow { background: #fef3c7; color: #92400e; }
.badge.feat-hot { background: #fee2e2; color: #b91c1c; }
.badge.feat-core { background: #e0e7ff; color: #3730a3; }

/* invoice review + recap */
.line-meta { display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.line-meta select, .line-meta input { font-size: 12px; padding: 3px 6px; }
tr.credit-line td { background: #fafafa; }
.recap h3 { font-size: 14px; margin: 18px 0 8px; }
.recap-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.recap-kpis > div, .keg-row > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.recap-kpis b, .keg-row b { font-size: 18px; font-variant-numeric: tabular-nums; }
.lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.warnbox { background: var(--warn-soft) !important; border-color: #f5d9a8 !important; }
.pchanges { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pchange { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.pchange:first-child { border-top: 0; }
.pc-num { text-align: right; font-variant-numeric: tabular-nums; }
.pc { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.pc.up { background: var(--bad-soft); color: var(--bad); }
.pc.down { background: var(--ok-soft); color: var(--ok); }
.pc.same { background: #eef0f3; color: #667085; }
.pc.new { background: var(--blue-soft); color: var(--blue); font-size: 10px; }
.recap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 24px; }
.keg-row { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.keg-row > div:first-child { border: 0; background: none; padding-left: 0; }
.keg-due { background: var(--warn-soft); border-radius: 8px; padding: 6px 8px; }
#bevcost .chip { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
@media (max-width: 700px) {
  .keg-row { grid-template-columns: 1fr 1fr; }
  .keg-row > div:first-child { grid-column: 1 / -1; }
  .pchange { grid-template-columns: 36px 1fr; }
  .pc-num { grid-column: 2; text-align: left; }
}
.badge.nocap { text-transform: none; }

/* inventory: category / subcategory totals */
.inv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.inv-kpis .kpi.click { cursor: pointer; } .inv-kpis .kpi.click:hover { border-color: var(--accent); }
.kpi .value.sm { font-size: 18px; line-height: 1.6; }
.inv-view { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 0 18px 10px; }
.f-inline { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.switch { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.inv-table tr.group.cat td { background: #eceef2; color: var(--ink); font-size: 13px; text-transform: none; letter-spacing: 0; cursor: pointer; border-top: 2px solid var(--line); }
.inv-table tr.group.cat td.n { font-variant-numeric: tabular-nums; }
.inv-table tr.group.sub td { background: #f7f8fa; color: #344054; font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.inv-table tr.group.sub td:first-child { padding-left: 34px; }
.inv-table tr.group.total td { background: var(--ink); color: #fff; text-transform: none; letter-spacing: 0; font-size: 13px; }
.inv-table .fold { display: inline-block; width: 14px; color: var(--muted); }
.spot { font-size: 12px; font-weight: 500; margin-left: 8px; padding: 0; text-transform: none; }
.cgroup.cat, .cgroup.sub { display: flex; justify-content: space-between; gap: 8px; text-transform: none; letter-spacing: 0; }
.cgroup.cat { color: var(--ink); font-size: 13px; cursor: pointer; }
.cgroup.sub { background: #f7f8fa; font-weight: 600; padding-left: 26px; position: static; }
.inv-table tr.group td:first-child { white-space: nowrap; }
@media (hover: hover) { .inv-table tr.group .spot { visibility: hidden; } .inv-table tr.group:hover .spot { visibility: visible; } }

/* requisitions */
.rq-h { font-size: 14px; margin: 18px 0 8px; display: flex; gap: 8px; align-items: center; }
.rq-card { margin-bottom: 10px; }
.rq-top { display: flex; justify-content: space-between; gap: 12px; }
.rq-val { text-align: right; white-space: nowrap; }
.rq-lines { margin-top: 6px; color: #344054; }
.warn-txt { color: var(--warn); }
.rq-level { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; cursor: pointer; }
.rq-level.on { border-color: var(--accent); background: var(--accent-soft); }
.rb-sug { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.stepper { display: inline-flex; gap: 4px; align-items: center; }
.stepper .qty { width: 60px; text-align: center; }
tr.pk-done td { background: var(--ok-soft); }
tr.rq-exc td { background: var(--bad-soft); }
.rq-log { border-left: 2px solid var(--line); margin: 8px 0 12px 6px; padding-left: 14px; }
.rq-ev { position: relative; display: flex; gap: 8px; padding: 6px 0; }
.rq-dot { position: absolute; left: -21px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.rq-dot.bad { background: var(--bad); }
.bp-list { max-height: 55vh; overflow: auto; }
.bp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.bp-row .qty { width: 70px; }
.badge.requisition, .badge.req_in { background: var(--blue-soft); color: var(--blue); }
.badge.req_out { background: var(--warn-soft); color: var(--warn); }
.badge.req_missing { background: var(--bad-soft); color: var(--bad); }
.spot-tag { display: inline-block; font-size: 11px; font-weight: 700; background: var(--ink); color: #fff; border-radius: 4px; padding: 1px 6px; margin-right: 4px; }
@media (max-width: 700px) { .ph-hide { display: none; } .stepper .qty { width: 46px; } }
.scan-locs { gap: 8px; align-items: flex-end; } .loc-arrow { padding-bottom: 8px; color: var(--muted); font-weight: 700; }
/* requisition builder menu */
.rb-top { align-items: flex-end; } .rb-top #rb-q { flex: 1; min-width: 160px; }
.rb-cats { margin-top: 12px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.rb-subs { margin-top: 8px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.chip.sm { padding: 3px 10px; font-size: 12px; }
.chip .cnt { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; margin-left: 2px; }
.rb-menu { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rb-sub-h { background: #f3f4f6; padding: 6px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.rb-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); cursor: pointer; user-select: none; min-height: 56px; }
.rb-item:first-child { border-top: 0; }
.rb-item.on { background: var(--accent-soft); }
.rb-name { flex: 1; min-width: 0; }
.rb-add { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--accent); flex: none; }
.rb-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 12px 10px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
@media (max-width: 700px) { .rb-bar { bottom: 76px; } .rb-item .stepper .btn { min-width: 36px; min-height: 36px; } }
.rb-search { display: flex; gap: 6px; flex: 1; min-width: 200px; } .rb-search input { flex: 1; min-width: 0; }

/* Station hub */
.st-wrap { max-width: 900px; }
.st-sec { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.st-sec:first-child { margin-top: 0; }
.st-sec h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.st-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.st-tile { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer; font: inherit; color: inherit; min-height: 84px; }
.st-tile:hover { border-color: var(--accent); }
.st-tile.hot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.st-tile.recv { background: var(--ok-soft); border-color: #b7e2c6; }
.st-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 22px; flex: none; }
.st-tile.recv .st-ic { background: var(--ok); }
.st-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-txt b { font-size: 16px; }
.st-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.badge.accent { background: var(--accent); color: #fff; }
.st-go { font-size: 26px; color: var(--muted); }
.st-foot { margin-top: 14px; font-size: 13px; }
.station-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.station-head h1 { margin: 0; font-size: 22px; } .station-head .sub { margin: 2px 0 0; }
/* quick scan, phone-first */
.qs .modes { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; grid-template-columns: none; }
.qs .mode { flex: 1 0 auto; min-width: 92px; font: inherit; font-weight: 600; }
.qs .scan-locs { margin: 4px 0 12px; }
.qs-cam { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.qs-qty { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (max-width: 700px) {
  .station-head { gap: 6px; }
  .qs-cam .btn { flex: 1; justify-content: center; }
  .qs-qty { margin-left: 0; width: 100%; justify-content: space-between; }
  .scan-input { font-size: 18px; padding: 12px; }
  .scan-locs .f { flex: 1; min-width: 0; } .scan-locs select { width: 100%; }
  .loc-arrow { display: none; }
}
.station > * { min-width: 0; }
@media (max-width: 1100px) { .station { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .station-head { flex-direction: column; align-items: flex-start; }
  .qs .who { flex-wrap: wrap; } .qs .who select { width: 100%; }
}
@media (max-width: 700px) { .qs .modes { display: grid; grid-template-columns: repeat(2, 1fr); overflow: visible; } .qs .mode { min-width: 0; padding: 10px 4px; } }
.modal-body > h4.sec-h:first-child, .modal-body > .callout + h4.sec-h { border-top: 0; padding-top: 0; } .modal-body h4.sec-h { margin: 16px 0 6px; }
/* item history */
tr.tx-undone td { text-decoration: line-through; color: var(--muted); }
.hx-weeks { display: flex; gap: 4px; align-items: flex-end; height: 160px; overflow-x: auto; padding-bottom: 4px; }
.hx-wk { flex: 1 0 18px; display: flex; flex-direction: column; align-items: center; height: 100%; }
.hx-wk small { font-size: 9px; color: var(--muted); margin-top: 2px; }
.hx-bars { flex: 1; width: 100%; display: flex; gap: 1px; align-items: flex-end; }
.hx-bars span { flex: 1; border-radius: 2px 2px 0 0; min-height: 1px; }
.hx-bars .u { background: #fdba74; } .hx-bars .r { background: var(--ok); }
.bc-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.bc-list .bc { border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; display: inline-flex; gap: 6px; align-items: center; }
.bc-list .bc.retired { opacity: .6; } .bc-list .link-btn { padding: 0; font-size: 12px; }
.tag.unverified { background: #f3f4f6; color: #667085; border: 1px dashed #c4c9d2; }
.flag-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pick-list { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.pick-row { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; }
.pick-row:hover { border-color: var(--accent); }
.viewas { font-size: 12px; padding: 4px 6px; margin: 0 4px; }
tr.act-bad td { background: var(--bad-soft); }
.bad-callout { background: var(--bad-soft); color: var(--bad); }
.recovery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-size: 16px; }
.recovery span { border: 1px dashed var(--line); border-radius: 6px; padding: 6px; text-align: center; }
.ai-meter { display: inline-block; width: 90px; height: 8px; border-radius: 99px; background: #eef0f3; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.ai-meter span { display: block; height: 100%; border-radius: 99px; }
.ai-meter.ok span { background: var(--ok); } .ai-meter.warn span { background: #f59e0b; } .ai-meter.bad span { background: var(--bad); }
/* menu import review */
.mr-row { display: grid; grid-template-columns: 22px 1fr 80px 64px 64px auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mr-row.done { opacity: .6; }
.mr-num { text-align: right; } .mr-num small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.mr-num .qty { width: 70px; }
@media (max-width: 700px) { .mr-row { grid-template-columns: 22px 1fr 70px; } .mr-row .mr-num:nth-of-type(3), .mr-row .mr-num:nth-of-type(4) { display: none; } }
/* menu import summary */
.mi-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.mi-sum > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.mi-sum b { display: block; font-size: 22px; } .mi-sum span { font-size: 12px; color: var(--muted); }
.mi-sum .bad b { color: var(--bad); }
.mi-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; font: inherit; color: inherit; cursor: pointer; min-height: 52px; }
.mi-row.done { opacity: .5; } .mi-go { color: var(--accent); font-weight: 600; white-space: nowrap; }
.menu-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.mp { position: relative; } .mp img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.mp .x-btn { position: absolute; top: 4px; right: 4px; background: #fff; }
.menu-chips { margin-bottom: 12px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.day-picks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.day-pick { display: inline-flex; cursor: pointer; }
.day-pick input { position: absolute; opacity: 0; pointer-events: none; }
.day-pick span { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-weight: 600; min-width: 48px; text-align: center; background: var(--surface); }
.day-pick input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.day-pick input:focus-visible + span { outline: 2px solid var(--accent); }
.draft-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-color: #f5d9a8; background: var(--warn-soft); }
.arch-btn { border: 0; background: none; cursor: pointer; font-size: 15px; opacity: .45; padding: 4px; } .arch-btn:hover { opacity: 1; }
.mrow.arch .btn { margin-left: 6px; }
.mrow { grid-template-columns: 32px minmax(0, 1fr) 80px 96px 64px 80px 28px; }
.mrow.arch { grid-template-columns: minmax(0, 1fr) 80px auto auto; }
@media (max-width: 700px) {
  .mrow { grid-template-columns: 28px minmax(0, 1fr) 84px; grid-template-areas: "star name price" "star cost pc" "star arch arch"; }
  .mrow .arch-btn { grid-area: arch; justify-self: end; font-size: 13px; }
  .mrow.arch { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: none; }
  .mrow.arch .m-price { display: none; }
}
/* menu import: missing bottles + finish drafts */
.mb-list { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow: auto; }
.mb-row { display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--line); padding: 6px 0; }
.mb-row > span { flex: 1; display: flex; flex-direction: column; gap: 2px; } .mb-row input[data-name] { width: 100%; }
.fd-printed { background: var(--bg, #f6f7f9); border-radius: 8px; padding: 8px 10px; margin: 10px 0 0; font-style: italic; }
.fd-line { border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 8px; }
.fd-line select { width: 100%; margin-bottom: 6px; }
.fd-pours { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.fd-pours input { width: 64px; }
.fd-x { display: grid; grid-template-columns: minmax(0, 1fr) 60px auto auto 64px auto; gap: 6px; align-items: center; padding: 4px 0; }
.fd-add { margin: 6px 0 4px; } .fd-add input { width: 100%; }

/* Tabs across the top of Inventory, Purchasing and Reports */
.subnav { display: flex; gap: 6px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.subnav a:hover { border-color: var(--accent); }
.subnav a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) { .subnav { margin: -4px -16px 12px; padding: 0 16px 2px; } .subnav a { padding: 6px 12px; font-size: 13px; } }

/* Phone home: task buttons + "Needs you now", above the regular dashboard cards */
.ph-home { margin-bottom: 18px; }
.ph-tasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ph-task { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 78px; padding: 10px 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; text-align: center; line-height: 1.2; }
.ph-task i { font-style: normal; font-size: 22px; color: var(--accent); }
.ph-task:active { background: var(--accent-soft); }
.ph-now h2 { margin: 0 0 6px; font-size: 16px; }
.ph-todo { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; }
.ph-todo:first-of-type { border-top: 0; }
.ph-todo i { font-style: normal; text-align: center; }
.ph-todo b { color: var(--muted); }
.ph-todo.warn span { color: #b54708; font-weight: 600; }
.ph-todo.bad span { color: var(--bad); font-weight: 600; }
#more-sheet .sheet-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px 2px; }
#nav a[hidden], #more-sheet a[hidden] { display: none !important; }

/* Drink specs (shift leads and staff) */
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 12px 18px; border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer; font: inherit; color: var(--ink); }
.sp-row { justify-content: flex-start; }
.sp-row:hover { background: var(--accent-soft); }
.sp-price { font-weight: 700; white-space: nowrap; }
table.spec { width: 100%; margin: 4px 0 12px; }
table.spec td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.spec td.n { width: 90px; white-space: nowrap; }
.spec-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.spec-meta > div { display: flex; flex-direction: column; gap: 2px; }
.conf { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 700; text-align: center; cursor: help; }
.conf.ok { background: var(--ok-soft); color: var(--ok); } .conf.warn { background: var(--warn-soft); color: var(--warn); } .conf.muted { background: var(--line); color: var(--muted); }

/* Drink photos */
.drink-photo { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.drink-photo img, .drink-photo .dp-empty { width: 120px; height: 150px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bg); border: 1px solid var(--line); }
.drink-photo .dp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 28px; text-align: center; padding: 8px; }
.drink-photo .dp-empty .small { font-size: 11px; line-height: 1.25; }
.dp-btns { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.spec-photo { display: block; width: 100%; max-height: 52vh; object-fit: cover; border-radius: 14px; margin-bottom: 12px; }
.sp-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.sp-thumb.none { display: grid; place-items: center; background: var(--bg); font-size: 20px; }
.sp-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.m-thumb { float: left; width: 38px; height: 38px; border-radius: 8px; object-fit: cover; margin-right: 10px; }

/* Kitchen requests */
.kr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 12px 0; }
.kr-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.kr-item > span { display: flex; flex-direction: column; min-width: 0; }
.kr-item.on { border-color: var(--accent); background: var(--accent-soft); }
.kr-item .qty, .kr-x .qty, .kr-got .qty { width: 56px; text-align: center; }
.kr-x { margin-bottom: 6px; flex-wrap: nowrap; }
.kr-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.kr-row:first-of-type { border-top: 0; }
.kr-got { padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: nowrap; }
.kr-slip { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: 14px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; }
.keep-scan { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.keep-row { margin-top: 10px; align-items: center; gap: 12px; }
#scan-count { color: var(--ok); }

/* Scan result banner: pinned near the top, readable at arm's length */
#scan-banner { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 10px); z-index: 200; transform: translateX(-50%);
  display: none; align-items: center; gap: 12px; width: min(560px, calc(100vw - 24px)); padding: 12px 16px; border-radius: 16px;
  color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); cursor: pointer; }
#scan-banner.show { display: flex; animation: sb-in .18s ease-out; }
@keyframes sb-in { from { margin-top: -16px; } to { margin-top: 0; } }
#scan-banner.ok { background: #15803d; } #scan-banner.bad { background: #b42318; }
#scan-banner .sb-mark { flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 24px; font-weight: 800; }
#scan-banner .sb-txt { display: flex; flex-direction: column; min-width: 0; }
#scan-banner .sb-txt b { font-size: 18px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#scan-banner .sb-txt span { font-size: 14px; opacity: .95; }
#scan-banner .sb-warn { color: #fde68a; }
#scan-banner .thumb { background: #fff; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { #scan-banner.show { animation: none; } }

/* Receive: orders coming in */
.inc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.inc-row:first-of-type { border-top: 0; }
.inc-main { min-width: 0; flex: 1; }
.inc-lines { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }

/* Location picker (account menu) and group dashboard */
.loc-menu { padding: 4px 0; max-height: 50vh; overflow-y: auto; }
.loc-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 14px 2px; }
.loc-pick { display: grid; grid-template-columns: 18px 1fr; align-items: center; width: 100%; text-align: left; padding: 8px 14px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.loc-pick:hover { background: var(--accent-soft); }
.loc-pick.on { font-weight: 700; color: var(--accent); }
.loc-pick.all { color: var(--accent); }
#acct-btn.multi .acct-text b::after { content: ' ▾'; font-size: .8em; color: var(--muted); }
.grp-table td { vertical-align: top; }
.grp-out { background: var(--bad-soft); color: var(--bad); font-weight: 700; }
.grp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .grp-cols { grid-template-columns: 1fr; } }
.grp-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; margin-top: 6px; }
.grp-concept td { background: var(--bg); font-weight: 700; font-size: 13px; padding-top: 10px; }
.warn-txt { color: var(--warn); font-weight: 600; }
.ol-list { max-height: 55vh; overflow-y: auto; }
.ol-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 0 4px; }
.ol-row { display: flex; padding: 5px 0; } .ol-row.new { color: var(--warn); }
.im-map { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.count-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cp-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.cp-bar span { display: block; height: 100%; background: var(--ok); transition: width .2s; }

/* Pull bottles (grab & go) and bottle service */
.pull-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 12px 0 16px; }
.pull-tile { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; font: inherit; color: var(--ink); cursor: pointer; min-height: 64px; }
.pull-tile > span { display: flex; flex-direction: column; min-width: 0; }
.pull-tile:active { background: var(--accent-soft); border-color: var(--accent); }
.pull-tile.rush { min-height: 76px; }
.rush-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 8px; }
.rush-card.waiting { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.rush-card.approval { border-color: var(--bad); }
.rc-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.rc-table { font-size: 16px; margin: 2px 0; }
.rc-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rs-n { margin-left: 4px; color: var(--accent); font-weight: 800; }
.qp-go { width: 100%; margin-top: 12px; padding: 18px; font-size: 20px; border-radius: 16px; }
.qp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); }
.qp-row.returned, .qp-row.undone { opacity: .6; }

/* Phones: nothing wider than the screen (a few px over lets iPhones slide sideways and zoom) */
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  html, body { overflow-x: clip; max-width: 100%; }
  .subnav { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; }
  .card-head { flex-wrap: wrap; gap: 6px; }
  .card-head h2, h1, h2 { overflow-wrap: anywhere; min-width: 0; }
  .row { min-width: 0; }
  .page-head .row { flex-wrap: wrap; }
}
/* red counter on the Fulfill tile / quick requests */
.st-tile { position: relative; }
.st-count, .count-dot { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: #dc2626; color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 0 0 3px #fff; }
.st-count { position: absolute; top: -8px; right: -8px; }
.qq-head { align-items: center; margin: 4px 0 8px; }
/* Quick requests: dark red; "to pick": a lighter tint */
.badge.quick-badge { background: #9f1239; color: #fff; }
.badge.pick-badge { background: #fde2e1; color: #9f1239; }
.rq-card.quick { border-left: 4px solid #9f1239; }
.rq-quicknote { font-size: 15px; font-weight: 700; margin-top: 4px; }
/* Quick Request: the running list */
.qr-list.has { border: 2px solid #9f1239; }
.qr-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.qr-line:first-of-type { border-top: 0; }
.qr-q { min-width: 28px; text-align: center; font-weight: 800; font-size: 16px; }
.qr-send { width: 100%; margin-top: 12px; padding: 14px; font-size: 18px; border-radius: 14px; }
.qr-send:disabled { opacity: .5; }
.qr-find { margin: 14px 0 6px; }
.pull-tile.picked { border-color: #9f1239; background: #fff1f2; position: relative; }
.tile-q { position: absolute; top: -8px; right: -8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: #9f1239; color: #fff; font-weight: 800; display: grid; place-items: center; }
.qr-line .stepper, .qr-line .x-btn, .qr-line .thumb { flex: none; }
.qr-line > b { flex: 1; min-width: 0; }
.qr-line .spacer { display: none; }
.staff-add { display: grid; grid-template-columns: 1fr 1fr 110px 140px auto; gap: 10px; align-items: end; padding: 12px; background: var(--bg); border-radius: 12px; margin-bottom: 12px; }
@media (max-width: 760px) { .staff-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .staff-add label, .staff-add input, .staff-add select { min-width: 0; width: 100%; } .staff-add button { grid-column: span 2; } }

/* 🔥 Quick request toggle on New requisition: hard to miss, and the builder turns red when it's on */
.rb-quick { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #f9fafb; cursor: pointer; color: var(--ink); transition: background .15s, border-color .15s; }
.rb-quick:hover { border-color: #fda4af; }
.rb-quick input { position: absolute; opacity: 0; pointer-events: none; }
.rb-quick .rbq-box { flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid #d1d5db; background: #fff; display: grid; place-items: center; font-size: 17px; opacity: .75; }
.rb-quick b { display: block; font-size: 16px; }
.rb-quick .small { display: block; color: var(--muted); }
.rb-q-on .rb-quick:not(.rb-bottle) { border: 2px solid #9f1239; background: #9f1239; color: #fff; }
.rb-q-on .rb-quick:not(.rb-bottle) .small { color: #ffe4e6; }
.rb-q-on .rb-quick:not(.rb-bottle) .rbq-box { filter: none; opacity: 1; border-color: #fff; }
.rb-is-quick .rb, .rb-is-quick #rb-cart { border: 2px solid #9f1239; }
.rb-quick-fields { display: none; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff1f2; }
.rb-is-quick .rb-quick-fields { display: flex; }
.rb-quick-fields .f { flex: 1; min-width: 110px; }
.btn.danger-fill { background: #9f1239; border-color: #9f1239; color: #fff; }

/* Drink specs → 📖 Menus: the printed menu as guests see it */
.sp-view { margin: 0 0 12px; }
.printed-menu { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pm-page { width: 100%; max-width: 900px; border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.15); background: #fff; cursor: zoom-in; }
.pm-pdf { margin: 12px 0; }
.zoom-view { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); }
.zoom-scroll { position: absolute; inset: 0; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 50px 0 20px; }
.zoom-scroll img { max-width: 100%; height: auto; touch-action: pinch-zoom; }
.zoom-scroll img.big { max-width: none; width: 200%; }
.zoom-x { position: fixed; top: 12px; right: 12px; z-index: 201; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 18px; cursor: pointer; }
.qr-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.qr-box img { flex: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; image-rendering: pixelated; }
.qr-box > div { flex: 1; min-width: 220px; }

/* Reports → Spend */
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.legend i, .spend-table .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend .run-key { background: #111; border-radius: 50%; }
.spend-chart { display: grid; grid-template-columns: repeat(var(--n), minmax(14px, 1fr)); gap: 6px; height: 220px; padding: 8px 0 22px; overflow-x: auto; }
.sc-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-width: 14px; }
.sc-bar { display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; }
.sc-bar i { display: block; width: 100%; min-height: 1px; }
.sc-bar i:last-child { border-radius: 4px 4px 0 0; }
.sc-run { position: absolute; left: 50%; width: 8px; height: 8px; margin: 0 0 -4px -4px; border-radius: 50%; background: #111; box-shadow: 0 0 0 2px #fff; }
.sc-lbl { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.spend-chart:has(.sc-col:nth-child(14)) .sc-col:nth-child(even) .sc-lbl { display: none; }
.spend-table td, .spend-table th { white-space: nowrap; }

/* Reports → Menu profit */
.mm-table th.sortable { cursor: pointer; user-select: none; }
.mm-table th.sortable.on { color: var(--ink); text-decoration: underline; }
.mm-table td, .mm-table th { white-space: nowrap; }
.mm-cls { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; }
.mm-cls.star { background: #dcfce7; color: #166534; } .mm-cls.plow { background: #fef3c7; color: #92400e; }
.mm-cls.puzzle { background: #e0e7ff; color: #3730a3; } .mm-cls.dog { background: #fee2e2; color: #991b1b; }

/* Reports → POS Sales */
.px-tabs { margin-top: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.px-tabs button { white-space: nowrap; flex: none; }
.up { color: var(--ok); } .down { color: var(--bad); }
.px-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 120px; gap: 10px; align-items: center; margin: 6px 0; font-size: 13px; }
.px-bar { height: 16px; border-radius: 0 4px 4px 0; min-width: 2px; }
.px-chart { position: relative; }
.px-spark { display: block; }
.px-flag { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; font-size: 13px; }
.px-flag b { display: block; }
.px-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: #374151; white-space: nowrap; }
.c-core { background: #dcfce7; color: #166534; } .c-rise { background: #dbeafe; color: #1e40af; } .c-fade { background: #fee2e2; color: #991b1b; }
.c-new { background: #ede9fe; color: #5b21b6; } .c-end { background: #e5e7eb; color: #374151; } .c-slow { background: #fef3c7; color: #92400e; }
.c-exact { background: #dcfce7; color: #166534; } .c-pour { background: #dbeafe; color: #1e40af; } .c-guess { background: #fef3c7; color: #92400e; }
.px-items th.px-s { cursor: pointer; user-select: none; } .px-items th.on { color: var(--ink); }
.px-items td, .px-items th { white-space: nowrap; } .px-kind { font-size: 12px; padding: 3px 6px; }
@media (max-width: 640px) { .px-row { grid-template-columns: 110px minmax(0, 1fr) 90px; } }
.px-season { display: flex; gap: 6px; align-items: flex-end; height: 112px; }
.px-sw { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.px-sb { display: block; width: 100%; border-radius: 4px 4px 0 0; }
.s-pk { background: #fae2d8; color: #712b13; } .s-up { background: #faeeda; color: #633806; } .s-dn { background: #e6f1fb; color: #0c447c; } .s-st { background: #f1f0eb; color: #5f5e5a; }
i.s-pk { background: #d85a30; } i.s-up { background: #ef9f27; } i.s-dn { background: #85b7eb; } i.s-st { background: #b4b2a9; }
.c-dn { background: #e6f1fb; color: #0c447c; } .c-up { background: #dcfce7; color: #166534; }
.season-chip { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-left: 4px; white-space: nowrap; }

/* computer sidebar: bar card, live counts, the open section's pages, today, quick actions, who's signed in */
.side-bar { margin: 4px 12px 10px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #1d2430; border: 0; color: #fff; text-align: left; cursor: pointer; font: inherit; }
.side-bar:hover { background: #242d3b; }
.side-bar .avatar { width: 30px; height: 30px; flex: none; font-size: 12px; }
.side-bar .sb-txt { display: flex; flex-direction: column; min-width: 0; } .side-bar b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-bar small, .side-today small, .side-foot small { display: block; font-size: 11px; color: #8a93a6; font-weight: 400; }
.side-bar .sb-sw { margin-left: auto; color: #8a93a6; }
#nav a { padding: 9px 18px; }
#nav a .nb, #nav a .nb-txt { margin-left: auto; }
.nb { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #334155; color: #e2e8f0; white-space: nowrap; }
.nb.hot { background: #b45309; color: #fff; } .nb.red { background: #b91c1c; color: #fff; }
.nb-txt { font-size: 11px; color: #8a93a6; white-space: nowrap; } .nb-txt.warn { color: #f59e0b; }
#nav a.nav-sub { padding: 6px 18px 6px 46px; font-size: 13px; color: #94a3b8; border-left-color: transparent; }
#nav a.nav-sub:hover { color: #fff; } #nav a.nav-sub.on { color: #fff; background: #1a212c; }
.side-sec { margin: 14px 12px 0; padding-top: 12px; border-top: 1px solid #222a37; }
.side-h { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #6b7588; margin: 0 6px 6px; font-weight: 600; }
.side-today { display: flex; gap: 9px; align-items: flex-start; padding: 6px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-size: 13px; line-height: 1.3; }
.side-today:hover { background: #1d2430; color: #fff; } .side-today i { font-style: normal; width: 18px; text-align: center; flex: none; }
.side-strip { display: flex; gap: 3px; align-items: flex-end; height: 34px; margin: 4px 6px 2px 33px; }
.side-strip i { flex: 1; border-radius: 2px 2px 0 0; min-height: 3px; }
.side-qa { display: flex; gap: 9px; align-items: center; padding: 7px 10px; margin-bottom: 6px; border-radius: 8px; background: #1d2430; border: 1px solid #263041; color: #e5e7eb; text-decoration: none; font-size: 13px; }
.side-qa:hover { background: #242d3b; color: #fff; } .side-qa i { font-style: normal; width: 16px; text-align: center; opacity: .85; }
.side-foot { margin: auto 12px 0; padding: 12px 6px 4px; display: flex; gap: 10px; align-items: center; border: 0; border-top: 1px solid #222a37; background: none; color: var(--side-ink); text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.side-foot .avatar.sm { width: 26px; height: 26px; font-size: 11px; flex: none; }
.side-sec + .side-foot { margin-top: 18px; }
/* on a computer the open section's pages are in the sidebar, so the row of tabs above each page goes */
@media (min-width: 761px) and (min-height: 501px), (min-width: 761px) and (pointer: fine) { .subnav { display: none !important; } }
.side-bar .avatar { background: #b45309; color: #fff; } .side-foot .avatar { background: #334155; color: #fff; }
.side-settings { margin-top: 10px; border-top: 1px solid #222a37; padding-top: 6px; }

/* a bar device shows one screen at a time: no sidebar, tab bar, More menu or page tabs; Done returns to the tiles */
body.device .sidebar, body.device #tabbar, body.device #more-sheet, body.device .subnav, body.device #more-btn { display: none !important; }
body.device #topbar, body.device #dev-bar, body.device #cutoff-banner, body.device #support-bar { left: 0 !important; }
body.device #main { padding-bottom: 40px; }
body.device .station-head .btn.ghost, body.device #st-back { display: none; }

/* bottle service: its own toggle (purple when on), the mixer carafe rows, and the prep line pickers see */
.rb-is-bottle .rb-bottle { border: 2px solid #5b21b6; background: #5b21b6; color: #fff; }
.rb-is-bottle .rb-bottle .small { color: #ede9fe; } .rb-is-bottle .rb-bottle .rbq-box { opacity: 1; border-color: #fff; }
.rb-is-bottle .rb-quick:not(.rb-bottle) { display: none; }
.rb-mixers { display: none; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #f5f3ff; border: 1px solid #ddd6fe; }
.rb-is-bottle .rb-mixers { display: block; }
.rb-mx-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.rb-mx-row select { flex: 1; min-width: 140px; } .rb-mx-row input { flex: 1; min-width: 120px; }
.rb-mx-row .stepper { flex: none; display: flex; align-items: center; gap: 6px; } .rb-mx-row .mx-q { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.badge.bottle-badge { background: #5b21b6; color: #fff; }
.rq-card.bottle { border-left: 4px solid #5b21b6; }
.rq-prep { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: #f5f3ff; color: #3b0764; font-size: 14px; }
.bm-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; } .bm-row input[type=text] { flex: 1; min-width: 0; }
.rb-is-bottle .rb, .rb-is-bottle #rb-cart { border-color: #5b21b6; }
.rb-is-bottle .rb-quick-fields { background: #f5f3ff; }
.btn.bottle-fill { background: #5b21b6; border-color: #5b21b6; color: #fff; }
/* The sidebar is pinned to the left edge on computers and iPads: the page scrolls beside it, it never moves.
   (Sticky inside a one-screen-tall body let it scroll away once the page was longer than the screen.) */
@media (min-width: 761px) and (min-height: 501px), (min-width: 761px) and (pointer: fine) {
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; height: auto; z-index: 33; overscroll-behavior: contain; }
  main { margin-left: 248px; }
  body.device main, body.authing main { margin-left: 0; }
}
/* a little tighter so the whole column fits on a laptop screen */
.brand { padding: 16px 18px 8px; }
#nav a { padding-top: 8px; padding-bottom: 8px; }
#nav a.nav-sub { padding-top: 5px; padding-bottom: 5px; }
.side-sec { margin-top: 10px; padding-top: 10px; }
.side-today { padding: 5px 6px; }
.side-qa { padding: 6px 10px; margin-bottom: 5px; }
.side-settings { margin-top: 8px; padding-top: 4px; }
.side-foot { padding: 10px 6px 6px; }
.nb.purple { background: #5b21b6; color: #fff; }
.rq-card.bottle { background: #fdfcff; }

/* closing spot check */
.sp-rows { display: grid; gap: 6px; }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sp-row input { width: 110px; font-size: 18px; text-align: center; }
.dev-tiles .dev-tile:nth-child(5):last-child { grid-column: 1 / -1; min-height: 80px; flex-direction: row; }

/* Style beside the name (Spirits > Whiskey, then "Bourbon" here) */
.style-tag { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; white-space: nowrap; }
/* Export choices */
.exp-list { display: grid; gap: 10px; }
.exp-opt { display: grid; gap: 3px; text-align: left; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; color: inherit; cursor: pointer; }
.exp-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.exp-opt span { color: var(--muted); font-size: 13px; }
.exp-opt:disabled { opacity: .6; cursor: progress; }
/* The pick queue on the dashboard */
.dash-picks .rq-card { margin-bottom: 10px; box-shadow: none; }
.dash-picks .rq-h { margin-top: 4px; }
/* Count: Full + Open boxes, and a section per room when counting all locations */
.count-how { margin: 8px 0 0; }
.count-table input.qty { width: 64px; text-align: right; }
.count-table td.tot { width: 70px; }
.count-table tr.done td { background: #f6fbf7; }
tr.loc-sec td { background: var(--side); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 14px; }
tr.loc-sec .muted { color: #aab2c0; }
.cgroup.loc-sec { background: var(--side); color: #fff; font-size: 14px; }
.ccard .fo { display: flex; gap: 6px; }
.ccard .fo label { display: grid; gap: 2px; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: center; }
.ccard .fo input.qty { width: 52px; text-align: center; }
/* "4 low" in the sidebar and the Below par filter on Inventory */
.nb-go { cursor: pointer; } .nb-go:hover { filter: brightness(1.15); text-decoration: underline; }
.low-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 18px 12px; }
.chip.low-chip.on { background: var(--warn); border-color: var(--warn); color: #fff; }
/* Dashboard tiles open where their numbers come from */
.kpi.click { cursor: pointer; transition: border-color .15s; } .kpi.click:hover { border-color: var(--accent); }
.bar-row.click { cursor: pointer; border-radius: 6px; } .bar-row.click:hover { background: var(--accent-soft); }
/* Full count schedule strip and the COGS report */
.count-sched { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.count-sched.overdue { background: var(--bad-soft); border-color: var(--bad); }
.count-sched.today, .count-sched.soon { background: var(--warn-soft); border-color: var(--warn); }
.callout.ok-call { background: var(--ok-soft); border-color: var(--ok); }
.full-chk b { color: var(--accent); }
.cogs-bar { position: relative; min-width: 140px; height: 18px; background: #f1f2f4; border-radius: 4px; }
.cogs-bar span { position: absolute; inset: 0 auto 0 0; background: #fdba74; border-radius: 4px; }
.cogs-bar em { position: relative; font-style: normal; font-size: 12px; padding-left: 6px; line-height: 18px; }
.sales-box { margin: 14px 18px 4px; padding: 12px 14px; border: 1px dashed #d4a72c; background: #fffbea; border-radius: var(--radius); display: grid; gap: 10px; }
.sales-box .row { gap: 10px; flex-wrap: wrap; }
.sales-box input { width: 130px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
/* Sortable inventory columns */
.inv-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.inv-table th.sortable:hover { color: var(--ink); }
.inv-table th .sort-arrow { margin-left: 4px; font-size: 10px; opacity: .35; }
.inv-table th.sorted { color: var(--accent); } .inv-table th.sorted .sort-arrow { opacity: 1; }
/* Bottle size beside the name */
.size-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 18px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); margin-left: 6px; white-space: nowrap; vertical-align: 1px; }
/* Name on its own line, chips on the next */
.nm-line { display: block; line-height: 1.3; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 2px; }
.chip-row > * { margin-left: 0 !important; }
.inv-table td:first-child { min-width: 270px; }
