/* =====================================================================
   Lucia POS · admin demo stylesheet (Trattoria Lucia premium tier)
   ---------------------------------------------------------------------
   Brand skin derived from the public site: wine red #722F37 on warm
   cream paper. App surface only. Loaded by admin.html, never by the
   marketing pages. Touch-first, 1280×800 landscape tablet target;
   desktop fine; below ~1080px the app pans horizontally.
   Animation policy: transform/opacity only; no rotation inside looping
   keyframes (the payment spinner is a scale/opacity dot pulse).
   ===================================================================== */

:root {
  --bg: #F5EFE3;
  --surface: #FCF8EF;
  --surface-raised: #FFFFFF;
  --border: rgba(101, 67, 53, 0.16);
  --accent: #722F37;
  --accent-strong: #8A3A45;
  --accent-soft: rgba(114, 47, 55, 0.08);
  --accent-border: rgba(114, 47, 55, 0.35);
  --warn-border: rgba(176, 122, 42, 0.5);
  --on-accent: #F7EDE4;
  --knob: #FCF8EF;
  --toggle-off: rgba(101, 67, 53, 0.28);
  --text: #2B211B;
  --text-muted: #6E5C50;
  --text-faint: #A09083;
  --avail: #5E7B5A;
  --occ: #B07A2A;
  --resv: #A03D3D;
  --danger: #B5483A;
  --success: #3E7A4E;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 12px 32px rgba(80, 45, 30, 0.16);
  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: 'Avenir Next', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SF Mono', 'Cascadia Mono', Consolas, 'Courier New', monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: not-allowed; }
input, textarea, select { font: inherit; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(114, 47, 55, 0.22); border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }
.nosb::-webkit-scrollbar { display: none; }
.nosb { scrollbar-width: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- motion ---------- */
@keyframes posFadeUp  { from { transform: translateY(8px); } to { transform: none; } }
@keyframes posScaleIn { from { transform: scale(0.96); }     to { transform: scale(1); } }
@keyframes posSlideIn { from { transform: translateX(36px); } to { transform: none; } }
@keyframes posSweep   { from { transform: scaleX(0); }       to { transform: scaleX(1); } }
@keyframes posPulse   { 0% { box-shadow: 0 0 0 0 rgba(114, 47, 55, 0.38); } 100% { box-shadow: 0 0 0 16px rgba(114, 47, 55, 0); } }
@keyframes posFlash   { 0% { background-color: rgba(114, 47, 55, 0.16); } 100% { background-color: transparent; } }
/* looping spinner: scale/opacity only, GPU-composited, no rotation */
@keyframes posDot     { 0%, 100% { transform: scale(0.55); opacity: 0.45; } 50% { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- print: ticket only, no app chrome ---------- */
@media print {
  body * { visibility: hidden !important; }
  #printArea, #printArea * { visibility: visible !important; }
  #printArea {
    position: fixed !important; left: 0 !important; top: 0 !important;
    width: 80mm !important; box-shadow: none !important;
    margin: 0 !important; border-radius: 0 !important;
  }
}

/* ---------- app frame ---------- */
.pos-app {
  display: flex; height: 100vh; height: 100dvh; overflow: hidden; min-width: 1080px;
  background: radial-gradient(1100px 700px at 75% -10%, rgba(114, 47, 55, 0.045), transparent 60%), var(--bg);
}
@media (max-width: 1100px) {
  body { overflow: auto; }
  .pos-app { width: 1080px; }
}

/* ---------- sidebar rail ---------- */
.pos-rail {
  width: 64px; flex: 0 0 64px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 0; border-right: 1px solid var(--border);
}
.rail-logo {
  width: 44px; height: 44px; border: 1px solid var(--accent); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 22px; color: var(--accent);
  margin-bottom: 14px; text-decoration: none;
}
.rail-btns { display: flex; flex-direction: column; gap: 6px; }
.rail-btn {
  position: relative; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; color: var(--text-muted);
}
.rail-btn:hover { background: var(--accent-soft); color: var(--accent); }
.rail-btn.active { background: var(--accent-soft); color: var(--accent); }
.rail-bar {
  position: absolute; left: -9px; top: 12px; bottom: 12px; width: 2px;
  border-radius: 2px; background: transparent; transform-origin: left center;
}
.rail-btn.active .rail-bar { background: var(--accent); animation: posSweep 0.2s ease-out; }

/* ---------- main column / header ---------- */
.pos-main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pos-header {
  display: flex; align-items: center; gap: 14px; padding: 12px 20px;
  border-bottom: 1px solid var(--border); animation: posFadeUp 0.4s ease-out;
}
.hd-title { min-width: 230px; }
.hd-title h1 { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: 0.01em; }
.hd-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.demo-badge {
  font-size: 11px; color: var(--occ); border: 1px solid var(--warn-border);
  border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.hd-spacer { flex: 1; }
.hd-search { position: relative; width: 270px; max-width: 26vw; }
.hd-search input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 10px 40px 10px 16px;
  color: var(--text); font-size: 13px; outline-offset: -2px;
}
.kbd-hint {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--text-faint); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 5px; font-family: var(--mono);
}
.shift-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 7px 12px; white-space: nowrap;
}
.shift-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hd-clock { text-align: right; min-width: 118px; }
.clock { font-family: var(--mono); font-size: 19px; letter-spacing: 0.02em; }
.hd-date { font-size: 11px; color: var(--text-faint); }
.cashier-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px 5px 5px;
  font-size: 13px;
}
.cashier-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
/* Header link to the mobile-concept preview (opens pos-mobile-preview.html in a new tab). */
.hd-preview {
  flex: 0 0 auto; width: 40px; height: 40px; margin-left: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 10px; color: var(--text-muted);
  text-decoration: none;
}
.hd-preview:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- KPI strip ---------- */
.kpi-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border); animation: posFadeUp 0.45s ease-out;
}
.kpi-cell { padding: 12px 20px; }
.kpi-cell + .kpi-cell { border-left: 1px solid var(--border); }
.kpi-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.kpi-value { font-family: var(--mono); font-size: 25px; margin-top: 3px; }
.kpi-value.accent { color: var(--accent); }
.kpi-value .dim-total { color: var(--text-faint); font-size: 17px; }
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---------- views ---------- */
.pos-views { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: posFadeUp 0.5s ease-out; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view-scroll { flex: 1; overflow-y: auto; }
.view-pad { padding: 22px 26px; margin: 0 auto; width: 100%; }
.w-740 { max-width: 740px; } .w-960 { max-width: 960px; } .w-1180 { max-width: 1180px; }
.view-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.view-head .vh-text { flex: 1; min-width: 180px; }
.view-head h2 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.vh-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.empty-box {
  padding: 46px; text-align: center; color: var(--text-faint); font-size: 13px;
  border: 1px dashed var(--border); border-radius: 12px;
}

/* ---------- low-stock ticker ---------- */
.ticker-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 9px 20px;
  border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.ticker-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; min-height: 30px; border-radius: 999px;
  border: 1px solid var(--warn-border); color: var(--occ);
  font-size: 12px; white-space: nowrap;
}
.ticker-chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ticker-chip:hover { background: var(--accent-soft); }
.ticker-chip.soldout { border-color: rgba(181, 72, 58, 0.55); color: var(--danger); }

/* ---------- floor & order layout ---------- */
.floor-wrap { display: flex; flex: 1; min-height: 0; }
.floor-col {
  width: 27%; min-width: 252px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0;
}
.zone-head { padding: 14px 16px 8px; }
.zone-title { font-family: var(--serif); font-size: 16px; }
.zone-micro { font-size: 10.5px; color: var(--text-faint); margin-top: 3px; text-wrap: pretty; }
.legend { display: flex; gap: 12px; margin-top: 8px; font-size: 10.5px; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; font-style: normal; }
.legend .lg-avail { background: var(--avail); }
.legend .lg-occ { background: var(--occ); }
.legend .lg-res { background: var(--resv); }
.floor-scroll { flex: 1; overflow-y: auto; padding: 6px 16px 16px; border-radius: 12px; }
.floor-scroll.pulse { animation: posPulse 1s ease-out; }
.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 9px; }

.table-card {
  --st: var(--avail);
  text-align: left; background: var(--surface);
  border: 1px solid var(--border); border-top: 3px solid var(--st);
  border-radius: 10px; padding: 9px 10px; min-height: 96px;
  display: flex; flex-direction: column; gap: 3px;
}
.table-card:hover { background: var(--surface-raised); }
.table-card.st-occupied { --st: var(--occ); }
.table-card.st-reserved { --st: var(--resv); }
.table-card.selected { box-shadow: 0 0 0 2px var(--accent); }
.table-card.pulse { animation: posPulse 1s ease-out; }
.tc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.tc-label { font-family: var(--serif); font-size: 15px; }
.tc-status { font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--st); }
.tc-seats { font-size: 10.5px; color: var(--text-faint); }
.tc-sub { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; min-height: 15px; }
.tc-total { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.tc-splits { font-size: 9px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 6px; }

/* ---------- menu ---------- */
.menu-col { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.menu-head { padding: 14px 18px 0; }
.cat-tabs { display: flex; gap: 2px; margin-top: 6px; overflow-x: auto; }
.cat-tab { position: relative; padding: 11px 13px; min-height: 44px; color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.cat-tab:hover { color: var(--accent); }
.cat-tab.active { color: var(--accent); }
.cat-tab .cnt { font-size: 10.5px; color: var(--text-faint); }
.cat-bar { position: absolute; left: 11px; right: 11px; bottom: 6px; height: 2px; background: transparent; transform-origin: left center; }
.cat-tab.active .cat-bar { background: var(--accent); animation: posSweep 0.2s ease-out; }
.menu-scroll { flex: 1; overflow-y: auto; padding: 14px 18px 18px; border-top: 1px solid var(--border); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }

.menu-card {
  display: flex; flex-direction: column; align-items: stretch; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.menu-card:hover { background: var(--surface-raised); border-color: var(--accent-border); }
.menu-card.out { opacity: 0.45; }
.menu-card.flash { animation: posFlash 1.4s ease-out; }
.mc-art {
  position: relative;
  height: 96px; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border); color: var(--accent);
}
.mc-art.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu-card.out .mc-art.has-img img { filter: grayscale(0.7); }
.mc-flag { position: absolute; top: 8px; left: 8px; }
.g-forretter   { background: linear-gradient(135deg, #F1E6CE, #E9DBBD); }
.g-hovedretter { background: linear-gradient(135deg, #EFE0CC, #E6D2B6); }
.g-desserter   { background: linear-gradient(135deg, #F2E2DC, #EAD2C9); }
.g-vin         { background: linear-gradient(135deg, #EFDCDA, #E5C8C6); }
.g-drikke      { background: linear-gradient(135deg, #EAE4D2, #DFD6BE); }
.mc-body { display: block; padding: 10px 12px 11px; }
.mc-toprow { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.mc-name { font-family: var(--serif); font-size: 14px; line-height: 1.25; }
.mc-price { font-family: var(--mono); font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.mc-desc { display: block; font-size: 11px; color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; min-height: 14px; align-items: center; }
.diet-badge {
  font-size: 8px; letter-spacing: 0.09em; color: var(--accent);
  border: 1px solid var(--accent-border); border-radius: 999px; padding: 1.5px 6px;
}
.low-chip { font-size: 9px; font-weight: 600; color: var(--on-accent); background: var(--occ); border-radius: 999px; padding: 2px 7px; }
.soldout-chip { font-size: 9px; font-weight: 600; color: var(--on-accent); background: var(--resv); border-radius: 999px; padding: 2px 7px; }

/* ---------- order panel ---------- */
.order-col {
  width: 30%; min-width: 308px; border-left: 1px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column;
  min-height: 0; overflow-y: auto;
}
.op-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.op-title-row { display: flex; align-items: center; gap: 8px; }
.op-table { font-family: var(--serif); font-size: 19px; }
.op-status {
  --st: var(--avail);
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--st); border: 1px solid var(--st); border-radius: 999px; padding: 2px 8px;
}
.op-status.st-occupied { --st: var(--occ); }
.op-status.st-reserved { --st: var(--resv); }
.op-title-row .sp { flex: 1; }
.op-orderno { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.op-waiter-btn { font-size: 12px; color: var(--text-muted); margin-top: 5px; border-bottom: 1px dotted var(--text-faint); padding: 2px 0; }
.op-waiter-btn:hover { color: var(--accent); }
.order-tabs { display: flex; gap: 6px; margin-top: 9px; }
.op-lines { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding: 2px 16px; }
.op-empty { padding: 34px 10px; text-align: center; color: var(--text-faint); font-size: 12.5px; text-wrap: pretty; }

.order-line { padding: 10px 4px; border-bottom: 1px solid var(--border); border-radius: 6px; }
.order-line.flash { animation: posFlash 0.9s ease-out; }
.ol-top { display: flex; gap: 8px; align-items: baseline; }
.ol-name { flex: 1; font-family: var(--serif); font-size: 13.5px; }
.ol-total { font-family: var(--mono); font-size: 12.5px; }
.ol-controls { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.step-btn {
  width: 44px; height: 40px; border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 15px; flex: 0 0 auto;
}
.step-btn:hover { border-color: var(--accent); color: var(--accent); }
.ol-qty { font-family: var(--mono); font-size: 13px; min-width: 18px; text-align: center; }
.ol-unit { font-size: 10.5px; color: var(--text-muted); }
.ol-controls .sp { flex: 1; }
.ol-note-btn { font-size: 11px; color: var(--text-muted); padding: 10px 6px; }
.ol-note-btn:hover { color: var(--accent); }
.ol-rm-btn { font-size: 11px; color: var(--danger); padding: 10px 6px; opacity: 0.85; }
.ol-rm-btn:hover { opacity: 1; }
.ol-note-input {
  width: 100%; margin-top: 7px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; color: var(--text); font-size: 12px;
}
.ol-note-show { font-size: 11px; font-style: italic; color: var(--accent); opacity: 0.8; margin-top: 5px; }

.op-adjust { border-top: 1px solid var(--border); padding: 10px 16px 6px; display: flex; flex-direction: column; gap: 8px; }
.adj-row { display: flex; align-items: center; gap: 8px; }
.adj-label { font-size: 11px; color: var(--text-muted); width: 86px; flex: 0 0 auto; }
.adj-unit { font-size: 11px; color: var(--text-faint); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.seg-btn { font-size: 11px; padding: 7px 11px; min-height: 36px; color: var(--text-muted); }
.seg-btn.active { background: var(--accent); color: var(--on-accent); }
.inp {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; color: var(--text); font-size: 12.5px;
}
.inp.right { text-align: right; }
.inp.grow { flex: 1; min-width: 0; }
.inp.w-74 { width: 74px; }

.op-totals { padding: 8px 16px 6px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.tot-row { display: flex; justify-content: space-between; }
.tot-row .lbl { color: var(--text-muted); }
.tot-row .amt { font-family: var(--mono); }
.tot-rule { height: 1px; background: linear-gradient(90deg, var(--accent), transparent); opacity: 0.5; margin: 4px 0; }
.tot-grand { display: flex; justify-content: space-between; align-items: baseline; }
.tg-label { font-family: var(--serif); font-size: 16px; }
.tg-amt { font-family: var(--serif); font-size: 23px; color: var(--accent); }
.tot-herav { font-size: 10.5px; color: var(--text-faint); text-align: right; }

.op-actions { padding: 8px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.act-3grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
.op-actions .ghost-btn { min-height: 42px; font-size: 11.5px; padding: 4px; text-align: center; }
.pay-btn {
  min-height: 48px; border-radius: 10px; background: var(--accent);
  color: var(--on-accent); font-size: 14.5px; font-weight: 600; text-align: center;
}
.pay-btn:hover { background: var(--accent-strong); }
.clear-btn { font-size: 11px; color: var(--text-faint); text-align: center; padding: 4px; }
.clear-btn:hover { color: var(--danger); }
.op-actions button:disabled, .op-actions button.dim { opacity: 0.4; }

.op-noTable {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 30px; text-align: center;
}
.nt-circle {
  width: 52px; height: 52px; border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 21px; color: var(--accent);
}
.nt-text { font-size: 13px; color: var(--text-faint); max-width: 200px; text-wrap: pretty; }

/* ---------- generic controls ---------- */
.chip-btn {
  font-size: 12px; padding: 8px 15px; min-height: 36px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted); background: transparent;
  white-space: nowrap;
}
.chip-btn:hover { border-color: var(--accent); }
.chip-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip-btn.sm { font-size: 12px; padding: 6px 12px; min-height: 30px; }
.chip-btn.md { padding: 9px 13px; min-height: 38px; }
.chip-btn.lg { font-size: 13px; padding: 10px 16px; min-height: 44px; }

.primary-btn {
  min-height: 44px; padding: 0 20px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 13.5px;
}
.primary-btn:hover { background: var(--accent-strong); }
.ghost-btn { border: 1px solid var(--border); border-radius: 9px; color: var(--text-muted); }
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }
.ghost-accent-btn { border: 1px solid var(--accent); border-radius: 10px; color: var(--accent); font-size: 13px; }
.ghost-accent-btn:hover { background: var(--accent-soft); }
.danger-ghost-btn { min-height: 44px; padding: 0 18px; border: 1px solid rgba(181, 72, 58, 0.5); border-radius: 10px; color: var(--danger); font-size: 13px; }
.danger-ghost-btn:hover { background: rgba(181, 72, 58, 0.12); }

.search-pill {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 16px; color: var(--text); font-size: 13px;
}

.toggle {
  width: 46px; height: 25px; border-radius: 999px; background: var(--toggle-off);
  position: relative; flex: 0 0 auto; transition: background 0.15s;
}
.toggle .knob {
  position: absolute; top: 3px; left: 3px; width: 19px; height: 19px;
  border-radius: 50%; background: var(--knob); transition: left 0.15s;
}
.toggle.on { background: var(--accent); }
.toggle.on .knob { left: 24px; }
.toggle.sm { width: 42px; height: 23px; }
.toggle.sm .knob { width: 17px; height: 17px; }
.toggle.sm.on .knob { left: 22px; }

.field { margin-bottom: 12px; }
.f-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 5px; }
.f-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
  padding: 11px 13px; color: var(--text); font-size: 13.5px;
}
textarea.f-input { resize: vertical; font-family: var(--sans); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span-2 { grid-column: 1 / -1; }

/* ---------- reservations view ---------- */
.res-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 16px; margin-bottom: 9px;
}
.res-row.dim { opacity: 0.45; }
.res-time { width: 72px; flex: 0 0 auto; text-align: center; }
.rt-time { font-family: var(--mono); font-size: 18px; }
.rt-cd { font-size: 9.5px; letter-spacing: 0.07em; color: var(--text-faint); text-transform: uppercase; margin-top: 1px; }
.res-vline { width: 1px; align-self: stretch; background: var(--border); }
.res-mid { flex: 1; min-width: 0; }
.res-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.res-name { font-family: var(--serif); font-size: 15.5px; }
.res-chip { font-size: 10px; color: var(--accent); border: 1px solid var(--accent-border); border-radius: 999px; padding: 2px 8px; }
.res-status { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 999px; padding: 2px 8px; }
.res-status.seated { color: var(--occ); }
.res-status.cancelled { color: var(--text-faint); }
.res-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.res-note { font-size: 12px; font-style: italic; color: var(--accent); opacity: 0.85; margin-top: 3px; }
.seat-btn { min-height: 42px; padding: 0 18px; border: 1px solid var(--accent); border-radius: 10px; color: var(--accent); font-size: 13px; flex: 0 0 auto; }
.seat-btn:hover { background: var(--accent-soft); }
.res-cancel-btn { min-height: 42px; padding: 0 12px; color: var(--text-faint); font-size: 12px; flex: 0 0 auto; }
.res-cancel-btn:hover { color: var(--danger); }

/* ---------- customers view ---------- */
.cust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; }
.cust-card { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 15px 16px; }
.cust-card:hover { background: var(--surface-raised); border-color: var(--accent-border); }
.cu-top { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 13px;
}
.avatar.lg { width: 46px; height: 46px; font-size: 16px; }
.cu-nameblock { flex: 1; min-width: 0; }
.cu-name { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-phone { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.tier-badge {
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent-border); border-radius: 999px; padding: 2.5px 8px; flex: 0 0 auto;
}
.cu-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 13px; }
.cu-stat .lbl { display: block; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.cu-stat .num { display: block; font-family: var(--mono); font-size: 14.5px; margin-top: 2px; }
.cu-stat .num.accent { color: var(--accent); }
.cu-last { display: block; border-top: 1px solid var(--border); margin-top: 12px; padding-top: 8px; font-size: 11px; color: var(--text-faint); }

/* ---------- history view ---------- */
.hi-chips { display: flex; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.hist-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 9px; overflow: hidden; }
.hist-rowbtn { display: flex; width: 100%; align-items: center; gap: 13px; padding: 13px 16px; min-height: 48px; }
.hist-rowbtn:hover { background: var(--surface-raised); }
.hi-time { font-family: var(--mono); font-size: 13px; color: var(--text-muted); }
.hi-label { font-family: var(--serif); font-size: 14.5px; }
.hi-waiter { font-size: 11.5px; color: var(--text-faint); }
.hi-cust { font-size: 11.5px; color: var(--accent); }
.hist-rowbtn .sp { flex: 1; }
.pm-chip { font-size: 10px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 2.5px 9px; }
.hi-total { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.hist-detail { border-top: 1px solid var(--border); padding: 12px 16px; background: rgba(101, 67, 53, 0.05); }
.hd-line { display: flex; gap: 10px; font-size: 12.5px; padding: 3px 0; }
.hd-line .qty { font-family: var(--mono); color: var(--text-faint); width: 30px; }
.hd-line .nm { flex: 1; }
.hd-line .amt { font-family: var(--mono); }
.hist-detail .row-end { display: flex; justify-content: flex-end; margin-top: 10px; }
.reprint-btn { min-height: 38px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 9px; color: var(--accent); font-size: 12.5px; }
.reprint-btn:hover { background: var(--accent-soft); }

/* ---------- daily summary ---------- */
.sum-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sum-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.sc-label { font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-faint); }
.sc-num { font-family: var(--mono); font-size: 27px; margin-top: 6px; }
.sc-num.accent { color: var(--accent); }
.sc-sub { font-size: 11px; color: var(--text-faint); margin-top: 4px; }
.sum-block { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.sum-block .blk-label { font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px; }
.sum-empty { font-size: 12.5px; color: var(--text-faint); padding: 8px 0; }
.bar-row { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
.bar-label { font-size: 12px; color: var(--text-muted); width: 84px; flex: 0 0 auto; }
.bar-track { flex: 1; height: 13px; background: rgba(101, 67, 53, 0.12); border-radius: 7px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 7px; }
.bar-amt { font-family: var(--mono); font-size: 12.5px; width: 104px; text-align: right; flex: 0 0 auto; }
.top-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.top-row .rank { font-family: var(--mono); color: var(--text-faint); width: 22px; }
.top-row .nm { flex: 1; font-family: var(--serif); }
.top-row .qty { font-family: var(--mono); color: var(--text-muted); }
.top-row .rev { font-family: var(--mono); width: 104px; text-align: right; }

/* ---------- settings view ---------- */
.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.set-card-title { font-family: var(--serif); font-size: 15px; color: var(--accent); margin-bottom: 14px; }
.set-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--border); padding: 13px 0 4px; }
.set-toggle-row + .set-toggle-row { margin-top: 9px; }
.str-name { font-size: 13.5px; }
.str-sub { font-size: 11px; color: var(--text-faint); }
.lang-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.lang-seg button { font-size: 12.5px; padding: 11px 16px; color: var(--text-muted); }
.lang-seg button.active { background: var(--accent); color: var(--on-accent); }
.set-data-row { display: flex; gap: 10px; flex-wrap: wrap; }
.set-data-row .sp { flex: 1; }
.set-data-row .ghost-btn, .set-data-row .ghost-accent-btn { min-height: 44px; padding: 0 18px; font-size: 13px; border-radius: 10px; }
.set-credit { text-align: center; font-size: 11px; color: var(--text-faint); padding: 4px 0 26px; }

/* ---------- context menu ---------- */
.ctx-overlay { position: fixed; inset: 0; z-index: 60; }
.ctx-menu {
  position: absolute; background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 208px;
  animation: posScaleIn 0.14s ease-out;
}
.ctx-title { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); padding: 7px 11px 5px; }
.ctx-item { display: block; width: 100%; padding: 11px; min-height: 42px; border-radius: 8px; font-size: 13px; color: var(--text); }
.ctx-item:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- modal layer ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(43, 26, 20, 0.45); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.drawer-mode { align-items: stretch; justify-content: flex-end; padding: 0; }
.modal {
  background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow); padding: 22px;
  max-height: 92vh; overflow-y: auto; animation: posScaleIn 0.18s ease-out;
  max-width: 94vw;
}
.modal.pad-18 { padding: 18px; }
.modal.w-372 { width: 372px; } .modal.w-380 { width: 380px; } .modal.w-400 { width: 400px; }
.modal.w-440 { width: 440px; } .modal.w-460 { width: 460px; } .modal.w-478 { width: 478px; }
.modal-title { font-family: var(--serif); font-size: 18px; }
.modal-sub { font-size: 12px; color: var(--text-faint); margin-top: 4px; margin-bottom: 14px; text-wrap: pretty; }
.modal-btns { display: flex; gap: 9px; margin-top: 15px; }
.modal-btns .ghost-btn { flex: 1; min-height: 46px; border-radius: 10px; font-size: 14px; text-align: center; }
.modal-btns .ghost-accent-btn { padding: 0 12px; text-align: center; white-space: nowrap; }
.modal-btns .confirm-btn {
  flex: 1.4; min-height: 46px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 14px; text-align: center;
}
.modal-btns .confirm-btn:hover { background: var(--accent-strong); }
.modal-btns .confirm-btn:disabled { opacity: 0.4; }
.modal-btns .danger-confirm-btn {
  flex: 1; min-height: 46px; border-radius: 10px;
  background: var(--danger); color: var(--on-accent);
  font-weight: 600; font-size: 14px; text-align: center;
}
.modal-btns .danger-confirm-btn:hover { opacity: 0.9; }
.confirm-msg { font-size: 14px; line-height: 1.5; text-wrap: pretty; }

.drawer {
  background: var(--surface-raised); border-left: 1px solid var(--border);
  box-shadow: var(--shadow); padding: 24px; animation: posSlideIn 0.22s ease-out;
  width: 390px; max-width: 92vw; height: 100%; overflow-y: auto;
  display: flex; flex-direction: column;
}
.drawer-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 18px; }
.drawer-stat { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.drawer-stat .lbl { display: block; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.drawer-stat .num { display: block; font-family: var(--mono); font-size: 16px; margin-top: 3px; }
.drawer-stat .num.accent { color: var(--accent); }
.drawer-sec-label { font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-faint); margin-top: 22px; border-top: 1px solid var(--border); padding-top: 14px; }
.drawer-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.drawer-row .tm { font-family: var(--mono); color: var(--text-faint); }
.drawer-row .nm { flex: 1; }
.drawer-row .amt { font-family: var(--mono); color: var(--accent); }
.drawer-foot { margin-top: auto; padding-top: 16px; }
.drawer-foot .ghost-btn { width: 100%; min-height: 46px; border-radius: 10px; font-size: 14px; text-align: center; }

/* ---------- thermal ticket (KOT / receipt / Z) ---------- */
.ticket { background: #FAF6EC; color: #1c1813; font-family: var(--mono); font-size: 11.5px; padding: 18px 16px; border-radius: 4px; }
.ticket.kot { font-size: 12px; }
.tk-c { text-align: center; }
.tk-head { text-align: center; font-size: 14px; font-weight: 700; letter-spacing: 0.18em; }
.tk-head.z { font-size: 13.5px; letter-spacing: 0.16em; }
.tk-brand { text-align: center; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.tk-dash { border-top: 1px dashed #8a8273; margin: 9px 0; }
.tk-row { display: flex; justify-content: space-between; padding: 1.5px 0; }
.tk-line { display: flex; gap: 7px; padding: 2.5px 0; }
.tk-line .qty { width: 28px; flex: 0 0 auto; }
.tk-line .nm { flex: 1; }
.tk-note { font-style: italic; font-size: 10.5px; padding-left: 35px; }
.kot .tk-line { gap: 8px; padding: 3.5px 0; font-size: 12.5px; }
.kot .tk-line .qty { font-weight: 700; width: 30px; }
.kot .tk-note { font-weight: 700; font-style: normal; font-size: 11px; padding: 0 0 4px 38px; }
.kot-new { font-weight: 700; border: 1.5px solid #1c1813; padding: 0 5px; font-size: 10px; align-self: center; }
.tk-total { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; padding: 5px 0 2px; }
.tk-small { font-size: 10.5px; padding: 1px 0; }
.tk-bold { font-weight: 700; }
.tk-footer { text-align: center; font-size: 10px; opacity: 0.55; margin-top: 4px; }

/* ---------- checkout modal ---------- */
.co-headrow { display: flex; align-items: baseline; gap: 10px; }
.co-headrow .meta { font-size: 12.5px; color: var(--text-faint); }
.co-lines { max-height: 138px; overflow-y: auto; margin-top: 12px; border-top: 1px solid var(--border); }
.co-line { display: flex; gap: 9px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.co-line .qty { font-family: var(--mono); color: var(--text-faint); width: 30px; flex: 0 0 auto; }
.co-line .nm { flex: 1; }
.co-line .amt { font-family: var(--mono); }
.co-totrows { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; margin-top: 10px; }
.co-totrows .tg-amt { font-size: 24px; }
.co-cust-box { border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; margin-top: 13px; }
.co-box-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.co-cust-row { display: flex; align-items: center; gap: 9px; }
.co-cust-name { font-size: 13.5px; font-weight: 600; }
.co-cust-row .sp { flex: 1; }
.co-detach { font-size: 11.5px; color: var(--text-faint); padding: 8px 6px; min-height: 36px; }
.co-detach:hover { color: var(--danger); }
.co-cust-result { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 4px; min-height: 40px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.co-cust-result:hover { color: var(--accent); }
.co-cust-result .nm { font-weight: 600; }
.co-cust-result .ph { color: var(--text-faint); font-size: 11px; }
.co-cust-result .sp { flex: 1; }
.co-cust-result .tier { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.co-tabs { display: flex; gap: 2px; margin-top: 13px; border-bottom: 1px solid var(--border); }
.co-tab { position: relative; flex: 1; padding: 11px 6px; min-height: 44px; text-align: center; font-size: 13px; color: var(--text-muted); }
.co-tab.active { color: var(--accent); }
.co-tab .bar { position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: transparent; transform-origin: left center; }
.co-tab.active .bar { background: var(--accent); }
.co-pane { padding: 13px 2px 2px; }
.co-pane.center { padding: 16px 2px 4px; text-align: center; }
.co-cap { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.co-status { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 10px; min-height: 26px; font-size: 13.5px; color: var(--text-muted); }
.co-status.ok { color: var(--success); }
.spinner-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); animation: posDot 0.9s ease-in-out infinite; }
.co-cash-row { display: flex; align-items: center; gap: 9px; }
.co-cash-row .lbl { font-size: 12px; color: var(--text-muted); width: 70px; }
.co-cash-row .inp { flex: 1; padding: 10px 12px; font-size: 14px; font-family: var(--mono); }
.quick-row { display: flex; gap: 7px; margin-top: 9px; }
.quick-row .ghost-btn { flex: 1; min-height: 40px; border-radius: 8px; font-size: 12.5px; text-align: center; }
.co-calc { display: flex; flex-direction: column; gap: 3px; margin-top: 11px; font-size: 12.5px; }
.co-calc .tot-row .amt.accent { color: var(--accent); }
.co-calc .amt.ok { color: var(--success); }
.co-calc .amt.bad { color: var(--danger); }
.co-split-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.method-seg .seg-btn { font-size: 11px; padding: 9px 10px; min-height: 40px; }
.co-amt-inp { flex: 1; min-width: 0; padding: 9px 11px; font-size: 13px; text-align: right; font-family: var(--mono); }
.x-btn { width: 44px; height: 40px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.x-btn:hover { color: var(--danger); border-color: var(--danger); }
.add-pm-btn { font-size: 12px; color: var(--accent); padding: 8px 2px; min-height: 36px; }
.add-pm-btn:hover { color: var(--accent-strong); }

/* split-bill modal */
.sp-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.sp-line .info { flex: 1; min-width: 0; }
.sp-line .nm { font-family: var(--serif); font-size: 13.5px; }
.sp-line .meta { font-size: 11px; color: var(--text-faint); }
.sp-line .step-btn { width: 44px; height: 40px; font-size: 16px; }
.sp-qty { font-family: var(--mono); font-size: 14px; min-width: 22px; text-align: center; color: var(--text-faint); }
.sp-qty.sel { color: var(--accent); }
.sp-totrow { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; font-size: 13px; }
.sp-totrow .lbl { color: var(--text-muted); }
.sp-totrow .amt { font-family: var(--mono); font-size: 16px; color: var(--accent); }

/* seat / stock modal bits */
.warn-box { font-size: 12.5px; color: var(--occ); border: 1px solid var(--warn-border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; text-wrap: pretty; }
.seat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.seat-tile { min-height: 62px; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; text-align: left; }
.seat-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.seat-tile .nm { display: block; font-family: var(--serif); font-size: 14.5px; }
.seat-tile .seats { display: block; font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 11px; }
.stock-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--border); border-radius: 11px; padding: 13px 15px; }
.stock-row + .stock-row { margin-top: 10px; }
.stock-row .lbl { font-size: 13.5px; }
.stock-steps { display: flex; align-items: center; gap: 10px; }
.stock-steps .step-btn { width: 44px; height: 44px; border-radius: 9px; font-size: 17px; }
.stock-count { font-family: var(--mono); font-size: 18px; min-width: 34px; text-align: center; }
.stock-note { font-size: 12px; color: var(--text-faint); margin-top: 10px; }
.modal-cap { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.rc-email-row { display: flex; gap: 8px; margin-top: 12px; }
.rc-email-row .f-input { flex: 1; padding: 10px 12px; font-size: 13px; }
.rc-email-row .primary-btn { min-height: 42px; padding: 0 16px; border-radius: 9px; font-size: 13px; }

/* ---------- toasts ---------- */
.toast-stack {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--surface-raised); border: 1px solid var(--border);
  border-left: 2px solid var(--accent); padding: 12px 16px; border-radius: 10px;
  box-shadow: var(--shadow); font-size: 13px; animation: posFadeUp 0.25s ease-out;
  max-width: 320px;
}
