/* ══════════════════════════════════════════════════════
   VynorPay POS — style.css
   Design inspired by SumUp: warm off-white bg,
   white floating cards, achromatic palette, Inter font
══════════════════════════════════════════════════════ */

/* ════ LIGHT MODE (default) ════ */
:root {
  --bg:          #F5F4F0;
  --bg2:         #ECEAE5;
  --surface:     #FFFFFF;
  --surface-2:   #F9F8F6;
  --surface-3:   #F0EEE9;
  --t1:  #1A1A1A;
  --t2:  #5A5A5A;
  --t3:  #9A9A9A;
  --t-inv: #FFFFFF;
  --black:       #1A1A1A;
  --black-h:     #333333;
  --green:       #2E7D32;
  --green-s:     rgba(46,125,50,0.10);
  --amber:       #E65100;
  --amber-s:     rgba(230,81,0,0.10);
  --blue:        #1565C0;
  --blue-s:      rgba(21,101,192,0.10);
  --red:         #C62828;
  --red-s:       rgba(198,40,40,0.10);
  --purple:      #6200EA;
  --ts-free:     #2E7D32;  --ts-free-bg:  #E8F5E9;
  --ts-occ:      #E65100;  --ts-occ-bg:   #FFF3E0;
  --ts-res:      #1565C0;  --ts-res-bg:   #E3F2FD;
  --ts-bill:     #C62828;  --ts-bill-bg:  #FFEBEE;
  --br:      rgba(0,0,0,0.08);
  --br-med:  rgba(0,0,0,0.14);
  --r-xs: 5px;  --r-sm: 9px;  --r-md: 13px; --r-lg: 18px; --r-full: 9999px;
  --sh-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --sh-md: 0 3px 10px rgba(0,0,0,0.09);
  --sh-lg: 0 10px 30px rgba(0,0,0,0.14);
  --ease: cubic-bezier(0.25,0.46,0.45,0.94);
  --dur: 0.18s;
  --rail-w: 56px;  --order-w: 315px;  --admin-nav-w: 210px;
}

/* ════ DARK MODE ════ */
[data-theme="dark"] {
  --bg:          #0F0F0F;
  --bg2:         #1A1A1A;
  --surface:     #1E1E1E;
  --surface-2:   #252525;
  --surface-3:   #2E2E2E;
  --t1:  #F0F0F0;
  --t2:  #A0A0A0;
  --t3:  #5A5A5A;
  --t-inv: #0F0F0F;
  --black:       #F0F0F0;
  --black-h:     #CCCCCC;
  --green:       #4CAF50;
  --green-s:     rgba(76,175,80,0.15);
  --amber:       #FF8A00;
  --amber-s:     rgba(255,138,0,0.15);
  --blue:        #42A5F5;
  --blue-s:      rgba(66,165,245,0.15);
  --red:         #EF5350;
  --red-s:       rgba(239,83,80,0.15);
  --purple:      #CE93D8;
  --ts-free:     #66BB6A;  --ts-free-bg:  rgba(76,175,80,0.15);
  --ts-occ:      #FFA726;  --ts-occ-bg:   rgba(255,167,38,0.15);
  --ts-res:      #42A5F5;  --ts-res-bg:   rgba(66,165,245,0.15);
  --ts-bill:     #EF5350;  --ts-bill-bg:  rgba(239,83,80,0.15);
  --br:      rgba(255,255,255,0.08);
  --br-med:  rgba(255,255,255,0.14);
  --sh-sm: 0 1px 4px rgba(0,0,0,0.35);
  --sh-md: 0 3px 12px rgba(0,0,0,0.45);
  --sh-lg: 0 10px 32px rgba(0,0,0,0.60);
}

/* Dark mode PIN screen */
[data-theme="dark"] #screen-pin { background: #0A0A0A; }
[data-theme="dark"] .pk { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .pk:hover { background: rgba(255,255,255,0.14); }

/* Dark mode form inputs */
[data-theme="dark"] .fi,
[data-theme="dark"] .disc-inp,
[data-theme="dark"] .op-note-inp,
[data-theme="dark"] .pos-search { background: var(--surface-3); color: var(--t1); border-color: var(--br-med); }

/* Dark mode item tile overlay stronger */
[data-theme="dark"] .item-tile .it-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.6) 100%);
}

/* Dark mode chart area */
[data-theme="dark"] canvas { filter: brightness(0.9); }

/* Dark mode modal */
[data-theme="dark"] .modal-back { background: rgba(0,0,0,0.7); }

/* Dark mode receipt tape */
[data-theme="dark"] .receipt-tape { background: var(--surface-3); border-color: var(--br); color: var(--t2); }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 14px; color: var(--t1); background: var(--bg); -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 4px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--br-med); border-radius: 2px; }

/* ── Utility ── */
.hidden { display: none !important; }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }
.btn-full { width: 100%; justify-content: center; }

/* ══════════════════════════════════════════
   SCREEN SYSTEM
══════════════════════════════════════════ */
.screen { position: fixed; inset: 0; display: none; background: var(--bg); }
.screen.active { display: flex; }

/* ══════════════════════════════════════════
   PIN SCREEN
══════════════════════════════════════════ */
#screen-pin {
  align-items: center; justify-content: center;
  background: #141414;
  background-image: radial-gradient(ellipse at 15% 75%, rgba(255,255,255,0.04) 0%, transparent 55%);
}
.pin-card { display: flex; flex-direction: column; align-items: center; width: 290px; max-width: 90vw; position: relative; }
.pin-lang-bar { position: absolute; top: -48px; right: 0; display: flex; gap: 3px; background: rgba(255,255,255,0.08); border-radius: var(--r-full); padding: 3px; }
.lbtn { padding: 3px 10px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.4); transition: all var(--dur); }
.lbtn.active { background: rgba(255,255,255,0.92); color: #1A1A1A; }
.lbtn:hover:not(.active) { color: rgba(255,255,255,0.7); }
.pin-brand { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.02em; margin-bottom: 28px; }
.pin-sub { font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 18px; }
.pin-dots { display: flex; gap: 13px; margin-bottom: 10px; direction: ltr; }
.pin-dots span { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); background: transparent; transition: all 0.15s; }
.pin-dots span.on { background: #fff; border-color: #fff; }
.pin-err { font-size: 12px; color: #FF6B6B; margin-bottom: 8px; min-height: 18px; }
.pin-err.hidden { visibility: hidden; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; width: 100%; margin-bottom: 16px; }
.pk { aspect-ratio: 1; border-radius: var(--r-sm); background: rgba(255,255,255,0.1); color: #fff; font-size: 20px; font-weight: 500; transition: background var(--dur), transform 0.08s; }
.pk:hover  { background: rgba(255,255,255,0.17); }
.pk:active { transform: scale(0.94); }
.pk-staff { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.06); }
.pk-del   { font-size: 16px; color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.06); }
.pin-hint { font-size: 11px; color: rgba(255,255,255,0.28); }
.pin-hint strong { color: rgba(255,255,255,0.5); }

/* ══════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════ */
#screen-app { flex-direction: row; }

/* ── Rail ── */
.rail {
  width: var(--rail-w); background: var(--surface);
  border-right: 1px solid var(--br);
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  flex-shrink: 0; padding: 12px 0;
}
.rail-top, .rail-bot { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.rail-brand { font-size: 18px; font-weight: 800; color: var(--t1); margin-bottom: 10px; }
.ri {
  width: 38px; height: 38px; border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  color: var(--t3); transition: all var(--dur);
}
.ri svg { width: 20px; height: 20px; }
.ri:hover  { background: var(--surface-3); color: var(--t1); }
.ri-active { background: var(--surface-3); color: var(--t1); }
.rail-lang { display: flex; flex-direction: column; gap: 3px; background: rgba(0,0,0,0.05); border-radius: var(--r-full); padding: 3px; }
.rail .lbtn { color: var(--t3); }
.rail .lbtn.active { background: var(--t1); color: #fff; }
.rail .lbtn:hover:not(.active) { color: var(--t1); }
.rail-user { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--br); display: flex; align-items: center; justify-content: center; color: var(--t2); }
.rail-user svg { width: 17px; height: 17px; }
.rail-user:hover { background: var(--bg2); }

/* ── Main content ── */
.app-main { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.view { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.view.active { display: flex; }

/* View topbar */
.view-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px 16px; gap: 12px; flex-wrap: wrap; flex-shrink: 0;
  background: var(--bg);
}
.view-h1 { font-size: 22px; font-weight: 800; color: var(--t1); letter-spacing: -0.02em; }
.view-sub { font-size: 12px; color: var(--t3); margin-top: 2px; }
.view-top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ══════════════════════════════════════════
   TABLE MAP — Floor Plan
══════════════════════════════════════════ */
.area-tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--br); border-radius: var(--r-sm); padding: 3px; }
.atab { padding: 5px 14px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; color: var(--t2); transition: all var(--dur); }
.atab:hover { color: var(--t1); }
.atab.active { background: var(--t1); color: #fff; }

.floor-wrap {
  flex: 1; overflow: auto; padding: 20px 24px;
  position: relative;
}

.floor-canvas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  min-height: 200px;
}

/* Table card */
.table-card {
  background: var(--surface);
  border: 1.5px solid var(--br);
  border-radius: var(--r-md);
  padding: 16px 14px;
  cursor: pointer;
  transition: all var(--dur);
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--sh-sm);
  min-height: 120px;
}
.table-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--br-med); }
.table-card:active { transform: scale(0.97); }

/* Status colours applied as data attribute */
.table-card[data-status="free"]     { border-color: var(--ts-free); }
.table-card[data-status="occupied"] { border-color: var(--ts-occ); }
.table-card[data-status="reserved"] { border-color: var(--ts-res); }
.table-card[data-status="bill"]     { border-color: var(--ts-bill); }

.table-shape-ico {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.table-name {
  font-size: 14px; font-weight: 700; color: var(--t1);
}
.table-seats { font-size: 11px; color: var(--t3); }
.table-status {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--r-full);
  width: fit-content;
}
.ts-free     { background: var(--ts-free-bg); color: var(--ts-free); }
.ts-occupied { background: var(--ts-occ-bg);  color: var(--ts-occ);  }
.ts-reserved { background: var(--ts-res-bg);  color: var(--ts-res);  }
.ts-bill     { background: var(--ts-bill-bg); color: var(--ts-bill); }

.table-order-sum {
  font-size: 13px; font-weight: 700; color: var(--t1);
  margin-top: auto;
}
.table-timer {
  font-size: 11px; color: var(--t2);
  position: absolute; top: 10px; right: 10px;
}
.table-card-actions {
  position: absolute; bottom: 8px; right: 8px;
  display: flex; gap: 4px; opacity: 0; transition: opacity var(--dur);
}
.table-card:hover .table-card-actions { opacity: 1; }
.tca-btn {
  width: 24px; height: 24px; border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; background: var(--surface-3);
  color: var(--t2); transition: background var(--dur);
}
.tca-btn:hover { background: var(--bg2); color: var(--t1); }
.tca-btn--del:hover { background: var(--red-s); color: var(--red); }

/* Floor empty state */
.floor-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--t3); pointer-events: auto;
}
.fe-icon { font-size: 40px; margin-bottom: 4px; }
.fe-title { font-size: 15px; font-weight: 600; color: var(--t2); }
.fe-sub { font-size: 13px; }

/* Legend */
.floor-legend {
  display: flex; gap: 16px; padding: 10px 24px;
  border-top: 1px solid var(--br); background: var(--surface);
  flex-shrink: 0;
}
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--t2); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.ld-free     { background: var(--ts-free); }
.ld-occupied { background: var(--ts-occ); }
.ld-reserved { background: var(--ts-res); }
.ld-bill     { background: var(--ts-bill); }

/* ══════════════════════════════════════════
   POS — Ordering view
══════════════════════════════════════════ */
.pos-breadcrumb { display: flex; align-items: center; gap: 8px; }
.btn-back {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--t2);
  padding: 5px 10px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--br);
  transition: all var(--dur);
}
.btn-back:hover { color: var(--t1); border-color: var(--br-med); }
.breadcrumb-sep { color: var(--t3); font-size: 16px; }
.breadcrumb-cur { font-size: 14px; font-weight: 700; color: var(--t1); }
.pos-status-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.table-status-badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: var(--r-full);
}
.pos-timer { font-size: 11px; color: var(--t3); font-variant-numeric: tabular-nums; direction: ltr; }

.pos-layout {
  flex: 1; display: flex; overflow: hidden;
  border-top: 1px solid var(--br);
}

/* Catalog */
.catalog-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.cat-bar {
  display: flex; gap: 0; border-bottom: 1px solid var(--br);
  background: var(--surface); padding: 0 16px;
  flex-shrink: 0; overflow-x: auto;
}
.cat-bar::-webkit-scrollbar { height: 0; }
.cat-tab {
  padding: 11px 14px; font-size: 12px; font-weight: 600;
  color: var(--t3); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all var(--dur); cursor: pointer;
}
.cat-tab:hover  { color: var(--t1); }
.cat-tab.active { color: var(--t1); border-bottom-color: var(--t1); }

.pos-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--bg); flex-shrink: 0;
}
.search-wrap { flex: 1; position: relative; }
.search-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--t3); pointer-events: none; }
[dir="rtl"] .search-ico { left: auto; right: 10px; }
.pos-search { width: 100%; background: var(--surface); border: 1px solid var(--br); border-radius: var(--r-full); padding: 7px 12px 7px 30px; font-size: 12px; color: var(--t1); outline: none; transition: border-color var(--dur); }
[dir="rtl"] .pos-search { padding: 7px 30px 7px 12px; }
.pos-search:focus { border-color: var(--t1); }
.pos-search::placeholder { color: var(--t3); }

.item-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px; padding: 12px 16px; overflow-y: auto; align-content: start;
}

/* Item tile */
.item-tile {
  aspect-ratio: 1; border-radius: var(--r-md);
  position: relative; overflow: hidden; cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: transform var(--dur), box-shadow var(--dur);
  user-select: none;
}
.item-tile:hover  { transform: translateY(-2px); box-shadow: var(--sh-md); }
.item-tile:active { transform: scale(0.95); }
.it-bg { position: absolute; inset: 0; opacity: 0.9; }
.it-emoji { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -62%); font-size: 2rem; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2)); pointer-events: none; }
.it-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 5px 7px; background: rgba(0,0,0,0.28); }
.it-name  { font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it-price { font-size: 10.5px; color: rgba(255,255,255,0.82); font-weight: 500; }
/* Ripple */
@keyframes rpl { from{transform:scale(0);opacity:0.4} to{transform:scale(4);opacity:0} }
.rpl { position:absolute;width:50px;height:50px;border-radius:50%;background:rgba(255,255,255,0.4);pointer-events:none;animation:rpl 0.38s var(--ease) forwards; }
/* Grid empty */
.grid-empty { grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 16px;color:var(--t3);gap:6px;font-size:13px; }

/* Order panel */
.order-panel {
  width: var(--order-w); background: var(--surface);
  border-left: 1px solid var(--br);
  display: flex; flex-direction: column; flex-shrink: 0; overflow: hidden;
}
[dir="rtl"] .order-panel { border-left: none; border-right: 1px solid var(--br); }

.op-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px 11px; border-bottom: 1px solid var(--br); flex-shrink: 0;
}
.op-title { font-size: 14px; font-weight: 700; color: var(--t1); }
.op-actions { display: flex; gap: 4px; }
.op-btn {
  width: 28px; height: 28px; border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  color: var(--t3); transition: all var(--dur);
}
.op-btn:hover { background: var(--surface-3); color: var(--t1); }
.op-btn--danger:hover { background: var(--red-s); color: var(--red); }

.op-lines { flex: 1; overflow-y: auto; padding: 6px 0; }
.op-empty { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12px; color: var(--t3); padding: 24px; text-align: center; }

/* Order line */
.op-line { display: flex; align-items: center; gap: 6px; padding: 7px 14px; transition: background var(--dur); }
.op-line:hover { background: var(--surface-2); }
.ol-emoji { font-size: 1rem; flex-shrink: 0; }
.ol-name  { flex: 1; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol-qtys  { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.qty-b    { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--t2); font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all var(--dur); }
.qty-b:hover { background: var(--t1); color: #fff; }
.qty-n    { font-size: 12px; font-weight: 700; min-width: 16px; text-align: center; }
.ol-price { font-size: 12px; font-weight: 700; color: var(--t1); min-width: 50px; text-align: right; direction: ltr; flex-shrink: 0; }

.op-note-row { padding: 6px 14px; flex-shrink: 0; border-top: 1px solid var(--br); }
.op-note-inp { width: 100%; background: var(--surface-2); border: 1px solid var(--br); border-radius: var(--r-xs); padding: 6px 8px; font-size: 12px; color: var(--t1); outline: none; }
.op-note-inp::placeholder { color: var(--t3); }
.op-note-inp:focus { border-color: var(--t1); }

.op-totals { padding: 10px 14px 6px; flex-shrink: 0; }
.op-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--t2); margin-bottom: 4px; }
.op-row--total { font-size: 16px; font-weight: 800; color: var(--t1); border-top: 1px solid var(--br); padding-top: 8px; margin-top: 4px; }
.disc-val { color: var(--red); font-weight: 600; }
.disc-row.hidden { display: none; }

.disc-ctrl { display: flex; gap: 6px; padding: 0 14px 8px; flex-shrink: 0; }
.disc-inp { flex: 1; background: var(--surface-2); border: 1px solid var(--br); border-radius: var(--r-xs); padding: 6px 8px; font-size: 12px; color: var(--t1); outline: none; direction: ltr; }
.disc-inp:focus { border-color: var(--t1); }
.disc-apply { padding: 6px 10px; background: var(--surface-3); border: 1px solid var(--br-med); border-radius: var(--r-xs); font-size: 12px; font-weight: 600; color: var(--t2); transition: all var(--dur); }
.disc-apply:hover { background: var(--t1); color: #fff; border-color: var(--t1); }

.pay-methods { display: flex; gap: 6px; padding: 0 14px 6px; flex-shrink: 0; }
.pay-btn { flex: 1; padding: 11px 6px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; transition: all var(--dur); }
.pay-outline { background: var(--surface); border: 1.5px solid var(--br-med); color: var(--t1); }
.pay-outline:hover { background: var(--surface-3); }
.pay-filled  { background: var(--t1); border: 1.5px solid var(--t1); color: #fff; }
.pay-filled:hover { background: var(--black-h); border-color: var(--black-h); }
.pay-extra { width: calc(100% - 28px); margin: 0 14px 14px; padding: 8px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; color: var(--t2); background: var(--surface-2); border: 1px solid var(--br); transition: all var(--dur); }
.pay-extra:hover { background: var(--surface-3); color: var(--t1); }

/* ══════════════════════════════════════════
   REPORTS VIEW
══════════════════════════════════════════ */
.period-tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--br); border-radius: var(--r-sm); padding: 3px; width: fit-content; margin: 0 24px 16px; flex-shrink: 0; }
.ptab { padding: 5px 14px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; color: var(--t2); transition: all var(--dur); }
.ptab:hover { color: var(--t1); }
.ptab-active { background: var(--t1); color: #fff; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; padding: 0 24px 16px; flex-shrink: 0; }
.kpi-card { background: var(--surface); border: 1px solid var(--br); border-radius: var(--r-md); padding: 14px; box-shadow: var(--sh-sm); }
.kpi-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--t3); font-weight: 600; margin-bottom: 6px; }
.kpi-val { font-size: 20px; font-weight: 800; color: var(--t1); direction: ltr; }

.rep-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; padding: 0 24px 24px; flex: 1; overflow: hidden; min-height: 0; }
.rep-card { background: var(--surface); border: 1px solid var(--br); border-radius: var(--r-md); padding: 16px; box-shadow: var(--sh-sm); overflow: hidden; }
.rep-card--wide { /* full width handled by grid */ }
.rep-card-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--t3); font-weight: 700; margin-bottom: 10px; }
.rep-orders { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 240px; }
.rep-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--br); font-size: 12px; }
.rep-row:last-child { border-bottom: none; }
.rep-id  { color: var(--t3); font-weight: 500; }
.rep-tbl { color: var(--t2); }
.rep-amt { font-weight: 700; color: var(--green); direction: ltr; }
.empty-msg { font-size: 12px; color: var(--t3); text-align: center; padding: 16px; }

/* ══════════════════════════════════════════
   ADMIN VIEW
══════════════════════════════════════════ */
.admin-layout { display: flex; height: 100%; overflow: hidden; }
.admin-nav {
  width: var(--admin-nav-w); background: var(--surface);
  border-right: 1px solid var(--br);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.admin-nav-logo { padding: 18px 18px 14px; font-size: 15px; font-weight: 800; color: var(--t1); border-bottom: 1px solid var(--br); }
.admin-nav-list { list-style: none; padding: 8px 0; flex: 1; }
.ani {
  padding: 9px 18px; font-size: 13px; font-weight: 500;
  color: var(--t2); cursor: pointer; transition: all var(--dur);
  border-radius: 0 var(--r-xs) var(--r-xs) 0; margin-right: 8px;
}
.ani:hover { background: var(--surface-3); color: var(--t1); }
.ani-active { background: var(--surface-3); color: var(--t1); font-weight: 700; }
.admin-back { margin: 0 14px 16px; padding: 8px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; color: var(--t2); background: transparent; border: 1px solid var(--br-med); transition: all var(--dur); }
.admin-back:hover { background: var(--surface-3); color: var(--t1); }

.admin-body { flex: 1; overflow-y: auto; padding: 24px; }
.ap { display: none; }
.ap-active { display: block; }
.panel-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-h2 { font-size: 18px; font-weight: 800; color: var(--t1); letter-spacing: -0.02em; }

/* Form helpers */
.form-card { background: var(--surface); border: 1px solid var(--br); border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--sh-sm); margin-bottom: 18px; }
.card { background: var(--surface); border: 1px solid var(--br); border-radius: var(--r-md); padding: 16px 18px; box-shadow: var(--sh-sm); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title { font-size: 13px; font-weight: 700; color: var(--t1); }

.ff { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.ff:last-child { margin-bottom: 0; }
.fl { font-size: 11px; font-weight: 600; color: var(--t2); text-transform: uppercase; letter-spacing: 0.05em; }
.fi { background: var(--surface-2); border: 1.5px solid var(--br); border-radius: var(--r-sm); padding: 8px 10px; font-size: 13px; color: var(--t1); outline: none; transition: border-color var(--dur); }
.fi:focus { border-color: var(--t1); }
.fi::placeholder { color: var(--t3); }
.fi-sel { cursor: pointer; }
.fi-emoji { width: 70px; font-size: 1.2rem; text-align: center; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 8px; margin-top: 14px; }
.add-cat-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--t1); text-decoration: underline; text-underline-offset: 2px; background: none; border: none; cursor: pointer; margin-top: 4px; }

/* Color picker */
.clr-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.clr-sw { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: transform 0.12s, border-color 0.12s; }
.clr-sw:hover   { transform: scale(1.15); }
.clr-sw.on      { border-color: var(--t1); transform: scale(1.1); }

/* Shape picker */
.shape-picker { display: flex; gap: 6px; }
.shape-btn { padding: 6px 14px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1.5px solid var(--br); color: var(--t2); transition: all var(--dur); }
.shape-btn:hover { border-color: var(--t1); color: var(--t1); }
.shape-active { background: var(--t1); color: #fff; border-color: var(--t1); }

/* Items / Tables table */
.items-tbl-wrap { background: var(--surface); border: 1px solid var(--br); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-sm); }
.items-tbl { width: 100%; border-collapse: collapse; }
.items-tbl thead { background: var(--surface-2); }
.items-tbl th { padding: 9px 14px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--t3); font-weight: 700; border-bottom: 1px solid var(--br); }
[dir="rtl"] .items-tbl th { text-align: right; }
.items-tbl td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--br); vertical-align: middle; }
.items-tbl tr:last-child td { border-bottom: none; }
.items-tbl tr:hover td { background: var(--surface-2); }
.tbl-cell-item { display: flex; align-items: center; gap: 9px; }
.tbl-tile { width: 30px; height: 30px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.tbl-name { font-weight: 600; }
.cat-pill { display: inline-flex; padding: 2px 8px; border-radius: var(--r-full); font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--t2); }
.tbl-actions { display: flex; gap: 4px; }
.tbl-btn { width: 28px; height: 28px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: 13px; transition: background var(--dur); }
.tbl-btn:hover { background: var(--surface-3); }
.tbl-btn--del:hover { background: var(--red-s); }

/* Areas list */
.areas-list { display: flex; flex-direction: column; gap: 6px; }
.area-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: var(--surface-2); border-radius: var(--r-sm); font-size: 13px; font-weight: 500; }
.area-row-del { width: 26px; height: 26px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; color: var(--t3); font-size: 13px; transition: all var(--dur); }
.area-row-del:hover { background: var(--red-s); color: var(--red); }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 16px; border-radius: var(--r-sm);
  background: var(--t1); color: #fff;
  font-size: 13px; font-weight: 700;
  transition: background var(--dur);
}
.btn-primary:hover { background: var(--black-h); }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--r-sm);
  background: var(--surface); color: var(--t1);
  font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--br-med);
  transition: all var(--dur);
}
.btn-outline:hover { background: var(--surface-3); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--t2);
  font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--br-med);
  transition: all var(--dur);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--t1); }

.btn-sm { padding: 5px 10px; font-size: 11px; }

/* ══════════════════════════════════════════
   MODAL
══════════════════════════════════════════ */
.modal-back {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.48);
  display: flex; align-items: center; justify-content: center;
  z-index: 900; backdrop-filter: blur(5px);
  padding: 16px;
}
.modal-back.hidden { display: none !important; }
.modal {
  background: var(--surface); border-radius: 22px;
  padding: 28px 24px 22px; width: 100%; max-width: 420px;
  position: relative; box-shadow: var(--sh-lg);
  text-align: center;
  animation: mIn 0.2s var(--ease);
}
.modal--split { text-align: left; max-width: 380px; }
@keyframes mIn { from{opacity:0;transform:scale(0.93) translateY(10px)} to{opacity:1;transform:scale(1) translateY(0)} }
.modal-x { position: absolute; top: 12px; right: 14px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--t3); background: var(--surface-3); transition: all var(--dur); }
[dir="rtl"] .modal-x { right: auto; left: 14px; }
.modal-x:hover { background: var(--surface-2); color: var(--t1); }
.modal-check { font-size: 42px; margin-bottom: 6px; }
.modal-title { font-size: 17px; font-weight: 800; color: var(--t1); margin-bottom: 4px; letter-spacing: -0.02em; }
.modal-amt { font-size: 26px; font-weight: 800; color: var(--green); margin-bottom: 14px; direction: ltr; }
.receipt-tape { background: var(--surface-2); border: 1px solid var(--br); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 16px; font-size: 11px; font-family: 'Courier New', monospace; text-align: left; white-space: pre-wrap; color: var(--t2); max-height: 180px; overflow-y: auto; direction: ltr; }
.modal-btns { display: flex; gap: 8px; }
.modal-btns > * { flex: 1; }

/* Split bill modal */
.split-body { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; max-height: 260px; overflow-y: auto; }
.split-line {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1.5px solid var(--br);
  border-radius: var(--r-sm); cursor: pointer; transition: all var(--dur);
}
.split-line.selected { border-color: var(--t1); background: var(--surface-2); }
.split-check { width: 18px; height: 18px; border: 2px solid var(--br-med); border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; }
.split-line.selected .split-check { background: var(--t1); border-color: var(--t1); color: #fff; }
.split-line-name { flex: 1; font-size: 13px; font-weight: 500; }
.split-line-qty  { font-size: 12px; color: var(--t2); }
.split-line-price { font-size: 13px; font-weight: 700; direction: ltr; }
.split-footer { border-top: 1px solid var(--br); padding-top: 10px; }
.split-total-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 8px; }

/* Toast */
.toast-host { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 7px; z-index: 1000; pointer-events: none; }
.toast { background: var(--t1); color: #fff; padding: 9px 20px; border-radius: var(--r-full); font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: var(--sh-md); animation: toastIn 0.24s var(--ease); }
@keyframes toastIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.toast--ok  { background: var(--green); }
.toast--err { background: var(--red);   }

/* RTL overrides */
[dir="rtl"] .order-panel { border-left: none; border-right: 1px solid var(--br); }
[dir="rtl"] .rail { border-right: none; border-left: 1px solid var(--br); }
[dir="rtl"] .admin-nav { border-right: none; border-left: 1px solid var(--br); }
[dir="rtl"] .ani { border-radius: var(--r-xs) 0 0 var(--r-xs); margin-right: 0; margin-left: 8px; }
[dir="rtl"] .items-tbl th,[dir="rtl"] .items-tbl td { text-align: right; }

/* ══════════════════════════════════════════
   ORDER TYPE TOGGLE (Dine-in / Takeaway)
══════════════════════════════════════════ */
.order-type-toggle {
  display: flex;
  background: var(--surface-3);
  border: 1px solid var(--br);
  border-radius: var(--r-full);
  padding: 2px;
  gap: 0;
}
.ot-btn {
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--t2);
  transition: all var(--dur);
}
.ot-active { background: var(--t1); color: #fff; }
.takeaway-tax-row { font-size: 11px; color: var(--amber); }
.badge-takeaway {
  background: rgba(230,81,0,0.12);
  color: var(--amber);
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 700;
}

/* ══════════════════════════════════════════
   QUICK DISCOUNT BUTTONS
══════════════════════════════════════════ */
.quick-disc-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  flex-shrink: 0;
}
.quick-disc-lbl { font-size: 11px; color: var(--t3); white-space: nowrap; }
.qd-btn {
  padding: 4px 10px;
  background: var(--surface-3);
  border: 1px solid var(--br-med);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--t1);
  transition: all var(--dur);
}
.qd-btn:hover { background: var(--t1); color: #fff; border-color: var(--t1); }
.qd-btn.qd-active { background: var(--t1); color: #fff; border-color: var(--t1); }
.qd-clear { color: var(--red); font-weight: 400; }
.qd-clear:hover { background: var(--red-s); color: var(--red); border-color: var(--red); }

/* ══════════════════════════════════════════
   MODIFIER MODAL OPTIONS
══════════════════════════════════════════ */
.mod-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.mod-opt {
  padding: 7px 14px;
  border: 1.5px solid var(--br-med);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  cursor: pointer;
  transition: all var(--dur);
}
.mod-opt.selected {
  background: var(--t1);
  color: #fff;
  border-color: var(--t1);
}
.ol-modifier {
  font-size: 10px;
  color: var(--t3);
  font-style: italic;
  margin-top: 1px;
}

/* ══════════════════════════════════════════
   INVENTORY
══════════════════════════════════════════ */
.inv-alerts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.inv-alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(230,81,0,0.07);
  border: 1px solid rgba(230,81,0,0.25);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.inv-alert-icon { font-size: 16px; }
.inv-alert-name { font-weight: 600; flex: 1; }
.inv-alert-qty { color: var(--amber); font-weight: 700; }
.stock-ok    { color: var(--green); font-size: 11px; font-weight: 600; }
.stock-low   { color: var(--amber); font-size: 11px; font-weight: 600; }
.stock-empty { color: var(--red);   font-size: 11px; font-weight: 600; }
.stock-adj {
  display: flex;
  align-items: center;
  gap: 4px;
}
.stock-adj-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--br-med);
  color: var(--t2);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--dur);
}
.stock-adj-btn:hover { background: var(--t1); color: #fff; border-color: var(--t1); }
.stock-qty-val { min-width: 28px; text-align: center; font-weight: 700; font-size: 13px; }

/* ══════════════════════════════════════════
   RESERVATIONS
══════════════════════════════════════════ */
.res-upcoming {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 700;
}
.res-today { background: rgba(21,101,192,0.1); color: var(--blue); }
.res-future { background: var(--surface-3); color: var(--t3); }
.res-overdue { background: var(--red-s); color: var(--red); }

/* ══════════════════════════════════════════
   REPORTS — Best sellers
══════════════════════════════════════════ */
.bestseller-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--br);
  font-size: 13px;
}
.bestseller-row:last-child { border-bottom: none; }
.bs-rank { width: 22px; text-align: center; font-weight: 700; color: var(--t3); font-size: 11px; }
.bs-emoji { font-size: 1rem; }
.bs-name { flex: 1; font-weight: 500; }
.bs-qty { color: var(--t2); font-size: 12px; }
.bs-rev { font-weight: 700; color: var(--green); direction: ltr; }
.bs-bar-wrap { width: 60px; height: 4px; background: var(--surface-3); border-radius: 2px; }
.bs-bar { height: 4px; background: var(--t1); border-radius: 2px; }

/* ══════════════════════════════════════════
   LOW STOCK MODAL LIST
══════════════════════════════════════════ */
#low-stock-list .inv-alert-item { padding: 8px 12px; }

/* ══════════════════════════════════════════
   MISC
══════════════════════════════════════════ */
.mt-2 { margin-top: 1.5rem; }
.rep-card.mt-2 { margin: 1.5rem 24px 24px; }

/* ══════════════════════════════════════════
   IMAGE UPLOAD — Item form
══════════════════════════════════════════ */
.img-upload-area {
  margin-bottom: 16px;
}

.img-preview-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background: var(--surface-3);
  border: 1.5px dashed var(--br-med);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--dur), background var(--dur);
}
.img-preview-wrap:hover { border-color: var(--t1); background: var(--bg2); }

#img-preview {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.img-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; color: var(--t3); font-size: 13px;
  pointer-events: none;
}

.img-upload-btn {
  position: absolute; bottom: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--t1); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-md);
  transition: background var(--dur), transform 0.1s;
  z-index: 2;
}
[dir="rtl"] .img-upload-btn { right: auto; left: 10px; }
.img-upload-btn:hover { background: var(--black-h); transform: scale(1.08); }

.img-remove-btn {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur);
  z-index: 2;
}
[dir="rtl"] .img-remove-btn { right: auto; left: 8px; }
.img-remove-btn:hover { background: var(--red); }

/* ══════════════════════════════════════════
   ITEM TILE — SumUp photo style
   Rectangular 4:3, photo fills tile,
   name top-left, price bottom-left
══════════════════════════════════════════ */
.item-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* Override old square tile */
.item-tile {
  aspect-ratio: 4 / 3 !important;
  border-radius: var(--r-sm) !important;
  background: var(--surface-3);
}

/* Photo mode — image fills tile */
.item-tile .it-photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Warm overlay like SumUp */
.item-tile .it-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.18) 0%,
    rgba(0,0,0,0.05) 40%,
    rgba(0,0,0,0.45) 100%
  );
}

/* Name — top left like SumUp */
.item-tile .it-name-top {
  position: absolute;
  top: 8px; left: 8px; right: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  line-height: 1.25;
  z-index: 2;
}
[dir="rtl"] .item-tile .it-name-top { left: 8px; right: 8px; text-align: right; }

/* Price — bottom left */
.item-tile .it-price-btm {
  position: absolute;
  bottom: 7px; left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  z-index: 2;
  direction: ltr;
}
[dir="rtl"] .item-tile .it-price-btm { left: auto; right: 8px; }

/* "3 Optionen" badge — like SumUp */
.it-modifier-badge {
  position: absolute;
  bottom: 7px; right: 8px;
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  z-index: 2;
}
[dir="rtl"] .it-modifier-badge { right: auto; left: 8px; }

/* Emoji-only fallback tile (no photo) */
.item-tile.tile-emoji-only .it-emoji {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  pointer-events: none;
  z-index: 2;
}
.item-tile.tile-emoji-only .it-name-top { top: auto; bottom: 24px; }
.item-tile.tile-emoji-only .it-price-btm { bottom: 7px; }

/* "options" badge SumUp style */
.it-opts-badge {
  position: absolute;
  bottom: 6px; right: 6px;
  font-size: 9px; font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.25);
  padding: 1px 5px;
  border-radius: 4px;
  z-index: 3;
}
[dir="rtl"] .it-opts-badge { right: auto; left: 6px; }

/* Out of stock overlay */
.item-tile.tile-oos { opacity: 0.42 !important; pointer-events: none !important; }

/* Stock low warning badge */
.it-stock-badge {
  position: absolute; top: 6px; right: 6px;
  background: rgba(230,81,0,0.92); color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px; z-index: 3;
}
[dir="rtl"] .it-stock-badge { right: auto; left: 6px; }

/* ══════════════════════════════════════════
   BUSINESS TYPE PICKER
══════════════════════════════════════════ */
.biz-type-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.biz-type-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 14px 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--br);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur);
  text-align: left;
}
[dir="rtl"] .biz-type-btn { text-align: right; align-items: flex-end; }
.biz-type-btn:hover { border-color: var(--br-med); background: var(--surface-3); }
.biz-type-active {
  border-color: var(--t1) !important;
  background: var(--surface) !important;
  box-shadow: var(--sh-sm);
}
.bt-icon  { font-size: 20px; margin-bottom: 2px; }
.bt-label { font-size: 13px; font-weight: 700; color: var(--t1); }
.bt-desc  { font-size: 11px; color: var(--t3); line-height: 1.35; }

/* Hide restaurant-only fields in non-restaurant mode */
body.mode-retail   .restaurant-only,
body.mode-service  .restaurant-only,
body.mode-cafe     .restaurant-only { display: none !important; }

/* Hide table map rail icon in non-restaurant modes */
body.mode-retail  .rail-icon-tables,
body.mode-service .rail-icon-tables { display: none !important; }

/* Quick sale button in tables view header */
.quick-sale-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--t1);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  transition: background var(--dur);
}
.quick-sale-btn:hover { background: var(--black-h); }
body.mode-retail  .quick-sale-btn,
body.mode-service .quick-sale-btn,
body.mode-cafe    .quick-sale-btn { display: flex; }

/* Hide order type toggle in retail/service */
body.mode-retail  #order-type-toggle,
body.mode-service #order-type-toggle { display: none !important; }

/* PDF invoice button */
.modal-btns { flex-wrap: wrap; gap: 6px; }
.modal-btns .btn-ghost { flex: 1; min-width: 120px; }
.modal-btns .btn-primary { flex: 1; min-width: 120px; }

/* Quick sale modal */
.modal-desc { font-size: 13px; color: var(--t2); margin-bottom: 4px; }

/* Unit badge on order line (retail: "kg", "Stk.") */
.ol-unit {
  font-size: 10px;
  color: var(--t3);
  background: var(--surface-3);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  flex-shrink: 0;
}
[dir="rtl"] .ol-unit { margin-left: 0; margin-right: 4px; }

/* Customer info on receipt */
.receipt-customer {
  font-size: 12px;
  color: var(--t2);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--br);
}

/* ══════════════════════════════════════════
   DARK MODE TOGGLE BUTTON
══════════════════════════════════════════ */
.pin-dark-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur);
  margin-left: 2px;
}
.pin-dark-btn:hover { background: rgba(255,255,255,0.2); }

/* ══════════════════════════════════════════
   AUTH SCREEN
══════════════════════════════════════════ */
#screen-auth {
  align-items: center;
  justify-content: center;
  background: #141414;
  background-image: radial-gradient(ellipse at 15% 75%, rgba(255,255,255,0.04) 0%, transparent 55%);
}

.auth-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 340px;
  max-width: 90vw;
  position: relative;
  padding-top: 48px;
}

.auth-brand {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 17px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
  text-align: center;
}

.auth-err {
  font-size: 12px;
  color: #FF6B6B;
  min-height: 18px;
  margin-bottom: 8px;
  text-align: center;
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-ff {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-input {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: #fff;
  outline: none;
  font-family: inherit;
  transition: border-color var(--dur);
  width: 100%;
}
.auth-input:focus { border-color: rgba(255,255,255,0.45); }
.auth-input::placeholder { color: rgba(255,255,255,0.25); }
.auth-sel { cursor: pointer; }
.auth-sel option { background: #222; color: #fff; }

.auth-btn {
  margin-top: 4px;
  padding: 12px;
  background: #fff;
  color: #1A1A1A;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--dur), opacity var(--dur);
  border: none;
  width: 100%;
}
.auth-btn:hover   { background: #E8E8E8; }
.auth-btn:disabled{ opacity: 0.5; cursor: not-allowed; }

.auth-switch {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--dur);
}
.auth-switch:hover { color: rgba(255,255,255,0.7); }

.auth-hint {
  margin-top: 20px;
  font-size: 11px;
  color: rgba(255,255,255,0.22);
  text-align: center;
}

/* Dark mode auth screen */
[data-theme="dark"] #screen-auth { background: #0A0A0A; }

/* ══════════════════════════════════════════
   SCAN BUTTON in POS toolbar
══════════════════════════════════════════ */
.scan-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--br-med);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t2);
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--dur);
}
.scan-btn:hover { background: var(--t1); color: #fff; border-color: var(--t1); }

/* ══════════════════════════════════════════
   APP LOADER
══════════════════════════════════════════ */
#app-loader {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
