/* Snooker & Tea Club — dark only, by request. Colours come from the hall:
   baize felt, the wooden rail, cue chalk, the ivory cue ball, the red ball, and brass for money. */
:root {
  color-scheme: dark;
  --hall: #08190F;        /* the room — page background */
  --baize: #0F3020;       /* table felt — surfaces */
  --baize-2: #154129;     /* raised felt */
  --baize-3: #1D5537;     /* pressed / selected */
  --rail: #6B4428;        /* wooden cushion rail */
  --rail-dark: #3E2716;
  --ivory: #F0E8D4;       /* cue ball — main text */
  --ivory-2: #B9C4B3;     /* muted text */
  --ivory-3: #7F9183;     /* faint text */
  --chalk: #58B4E8;       /* cue chalk — actions */
  --chalk-ink: #04202F;
  --brass: #E3B34F;       /* money */
  --red: #E0503F;         /* red ball — stop, delete, warnings */
  --line: rgba(240, 232, 212, 0.10);
  --line-2: rgba(240, 232, 212, 0.18);
  --radius: 14px;
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--hall); color: var(--ivory); }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
/* No zoom (asked 23 Oct): taps never double-tap-zoom; pinch is blocked in index.html + app.js. */
html, body { touch-action: pan-x pan-y; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--chalk); }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.muted { color: var(--ivory-2); }
.faint { color: var(--ivory-3); }
.money { color: var(--brass); }
.danger { color: var(--red); }
.hidden { display: none !important; }

/* ── Frame ─────────────────────────────────────────────── */
.app { max-width: 560px; margin: 0 auto; padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 24px); }
.app.wide { max-width: 980px; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 0 12px;
  background: linear-gradient(var(--hall) 75%, transparent);
}
.top h1 {
  margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px;
  text-transform: uppercase; letter-spacing: 0.02em; line-height: 1;
}
.top .sub { font-size: 13px; color: var(--ivory-3); margin-top: 3px; }
.who {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px;
  border-radius: 999px; background: var(--baize); border: 1px solid var(--line); font-size: 13px;
}
.who .ball { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #1a1a1a; background: var(--ivory); }
.who .ball.tea { background: var(--brass); }
.who .ball.snooker { background: var(--red); color: var(--ivory); }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: center;
  background: rgba(8, 25, 15, 0.94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.nav-in { display: flex; width: 100%; max-width: 560px; }
.nav a {
  flex: 1; height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--ivory-3); text-decoration: none; font-size: 12px; font-weight: 600;
}
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--ivory); }
.nav a.on svg { color: var(--chalk); }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--red); color: var(--ivory); font-size: 12px; font-weight: 800;
}

/* ── Building blocks ───────────────────────────────────── */
.card { background: var(--baize); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card, .stack > * + * { margin-top: 12px; }
.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 26px 0 10px; font-family: var(--display); font-weight: 700; font-size: 20px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ivory-2);
}
.section-title small { font-family: var(--body); font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid2 > .card + .card, .grid3 > .card + .card { margin-top: 0; }
@media (min-width: 760px) { .wide .order-2nd { margin-top: 4px; } .wide .grid-auto { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; } .wide .grid-auto > * + * { margin-top: 0; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--baize-2); color: var(--ivory); font-weight: 700; font-size: 16px;
}
.btn:active { transform: translateY(1px); background: var(--baize-3); }
.btn svg, .link svg { flex: none; }
a.btn, a.link { text-decoration: none; }
.btn.primary { background: var(--chalk); border-color: var(--chalk); color: var(--chalk-ink); }
.btn.primary:active { filter: brightness(0.92); }
.btn.red { background: transparent; border-color: rgba(224, 80, 63, 0.5); color: var(--red); }
.btn.block { width: 100%; }
.btn.big { min-height: 58px; font-size: 18px; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.link { background: none; border: 0; color: var(--chalk); font-weight: 700; padding: 6px 0; font-size: 15px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--ivory-2); font-weight: 700; font-size: 14px;
}
.chip.on { background: var(--ivory); color: var(--hall); border-color: var(--ivory); }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--baize); border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ivory-2); font-weight: 700; font-size: 14px; }
.seg button.on { background: var(--baize-3); color: var(--ivory); }

label.field { display: block; margin-top: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--ivory-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--hall); color: var(--ivory); font-size: 16px;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: none; border-color: var(--chalk); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--chalk); }
.hint { font-size: 13px; color: var(--ivory-3); margin-top: 6px; }
.error-box { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(224, 80, 63, 0.12); color: #F2A79D; font-weight: 600; font-size: 14px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.stepper button { width: 46px; height: 46px; border: 0; background: var(--baize-2); color: var(--ivory); font-size: 22px; font-weight: 700; }
.stepper button:active { background: var(--baize-3); }
.stepper output { min-width: 46px; text-align: center; font-family: var(--display); font-size: 24px; font-weight: 800; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .tap { cursor: pointer; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; background: var(--baize-3); color: var(--ivory-2); }
.pill.tea { background: rgba(227, 179, 79, 0.16); color: var(--brass); }
.pill.snooker { background: rgba(224, 80, 63, 0.16); color: #F08A7D; }
.pill.flag { background: var(--red); color: var(--ivory); }
.pill.off { background: transparent; border: 1px solid var(--line-2); color: var(--ivory-3); }
.pill.chalk { background: rgba(88, 180, 232, 0.16); color: var(--chalk); }

.empty { text-align: center; padding: 34px 16px; color: var(--ivory-3); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty strong { display: block; color: var(--ivory-2); margin-bottom: 4px; }

/* ── Big figures ───────────────────────────────────────── */
.figure .label { font-size: 13px; font-weight: 700; color: var(--ivory-2); text-transform: uppercase; letter-spacing: 0.06em; }
.figure .value { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.05; color: var(--brass); font-variant-numeric: tabular-nums; }
.figure .value.ivory { color: var(--ivory); }
.figure .value.neg { color: var(--red); }
.figure .small { font-size: 13px; color: var(--ivory-3); margin-top: 2px; }
.figure.hero .value { font-size: 58px; }
.grid2 .figure .value { font-size: 30px; }
@media (max-width: 360px) { .figure.hero .value { font-size: 46px; } }
.split { display: flex; gap: 14px; margin-top: 10px; font-size: 14px; color: var(--ivory-2); }
.split b { color: var(--ivory); font-weight: 700; }

/* The receipt-style ledger used for profit and receipts */
.ledger { width: 100%; border-collapse: collapse; font-size: 15px; }
.ledger td { padding: 9px 0; border-bottom: 1px dashed var(--line-2); vertical-align: top; }
.ledger td:last-child { text-align: right; font-family: var(--display); font-size: 19px; font-weight: 700; white-space: nowrap; padding-left: 12px; }
.ledger tr.total td { border-bottom: 0; border-top: 2px solid var(--ivory-2); padding-top: 12px; font-weight: 800; }
.ledger tr.total td:last-child { font-size: 26px; color: var(--brass); }
.ledger tr.minus td:last-child { color: var(--ivory-2); }
.ledger .detail { display: block; font-size: 13px; color: var(--ivory-3); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ivory-3); font-weight: 700; padding: 6px 8px 8px 0; }
table.data td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); }
table.data .r { text-align: right; padding-right: 0; }
table.data td.r { font-family: var(--display); font-size: 17px; font-weight: 700; }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding-top: 8px; }
.bars .bar { flex: 1; display: flex; flex-direction: column-reverse; min-width: 4px; height: 100%; }
.bars .bar i { display: block; border-radius: 3px 3px 0 0; }
.bars .bar i.s { background: var(--red); }
.bars .bar i.t { background: var(--brass); border-radius: 0; }
.bars-x { display: flex; gap: 4px; font-size: 10px; color: var(--ivory-3); margin-top: 4px; }
.bars-x span { flex: 1; text-align: center; overflow: hidden; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ivory-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ── Snooker tables — the signature: each card is the table seen from above ── */
.tables { display: grid; gap: 14px; }
@media (min-width: 760px) { .wide .tables { grid-template-columns: repeat(3, 1fr); } }
.tbl {
  position: relative; display: block; width: 100%; text-align: left; color: var(--ivory);
  padding: 14px; border-radius: 18px; border: 0;
  background: linear-gradient(160deg, #7A4E2E, var(--rail) 40%, var(--rail-dark));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.35);
}
.tbl .felt {
  position: relative; border-radius: 8px; padding: 18px 18px 16px; min-height: 150px;
  background: radial-gradient(120% 90% at 50% 40%, #1F6B45, #12462C 70%, #0D3622);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.25), inset 0 6px 18px rgba(0, 0, 0, 0.35);
  display: flex; flex-direction: column; justify-content: space-between;
}
.tbl.free .felt { background: radial-gradient(120% 90% at 50% 40%, #183F2B, #10301F 70%, #0B2618); }
.tbl .pocket { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #050c08; box-shadow: inset 0 2px 3px rgba(255,255,255,.06); }
.tbl .p1 { left: 5px; top: 5px; } .tbl .p2 { left: calc(50% - 8px); top: 3px; } .tbl .p3 { right: 5px; top: 5px; }
.tbl .p4 { left: 5px; bottom: 5px; } .tbl .p5 { left: calc(50% - 8px); bottom: 3px; } .tbl .p6 { right: 5px; bottom: 5px; }
.tbl .tname { font-family: var(--display); font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: 0.06em; position: relative; z-index: 1; }
.tbl .state { font-size: 13px; font-weight: 700; color: var(--ivory-2); }
.tbl .clock { font-family: var(--display); font-weight: 800; font-size: 54px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.tbl .meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; font-size: 14px; }
.tbl .meta .who-plays { font-weight: 700; }
.tbl .meta .est { font-family: var(--display); font-size: 24px; font-weight: 800; color: var(--brass); }
.tbl { cursor: pointer; }
.tbl .tab {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed rgba(240, 232, 212, 0.22); font-size: 14px; position: relative; z-index: 1;
  margin-left: 6px; margin-right: 6px; margin-bottom: 8px;
}
.tbl .tab .money { font-family: var(--display); font-size: 17px; }
.add-items {
  flex: none; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0;
  background: var(--chalk); color: var(--chalk-ink); font-weight: 800; font-size: 14px;
}
.add-items:active { filter: brightness(0.9); }
.tbl.free .clock { color: rgba(240, 232, 212, 0.25); font-size: 32px; }
.tbl.wait .felt { box-shadow: inset 0 0 0 3px var(--brass), inset 0 6px 18px rgba(0, 0, 0, 0.35); }
.tbl .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ivory-3); margin-right: 6px; }
.tbl.live .dot { background: #6BE39A; box-shadow: 0 0 0 4px rgba(107, 227, 154, 0.18); animation: pulse 2s ease-in-out infinite; }
.tbl.wait .dot { background: var(--brass); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(107, 227, 154, 0); } }
@media (prefers-reduced-motion: reduce) { .tbl.live .dot { animation: none; } }

/* ── Counter (tea + snooker items) ─────────────────────── */
.menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 420px) { .menu { grid-template-columns: repeat(3, 1fr); } }
.menu button {
  position: relative; min-height: 92px; padding: 12px; border-radius: 14px; text-align: left;
  border: 1px solid var(--line); background: var(--baize); display: flex; flex-direction: column; justify-content: space-between;
}
.menu button:active { background: var(--baize-3); }
.menu button.in { border-color: var(--chalk); background: var(--baize-2); }
.menu .nm { font-weight: 800; font-size: 16px; line-height: 1.2; }
.menu .pr { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--brass); }
.menu .q {
  position: absolute; top: -7px; right: -5px; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px;
  background: var(--chalk); color: var(--chalk-ink); font-family: var(--display); font-weight: 800; font-size: 18px; display: grid; place-items: center;
}
.cartbar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 25;
  display: flex; justify-content: center; padding: 10px 16px;
  background: linear-gradient(transparent, var(--hall) 35%);
}
.cartbar .btn { width: 100%; max-width: 528px; justify-content: space-between; }

/* ── Sheets (bottom drawers) ───────────────────────────── */
.sheet-back {
  position: fixed; inset: 0; z-index: 50; background: rgba(2, 8, 5, 0.66);
  display: flex; align-items: flex-end; justify-content: center; animation: fade 0.18s ease;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--baize); border-radius: 22px 22px 0 0; border: 1px solid var(--line-2); border-bottom: 0;
  padding: 10px 18px calc(22px + var(--safe-b)); animation: rise 0.22s cubic-bezier(.2, .8, .2, 1);
}
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 12px; }
.sheet h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 800; font-size: 28px; text-transform: uppercase; letter-spacing: 0.02em; }
.sheet .actions { display: grid; gap: 10px; margin-top: 20px; }
@media (min-width: 700px) { .sheet-back { align-items: center; } .sheet { border-radius: 22px; border-bottom: 1px solid var(--line-2); } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes drop { from { transform: translate(-50%, -16px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-back { animation: none; } }

/* Receipt */
.receipt { background: var(--hall); border: 1px solid var(--line-2); border-radius: 14px; padding: 18px 16px; }
.receipt .head { text-align: center; padding-bottom: 12px; border-bottom: 1px dashed var(--line-2); }
.receipt .head .biz { font-family: var(--display); font-weight: 800; font-size: 24px; text-transform: uppercase; letter-spacing: 0.04em; }
.receipt .head .meta { font-size: 13px; color: var(--ivory-3); }
.receipt .paid { text-align: center; margin-top: 12px; font-size: 13px; color: var(--ivory-2); }

/* Toast + offline */
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px); transform: translateX(-50%); z-index: 80;
  padding: 12px 18px; border-radius: 12px; background: var(--ivory); color: var(--hall); font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); max-width: calc(100% - 32px); animation: drop 0.2s ease;
}
.toast.bad { background: var(--red); color: var(--ivory); }
.offline {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90; text-align: center; padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 6px;
  background: var(--red); color: var(--ivory); font-weight: 700; font-size: 14px;
}

/* Sign in */
.gate { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; max-width: 420px; margin: 0 auto; padding: 32px 16px; }
.gate .rack { display: flex; gap: 6px; margin-bottom: 22px; }
.gate .rack i { width: 18px; height: 18px; border-radius: 50%; background: var(--red); box-shadow: inset -3px -3px 5px rgba(0,0,0,.35), inset 2px 2px 3px rgba(255,255,255,.25); }
.gate .rack i.cue { background: var(--ivory); margin-left: 14px; }
.gate h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 0.95; text-transform: uppercase; letter-spacing: 0.01em; }
.gate .place { color: var(--ivory-3); margin: 8px 0 26px; font-weight: 600; }

.menu-list a, .menu-list button.li {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 4px; text-align: left;
  color: var(--ivory); text-decoration: none; border: 0; border-bottom: 1px solid var(--line); background: none; font-weight: 700; font-size: 16px;
}
.menu-list svg { width: 22px; height: 22px; color: var(--chalk); flex: none; }
.menu-list .chev { margin-left: auto; color: var(--ivory-3); }

/* Counter list: every item with a big + button */
.plus-list { list-style: none; margin: 0; padding: 0; }
.plus-list li {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--baize);
}
.plus-list li.in { border-color: var(--chalk); background: var(--baize-2); }
.sheet .plus-list li { background: var(--hall); }
.sheet .plus-list li.in { background: var(--baize-2); }
.plus-list .nm { font-weight: 800; font-size: 17px; line-height: 1.25; }
.plus-list .pr { font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--brass); }
.plus-list .pr .faint { font-family: var(--body); font-size: 13px; font-weight: 600; }
.plus-list .plus {
  flex: none; width: 56px; height: 56px; border: 0; border-radius: 14px;
  background: var(--chalk); color: var(--chalk-ink); font-size: 34px; font-weight: 800; line-height: 1;
}
.plus-list .plus:active { filter: brightness(0.9); transform: scale(0.97); }
.plus-list .minus {
  flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2);
  background: transparent; color: var(--ivory); font-size: 26px; font-weight: 700; line-height: 1;
}
.plus-list .q { min-width: 26px; text-align: center; font-family: var(--display); font-size: 26px; font-weight: 800; }
@media (min-width: 760px) { .wide .plus-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .wide .plus-list li { margin: 0; } }

/* Shown when an update arrives while a sale is half done */
.update-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 85;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 14px;
  background: var(--ivory); color: var(--hall); font-weight: 800; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  max-width: calc(100% - 32px); white-space: nowrap;
}

.new-item { margin-top: 12px; }
.new-form .grid2 .field { margin-top: 12px; }

/* Table account: three quick buttons on each playing table */
.tbl .clock.amount { color: var(--brass); font-size: 40px; }
.tbl .tab .add-btn {
  flex: 1; min-height: 44px; border-radius: 10px; border: 0; font-weight: 800; font-size: 15px;
  background: rgba(240, 232, 212, 0.14); color: var(--ivory);
}
.tbl .tab .add-btn:active { background: rgba(240, 232, 212, 0.24); }
.tbl .tab .add-btn.pay { background: var(--chalk); color: var(--chalk-ink); }
/* Big game buttons */
.game-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.game-pick button {
  min-height: 64px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); text-align: left;
  background: var(--hall); color: var(--ivory); display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.game-pick button span { font-weight: 800; font-size: 16px; line-height: 1.2; }
.game-pick button small { color: var(--brass); font-weight: 700; font-size: 13px; }
.game-pick button.on { background: var(--ivory); color: var(--hall); border-color: var(--ivory); }
.game-pick button.on small { color: #8a5a10; }

/* Open day / Close day */
.top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.daybtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 800; border: 1px solid var(--line-2); background: var(--baize); color: var(--ivory);
}
.daybtn i { width: 8px; height: 8px; border-radius: 50%; background: #6BE39A; }
.daybtn small { font-size: 11px; font-weight: 800; color: var(--red); margin-left: 2px; }
.daybtn.is-closed { background: var(--chalk); border-color: var(--chalk); color: var(--chalk-ink); }
.day-closed {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px;
  padding: 10px 12px 10px 14px; border-radius: 14px; background: rgba(224, 80, 63, 0.14); border: 1px solid rgba(224, 80, 63, 0.4); font-size: 14px;
}
@media (max-width: 430px) { .who .nm { display: none; } .who { padding: 4px; } .top h1 { font-size: 26px; } }
.day-closed .btn, .daybtn { white-space: nowrap; }

/* Udhaar */
.seg.pay3 button.udhaar.on { background: var(--red); color: var(--ivory); }
.btn.udhaar-btn { background: var(--red); border-color: var(--red); color: var(--ivory); }
.btn.red-fill { background: var(--red); border-color: var(--red); color: var(--ivory); }
.confirm-back {
  position: fixed; inset: 0; z-index: 75; background: rgba(2, 8, 5, 0.72);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.confirm {
  width: 100%; max-width: 400px; background: var(--baize-2); border: 1px solid var(--line-2); border-radius: 18px; padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.confirm h3 { margin: 0 0 8px; font-family: var(--display); font-size: 26px; text-transform: uppercase; letter-spacing: 0.02em; }
.confirm p { margin: 0; color: var(--ivory-2); line-height: 1.5; }
.confirm strong { color: var(--ivory); }

/* Tea dashboard */
.progress { height: 14px; border-radius: 999px; background: var(--hall); border: 1px solid var(--line); overflow: hidden; margin: 12px 0 8px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass), #f0cb74); border-radius: 999px; }
.sell-tea .stepper button { width: 54px; height: 54px; font-size: 26px; }
.sell-tea .stepper output { min-width: 60px; font-size: 30px; }
.cost-row { display: grid; grid-template-columns: 1.6fr .8fr .8fr 1fr auto; gap: 6px; margin-top: 8px; align-items: center; }
.cost-row .input { min-height: 44px; padding: 8px 10px; font-size: 15px; }
.sell-tea .btn.big { font-size: 16px; padding: 0 10px; white-space: nowrap; }

/* Pending (snooker) */
.seg.pay3 button.pend.on { background: var(--brass); color: var(--hall); }
.btn.pend-btn { background: var(--brass); border-color: var(--brass); color: var(--hall); }
.seg.pay3 button { font-size: 13px; padding: 0 4px; }

/* Dashboard: hide / show sales */
.eye { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ivory-2); font-size: 13px; font-weight: 800; }
.eye svg { width: 18px; height: 18px; }
