:root {
  --bg: #0d0a17;
  --panel: #161126;
  --panel2: #1f1834;
  --panel3: #2a2145;
  --line: #2f2752;
  --text: #f2eeff;
  --muted: #a39bc6;
  --pink: #ff3ea5;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 14px;
  --glow: 0 0 18px rgba(255, 62, 165, .45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 600px at 100% -10%, #2a0f3d 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
h1, h2, h3, h4 { margin: 0; }
h1 { font-size: 1.5rem; }
h3 { font-size: 1.05rem; margin-bottom: 10px; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 8px; }
small { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.pad { padding: 20px; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.neon { color: #fff; text-shadow: 0 0 6px var(--pink), 0 0 22px var(--pink), 0 0 42px var(--violet); }

input, select, textarea {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; width: 100%; min-width: 0; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 62, 165, .2); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--pink); }
input[type=date] { width: auto; color-scheme: dark; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel3); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-weight: 600; white-space: nowrap; transition: transform .06s, background .15s;
}
.btn:hover:not(:disabled) { background: #362a59; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--pink), var(--violet)); border-color: transparent; color: #fff; }
.btn.primary:hover:not(:disabled) { box-shadow: var(--glow); }
.btn.danger { background: rgba(239, 68, 68, .15); border-color: rgba(239, 68, 68, .5); color: #fca5a5; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn.big { padding: 14px; font-size: 1.05rem; }
.icon { background: var(--panel3); border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; }
.x { background: none; border: 0; font-size: 1.1rem; color: var(--muted); padding: 4px 8px; }
.chip {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; white-space: nowrap; font-weight: 500;
}
.chip.on { background: linear-gradient(135deg, var(--pink), var(--violet)); border-color: transparent; color: #fff; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; background: var(--panel3); color: var(--muted); }
.pill.paid { background: rgba(34, 197, 94, .15); color: #86efac; }
.pill.open { background: rgba(34, 211, 238, .15); color: #67e8f9; }
.pill.void { background: rgba(239, 68, 68, .15); color: #fca5a5; }
.pill.warn { background: rgba(245, 158, 11, .15); color: #fcd34d; }
.pill.star { background: rgba(255, 62, 165, .18); color: #f9a8d4; }

/* ---------- login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; text-align: center; background: rgba(22, 17, 38, .85); border: 1px solid var(--line); border-radius: 22px; padding: 28px 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.login-logo { font-size: 3rem; filter: drop-shadow(0 0 16px var(--pink)); }
.login-card h1 { font-size: 1.7rem; margin-top: 6px; }
.login-card p { margin: 6px 0; }
.dots { display: flex; justify-content: center; gap: 14px; margin: 16px 0; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--violet); }
.dots i.on { background: var(--pink); border-color: var(--pink); box-shadow: var(--glow); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 0; font-size: 1.4rem; font-weight: 600; }
.keypad button:active { background: var(--panel3); transform: scale(.96); }
.hint { font-size: .82rem; color: #fcd34d; background: rgba(245, 158, 11, .1); border-radius: 10px; padding: 8px; margin-top: 14px !important; }
.net-line { font-size: .82rem; color: var(--muted); margin-top: 14px !important; display: flex; justify-content: center; align-items: center; gap: 8px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 220px 1fr; height: 100vh; height: 100dvh; }
.nav { background: rgba(22, 17, 38, .92); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; padding: 16px 10px; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 6px; }
.brand .logo { font-size: 1.8rem; filter: drop-shadow(0 0 10px var(--pink)); }
.brand b { display: block; line-height: 1.15; }
.brand small { font-size: .75rem; }
.nav nav { display: flex; flex-direction: column; gap: 4px; }
.nav-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; border-radius: 10px; padding: 10px 12px; text-align: left; position: relative; }
.nav-btn em { font-style: normal; font-weight: 500; }
.nav-btn:hover { background: var(--panel2); }
.nav-btn.on { background: linear-gradient(135deg, rgba(255, 62, 165, .25), rgba(139, 92, 246, .25)); box-shadow: inset 3px 0 0 var(--pink); }
.nav-btn .badge { margin-left: auto; font-style: normal; background: var(--pink); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 7px; }
.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 6px; }
.me b { display: block; }
.me small { text-transform: capitalize; }
.net { font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.net::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.net.off { color: #fcd34d; }
.net.off::before { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.main { overflow-y: auto; min-width: 0; }
.sync { font-size: .78rem; font-weight: 600; color: var(--muted); }
.sync.on { color: #86efac; }
.sync.busy { color: #67e8f9; }
.sync.warn { color: #fcd34d; }
.sync.err { color: #fca5a5; }

/* ---------- pages ---------- */
.page { padding: 20px; max-width: 1400px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label:not(.check) { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.form label.btn { color: var(--text); font-size: 1rem; }
.check { display: flex; align-items: center; gap: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.big { font-size: 3rem; }
.list-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 8px; }
.list-row:hover, tr.click:hover td { background: var(--panel2); }
.click { cursor: pointer; }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: 1fr 390px; height: 100%; }
.pos-menu { display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 0; min-width: 0; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.items { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; align-content: start; padding-bottom: 10px; }
.item {
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; min-height: 108px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; position: relative;
  transition: border-color .15s, transform .06s;
}
.item:hover:not(:disabled) { border-color: var(--pink); }
.item:active:not(:disabled) { transform: scale(.97); }
.item .ic { font-size: 1.3rem; }
.item b { font-weight: 600; line-height: 1.2; }
.item .price { margin-top: auto; color: var(--cyan); font-weight: 700; }
.item .stock { position: absolute; top: 8px; right: 8px; font-size: .7rem; color: var(--muted); }
.item .stock.low { color: #fcd34d; }
.item.out { opacity: .5; }

.ticket { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ticket-head b { font-size: 1.1rem; display: block; }
.ticket-empty { padding: 30px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; overflow-y: auto; }
.mini-list { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.mini { display: flex; justify-content: space-between; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.lines { flex: 1; overflow-y: auto; padding: 6px 10px; }
.line { display: grid; grid-template-columns: 1fr auto 78px; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px dashed var(--line); }
.ln-main { cursor: pointer; min-width: 0; }
.ln-main b { font-weight: 500; display: block; }
.ln-main .note { display: block; color: var(--amber); }
.ln-main .tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--green); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); font-size: 1.1rem; line-height: 1; }
.qty span { min-width: 20px; text-align: center; font-weight: 700; }
.ln-amt { text-align: right; font-variant-numeric: tabular-nums; }
.tot { padding: 10px 16px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tot div { display: flex; justify-content: space-between; padding: 2px 0; color: var(--muted); }
.tot .disc { color: #86efac; }
.tot .grand { color: var(--text); font-size: 1.3rem; font-weight: 800; padding-top: 6px; }
.ticket-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 16px 16px; }
.ticket-actions .pay { grid-column: 1 / -1; padding: 16px; font-size: 1.15rem; }
.roombar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 16px 0; padding: 10px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); font-size: .9rem; }
.roombar.on { border-color: var(--pink); box-shadow: var(--glow); }

/* ---------- tables ---------- */
.area { margin: 18px 0 10px; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.tgrid.sm { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.tcard {
  border-radius: var(--radius); padding: 14px 10px; min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid var(--line); background: var(--panel); text-align: center;
}
.tcard b { font-size: 1.05rem; }
.tcard .amt { color: var(--cyan); font-weight: 700; }
.tcard.free { border-color: rgba(34, 197, 94, .45); }
.tcard.busy { border-color: var(--pink); background: linear-gradient(180deg, rgba(255, 62, 165, .16), var(--panel)); }
.tcard.singing { box-shadow: var(--glow); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 4px rgba(255, 62, 165, .2); } }
.legend { display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.legend .free { border: 2px solid var(--green); }
.legend .busy { background: var(--pink); }
.legend .singing { background: var(--pink); box-shadow: var(--glow); }

/* ---------- tables (data) ---------- */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.grid-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.grid-table th, .grid-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.grid-table tr:last-child td { border-bottom: 0; }
.grid-table .r { text-align: right; }
.grid-table .low { color: #fcd34d; font-weight: 700; }
.grid-table.compact td { padding: 6px 4px; white-space: normal; }
tr.dim td { opacity: .5; }

/* ---------- KDS ---------- */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-top: 5px solid var(--cyan); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.kcard.preparing { border-top-color: var(--amber); }
.kcard.ready { border-top-color: var(--green); background: linear-gradient(180deg, rgba(34, 197, 94, .12), var(--panel)); }
.kcard.warn:not(.ready) { border-color: var(--amber); }
.kcard.late:not(.ready) { border-color: var(--red); box-shadow: 0 0 16px rgba(239, 68, 68, .35); }
.khead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.khead b { font-size: 1.1rem; }
.kmeta { font-size: .8rem; color: var(--muted); }
.kcard ul { margin: 0; padding: 0; list-style: none; }
.kcard li { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 1.05rem; }
.kcard li em { display: block; color: var(--amber); font-size: .9rem; }
.kfoot { display: flex; gap: 8px; }
.kfoot .btn { flex: 1; }

/* ---------- karaoke ---------- */
.kgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.col { display: flex; flex-direction: column; gap: 16px; }
.now-card {
  border-radius: var(--radius); padding: 22px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center;
  background: radial-gradient(circle at 50% 0%, rgba(255, 62, 165, .35), transparent 70%), var(--panel); border: 1px solid var(--pink); box-shadow: var(--glow);
}
.now-card small:first-child { letter-spacing: .2em; color: #f9a8d4; font-weight: 700; }
.now-card h2 { font-size: 1.8rem; }
.now-card p { margin: 0 0 8px; font-size: 1.05rem; }
.queue { margin: 0; padding: 0; list-style: none; counter-reset: q; }
.queue li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); counter-increment: q; }
.queue li > div:first-child { min-width: 0; }
.queue li > div:first-child::before { content: counter(q); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--panel3); font-size: .75rem; margin-right: 8px; }
.queue small { display: block; margin-left: 30px; }
.queue .row { gap: 4px; flex-shrink: 0; }
.room-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; flex-wrap: wrap; }
.room-row small { display: block; }
.room-row.on { border-color: var(--pink); box-shadow: var(--glow); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--cyan); }

/* TV screen */
.tv {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4vh; padding: 4vh 4vw; text-align: center;
  background: radial-gradient(circle at 50% 30%, #3b0a4f 0%, #0d0a17 65%);
}
.tv-brand { font-size: clamp(1.4rem, 4vw, 3.4rem); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tv-now small, .tv-next small { letter-spacing: .3em; color: #f9a8d4; font-weight: 700; font-size: clamp(.8rem, 1.6vw, 1.3rem); }
.tv-now h1 { font-size: clamp(2.4rem, 9vw, 8rem); line-height: 1.05; text-shadow: 0 0 30px var(--pink); margin: 1vh 0; }
.tv-now h2 { font-size: clamp(1.2rem, 3.5vw, 3rem); font-weight: 500; }
.tv-now em { color: var(--muted); font-style: normal; }
.tv-next ol { list-style: none; padding: 0; margin: 1vh 0 0; font-size: clamp(1rem, 2.4vw, 2rem); display: flex; flex-direction: column; gap: .6vh; }
.tv-next b { color: var(--cyan); }
.tv-hint { position: absolute; bottom: 14px; color: var(--muted); font-size: .85rem; margin: 0; }

/* ---------- reports ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi b { display: block; font-size: 1.5rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 10px; padding: 5px 0; font-size: .9rem; }
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 10px; background: var(--panel2); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--pink)); border-radius: 999px; }
.bar-row b { font-variant-numeric: tabular-nums; }

/* ---------- settings ---------- */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.emoji-in { width: 64px; flex: none; text-align: center; }

/* ---------- modal & toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(5, 3, 12, .7); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-head h2 { font-size: 1.15rem; }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.modal-body h3 { margin: 6px 0 0; }
@keyframes fade { from { opacity: 0; } }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.pay-grid div { background: var(--panel2); border-radius: 10px; padding: 10px; }
.pay-grid b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pay-grid .due { background: linear-gradient(135deg, rgba(255, 62, 165, .25), rgba(139, 92, 246, .25)); }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.plist li span { flex: 1; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; color: var(--text); font-weight: 600; white-space: nowrap; }
.seg input:checked + span { background: linear-gradient(135deg, var(--pink), var(--violet)); border-color: transparent; color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--cyan); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.done h2 { font-size: 1.5rem; }
.change { font-size: 1.2rem; }
.change b { color: var(--green); font-size: 1.6rem; }
.receipt-preview { background: #fff; color: #111; border-radius: 10px; padding: 14px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 200;
  background: var(--panel3); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); transition: .25s; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { border-color: var(--red); background: #3a1424; }

/* ---------- receipt (print) ---------- */
#print-area { display: none; }
.receipt { font: 12px/1.35 "Courier New", monospace; color: #000; }
.receipt h2 { text-align: center; font-size: 16px; margin-bottom: 4px; }
.receipt p { margin: 4px 0; text-align: center; }
.receipt .rc-type { font-weight: 700; }
.receipt table { width: 100%; border-collapse: collapse; margin: 6px 0; border-top: 1px dashed #000; }
.receipt td { padding: 2px 0; vertical-align: top; }
.receipt td:last-child { text-align: right; white-space: nowrap; padding-left: 8px; }
.receipt .grand td { font-weight: 700; font-size: 14px; border-top: 1px solid #000; padding-top: 4px; }
.receipt .foot { margin-top: 10px; }
.receipt small { color: #444; }

/* guest requests & CRM */
.kcard.req { border-top-color: var(--pink); }
.kcard.req.waiter, .kcard.req.bill { border-top-color: var(--amber); }
.kcard.req.song { border-top-color: var(--violet); }
.req-note { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--panel2); }
.btn.cust-on { border-color: var(--pink); color: #f9a8d4; }
tr.today td { background: rgba(255, 62, 165, .08); }
a.btn { text-decoration: none; }

/* clock-in, expenses, profit */
.btn.clock.on { border-color: var(--green); color: #86efac; }
.exp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.kpis.two-k { grid-template-columns: 1fr 1fr; margin: 0; }
.tcard .btn { margin-top: 6px; }
.profit { margin-bottom: 16px; max-width: 640px; }
.pl-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.pl-row.minus b { color: #fca5a5; }
.pl-row.total { border-bottom: 0; font-size: 1.25rem; font-weight: 800; }
.pl-row.total b { color: #86efac; }
.pl-row.total.neg b { color: #fca5a5; }
.profit p { margin: 10px 0 0; }
@media (max-width: 860px) { .exp-grid { grid-template-columns: minmax(0, 1fr); } }

/* QR sheet (A4) */
.qr-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10mm; font-family: system-ui, sans-serif; color: #000; }
.qr-card { border: 1.5px dashed #999; border-radius: 6mm; padding: 6mm; text-align: center; break-inside: avoid; }
.qr-card h3 { margin: 0; font-size: 16pt; }
.qr-card .qr-tag { margin: 1mm 0 3mm; font-size: 9pt; letter-spacing: .1em; text-transform: uppercase; }
.qr-card .qr svg { width: 55mm; height: 55mm; }
.qr-card .qr-table { font-size: 22pt; font-weight: 800; margin: 2mm 0; }
.qr-card p { margin: 1mm 0; font-size: 10pt; }

@media print {
  #print-area.a4 { width: auto; }
  body { background: #fff; }
  #app, #modal-root, #toast { display: none !important; }
  #print-area { display: block; width: 72mm; }
  @page { margin: 4mm; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .pos { grid-template-columns: 1fr 340px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .page-head .row { flex-wrap: wrap; }
  .kgrid, .pos { grid-template-columns: minmax(0, 1fr) !important; }
  .sgrid, .rgrid { grid-template-columns: minmax(0, 1fr) !important; }
  .nav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { flex: 1; padding: 0; }
  .brand small, .me { display: none; }
  .nav-foot { margin: 0; flex-direction: row; align-items: center; padding: 0; }
  .nav nav { order: 3; width: 100%; flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .nav-btn { flex-direction: column; gap: 2px; padding: 6px 10px; font-size: .78rem; flex-shrink: 0; }
  .nav-btn .ni { font-size: 1.15rem; }
  .nav-btn .badge { position: absolute; top: 0; right: 0; margin: 0; }
  .nav-btn.on { box-shadow: inset 0 -3px 0 var(--pink); }
  .pos { grid-template-columns: 1fr; height: auto; }
  .pos-menu { padding: 12px 16px; }
  .items { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .ticket { border-left: 0; border-top: 1px solid var(--line); }
  .lines { max-height: none; }
  .page { padding: 16px; }
  .kgrid { grid-template-columns: 1fr; }
  .sgrid, .rgrid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .two { grid-template-columns: 1fr; }
  .ticket-actions { grid-template-columns: 1fr 1fr; }
  .ticket-actions .btn:nth-child(3) { grid-column: 1 / -1; }
  .bar-row { grid-template-columns: 90px 1fr auto; }
  .line { grid-template-columns: 1fr auto 68px; }
}

/* brand logo */
img.logo { width: 40px; height: 40px; object-fit: contain; filter: none; }
img.login-logo { width: 140px; height: 140px; object-fit: contain; display: block; margin: 0 auto; filter: drop-shadow(0 6px 24px rgba(231, 197, 101, .35)); }
