:root {
  --ink: #0c1730;
  --muted: #5a6b86;
  --paper: #e8eefb;
  --card: #f6f8ff;
  --line: #c5d2ee;
  --accent: #1a4cff;
  --accent-2: #6eb4ff;
  --danger: #c81e3a;
  --ok: #1a4cff;
  --on-accent: #fff;
  --nav-bg: #050d22;
  --nav-fg: #e8f0ff;
  --nav-muted: #9db6ff;
  --nav-hover: rgba(26, 76, 255, 0.45);
  --input-bg: #fff;
  --soft: #dce6f7;
  --auth-bg: #050d22;
  --auth-card: #0c1730;
  --auth-line: #1a4cff;
  --pay-cb: #0a2ec4;
  --shadow: 0 10px 30px rgba(12, 28, 72, 0.1);
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --serif: "IBM Plex Serif", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  display: grid;
  grid-template-columns: 14.5rem 1fr;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
}
[hidden] { display: none !important; }
.nav {
  background: var(--nav-bg);
  color: var(--nav-fg);
  padding: 1.2rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: 100dvh;
  max-height: 100dvh;
  position: sticky;
  top: 0;
}
.brand { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 0.1rem; }
.nav-logo {
  display: block; width: 100%; max-height: 3.4rem; object-fit: contain;
  margin-bottom: 0.4rem; background: #fff; border-radius: 6px; padding: 0.2rem;
}
.logo-box { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.logo-preview {
  height: 3.2rem; width: auto; max-width: 8rem; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 0.2rem;
}
.brand span { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.55; }
.brand strong { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.co { color: var(--accent-2); font-size: 0.88rem; margin: 0.4rem 0 1rem; }
.nav nav { display: flex; flex-direction: column; gap: 0.2rem; }
.nav nav button {
  appearance: none; background: transparent; border: 0; color: inherit;
  text-align: left; padding: 0.48rem 0.55rem; border-radius: 6px;
  cursor: pointer; font: inherit; opacity: 0.78;
  display: flex; justify-content: space-between; align-items: center; gap: 0.4rem;
}
.nav nav button:hover { background: rgba(255,255,255,0.06); }
.nav nav button.on { background: var(--accent); opacity: 1; }
.nav-badge {
  background: var(--danger); color: #fff; font-size: 0.68rem; font-weight: 700;
  min-width: 1.15rem; text-align: center; border-radius: 99px;
  padding: 0.08rem 0.34rem; line-height: 1.2;
}
.nav nav button.on .nav-badge { background: #fff; color: var(--danger); }
.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.4rem; padding-top: 1rem; }
.nav-foot a { text-decoration: none; text-align: center; }
.nav-foot .ghost,
.nav-foot a.ghost,
.nav-foot a:link,
.nav-foot a:visited,
.nav-foot button.ghost {
  color: var(--nav-fg);
  border-color: rgba(232, 240, 255, 0.4);
  background: transparent;
}
.nav-foot .ghost:hover,
.nav-foot a.ghost:hover,
.nav-foot button.ghost:hover {
  background: var(--nav-hover);
  border-color: var(--accent-2);
  color: #fff;
}
.main { min-width: 0; padding: 1.1rem 1.4rem 2.4rem; }
header.bar { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; margin-bottom: 1rem; flex-wrap: wrap; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
header.bar h1 { font-family: var(--serif); font-size: 1.85rem; font-weight: 600; }
.byline { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.auth-card .byline { color: #9db6ff; margin: 0.15rem 0 0.55rem; }
.bar-actions { display: flex; gap: 0.4rem; align-items: center; }
.chip { font-size: 0.78rem; padding: 0.28rem 0.55rem; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.chip.ok { color: var(--ok); border-color: #9db6ff; }
.chip.bad { color: var(--danger); border-color: #e0b4b8; }
.live { color: var(--accent); font-weight: 700; }
.watch-ua { font-size: 0.75rem; color: var(--muted); max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

button, .ghost, a.ghost {
  appearance: none; font: inherit; cursor: pointer; border-radius: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 0.42rem 0.7rem;
}
button.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
button.ghost, a.ghost, label.file { background: transparent; }
label.file { display: inline-flex; align-items: center; cursor: pointer; }
button.danger { color: var(--danger); }
button.pay { min-height: 3rem; font-weight: 600; }
button.pay.cb { background: var(--pay-cb); color: var(--on-accent); border-color: var(--pay-cb); }
button.pay.cash { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.pos {
  display: grid;
  grid-template-columns: 1fr min(22rem, 38vw);
  gap: 0.9rem;
  min-height: calc(100dvh - 8rem);
}
.catalog { min-width: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.7rem; }
.filters button.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.search { min-width: 12rem; flex: 1; font: inherit; padding: 0.42rem 0.55rem; border: 1px solid var(--line); border-radius: 6px; }
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.4rem, 1fr));
  gap: 0.5rem;
}
.tile {
  appearance: none; border: 1px solid var(--line); background: var(--card);
  border-radius: 10px; padding: 0.7rem 0.65rem 0.75rem; text-align: left;
  cursor: pointer; min-height: 7.2rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.2rem; font: inherit; color: inherit;
}
.tile:hover { border-color: var(--accent); }
.tile.off { opacity: 0.45; cursor: not-allowed; }
.tile .ic { font-size: 1.6rem; line-height: 1; }
.tile-photo, .thumb {
  display: block;
  object-fit: cover;
  background: var(--soft);
}
.tile-photo { width: 100%; height: 7.2rem; border-radius: 8px; margin-bottom: 0.35rem; object-fit: cover; }
.thumb { width: 2.4rem; height: 2.4rem; border-radius: 6px; }
.tile-media { position: relative; }
.tile-media .g-n {
  position: absolute; right: 0.3rem; bottom: 0.45rem;
  background: rgba(5, 13, 34, 0.72); color: #fff;
  font-size: 0.65rem; padding: 0.08rem 0.32rem; border-radius: 99px;
}
.allergen-field { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.allergen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.28rem 0.7rem;
}
.al-pick {
  display: flex !important; flex-direction: row !important; align-items: center;
  gap: 0.4rem; color: var(--ink); font-size: 0.84rem;
}
.al-pick input { margin: 0; }
.al-chips { display: flex; flex-wrap: wrap; gap: 0.22rem; margin-top: 0.18rem; }
.al-chips span {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.01em;
  background: #f3e4d2; color: #7a3f12; border-radius: 99px;
  padding: 0.08rem 0.38rem;
}
.al-chips .al-note { background: #dce6f7; color: var(--muted); font-weight: 500; }
.tile .al-chips { margin-top: 0.15rem; }
.tile .al-chips span { font-size: 0.62rem; padding: 0.04rem 0.3rem; }
.gallery-field { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.8rem; color: var(--muted); }
.gallery-hint { font-size: 0.78rem; line-height: 1.35; }
.gallery-box {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.g-item {
  width: 6.4rem; border: 1px solid var(--line); border-radius: 8px;
  background: #e8eefb; overflow: hidden; position: relative;
}
.g-item.cover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.g-item img, .g-item video {
  display: block; width: 100%; height: 4.6rem; object-fit: cover; background: #dce6f7;
}
.g-kind, .g-badge {
  position: absolute; top: 0.28rem; left: 0.28rem;
  background: rgba(5, 13, 34, 0.72); color: #fff;
  font-size: 0.62rem; padding: 0.08rem 0.3rem; border-radius: 99px;
}
.g-item.cover .g-badge { background: var(--accent); }
.g-item figcaption {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.28rem;
}
.g-item figcaption button {
  font-size: 0.7rem; padding: 0.18rem 0.3rem;
}
.g-add {
  width: 6.4rem; min-height: 7.4rem;
  border: 1px dashed var(--line); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: var(--card); color: var(--ink);
  font-size: 0.82rem; font-weight: 600;
}
.g-add input { display: none; }
.g-add:hover { border-color: var(--accent); color: var(--accent); }
.tile strong { font-size: 0.92rem; }
.tile small { color: var(--muted); }
.tile .st { margin-top: auto; font-size: 0.75rem; color: var(--muted); }
.tile .st.low { color: #b45309; font-weight: 600; }

.ticket {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.ticket-head h2 { font-family: var(--serif); font-size: 1.15rem; margin: 0; }
.hold-n { font-size: 0.78rem; font-weight: 600; }
.hold-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-top: 0.45rem; }
.hold-row { display: grid; grid-template-columns: 1fr auto; gap: 0.7rem; align-items: start; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.hold-row:last-child { border-bottom: 0; }
.hold-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.hold-side .tools { justify-content: flex-end; margin-bottom: 0; }
.cli-box { display: flex; flex-direction: column; gap: 0.22rem; font-size: 0.78rem; color: var(--muted); margin-bottom: 0.65rem; }
.cli-box input { font: inherit; padding: 0.38rem 0.5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--input-bg); color: var(--ink); }
.t-line { display: grid; grid-template-columns: 1fr auto auto; gap: 0.35rem; align-items: center; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.t-line button { padding: 0.15rem 0.4rem; }
.qty { display: flex; gap: 0.2rem; align-items: center; }
.ticket .sum { margin-top: auto; padding-top: 0.7rem; }
.ticket .sum p { display: flex; justify-content: space-between; margin-bottom: 0.25rem; }
.ticket .sum .ttc { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.pays { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-top: 0.7rem; }

.dash-tabs {
  display: flex; gap: 0.15rem; margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.dash-tabs button {
  appearance: none; background: transparent; border: 0;
  border-bottom: 2px solid transparent; border-radius: 0;
  color: var(--muted); font: inherit; font-weight: 600;
  padding: 0.45rem 0.85rem; margin-bottom: -1px; cursor: pointer;
}
.dash-tabs button:hover { color: var(--ink); }
.dash-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem; box-shadow: var(--shadow); margin-bottom: 0.8rem; }
.panel h2 { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 0.7rem; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; margin-bottom: 1rem; }
.cards-8 { grid-template-columns: repeat(4, 1fr); }
.stats-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.bars {
  display: flex; align-items: flex-end; gap: 0.22rem; height: 8.6rem;
}
.chart-bar {
  flex: 1; min-width: 0; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.2rem;
}
.chart-bar i {
  display: block; width: 100%; max-width: 1.6rem;
  background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px;
}
.chart-bar small { font-size: 0.62rem; color: var(--muted); line-height: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.85rem 0.95rem; box-shadow: var(--shadow); }
.card small { color: var(--muted); display: block; margin-bottom: 0.25rem; }
.card strong { font-family: var(--serif); font-size: 1.3rem; }
.card.bad strong { color: var(--danger); }
.card.go { cursor: pointer; }
.card.go:hover { border-color: var(--accent); }

.alert-strip {
  width: 100%; margin-bottom: 0.7rem; text-align: left;
  background: #fff3e6; border-color: #f0c48a; color: #7a3f12; font-weight: 600;
}
.alert-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 0.8rem;
  flex-wrap: wrap; margin-bottom: 0.8rem; padding: 0.85rem 1rem;
  background: #fff3e6; border: 1px solid #f0c48a; border-radius: 10px;
}
.alert-banner.ok { background: #e8f0ff; border-color: #9db6ff; }
.alert-banner.ok strong { color: var(--accent); }
.alert-banner strong { color: #7a3f12; display: block; margin-bottom: 0.15rem; }
.alert-list { display: flex; flex-direction: column; gap: 0.55rem; }
.alert-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem; align-items: center;
  padding: 0.65rem 0.7rem; border-radius: 10px; border: 1px solid #f0c48a; background: #fffaf3;
}
.alert-item.crit { border-color: #e0b4b8; background: #fff1f3; }
.alert-media { width: 2.6rem; }
.alert-media .thumb, .alert-media .ic { width: 2.6rem; height: 2.6rem; border-radius: 6px; display: grid; place-items: center; font-size: 1.3rem; background: #dce6f7; }
.alert-top { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.alert-meter { height: 6px; background: #e8d7c0; border-radius: 99px; overflow: hidden; margin: 0.35rem 0 0.3rem; }
.alert-item.crit .alert-meter { background: #f0d4d8; }
.alert-meter i { display: block; height: 100%; background: #c27a1a; border-radius: 99px; }
.alert-item.crit .alert-meter i { background: var(--danger); width: 8% !important; }
.alert-actions { display: flex; flex-direction: column; gap: 0.3rem; }

@media (max-width: 720px) {
  .alert-item { grid-template-columns: auto 1fr; }
  .alert-actions { grid-column: 1 / -1; flex-direction: row; }
}
.tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.7rem; align-items: center; }
.tools .hint { flex: 1 1 100%; font-size: 0.82rem; }
.till-date { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--muted); }
.form-grid .wide { grid-column: 1 / -1; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 0.42rem 0.45rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
td.num, th.num { text-align: right; }
.muted { color: var(--muted); }
.low { color: #b45309; font-weight: 600; }
tr.need td { background: #fff6e8; }
tfoot td { border-bottom: 0; font-weight: 600; background: #eef3fb; }
.bc-row { display: flex; gap: 0.4rem; align-items: center; }
.bc-row input { flex: 1; }
.bc-preview { margin-top: 0.35rem; min-height: 2.6rem; }
.bc-cell { min-width: 8.5rem; max-width: 11rem; }
.barcode { width: 100%; height: 3.1rem; display: block; }
.barcode rect { fill: #0c1730; }
.barcode text { font: 9px ui-monospace, SFMono-Regular, monospace; fill: #0c1730; }

dialog {
  border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem;
  width: min(42rem, 94vw); max-height: 92vh; overflow: auto; background: var(--card);
}
dialog.print-ask {
  width: min(22rem, 94vw);
  text-align: center;
}
dialog.print-ask .hint { margin-bottom: 0.15rem; }
dialog.print-ask .print-ask-amt {
  font-family: var(--serif); font-size: 1.45rem; font-weight: 600;
  margin: 0.15rem 0 0.9rem;
}
dialog.print-ask menu { justify-content: center; flex-wrap: wrap; }
dialog::backdrop { background: rgba(5, 13, 34, 0.5); }
dialog h2 { font-family: var(--serif); margin-bottom: 0.7rem; }
.dlg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.dlg-grid .wide { grid-column: 1 / -1; }
.prod-margin {
  margin: 0.15rem 0 0;
  background: #e8f0ff; border: 1px solid #9db6ff; border-radius: 8px;
  padding: 0.5rem 0.7rem; font-size: 0.82rem; color: var(--ink);
}
.prod-margin strong { display: block; font-size: 1rem; margin-bottom: 0.12rem; }
.prod-margin.bad { background: #fff1f3; border-color: #e0b4b8; }
.prod-margin.bad strong { color: var(--danger); }
.dlg-grid label, #form-product label { display: flex; flex-direction: column; gap: 0.22rem; font-size: 0.8rem; color: var(--muted); }
input, select, textarea {
  font: inherit; padding: 0.42rem 0.5rem; border: 1px solid var(--line);
  border-radius: 6px; background: var(--input-bg); color: var(--ink);
}
.check-row { display: flex; gap: 1rem; margin: 0.7rem 0; font-size: 0.9rem; color: var(--ink); }
.check-row label { display: inline-flex; align-items: center; gap: 0.35rem; }
dialog menu { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.form-grid label { display: flex; flex-direction: column; gap: 0.22rem; font-size: 0.8rem; color: var(--muted); }

.toast {
  position: fixed; bottom: 1rem; right: 1rem; background: var(--nav-bg); color: #fff;
  padding: 0.65rem 0.9rem; border-radius: 8px; z-index: 20;
}
.auth-gate {
  position: fixed; inset: 0; z-index: 40;
  background: var(--auth-bg);
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
}
.auth-card {
  width: min(22rem, 100%);
  background: var(--auth-card);
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  padding: 1.4rem 1.3rem 1.2rem;
  color: var(--nav-fg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.auth-card h1 { font-family: var(--serif); font-size: 1.7rem; margin-bottom: 0.25rem; }
.auth-card .hint { color: #9db6ff; font-size: 0.88rem; margin-bottom: 0.55rem; line-height: 1.4; }
.auth-demo {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  margin: 0 0 0.9rem; padding: 0.45rem 0.65rem;
  border: 1px dashed #3d5cb8; border-radius: 8px;
  background: rgba(26, 76, 255, 0.18);
  color: #c5d2ee; font-size: 0.86rem; letter-spacing: 0.04em;
}
.auth-demo strong, .auth-demo b {
  color: #fff; font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.12em; font-weight: 700;
}
.auth-card label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: #9db6ff; margin-bottom: 0.55rem; }
.auth-card input {
  font: inherit; padding: 0.55rem 0.6rem; border-radius: 8px;
  border: 1px solid #3d5cb8; background: #050d22; color: #fff;
}
.auth-card .pin-in {
  font-size: 1.55rem; letter-spacing: 0.42em; text-align: center;
  font-variant-numeric: tabular-nums;
}
.auth-card .primary { width: 100%; margin-top: 0.35rem; padding: 0.7rem; }
.auth-err { color: #ff8fa0; font-size: 0.86rem; margin: 0.2rem 0 0.5rem; }
.nav-user { font-size: 0.8rem; color: #9db6ff; text-align: center; cursor: pointer; }
.nav-user:hover { color: #fff; }
.lang-switch {
  display: flex; gap: 0; border: 1px solid rgba(232, 240, 255, 0.35);
  border-radius: 8px; overflow: hidden;
}
.lang-switch button {
  flex: 1; appearance: none; border: 0; background: transparent;
  color: inherit; font: inherit; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; padding: 0.32rem 0.5rem; cursor: pointer;
}
.lang-switch button.on { background: var(--accent); color: var(--on-accent); }
.bar-actions .lang-switch { border-color: var(--line); color: var(--ink); }
.auth-card .lang-switch { margin-bottom: 0.85rem; border-color: var(--auth-line); }
.theme-switch button { font-size: 0.62rem; letter-spacing: 0.04em; padding: 0.32rem 0.38rem; }

html[data-theme="metal"] {
  --ink: #1b1f24;
  --muted: #5c646e;
  --paper: #b8bec7;
  --card: #d8dce2;
  --line: #8d949e;
  --accent: #4a535c;
  --accent-2: #c5ccd4;
  --danger: #b42336;
  --ok: #3d464f;
  --on-accent: #f4f6f8;
  --nav-bg: #2a2f35;
  --nav-fg: #eef1f4;
  --nav-muted: #b7bec6;
  --nav-hover: rgba(197, 204, 212, 0.22);
  --input-bg: #f3f4f6;
  --soft: #c5cad1;
  --auth-bg: #1c2025;
  --auth-card: #2f353c;
  --auth-line: #8d959e;
  --pay-cb: #3a4048;
  --shadow: 0 10px 26px rgba(18, 22, 28, 0.22);
}
html[data-theme="metal"] body {
  background:
    repeating-linear-gradient(-72deg, transparent 0 2px, rgba(255, 255, 255, 0.045) 2px 3px),
    linear-gradient(180deg, #d5d9df 0%, #b4bac4 46%, #c7ccd4 100%);
}
html[data-theme="metal"] .nav {
  background:
    linear-gradient(180deg, #5a6169 0%, #353b42 38%, #23272c 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
html[data-theme="metal"] .tile,
html[data-theme="metal"] .panel,
html[data-theme="metal"] .card,
html[data-theme="metal"] .ticket,
html[data-theme="metal"] dialog {
  background:
    linear-gradient(165deg, #f4f5f7 0%, #d4d8de 52%, #c2c7cf 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 20px rgba(20, 24, 30, 0.16);
}
html[data-theme="metal"] button.primary,
html[data-theme="metal"] button.pay,
html[data-theme="metal"] .nav nav button.on,
html[data-theme="metal"] .filters button.on,
html[data-theme="metal"] .lang-switch button.on {
  background: linear-gradient(180deg, #a7afb8 0%, #5c656e 46%, #3b4249 100%);
  border-color: #2c3238;
  color: #f3f5f7;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}
html[data-theme="metal"] .auth-card {
  background: linear-gradient(180deg, #4a5159 0%, #2a3036 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 22px 50px rgba(0, 0, 0, 0.4);
}
html[data-theme="metal"] .auth-card input {
  background: #1c2025;
  border-color: #8d959e;
  color: #fff;
}
html[data-theme="metal"] .auth-gate {
  background:
    repeating-linear-gradient(-72deg, transparent 0 2px, rgba(255, 255, 255, 0.03) 2px 3px),
    #1c2025;
}

html[data-theme="nuit"] {
  --ink: #e8eef8;
  --muted: #8b97b0;
  --paper: #0b1020;
  --card: #141b2e;
  --line: #2a3654;
  --accent: #4d7cff;
  --accent-2: #8eb4ff;
  --danger: #ff6b81;
  --ok: #7ea0ff;
  --on-accent: #fff;
  --nav-bg: #070b16;
  --nav-fg: #e8eef8;
  --nav-muted: #9db0d6;
  --nav-hover: rgba(77, 124, 255, 0.35);
  --input-bg: #0c1324;
  --soft: #1b2438;
  --auth-bg: #070b16;
  --auth-card: #12192b;
  --auth-line: #4d7cff;
  --pay-cb: #2a56d6;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
html[data-theme="nuit"] .tile,
html[data-theme="nuit"] .panel,
html[data-theme="nuit"] .card,
html[data-theme="nuit"] .ticket,
html[data-theme="nuit"] dialog {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}
html[data-theme="nuit"] .search,
html[data-theme="nuit"] input,
html[data-theme="nuit"] select,
html[data-theme="nuit"] textarea {
  color-scheme: dark;
}
html[data-theme="nuit"] tr.need td { background: #2a2214; }
html[data-theme="nuit"] tfoot td { background: #1a2236; }
html[data-theme="nuit"] .alert-strip,
html[data-theme="nuit"] .alert-banner { background: #2a2214; border-color: #7a5a28; color: #f0c48a; }
html[data-theme="nuit"] .alert-banner.ok { background: #152246; border-color: #4d7cff; }

@media (max-width: 960px) {
  body { grid-template-columns: 1fr; }
  .nav { height: auto; max-height: none; min-height: 0; position: relative; }
  .nav nav { flex-direction: row; flex-wrap: wrap; }
  .pos { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .stats-split { grid-template-columns: 1fr; }
}

@media print {
  .nav, header.bar, .filters, .tiles, .pays, .hold-acts, .hold-n, .toast { display: none !important; }
  body { display: block; }
  .ticket { box-shadow: none; border: 0; }
}
