:root {
  --bg: #1c1c1e;
  --bg-2: #161618;
  --surface: #2c2c2e;
  --surface-2: #3a3a3c;
  --input: #1c1c1e;
  --sidebar-top: #161618;
  --sidebar-bot: #0f0f11;
  --accent: #0a84ff;
  --accent-dim: #0a6fd8;
  --on-accent: #ffffff;
  --tan: #333335;
  --ink: #ffffff;
  --ink-soft: #d8d8dc;
  --muted: #98989e;
  --line: #38383a;
  --line-soft: #2c2c2e;
  --red: #ff453a;
  --red-soft: #3a2020;
  --green: #30d158;
  --green-soft: #1c2c20;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.icon { width: 20px; height: 20px; flex: 0 0 20px; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: linear-gradient(180deg, var(--sidebar-top) 0%, var(--sidebar-bot) 100%);
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line-soft);
}

.side-brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; }

.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(10,132,255,.4);
}

.brand-text { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; line-height: 1; display: flex; flex-direction: column; color: var(--ink); }
.brand-text small { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .5; margin-top: 4px; font-weight: 500; }

.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; flex: 1; overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 14.5px;
  transition: background .15s, color .15s;
}
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: var(--accent); color: #fff; font-weight: 600; }
.side-nav a.active .icon { color: #fff; }

.side-foot { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.08); }
.side-user { display: flex; align-items: center; gap: 11px; padding: 6px 10px 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.side-user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.side-user-meta strong { font-size: 14px; color: var(--ink); }
.side-user-meta span { font-size: 11.5px; opacity: .5; text-transform: uppercase; letter-spacing: .06em; }
.side-logout { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 14px; }
.side-logout:hover { background: rgba(255,69,58,.14); color: var(--red); }

/* ---------- Main area ---------- */
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mobile-bar { display: none; }
.content { padding: 30px 34px 60px; max-width: 1280px; width: 100%; margin: 0 auto; }
.content.content-wide { max-width: 1500px; }

.page-head { margin-bottom: 22px; }
.page-head h1 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 30px; color: var(--ink); margin: 0; }

.hint { color: var(--muted); max-width: 74ch; margin: -8px 0 22px; font-size: 14px; }
.hint strong { color: var(--ink-soft); }

/* ---------- Flash ---------- */
.flash-error { background: var(--red-soft); color: #ff8a82; border: 1px solid #5a2f2c; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; }
.flash-success { background: var(--green-soft); color: #6ee08a; border: 1px solid #2c4a37; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; }

/* ---------- Cards / forms ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card { padding: 22px 24px; margin-bottom: 26px; }
.form-card h3 { margin: 0 0 18px; font-size: 15px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 9px; }
.form-card h3 .icon { color: var(--accent); }

.inline-form, .expense-fields { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.inline-form label, .expense-fields label, .field-label {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
}

.inline-form input, .inline-form select, .expense-fields input {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px;
  font-family: inherit; min-width: 160px; background: var(--input); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.inline-form input::placeholder, .expense-fields input::placeholder { color: #6a6a70; }
.inline-form input:focus, .inline-form select:focus, .expense-fields input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,.25);
}
.inline-form input[type=date], .expense-fields input[type=date],
.inline-form input[type=number], .expense-fields input[type=number] { color-scheme: dark; }

.btn, .inline-form button, .expense-fields button {
  background: var(--accent); color: #fff; border: none; padding: 12px 22px; border-radius: 11px;
  cursor: pointer; font-size: 14.5px; font-weight: 600; font-family: inherit;
  display: inline-flex; align-items: center; gap: 8px; transition: background .15s, transform .05s; text-decoration: none;
}
.btn:hover, .inline-form button:hover, .expense-fields button:hover { background: var(--accent-dim); }
.btn:active, .inline-form button:active, .expense-fields button:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #45454a; }

.supplier-select {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; font-size: 15px;
  font-family: inherit; background: var(--input); color: var(--ink); min-width: 180px; color-scheme: dark;
}
.supplier-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,.25); }
.pick-hint { display: block; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.pick-hint a { color: var(--accent); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: 13px 16px; text-align: left; white-space: nowrap; font-size: 14px; border-bottom: 1px solid var(--line); }
.data-table thead th { background: var(--tan); color: var(--ink-soft); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td.num, .data-table th.num, .num { text-align: right; font-variant-numeric: tabular-nums; }
.negative { color: var(--red); }
.positive { color: var(--green); }
.data-table tfoot td, .total-row td { background: var(--tan); font-weight: 700; color: var(--ink); border-bottom: none; }

.cat-cell { display: inline-flex; align-items: center; gap: 9px; }
.cat-dot { width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; font-size: 16px; background: color-mix(in srgb, var(--c) 26%, #2c2c2e); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-admin { background: rgba(10,132,255,.2); color: #4aa5ff; }
.pill-staff { background: #3a3a3c; color: #c7c7cc; }
.pill-in { background: var(--green-soft); color: var(--green); }
.pill-out { background: var(--red-soft); color: #ff8a82; }

.link-btn { background: none; border: none; color: var(--red); cursor: pointer; padding: 0; font-size: 13.5px; font-weight: 500; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }

.reset-form { display: flex; gap: 8px; align-items: center; }
.reset-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-family: inherit; width: 130px; background: var(--input); color: var(--ink); }
.reset-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,.25); }
.owed-save { padding: 9px 16px !important; font-size: 13.5px !important; }

/* ---------- Snapshot cards ---------- */
.snapshot { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 26px; }
.snap-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.snap-top { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.snap-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.snap-value { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 600; color: var(--ink); }
.snap-value.negative { color: var(--red); }
.snap-card a { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; }
.snap-card a:hover { text-decoration: underline; }

.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 12px; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-icon { font-size: 46px; margin-bottom: 10px; }
.empty-state h2 { color: var(--ink); font-family: 'Fraunces', serif; margin: 0 0 8px; }
.empty-state p { max-width: 40ch; margin: 0 auto 20px; }

/* ---------- Login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(1000px 500px at 50% -10%, #2c2c2e, #141416); padding: 20px; }
.login-box { background: var(--surface); padding: 38px 34px; border-radius: 22px; width: 360px; max-width: 100%; box-shadow: 0 24px 70px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--line); }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-logo .brand-mark { width: 56px; height: 56px; font-size: 30px; border-radius: 17px; }
.login-logo h1 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 24px; margin: 0; color: var(--ink); }
.login-logo p { margin: 0; color: var(--muted); font-size: 13px; }
.login-box label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.login-box input { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; font-size: 15px; font-family: inherit; background: var(--input); color: var(--ink); }
.login-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,.25); }
.login-box button { justify-content: center; margin-top: 6px; padding: 13px; font-size: 15px; }

/* ---------- Custom modal & toasts ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 130; padding: 20px; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); display: grid; place-items: center; animation: lamFade .15s ease; }
.modal-box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px; width: 340px; max-width: 100%; text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,.6); animation: lamPop .18s ease; }
.modal-icon { font-size: 38px; margin-bottom: 10px; }
.modal-msg { font-size: 16px; color: var(--ink); margin-bottom: 22px; line-height: 1.45; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-actions .btn { flex: 1; justify-content: center; }
.modal-danger { background: var(--red); color: #fff; }
.modal-danger:hover { background: #e0392e; }
@keyframes lamFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lamPop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

.toast-wrap { position: fixed; top: 18px; left: 0; right: 0; z-index: 140; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; font-weight: 500; max-width: 90%; opacity: 0; transform: translateY(-12px); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { border-left-color: var(--red); }
.toast-success { border-left-color: var(--green); }

/* ---------- Segmented toggle ---------- */
.seg { display: inline-flex; position: relative; background: var(--input); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg input[type=radio] { position: absolute; width: 1px; height: 1px; min-width: 0; opacity: 0; pointer-events: none; }
.seg label { cursor: pointer; padding: 10px 18px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; user-select: none; }
.seg label:hover { color: var(--ink); }
.seg input:focus-visible + label { box-shadow: 0 0 0 3px rgba(10,132,255,.35); }
.seg input:checked + label.seg-in { background: var(--green); color: #04210f; }
.seg input:checked + label.seg-mid { background: var(--accent); color: #fff; }
.seg input:checked + label.seg-whish { background: #e01e5a; color: #fff; }

/* flatpickr calendar */
.flatpickr-calendar { box-shadow: var(--shadow); border-radius: 14px; }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.startRange, .flatpickr-day.endRange { background: var(--accent); border-color: var(--accent); }
.flatpickr-day.today { border-color: var(--accent); }
.flatpickr-day:hover { background: var(--surface-2); }
.flatpickr-months .flatpickr-month, .flatpickr-weekdays, span.flatpickr-weekday { color: var(--ink-soft); }

/* ===================== POS ===================== */
.pos-topbar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.pos-shop { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 600; color: var(--ink); }
.pos-meta { color: var(--muted); font-size: 13.5px; }

.pos { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.pos-catalog { padding: 18px; }
.pos-search { position: relative; margin-bottom: 14px; }
.pos-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pos-search input { width: 100%; padding: 13px 14px 13px 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--input); color: var(--ink); font-size: 15px; font-family: inherit; }
.pos-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,.25); }

.pos-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .14s; }
.cat-chip:hover { color: var(--ink); }
.cat-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.prod-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px 14px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface-2); color: var(--ink); cursor: pointer; font-family: inherit; text-align: center; transition: transform .1s, border-color .14s, box-shadow .14s; }
.prod-tile:hover { transform: translateY(-2px); border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 26%, transparent); }
.prod-tile:active { transform: translateY(0); }
.prod-emoji { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--c) 26%, #2c2c2e); }
.prod-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.prod-price { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 600; color: var(--ink); }
.pos-noresult { text-align: center; color: var(--muted); padding: 40px 0; }

.stock-badge { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; margin-left: 6px; }
.prod-tile .stock-badge { position: absolute; top: 8px; right: 8px; margin: 0; }
.stock-badge.low { background: #4a3a12; color: #ffd60a; }
.stock-badge.out { background: var(--red-soft); color: #ff8a82; }

.pos-cart { position: sticky; top: 20px; display: flex; flex-direction: column; max-height: calc(100vh - 40px); padding: 0; overflow: hidden; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cart-head h2 { margin: 0; font-size: 16px; font-family: 'Fraunces', serif; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.cart-head h2 .icon { color: var(--accent); }
.cart-lines { flex: 1; overflow-y: auto; padding: 8px 10px; }
.cart-empty { flex: 1; display: grid; place-items: center; color: var(--muted); padding: 40px 20px; text-align: center; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); }
.cl-main { min-width: 0; }
.cl-name { display: block; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.cl-unit { display: block; font-size: 11.5px; color: var(--muted); }
.cl-qty { display: flex; align-items: center; gap: 6px; }
.qbtn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 17px; line-height: 1; cursor: pointer; font-family: inherit; display: grid; place-items: center; }
.qbtn:hover { background: #45454a; }
.qn { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cl-total { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; font-size: 14px; }
.cl-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px; }
.cl-remove:hover { color: var(--red); }
.cart-foot { border-top: 1px solid var(--line); padding: 16px 18px; }
.cart-total-row { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total-row span { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.cart-total-row b { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 600; }
.cart-total-lbp { text-align: right; color: var(--muted); font-size: 13px; min-height: 18px; margin-top: 2px; }
.charge-btn { width: 100%; justify-content: center; margin-top: 14px; padding: 16px; font-size: 17px; }

.pay-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: lamFade .15s ease; }
.pay-box { width: 420px; max-width: 100%; padding: 22px 24px; animation: lamPop .18s ease; }
.pay-header { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 14px; }
.pay-total-big { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; background: var(--input); border-radius: 14px; margin-bottom: 16px; }
.pay-total-big span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.pay-total-big b { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 600; }
.pay-seg { width: 100%; margin-bottom: 18px; }
.pay-seg label { flex: 1; text-align: center; padding-left: 8px; padding-right: 8px; }
.pay-input { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--input); color: var(--ink); font-size: 22px; font-weight: 700; font-family: inherit; text-align: right; color-scheme: dark; }
.pay-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,.25); }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 7px; }
.quick-cash { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.qc { flex: 1; min-width: 64px; padding: 11px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font-weight: 600; cursor: pointer; font-family: inherit; font-size: 14px; }
.qc:hover { background: #45454a; }
.pay-change { margin-top: 14px; display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.pay-change b { font-family: 'Fraunces', serif; font-size: 24px; color: var(--green); text-transform: none; letter-spacing: 0; }
.pay-change b.short { color: var(--red); }
.pay-subline { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.pay-subline b { color: var(--ink); }
.whish-note { padding: 18px; background: var(--input); border-radius: 12px; text-align: center; font-size: 15px; color: var(--ink-soft); }
.whish-note b { color: #ff6b95; }
.complete-btn { width: 100%; justify-content: center; margin-top: 18px; padding: 16px; font-size: 17px; background: var(--green); }
.complete-btn:hover { background: #28b84c; }

.check-label { flex-direction: column; }
.check-label input[type=checkbox] { width: auto; min-width: 0; align-self: flex-start; transform: scale(1.4); margin-top: 6px; }
.num.warn { color: #ffd60a; }
.row-archived { opacity: .5; }
.row-actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.snap-badge { font-size: 20px; }
.pos-report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }

/* ---------- Receipt (80mm thermal) ---------- */
.receipt-body { background: #2a2a2e; min-height: 100vh; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.receipt-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.receipt { width: 80mm; max-width: 100%; background: #fff; color: #000; padding: 6mm 5mm; font-family: 'Inter', sans-serif; font-size: 12px; line-height: 1.4; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.r-head { text-align: center; }
.r-shop { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600; }
.r-sub { font-size: 11px; color: #333; }
.r-rule { border-top: 1px dashed #999; margin: 8px 0; }
.r-meta div, .r-pay div { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; }
.r-meta span, .r-pay span { color: #555; }
.r-items { width: 100%; border-collapse: collapse; }
.r-items td { padding: 3px 0; vertical-align: top; }
.ri-name { padding-right: 8px; }
.ri-mult { display: block; font-size: 10.5px; color: #666; }
.ri-amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.r-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 15px; margin: 4px 0; }
.r-total b { font-family: 'Fraunces', serif; font-size: 18px; }
.r-foot { text-align: center; margin-top: 8px; font-size: 11.5px; color: #333; }

@media print {
  @page { size: 80mm auto; margin: 0; }
  body.receipt-body { background: #fff; padding: 0; display: block; }
  .receipt-actions { display: none !important; }
  .receipt { width: auto; box-shadow: none; padding: 3mm 4mm; }
}

/* ---------- Mobile ---------- */
.scrim { display: none; }
@media (max-width: 1000px) {
  .pos { grid-template-columns: 1fr; }
  .pos-cart { position: static; max-height: none; }
  .cart-lines { max-height: 45vh; }
  .pos-report-cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 4px 0 30px rgba(0,0,0,.5); }
  .sidebar.open { transform: translateX(0); }
  .scrim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; }
  .mobile-bar { display: flex; align-items: center; gap: 14px; background: var(--sidebar-top); color: var(--ink); padding: 12px 16px; position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line-soft); }
  .mobile-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 18px; }
  .hamburger { background: none; border: none; cursor: pointer; padding: 4px; display: flex; flex-direction: column; gap: 4px; }
  .hamburger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
  .content { padding: 20px 16px 50px; }
  .page-head h1 { font-size: 24px; }
  .inline-form, .expense-fields { flex-direction: column; align-items: stretch; }
  .inline-form input, .inline-form select, .expense-fields input { min-width: 0; width: 100%; }
  .inline-form button, .expense-fields button { width: 100%; justify-content: center; }
  .data-table th, .data-table td { padding: 11px 12px; font-size: 13.5px; }
  .form-card { padding: 18px 16px; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .row-actions { gap: 10px; }
  .reset-form input { width: 90px; }
}
