
/* ==========================================================================
   Bee Laban POS — Modern UI, Tactile Animations & Thermal Typography (v27)
   ========================================================================== */

:root {
  --navy: #121829;
  --navy2: #1C2640;
  --blue: #D97706;          /* Warm Honey-Amber primary brand accent */
  --blue-2: #2563EB;        /* Crisp Cobalt secondary accent for totals/links */
  --blue-soft: #FEF3C7;     /* Soft honey tint */
  --bg: #F6F5F2;            /* Warm cream-alabaster canvas */
  --surface: #FFFFFF;
  --surface-2: #FAF9F6;
  --text: #121829;
  --muted: #5E687E;
  --line: #E5E2DA;
  --ok: #0E9F6E;
  --ok-soft: #DEF7EC;
  --warn: #D97706;
  --bad: #DC2626;
  --bad-soft: #FDE8E8;
  --r: 18px;
  --r-sm: 12px;
  --sh: 0 2px 6px rgba(18, 24, 41, 0.04), 0 12px 28px rgba(18, 24, 41, 0.06);
  --sh-lg: 0 18px 44px rgba(18, 24, 41, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --side: 238px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) and (max-width: 0px) {
  :root:not([data-theme=light]) {
    --bg: #0B0F19;
    --surface: #131A2B;
    --surface-2: #182136;
    --text: #F3F4F6;
    --muted: #9AA5BE;
    --line: #232D47;
    --blue-soft: rgba(217, 119, 6, 0.16);
    --ok-soft: rgba(14, 159, 110, 0.16);
    --bad-soft: rgba(220, 38, 38, 0.16);
    --sh: 0 4px 14px rgba(0, 0, 0, 0.28), 0 14px 32px rgba(0, 0, 0, 0.38);
    --sh-lg: 0 24px 54px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

:root[data-theme=dark] {
  --bg: #0B0F19;
  --surface: #131A2B;
  --surface-2: #182136;
  --text: #F3F4F6;
  --muted: #9AA5BE;
  --line: #232D47;
  --blue-soft: rgba(217, 119, 6, 0.16);
  --ok-soft: rgba(14, 159, 110, 0.16);
  --bad-soft: rgba(220, 38, 38, 0.16);
  --sh: 0 4px 14px rgba(0, 0, 0, 0.28), 0 14px 32px rgba(0, 0, 0, 0.38);
  --sh-lg: 0 24px 54px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
}

body {
  font: 15px/1.5 Inter, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
}

h1, h2, h3, .num {
  font-family: Sora, Inter, sans-serif;
  letter-spacing: -0.025em;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  transition: transform 0.16s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.22s var(--ease), opacity 0.2s var(--ease);
}

button:active:not(:disabled) {
  transform: scale(0.965);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

:focus-visible {
  outline: 2.5px solid var(--blue);
  outline-offset: 2px;
}

svg.i {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseSoft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* App Shell */
.app {
  display: flex;
  height: 100%;
  min-height: 100dvh;
}

aside {
  width: var(--side);
  background: linear-gradient(180deg, var(--navy) 0%, #0D1220 100%);
  color: #CBD5E1;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  transition: width 0.28s var(--ease);
  flex: none;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

aside.min {
  width: 72px;
}

aside.min .lbl,
aside.min .brand b,
aside.min .branch,
aside.min .side-foot .lbl {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 16px;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-family: Sora, sans-serif;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35);
  flex: none;
}

.brand b {
  font-family: Sora, sans-serif;
  font-size: 17px;
  color: #FFFFFF;
}

.branch {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #F8FAFC;
  padding: 0 11px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 14px;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.branch:hover {
  background: rgba(255, 255, 255, 0.11);
}

nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  color: #9FB0CC;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  position: relative;
}

nav button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

nav button.on {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.22) 0%, rgba(245, 158, 11, 0.08) 100%);
  color: #FBBF24;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #F59E0B;
}

.side-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 8px;
}

.av {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--navy2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #FBBF24;
  flex: none;
}

/* Main & Topbar */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  border-bottom: 1px solid var(--line);
}

.top h1 {
  font-size: 21px;
  font-weight: 700;
  white-space: nowrap;
}

.top .search {
  flex: 1;
  max-width: 380px;
  margin-left: auto;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 13px;
  height: 42px;
  padding: 0 13px;
  color: var(--muted);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent);
}

.search input {
  flex: 1;
  border: 0;
  background: none;
  outline: none;
  color: var(--text);
  font: inherit;
  min-width: 0;
}

.ib {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex: none;
}

.ib:hover {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 35%, transparent);
}

.ble-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}

.ble-pill:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.ble-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.ble-pill[data-st="Connected"] {
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
  background: var(--ok-soft);
  color: var(--ok);
}

.ble-pill[data-st="Connected"] .ble-dot {
  background: var(--ok);
}

.ble-pill[data-st="Connecting"] .ble-dot {
  background: var(--warn);
  animation: pulseSoft 1.2s ease-in-out infinite;
}

/* Views, Cards & KPIs */
.view {
  padding: 22px;
  flex: 1;
  animation: fadeSlideUp 0.26s var(--ease);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--sh);
  transition: transform 0.2s var(--ease), box-shadow 0.22s var(--ease), border-color 0.2s var(--ease);
}

.grid {
  display: grid;
  gap: 16px;
}

.kpis {
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
}

.two {
  grid-template-columns: 1.5fr 1fr;
}

.kpi {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface) 60%, color-mix(in srgb, var(--blue-soft) 45%, var(--surface)) 100%);
}

.kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #FBBF24);
  opacity: 0.85;
}

.kpi small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.kpi .num {
  font-size: 29px;
  font-weight: 700;
  margin-top: 8px;
  color: var(--text);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding-top: 12px;
}

.bars i {
  flex: 1;
  display: block;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #F59E0B 0%, var(--blue) 100%);
  min-height: 8px;
  transition: height 0.35s var(--ease), opacity 0.2s var(--ease);
}

.bars i:hover {
  opacity: 0.85;
}

/* Chips, Segments & Buttons */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  min-height: 40px;
}

.chip:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.chip.on {
  background: var(--blue);
  color: #FFFFFF;
  border-color: var(--blue);
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.28);
}

.seg {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 13px;
  gap: 4px;
}

.seg button {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

.seg button.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(18, 24, 41, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 13px;
  background: linear-gradient(135deg, #F59E0B 0%, var(--blue) 100%);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.28);
}

.btn:hover:not(:disabled) {
  filter: brightness(1.04);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.36);
  transform: translateY(-1px);
}

.btn.sec {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.sec:hover:not(:disabled) {
  background: var(--blue-soft);
  border-color: color-mix(in srgb, var(--blue) 40%, transparent);
  color: var(--blue);
  transform: translateY(-1px);
}

input.f, select.f {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 0 13px;
  font: inherit;
  font-size: 14.5px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

input.f:focus, select.f:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent);
}

.fg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* POS Terminal */
.pos {
  display: grid;
  grid-template-columns: 1fr 395px;
  gap: 20px;
  align-items: start;
}

.pos-l {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 13px;
}

.prod {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--sh);
}

.prod:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: var(--sh-lg);
}

.pimg {
  height: 88px;
  display: grid;
  place-items: center;
  font-size: 36px;
  background: linear-gradient(135deg, var(--blue-soft) 0%, var(--surface-2) 100%);
}

.prod div:last-child {
  padding: 11px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prod b {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.32;
  min-height: 2.64em;
}

.prod span {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--blue-2);
}

/* Cart Panel */
.cart {
  padding: 0;
  overflow: hidden;
  position: sticky;
  top: 78px;
  border-radius: 20px;
}

.cart-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.cart-h h3 {
  font-size: 17px;
  font-weight: 700;
}

.lines {
  max-height: 270px;
  overflow: auto;
  padding: 8px 18px;
}

.line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  animation: fadeSlideUp 0.18s var(--ease);
}

.line:last-child {
  border-bottom: 0;
}

.line .n {
  flex: 1;
  min-width: 0;
}

.line .n b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}

.line .n small {
  color: var(--muted);
  font-size: 12.5px;
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px 6px;
}

.qty button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.qty button:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.totals {
  padding: 12px 18px 14px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  font-size: 14px;
}

.totals > div:not(.row) {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.totals .gt {
  font-family: Sora, sans-serif;
  font-size: 22px;
  font-weight: 700;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px solid var(--line);
  color: var(--text);
}

/* Tables, Tags, Empty & Modals */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--blue-soft);
  color: var(--blue);
}

.tag.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.tag.off {
  background: var(--bad-soft);
  color: var(--bad);
}

.empty {
  text-align: center;
  padding: 34px 18px;
  color: var(--muted);
}

.ring {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.empty h3 {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(11, 15, 25, 0.56);
  backdrop-filter:none;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: auto;
}

.modal {
  width: min(480px, 100%);
  max-height: 90dvh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--sh-lg);
  animation: modalPop 0.22s var(--ease);
}

.pm {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.pm button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 11px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.pm button.on {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.prow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}

.prow b {
  min-width: 64px;
}

/* Printer & KOT Typography (Crisp & Bold) */
.rcpt {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: pre-wrap;
  background: #FFFDF7;
  color: #111827;
  border: 1.5px dashed #CBD5E1;
  border-radius: 14px;
  padding: 18px;
  margin: 14px auto;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.65;
  width: 316px;
  max-width: 100%;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Toasts & Mobile Nav */
#toasts {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--navy);
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--sh-lg);
  border-left: 4px solid var(--blue);
  animation: fadeSlideUp 0.22s var(--ease);
}

.toast.ok {
  border-left-color: var(--ok);
}

.toast.err {
  border-left-color: var(--bad);
}

.mnav {
  display: none;
}

.set {
  display: grid;
  gap: 16px;
}

.err-t {
  color: var(--bad);
  font-size: 13px;
  font-weight: 600;
}

/* Held Bills Bar & Modal */
#held_bills_strip {
  padding: 8px 18px 4px;
}

.hb-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--blue-soft);
  border: 1px solid color-mix(in srgb, var(--blue) 28%, transparent);
}

.hb-strip-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
}

.hb-strip-text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hb-strip-btn {
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--blue);
  border: 1px solid color-mix(in srgb, var(--blue) 35%, transparent);
  font-size: 13px;
  font-weight: 700;
  flex: none;
}

.hb-strip-btn:hover {
  background: var(--blue);
  color: #FFFFFF;
}

.hb-modal {
  width: min(540px, 100%);
}

.hb-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hb-modal-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.hb-icon-close {
  height: 38px !important;
  padding: 0 14px !important;
  font-size: 13.5px !important;
  flex: none;
}

.hb-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.hb-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.hb-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.hb-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hb-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
}

.hb-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
}

.hb-submeta {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
}

.hb-amount {
  font-family: Sora, Inter, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.hb-items-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  display: grid;
  gap: 5px;
  font-size: 13.5px;
}

.hb-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hb-btn-main {
  flex: 1.4;
  height: 42px !important;
  font-size: 14px !important;
}

.hb-btn-del {
  height: 42px !important;
  padding: 0 14px !important;
  font-size: 13.5px !important;
  color: var(--bad) !important;
}

.hbn-quick-tag {
  min-height: 34px !important;
  padding: 5px 12px !important;
  font-size: 12.5px !important;
}

/* Tablet & Mobile Responsiveness */
@media (max-width: 1024px) {
  .pos {
    grid-template-columns: 1fr 340px;
    gap: 14px;
  }
  .two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  aside {
    display: none;
  }
  .top {
    padding: 10px 14px;
    gap: 8px;
  }
  .top h1 {
    font-size: 18px;
  }
  .top .search {
    max-width: none;
    height: 38px;
  }
  .ib {
    width: 38px;
    height: 38px;
  }
  .ble-pill {
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }
  .view {
    padding: 14px;
    padding-bottom: 84px;
  }
  .pos {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cart {
    position: static;
  }
  .pgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .mnav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--navy) 95%, transparent);
    backdrop-filter:none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
  }
  .mnav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 11.5px;
    color: #9FB0CC;
    min-height: 48px;
  }
  .mnav button.on {
    color: #FBBF24;
    background: rgba(245, 158, 11, 0.14);
  }
  #held_bills_strip {
    padding: 6px 14px 2px;
  }
  .hb-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .hb-btn-main {
    grid-column: 1 / -1;
  }
  #toasts {
    right: 12px;
    left: 12px;
    bottom: 76px;
  }
}

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

/* ==========================================================================
   v28 Clean Product Cards (Zero Text Overlap), Chart Containers & Mobile Speed
   ========================================================================== */

/* Clean single-row horizontal category chips on mobile & tablet */
.pos-l > .chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pos-l > .chips::-webkit-scrollbar {
  display: none;
}
.pos-l > .chips .chip {
  flex: none;
  white-space: nowrap;
}

/* Crisp, structured product cards (photo cleanly separated from text) */
.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  gap: 12px;
  contain: layout style;
}

.prod {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(18, 24, 41, 0.05);
  position: relative;
}

.prod.in-cart {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 22%, transparent), 0 6px 16px rgba(217, 119, 6, 0.14);
}

.pimg {
  position: relative;
  width: 100%;
  height: 112px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 38px;
  overflow: hidden;
  flex: none;
}

.pimg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pbadge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--blue);
  color: #FFFFFF;
  font-style: normal;
  font-family: Sora, Inter, sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.pbody {
  padding: 10px 12px 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  flex: 1;
}

.pbody b,
.prod b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.32;
  min-height: 2.64em;
  color: var(--text) !important;
}

.pbody span,
.prod span {
  font-family: Sora, Inter, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-2) !important;
}

/* Smooth Chart.js Containers & Smart Analytics Cards */
.ch {
  position: relative;
  width: 100%;
  height: 280px;
  margin-top: 12px;
}

.ch.s {
  height: 235px;
}

.dl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.dl.up {
  color: var(--ok);
}

.dl.dn {
  color: var(--bad);
}

.insight-card {
  padding: 15px 16px;
  background: linear-gradient(155deg, var(--surface) 55%, color-mix(in srgb, var(--blue-soft) 45%, var(--surface)) 100%);
}

.insight-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.insight-card .ins-val {
  font-family: Sora, Inter, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 5px 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.insight-card span {
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .pgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pimg {
    height: 100px;
    padding: 6px;
  }
  .pbody {
    padding: 9px 10px 11px;
  }
  .ch {
    height: 235px;
  }
  .ch.s {
    height: 205px;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .kpi {
    padding: 14px;
  }
  .kpi .num {
    font-size: 22px;
  }
}

/* ==========================================================================
   v29 Crisp Blue & White Light Mode Theme
   ========================================================================== */
:root,
:root[data-theme=light] {
  --navy: #0F2952;
  --navy2: #193D7A;
  --blue: #1D63ED;          /* Signature Royal Blue */
  --blue-2: #154EC4;        /* Deep Royal Blue */
  --blue-soft: #EBF2FF;     /* Soft Ice Blue */
  --bg: #F5F8FF;            /* Clean Cool White-Blue Canvas */
  --surface: #FFFFFF;       /* Pure Crisp White Cards */
  --surface-2: #F8FAFF;     /* Subtle Blue-Tinted Surface */
  --text: #0F2952;          /* Deep Navy Ink */
  --muted: #5A6F94;         /* Slate Blue Muted Text */
  --line: #DCE6F7;          /* Clean Sky Border */
  --ok: #0E9F6E;
  --ok-soft: #DEF7EC;
  --warn: #D97706;
  --bad: #DC2626;
  --bad-soft: #FDE8E8;
  --sh: 0 2px 6px rgba(15, 41, 82, 0.05), 0 10px 26px rgba(29, 99, 237, 0.07);
  --sh-lg: 0 18px 42px rgba(15, 41, 82, 0.14);
  color-scheme: light;
}

aside {
  background: linear-gradient(180deg, #0F2952 0%, #091B38 100%);
}

.logo {
  background: linear-gradient(135deg, #3B82F6 0%, #1D63ED 100%);
  box-shadow: 0 6px 16px rgba(29, 99, 237, 0.38);
}

.av {
  color: #60A5FA;
}

nav button.on {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.26) 0%, rgba(59, 130, 246, 0.08) 100%);
  color: #93C5FD;
  box-shadow: inset 3px 0 0 #3B82F6;
}

.kpi::before {
  background: linear-gradient(90deg, #1D63ED, #60A5FA);
}

.bars i {
  background: linear-gradient(180deg, #60A5FA 0%, #1D63ED 100%);
}

.chip.on {
  background: #1D63ED;
  border-color: #1D63ED;
  box-shadow: 0 6px 16px rgba(29, 99, 237, 0.26);
}

.btn {
  background: linear-gradient(135deg, #2563EB 0%, #1D63ED 100%);
  box-shadow: 0 6px 18px rgba(29, 99, 237, 0.26);
}

.btn:hover:not(:disabled) {
  box-shadow: 0 10px 24px rgba(29, 99, 237, 0.34);
}

.prod.in-cart {
  border-color: #1D63ED;
  box-shadow: 0 0 0 2px rgba(29, 99, 237, 0.22), 0 6px 16px rgba(29, 99, 237, 0.14);
}

.pbadge {
  background: #1D63ED;
}

.rcpt {
  background: #FFFFFF;
  border-color: #BFDBFE;
}

@media (max-width: 820px) {
  .mnav {
    background: color-mix(in srgb, #0F2952 96%, transparent);
  }
  .mnav button.on {
    color: #93C5FD;
    background: rgba(59, 130, 246, 0.18);
  }
}

/* ==========================================================================
   v31 Top Products Leaderboard & Distinct Smart Analytics Styling
   ========================================================================== */
.tp-list {
  display: grid;
  gap: 10px;
  max-height: 310px;
  overflow: auto;
  padding-right: 2px;
}

.tp-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.tp-rank {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: Sora, Inter, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}

.tp-row:first-child .tp-rank {
  background: var(--blue);
  color: #FFFFFF;
}

.tp-info {
  flex: 1;
  min-width: 0;
}

.tp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tp-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-rev {
  font-family: Sora, Inter, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}

.tp-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.tp-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  margin-top: 6px;
  overflow: hidden;
}

.tp-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1D63ED, #60A5FA);
}

.an-banner {
  background: linear-gradient(135deg, #FFFFFF 0%, #EBF2FF 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--sh);
}

.an-hero {
  padding: 15px 16px;
  background: #FFFFFF;
  border-left: 4px solid var(--blue);
}

.an-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 3px 8px;
  border-radius: 6px;
}

.an-val {
  font-family: Sora, Inter, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 7px 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.an-hero small {
  font-size: 12.5px;
  color: var(--muted);
}

/* ==========================================================================
   v36 Mobile POS Layout & Charge Button Accessibility Fix
   ========================================================================== */
@media (max-width: 820px) {
  .view {
    padding: 12px 12px 104px !important;
  }
  .cart {
    margin-bottom: 16px;
    border-radius: 18px;
  }
  .cart-h {
    padding: 13px 14px;
  }
  .lines {
    max-height: 220px;
    padding: 6px 14px;
  }
  .totals {
    padding: 10px 14px 12px;
    gap: 5px;
    font-size: 13px;
  }
  .totals .gt {
    font-size: 19px;
    padding-top: 6px;
  }
  #pos_checkout_actions {
    padding: 6px 14px 16px !important;
    grid-template-columns: 1fr 1.35fr !important;
    gap: 8px !important;
  }
  #pos_checkout_actions .btn {
    height: 46px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
  }
  .mnav {
    z-index: 45;
  }
}

/* ==========================================================================
   v38 Pinned Mobile "Make KOT" & "Charge" Action Bar Above Bottom Nav
   ========================================================================== */
@media (max-width: 820px) {
  .view {
    padding: 12px 12px 148px !important;
  }
  #pos_checkout_actions {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 42 !important;
    padding: 10px 12px !important;
    background: color-mix(in srgb, var(--surface) 96%, transparent) !important;
    backdrop-filter:none;!important;
    -webkit-backdrop-filter:none;!important;
    border-top: 1px solid var(--line) !important;
    box-shadow: 0 -6px 20px rgba(15, 41, 82, 0.08) !important;
    grid-template-columns: 1fr 1.45fr !important;
    gap: 10px !important;
    margin: 0 !important;
  }
  #pos_checkout_actions .btn {
    height: 48px !important;
    font-size: 14.5px !important;
    border-radius: 13px !important;
  }
  #toasts {
    bottom: 132px !important;
  }
}

/* v77 60fps scroll perf */
html,body,.app,main,.view,.pgrid,.lines,.modal{-webkit-overflow-scrolling:touch;scroll-behavior:auto}
.card,.pcard{contain:layout style}
body.bl-is-scrolling .pcard,body.bl-is-scrolling .card,body.bl-is-scrolling .btn,body.bl-is-scrolling .chip{transition:none!important}
body.bl-is-scrolling *{pointer-events:none!important}

/* v75 tactile button press */
.btn,.chip,.pm button,.pcard,.ib{transition:transform .09s ease,box-shadow .12s ease,background-color .12s ease,opacity .12s ease;user-select:none;-webkit-tap-highlight-color:transparent}
.btn:active,.chip:active,.pm button:active,.pcard:active,.ib:active,.btn.is-pressing{transform:scale(0.95) translateY(1px)!important;filter:brightness(0.92);box-shadow:inset 0 2px 5px rgba(15,23,42,.22)!important}
.btn.is-pressing,.btn:disabled{opacity:.78;cursor:wait}

/* Tactile button press & sending feedback for Restaurant POS & Send Data modal */
.btn.is-pressed,
.btn:active {
  transform: scale(0.96) !important;
  transition: transform 0.08s ease !important;
}
.btn.is-busy {
  opacity: 0.85;
  cursor: wait !important;
  transform: scale(0.98);
}
.btn.is-busy .btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  vertical-align: -2px;
  animation: posBtnSpin 0.65s linear infinite;
}
@keyframes posBtnSpin {
  to { transform: rotate(360deg); }
}

/* Privacy Mode toggle pill & tablet/tab touch ergonomics */
.priv-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}
.priv-pill[data-priv="on"] {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #92400E;
}
.priv-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.priv-pill[data-priv="on"] .priv-dot {
  background: #D97706;
}
html.bl-privacy-on .kpi .num,
html.bl-privacy-on .tp-rev {
  letter-spacing: 0.14em;
}

/* Tablet / cafe tab ergonomics (768px - 1180px) */
@media (min-width: 768px) and (max-width: 1180px) {
  .top {
    padding: 12px 16px;
    gap: 10px;
  }
  .btn {
    min-height: 48px;
    padding: 0 18px;
    font-size: 14.5px;
  }
  .chip {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
  }
  .pgrid {
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    gap: 14px;
  }
  .pimg {
    height: 120px;
  }
  .qty button {
    width: 36px;
    height: 36px;
  }
}

/* Clean, compact Category -> Sold Items cards (v90) */
.bl-cat-section {
  margin-top: 16px;
}
.bl-cat-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.bl-cat-section-head p {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}
.bl-cat-filter-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.bl-cat-filter-strip::-webkit-scrollbar {
  display: none;
}
.bl-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}
.bl-cat-pill span {
  background: var(--bg);
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.bl-cat-pill.on {
  background: var(--blue);
  border-color: var(--blue);
  color: #FFFFFF;
}
.bl-cat-pill.on span {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}
.bl-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.bl-cat-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bl-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.bl-cat-title {
  font-family: Sora, Inter, sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.bl-cat-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}
.bl-cat-rev {
  font-family: Sora, Inter, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ok);
  white-space: nowrap;
}
.bl-cat-items {
  display: grid;
  gap: 8px;
}
.bl-cat-item {
  display: grid;
  gap: 4px;
}
.bl-cat-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
}
.bl-cat-item-name {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.bl-cat-item-stat {
  white-space: nowrap;
  font-size: 12px;
  color: var(--text);
}
.bl-cat-item-stat small {
  color: var(--muted);
  margin: 0 2px;
}
.bl-cat-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.bl-cat-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

/* ==========================================================================
   v93 iPad & Tablet Easy-Billing Layout + Working Drawer + Clean Topbar
   ========================================================================== */
.side-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(11, 15, 25, 0.52);
}
.side-scrim.show {
  display: block;
}

/* Hide duplicate global search in topbar when already on POS Terminal */
body[data-view="pos"] .top .search {
  display: none !important;
}

/* Keep topbar controls cleanly reachable on iPad / Tablet without clipping off-screen */
@media (max-width: 1180px) {
  .top {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 10px 14px;
  }
  .top::-webkit-scrollbar {
    display: none;
  }
  .top > * {
    flex-shrink: 0;
  }
  .top h1 {
    font-size: 17px;
    margin-right: 4px;
  }
  .top .btn,
  .top .priv-pill,
  .top .ble-pill {
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 11px !important;
    font-size: 12.5px !important;
  }
}

/* Slide-over sidebar drawer on iPad portrait & mobile (<= 1024px) */
@media (max-width: 1024px) {
  aside {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 248px !important;
    z-index: 55;
    transform: translateX(-105%);
    transition: transform 0.24s var(--ease);
    box-shadow: var(--sh-lg);
  }
  aside.drawer-open {
    transform: translateX(0);
  }
  .mnav {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    background: color-mix(in srgb, #0F2952 96%, transparent);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
  }
  .mnav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 6px;
    border-radius: 10px;
    font-size: 11px;
    color: #9FB0CC;
    min-height: 48px;
    min-width: 52px;
  }
  .mnav button.on {
    color: #93C5FD;
    background: rgba(59, 130, 246, 0.18);
  }
}

/* iPad Split-Screen POS Billing (720px - 1180px): Products left + Pinned Current Bill right */
@media (min-width: 720px) and (max-width: 1180px) {
  .view {
    padding: 12px 14px 78px !important;
  }
  .pos {
    display: grid !important;
    grid-template-columns: 1fr 320px !important;
    gap: 14px !important;
    align-items: start !important;
  }
  .pgrid {
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)) !important;
    gap: 10px !important;
  }
  .pimg {
    height: 92px !important;
    padding: 6px !important;
  }
  .pbody {
    padding: 8px 10px 10px !important;
  }
  .pbody b,
  .prod b {
    font-size: 13px !important;
  }
  .pbody span,
  .prod span {
    font-size: 14px !important;
  }
  .cart {
    position: sticky !important;
    top: 66px !important;
    max-height: calc(100dvh - 140px) !important;
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
  }
  .cart .lines {
    flex: 1 1 auto !important;
    max-height: none !important;
    min-height: 90px !important;
    overflow-y: auto !important;
    padding: 6px 14px !important;
  }
  .cart .totals {
    padding: 10px 14px !important;
    flex: none !important;
  }
  #pos_checkout_actions {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    box-shadow: none !important;
    border-top: 1px solid var(--line) !important;
    padding: 10px 14px 12px !important;
    grid-template-columns: 1fr 1.45fr !important;
    gap: 8px !important;
    flex: none !important;
  }
  #pos_checkout_actions .btn {
    height: 50px !important;
    min-height: 50px !important;
    font-size: 15px !important;
    border-radius: 13px !important;
  }
  .qty button {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
  }
}

@media (min-width: 960px) and (max-width: 1180px) {
  .pos {
    grid-template-columns: 1fr 365px !important;
  }
}

/* ==========================================================================
   v94 Clean, Uncluttered Topbar + "Tools" Dropdown Menu
   ========================================================================== */
.top {
  min-height: 60px;
  padding: 10px 18px !important;
  gap: 10px !important;
  overflow: visible !important;
}
.top .search {
  height: 38px !important;
  max-width: 260px !important;
  min-width: 140px;
  border-radius: 10px !important;
  padding: 0 11px !important;
  font-size: 13.5px;
}
.top .ib {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
}
.top .btn,
.top .priv-pill,
.top .ble-pill {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 13px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}
.top-tools-wrap {
  position: relative;
  flex: none;
}
.top-tools-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
.top-tools-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--sh-lg);
  z-index: 80;
  flex-direction: column;
  gap: 2px;
}
.top-tools-menu.open {
  display: flex;
  animation: modalPop 0.14s var(--ease);
}
.top-tools-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  text-align: left;
  white-space: nowrap;
}
.top-tools-item:hover {
  background: var(--blue-soft);
  color: var(--blue);
}
@media (max-width: 820px) {
  .top .search {
    display: none !important;
  }
  .top {
    padding: 8px 12px !important;
    gap: 7px !important;
  }
}

/* ==========================================================================
   v95 HK Pad Pro 11 (1280x800) Side-by-Side POS + Disable Pull-to-Refresh
   ========================================================================== */
html, body {
  overscroll-behavior-y: none !important;
  overscroll-behavior: none !important;
}
.app, main, .view, .pgrid, .lines, .modal {
  overscroll-behavior-y: contain;
}

/* Support 10.1" Android tablets (1280x800 @ 1.5x/2x DPR -> 600px–853px CSS width)
   with side-by-side POS billing instead of stacking Current Bill at the bottom */
@media (min-width: 600px) and (max-width: 1180px) {
  .view {
    padding: 10px 12px 76px !important;
  }
  .pos {
    display: grid !important;
    grid-template-columns: 1fr 275px !important;
    gap: 12px !important;
    align-items: start !important;
  }
  .pgrid {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)) !important;
    gap: 9px !important;
  }
  .pimg {
    height: 82px !important;
    padding: 5px !important;
  }
  .pbody {
    padding: 7px 9px 9px !important;
  }
  .pbody b,
  .prod b {
    font-size: 12.5px !important;
  }
  .pbody span,
  .prod span {
    font-size: 13.5px !important;
  }
  .cart {
    position: sticky !important;
    top: 66px !important;
    max-height: calc(100dvh - 138px) !important;
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
  }
  .cart-h {
    padding: 10px 12px !important;
  }
  .cart .lines {
    flex: 1 1 auto !important;
    max-height: none !important;
    min-height: 84px !important;
    overflow-y: auto !important;
    padding: 6px 12px !important;
  }
  .cart .totals {
    padding: 9px 12px !important;
    flex: none !important;
  }
  #pos_checkout_actions {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
    border-top: 1px solid var(--line) !important;
    padding: 9px 12px 11px !important;
    grid-template-columns: 1fr 1.4fr !important;
    gap: 8px !important;
    margin: 0 !important;
    flex: none !important;
  }
  #pos_checkout_actions .btn {
    height: 46px !important;
    min-height: 46px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
  }
  .qty button {
    width: 34px !important;
    height: 34px !important;
    font-size: 17px !important;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .pos {
    grid-template-columns: 1fr 325px !important;
  }
}

@media (min-width: 960px) and (max-width: 1180px) {
  .pos {
    grid-template-columns: 1fr 365px !important;
  }
}
