/* Shopora app styles.
   Themes: haat (default, green/turmeric), khata (red ledger), neel (indigo), raat (dark).
   Bangla text in SolaimanLipi, English and digits in Hind Siliguri. */
@font-face { font-family: 'SolaimanLipi'; src: url('../fonts/SolaimanLipi.ttf') format('truetype'); font-weight: 100 500; font-display: swap; unicode-range: U+0964-0965, U+0980-09FF, U+200C-200D, U+25CC; }
@font-face { font-family: 'SolaimanLipi'; src: url('../fonts/SolaimanLipi-Bold.ttf') format('truetype'); font-weight: 600 900; font-display: swap; unicode-range: U+0964-0965, U+0980-09FF, U+200C-200D, U+25CC; }
@font-face { font-family: 'Hind Siliguri'; src: url('../fonts/HindSiliguri-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Hind Siliguri'; src: url('../fonts/HindSiliguri-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Hind Siliguri'; src: url('../fonts/HindSiliguri-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Hind Siliguri'; src: url('../fonts/HindSiliguri-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root, [data-theme="haat"] {
  --bg: #eef1ed;          /* washed leaf grey */
  --panel: #ffffff;
  --ink: #1d2a24;
  --ink2: #4b5a53;
  --muted: #76857e;
  --line: #dde3dd;
  --line2: #c8d1ca;
  --rail: #14533f;        /* market green */
  --rail-ink: #d7e6dd;
  --rail-hi: #1e6b52;
  --pri: #14533f;
  --pri-ink: #ffffff;
  --acc: #e3a018;         /* turmeric */
  --acc-ink: #2a1e00;
  --soft: #e5efe8;
  --ok: #1d7a45; --ok-soft: #e1f2e7;
  --warn: #9a5b00; --warn-soft: #fbf0d9;
  --bad: #b3261e; --bad-soft: #fbe5e3;
  --display-bg: #0f3d2f; --display-ink: #ffd66b;
  --r: 8px;
  --focus: 0 0 0 3px rgba(227,160,24,.45);
}
[data-theme="khata"] {
  --bg: #eceef4;
  --panel: #fbfcff;
  --ink: #1c2233;
  --ink2: #48506a;
  --muted: #747c95;
  --line: #d7dcea;
  --line2: #c3cadf;
  --rail: #8c1d26;        /* ledger cloth binding */
  --rail-ink: #f3d9d9;
  --rail-hi: #a52a33;
  --pri: #2b4a8b;         /* fountain-pen ink */
  --pri-ink: #ffffff;
  --acc: #8c1d26;
  --acc-ink: #ffffff;
  --soft: #e6ebf7;
  --display-bg: #6e141c; --display-ink: #fff3e3;
  --focus: 0 0 0 3px rgba(43,74,139,.35);
}
[data-theme="neel"] {
  --bg: #eef1f5;
  --panel: #ffffff;
  --ink: #1b2433;
  --ink2: #48536a;
  --muted: #76829a;
  --line: #dbe1ea;
  --line2: #c6cfdc;
  --rail: #243b63;
  --rail-ink: #d5def0;
  --rail-hi: #304d7f;
  --pri: #243b63;
  --pri-ink: #ffffff;
  --acc: #1f8a8a;
  --acc-ink: #ffffff;
  --soft: #e5ebf5;
  --display-bg: #182a49; --display-ink: #9fe6e0;
  --focus: 0 0 0 3px rgba(31,138,138,.35);
}
[data-theme="raat"] {
  --bg: #121a17;
  --panel: #1a2420;
  --ink: #e6ece9;
  --ink2: #b8c4be;
  --muted: #8a9891;
  --line: #2a3631;
  --line2: #36443e;
  --rail: #0c1311;
  --rail-ink: #b3c2bb;
  --rail-hi: #1f2c27;
  --pri: #f0b429;
  --pri-ink: #1d1600;
  --acc: #f0b429;
  --acc-ink: #1d1600;
  --soft: #22302a;
  --ok: #5cc98a; --ok-soft: #173826;
  --warn: #f0b429; --warn-soft: #3a2e10;
  --bad: #ff8a80; --bad-soft: #3d1c1a;
  --display-bg: #000000; --display-ink: #f0b429;
  --focus: 0 0 0 3px rgba(240,180,41,.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: 'SolaimanLipi', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--pri); text-decoration-thickness: 1px; text-underline-offset: 3px; }
[data-theme="raat"] a { color: #f6cf6a; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 600; }
h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 15px; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); } .right { text-align: right; } .center { text-align: center; } .b { font-weight: 700; }
.nowrap { white-space: nowrap; } .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.due { color: var(--bad); } .grow { flex: 1; } .big { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--focus); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* shell */
.side { position: fixed; inset: 0 auto 0 0; width: 224px; background: var(--rail); color: var(--rail-ink); display: flex; flex-direction: column; z-index: 30; transition: transform .2s; }
.brand { display: flex; gap: 10px; align-items: center; padding: 14px 16px 10px; }
.brand img { width: 38px; height: 38px; object-fit: contain; background: #fff; border-radius: 9px; padding: 3px; flex: none; }
.brand b { display: block; color: #fff; font-size: 15.5px; line-height: 1.2; }
.brand small { display: block; opacity: .7; font-size: 12px; line-height: 1.3; margin-top: 2px; }
.brand .mark { width: 42px; height: 42px; border-radius: 10px; background: var(--rail); color: #fff; font-weight: 700; font-size: 22px; display: grid; place-items: center; }
.brand.big { padding: 0 0 18px; }
.brand.big b { color: var(--ink); font-size: 20px; } .brand.big small { color: var(--muted); opacity: 1; }
.side nav { padding: 2px 10px 10px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.nav-g { font-size: 12px; opacity: .6; padding: 10px 10px 2px; }
.side nav a { display: block; color: var(--rail-ink); padding: 4px 10px; border-radius: 6px; font-size: 14.5px; text-decoration: none; }
@media (min-height: 900px) { .side nav a { padding: 6px 10px; } .nav-g { padding-top: 14px; } }
.side nav a:hover { background: var(--rail-hi); color: #fff; }
.side nav a.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--acc); }
[data-theme="khata"] .side nav a.on { box-shadow: inset 3px 0 0 #f3c9cc; }
.side nav a.nav-sell { background: var(--acc); color: var(--acc-ink); font-weight: 600; margin: 4px 0 2px; text-align: center; padding: 9px 10px; }
[data-theme="khata"] .side nav a.nav-sell { background: #fff; color: var(--rail); }
.side nav a.nav-sell:hover { filter: brightness(1.05); color: var(--acc-ink); }
[data-theme="khata"] .side nav a.nav-sell:hover { color: var(--rail); }
.side-foot { padding: 6px 18px 10px; font-size: 11.5px; opacity: .55; }
.main { margin-left: 224px; min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 19px; margin: 0; font-weight: 600; }
.top .who { display: flex; flex-direction: column; text-align: right; font-weight: 500; font-size: 14px; line-height: 1.2; margin-left: 6px; }
.top .who small { color: var(--muted); font-weight: 400; }
.burger { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; padding: 2px 6px; color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); padding: 3px 11px; border-radius: 999px; font-size: 13px; color: var(--ink2); background: var(--panel); cursor: pointer; text-decoration: none; list-style: none; }
.chip:hover { background: var(--soft); text-decoration: none; }
.content { padding: 22px; flex: 1; max-width: 1480px; width: 100%; }

.theme-menu { position: relative; }
.theme-menu summary::-webkit-details-marker { display: none; }
.theme-menu .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rail); box-shadow: 4px 0 0 var(--acc); margin-right: 4px; }
.theme-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 6px; min-width: 190px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 40; }
.theme-pop a { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 14px; }
.theme-pop a:hover, .theme-pop a.on { background: var(--soft); }
.sw { display: inline-flex; border-radius: 5px; overflow: hidden; border: 1px solid rgba(0,0,0,.15); flex: none; }
.sw i { width: 14px; height: 18px; display: block; }

/* surfaces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow-x: auto; }
.card.narrow { max-width: 780px; }
.card h3 { margin-top: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-h h3 { margin: 0; }
/* lists live on a "sheet": a flat panel with the theme's colour along the top edge */
.sheet { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--rail); border-radius: 4px 4px var(--r) var(--r); overflow-x: auto; margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid2.uneven { grid-template-columns: 1.1fr .9fr; }
.grid2 > .card { margin-bottom: 0; }
.grid2 > * { min-width: 0; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.rcard { display: flex; flex-direction: column; gap: 4px; color: var(--ink); margin: 0; text-decoration: none; border-left: 3px solid var(--rail); }
.rcard:hover { border-color: var(--acc); text-decoration: none; background: var(--soft); }
.rcard span { color: var(--ink2); font-size: 14px; } .rcard small { color: var(--muted); }

/* dashboard */
.today { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding: 6px 2px 22px; border-bottom: 1px solid var(--line2); margin-bottom: 18px; }
.today-greet { margin: 0; color: var(--ink2); }
.today-amt { font-size: clamp(38px, 6vw, 60px); font-weight: 700; line-height: 1.05; letter-spacing: -.5px; font-variant-numeric: tabular-nums; color: var(--ink); margin: 4px 0; }
.today-sub { margin: 0; color: var(--ink2); }
.today-sub .up { color: var(--ok); margin-left: 8px; font-weight: 600; } .today-sub .down { color: var(--bad); margin-left: 8px; font-weight: 600; }
.today-acts { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 300px; }
.today-small { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 18px; }
.strip > * { padding: 14px 18px; border-right: 1px solid var(--line); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; }
.strip > *:last-child { border-right: 0; }
.strip a:hover { background: var(--soft); text-decoration: none; }
.strip span { font-size: 13px; color: var(--muted); }
.strip b { font-size: 22px; font-variant-numeric: tabular-nums; }
.strip small { color: var(--pri); font-size: 12.5px; }
[data-theme="raat"] .strip small { color: var(--acc); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar i { width: 100%; max-width: 40px; background: var(--line2); border-radius: 3px 3px 0 0; display: block; }
.bar.is-today i { background: var(--acc); }
.bar em { font-style: normal; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.bar span { font-size: 12px; color: var(--muted); margin-top: 5px; }
.bar.is-today span { color: var(--ink); font-weight: 600; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; font-size: 13px; color: var(--ink2); border-bottom: 2px solid var(--line2); padding: 9px 12px; white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl td { border-bottom: 1px solid var(--line); padding: 9px 12px; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td, .tbl > tr:hover td { background: var(--soft); }
.tbl tr.void td { opacity: .5; text-decoration: line-through; }
.tbl tr.void td:last-child { text-decoration: none; }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--line2); background: transparent; }
.tbl .hl td { background: var(--soft); font-size: 16px; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 30px !important; }
.scroll { overflow-x: auto; }
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; background: var(--soft); color: var(--ink2); }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.warn { background: var(--warn-soft); color: var(--warn); } .tag.bad, .tag.danger { background: var(--bad-soft); color: var(--bad); }
.pager { display: flex; gap: 4px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.pager a { padding: 4px 11px; border: 1px solid var(--line2); border-radius: 6px; background: var(--panel); text-decoration: none; }
.pager a.on { background: var(--pri); color: var(--pri-ink); border-color: var(--pri); }
.pager span { margin-left: 8px; }
.meter { display: block; height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--acc); }

/* forms */
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--ink2); min-width: 0; }
.fld > span { font-weight: 500; }
input, select, textarea { font: inherit; font-size: 15px; color: var(--ink); border: 1px solid var(--line2); border-radius: 6px; padding: 8px 10px; background: var(--panel); width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pri); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--pri); }
input[type=color] { height: 40px; padding: 3px; }
textarea { resize: vertical; }
.hint { color: var(--muted); font-size: 12.5px; }
.chk { display: inline-flex; gap: 8px; align-items: center; font-size: 14.5px; cursor: pointer; }
.form-grid, .form { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 14px; }
.form.cols4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.form.cols3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.form-grid .wide, .form .wide, .fld.wide { grid-column: 1 / -1; }
.checks, .chks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 6px 0 16px; padding: 12px 14px; background: var(--soft); border-radius: 6px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters input, .filters select { width: auto; min-width: 140px; }
.filters.flat { margin-bottom: 12px; }
.filters .fld { min-width: 160px; }
.logo-prev { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.logo-prev img { max-height: 40px; max-width: 120px; }
.inline { display: inline; }
.err { color: var(--bad); min-height: 1.2em; margin: 6px 0; font-size: 14px; }
details.inline-edit { display: inline-block; text-align: left; }
details.inline-edit[open] { display: block; padding: 12px; background: var(--soft); border-radius: 6px; margin-top: 6px; }
details.inline-edit summary, details.addbox summary { list-style: none; cursor: pointer; display: inline-flex; }
details summary::-webkit-details-marker { display: none; }
details.addbox { margin-top: 12px; } details.addbox[open] form { margin-top: 12px; }
.big-input { font-size: 26px !important; font-weight: 600; text-align: right; padding: 10px 14px !important; font-variant-numeric: tabular-nums; }

/* buttons: solid, a little "pressable" */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 14.5px; font-weight: 500; line-height: 1.2;
  padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line2); border-bottom-width: 2px; background: var(--panel); color: var(--ink); cursor: pointer;
  text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn:active { transform: translateY(1px); border-bottom-width: 1px; margin-top: 1px; }
.btn.pri { background: var(--pri); border-color: var(--pri); border-bottom-color: rgba(0,0,0,.35); color: var(--pri-ink); }
.btn.pri:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; border-bottom-color: transparent; color: var(--pri); }
[data-theme="raat"] .btn.ghost { color: var(--acc); }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: 13.5px; border-radius: 5px; }
.btn.block { width: 100%; }
.btn.big { padding: 14px 20px; font-size: 18px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.lnk { border: 0; background: none; color: var(--pri); cursor: pointer; font: inherit; padding: 0 2px; }
.btn.pay { background: var(--acc); border-color: var(--acc); border-bottom-color: rgba(0,0,0,.3); color: var(--acc-ink); font-size: 17px; font-weight: 700; padding: 12px; }
.btn.pay:hover { filter: brightness(1.05); background: var(--acc); }

/* tabs / flash */
.tabs { display: flex; gap: 2px; margin-bottom: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line2); }
.tabs a { padding: 8px 14px; color: var(--ink2); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 500; text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--rail); }
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.subtabs a { border: 1px solid var(--line2); border-radius: 999px; padding: 4px 14px; font-size: 14px; background: var(--panel); color: var(--ink2); text-decoration: none; }
.subtabs a.on { background: var(--rail); color: #fff; border-color: var(--rail); }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border-left: 4px solid; background: var(--panel); font-size: 14.5px; }
.flash.success { background: var(--ok-soft); border-color: var(--ok); }
.flash.error { background: var(--bad-soft); border-color: var(--bad); }
.flash.info { background: var(--warn-soft); border-color: var(--warn); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--panel); padding: 10px 18px; border-radius: 6px; z-index: 100; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.due-head { display: flex; justify-content: space-between; align-items: center; background: var(--soft); border-radius: 6px; padding: 12px 14px; margin-bottom: 14px; gap: 12px; }

/* login */
.login-page { background: var(--rail); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.card.login { width: 100%; max-width: 400px; padding: 28px; border: 0; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.card.login .fld { margin-bottom: 14px; }

/* invoice / purchase entry */
.inv-add { position: relative; margin: 6px 0 12px; }
.dropdown { position: absolute; left: 0; right: 0; top: 100%; z-index: 15; background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.14); max-height: 320px; overflow-y: auto; }
.dropdown:empty { display: none; }
.dropdown button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 9px 12px; font: inherit; cursor: pointer; }
.dropdown button:hover, .dropdown button.on { background: var(--soft); }
.inv-lines input.mini, input.mini, select.mini { width: 90px; text-align: right; padding: 5px 7px; }
.inv-bottom { margin-top: 16px; }
.inv-bottom h4 { margin-top: 0; }
.kvt td { padding: 7px 10px; }
#pays > div { display: flex; gap: 6px; margin-bottom: 6px; }
#pays > div select { width: 130px; }
.denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.denoms label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.denoms input { width: 70px; }

/* settings pickers */
.type-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 22px; }
.type-card { border: 1px solid var(--line2); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.type-card.on { border: 2px solid var(--rail); background: var(--soft); }
.type-card b { font-size: 18px; }
.type-card p { margin: 0; color: var(--ink2); font-size: 14px; }
.theme-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 22px; }
.theme-swatch { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; border: 1px solid var(--line2); border-radius: var(--r); padding: 10px 12px; cursor: pointer; }
.theme-swatch input { position: absolute; opacity: 0; }
.theme-swatch .sw { grid-row: span 2; } .theme-swatch .sw i { width: 18px; height: 34px; }
.theme-swatch small { color: var(--muted); font-size: 12.5px; }
.theme-swatch:has(input:checked) { border: 2px solid var(--pri); background: var(--soft); }
.theme-swatch:focus-within { box-shadow: var(--focus); }


/*  POS                                                              */

.pos-page .content { padding: 12px; max-width: none; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 12px; height: calc(100vh - 80px); }
.pos-left, .pos-right { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 0; }
.pos-search { padding: 12px 12px 8px; display: flex; gap: 8px; }
.pos-search input { font-size: 17px; padding: 11px 14px; flex: 1; }
.cats { display: flex; gap: 6px; padding: 0 12px 10px; overflow-x: auto; flex-shrink: 0; }
.cats button { border: 1px solid var(--line2); background: var(--panel); color: var(--ink2); border-radius: 999px; padding: 5px 13px; font: inherit; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.cats button.on { background: var(--rail); color: #fff; border-color: var(--rail); }
.pgrid { flex: 1; overflow-y: auto; padding: 4px 12px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-content: start; }
.pcard { border: 1px solid var(--line); border-left: 4px solid var(--line2); border-radius: 6px; background: var(--panel); color: var(--ink); padding: 9px 10px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; min-height: 92px; }
.pcard:hover, .pcard.on { border-color: var(--pri); border-left-color: var(--acc); }
.pcard b { font-size: 14px; font-weight: 600; line-height: 1.25; }
.pcard small { color: var(--muted); font-size: 12px; }
.pcard .pp { font-weight: 700; color: var(--ink); margin-top: auto; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.pcard .ps { font-size: 12px; color: var(--ok); }
.pcard.wt { border-left-color: var(--acc); }
.pcard.out .ps { color: var(--bad); } .pcard.out { opacity: .75; }
.cust { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.cust-sel { flex: 1; min-width: 0; cursor: pointer; } .cust-sel span { font-weight: 600; display: block; } .cust-sel small { color: var(--muted); }
.cart { flex: 1; overflow-y: auto; padding: 4px 8px; }
.empty-cart { color: var(--muted); text-align: center; padding: 50px 20px; }
.cl { display: grid; grid-template-columns: minmax(0, 1fr) 104px 64px 80px 24px; gap: 6px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line2); }
.cl.warn { background: var(--warn-soft); }
.cl-n b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.cl-n small { color: var(--muted); font-size: 12px; } .cl-n em { color: var(--bad); font-style: normal; }
.cl-n input.pr { width: 72px; padding: 1px 4px; font-size: 12.5px; }
.cl-q { display: flex; align-items: center; }
.cl-q button { width: 28px; height: 30px; border: 1px solid var(--line2); background: var(--soft); color: var(--ink); cursor: pointer; font-size: 16px; }
.cl-q button:first-child { border-radius: 5px 0 0 5px; } .cl-q button:last-child { border-radius: 0 5px 5px 0; }
.cl-q input.qt { width: 48px; height: 30px; text-align: center; border-radius: 0; border-left: 0; border-right: 0; padding: 2px; }
.cl-d input { padding: 4px 5px; font-size: 13px; text-align: right; }
.cl-t { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.cl-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.cl-x:hover { color: var(--bad); }
.totals { padding: 8px 14px 0; border-top: 1px solid var(--line); }
.totals > div { display: flex; justify-content: space-between; padding: 2px 0; font-size: 14.5px; color: var(--ink2); }
.totals b { font-variant-numeric: tabular-nums; color: var(--ink); }
/* the counter display, the one loud thing on screen */
.totals .grand { background: var(--display-bg); color: var(--display-ink); margin: 8px -14px 0; padding: 12px 16px; align-items: baseline; }
.totals .grand span { font-size: 15px; letter-spacing: .5px; opacity: .85; }
.totals .grand b { color: var(--display-ink); font-size: 34px; font-weight: 700; letter-spacing: .5px; line-height: 1; }
.pos-actions { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 8px; padding: 10px 12px; }
.shiftbar { font-size: 12.5px; color: var(--muted); padding: 0 12px 10px; }

dialog.dlg { border: 0; border-radius: 12px; padding: 20px; width: min(520px, 95vw); box-shadow: 0 20px 60px rgba(0,0,0,.35); background: var(--panel); color: var(--ink); }
dialog.dlg.wide { width: min(760px, 96vw); }
dialog.dlg::backdrop { background: rgba(10,20,15,.55); }
dialog.dlg h3 { display: flex; justify-content: space-between; gap: 10px; font-size: 18px; }
.paygrid { display: flex; flex-direction: column; gap: 8px; }
.payrow { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 8px; align-items: center; font-weight: 500; }
.payrow input.amt { font-size: 17px; text-align: right; font-weight: 600; }
.payrow[data-method=cash] input.amt { grid-column: span 2; }
.payrow.points { margin-top: 8px; }
.quickcash { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.quickcash button { border: 1px solid var(--line2); border-bottom-width: 2px; background: var(--soft); color: var(--ink); border-radius: 6px; padding: 6px 12px; cursor: pointer; font: inherit; font-weight: 600; }
.paysum, .done-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.paysum > div, .done-sum > div { background: var(--soft); border-radius: 6px; padding: 8px 10px; }
.paysum span, .done-sum span { display: block; font-size: 12.5px; color: var(--muted); }
.paysum b, .done-sum b { font-size: 19px; font-variant-numeric: tabular-nums; }
.done-sum .chg b { color: var(--ok); } .paysum .due b, .done-sum .due b { color: var(--bad); }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
#rcptFrame { width: 100%; height: 52vh; border: 1px solid var(--line); border-radius: 6px; background: #e8ebf0; }
.clist { max-height: 300px; overflow-y: auto; margin: 10px 0; }
.clist button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 8px 10px; font: inherit; cursor: pointer; }
.clist button:hover { background: var(--soft); } .clist small { display: block; color: var(--muted); }
.addc { margin: 8px 0; } .addc summary { cursor: pointer; color: var(--pri); }
.addc input { margin-top: 6px; } .addc .btn { margin-top: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.seg button { border: 0; background: var(--panel); color: var(--ink2); padding: 7px 14px; font: inherit; cursor: pointer; }
.seg button.on { background: var(--rail); color: #fff; }
.calc-line { font-size: 15px; color: var(--ink2); min-height: 1.4em; font-variant-numeric: tabular-nums; }

/* Mudi dokan: bigger touch targets, fewer distractions */
[data-shop="mudi"] .pgrid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
[data-shop="mudi"] .pcard { min-height: 104px; padding: 12px; }
[data-shop="mudi"] .pcard b { font-size: 16px; }
[data-shop="mudi"] .pcard .pp { font-size: 17px; }
[data-shop="mudi"] .cl-n b { font-size: 15px; }
[data-shop="mudi"] .pos-search input { font-size: 18px; }


/*  Baki khata, a ruled ledger page with a red margin line          */

.khata-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.khata-head h2 { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink2); }
.khata-total { font-size: clamp(30px, 5vw, 46px); font-weight: 700; color: var(--bad); font-variant-numeric: tabular-nums; line-height: 1.1; }
.khata-head p { margin: 2px 0 0; }
.ledger { background: var(--panel); border: 1px solid var(--line2); border-radius: 4px; position: relative; margin-bottom: 12px; }
.ledger::before { content: ''; position: absolute; top: 0; bottom: 0; left: 46px; border-left: 2px solid #e3a3a8; opacity: .8; pointer-events: none; }
[data-theme="raat"] .ledger::before { border-color: #6a2a2e; }
.ledger-row { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(130px, 1fr) 140px minmax(220px, 1.6fr); gap: 14px; align-items: center; min-height: 58px; padding: 6px 16px 6px 62px; border-bottom: 1px solid #c9d6ee; }
[data-theme="raat"] .ledger-row { border-bottom-color: var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row > span { min-width: 0; }
.ledger-row small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-row .num b { font-size: 17px; }
.ledger-th { min-height: 42px; font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 2px solid #e3a3a8; }
.ledger-row.stale { background: var(--bad-soft); }
.ledger-act { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ledger-empty { padding: 40px 62px; color: var(--ok); font-weight: 600; }


/*  Daily hisab                                                      */

.hisab { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hisab-hero { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--rail); border-radius: var(--r); padding: 18px 22px; display: flex; flex-direction: column; }
.hisab-hero.alt { border-left-color: var(--acc); }
.hisab-hero span { color: var(--ink2); }
.hisab-hero strong { font-size: clamp(30px, 4.5vw, 44px); font-variant-numeric: tabular-nums; line-height: 1.15; }
.hisab-hero em { font-style: normal; color: var(--muted); }
.hisab-cols { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.hisab-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.hisab-block h3 { border-bottom: 2px solid var(--line2); padding-bottom: 6px; }
.hl-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.hl-row b { font-variant-numeric: tabular-nums; }
.hl-row.strong { border-top: 2px solid var(--ink); border-bottom: 0; margin-top: 4px; padding-top: 7px; font-size: 16px; }
.hl-row.due b { color: var(--bad); }


/* app shell additions: search, tab bar, drawer, install */
.brand img.app-ico { background: none; padding: 0; border-radius: 9px; }
.login-logo { text-align: center; margin: 0 0 20px; }
.login-logo .wm-big { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 0 auto 6px; color: var(--ink); font-weight: 700; font-size: 38px; letter-spacing: -.6px; line-height: 1; }
.wm-big .wm-tile { width: 48px; height: 48px; border-radius: 12px; }
.wm-big .wm-tile::before { left: 6px; right: 6px; top: 6px; height: 12px; border-radius: 0 0 6px 6px; }
.wm-big .wm-tile b { font-size: 30px; padding-bottom: 4px; }
.login-logo small { color: var(--muted); }
.qsearch input { width: 260px; padding: 6px 12px; border-radius: 999px; font-size: 14px; background: var(--bg); }
.qs-btn { display: none; }
.chip.icon-only { padding: 6px; }
.side-user { display: none; }
.side-foot .lnk { color: inherit; text-decoration: underline; opacity: 1; margin-left: 6px; }
.side-shade { position: fixed; inset: 0; background: rgba(10,20,15,.45); z-index: 29; }
.tabbar { display: none; }
.netbar { position: fixed; left: 0; right: 0; top: 0; z-index: 90; background: var(--bad); color: #fff; text-align: center; font-size: 14px; padding: 6px 12px; }
.cartbar, .sheet-h { display: none; }
.q-wrap { position: relative; flex: 1; display: flex; min-width: 0; }
.q-wrap input { flex: 1; padding-right: 48px !important; min-width: 0; }
.cam-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--ink2); width: 40px; height: 40px; border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.cam-btn:hover { background: var(--soft); color: var(--ink); }
.scan-dlg { max-width: 460px; }
.scan-view { position: relative; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-view i { position: absolute; left: 12%; right: 12%; top: 34%; bottom: 34%; border: 2px solid var(--acc); border-radius: 8px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }

/* global search results */
.sr-group { margin-bottom: 18px; }
.sr-group h3 { display: flex; justify-content: space-between; align-items: baseline; }
.sr-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.sr-row:last-child { border-bottom: 0; }
.sr-row:hover { background: var(--soft); text-decoration: none; }
.sr-row small { color: var(--muted); display: block; }
.sr-row b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.alert-list { margin: 0; padding: 0; list-style: none; }
.alert-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.alert-list li:last-child { border-bottom: 0; }
.tag-exp { color: var(--bad); font-weight: 600; } .tag-soon { color: var(--warn); font-weight: 600; }


/* Shopora wordmark in type + "A product of 10SoftBD" */
.madeby { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; line-height: 1.3; }
.madeby .wm { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 17px; letter-spacing: -.2px; }
.wm-tile { position: relative; width: 24px; height: 24px; border-radius: 6px; background: #14533f; display: inline-grid; place-items: end center; overflow: hidden; font-style: normal; flex: none; }
.wm-tile::before { content: ""; position: absolute; left: 3px; right: 3px; top: 3px; height: 6px; border-radius: 0 0 3px 3px;
  background: repeating-linear-gradient(90deg, #e3a018 0 20%, #fffbef 20% 40%); }
.wm-tile b { color: #fffbef; font-size: 15px; line-height: 1; padding-bottom: 2px; font-weight: 700; }
.madeby a { color: inherit; font-weight: 600; text-decoration: none; }
.madeby a:hover { text-decoration: underline; }
.madeby.dark { color: var(--muted); } .madeby.dark .wm { color: var(--ink); }
.madeby.light { color: rgba(255,255,255,.72); } .madeby.light .wm { color: #fff; }
.madeby.light .wm-tile { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.madeby-v { opacity: .75; margin-left: 4px; }
.side-foot { opacity: 1; padding: 10px 16px 12px; border-top: 1px solid rgba(255,255,255,.1); }
.side-foot .madeby { gap: 4px 8px; }
.side-foot .madeby .wm { font-size: 15px; }
.side-foot .madeby-t { width: 100%; font-size: 11.5px; }
.app-foot { padding: 14px 22px 22px; border-top: 1px solid var(--line); margin-top: 8px; }
.app-foot .madeby { justify-content: center; }
.login-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.login-wrap > .madeby { justify-content: center; }
@media (max-width: 900px) { .app-foot { padding: 12px 14px 16px; } }
@media print { .app-foot { display: none; } }


/* v1.4: sms, bkash check, accounts, offline, bluetooth */
.copy-line { display: block; background: var(--soft); border: 1px dashed var(--line2); padding: 8px 10px; border-radius: 6px; font-size: 12.5px; word-break: break-all; margin: 6px 0 10px; user-select: all; }
.test-row { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.test-row input { flex: 1; min-width: 160px; }
.warn-card { border-left: 4px solid var(--warn); background: var(--warn-soft); }
.warn-card .tbl td { border-color: rgba(0,0,0,.06); }
.st { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 4px; background: var(--soft); color: var(--ink2); }
.st-matched, .st-applied { background: var(--ok-soft); color: var(--ok); }
.st-unmatched { background: var(--warn-soft); color: var(--warn); }
.mfs-apply { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.mfs-apply select { max-width: 220px; padding: 4px 6px; font-size: 13px; }
.subtabs .right-link { margin-left: auto; }
.statement { background: var(--panel); border: 1px solid var(--line); padding: 22px 26px; max-width: 900px; }
.statement h2 { margin: 0; }
.tbl.stmt td { padding: 6px 4px; }
.tbl.stmt tr.sub td { border-top: 1px solid var(--line2); font-weight: 600; }
.tbl.stmt tr.total td { border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); font-weight: 700; font-size: 16px; }
.tbl.stmt tr.total.neg td:last-child { color: var(--bad); }
.tbl.stmt tr.head td { padding-top: 14px; font-weight: 600; color: var(--ink2); border-bottom: 1px solid var(--line); }
.bs { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.money-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; }
.money-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.money-row small { display: block; color: var(--muted); }
.money-row b { font-size: 18px; font-variant-numeric: tabular-nums; }
a.money-row:hover { background: var(--soft); text-decoration: none; }
.money-row.total { border-bottom: 0; background: var(--soft); border-radius: 0 0 var(--r) var(--r); }
.money-row.total b { font-size: 22px; }
.off-badge { position: fixed; right: 12px; bottom: 12px; z-index: 60; border: 0; border-radius: 999px; padding: 9px 16px; font: inherit; font-size: 14px;
  background: var(--warn); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.2); cursor: pointer; }
.off-badge.bad { background: var(--bad); }
.done-sum .note { grid-column: 1 / -1; background: var(--warn-soft); }
.done-sum .note span { color: var(--warn); font-size: 13.5px; }
.bt-wrap { display: inline-flex; gap: 4px; align-items: center; }
.bt-wrap select { padding: 6px; font-size: 13px; max-width: 150px; }
@media (max-width: 900px) {
  .bs { grid-template-columns: 1fr; }
  .statement { padding: 14px; }
  .pos-page .off-badge { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media print { .no-print, .subtabs { display: none !important; } .statement { border: 0; padding: 0; } }

/* responsive */
@media (max-width: 1100px) {
  .pos { grid-template-columns: minmax(0, 1fr) 390px; }
  .cl { grid-template-columns: minmax(0, 1fr) 96px 56px 72px 20px; }
  .ledger-row { grid-template-columns: minmax(160px, 2fr) 140px minmax(200px, 1.4fr); }
  .ledger-row > span:nth-child(2) { display: none; }
}
@media (max-width: 900px) {
  .side { transform: translateX(-100%); }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .main { margin-left: 0; }
  .burger { display: block; }
  .grid2, .grid2.uneven, .hisab { grid-template-columns: 1fr; }
  .top { padding: 10px 14px; }
  .top .who { display: none; }
  .content { padding: 14px; }
  .today { grid-template-columns: 1fr; }
  .today-acts { min-width: 0; }
  .strip > * { border-right: 0; border-bottom: 1px solid var(--line); }
  .pos { grid-template-columns: 1fr; height: auto; }
  .pgrid { max-height: 42vh; }
  .cart { max-height: 50vh; }
  .payrow { grid-template-columns: 90px 1fr; }
  .payrow input.ref { grid-column: 2; }
  .ledger::before { left: 18px; }
  .ledger-row { grid-template-columns: 1fr auto; padding-left: 30px; }
  .ledger-act { grid-column: 1 / -1; justify-content: flex-start; padding-bottom: 6px; }
  .ledger-th { display: none; }
  .ledger { background-size: 100% 0; }
  .ledger-row { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .pgrid, [data-shop="mudi"] .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pcard, [data-shop="mudi"] .pcard { min-height: 88px; padding: 9px; }
  .top h1 { font-size: 16px; }
  .top .chip { padding: 3px 8px; }
  .pos-left, .pos-right { min-width: 0; }
  .card .tbl, .card.flush .tbl { display: block; overflow-x: auto; max-width: 100%; }
  .totals .grand b { font-size: 28px; }
  .cl { grid-template-columns: minmax(0, 1fr) 92px 72px 20px; }
  .cl-d { display: none; }
  .paysum, .done-sum { grid-template-columns: 1fr 1fr; }
  .filters input, .filters select { min-width: 0; width: 100%; }
  .theme-menu summary span:not(.dot) { display: none; }
  .pos-search { flex-wrap: wrap; }
  .pos-search input { flex-basis: 100%; }
}

@media (max-width: 1100px) { .qsearch input { width: 190px; } }
/* phones and small tablets: app-style shell */
@media (max-width: 900px) {
  .qsearch { display: none; }
  .qs-btn { display: inline-flex; }
  .hide-sm { display: none; }
  .side { width: min(300px, 86vw); padding-bottom: env(safe-area-inset-bottom); }
  .side nav a { padding: 9px 12px; font-size: 15.5px; }
  .side-user { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 18px; border-top: 1px solid rgba(255,255,255,.12); color: #fff; }
  .side-user small { opacity: .7; }
  .side-user a { margin-left: auto; color: #fff; }
  .top { padding-top: max(10px, env(safe-area-inset-top)); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--panel); border-top: 1px solid var(--line2); padding: 4px 4px env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(0,0,0,.06); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 56px; border: 0; background: none;
    color: var(--muted); font: inherit; font-size: 12px; text-decoration: none; cursor: pointer; border-radius: 10px; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.on { color: var(--pri); font-weight: 600; }
  [data-theme="raat"] .tabbar a.on { color: var(--acc); }
  .tabbar a.sell span { font-weight: 600; }
  .tabbar a.sell svg { background: var(--acc); color: var(--acc-ink); border-radius: 50%; padding: 6px; width: 36px; height: 36px; margin-top: -10px; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
  html.menu-open { overflow: hidden; }
  /* touch-friendly controls; 16px inputs stop iOS from zooming in */
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  .chip { min-height: 34px; }
  .dlg { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100vh - 24px); overflow-y: auto; }
  .dlg-actions { flex-wrap: wrap; }
  .dlg-actions .btn { flex: 1 1 auto; }
  /* POS on a phone: products full screen, the cart is a sheet */
  .pos-page .tabbar { display: none; }
  .pos-page { padding-bottom: 0; }
  .pos-page .content { padding: 8px; }
  .pos { display: block; height: auto; }
  .pos-left { border: 0; background: none; }
  .pos-search { padding: 0 0 8px; position: sticky; top: 56px; z-index: 5; background: var(--bg); }
  .pgrid { max-height: none; overflow: visible; padding: 0 0 90px; }
  .pos-right { display: none; }
  .cart-open .pos-left { display: none; }
  .cart-open .pos-right { display: flex; border: 0; min-height: calc(100vh - 80px); }
  .cart-open .cartbar { display: none !important; }
  .cart { max-height: none; }
  .sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .cartbar:not([hidden]) { display: flex; align-items: center; gap: 12px; position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 26;
    border: 0; border-radius: 12px; padding: 12px 16px; min-height: 58px; background: var(--display-bg); color: var(--display-ink); font: inherit; font-size: 16px; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  .cb-n { background: var(--acc); color: var(--acc-ink); border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-weight: 700; font-size: 14px; padding: 0 6px; }
  .cb-t { flex: 1; text-align: left; }
  .cartbar b { font-size: 20px; font-variant-numeric: tabular-nums; }
  .pos-actions { position: sticky; bottom: 0; background: var(--panel); padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .shiftbar { font-size: 13px; }
}
@media print { .side, .top, .toolbar, .btn { display: none !important; } .main { margin: 0; } }
.ind { padding-left: 16px; color: var(--ink2); }
