:root {
  --bg: #f3f4f6; --surface: #ffffff; --surface-2: #f9fafb; --surface-3: #e5e7eb;
  --text: #111827; --text-2: #4b5563; --muted: #6b7280; --border: #d1d5db;
  --primary: #1d4ed8; --primary-ink: #ffffff; --primary-soft: #dbeafe;
  --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7;
  --danger: #b91c1c; --danger-soft: #fee2e2; --info: #0e7490; --info-soft: #cffafe;
  --violet: #6d28d9; --violet-soft: #ede9fe;
  --topbar: #1f2937; --topbar-ink: #f9fafb;
  --radius: 12px; --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.06);
  --tap: 48px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17; --surface: #151b26; --surface-2: #1b2331; --surface-3: #263042;
    --text: #f3f4f6; --text-2: #cbd5e1; --muted: #94a3b8; --border: #334155;
    --primary: #3b82f6; --primary-soft: #1e3a8a55;
    --ok: #4ade80; --ok-soft: #14532d66; --warn: #fbbf24; --warn-soft: #78350f66;
    --danger: #f87171; --danger-soft: #7f1d1d66; --info: #22d3ee; --info-soft: #164e6366;
    --violet: #a78bfa; --violet-soft: #4c1d9566; --topbar: #0f141d; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f17; --surface: #151b26; --surface-2: #1b2331; --surface-3: #263042;
  --text: #f3f4f6; --text-2: #cbd5e1; --muted: #94a3b8; --border: #334155;
  --primary: #3b82f6; --primary-soft: #1e3a8a55;
  --ok: #4ade80; --ok-soft: #14532d66; --warn: #fbbf24; --warn-soft: #78350f66;
  --danger: #f87171; --danger-soft: #7f1d1d66; --info: #22d3ee; --info-soft: #164e6366;
  --violet: #a78bfa; --violet-soft: #4c1d9566; --topbar: #0f141d; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
a { color: var(--primary); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; }
.right { text-align: right; } .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; } .grow { flex: 1; }
.stack > * + * { margin-top: .75rem; }
.hidden { display: none !important; }

/* Tlačítka */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap); padding: .55rem 1rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none; user-select: none; touch-action: manipulation; }
.btn:hover { filter: brightness(.97); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.ok { background: #15803d; border-color: #15803d; color: #fff; }
.btn.danger { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn.danger.solid { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.lg { min-height: 60px; font-size: 1.1rem; padding: .7rem 1.2rem; }
.btn.sm { min-height: 36px; padding: .3rem .7rem; font-size: .9rem; }
.btn.block { width: 100%; }
.btn.sel { outline: 3px solid var(--primary); outline-offset: -3px; background: var(--primary-soft); }
.icon-btn { width: var(--tap); padding: 0; }

/* Formuláře */
label.f { display: block; } label.f > span { display: block; font-size: .85rem; color: var(--text-2); margin-bottom: .25rem; font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=date], input[type=tel], select, textarea {
  width: 100%; min-height: var(--tap); padding: .55rem .75rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); cursor: pointer; }
.check input { width: 22px; height: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.help { font-size: .8rem; color: var(--muted); margin-top: .2rem; }

/* Rozvržení */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .4rem .75rem; background: var(--topbar); color: var(--topbar-ink); min-height: 60px; }
.brand { font-weight: 800; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.nav { display: flex; gap: .25rem; flex: 1; overflow-x: auto; }
.nav a { display: flex; align-items: center; gap: .4rem; padding: .5rem .8rem; min-height: 46px; border-radius: 10px; color: #d1d5db; text-decoration: none; font-weight: 600; white-space: nowrap; }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.nav a .ni { font-size: 1.2rem; }
.tb-right { display: flex; gap: .4rem; align-items: center; }
.tb-btn { background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 10px; min-height: 44px; padding: .3rem .7rem; cursor: pointer; font-weight: 600; white-space: nowrap; }
.shift-badge.closed { background: #b91c1c; } .shift-badge.open { background: #15803d; }
main { padding: 1rem; max-width: 1600px; margin: 0 auto; }
main.full { max-width: none; padding: 0; }
.banners { padding: 0 1rem; max-width: 1600px; margin: .5rem auto 0; }
.banner { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .6rem .9rem; border-radius: 10px; margin-bottom: .5rem; font-weight: 600; border: 1px solid; }
.banner.warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.banner.err { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.banner.info { background: var(--info-soft); border-color: var(--info); color: var(--info); }
.banner .grow { color: var(--text); font-weight: 500; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; border: 1px solid var(--border); }
.card + .card { margin-top: 1rem; }
.page-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; flex: 1; }
.tabs { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: 1rem; }
.tabs .btn { white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }

/* Stavové štítky – vždy text + ikona */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1px solid; white-space: nowrap; }
.st-free { color: var(--ok); background: var(--ok-soft); border-color: var(--ok); }
.st-occupied { color: var(--primary); background: var(--primary-soft); border-color: var(--primary); }
.st-preparing { color: var(--warn); background: var(--warn-soft); border-color: var(--warn); }
.st-ready { color: var(--info); background: var(--info-soft); border-color: var(--info); }
.st-awaiting_payment { color: var(--violet); background: var(--violet-soft); border-color: var(--violet); }
.st-pending { color: var(--text-2); background: var(--surface-3); border-color: var(--border); border-style: dashed; }
.st-sent, .st-accepted { color: var(--primary); background: var(--primary-soft); border-color: var(--primary); }
.st-served, .st-paid { color: var(--ok); background: var(--ok-soft); border-color: var(--ok); }
.st-cancelled, .st-refunded { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }

/* Plánek stolů */
.floor-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .75rem; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-height: 460px; aspect-ratio: 16 / 8;
  background-image: radial-gradient(var(--surface-3) 1px, transparent 1px); background-size: 22px 22px; }
.tbl { position: absolute; width: 14%; min-width: 108px; min-height: 92px; padding: .5rem; border-radius: 14px; border: 2px solid; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: .15rem; box-shadow: var(--shadow); background: var(--surface); }
.tbl.rect { width: 20%; } .tbl.round { border-radius: 999px; align-items: center; text-align: center; justify-content: center; width: 12%; min-width: 96px; aspect-ratio: 1; }
.tbl .tn { font-size: 1.35rem; font-weight: 800; color: var(--text); }
.tbl .ti { font-size: .78rem; color: var(--text-2); }
.tbl .ts { font-size: .78rem; font-weight: 700; }
.tbl.s-free { border-color: var(--ok); } .tbl.s-free .ts { color: var(--ok); }
.tbl.s-occupied { border-color: var(--primary); background: var(--primary-soft); } .tbl.s-occupied .ts { color: var(--primary); }
.tbl.s-preparing { border-color: var(--warn); background: var(--warn-soft); } .tbl.s-preparing .ts { color: var(--warn); }
.tbl.s-ready { border-color: var(--info); background: var(--info-soft); } .tbl.s-ready .ts { color: var(--info); }
.tbl.s-awaiting_payment { border-color: var(--violet); background: var(--violet-soft); border-width: 3px; } .tbl.s-awaiting_payment .ts { color: var(--violet); }
.tbl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.tbl-list .tbl { position: static; width: auto; min-width: 0; aspect-ratio: auto; border-radius: 14px; align-items: flex-start; text-align: left; }
.order-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; }
.ocard { text-align: left; background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--primary); border-radius: 12px; padding: .7rem .8rem; cursor: pointer; box-shadow: var(--shadow); }
.ocard.s-preparing { border-left-color: var(--warn); } .ocard.s-ready { border-left-color: var(--info); } .ocard.s-awaiting_payment { border-left-color: var(--violet); }
.legend { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Pokladna */
.pos { display: grid; grid-template-columns: 190px 1fr 400px; gap: .75rem; height: calc(100vh - 60px - 2rem); min-height: 520px; }
.pos.with-banner { height: calc(100vh - 60px - 5rem); }
.cats { display: flex; flex-direction: column; gap: .4rem; overflow-y: auto; }
.cat { min-height: 54px; text-align: left; padding: .5rem .75rem; border-radius: 10px; border: 1px solid var(--border); border-left: 6px solid var(--c, var(--primary)); background: var(--surface); font-weight: 700; cursor: pointer; }
.cat.active { background: var(--c, var(--primary)); color: #fff; }
.menu { display: flex; flex-direction: column; gap: .6rem; min-width: 0; min-height: 0; }
.menu-top { display: flex; gap: .5rem; }
.favs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: 2px; flex-shrink: 0; }
.fav { flex-shrink: 0; min-height: 44px; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--warn); background: var(--warn-soft); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; }
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; overflow-y: auto; align-content: start; padding-bottom: 1rem; }
.itm { position: relative; min-height: 92px; padding: .6rem; border-radius: 12px; border: 1px solid var(--border); border-top: 5px solid var(--c, var(--primary)); background: var(--surface);
  text-align: left; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: .3rem; box-shadow: var(--shadow); }
.itm .nm { font-weight: 700; line-height: 1.2; padding-right: 2.1rem; }
.itm .pr { font-weight: 800; color: var(--text-2); font-variant-numeric: tabular-nums; }
.itm .tag { position: absolute; top: 6px; right: 6px; font-size: .7rem; }
.itm.na { opacity: .5; cursor: not-allowed; } .itm.na .pr::after { content: " · Vyprodáno"; color: var(--danger); }
.itm:active { transform: scale(.98); }
.ticket { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 0; }
.tk-head { padding: .7rem .8rem; border-bottom: 1px solid var(--border); }
.tk-head .title { font-size: 1.25rem; font-weight: 800; }
.tk-lines { flex: 1; overflow-y: auto; padding: .3rem 0; }
.ln { display: grid; grid-template-columns: 1fr auto; gap: .2rem .5rem; padding: .5rem .8rem; border-bottom: 1px dashed var(--border); cursor: pointer; }
.ln:hover { background: var(--surface-2); }
.ln .lname { font-weight: 700; }
.ln .lmods { font-size: .82rem; color: var(--text-2); grid-column: 1 / -1; }
.ln .lnote { font-size: .82rem; color: var(--warn); font-weight: 600; grid-column: 1 / -1; }
.ln .lfoot { grid-column: 1 / -1; display: flex; align-items: center; gap: .4rem; }
.ln.cancelled { opacity: .6; } .ln.cancelled .lname { text-decoration: line-through; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.qty button { width: 40px; height: 38px; border: 0; background: var(--surface-2); font-size: 1.2rem; font-weight: 800; cursor: pointer; }
.qty span { min-width: 34px; text-align: center; font-weight: 800; }
.tk-totals { padding: .6rem .8rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.tk-totals .tr { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.tk-totals .tr.total { font-size: 1.45rem; font-weight: 900; margin-top: .2rem; }
.tk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .6rem .8rem .8rem; }
.tk-actions .wide { grid-column: 1 / -1; }
.ticket-fab { display: none; }

/* Modální okna */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fade .12s; }
.modal { background: var(--surface); color: var(--text); border-radius: 16px; width: 100%; max-width: 560px; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal.wide { max-width: 900px; } .modal.xwide { max-width: 1100px; }
.modal-h { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.modal-h h2 { margin: 0; flex: 1; }
.modal-b { padding: 1rem; overflow-y: auto; }
.modal-f { display: flex; gap: .5rem; justify-content: flex-end; padding: .8rem 1rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-err { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); padding: .5rem .75rem; border-radius: 10px; font-weight: 600; margin-bottom: .75rem; }
@keyframes fade { from { opacity: 0; } }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .4rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { min-height: 40px; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font-weight: 600; }
.chip.sel { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Platba */
.pay { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1rem; }
.pay-sum { background: var(--surface-2); border-radius: 12px; padding: 1rem; }
.big-num { font-size: 2.2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; font-variant-numeric: tabular-nums; }
.kv.strong { font-weight: 800; font-size: 1.1rem; }
.success { text-align: center; padding: 1rem; }
.success .tick { font-size: 4rem; color: var(--ok); line-height: 1; }
.sim-tag { display: inline-block; background: #b45309; color: #fff; font-weight: 800; padding: .15rem .5rem; border-radius: 6px; letter-spacing: .03em; }

/* Účtenka */
.receipt { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: #fff; color: #000; width: 100%; max-width: 380px; margin: 0 auto; padding: 1rem; border: 1px dashed #999; }
.receipt .c { text-align: center; } .receipt .b { font-weight: 700; }
.receipt .r { display: flex; justify-content: space-between; gap: .5rem; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: .4rem 0; }
.receipt .big { font-size: 16px; font-weight: 800; }
.receipt table { width: 100%; border-collapse: collapse; font-size: 12px; } .receipt td, .receipt th { padding: 0 2px; text-align: right; } .receipt td:first-child, .receipt th:first-child { text-align: left; }
.receipt .warnbox { border: 2px solid #000; padding: .3rem; text-align: center; font-weight: 800; margin: .4rem 0; }

/* KDS */
.kds { min-height: calc(100vh - 60px); background: #0b0f17; color: #f3f4f6; padding: .75rem; }
.kds-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.kds-bar .btn { background: #1f2937; color: #f3f4f6; border-color: #374151; }
.kds-bar .btn.sel { background: #1d4ed8; outline: none; }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .75rem; align-items: start; }
.kt { background: #151b26; border: 2px solid #334155; border-radius: 14px; overflow: hidden; }
.kt-h { padding: .6rem .8rem; background: #1f2937; display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.kt-h .lab { font-size: 1.3rem; font-weight: 900; }
.kt-h .tm { font-size: 1.2rem; font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; }
.kt.warn { border-color: #f59e0b; } .kt.warn .kt-h { background: #78350f; }
.kt.crit { border-color: #ef4444; animation: pulse 1.6s infinite; } .kt.crit .kt-h { background: #7f1d1d; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(239,68,68,.45); } }
.kt-note { padding: .4rem .8rem; background: #422006; color: #fde68a; font-weight: 700; font-size: .9rem; }
.ki { display: flex; gap: .6rem; padding: .55rem .8rem; border-top: 1px solid #263042; cursor: pointer; align-items: flex-start; }
.ki .q { font-size: 1.3rem; font-weight: 900; min-width: 2.2rem; }
.ki .n { font-size: 1.1rem; font-weight: 700; } .ki .m { font-size: .9rem; color: #cbd5e1; } .ki .nt { font-size: .9rem; color: #fbbf24; font-weight: 700; }
.ki .s { margin-left: auto; font-size: .78rem; font-weight: 800; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; border: 1px solid; }
.ki.sent .s { color: #93c5fd; border-color: #3b82f6; } .ki.accepted .s { color: #c4b5fd; border-color: #8b5cf6; }
.ki.preparing .s { color: #fcd34d; border-color: #f59e0b; } .ki.ready .s { color: #86efac; border-color: #22c55e; }
.ki.ready .n { text-decoration: line-through; color: #86efac; }
.kt-f { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .6rem .8rem; border-top: 1px solid #263042; }
.kt-f .btn { min-height: 52px; background: #263042; color: #f3f4f6; border-color: #334155; }
.kt-f .btn.go { background: #15803d; border-color: #15803d; }

/* Tabulky */
.tbl-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th, table.t td { padding: .5rem .55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.t th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--surface-2); }
table.t td.num, table.t th.num { text-align: right; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; }
.kpi .l { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.kpi .v { font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; margin-top: .15rem; }
.kpi .s { font-size: .8rem; color: var(--text-2); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1rem; }
.grid2 > .card + .card { margin-top: 0; }
.diff-pos { color: var(--ok); font-weight: 800; } .diff-neg { color: var(--danger); font-weight: 800; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: #3b82f6; } .chart .bar:hover, .chart .bar.hover { fill: #1d4ed8; }
.chart .axis { stroke: var(--border); } .chart text { fill: var(--muted); font-size: 11px; }
.tip { position: absolute; pointer-events: none; background: var(--text); color: var(--surface); padding: .35rem .55rem; border-radius: 8px; font-size: .85rem; white-space: nowrap; transform: translate(-50%, -110%); z-index: 2; }
.hbar { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; min-width: 60px; } .hbar > i { display: block; height: 100%; background: #3b82f6; border-radius: 4px; }
.admin { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: start; }
.admin-nav { display: flex; flex-direction: column; gap: .3rem; position: sticky; top: 76px; }
.admin-nav .btn { justify-content: flex-start; }
.perm-table td, .perm-table th { text-align: center; } .perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-table input { width: 24px; height: 24px; }
.mini-plan { position: relative; height: 240px; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-2); }
.mini-plan .mt { position: absolute; padding: .2rem .4rem; background: var(--primary); color: #fff; border-radius: 6px; font-size: .75rem; font-weight: 700; transform: translate(0, 0); }

/* Přihlášení */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(135deg, #1f2937, #111827); }
.login .card { width: 100%; max-width: 420px; }
.demo-users { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }

/* Toasty, načítání */
#toasts { position: fixed; bottom: 1rem; right: 1rem; z-index: 80; display: flex; flex-direction: column; gap: .5rem; max-width: min(440px, calc(100vw - 2rem)); }
.toast { display: flex; gap: .6rem; align-items: center; padding: .75rem 1rem; border-radius: 12px; background: #111827; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-weight: 600; animation: fade .15s; }
.toast.err { background: #991b1b; } .toast.warn { background: #92400e; } .toast.ok { background: #166534; }
.toast .btn { min-height: 36px; background: rgba(255,255,255,.15); color: #fff; border-color: transparent; }
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: #60a5fa; z-index: 100; transition: width .3s, opacity .3s; opacity: 0; }
#progress.on { width: 70%; opacity: 1; transition: width 3s ease-out; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--surface-3); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 3rem; color: var(--muted); }
#print-area { display: none; }

/* Responzivita */
@media (max-width: 1180px) {
  .pos { grid-template-columns: 1fr 360px; grid-template-rows: auto 1fr; }
  .cats { grid-column: 1; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
  .cat { flex-shrink: 0; min-height: 46px; border-left-width: 1px; border-bottom: 5px solid var(--c); }
  .menu { grid-column: 1; grid-row: 2; }
  .ticket { grid-column: 2; grid-row: 1 / span 2; }
  .brand { display: none; }
  .admin { grid-template-columns: 1fr; } .admin-nav { position: static; flex-direction: row; overflow-x: auto; }
  .admin-nav .btn { flex-shrink: 0; }
}
@media (max-width: 760px) {
  main { padding: .75rem; }
  .topbar { padding: .3rem .5rem; gap: .4rem; }
  .brand { display: none; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--topbar); justify-content: space-around; padding: .25rem .25rem calc(.25rem + env(safe-area-inset-bottom)); }
  .nav a { flex-direction: column; gap: 0; font-size: .68rem; padding: .3rem .4rem; min-height: 52px; }
  body { padding-bottom: 66px; }
  .topbar { justify-content: space-between; }
  .pos, .pos.with-banner { display: block; height: auto; min-height: 0; }
  .cats { margin-bottom: .5rem; }
  .items-grid { grid-template-columns: repeat(2, 1fr); overflow: visible; padding-bottom: 90px; }
  .ticket { position: fixed; inset: 0 0 66px 0; z-index: 40; border-radius: 0; transform: translateY(calc(100% + 90px)); transition: transform .2s; visibility: hidden; }
  .ticket.open { visibility: visible; }
  .ticket.open { transform: none; }
  .ticket-fab { display: flex; position: fixed; left: .75rem; right: .75rem; bottom: 74px; z-index: 35; min-height: 58px; justify-content: space-between; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
  .plan { display: none; }
  .pay { grid-template-columns: 1fr; }
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal { max-height: 94vh; border-radius: 16px 16px 0 0; max-width: none !important; }
  .grid2 { grid-template-columns: 1fr; }
  #toasts { bottom: 76px; left: .75rem; right: .75rem; max-width: none; }
}

/* Tisk */
@media print {
  body.printing-area > *:not(#print-area) { display: none !important; }
  body.printing-area #print-area { display: block !important; }
  body.printing-area .receipt { border: 0; max-width: 80mm; padding: 0; font-size: 11px; }
  body.printing-main .topbar, body.printing-main .nav, body.printing-main .banners, body.printing-main .no-print, body.printing-main #toasts { display: none !important; }
  body.printing-main { background: #fff; color: #000; padding: 0; }
  body.printing-main .card { box-shadow: none; break-inside: avoid; }
}
