/* ==========================================================================
   হালখাতা — components. Colour only from tokens.css.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--sunk); color: var(--ink);
  font-family: var(--body); font-size: 15.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2.5px solid var(--carbon); outline-offset: 2px; border-radius: var(--r-1); }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i--s { width: 18px; height: 18px; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.fig { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.owe { color: var(--rani); }
.got { color: var(--paid); }
.mute { color: var(--ink-3); }

/* ==========================================================================
   Stage: a phone on a desk, with the prototype's controls beside it.
   On a phone, the app simply is the screen.
   ========================================================================== */

.stage { min-height: 100%; display: grid; place-items: center; grid-template-columns: auto; gap: 40px; padding: 28px 20px; }
.device {
  position: relative; width: 402px; height: min(868px, calc(100dvh - 56px));
  border-radius: 46px; padding: 10px; background: #0F0E14;
  box-shadow: 0 0 0 1.5px #2A2833, 0 40px 90px -40px rgba(10,8,20,.75), inset 0 0 0 1px #34313E;
}
.device::before { content: ""; position: absolute; top: 20px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 20px; background: #0F0E14; z-index: 60; }
.app { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: var(--paper); display: flex; flex-direction: column; isolation: isolate; }
@media (min-width: 900px) { .stage { grid-template-columns: auto 340px; } }
@media (max-width: 560px) {
  .stage { display: block; padding: 0; }
  .device { width: 100%; height: 100dvh; border-radius: 0; padding: 0; background: none; box-shadow: none; }
  .device::before { display: none; }
  .app { border-radius: 0; }
  .proto { display: none; }
}

.proto { align-self: center; max-width: 340px; }
.proto__eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .06em; padding: 3px 10px; border-radius: 999px; background: var(--board); color: var(--board-ink); }
.proto__title { font-family: var(--sign); font-weight: 400; font-size: 46px; line-height: 1.1; margin-top: 10px; }
.proto__lede { color: var(--ink-2); margin-top: 6px; text-wrap: pretty; }
.proto__block { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--rule-2); }
.proto__label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.proto__hint { font-size: 13.5px; color: var(--ink-3); margin-top: 10px; text-wrap: pretty; }
.proto__link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; font-weight: 600; color: var(--carbon); text-align: left; }
.proto__link:hover { text-decoration: underline; }

.switch { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 4px 16px 4px 56px; border-radius: 999px; background: var(--paid-wash); color: var(--paid); font-weight: 700; }
.switch__knob { position: absolute; left: 6px; width: 38px; height: 22px; border-radius: 999px; background: var(--paid); transition: background .2s; }
.switch__knob::after { content: ""; position: absolute; top: 3px; left: 19px; width: 16px; height: 16px; border-radius: 999px; background: #fff; transition: left .2s var(--ease); }
.switch[aria-checked="false"] { background: var(--warn-wash); color: var(--warn); }
.switch[aria-checked="false"] .switch__knob { background: var(--ink-3); }
.switch[aria-checked="false"] .switch__knob::after { left: 3px; }
.switch[aria-checked="true"] .switch__off, .switch[aria-checked="false"] .switch__on { display: none; }

/* ==========================================================================
   The app shell: signboard / screen / bottom tabs
   ========================================================================== */

/* The top bar is the shop's own signboard: marigold, hand-lettered name. */
.sign {
  flex: none; position: relative; z-index: 10;
  padding: 46px 16px 10px;
  background: var(--board); color: var(--board-ink);
  box-shadow: inset 0 -3px 0 var(--board-2);
}
@media (max-width: 560px) { .sign { padding-top: calc(env(safe-area-inset-top, 0px) + 12px); } }
.sign__row { display: flex; align-items: center; gap: 10px; }
.sign__name { flex: 1; min-width: 0; font-family: var(--sign); font-size: clamp(21px, 6.4vw, 26px); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sign__sub { font-size: 13px; font-weight: 600; margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.sign__sub > span { opacity: .8; flex: 1; min-width: 0; }
.sign__sub b { font-weight: 800; }
.sign--sub { padding-top: 46px; }
.sign__back { width: 40px; height: 40px; margin-left: -8px; display: grid; place-items: center; border-radius: 999px; }
.sign__back:hover { background: rgba(0,0,0,.06); }
.sign__title { flex: 1; min-width: 0; font-weight: 800; font-size: 18px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The sync pill is the promise made visible. It never says "all sent"
   while anything is waiting. */
.pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 12px 0 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; line-height: 1;
  background: rgba(255,255,255,.72); color: var(--board-ink);
}
.pill .i { width: 17px; height: 17px; }
.pill--ok .i { color: #11603F; }
.pill--wait { background: var(--board-ink); color: var(--board); }
.pill--spin .i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.screen { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 14px 14px 110px; scroll-padding-top: 80px; }
.screen--bill { padding-bottom: 176px; }

.nav {
  flex: none; position: relative; z-index: 20;
  display: grid; grid-template-columns: repeat(var(--tabs, 5), 1fr);
  padding: 6px 6px 18px; background: var(--leaf); box-shadow: var(--sh-bar);
}
.nav__tab { position: relative; display: grid; justify-items: center; gap: 1px; min-height: 54px; padding: 6px 2px 2px; border-radius: var(--r-3); font-size: 12.5px; font-weight: 600; color: var(--ink-3); transition: color .15s, background .15s; }
.nav__tab .i { width: 24px; height: 24px; }
.nav__tab[aria-current="page"] { color: var(--carbon); }
.nav__tab[aria-current="page"]::before { content: ""; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--carbon); }
.nav__tab[aria-current="page"] .i { stroke-width: 2.1; }
.nav__dot { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--rani); color: var(--on-rani); font-size: 11px; font-weight: 800; line-height: 18px; }

/* ==========================================================================
   Primitives
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--r-3);
  font-weight: 700; font-size: 15.5px; line-height: 1.15; text-align: center;
  background: var(--leaf); color: var(--ink); border: 1px solid var(--rule-2); box-shadow: var(--sh-1);
  transition: transform .12s var(--ease), background .15s;
  user-select: none;
}
.btn:active { transform: scale(.975); }
.btn--primary { background: var(--carbon); color: var(--on-carbon); border-color: transparent; box-shadow: 0 1px 0 rgba(0,0,0,.1), 0 12px 22px -14px var(--carbon); }
.btn--primary:hover { background: var(--carbon-press); }
.btn--owe { background: var(--rani); color: var(--on-rani); border-color: transparent; }
.btn--got { background: var(--paid); color: #fff; border-color: transparent; }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--carbon); }
.btn--quiet { background: var(--leaf-2); box-shadow: none; }
.btn--danger { color: var(--rani); }
.btn--block { width: 100%; }
.btn--big { min-height: 56px; font-size: 17px; border-radius: var(--r-4); }
.btn--s { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: var(--r-2); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.iconbtn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 999px; color: var(--ink-2); }
.iconbtn:hover { background: var(--sunk); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; }
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 15px; border-radius: 999px;
  background: var(--leaf); border: 1px solid var(--rule); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip--loose { color: var(--carbon); border: 1.5px dashed var(--carbon); background: var(--carbon-wash-2); }
.chip .n { font-size: 12px; font-weight: 800; opacity: .7; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; background: var(--sunk); border-radius: var(--r-3); }
.seg button { min-height: 44px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.seg button[aria-checked="true"] { background: var(--leaf); color: var(--ink); box-shadow: var(--sh-1); }
.seg--proto { max-width: 280px; }

.field { display: grid; gap: 6px; }
.field + .field, .field + .row2, .row2 + .field, .row2 + .row2, .field + .check, .check + .field { margin-top: 14px; }
.field__label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.field__hint { font-size: 13px; color: var(--ink-3); }
.field__err { font-size: 13px; color: var(--warn); font-weight: 700; }
.input {
  width: 100%; min-height: 50px; padding: 0 14px; background: var(--leaf); border: 1px solid var(--rule-2); border-radius: var(--r-3);
  font-size: 16.5px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--carbon); box-shadow: 0 0 0 3px var(--carbon-wash); }
.input--money { font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.input--huge { min-height: 64px; font-size: 30px; }
select.input { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 > .field + .field { margin-top: 0; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--carbon); }
.money-in { position: relative; }
.money-in::before { content: "৳"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--ink-3); font-size: 20px; }
.money-in .input { padding-left: 34px; }

.search { display: flex; align-items: center; background: var(--leaf); border: 1px solid var(--rule-2); border-radius: var(--r-4); box-shadow: var(--sh-1); }
.search:focus-within { border-color: var(--carbon); box-shadow: 0 0 0 3px var(--carbon-wash); }
.search > .i { margin-left: 14px; color: var(--ink-3); }
.search input { flex: 1; min-width: 0; min-height: 50px; padding: 0 10px; border: 0; background: transparent; outline: none; font-size: 16.5px; }

.card { background: var(--leaf); border: 1px solid var(--rule); border-radius: var(--r-4); box-shadow: var(--sh-1); }
.card--pad { padding: 16px; }
.section { margin-top: 22px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.h1 { font-weight: 800; font-size: 23px; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
.h2 { font-weight: 800; font-size: 17.5px; letter-spacing: -.01em; line-height: 1.25; }
.h3 { font-weight: 700; font-size: 15px; }
.eyebrow { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.lede { color: var(--ink-2); font-size: 15px; text-wrap: pretty; }
.small { font-size: 13px; color: var(--ink-3); }
.stack > * + * { margin-top: 12px; }
.hstack { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.link { color: var(--carbon); font-weight: 700; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }

.list { background: var(--leaf); border: 1px solid var(--rule); border-radius: var(--r-4); overflow: hidden; box-shadow: var(--sh-1); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 14px; text-align: left; border-top: 1px solid var(--rule); transition: background .12s; }
.row:first-child { border-top: 0; }
button.row:hover { background: var(--leaf-2); }
button.row:active { background: var(--sunk); }
.row__main { display: block; flex: 1; min-width: 0; }
.row__title, .row__sub, .row__amt, .row__note { display: block; }
.row__title { font-weight: 700; font-size: 15.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__sub { font-size: 13px; color: var(--ink-3); line-height: 1.4; margin-top: 1px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row__end { text-align: right; flex: none; }
.row__amt { font-weight: 800; font-size: 17.5px; line-height: 1.2; letter-spacing: -.01em; }
.row__note { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.row--void .row__title, .row--void .row__amt { text-decoration: line-through; color: var(--ink-3); }

.avatar { width: 42px; height: 42px; flex: none; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: 17px; background: var(--sunk); color: var(--ink-2); }
.avatar--owe { background: var(--rani-wash); color: var(--rani); }
.avatar--sup { background: var(--carbon-wash); color: var(--carbon); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.tag--warn { background: var(--warn-wash); color: var(--warn); }
.tag--owe { background: var(--rani-wash); color: var(--rani); }
.tag--got { background: var(--paid-wash); color: var(--paid); }
.tag--ink { background: var(--carbon-wash); color: var(--carbon); }
.tag--wait { background: var(--board); color: var(--board-ink); }

.empty { padding: 30px 18px; text-align: center; color: var(--ink-3); }
.empty .h2 { color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-3); font-size: 14px; line-height: 1.45; }
.banner .i { margin-top: 1px; }
.banner--warn { background: var(--warn-wash); color: var(--warn); }
.banner--warn b { color: var(--ink); }
.banner--ink { background: var(--carbon-wash-2); color: var(--ink-2); border: 1px solid var(--carbon-wash); }
.banner--ink .i { color: var(--carbon); }
.banner + .banner { margin-top: 8px; }

/* ==========================================================================
   বিক্রি — selling
   ========================================================================== */

.today { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 14px; border-radius: var(--r-3); background: var(--leaf); border: 1px solid var(--rule); }
.today__label { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.today__fig { font-size: 19px; }
.today__n { margin-left: auto; font-size: 13px; color: var(--ink-3); font-weight: 600; }

.sellbar { position: sticky; top: -14px; z-index: 5; margin: 0 -14px 10px; padding: 4px 14px 10px; background: var(--paper); display: grid; gap: 10px; }

.plist { background: var(--leaf); border: 1px solid var(--rule); border-radius: var(--r-4); box-shadow: var(--sh-1); overflow: hidden; }
.prod { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; width: 100%; min-height: 62px; padding: 9px 14px 9px 16px; text-align: left; border-top: 1px solid var(--rule); transition: background .12s; }
.prod:first-child { border-top: 0; }
.prod:hover { background: var(--leaf-2); }
.prod:active { background: var(--carbon-wash-2); }
.prod__name { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.prod__meta { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.prod__price { grid-row: 1 / span 2; grid-column: 2; font-weight: 800; font-size: 18px; text-align: right; line-height: 1.1; letter-spacing: -.01em; }
.prod__per { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.prod--in::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--carbon); }
.prod__qty { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--carbon); color: var(--on-carbon); font-weight: 800; font-size: 12.5px; }
.low { color: var(--warn); font-weight: 700; }
.out { color: var(--rani); font-weight: 700; }
.bump { animation: bump .35s var(--ease-out); }
@keyframes bump { 40% { background: var(--carbon-wash); } }

.billbar {
  position: absolute; left: 10px; right: 10px; bottom: 88px; z-index: 25;
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 8px 8px 16px;
  background: var(--ink); color: var(--paper); border-radius: var(--r-4); box-shadow: var(--sh-3);
  animation: rise .3s var(--ease-out); text-align: left;
}
.billbar__count { font-size: 12.5px; opacity: .75; font-weight: 600; }
.billbar__total { font-weight: 800; font-size: 22px; line-height: 1.1; letter-spacing: -.01em; }
.billbar__go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: var(--r-3); background: var(--board); color: var(--board-ink); font-weight: 800; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }

/* the bill, inside its sheet — a cash memo */
.memo { background: var(--leaf); border: 1px solid var(--rule); border-radius: var(--r-3); padding: 4px 14px; box-shadow: var(--sh-1); }
.cline { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-top: 1px dashed var(--rule-2); }
.cline:first-child { border-top: 0; }
.cline__name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.cline__amt { font-weight: 800; font-size: 17px; text-align: right; }
.cline__ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.cline__price { font-size: 13px; color: var(--ink-3); margin-left: auto; }
.step { display: inline-flex; align-items: center; background: var(--leaf-2); border: 1px solid var(--rule); border-radius: 999px; }
.step button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; color: var(--ink-2); }
.step button:active { background: var(--sunk); }
.step__v { min-width: 82px; padding: 0 4px; text-align: center; font-weight: 700; font-size: 14.5px; border-radius: 8px; min-height: 36px; }
.step__v:hover { background: var(--sunk); }

.totals { display: grid; gap: 4px; padding: 12px 2px 4px; }
.totals__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; color: var(--ink-2); }
.totals__big { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--ink); font-weight: 800; font-size: 16px; }
.totals__big .fig { font-size: 30px; letter-spacing: -.02em; }

.outcome { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-3); font-weight: 700; margin-top: 12px; }
.outcome .fig { font-size: 22px; }
.outcome--change { background: var(--paid-wash); color: var(--paid); }
.outcome--owe { background: var(--rani-wash); color: var(--rani); }
.outcome--even { background: var(--sunk); color: var(--ink-2); }
.outcome--need { background: var(--warn-wash); color: var(--warn); }

.picker { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 1px solid var(--rule-2); border-radius: var(--r-3); background: var(--leaf); text-align: left; }
.picker--set { border-color: var(--rani); background: var(--rani-wash); }

/* ==========================================================================
   Sheets — inside the phone, not over the whole page
   ========================================================================== */

.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(15,13,24,.5); animation: fade .2s var(--ease); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92%; display: flex; flex-direction: column; background: var(--paper); border-radius: var(--r-5) var(--r-5) 0 0; box-shadow: var(--sh-3); animation: sheetup .34s var(--ease-out); }
.sheet--full { top: 36px; max-height: none; }
@keyframes sheetup { from { transform: translateY(48px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet__head { position: relative; display: flex; align-items: center; gap: 8px; padding: 18px 10px 10px 18px; }
.sheet__head::before { content: ""; position: absolute; left: 50%; top: 7px; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--rule-2); }
.sheet__title { flex: 1; font-weight: 800; font-size: 18.5px; line-height: 1.25; }
.sheet__body { padding: 4px 18px 18px; overflow-y: auto; overflow-x: hidden; flex: 1; overscroll-behavior: contain; }
.sheet__foot { padding: 12px 18px 22px; background: var(--leaf); border-top: 1px solid var(--rule); display: grid; gap: 8px; }

.toast { position: absolute; left: 50%; bottom: 100px; z-index: 80; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; width: max-content; max-width: calc(100% - 28px); padding: 11px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 14px; box-shadow: var(--sh-3); transition: opacity .2s, transform .25s var(--ease-out); display: flex; align-items: center; gap: 10px; }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .i { color: var(--board); }
.toast button { color: var(--board); font-weight: 800; text-decoration: underline; }

/* ==========================================================================
   বাকি — the khata
   ========================================================================== */

.hero { position: relative; padding: 16px; border-radius: var(--r-5); background: var(--leaf); border: 1px solid var(--rule); box-shadow: var(--sh-2); }
.hero__label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.hero__fig { font-weight: 800; font-size: 38px; line-height: 1.1; letter-spacing: -.03em; margin-top: 2px; }
.hero__sub { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }
.hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* The customer's page in the khata: the columns the owner already reads —
   তারিখ | বিবরণ | দিলাম | পেলাম | বাকি. The memo's printed box, ruled. */
.ledger { background: var(--leaf); border: 1px solid var(--rule); border-radius: var(--r-4); overflow: hidden; box-shadow: var(--sh-1); }
.ledger__head, .ledger__row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 11px 14px; }
.ledger__head { font-size: 11.5px; font-weight: 800; color: var(--ink-3); background: var(--leaf-2); border-bottom: 2px solid var(--ink); padding-top: 9px; padding-bottom: 8px; }
.ledger__row { border-top: 1px solid var(--rule); font-size: 14px; }
.ledger__head + .ledger__row { border-top: 0; }
button.ledger__row { width: 100%; text-align: left; }
button.ledger__row:hover { background: var(--leaf-2); }
.ledger__date { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; padding-top: 2px; }
.ledger__what { line-height: 1.35; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger__what small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.ledger__money { text-align: right; font-variant-numeric: tabular-nums; }
.ledger__amt { display: block; font-weight: 800; font-size: 15px; }
.ledger__bal { display: block; font-size: 12.5px; color: var(--ink-3); }
.ledger__head .ledger__money { font-size: 11.5px; }
.ledger__row--void { opacity: .5; }
.ledger__row--void .ledger__what { text-decoration: line-through; }
.ledger__row--new { animation: bump .8s var(--ease-out); }

.acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.act { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 72px; padding: 8px 4px; border-radius: var(--r-3); background: var(--leaf); border: 1px solid var(--rule); font-size: 12.5px; font-weight: 700; color: var(--ink-2); box-shadow: var(--sh-1); }
.act .i { color: var(--carbon); }
.act--owe .i { color: var(--rani); }
.act--got .i { color: var(--paid); }

/* ==========================================================================
   হিসাব — reports
   ========================================================================== */

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { padding: 13px 14px 12px; border-radius: var(--r-4); background: var(--leaf); border: 1px solid var(--rule); box-shadow: var(--sh-1); min-width: 0; }
.kpi__label { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.kpi__fig { font-weight: 800; font-size: 23px; line-height: 1.2; letter-spacing: -.02em; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi__sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.kpi--wide { grid-column: 1 / -1; }
.kpi--sign { background: var(--board); border-color: var(--board-2); color: var(--board-ink); }
.kpi--sign .kpi__label, .kpi--sign .kpi__sub { color: var(--board-ink); opacity: .75; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding-top: 8px; }
.bars__b { flex: 1; min-width: 3px; border-radius: 3px 3px 1px 1px; background: var(--carbon-wash); }
.bars__b--today { background: var(--carbon); }
.bars__axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); padding-top: 6px; }

.meter { height: 10px; border-radius: 999px; background: var(--sunk); overflow: hidden; display: flex; margin: 10px 0 8px; }
.meter > span { display: block; height: 100%; }

.cashbox__line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-2); padding: 3px 0; }
.cashbox__line .fig { color: var(--ink); font-weight: 700; }
.cashbox__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; margin-top: 6px; border-top: 2px solid var(--ink); font-weight: 800; }
.cashbox__total .fig { font-size: 26px; }

/* ==========================================================================
   Receipt — on screen, as it will print on a 58 mm roll
   ========================================================================== */

.receipt { background: #fff; color: #17151F; border-radius: var(--r-1); padding: 16px 16px 22px; font-size: 13.5px; position: relative; box-shadow: var(--sh-2); }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 8px; background: radial-gradient(circle at 6px 0, #fff 5px, transparent 5.5px) 0 0 / 12px 8px repeat-x; }
.receipt__shop { text-align: center; font-family: var(--sign); font-size: 22px; line-height: 1.2; }
.receipt__meta { text-align: center; font-size: 12px; color: #625E73; }
.receipt__rule { border: 0; border-top: 1px dashed #C8C6D3; margin: 9px 0; }
.receipt__line { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.receipt__line small { display: block; color: #625E73; font-size: 11.5px; }
.receipt__total { font-weight: 800; font-size: 15px; }
.receipt__foot { text-align: center; font-size: 12px; color: #625E73; margin-top: 10px; }
.done { display: grid; justify-items: center; gap: 4px; text-align: center; margin: 4px 0 16px; }
.done__tick { width: 58px; height: 58px; border-radius: 999px; display: grid; place-items: center; background: var(--paid-wash); color: var(--paid); animation: pop .42s var(--ease-out); }
.done__tick .i { width: 30px; height: 30px; stroke-width: 2.3; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.07); } }

.enter > * { animation: rowin .3s var(--ease-out) both; }
.enter > *:nth-child(2) { animation-delay: .02s; } .enter > *:nth-child(3) { animation-delay: .04s; }
.enter > *:nth-child(4) { animation-delay: .06s; } .enter > *:nth-child(5) { animation-delay: .08s; }
.enter > *:nth-child(n+6) { animation-delay: .1s; }
@keyframes rowin { from { opacity: 0; transform: translateY(5px); } }

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

/* the owner's nudge on the sale screen: what is about to run out */
.nudge { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: -4px 0 12px; padding: 8px 12px; border-radius: var(--r-3); background: var(--warn-wash); color: var(--warn); font-size: 13.5px; font-weight: 600; text-align: left; }
.nudge b { color: var(--ink); }
.nudge .i { flex: none; }

/* sign-in: the shop's signboard is blank until the shop signs in */
.login { position: absolute; inset: 0; z-index: 70; display: flex; flex-direction: column; background: var(--paper); overflow-y: auto; }
.login .sign { padding-bottom: 26px; }
.login__word { font-family: var(--sign); font-size: 44px; line-height: 1.1; }
.login__tag { font-size: 14px; font-weight: 600; opacity: .8; }
.login__body { padding: 20px 18px 30px; }
.login__promise { display: grid; gap: 10px; margin-top: 22px; }
.login__promise p { display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); }
.login__promise .i { color: var(--paid); }
