body { background: var(--cream); }
#app { max-width: 720px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: 24px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hd { background: var(--pine); color: var(--cream); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; z-index: 10; }
.hd-row { display: flex; align-items: center; gap: 10px; }
.logo { width: 34px; }
.hd-t { display: flex; flex-direction: column; flex: 1; }
.hd-t .display { font-size: 17px; }
.hd-sub { font-size: 12px; opacity: .8; }
.hd-btn { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(245,239,230,.35); background: transparent; color: var(--cream); font-size: 13px; }
a.hd-btn { display: inline-flex; align-items: center; text-decoration: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.dot.on { background: #4CAF50; }
.zones { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: rgba(245,239,230,.12); padding: 4px; border-radius: 12px; }
.zones button { min-height: 40px; border-radius: 9px; border: 0; background: transparent; color: var(--cream); font-size: 13px; font-weight: 600; }
.zones button[aria-selected="true"] { background: var(--cream); color: var(--pine); }

.alerts { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.alerts:empty { display: none; }
.al { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 10px 12px; }
.al .tx { flex: 1; font-size: 13px; line-height: 1.35; }
.al .btn { min-height: 38px; border: 0; padding: 0 12px; font-size: 13px; font-weight: 700; }
.al.ready { background: var(--pine); color: var(--cream); }
.al.ready .btn { background: var(--ochre); color: var(--ink); }
.al.cedar { background: var(--cedar); color: #FFFCF7; }
.al.cedar .btn { background: #FFFCF7; color: var(--cedar); }
.al.call { background: var(--sand); color: var(--ink); }
.al.call .btn { background: var(--paper); color: var(--cedar); }

.tables { padding: 12px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.tb { min-height: 86px; border-radius: 14px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 0 12px; text-align: left; border: 0; }
.tb .c { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: .03em; }
.tb .l { font-size: 11px; font-weight: 600; }
.tb .m { font-size: 11px; opacity: .85; }
.tb.free { background: var(--paper); color: var(--muted); border: 1.5px dashed #A89E8C; }
.tb.seat { background: var(--sand); color: var(--ink); border: 1px solid var(--line-strong); }
.tb.ready { background: var(--pine); color: var(--cream); }
.tb.cedar { background: var(--cedar); color: #FFFCF7; }
.tb.pay { background: var(--ochre); color: var(--ink); }
.legend { padding: 4px 16px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; color: var(--ink-2); }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Chi tiết bàn */
.sheet.tbl { width: min(640px, 100%); max-height: calc(100dvh - 24px); }
.tbl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tbl-head h2 { font-family: var(--font-display); letter-spacing: .03em; font-size: 26px; }
.tbl-head small { color: var(--ink-2); }
.ord { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ord-h { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.row:last-of-type { border-bottom: 0; }
.row .nm { font-size: 14px; font-weight: 600; }
.row .md { font-size: 12px; color: var(--ink-2); grid-column: 1; }
.row .acts { display: flex; gap: 6px; align-items: center; grid-row: 1 / span 2; grid-column: 2; }
.row .acts button { min-height: 36px; padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 700; border: 1px solid var(--line-strong); background: #fff; }
.row .acts .serve { background: var(--pine); color: var(--cream); border-color: var(--pine); }
.chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.chip.pending { border: 1px solid var(--cedar); color: var(--cedar); }
.chip.fired, .chip.cooking { background: var(--sand); color: var(--cedar); }
.chip.ready { background: var(--pine); color: var(--cream); }
.chip.served { background: var(--line); color: var(--ink-2); }
.tot { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 8px; }
.tot strong { font-size: 20px; color: var(--pine); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .full { grid-column: 1 / -1; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.pick button { min-height: 52px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; font-weight: 700; }
.pick button.busy { background: var(--sand); }

.al.res { background: #F4E9D2; color: var(--ink); border: 1px solid var(--ochre); }
.al.res .btn { background: var(--pine); color: var(--cream); }
.al svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.tb { position: relative; }
.tb .rv { margin-top: 3px; font-size: 10.5px; font-weight: 700; background: var(--ochre); color: var(--ink); border-radius: 999px; padding: 2px 7px; }
.tb .rv.pending { background: #fff; color: var(--cedar); border: 1px dashed var(--cedar); }
.res-btn { position: relative; }
.res-btn .rb { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--ochre); color: var(--ink); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.tbl .rcard { margin-bottom: 2px; }

.hd-t { min-width: 0; flex: 1; }
.hd-t .display { white-space: nowrap; }
.hd-sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-btn { padding: 0 10px; flex: none; }
.hd-btn.icon { width: 40px; padding: 0; justify-content: center; }
.hd-btn.icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
