:root {
  --bg: #0d0c0b;
  --panel: #181614;
  --panel-2: #211e1b;
  --line: #2f2b27;
  --text: #f4eee3;
  --muted: #a59c8e;
  --dim: #6f675c;
  --cream: #f4eee3;
  --ink: #0d0c0b;
  --free: #3fae5a;
  --seated: #4f8fd6;
  --dirty: #e0a526;
  --late: #d8463b;
  --gold: #d9b26a;
  --r: 14px;
  --display: 'Rye', Georgia, serif;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; }
body { overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
input, select, textarea { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
[hidden] { display: none !important; }
#app { height: 100%; display: flex; flex-direction: column; }

/* ---------- wordmark (rebuilt from the logo; logo.png replaces it if present) ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 44px; display: block; filter: invert(1); }
.wm { display: inline-grid; grid-template-columns: auto auto; background: #000; color: #fff; padding: 6px 8px 5px 12px; border: 1.5px solid #fff; border-radius: 3px; line-height: 1; }
.wm-main { font-family: var(--display); font-size: 22px; letter-spacing: .5px; grid-column: 1; }
.wm-cafe { grid-column: 2; grid-row: 1 / span 2; writing-mode: vertical-rl; font-family: var(--cond); font-weight: 700; font-size: 9px; letter-spacing: 1.5px; margin-left: 6px; border-left: 1.5px solid #fff; padding-left: 3px; display: flex; align-items: center; }
.wm-sub { grid-column: 1; font-family: var(--cond); font-weight: 600; font-size: 9.5px; letter-spacing: 2px; margin-top: 3px; text-align: center; }
.wm.big .wm-main { font-size: 46px; }
.wm.big .wm-cafe { font-size: 15px; margin-left: 10px; padding-left: 6px; letter-spacing: 3px; }
.wm.big .wm-sub { font-size: 17px; letter-spacing: 4px; margin-top: 6px; }
.wm.big { padding: 12px 14px 10px 22px; border-width: 2px; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; gap: 16px; padding: 10px 18px; padding-top: max(10px, env(safe-area-inset-top)); background: #000; border-bottom: 1px solid var(--line); flex: none; }
.top .screen { font-family: var(--cond); font-weight: 700; font-size: 20px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.top .spacer { flex: 1; }
.top .who { font-weight: 600; color: var(--muted); font-size: 15px; }
.clock { font-family: var(--cond); font-weight: 600; font-size: 22px; letter-spacing: 1px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--free); display: inline-block; box-shadow: 0 0 0 3px rgba(63,174,90,.2); }
.dot.off { background: var(--late); box-shadow: 0 0 0 3px rgba(216,70,59,.25); }
.chip-btn { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 600; }
.chip-btn:active { background: var(--panel-2); }

.nav { display: flex; gap: 6px; padding: 10px 18px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; }
.nav button { padding: 10px 18px; border-radius: 10px; font-family: var(--cond); font-weight: 700; font-size: 18px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.nav button.on { background: var(--cream); color: var(--ink); }
.nav .badge { margin-left: 6px; }

.main { flex: 1; min-height: 0; overflow: auto; }
.pad { padding: 18px; }

/* ---------- generic ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; font-size: 17px; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn.go { background: var(--free); color: #04140a; border-color: var(--free); }
.btn.warn { background: var(--dirty); color: #1d1503; border-color: var(--dirty); }
.btn.danger { background: transparent; color: var(--late); border-color: rgba(216,70,59,.5); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--late); color: #fff; font-family: var(--body); font-weight: 700; font-size: 13px; letter-spacing: 0; }
.badge.soft { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.h { font-family: var(--cond); font-weight: 700; font-size: 22px; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.empty { padding: 40px 20px; text-align: center; color: var(--dim); font-size: 17px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.money { font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; background: var(--panel-2); color: var(--muted); }
.tag.sent { background: rgba(79,143,214,.15); color: #8fb9ea; }
.tag.ready { background: rgba(63,174,90,.18); color: #7fd394; }
.tag.served { background: transparent; color: var(--dim); }
.tag.void { background: rgba(216,70,59,.15); color: #ef8a82; }
.tag.alert { background: var(--dirty); color: #1d1503; }

/* ---------- welcome ---------- */
.welcome { min-height: 100%; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 40px 16px; text-align: center; }
.welcome h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(36px, 7vw, 64px); color: #fff; letter-spacing: 1px; }
.welcome .btn { min-width: 220px; min-height: 64px; font-size: 22px; letter-spacing: 1px; border-radius: 999px; }

/* ---------- device picker + PIN ---------- */
.picker { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 36px; background: radial-gradient(ellipse at top, #1f1b17, var(--bg) 70%); }
.picker p { margin: 0; color: var(--muted); text-align: center; font-size: 17px; }
/* 3 across, then the last row centred — every tile the same size */
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; width: min(960px, 100%); }
.tile { flex: 0 0 calc((100% - 32px) / 3); text-align: left; padding: 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); min-height: 180px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 760px) { .tile { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 480px) { .tile { flex-basis: 100%; min-height: 0; } }
.tile:active { background: var(--panel-2); }
.tile .ico { font-size: 30px; }
.tile b { font-family: var(--cond); font-size: 26px; letter-spacing: 1px; text-transform: uppercase; }
.tile span { color: var(--muted); font-size: 15px; line-height: 1.35; }
.pin-box { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.pin-dots { display: flex; gap: 16px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dots i.on { background: var(--cream); border-color: var(--cream); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 84px); gap: 12px; }
.keypad button { height: 84px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); font-size: 30px; font-weight: 600; }
.keypad button:active { background: var(--cream); color: var(--ink); }

/* ---------- floor map ---------- */
.floor { position: relative; width: 100%; aspect-ratio: 1.55; min-height: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.zone { position: absolute; border: 1px dashed #3a352f; border-radius: 12px; }
.zone label { position: absolute; top: 8px; left: 12px; font-family: var(--cond); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); font-size: 14px; }
.tbl { position: absolute; width: 11%; height: 17%; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 2px solid var(--free); background: rgba(63,174,90,.1); padding: 4px; overflow: hidden; }
.tbl.rd { border-radius: 50%; width: 11%; }
.tbl .stage { font-size: 11px; padding: 1px 5px; margin-top: 2px; }
.tbl.booth { border-radius: 12px 12px 26px 26px; }
.tbl .n { font-family: var(--cond); font-weight: 700; font-size: clamp(18px, 2.2vw, 28px); line-height: 1; }
.tbl .s { font-size: 12px; color: var(--muted); }
.tbl .g { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tbl.seated { border-color: var(--seated); background: rgba(79,143,214,.16); }
.tbl.dirty { border-color: var(--dirty); background: rgba(224,165,38,.16); }
/* status pill under a seated table — wraps rather than cutting words off */
.stage { display: inline-block; margin-top: 3px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1.25; text-align: center; white-space: normal; max-width: 100%; font-variant-numeric: tabular-nums; }
.stage.s-count { background: rgba(255,255,255,.08); color: var(--text); }
.stage.s-count.due { background: var(--late); color: #fff; animation: pulse 1.4s infinite; }
.stage.s-wait { background: rgba(224,165,38,.18); color: #f0c25e; }
.stage.s-clear { background: var(--dirty); color: #1d1503; }
.stage.s-deliver { background: #1c9c9c; color: #fff; }
.stage.s-ready { background: var(--free); color: #04140a; }
.stage.s-done { background: rgba(255,255,255,.06); color: var(--muted); }
.tbtn .stage { font-size: 13px; }
.tbl.held, .tbtn.held { border-color: #8f74d6; background: rgba(143,116,214,.16); }
.legend .h::before { background: #8f74d6; }
.tbl.fits { box-shadow: 0 0 0 4px rgba(244,238,227,.35); }
.tbl .flags { position: absolute; top: 4px; right: 6px; font-size: 13px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; font-weight: 600; color: var(--muted); }
.legend span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 7px; vertical-align: -1px; }
.legend .f::before { background: var(--free); } .legend .se::before { background: var(--seated); } .legend .d::before { background: var(--dirty); }

/* ---------- host ---------- */
.host { display: grid; grid-template-columns: minmax(320px, 380px) 1fr; gap: 18px; padding: 18px; height: 100%; }
.host > div { min-height: 0; overflow: auto; }
.wait { padding: 14px; margin-bottom: 10px; display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; }
.wait .size { width: 52px; height: 52px; border-radius: 12px; background: var(--cream); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--cond); font-weight: 700; font-size: 24px; line-height: 1; }
.wait .size small { font-size: 10px; letter-spacing: 1px; }
.wait .nm { font-weight: 700; font-size: 18px; }
.wait .meta { color: var(--muted); font-size: 14px; margin-top: 2px; }

.sizes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.sizes button { height: 56px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 20px; font-weight: 700; }
.sizes button.on { background: var(--cream); color: var(--ink); }

/* ---------- order pad ---------- */
.orderpad { display: grid; grid-template-columns: 150px 1fr minmax(320px, 380px); height: 100%; min-height: 0; }
.cats { background: var(--panel); border-right: 1px solid var(--line); overflow: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.cats button { text-align: left; padding: 14px 12px; border-radius: 10px; font-family: var(--cond); font-weight: 700; font-size: 18px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.cats button.on { background: var(--cream); color: var(--ink); }
.cats .sep { height: 1px; background: var(--line); margin: 8px 4px; }
.items { overflow: auto; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; }
.item { position: relative; min-height: 96px; padding: 0; overflow: hidden; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-align: left; display: flex; flex-direction: column; justify-content: flex-start; }
.item .ph { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--panel-2); }
.item .ib { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 10px 12px 12px; }
.item .ph + .ib b { font-size: 15px; }
.item .opt { background: rgba(0,0,0,.6); color: #fff !important; padding: 0 8px; border-radius: 8px; }
.sheet-ph { display: block; width: calc(100% + 44px); margin: -22px -22px 0; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 20px 20px 0 0; }
.thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 8px; flex: none; }
.item:active { background: var(--panel-2); transform: scale(.98); }
.item b { font-size: 16px; line-height: 1.2; }
.item .p { color: var(--gold); font-weight: 700; }
.item.drink { border-left: 4px solid #4f8fd6; }
.item.food { border-left: 4px solid var(--gold); }
.item.out { opacity: .35; pointer-events: none; }
.item.out::after { content: '86'; position: absolute; top: 8px; right: 10px; font-family: var(--cond); font-weight: 700; color: var(--late); font-size: 20px; }
.item .opt { position: absolute; top: 10px; right: 10px; color: var(--dim); font-size: 13px; }

.ticket { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.ticket-head { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.target { width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.target b { font-family: var(--cond); font-size: 22px; letter-spacing: .5px; text-transform: uppercase; }
.lines { flex: 1; overflow: auto; padding: 8px 16px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line .mods { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.line .note { grid-column: 1 / -1; color: var(--dirty); font-size: 14px; }
.line.old { opacity: .55; }
.line.voided .nm { text-decoration: line-through; }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 34px; height: 34px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); font-size: 20px; font-weight: 700; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.sect { font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: 1.5px; color: var(--dim); text-transform: uppercase; margin: 12px 0 2px; }
.ticket-foot { padding: 14px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.totals { display: flex; justify-content: space-between; align-items: baseline; }
.totals b { font-size: 28px; font-family: var(--cond); }
.foot-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- lists ---------- */
.list { display: grid; gap: 10px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tabcard { padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.tabcard .t { font-family: var(--cond); font-weight: 700; font-size: 24px; letter-spacing: .5px; text-transform: uppercase; }
.tabcard.alert { border-color: var(--dirty); box-shadow: 0 0 0 2px rgba(224,165,38,.3); }

/* ready-to-run strip */
.runs { display: grid; gap: 10px; margin-bottom: 18px; }
.run { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: rgba(63,174,90,.12); border: 1px solid rgba(63,174,90,.5); }
.run .t { font-family: var(--cond); font-weight: 700; font-size: 26px; min-width: 80px; }
.run.bar { background: rgba(79,143,214,.12); border-color: rgba(79,143,214,.5); }
.run.claimed { background: rgba(224,165,38,.1); border-color: rgba(224,165,38,.55); }
.run .serving { color: var(--dirty); font-weight: 700; font-size: 17px; margin: 2px 0; }
.kt-wait.serving { background: #b9820f; }

.tablegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tbtn { position: relative; min-height: 100px; border-radius: 14px; border: 2px solid var(--free); background: rgba(63,174,90,.08); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; gap: 2px; }
.tbtn .n { font-family: var(--cond); font-weight: 700; font-size: 32px; line-height: 1; }
.tbtn .g { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbtn .s { font-size: 12px; color: var(--muted); }
.tbtn.seated { border-color: var(--seated); background: rgba(79,143,214,.14); }
.tbtn.dirty { border-color: var(--dirty); background: rgba(224,165,38,.12); }
.tbtn .flags { position: absolute; top: 6px; right: 8px; font-size: 14px; }

/* ---------- kitchen TV ---------- */
.kds { background: #050505; }
.kds .top { background: #000; }
.allday { display: flex; gap: 8px; padding: 10px 18px; background: #111; border-bottom: 1px solid #222; overflow-x: auto; white-space: nowrap; flex: none; font-family: var(--cond); font-size: 20px; font-weight: 600; }
.allday b { color: var(--gold); margin-right: 6px; letter-spacing: 1px; }
.allday span { padding: 2px 10px; background: #1b1b1b; border-radius: 6px; }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 14px; align-content: start; }
.kt { background: #f6f1e7; color: #111; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.kt-head { padding: 10px 14px; background: #2b6b3a; color: #fff; display: flex; align-items: center; gap: 10px; }
.kt.warn .kt-head { background: #b9820f; }
.kt.late .kt-head { background: #b4291f; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { filter: brightness(1.25); } }
.kt-head .t { font-family: var(--cond); font-weight: 700; font-size: 30px; letter-spacing: .5px; line-height: 1; text-transform: uppercase; }
.kt-head .el { font-family: var(--cond); font-weight: 700; font-size: 26px; margin-left: auto; font-variant-numeric: tabular-nums; }
.kt-sub { padding: 6px 14px; font-size: 15px; font-weight: 600; color: #555; border-bottom: 1px solid #ddd5c6; display: flex; justify-content: space-between; }
.kt-items { padding: 4px 0; flex: 1; }
.kt-item { width: 100%; text-align: left; padding: 9px 14px; display: grid; grid-template-columns: 40px 1fr; gap: 0 6px; color: #111; border-bottom: 1px dashed #ddd5c6; }
.kt-item .q { font-family: var(--cond); font-weight: 700; font-size: 28px; line-height: 1; }
.kt-item .nm { font-weight: 700; font-size: 21px; line-height: 1.15; }
.kt-item .md { grid-column: 2; font-family: var(--cond); font-weight: 600; font-size: 18px; text-transform: uppercase; color: #8a2b20; letter-spacing: .5px; }
.kt-item .nt { grid-column: 2; font-weight: 700; font-size: 17px; background: #ffe58a; padding: 2px 6px; border-radius: 4px; margin-top: 3px; justify-self: start; }
.kt-item.done { opacity: .35; }
.kt-item.done .nm { text-decoration: line-through; }
.bump { margin: 10px; height: 60px; border-radius: 10px; background: #111; color: #fff; font-family: var(--cond); font-weight: 700; font-size: 26px; letter-spacing: 3px; }
.bump:active { background: var(--free); }
.kt.ready { background: #e3edf8; }
.kt.ready .kt-head { background: #2563a8; }
.kt.ready .kt-item { opacity: .6; }
.kt-wait { padding: 8px 14px; background: #2563a8; color: #fff; font-weight: 700; font-size: 16px; border-top: 1px solid rgba(255,255,255,.2); }
.bump.undo { background: transparent; color: #2563a8; border: 2px solid #2563a8; font-size: 20px; height: 48px; }
.recent { flex: none; display: flex; gap: 8px; align-items: center; padding: 10px 18px; background: #0c0c0c; border-top: 1px solid #222; overflow-x: auto; }
.recent .lbl { font-family: var(--cond); font-weight: 700; letter-spacing: 2px; color: var(--dim); margin-right: 6px; white-space: nowrap; }
.kds .empty { font-size: 26px; font-family: var(--cond); letter-spacing: 2px; padding-top: 18vh; }

/* ---------- owner ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .l { font-family: var(--cond); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-size: 15px; }
.kpi .v { font-family: var(--cond); font-weight: 700; font-size: 38px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { color: var(--dim); font-size: 14px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; margin-bottom: 14px; }
.cols .card { padding: 18px; }
.chart svg { width: 100%; height: auto; display: block; }
.bars-h { display: grid; gap: 8px; }
.bar-h { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 15px; }
.bar-h .track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.bar-h .track i { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { text-align: left; font-family: var(--cond); letter-spacing: 1px; text-transform: uppercase; color: var(--dim); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.out td { opacity: .45; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { padding: 8px 14px; border-radius: 8px; font-weight: 700; color: var(--muted); font-size: 14px; }
.seg button.on { background: var(--cream); color: var(--ink); }
.split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--panel-2); margin: 10px 0 8px; }
.split i { display: block; height: 100%; }

/* ---------- modal ---------- */
#modal:empty { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.sheet.wide { width: min(760px, 100%); }
.sheet h2 { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 30px; letter-spacing: 1px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.sheet h2 .x { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; background: var(--panel-2); font-size: 22px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--cond); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-size: 15px; }
.field input, .field select, .field textarea { width: 100%; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 18px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--cream); outline-offset: -1px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts button { padding: 12px 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 16px; }
.opts button.on { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.opts button small { color: var(--gold); margin-left: 4px; }
.opts button.on small { color: #6b4a10; }
.req { color: var(--late); font-size: 13px; margin-left: 6px; letter-spacing: 0; }
.sheet-foot { display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
.bigdue { text-align: center; padding: 10px 0; }
.bigdue .l { color: var(--muted); font-family: var(--cond); letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }
.bigdue .v { font-family: var(--cond); font-weight: 700; font-size: 64px; line-height: 1.1; }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.methods button { height: 74px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; font-size: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.methods button.on { background: var(--cream); color: var(--ink); }
.methods button span { font-size: 24px; }
.cashkeys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cashkeys button { height: 56px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; font-size: 18px; }
.change { text-align: center; font-family: var(--cond); font-size: 30px; font-weight: 700; color: var(--free); }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 99; display: grid; gap: 8px; pointer-events: none; }
#toast div { background: var(--cream); color: var(--ink); padding: 14px 22px; border-radius: 12px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: fade .2s; }
#toast div.err { background: var(--late); color: #fff; }

.wm-main { white-space: nowrap; }
@media (max-width: 600px) {
  .wm.big .wm-main { font-size: clamp(26px, 8.5vw, 46px); }
  .wm.big .wm-sub { font-size: clamp(10px, 3vw, 17px); letter-spacing: 2px; }
  .top { gap: 8px; padding: 8px 12px; }
  .top .brand .wm-main { font-size: 17px; }
  .top .who, .top .clock { display: none; }
  .pad { padding: 14px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .v { font-size: 26px; }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .host { grid-template-columns: 1fr; height: auto; }
  .orderpad { grid-template-columns: 110px 1fr; grid-template-rows: 1fr auto; }
  .ticket { grid-column: 1 / -1; max-height: 45vh; border-left: 0; border-top: 1px solid var(--line); }
  .cats button { font-size: 15px; padding: 12px 8px; }
  .top .screen { display: none; }
}

/* live timer under each table (seated / needs clearing / held) */
.tmr { margin-top: 3px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.35); color: var(--text, #f4eee3); white-space: nowrap; }
.tmr.t-seated { color: #9cc4ef; }
.tmr.t-dirty { color: #f0c463; }
.tmr.t-held { color: #b9a6ee; }
.tbtn .tmr { font-size: 14px; margin-top: 4px; }
