/* ================================================================
   DryFruit POS — warm premium theme
   ================================================================ */
:root {
  --bg: #f6f1e7;
  --card: #fffdf9;
  --card-2: #fbf7ee;
  --border: #eadfce;
  --border-2: #dfd2bc;
  --ink: #2b2118;
  --ink-2: #6b5d4d;
  --muted: #9a8b78;
  --accent: #b45309;
  --accent-2: #d97706;
  --accent-soft: #fdf0e0;
  --green: #15803d;
  --green-soft: #e8f5ec;
  --red: #c0392b;
  --red-soft: #fdecea;
  --blue: #2a78d6;
  --violet: #7c3aed;
  --teal: #0b8f6b;
  --gold: #b8860b;
  --shadow: 0 1px 2px rgba(70, 45, 10, .06), 0 4px 14px rgba(70, 45, 10, .07);
  --shadow-lg: 0 8px 40px rgba(50, 30, 5, .18);
  --radius: 14px;
  --side-w: 236px;
  --grid: #ece5d8;
  --chart-1: #b45309;      /* single-series hue      */
  --cat-1: #c2410c;        /* categorical: cash      */
  --cat-2: #0b8f6b;        /*              upi       */
  --cat-3: #2a78d6;        /*              card      */
  --cat-4: #7c3aed;        /*              split     */
  font-size: 15px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
[hidden] { display: none !important; }
::placeholder { color: var(--muted); }

/* ---------------- scrollbars ---------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ================= LOGIN ================= */
#login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1100px 500px at 15% -10%, #fdeed3 0%, transparent 60%),
    radial-gradient(900px 500px at 110% 110%, #f3e2c3 0%, transparent 55%),
    var(--bg);
  padding: 24px;
}
.login-wrap { display: flex; gap: 64px; align-items: center; max-width: 880px; width: 100%; justify-content: center; flex-wrap: wrap; }
.login-brand { text-align: center; }
.login-logo {
  width: 96px; height: 96px; margin: 0 auto 18px; display: grid; place-items: center;
  font-size: 52px; background: linear-gradient(145deg, #3a2a1a, #241708);
  border-radius: 28px; box-shadow: var(--shadow-lg);
}
.login-brand h1 { font-size: 30px; margin-bottom: 6px; }
.login-tag { color: var(--ink-2); }
.login-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px; width: 360px; box-shadow: var(--shadow-lg);
}
.login-card h2 { margin-bottom: 18px; font-size: 20px; }
.login-error {
  background: var(--red-soft); color: var(--red); border-radius: 10px;
  padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px;
}
.login-quick { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

/* ================= APP SHELL ================= */
#app { display: flex; min-height: 100vh; }
#sidebar {
  width: var(--side-w); flex: 0 0 var(--side-w);
  background: linear-gradient(180deg, #33241a 0%, #241708 100%);
  color: #efe6d8; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 16px; }
.side-logo {
  font-size: 24px; width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); border-radius: 12px;
}
.side-name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.side-sub { font-size: 11.5px; color: #b9a88f; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
#side-nav { flex: 1; padding: 8px 10px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10.5px 12px; border: 0; background: transparent; color: #d8cbb6;
  border-radius: 10px; margin-bottom: 2px; font-size: 14.5px; text-align: left;
  transition: background .12s ease;
}
.nav-item .ni { font-size: 17px; width: 22px; text-align: center; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: var(--accent-2); color: #fff; font-weight: 600; box-shadow: 0 2px 10px rgba(217, 119, 6, .4); }
.nav-sep { margin: 10px 12px 6px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #8d7c63; }
.side-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-user { display: flex; gap: 10px; align-items: center; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-2); color: #fff; font-weight: 700; font-size: 15px; flex: none;
}
.side-user-name { font-size: 13.5px; font-weight: 600; }
.link-btn { background: none; border: 0; color: #b9a88f; font-size: 12px; padding: 0; text-decoration: underline; }
.link-btn:hover { color: #fff; }

#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px 0;
}
#page-title { font-size: 23px; }
.today-chip {
  background: var(--card); border: 1px solid var(--border); color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow);
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.net-pill {
  position: fixed; top: 12px; right: 20px; z-index: 90;
  border: 0; border-radius: 999px; padding: 9px 16px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; box-shadow: var(--shadow-lg);
}
.net-pill.off { background: var(--red); color: #fff; animation: pulse-red 1.6s infinite; }
.net-pill.sync { background: #fdf3d7; color: #92660a; border: 1px solid #eeddae; }
@keyframes pulse-red { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.35); } 50% { box-shadow: 0 0 0 6px rgba(192,57,43,0); } }
#page { padding: 20px 28px 40px; flex: 1; }

/* ================= PRIMITIVES ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--border-2); background: var(--card); color: var(--ink);
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  transition: transform .05s ease, box-shadow .12s ease, background .12s;
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-danger { background: #fff; color: var(--red); border-color: #eec5bf; }
.btn-danger:hover { background: var(--red-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--card-2); box-shadow: none; }
.btn-lg { padding: 13px 20px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

.chip {
  border: 1px solid var(--border-2); background: var(--card); border-radius: 999px;
  padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: all .12s;
}
.chip:hover { border-color: var(--accent-2); color: var(--accent); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.fld { display: block; margin-bottom: 13px; }
.fld > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.fld input, .fld select, .fld textarea, .input {
  width: 100%; padding: 9.5px 12px; border: 1px solid var(--border-2);
  border-radius: 10px; background: #fff; outline: none; transition: border .12s, box-shadow .12s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus, .input:focus {
  border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(217, 119, 6, .15);
}
.fld-row { display: flex; gap: 12px; }
.fld-row .fld { flex: 1; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card h3 { font-size: 15px; margin-bottom: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; padding: 3px 9px;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--accent-soft); color: var(--accent); }
.badge-gray { background: #f0ece3; color: var(--ink-2); }
.badge-gold { background: #fdf3d7; color: #92660a; }
.badge-plat { background: #eceef6; color: #4a5578; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td { padding: 10.5px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--card-2); }
.tbl .num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-click tbody tr { cursor: pointer; }

/* toolbar rows */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.toolbar .input { width: 230px; }

/* stat tiles */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow);
}
.stat .s-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 6px; }
.stat .s-value { font-size: 25px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.stat .s-sub { font-size: 12px; color: var(--ink-2); margin-top: 3px; }

/* drill-down cards / rows — clickable affordance */
[data-go], [data-tab] { cursor: pointer; transition: transform .08s ease, box-shadow .12s ease, border-color .12s; }
.stat[data-go]:hover, .stat[data-tab]:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.stat[data-go]:active, .stat[data-tab]:active { transform: translateY(0); }
.low-item[data-go]:hover { background: var(--card-2); }
[data-go]:focus-visible, [data-tab]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { [data-go], [data-tab] { transition: none; } .stat[data-go]:hover, .stat[data-tab]:hover { transform: none; } }

/* ================= POS ================= */
.pos-layout { display: grid; grid-template-columns: 1fr 392px; gap: 18px; align-items: start; }
.pos-left {}
.pos-search-row { display: flex; gap: 10px; margin-bottom: 12px; }
.pos-search-row .input { flex: 1; padding: 12px 16px; font-size: 15px; border-radius: 12px; box-shadow: var(--shadow); border-color: var(--border); }
.cat-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.prod-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 13px 11px; cursor: pointer; text-align: left; position: relative;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s;
  box-shadow: var(--shadow);
}
.prod-card:hover { transform: translateY(-2px); border-color: var(--accent-2); box-shadow: 0 6px 20px rgba(120, 70, 10, .14); }
.prod-card:active { transform: translateY(0); }
.prod-emoji { font-size: 26px; }
.prod-name { font-weight: 650; font-size: 13.5px; line-height: 1.28; margin: 7px 0 7px; min-height: 34px; }
.prod-price { font-weight: 800; font-size: 15px; }
.prod-price small { font-weight: 600; color: var(--muted); font-size: 11px; }
.prod-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; }
.prod-pts { font-size: 11px; color: var(--accent); font-weight: 700; }
.prod-stock { font-size: 11px; color: var(--muted); font-weight: 600; }
.prod-stock.low { color: var(--red); }
.prod-stock.out { color: var(--red); font-weight: 800; }
/* out of stock: dimmed but still legible, with an explicit badge */
.prod-card.oos { opacity: .72; background: var(--card-2); }
.prod-card.oos .prod-photo, .prod-card.oos .prod-emoji { filter: grayscale(1); opacity: .75; }
.prod-oos {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  background: var(--red-soft); color: var(--red); border-radius: 6px; padding: 2px 7px; margin-bottom: 5px;
}
.prod-card.expired { border-color: #eec5bf; background: #fff8f6; }
.prod-photo {
  width: 100%; height: 74px; object-fit: cover; border-radius: 9px; display: block;
  background: var(--card-2);
}
body.pos-full .prod-photo { height: 92px; }
.prod-img { object-fit: cover; border-radius: 8px; background: var(--card-2); flex: none; }
.img-row { display: flex; gap: 14px; align-items: center; margin-bottom: 13px; }
.img-preview {
  width: 84px; height: 84px; border-radius: 12px; border: 1px dashed var(--border-2);
  display: grid; place-items: center; font-size: 34px; overflow: hidden; background: var(--card-2); flex: none;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.prod-exp {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  background: var(--red-soft); color: var(--red); border-radius: 6px; padding: 2px 7px; margin-bottom: 5px;
}
.prod-exp.soon { background: var(--accent-soft); color: var(--accent); }
.expired-box { text-align: center; padding: 8px 6px; }
.expired-box p { font-size: 14px; color: var(--ink-2); }

/* cart */
.cart { position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.cart-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-head h3 { font-size: 15px; }
.cust-box { padding: 12px 16px; border-bottom: 1px dashed var(--border-2); background: var(--card-2); border-radius: 0; }
.cust-attached { display: flex; align-items: center; gap: 10px; }
.cust-attached .avatar { background: var(--green); }
.cust-info { flex: 1; min-width: 0; }
.cust-name { font-weight: 700; font-size: 13.5px; }
.cust-pts { font-size: 12px; color: var(--ink-2); }
.cart-items { flex: 1; overflow-y: auto; padding: 6px 0; min-height: 90px; }
.cart-empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 13.5px; }
.cart-empty .ce { font-size: 34px; display: block; margin-bottom: 8px; opacity: .7; }
.cart-line { display: flex; align-items: center; gap: 9px; padding: 8px 14px; }
.cart-line:hover { background: var(--card-2); }
.cl-emoji { font-size: 19px; }
.cl-body { flex: 1; min-width: 0; }
.cl-name { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-sub { font-size: 11.5px; color: var(--muted); }
.cl-qty { display: flex; align-items: center; gap: 4px; }
.qty-btn {
  width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border-2);
  background: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; color: var(--ink-2);
}
.qty-btn:hover { border-color: var(--accent-2); color: var(--accent); }
.cl-qty .q { min-width: 46px; text-align: center; font-size: 12.5px; font-weight: 700; cursor: pointer; border-bottom: 1px dashed var(--border-2); }
.cl-amt { font-weight: 750; font-size: 13.5px; min-width: 68px; text-align: right; font-variant-numeric: tabular-nums; }
.cl-x { border: 0; background: none; color: var(--muted); font-size: 15px; padding: 2px 4px; }
.cl-x:hover { color: var(--red); }
.cart-totals { border-top: 1px solid var(--border); padding: 12px 16px 8px; font-size: 13.5px; }
.tot-row { display: flex; justify-content: space-between; padding: 3px 0; color: var(--ink-2); }
.tot-row .tv { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.tot-row.grand { font-size: 19px; font-weight: 800; color: var(--ink); padding-top: 8px; margin-top: 6px; border-top: 2px solid var(--ink); }
.tot-row.grand .tv { font-weight: 800; }
.tot-inputs { display: flex; gap: 8px; margin: 8px 0 4px; }
.tot-inputs .fld { margin: 0; flex: 1; }
.tot-inputs input { padding: 7px 10px; font-size: 13px; }
.cart-actions { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 8px; padding: 10px 16px 16px; }
.redeem-hint { font-size: 11.5px; color: var(--accent); font-weight: 600; }

/* payment modal specifics */
.pay-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.pay-mode {
  border: 1.5px solid var(--border-2); background: #fff; border-radius: 12px;
  padding: 11px 6px; text-align: center; font-weight: 700; font-size: 13px;
}
.pay-mode .pm-ico { display: block; font-size: 20px; margin-bottom: 3px; }
.pay-mode.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.pay-total-banner {
  background: linear-gradient(135deg, #33241a, #241708); border-radius: 14px; color: #fff;
  padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.pay-total-banner .amt { font-size: 27px; font-weight: 800; }
.change-line { font-size: 14px; font-weight: 700; color: var(--green); min-height: 20px; margin-bottom: 6px; }

/* success modal */
.sale-done { text-align: center; padding: 6px 4px 2px; }
.sale-done .big { font-size: 48px; }
.sale-done h3 { font-size: 19px; margin: 8px 0 3px; }
.sale-done .inv { color: var(--muted); font-size: 13px; }
.pts-earned {
  margin: 14px auto 4px; background: var(--accent-soft); color: var(--accent);
  border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: 14px; display: inline-block;
}
.done-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }

/* ================= MODALS / TOASTS ================= */
#modal-root {
  position: fixed; inset: 0; background: rgba(35, 22, 8, .45); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 100; padding: 20px; overflow-y: auto;
}
.modal {
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px; max-height: calc(100vh - 60px); display: flex; flex-direction: column;
  animation: pop .16s ease;
}
.modal.modal-lg { max-width: 780px; }
.modal.modal-xl { max-width: 980px; }
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px 0; }
.modal-head h3 { font-size: 17px; }
.modal-x { border: 0; background: var(--card-2); width: 30px; height: 30px; border-radius: 9px; font-size: 15px; color: var(--ink-2); }
.modal-x:hover { background: var(--border); }
.modal-body { padding: 16px 20px 20px; overflow-y: auto; }
.modal-foot { padding: 0 20px 20px; display: flex; gap: 10px; justify-content: flex-end; }

#toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #2b2118; color: #fff; border-radius: 12px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: pop .18s ease;
  display: flex; gap: 8px; align-items: center; max-width: 480px;
}
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }

/* ================= CHARTS ================= */
.chart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 14px; }
.chart-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-card { padding: 16px 18px 12px; }
.chart-card h3 { font-size: 14px; margin-bottom: 4px; }
.chart-card .ch-sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.chart-svg { width: 100%; display: block; }
.chart-svg text { font-family: system-ui, -apple-system, sans-serif; }
.bar-rect { transition: opacity .1s; }
.bar-rect:hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.legend .lg { display: flex; align-items: center; gap: 7px; }
.legend .sw { width: 11px; height: 11px; border-radius: 3.5px; flex: none; }
.legend .lg b { color: var(--ink); font-variant-numeric: tabular-nums; }

.hbar-row { display: grid; grid-template-columns: minmax(110px, 1.1fr) 2fr auto; align-items: center; gap: 10px; padding: 5.5px 0; font-size: 13px; }
.hbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-weight: 600; }
.hbar-track { background: var(--card-2); border-radius: 6px; height: 16px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--chart-1); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar-val { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12.5px; white-space: nowrap; }
.hbar-pct { display: inline-block; min-width: 42px; text-align: right; margin-left: 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
/* narrow screens are already tight here — drop the alignment reserve so the
   percentage costs as little width as possible */
@media (max-width: 700px) { .hbar-pct { min-width: 0; margin-left: 4px; font-size: 10.5px; } }

.low-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.low-item:last-child { border-bottom: 0; }
.low-item .ln { flex: 1; font-weight: 600; }

/* report tabs */
.tabs { display: flex; gap: 4px; background: var(--card-2); border: 1px solid var(--border); padding: 4px; border-radius: 12px; width: max-content; margin-bottom: 16px; }
.tab { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 650; font-size: 13.5px; color: var(--ink-2); }
.tab.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }

.tier { font-size: 10.5px; }

kbd {
  background: var(--card-2); border: 1px solid var(--border-2); border-bottom-width: 2px;
  border-radius: 6px; padding: 1px 6px; font-size: 11px; font-family: inherit; font-weight: 700; color: var(--ink-2);
}
.kbd-bar { display: flex; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

.empty-state { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty-state .es { font-size: 40px; display: block; margin-bottom: 10px; opacity: .75; }

/* ---------- dedicated POS screen (focus mode) ---------- */
body.pos-full #sidebar, body.pos-full #topbar { display: none; }
body.pos-full #page { padding: 14px 18px 20px; }
body.pos-full .pos-layout { grid-template-columns: 1fr 430px; }
body.pos-full .prod-grid { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
body.pos-full .prod-card { padding: 16px 15px 13px; }
body.pos-full .prod-emoji { font-size: 32px; }
body.pos-full .prod-name { font-size: 14.5px; }
body.pos-full .cart { max-height: calc(100vh - 28px); }
body.pos-full .kbd-bar { display: none; }

/* ---------- ⋯ dropdown menu ---------- */
.pop-menu { position: absolute; z-index: 300; background: var(--card); border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-lg); padding: 5px; min-width: 176px; }
.pop-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: var(--ink); }
.pop-item:hover { background: var(--card-2); }
.pop-item.danger { color: var(--red); }
.btn-dots { font-size: 17px; line-height: 1; padding: 5px 11px; letter-spacing: 1px; }
tr.low-row td { background: #fff6f4; }
tr.low-row td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* ---------- blocked "stamp slam" feedback ---------- */
.block-stamp {
  position: fixed; inset: 0; z-index: 260; display: grid; place-items: center;
  pointer-events: none; background: rgba(150, 25, 12, .10); animation: bs-bgin .12s ease;
}
.block-stamp.out { animation: bs-bgout .24s ease forwards; }
.block-stamp .bs-card {
  pointer-events: auto; cursor: pointer; background: #fff;
  border: 3px solid var(--red); border-radius: 20px; padding: 22px 40px; text-align: center;
  box-shadow: 0 18px 60px rgba(120, 20, 10, .35); animation: bs-slam .42s cubic-bezier(.2, 1.4, .35, 1);
}
.block-stamp.out .bs-card { animation: bs-out .22s ease forwards; }
.bs-emoji { font-size: 50px; line-height: 1; display: inline-block; animation: bs-wob .55s ease .12s both; }
.bs-title { font-size: 22px; font-weight: 800; color: var(--red); margin-top: 8px; letter-spacing: -.01em; }
.bs-sub { font-size: 14px; color: var(--ink-2); font-weight: 600; margin-top: 3px; }
@keyframes bs-slam { 0% { transform: scale(2.3) rotate(-9deg); opacity: 0; } 55% { transform: scale(.88) rotate(3deg); } 100% { transform: scale(1) rotate(-2deg); opacity: 1; } }
@keyframes bs-out { to { transform: scale(.55) rotate(-2deg); opacity: 0; } }
@keyframes bs-bgin { from { opacity: 0; } }
@keyframes bs-bgout { to { opacity: 0; } }
@keyframes bs-wob { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.shake { animation: shake .36s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .block-stamp .bs-card, .bs-emoji, .shake { animation-duration: .01ms; } }

/* ---------- weight / amount entry (POS qty modal) ---------- */
.qty-head { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 13px; }
.qty-head b { color: var(--ink); font-size: 14px; }
.wchip-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.wchip {
  border: 1.5px solid var(--border-2); background: #fff; border-radius: 12px;
  padding: 9px 4px; display: grid; gap: 1px; justify-items: center;
  transition: all .1s;
}
.wchip b { font-size: 14px; }
.wchip small { font-size: 11px; color: var(--muted); font-weight: 600; }
.wchip:hover { border-color: var(--accent); background: var(--accent-soft); }
.wchip:hover small { color: var(--accent); }
.qty-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 10px; }
.qm { border: 0; background: transparent; border-radius: 9px; padding: 8px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.qm.active { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }
.qty-display-wrap {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  border-bottom: 2px solid var(--border-2); padding: 2px 0 6px; margin-bottom: 6px;
}
.qty-display {
  border: 0 !important; outline: none; background: transparent; box-shadow: none !important;
  font-size: 38px; font-weight: 800; text-align: center; width: 190px;
  font-variant-numeric: tabular-nums; padding: 0 !important; color: var(--ink); letter-spacing: -0.01em;
}
.qty-unit { font-size: 19px; font-weight: 800; color: var(--muted); }
.qty-conv { text-align: center; font-size: 14px; color: var(--ink-2); min-height: 22px; margin-bottom: 12px; }
.qty-conv b { color: var(--ink); font-size: 15px; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 300px; margin: 0 auto; }
.np-btn {
  border: 1px solid var(--border-2); background: #fff; border-radius: 12px;
  font-size: 19px; font-weight: 700; padding: 12px 0; color: var(--ink);
  transition: background .08s;
}
.np-btn:hover { background: var(--accent-soft); border-color: var(--accent-2); }
.np-btn:active { transform: translateY(1px); }
@media (max-width: 560px) { .wchip-row { grid-template-columns: repeat(3, 1fr); } }

/* ---------- cash drawer / denominations ---------- */
.denom-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px 14px; }
.denom-row { display: grid; grid-template-columns: 44px 12px 1fr 60px; align-items: center; gap: 6px; }
.denom-row .dl { font-weight: 800; font-size: 13px; text-align: right; }
.denom-row .dx { color: var(--muted); text-align: center; }
.denom-row input { padding: 7px 9px; font-size: 13.5px; text-align: center; }
.denom-row .da { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.denom-total {
  margin-top: 12px; background: var(--card-2); border: 1px dashed var(--border-2); border-radius: 10px;
  padding: 10px 14px; display: flex; justify-content: space-between; font-size: 14px;
}
.denom-total b { font-size: 17px; }
.variance-line { margin-top: 10px; font-weight: 700; font-size: 14px; min-height: 20px; color: var(--muted); }
.btn-warn { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(217,119,6,.35); } 50% { box-shadow: 0 0 0 5px rgba(217,119,6,0); } }
@media (max-width: 720px) { .denom-grid { grid-template-columns: 1fr; } }

/* ---------- OTP approval ---------- */
.otp-box {
  background: var(--accent-soft); border: 1px dashed var(--accent-2); border-radius: 12px;
  padding: 12px 14px; margin: 10px 0;
}
.otp-title { font-weight: 700; font-size: 13.5px; color: var(--accent); }
.appr-code {
  font-size: 30px; font-weight: 800; letter-spacing: .14em; font-variant-numeric: tabular-nums;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 18px;
}

@media (max-width: 1100px) {
  .pos-layout, body.pos-full .pos-layout { grid-template-columns: 1fr; }
  .cart { position: static; max-height: none; }
  .chart-grid, .chart-grid-2, .grid-2 { grid-template-columns: 1fr; }
}
