/* =====================================================
   VIBE Carolina — 🍺 Keg Tracker styles (taps.html)
   Board + quick-check + sheets. Depends on style.css
   (tokens, #toast) and packing.css (pack-header/guard).
   ===================================================== */

.taps-wrap { max-width: 980px; margin: 0 auto; padding: 14px 14px 90px; }

/* ── Mode switch (Board / Quick-Check) ────────────────── */
.taps-mode-switch {
  display: flex; gap: 3px; margin: 2px 0 12px;
  background: #e9edf3; border-radius: 12px; padding: 3px;
}
.taps-mode-btn {
  flex: 1; padding: 10px 8px; border: none; border-radius: 10px;
  background: transparent; color: #6b7280;
  font-size: .9rem; font-weight: 700; cursor: pointer;
}
.taps-mode-btn.active { background: #fff; color: #1a1d2e; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* ── Client chips row ─────────────────────────────────── */
.seg-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.seg-chips::-webkit-scrollbar { display: none; }
.seg-chip {
  border: 1.5px solid #e5e7eb; background: #fff; color: #374151; border-radius: 999px;
  padding: 7px 13px; font-size: .78rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; cursor: pointer;
}
.seg-chip.active { background: #1a1d2e; color: #fff; border-color: #1a1d2e; }
.chip-ct {
  display: inline-block; background: #fee2e2; color: #991b1b;
  border-radius: 10px; padding: 0 6px; font-size: .68rem; font-weight: 800;
  margin-left: 6px; vertical-align: 1px;
}

/* ── Attention strip ──────────────────────────────────── */
.att-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; margin: 12px 0 14px; align-items: start; }
.att-card { border: 1.5px solid var(--color-border, #e2e6ee); border-radius: 12px; overflow: hidden; background: #fff; }
.att-card.crit  { border-color: #fecaca; }
.att-card.warn  { border-color: #fde68a; }
.att-card.order { border-color: #bfdbfe; }
.att-head { padding: 9px 14px; font-weight: 800; font-size: .85rem; display: flex; align-items: center; gap: 8px; }
.att-card.crit  .att-head { background: #fef2f2; color: #991b1b; }
.att-card.warn  .att-head { background: #fffbeb; color: #92400e; }
.att-card.order .att-head { background: #eff6ff; color: #1e40af; }
.att-count { margin-left: auto; background: rgba(0,0,0,.08); border-radius: 12px; padding: 1px 9px; font-size: .72rem; font-weight: 700; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid #f1f5f9; }
.att-info { flex: 1; min-width: 0; }
.att-name { font-weight: 700; font-size: .84rem; }
.att-sub { font-size: .72rem; color: #9ca3af; }
.att-empty { padding: 14px; font-size: .8rem; color: #9ca3af; border-top: 1px solid #f1f5f9; }
.att-accept {
  background: #16a34a; color: #fff; border: none; border-radius: 8px;
  padding: 6px 11px; font-weight: 700; font-size: .74rem; cursor: pointer; white-space: nowrap;
}
.att-accept:hover { background: #15803d; }
.att-dismiss {
  background: #fff; border: 1.5px solid #e2e6ee; border-radius: 7px;
  padding: 5px 9px; font-size: .72rem; font-weight: 600; color: #374151; cursor: pointer;
}
.att-dismiss:hover { border-color: #6b7280; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 2px 0 14px; font-size: .74rem; color: #6b7280; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ── Client / kegerator board cards ───────────────────── */
.client-card { background: #fff; border: 1.5px solid #e2e6ee; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 18px; overflow: hidden; }
.client-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #e2e6ee; flex-wrap: wrap; }
.client-name { font-size: 1.02rem; font-weight: 800; }
.kt-badge { background: #eef2ff; color: #3730a3; border-radius: 5px; padding: 2px 8px; font-size: .66rem; font-weight: 800; letter-spacing: .03em; }
.kt-badge.unlinked { background: #fef3c7; color: #92400e; }
.checked-chip { margin-left: auto; font-size: .74rem; color: #9ca3af; font-weight: 600; white-space: nowrap; }
.checked-chip.stale { color: #92400e; background: #fef3c7; border-radius: 20px; padding: 3px 10px; }
.keg-section { padding: 4px 0 10px; }
.keg-section + .keg-section { border-top: 1px solid #f1f5f9; }
.keg-loc-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px 6px; flex-wrap: wrap; }
.keg-loc-name { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; }
.keg-loc-note { font-size: .7rem; color: #c4b5a0; font-style: italic; }
.gas-chip { border-radius: 20px; padding: 2px 9px; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.gas-chip.ok  { background: #ecfeff; color: #155e75; }
.gas-chip.low { background: #fef3c7; color: #92400e; }
.manage-btn {
  margin-left: auto; background: #fff; border: 1.5px solid #e2e6ee; border-radius: 7px;
  padding: 3px 9px; font-size: .7rem; font-weight: 600; color: #374151; cursor: pointer;
}
.manage-btn:hover { border-color: #3b82f6; color: #3b82f6; }

.tablewrap { overflow-x: auto; }
.tap-table { width: 100%; border-collapse: collapse; }
.tap-table th {
  text-align: left; font-size: .64rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: #9ca3af; padding: 4px 10px;
}
.tap-table td { padding: 6px 10px; border-top: 1px solid #f8fafc; font-size: .84rem; vertical-align: middle; }
.tap-table tr:hover td { background: #fafbfd; }
.td-tap { white-space: nowrap; color: #6b7280; font-size: .74rem; font-weight: 700; width: 86px; }
.td-style { color: #9ca3af; font-size: .74rem; width: 130px; }
.td-beer { font-weight: 700; min-width: 150px; }
.td-level { width: 172px; cursor: pointer; }
.td-next { min-width: 140px; }

.lvl { display: flex; align-items: center; gap: 8px; }
.lvl-bar { flex: 1; height: 8px; min-width: 64px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.lvl-fill { height: 100%; border-radius: 4px; transition: width .25s; }
.lvl-pct { font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; width: 40px; text-align: right; }
.lvl.good .lvl-fill { background: #22c55e; }  .lvl.good .lvl-pct { color: #15803d; }
.lvl.warn .lvl-fill { background: #f59e0b; }  .lvl.warn .lvl-pct { color: #92400e; }
.lvl.crit .lvl-fill { background: #ef4444; }  .lvl.crit .lvl-pct { color: #991b1b; }
.kicked-badge { background: #fee2e2; color: #991b1b; border-radius: 20px; padding: 2px 9px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; }
.nolvl { color: #c8cdd8; font-size: .76rem; font-style: italic; }

.next-chip { display: inline-block; border-radius: 20px; padding: 3px 10px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.next-onsite { background: #dcfce7; color: #15803d; }
.next-bring  { background: #fef3c7; color: #92400e; }
.next-order  { background: #dbeafe; color: #1e40af; }
.next-plan   { background: #f3f4f6; color: #6b7280; }
.next-add {
  display: inline-block; border: 1.5px dashed #d1d5db; border-radius: 20px;
  padding: 2px 10px; font-size: .72rem; font-weight: 600; color: #9ca3af;
  background: none; cursor: pointer; white-space: nowrap;
}
.next-add:hover { color: #3b82f6; border-color: #3b82f6; }

.extras-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 16px 4px; border-top: 1px dashed #eef1f6; margin-top: 6px; }
.extras-label { font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #9ca3af; }
.extra-chip { background: #f4f6f9; border: 1px solid #e2e6ee; border-radius: 20px; padding: 3px 11px; font-size: .74rem; font-weight: 600; color: #374151; display: inline-flex; align-items: center; gap: 6px; }
.extra-del { border: none; background: none; color: #9ca3af; cursor: pointer; font-size: .8rem; padding: 0; }
.extra-del:hover { color: #b91c1c; }
.ghost-btn { background: none; border: 1.5px dashed #d1d5db; border-radius: 20px; padding: 3px 11px; font-size: .74rem; font-weight: 600; color: #9ca3af; cursor: pointer; }
.ghost-btn:hover { color: #3b82f6; border-color: #3b82f6; }

/* ── Quick-check ──────────────────────────────────────── */
.qc-head { position: sticky; top: 0; z-index: 20; background: #fff; border: 1.5px solid #e2e6ee; border-radius: 12px; padding: 12px 14px 10px; margin-bottom: 10px; }
.qc-title { font-weight: 800; font-size: 1rem; }
.qc-sub { font-size: .74rem; color: #6b7280; margin: 1px 0 10px; }
.qc-list { display: flex; flex-direction: column; gap: 10px; max-width: 520px; margin: 0 auto; }
.qc-card { background: #fff; border: 1.5px solid #e2e6ee; border-radius: 12px; padding: 12px; }
.qc-top { display: flex; align-items: flex-start; gap: 10px; }
.qc-tapno { font-size: .68rem; font-weight: 800; color: #9ca3af; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; padding-top: 2px; }
.qc-names { flex: 1; min-width: 0; }
.qc-beer { font-weight: 800; font-size: .95rem; line-height: 1.25; }
.qc-style { font-size: .72rem; color: #9ca3af; }
.qc-pct { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; padding-top: 2px; }
.qc-pct.good { color: #15803d; } .qc-pct.warn { color: #92400e; } .qc-pct.crit { color: #991b1b; }
.qc-barwrap { margin: 8px 0 10px; }
.qc-barwrap .lvl-pct { display: none; }
.qc-chips { display: grid; grid-template-columns: repeat(5, 1fr) 44px 44px; gap: 6px; }
.qc-chip {
  padding: 9px 2px; border: 1.5px solid #e5e7eb; border-radius: 10px; background: #f9fafb;
  font-size: .8rem; font-weight: 700; color: #374151; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform .12s;
}
.qc-chip:active { transform: scale(.94); }
.qc-chip.sel { background: #1a1d2e; border-color: #1a1d2e; color: #fff; }
.qc-step { font-size: 1rem; font-weight: 700; background: #fff; }
.qc-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.qc-newkeg {
  flex: 1; min-width: 150px; border: none; border-radius: 10px; background: #dcfce7; color: #15803d;
  font-size: .8rem; font-weight: 800; padding: 9px 10px; cursor: pointer; text-align: left;
}
.qc-newkeg:active { transform: scale(.98); }
.qc-edit { background: none; border: 1.5px solid #e2e6ee; border-radius: 10px; padding: 8px 11px; font-size: .78rem; font-weight: 600; color: #374151; cursor: pointer; }
.qc-rename { display: none; margin-top: 10px; gap: 8px; }
.qc-rename.open { display: flex; }
.qc-rename input {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1.5px solid #e2e6ee; border-radius: 10px;
  font-size: .9rem; color: #1a1d2e; outline: none;
}
.qc-rename input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.qc-rename button { border: none; border-radius: 10px; background: #1a1d2e; color: #fff; font-weight: 700; font-size: .8rem; padding: 0 14px; cursor: pointer; }
.qc-backup {
  margin-top: 8px; width: 100%; text-align: left; border: 1.5px solid #e2e6ee;
  background: #fafbfc; border-radius: 10px; padding: 8px 11px;
  font-size: .78rem; font-weight: 600; color: #374151; cursor: pointer;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.qc-backup:active { background: #f1f5f9; }

.save-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #f0f2f5 62%, transparent);
  display: flex; justify-content: center; pointer-events: none;
}
.save-pill {
  display: inline-flex; align-items: center; gap: 8px; background: #fff;
  border: 1.5px solid #e2e6ee; border-radius: 999px; padding: 8px 16px;
  font-size: .78rem; font-weight: 700; color: #15803d; box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.save-pill .savedot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; }
.save-pill.saving { color: #92400e; }
.save-pill.saving .savedot { background: #f59e0b; animation: kg-pulse 1s ease-in-out infinite; }
.save-pill.error { color: #991b1b; }
.save-pill.error .savedot { background: #ef4444; }
@keyframes kg-pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* ── Bottom sheets ────────────────────────────────────── */
.kg-sheet-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(15,17,26,.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.kg-sheet-overlay[hidden] { display: none; }
.kg-sheet {
  width: 100%; max-width: 560px; background: #fff; border-radius: 20px 20px 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px rgba(0,0,0,.3); max-height: 86vh; overflow-y: auto;
  animation: kg-sheet-up .18s ease-out;
}
@keyframes kg-sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .kg-sheet { animation: none; } .lvl-fill { transition: none; } }
.kg-sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: #e2e6ee; margin: 4px auto 12px; }
.kg-sheet-title { font-size: 1.02rem; font-weight: 800; }
.kg-sheet-hint { font-size: .76rem; color: #6b7280; margin: 2px 0 10px; }
.kg-input {
  width: 100%; margin-top: 10px; padding: 12px; border: 1.5px solid #e2e6ee;
  border-radius: 10px; font-size: .95rem; color: #1a1d2e; outline: none; background: #fff;
}
.kg-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.bk-status-chips { display: flex; gap: 6px; margin-top: 12px; }
.bk-chip {
  flex: 1; padding: 11px 6px; border: 1.5px solid #e5e7eb; border-radius: 10px;
  background: #fff; font-size: .8rem; font-weight: 700; color: #374151;
  cursor: pointer; text-align: center;
}
.bk-chip.sel-onsite { background: #dcfce7; border-color: #86efac; color: #15803d; }
.bk-chip.sel-bring  { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.bk-chip.sel-order  { background: #dbeafe; border-color: #bfdbfe; color: #1e40af; }
.bk-qty { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.bk-qty-label { font-size: .78rem; font-weight: 600; color: #6b7280; }
.bk-qty button {
  width: 40px; height: 40px; border: 1.5px solid #e5e7eb; border-radius: 10px;
  background: #f9fafb; font-size: 1.1rem; font-weight: 700; color: #1a1d2e; cursor: pointer;
}
.bk-qty-val { font-size: 1.15rem; font-weight: 800; min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.kg-sheet-save {
  width: 100%; margin-top: 14px; padding: 14px; border: none; border-radius: 12px;
  background: #22c55e; color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer;
}
.kg-sheet-save:active { transform: scale(.98); }
.kg-sheet-save:disabled { opacity: .6; }
.kg-remove {
  width: 100%; margin-top: 8px; padding: 10px; border: 1.5px solid #fecaca;
  border-radius: 10px; background: #fff; color: #b91c1c;
  font-weight: 600; font-size: .82rem; cursor: pointer;
}
.kg-sheet-cancel { width: 100%; margin-top: 8px; padding: 10px; border: none; background: none; color: #6b7280; font-size: .85rem; font-weight: 600; cursor: pointer; }

/* history sheet */
.th-spark { background: #fafbfc; border: 1px solid #f1f5f9; border-radius: 10px; padding: 12px 12px 6px; margin-top: 12px; }
.th-est { margin-top: 10px; font-weight: 800; font-size: .92rem; }
.th-est.warn { color: #92400e; } .th-est.crit { color: #991b1b; } .th-est.good { color: #15803d; }
.th-row { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; color: #374151; padding: 6px 2px; border-top: 1px solid #f1f5f9; }
.th-row b { font-variant-numeric: tabular-nums; }
.th-list { margin-top: 10px; }

/* manage sheet */
.mg-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid #f1f5f9; font-size: .84rem; flex-wrap: wrap; }
.mg-row .grow { flex: 1; min-width: 0; }
.mg-del { border: 1.5px solid #fecaca; background: #fff; color: #b91c1c; border-radius: 8px; padding: 4px 9px; font-size: .72rem; font-weight: 600; cursor: pointer; }
.mg-add { border: 1.5px dashed #d1d5db; background: none; color: #6b7280; border-radius: 8px; padding: 6px 11px; font-size: .76rem; font-weight: 600; cursor: pointer; margin-top: 8px; }
.mg-add:hover { color: #3b82f6; border-color: #3b82f6; }
.mg-label { font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #9ca3af; margin-top: 14px; }
.mg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mg-grid3 { display: grid; grid-template-columns: 90px 64px 1fr; gap: 8px; }

/* setup / empty cards */
.kg-setup-card {
  border: 1.5px dashed #d1d5db; border-radius: 12px; padding: 18px;
  background: #fafbfc; color: #374151; font-size: .88rem; max-width: 560px; margin: 20px auto;
}
.kg-setup-card b { display: block; margin-bottom: 6px; font-size: .95rem; }
.kg-setup-card code { background: #eef1f6; border-radius: 5px; padding: 1px 6px; font-size: .78rem; }

/* client (read-only) lens */
.menu-wrap { max-width: 640px; margin: 0 auto; }
.menu-card { background: #fff; border: 1.5px solid #e2e6ee; border-radius: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: hidden; margin-bottom: 16px; }
.menu-mast { background: #1a1d2e; color: #fff; padding: 18px 20px 15px; }
.menu-mast .co { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #aeb3c2; }
.menu-mast h2 { font-size: 1.3rem; font-weight: 850; margin: 2px 0 0; }
.menu-mast .upd { font-size: .72rem; color: #aeb3c2; margin-top: 4px; }
.menu-loc { padding: 6px 0 12px; }
.menu-loc + .menu-loc { border-top: 1px solid #f1f5f9; }
.menu-loc-name { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6b7280; padding: 12px 20px 4px; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 8px 20px; }
.menu-num { font-size: .68rem; font-weight: 700; color: #c8cdd8; width: 34px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.menu-main { flex: 1; min-width: 0; }
.menu-beer { font-weight: 750; font-size: .93rem; }
.menu-style { font-size: .72rem; color: #9ca3af; }
.menu-coming { font-size: .72rem; color: #3b82f6; font-weight: 600; }
.menu-lvl { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.menu-lvl .lvl-bar { width: 54px; flex: none; }
.menu-note { text-align: center; font-size: .72rem; color: #9ca3af; padding: 14px 16px 22px; }
.menu-note b { color: #6b7280; }

@media (max-width: 560px) {
  .td-style { display: none; }
  .taps-wrap { padding: 10px 10px 90px; }
}

/* ── Multiple on-deck kegs per tap (2026-08-10b) ────────── */
.next-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.qc-backup-add { border-style: dashed; color: #6b7280; }
