/* Pixberry back office — modern app shell, violet + pistachio green */
:root {
  --bg: #f5f2fb; --surface: #ffffff; --surface-2: #f2edfa; --surface-3: #e9e2f6; --line: #e4dcf1; --line-2: #cdc1e2;
  --fg: #1f1535; --muted: #5d5275; --faint: #8b80a3;
  --violet: #5b2d9e; --violet-2: #7a4cc4; --violet-soft: #efe7fb; --side: #241a3d; --side-2: #2f2350; --side-ink: #ece6f8; --side-muted: #a497c4;
  --pista: #a8d672; --pista-2: #94c75a; --pista-soft: #ebf6de; --pista-ink: #1d2c0f;
  --ok: #3f7d1e; --ok-soft: #e8f4dc; --warn: #a76400; --warn-soft: #fff1d6; --bad: #c62a3a; --bad-soft: #fde7e9; --info: #5b2d9e;
  --radius: 14px; --shadow: 0 1px 2px rgba(31, 21, 53, .05), 0 6px 20px rgba(31, 21, 53, .06);
  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #150f24; --surface: #1e1633; --surface-2: #261c40; --surface-3: #30244f; --line: #33285a; --line-2: #4a3d73;
  --fg: #f3effb; --muted: #c0b5da; --faint: #8f83ad; --violet: #c4a8ff; --violet-2: #b392ff; --violet-soft: #2e2250; --side: #0f0a1c; --side-2: #1d1534;
  --pista-soft: #22351a; --ok: #a8d672; --ok-soft: #22351a; --warn: #f0b350; --warn-soft: #3a2c12; --bad: #ff8fa3; --bad-soft: #43182a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--violet); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
.num { font-variant-numeric: tabular-nums; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.narrow { width: min(440px, 100%); }
:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.mark { width: 36px; height: 36px; border-radius: 10px; background: var(--pista); color: var(--pista-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.brand b { display: block; font-size: 15px; line-height: 1.2; } .brand small { color: var(--side-muted); font-size: 12px; }
.nav-grp { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); padding: 14px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--side-ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: var(--side-2); }
.nav a.on { background: var(--pista); color: var(--pista-ink); }
.nav a.on svg { opacity: 1; }
.nav .badge { margin-left: auto; background: #ff8fa3; color: #2b1430; border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 800; }
.side .foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--side-2); display: grid; gap: 6px; font-size: 13px; color: var(--side-muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .in { display: flex; align-items: center; gap: 10px; padding: 12px 20px; }
.top h1 { flex: 1; min-width: 0; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); cursor: pointer; font: 500 13.5px var(--font); }
.kbd { font: 600 11px var(--font); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; color: var(--faint); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
#view { padding: 20px; max-width: 1440px; width: 100%; }
@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-105%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 5, 20, .45); }
  .menu-btn { display: grid; }
  .kbd-btn .lbl, .kbd-btn .kbd { display: none; }
  #view { padding: 14px 14px 90px; }
}

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .g3, .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .g2 { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 40px; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font: 14.5px var(--font); }
textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--violet); }
input[type=color] { padding: 3px; height: 40px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--fg); font-weight: 500; font-size: 14px; }
.btn { min-height: 40px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font: 700 14px var(--font); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--pista); border-color: var(--pista); color: var(--pista-ink); } .btn.primary:hover { background: var(--pista-2); }
.btn.violet { background: var(--violet); border-color: var(--violet); color: #fff; } .btn.violet:hover { background: var(--violet-2); }
:root[data-theme="dark"] .btn.violet { color: #1a1030; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: transparent; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.lg { min-height: 50px; font-size: 15.5px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 700 13.5px var(--font); padding: 7px 13px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.hint, .muted { color: var(--muted); font-size: 13px; } .faint { color: var(--faint); }
.banner { padding: 11px 14px; border-radius: 11px; font-size: 13.5px; } .banner.ok { background: var(--ok-soft); color: var(--ok); } .banner.bad { background: var(--bad-soft); color: var(--bad); } .banner.info { background: var(--violet-soft); color: var(--violet); } .banner.warn { background: var(--warn-soft); color: var(--warn); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.new { background: var(--violet-soft); color: var(--violet); } .chip.preparing { background: var(--warn-soft); color: var(--warn); }
.chip.ready, .chip.paid, .chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.alert, .chip.cancelled { background: var(--bad-soft); color: var(--bad); }
.empty { text-align: center; color: var(--faint); padding: 28px 8px; }
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); border-top: 0; font-weight: 700; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-2); }
.r { text-align: right; }
.diet { width: 12px; height: 12px; border: 1.5px solid #3f8f2a; border-radius: 3px; display: inline-grid; place-items: center; flex: none; }
.diet::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #3f8f2a; }
.diet.egg { border-color: #d38b00; } .diet.egg::after { background: #d38b00; } .diet.nonveg { border-color: #c62a3a; } .diet.nonveg::after { background: #c62a3a; }
.pic { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex: none; background: var(--surface-2); display: block; }
.pic img, .pic svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic.lg { width: 92px; height: 92px; border-radius: 14px; }

/* ---------- dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.kpi .l { font-size: 12.5px; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.kpi .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12.5px; color: var(--faint); }
.kpi .up { color: var(--ok); font-weight: 700; } .kpi .down { color: var(--bad); font-weight: 700; }
.kpi.hero { background: linear-gradient(135deg, var(--side) 0%, #4a2a86 100%); color: #fff; border-color: transparent; }
.kpi.hero .l, .kpi.hero .d { color: #d8ccf3; } .kpi.hero .up { color: var(--pista); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--faint); font: 600 10.5px var(--font); }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: var(--violet); } .chart .bar.today { fill: var(--pista-2); }
.hbar { display: grid; grid-template-columns: minmax(90px, 170px) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar .t { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; } .hbar .t i { display: block; height: 100%; background: var(--pista-2); border-radius: 6px; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.quick a { display: grid; gap: 6px; padding: 14px; border-radius: 12px; background: var(--surface-2); text-decoration: none; color: var(--fg); font-weight: 700; font-size: 14px; }
.quick a svg { width: 22px; height: 22px; color: var(--violet); }
.quick a:hover { background: var(--surface-3); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .pos { grid-template-columns: minmax(0, 1fr); } .ticket-panel { position: static; max-height: none; } }
#jumpBill { display: none; }
@media (max-width: 1100px) { #jumpBill:not([hidden]) { display: flex; justify-content: space-between; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.25); } }
.pos-search { position: relative; }
.pos-search input { padding-left: 38px; min-height: 46px; border-radius: 12px; font-size: 15px; }
.pos-search svg { position: absolute; left: 12px; top: 14px; width: 18px; height: 18px; color: var(--faint); }
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.cats button { flex: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); padding: 7px 13px; border-radius: 999px; font: 700 13px var(--font); cursor: pointer; }
.cats button.on { background: var(--violet); color: #fff; border-color: var(--violet); }
:root[data-theme="dark"] .cats button.on { color: #1a1030; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { position: relative; display: grid; grid-template-rows: 96px auto; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--surface); cursor: pointer; text-align: left; padding: 0; color: var(--fg); font: inherit; transition: transform .08s, box-shadow .15s; }
.tile:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.tile:active { transform: scale(.98); }
.tile .ph { overflow: hidden; } .tile .ph img, .tile .ph svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .bd { padding: 8px 10px 10px; display: grid; gap: 2px; }
.tile .nm { font-weight: 700; font-size: 13.5px; line-height: 1.3; display: flex; gap: 6px; align-items: flex-start; }
.tile .pr { font-weight: 800; color: var(--violet); font-variant-numeric: tabular-nums; }
.tile .qty { position: absolute; top: 7px; right: 7px; min-width: 26px; height: 26px; border-radius: 999px; background: var(--pista); color: var(--pista-ink); font-weight: 800; display: grid; place-items: center; font-size: 13px; padding: 0 7px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.tile .stk { position: absolute; top: 7px; left: 7px; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.92); color: #5b2d9e; border-radius: 6px; padding: 1px 6px; }
.tile.out { opacity: .45; cursor: not-allowed; }
.ticket-panel { position: sticky; top: 76px; display: grid; gap: 12px; max-height: calc(100vh - 96px); overflow: auto; }
.lines { display: grid; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px dashed var(--line); }
.line:first-child { border-top: 0; }
.line .nm { font-weight: 600; font-size: 14px; } .line .sub { font-size: 12px; color: var(--faint); }
.line.sent .nm { color: var(--muted); }
.step { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.step button { width: 32px; height: 32px; border: 0; background: var(--surface-2); color: var(--fg); font: 800 16px var(--font); cursor: pointer; }
.step span { min-width: 30px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.totals { display: grid; gap: 4px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 22px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; letter-spacing: -.01em; }

/* ---------- floor ---------- */
.floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tcard { border-radius: 16px; padding: 14px; min-height: 118px; display: grid; align-content: space-between; gap: 6px; cursor: pointer; border: 2px solid var(--line); background: var(--surface); text-align: left; color: var(--fg); font: inherit; }
.tcard .lb { font-size: 22px; font-weight: 800; }
.tcard .st { font-size: 12.5px; font-weight: 700; color: var(--faint); }
.tcard .amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.tcard.busy { border-color: var(--violet); background: var(--violet-soft); } .tcard.busy .st { color: var(--violet); }
.tcard.ready { border-color: var(--pista-2); background: var(--pista-soft); } .tcard.ready .st { color: var(--ok); }
.tcard.bill { border-color: var(--bad); background: var(--bad-soft); animation: pulse 1.6s infinite; } .tcard.bill .st { color: var(--bad); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--bad) 22%, transparent); } }
@media (prefers-reduced-motion: reduce) { .tcard.bill { animation: none; } }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- kitchen ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: minmax(0, 1fr); } }
.colh { display: flex; justify-content: space-between; font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 4px 4px 8px; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--violet); border-radius: 13px; padding: 13px; display: grid; gap: 8px; margin-bottom: 10px; box-shadow: var(--shadow); }
.ticket.preparing { border-left-color: var(--warn); } .ticket.ready { border-left-color: var(--pista-2); }
.ticket.late { background: var(--bad-soft); border-color: var(--bad); border-left-color: var(--bad); }
.ticket .where { font-size: 20px; font-weight: 800; }
.ticket ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 15px; }
.ticket li.old { color: var(--faint); text-decoration: line-through; }
.note { color: var(--bad); font-weight: 700; font-size: 13px; }

/* ---------- QR ---------- */
.qrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.qr { border: 2px solid var(--violet); border-radius: 18px; padding: 16px; text-align: center; display: grid; gap: 6px; justify-items: center; background: #fff; color: #22163a; }
.qr .code svg { width: 160px; height: 160px; display: block; }
.qr b { font-size: 20px; } .qr small { color: #5a4f70; word-break: break-all; font-size: 11px; }

/* ---------- modal, palette, toasts ---------- */
.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(15, 8, 30, .55); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 18px; padding: 20px; display: grid; gap: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal.wide { width: min(760px, 100%); }
.palette { width: min(600px, 100%); align-self: start; margin-top: 10vh; background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.palette input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 56px; font-size: 16px; padding: 0 18px; }
.palette input:focus-visible { outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.palette li.on { background: var(--violet-soft); color: var(--violet); }
.palette li small { color: var(--faint); font-weight: 500; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-methods button { min-height: 58px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--surface); font: 800 15px var(--font); color: var(--fg); cursor: pointer; }
.pay-methods button.on { border-color: var(--violet); background: var(--violet-soft); color: var(--violet); }
.upi-box { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; background: var(--surface-2); border-radius: 14px; padding: 12px; }
.upi-box .code { background: #fff; border-radius: 10px; padding: 6px; } .upi-box svg { width: 138px; height: 138px; display: block; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--side); color: var(--side-ink); padding: 11px 15px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-weight: 600; font-size: 14px; }
.toast.ok { background: var(--pista); color: var(--pista-ink); } .toast.bad { background: var(--bad); color: #fff; }
@media print { body * { visibility: hidden; } }

/* ---------- subscription ---------- */
#licBanner .banner { margin: 14px 20px 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-radius: 12px; }
@media (max-width: 980px) { #licBanner .banner { margin: 12px 14px 0; } }
.lic-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; min-height: 96px; }
.lic-status { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.lic-status dt { color: var(--muted); font-weight: 600; } .lic-status dd { margin: 0; font-weight: 700; }

/* ---------- app-style home (launcher icons) ---------- */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 14px; box-shadow: var(--shadow); }
.app { display: grid; justify-items: center; gap: 9px; text-decoration: none; color: var(--fg); font-weight: 700; font-size: 13.5px; text-align: center; padding: 6px 2px; border-radius: 14px; }
.app:hover { background: var(--surface-2); }
.app .ic { position: relative; width: 62px; height: 62px; border-radius: 19px; display: grid; place-items: center; color: #fff; box-shadow: 0 8px 18px -6px var(--c1, #7a4cc4); background: linear-gradient(145deg, var(--c1, #7a4cc4), var(--c2, #5b2d9e)); }
.app .ic svg { width: 28px; height: 28px; }
.app .ic .badge { position: absolute; top: -6px; right: -6px; background: #ff3d57; color: #fff; border-radius: 999px; font-size: 11.5px; font-weight: 800; padding: 1px 7px; border: 2px solid var(--surface); }
.app .lb { line-height: 1.25; }
.app.coral { --c1: #ff7b7b; --c2: #ea4b5d; } .app.teal { --c1: #2fd1c1; --c2: #13a39a; } .app.violet { --c1: #9b7cf0; --c2: #6a45c9; } .app.pink { --c1: #f59ad0; --c2: #d9579f; }
.app.rose { --c1: #ff9eb0; --c2: #e65f83; } .app.amber { --c1: #ffc25c; --c2: #e98b14; } .app.green { --c1: #a8d672; --c2: #6aaa2f; } .app.sky { --c1: #6cc4ff; --c2: #2f8fe0; }
.app.indigo { --c1: #8c95ff; --c2: #4f57d6; } .app.olive { --c1: #c8d46a; --c2: #8f9d2b; } .app.slate { --c1: #9aa3b8; --c2: #5f6880; }
.apps.mini { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); box-shadow: none; padding: 10px; }
.apps.mini .app { cursor: default; } .apps.mini .app:hover { background: none; }
.apps.mini .btn.sm { min-height: 26px; padding: 0 7px; }
@media (max-width: 560px) { .apps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 4px; padding: 14px 8px; } .app .ic { width: 54px; height: 54px; border-radius: 17px; } .app .ic svg { width: 24px; height: 24px; } .app { font-size: 12px; } }
.tstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tstat { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: var(--fg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); border-left: 6px solid var(--line-2); }
.tstat b { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; } .tstat span { font-size: 13px; font-weight: 700; color: var(--muted); }
.tstat.free { border-left-color: var(--pista-2); } .tstat.occ { border-left-color: var(--violet); } .tstat.dirty { border-left-color: var(--warn); } .tstat.wait { border-left-color: #13a39a; }
.donut { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.donut svg { width: 150px; height: 150px; transform: rotate(0deg); }
.donut svg text { font: 800 7px var(--font); fill: var(--fg); } .donut svg text.s { font: 600 3.2px var(--font); fill: var(--faint); }
.donut ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.donut li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; } .donut li i { width: 12px; height: 12px; border-radius: 4px; }
@media (max-width: 420px) { .donut { grid-template-columns: 1fr; justify-items: center; } .donut ul { width: 100%; } }

/* ---------- table orders, cleaning ---------- */
.qo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
@media (max-width: 400px) { .qo-list { grid-template-columns: minmax(0, 1fr); } }
.qo { border-left: 6px solid #13a39a; }
.qo .where { font-size: 20px; font-weight: 800; }
.qo-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 15px; }
.qo-items li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; } .qo-items li b { min-width: 28px; }
.tcard.dirty { border-color: var(--warn); background: var(--warn-soft); } .tcard.dirty .st { color: var(--warn); }
.ti { width: 16px; height: 16px; vertical-align: -3px; color: var(--violet); }

/* ---------- phone: bottom tab bar like an app ---------- */
.tabbar { display: none; }
@media (max-width: 980px) {
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(31, 21, 53, .08); }
  .tabbar a, .tabbar button { position: relative; display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--faint); font: 700 11px var(--font); background: none; border: 0; padding: 4px 2px; cursor: pointer; border-radius: 12px; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--violet); background: var(--violet-soft); }
  .tabbar .badge { position: absolute; top: 0; left: calc(50% + 6px); background: #ff3d57; color: #fff; border-radius: 999px; font-size: 10px; padding: 0 5px; font-weight: 800; }
  #view { padding-bottom: 96px; }
  #jumpBill:not([hidden]) { bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  #toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .top .in { padding: 10px 14px; }
}

/* ---------- print layout (Customize) ---------- */
.psplit { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 760px) { .psplit { grid-template-columns: minmax(0, 1fr); } }
.psecs { display: grid; gap: 4px; }
.psec { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.psec .check { font-size: 13px; } .psec .btn.sm { min-height: 26px; padding: 0 8px; }
.pprev { margin-top: 6px; background: #e9e5f1; border-radius: 12px; padding: 10px; overflow: auto; max-height: 560px; }
.pprev iframe { display: block; margin: 0 auto; height: 520px; max-width: none; border: 0; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.18); border-radius: 4px; }

/* ---------- floors ---------- */
.ftabs { flex-wrap: wrap; max-width: 100%; }
.ftabs button .faint { font-weight: 600; font-size: 12px; margin-left: 2px; }
.fhead { margin: 4px 0 -4px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.qr-floor { display: grid; gap: 12px; } .qr-floor h3 { font-size: 18px; }
.qr .fl { color: #5b2d9e; font-weight: 700; font-size: 13px; margin-top: -4px; }
#flist input { min-height: 36px; }
#flist tr.fadd td { background: var(--surface-2); }
