/* =========================================================
   Byabsha — app design system
   Palette: Deep Navy #0B1F3A · Emerald #10B981 · Soft White #F8FAFC · Charcoal #111827 · Amber #F59E0B
   Type: Bricolage Grotesque (headings & figures) · Figtree (text) · Anek Bangla (Bengali)
   ========================================================= */
:root {
  --navy: #0B1F3A; --navy-2: #12305a; --navy-3: #1b4479;
  --emerald: #10B981; --emerald-d: #059669; --emerald-l: #d1fae5;
  --bg: #F8FAFC; --surface: #ffffff; --surface-2: #f1f5f9;
  --text: #111827; --muted: #64748b; --line: #e2e8f0;
  --amber: #F59E0B; --amber-l: #fef3c7;
  --red: #e11d48; --red-l: #ffe4e6; --blue: #2563eb; --blue-l: #dbeafe;
  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-xl: 30px;
  --sh-1: 0 1px 2px rgba(11,31,58,.06), 0 2px 8px rgba(11,31,58,.05);
  --sh-2: 0 10px 30px -12px rgba(11,31,58,.28);
  --f-head: 'Bricolage Grotesque', 'Anek Bangla', system-ui, sans-serif;
  --f-body: 'Figtree', 'Anek Bangla', system-ui, sans-serif;
  --side-w: 260px;
}
html[lang="bn"] { --f-body: 'Anek Bangla', 'Figtree', system-ui, sans-serif; --f-head: 'Anek Bangla', 'Bricolage Grotesque', system-ui, sans-serif; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--f-body); font-size: 15.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
html[lang="bn"] body { font-size: 16.5px; }
a { color: var(--navy-3); text-decoration: none; }
a:hover { color: var(--emerald-d); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 1.65rem; font-weight: 700; } h2 { font-size: 1.3rem; font-weight: 700; } h3 { font-size: 1.08rem; font-weight: 650; }
p { margin: 0 0 .8em; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.22em; }
.num { font-family: 'Bricolage Grotesque', var(--f-body); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: .86em; } .tiny { font-size: .76em; }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.t-green { color: var(--emerald-d); } .t-red { color: var(--red); } .t-amber { color: #b45309; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt0 { margin-top: 0; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
:focus-visible { outline: 3px solid rgba(16,185,129,.55); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- app shell ---------- */
.shell { min-height: 100vh; }
.side { display: none; }
.main { padding-bottom: 96px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.topbar { position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.topbar .brand { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; flex: 1; }
.topbar .brand > span:last-child { min-width: 0; overflow: hidden; }
.topbar .brand b { display: block; }
.topbar .brand b { font-family: var(--f-head); font-size: 1.12rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .brand small { display: block; color: rgba(255,255,255,.6); font-size: .74rem; line-height: 1; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(145deg, #34d399, #059669); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 4px 12px rgba(16,185,129,.35); }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.logo-mark svg { width: 22px; height: 22px; color: #fff; }
.top-actions { margin-left: auto; flex: none; display: flex; gap: 6px; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.08); border: 0; cursor: pointer; position: relative; }
.icon-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--amber); color: var(--navy); font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 3px; }
.lang-pill { display: inline-flex; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.lang-pill a { color: rgba(255,255,255,.75); font-size: .8rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.lang-pill a.on { background: #fff; color: var(--navy); }

/* glossy hero header — the signature of the app */
.hero { background: radial-gradient(120% 140% at 85% -20%, #1f5a8f 0%, rgba(31,90,143,0) 55%), linear-gradient(160deg, var(--navy) 0%, #0e2a4f 100%);
  color: #fff; padding: 8px 0 64px; border-radius: 0 0 var(--r-xl) var(--r-xl); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 55%; background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0)); pointer-events: none; }
.hero h1 { color: #fff; font-size: 1.35rem; margin: 10px 0 2px; }
.hero .sub { color: rgba(255,255,255,.7); font-size: .92rem; }
.hero-card { margin-top: -46px; position: relative; z-index: 2; }
.wallet { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.wallet .w-item { min-width: 0; }
.wallet .w-item small { display: block; color: var(--muted); font-size: .8rem; }
.wallet .w-item b { display: block; font-family: 'Bricolage Grotesque', var(--f-body); font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.wallet .w-item.lead b { color: var(--emerald-d); }
@media (min-width: 720px) { .wallet { grid-template-columns: repeat(4, 1fr); padding: 22px 26px; } .wallet .w-item + .w-item { border-left: 1px solid var(--line); padding-left: 18px; } }

/* page head (inner pages) */
.page-head { background: var(--navy); color: #fff; padding: 6px 0 22px; border-radius: 0 0 var(--r-lg) var(--r-lg); margin-bottom: 18px; }
.page-head h1 { color: #fff; font-size: 1.3rem; margin: 0; }
.page-head .row { min-height: 44px; }
.page-head .back { color: #fff; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.page-head .sub { color: rgba(255,255,255,.65); font-size: .88rem; margin-top: 2px; }

/* ---------- tiles (PhonePe-like icon grid) ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(8, 1fr); } }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--text); font-size: .82rem; font-weight: 600; line-height: 1.2; }
html[lang="bn"] .tile { font-size: .9rem; font-weight: 500; }
.tile:hover { color: var(--text); }
.tile:hover .gl { transform: translateY(-2px); }
.gl { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; transition: transform .15s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.12), 0 8px 18px -8px var(--tone-sh, rgba(11,31,58,.5)); }
.gl::before { content: ""; position: absolute; left: -10%; right: -10%; top: -45%; height: 80%; border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0)); }
.gl .ic { width: 26px; height: 26px; position: relative; }
.gl.sm { width: 42px; height: 42px; border-radius: 13px; } .gl.sm .ic { width: 20px; height: 20px; }
.tone-emerald { background: linear-gradient(150deg, #34d399, #059669); --tone-sh: rgba(5,150,105,.6); }
.tone-green   { background: linear-gradient(150deg, #4ade80, #15803d); --tone-sh: rgba(21,128,61,.6); }
.tone-navy    { background: linear-gradient(150deg, #2b5c9a, #0B1F3A); --tone-sh: rgba(11,31,58,.6); }
.tone-blue    { background: linear-gradient(150deg, #60a5fa, #1d4ed8); --tone-sh: rgba(29,78,216,.55); }
.tone-sky     { background: linear-gradient(150deg, #38bdf8, #0369a1); --tone-sh: rgba(3,105,161,.55); }
.tone-teal    { background: linear-gradient(150deg, #2dd4bf, #0f766e); --tone-sh: rgba(15,118,110,.55); }
.tone-cyan    { background: linear-gradient(150deg, #22d3ee, #0e7490); --tone-sh: rgba(14,116,144,.55); }
.tone-indigo  { background: linear-gradient(150deg, #818cf8, #4338ca); --tone-sh: rgba(67,56,202,.55); }
.tone-violet  { background: linear-gradient(150deg, #c084fc, #7c3aed); --tone-sh: rgba(124,58,237,.55); }
.tone-pink    { background: linear-gradient(150deg, #f472b6, #be185d); --tone-sh: rgba(190,24,93,.55); }
.tone-rose    { background: linear-gradient(150deg, #fb7185, #be123c); --tone-sh: rgba(190,18,60,.55); }
.tone-orange  { background: linear-gradient(150deg, #fdba74, #ea580c); --tone-sh: rgba(234,88,12,.55); }
.tone-amber   { background: linear-gradient(150deg, #fcd34d, #d97706); --tone-sh: rgba(217,119,6,.55); }
.tone-slate   { background: linear-gradient(150deg, #94a3b8, #334155); --tone-sh: rgba(51,65,85,.55); }

/* ---------- cards & sections ---------- */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-1); padding: 18px; }
.card + .card { margin-top: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 12px; }
.card-h h2, .card-h h3 { margin: 0; }
.section { margin: 22px 0; }
.grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g-side { grid-template-columns: 1.6fr 1fr; } }

.stat { background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-1); padding: 16px; display: flex; gap: 12px; align-items: center; }
.stat small { display: block; color: var(--muted); font-size: .8rem; }
.stat b { font-family: 'Bricolage Grotesque', var(--f-body); font-size: 1.3rem; letter-spacing: -.02em; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--amber-l); color: #78350f; margin-bottom: 14px; }
.notice.info { background: var(--blue-l); color: #1e3a8a; } .notice.good { background: var(--emerald-l); color: #064e3b; } .notice.bad { background: var(--red-l); color: #881337; }
.notice .ic { margin-top: 2px; }

/* list rows (app-like) */
.list { list-style: none; margin: 0; padding: 0; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.li:last-child { border-bottom: 0; }
a.li:hover { background: var(--surface-2); color: var(--text); }
.li .meta { flex: 1; min-width: 0; }
.li .meta b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .meta small { color: var(--muted); font-size: .82rem; }
.li .amt { text-align: right; font-family: 'Bricolage Grotesque', var(--f-body); font-weight: 700; white-space: nowrap; }
.li .amt small { display: block; font-family: var(--f-body); font-weight: 500; }
.avatar { width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center; font-weight: 700; color: var(--navy); background: linear-gradient(150deg, #e0f2fe, #c7d2fe); font-family: var(--f-head); }

/* tables (become stacked cards on phones) */
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl-wrap { overflow-x: auto; }
@media (max-width: 719px) {
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl.stack td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }
  .tbl.stack td::before { content: attr(data-l); color: var(--muted); font-size: .82rem; text-align: left; }
  .tbl.stack td.first { font-weight: 650; font-size: 1rem; }
  .tbl.stack td.first::before { content: none; }
}

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label, .lbl { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 6px; color: #334155; }
.inp, select.inp, textarea.inp { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 13px; background: #fff; font: inherit; color: var(--text); transition: border-color .12s, box-shadow .12s; }
textarea.inp { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; }
.inp:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 4px rgba(16,185,129,.15); }
.inp.sm { height: 38px; border-radius: 10px; padding: 0 10px; font-size: .92rem; }
.inp-icon { position: relative; }
.inp-icon .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.inp-icon .inp { padding-left: 44px; }
.hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.err { color: var(--red); font-size: .85rem; }
.fgrid { display: grid; gap: 0 14px; }
@media (min-width: 720px) { .fgrid.c2 { grid-template-columns: 1fr 1fr; } .fgrid.c3 { grid-template-columns: repeat(3, 1fr); } .fgrid.c4 { grid-template-columns: repeat(4, 1fr); } }
.check { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.check input { width: 20px; height: 20px; accent-color: var(--emerald); }
.checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg label { padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: .88rem; color: var(--muted); cursor: pointer; }
.seg a.on, .seg input:checked + span { background: #fff; color: var(--navy); box-shadow: var(--sh-1); }
.seg input { display: none; } .seg label span { display: block; padding: 0; }
.seg label { padding: 0; } .seg label span { padding: 8px 14px; border-radius: 9px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 13px; border: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, filter .12s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(180deg, #19c58e, var(--emerald-d)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px -6px rgba(5,150,105,.65); }
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-navy { background: linear-gradient(180deg, var(--navy-3), var(--navy)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 16px -8px rgba(11,31,58,.7); }
.btn-navy:hover { color: #fff; filter: brightness(1.12); }
.btn-amber { background: linear-gradient(180deg, #fbbf24, var(--amber)); color: #3b2300; box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: #e2e8f0; color: var(--text); }
.btn-line { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn-danger { background: var(--red-l); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { height: 36px; padding: 0 13px; border-radius: 10px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn-lg { height: 54px; font-size: 1.05rem; border-radius: 15px; }
.btn-white { background: #fff; color: var(--navy); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.b-green { background: var(--emerald-l); color: #047857; } .b-amber { background: var(--amber-l); color: #92400e; }
.b-red { background: var(--red-l); color: #be123c; } .b-blue { background: var(--blue-l); color: #1d4ed8; }
.b-muted { background: var(--surface-2); color: var(--muted); } .b-navy { background: var(--navy); color: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 600; font-size: .86rem; color: var(--text); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 200px; }

/* ---------- bottom nav (phones) ---------- */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; font-weight: 600; color: var(--muted); padding: 4px 0; }
html[lang="bn"] .bnav a { font-size: .78rem; }
.bnav a .ic { width: 23px; height: 23px; }
.bnav a.on { color: var(--navy); }
.bnav a.on .ic { color: var(--emerald-d); }
.bnav .fab { margin-top: -26px; }
.bnav .fab span.gl { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--bg); }

/* ---------- desktop sidebar ---------- */
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--side-w) 1fr; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--navy); color: #fff; padding: 18px 14px; }
  .side .brand { display: flex; gap: 10px; align-items: center; color: #fff; padding: 4px 8px 18px; }
  .side .brand b { font-family: var(--f-head); font-size: 1.15rem; display: block; line-height: 1.15; }
  .side .brand small { color: rgba(255,255,255,.55); font-size: .75rem; }
  .side nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: rgba(255,255,255,.78); font-weight: 600; font-size: .93rem; }
  .side nav a .gl.sm { width: 32px; height: 32px; border-radius: 10px; } .side nav a .gl.sm .ic { width: 17px; height: 17px; }
  .side nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
  .side nav a.on { background: rgba(255,255,255,.12); color: #fff; }
  .side .side-foot { margin-top: auto; padding-top: 16px; }
  .bnav, .topbar .brand.mob, .topbar .mob-only { display: none; }
  .main { padding-bottom: 40px; min-width: 0; }
  .topbar { background: var(--navy); }
  .wrap { padding: 0 28px; }
}

/* ---------- toast / modal ---------- */
.toasts { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 440px); }
.toast { display: flex; gap: 10px; align-items: center; padding: 13px 16px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: var(--sh-2); font-weight: 600; animation: tin .25s ease-out; }
.toast.success .ic { color: #34d399; } .toast.error { background: #881337; } .toast.warn { background: #78350f; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(11,31,58,.5); display: none; align-items: flex-end; justify-content: center; padding: 0; }
.modal.open { display: flex; }
.modal .sheet { background: #fff; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); animation: up .22s ease-out; }
@media (min-width: 720px) { .modal { align-items: center; } .modal .sheet { border-radius: var(--r-lg); } }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
.sheet-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sheet-h h3 { margin: 0; }
.x { background: var(--surface-2); border: 0; width: 36px; height: 36px; border-radius: 11px; cursor: pointer; display: grid; place-items: center; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 38px 16px; color: var(--muted); }
.empty .gl { margin: 0 auto 12px; }
.empty b { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }

/* ---------- chart ---------- */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 10px; }
.bars .b { flex: 1; min-width: 4px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.bars .b i { display: block; width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #34d399, #0f766e); min-height: 2px; }
.bars .b.zero i { background: var(--line); }
.bars .b:hover i { filter: brightness(1.12); }
.bars .b .tip { position: absolute; bottom: calc(100% + 4px); background: var(--navy); color: #fff; font-size: .72rem; padding: 4px 7px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; }
.bars .b:hover .tip { opacity: 1; }
.bar-labels { display: flex; gap: 4px; margin-top: 6px; }
.bar-labels span { flex: 1; text-align: center; font-size: .66rem; color: var(--muted); overflow: hidden; white-space: nowrap; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--emerald), #0f766e); border-radius: 99px; }

.tip-li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.tip-li:last-child { border-bottom: 0; }
.tip-li .gl.sm { width: 36px; height: 36px; border-radius: 11px; } .tip-li .gl.sm .ic { width: 18px; height: 18px; }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; display: grid; background: radial-gradient(100% 70% at 80% 0%, #1f5a8f 0%, rgba(31,90,143,0) 60%), linear-gradient(170deg, var(--navy), #0a1a31 70%); }
.auth-in { width: 100%; max-width: 460px; margin: auto; padding: 28px 16px 40px; }
.auth-brand { color: #fff; text-align: center; margin-bottom: 22px; }
.auth-brand .logo-mark { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; }
.auth-brand .logo-mark svg { width: 34px; height: 34px; }
.auth-brand h1 { color: #fff; font-size: 1.6rem; margin: 0; }
.auth-brand p { color: rgba(255,255,255,.65); margin: 4px 0 0; }
.auth .card { padding: 24px 20px; border-radius: var(--r-lg); }
.auth .lang-pill { background: rgba(255,255,255,.1); }
.auth-foot { text-align: center; color: rgba(255,255,255,.7); margin-top: 18px; font-size: .92rem; }
.auth-foot a { color: #6ee7b7; font-weight: 700; }

/* ---------- landing ---------- */
.land-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; color: #fff; }
.land-hero { padding: 36px 0 70px; color: #fff; }
.land-hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.05; max-width: 15ch; letter-spacing: -.03em; }
.land-hero p { color: rgba(255,255,255,.75); max-width: 52ch; font-size: 1.08rem; }
.door { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-2); color: var(--text); }
.door:hover { color: var(--text); transform: translateY(-2px); }
.door b { display: block; font-family: var(--f-head); font-size: 1.1rem; }
.door small { color: var(--muted); }
.feat { display: flex; gap: 12px; align-items: flex-start; }
.feat b { display: block; }

/* ---------- POS ---------- */
.pos-grid { display: grid; gap: 14px; }
@media (min-width: 1024px) { .pos-grid { grid-template-columns: 1fr 360px; align-items: start; } .pos-sum { position: sticky; top: 76px; } }
.cust-box { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--emerald-l); margin-top: 10px; }
.cust-box.new { background: var(--amber-l); }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border-radius: 14px; box-shadow: var(--sh-2); z-index: 30; max-height: 320px; overflow-y: auto; display: none; }
.results.open { display: block; }
.results a { display: flex; justify-content: space-between; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.results a:hover, .results a.hl { background: var(--emerald-l); }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-row .nm { font-weight: 650; }
.cart-row .ctl { display: flex; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; align-items: flex-end; }
.cart-row .ctl > div { min-width: 0; }
.cart-row .ctl label { display: block; font-size: .72rem; color: var(--muted); margin-bottom: 2px; }
.cart-row .ctl .inp { width: 92px; }
.cart-row .ctl .inp.w-s { width: 66px; } .cart-row .ctl .inp.w-l { width: 150px; }
.cart-row .line-amt { font-family: 'Bricolage Grotesque', var(--f-body); font-weight: 700; text-align: right; }
.qty-step { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; height: 38px; }
.qty-step button { width: 34px; height: 100%; border: 0; background: var(--surface-2); cursor: pointer; font-size: 1.1rem; font-weight: 700; }
.qty-step input { width: 52px; height: 100%; border: 0; text-align: center; font: inherit; font-weight: 700; }
.sum-li { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-li.total { border-top: 2px dashed var(--line); margin-top: 6px; padding-top: 12px; font-size: 1.25rem; font-weight: 800; font-family: 'Bricolage Grotesque', var(--f-body); }

/* ---------- invoice document ---------- */
.doc { background: #fff; max-width: 820px; margin: 0 auto; padding: 32px; border-radius: var(--r); box-shadow: var(--sh-1); color: #111827; font-family: 'Figtree', 'Anek Bangla', sans-serif; font-size: 14px; }
.doc-h { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--navy); padding-bottom: 16px; margin-bottom: 16px; }
.doc-h .biz { display: flex; gap: 14px; align-items: flex-start; }
.doc-h .biz img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; }
.doc-h h2 { font-size: 1.45rem; margin: 0 0 2px; color: var(--navy); }
.doc .title { text-align: right; }
.doc .title b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.3rem; color: var(--navy); display: block; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.doc th { background: var(--navy); color: #fff; font-weight: 600; font-size: 12px; padding: 8px; text-align: left; }
.doc td { padding: 8px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.doc .r { text-align: right; }
.doc .totals { margin-left: auto; width: min(100%, 320px); }
.doc .totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.doc .totals .grand { border-top: 2px solid var(--navy); margin-top: 6px; padding-top: 8px; font-size: 1.15rem; font-weight: 800; }
.doc .foot { margin-top: 22px; padding-top: 12px; border-top: 1px dashed #cbd5e1; font-size: 12px; color: #475569; }
.doc .pin { display: inline-block; padding: 6px 12px; border: 1.5px dashed var(--emerald-d); border-radius: 10px; color: #065f46; font-weight: 700; margin-top: 8px; }
.doc.thermal { max-width: 80mm; padding: 10px; font-size: 12px; }
.doc.thermal .doc-h { flex-direction: column; text-align: center; border-bottom-width: 1px; }
.doc.thermal .doc-h .biz { flex-direction: column; align-items: center; }
.doc.thermal .title { text-align: center; }
.doc.thermal th { background: none; color: #000; border-bottom: 1px dashed #000; padding: 4px 2px; }
.doc.thermal td { padding: 4px 2px; }
.doc.thermal .hide-thermal { display: none; }
.win-pill { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 6px; margin: 2px 4px 0 0; background: #ecfdf5; color: #047857; }
.win-pill.off { background: #f1f5f9; color: #94a3b8; text-decoration: line-through; }

.pager { display: flex; gap: 6px; justify-content: center; margin: 16px 0; }
.pager a { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #fff; box-shadow: var(--sh-1); font-weight: 700; color: var(--text); }
.pager a.on { background: var(--navy); color: #fff; }

.locked { max-width: 520px; margin: 40px auto; text-align: center; }

@media print {
  body { background: #fff; }
  .no-print, .topbar, .side, .bnav, .page-head, .toasts { display: none !important; }
  .shell { display: block; }
  .doc { box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
  .doc.thermal { width: 80mm; }
  .card { box-shadow: none; border: 1px solid #e5e7eb; }
  @page { margin: 10mm; }
}

/* ================= Leads (1.3.0) ================= */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 600; font-size: .9rem; transition: all .12s; }
.pick span .ic { width: 17px; height: 17px; }
.pick input:checked + span { background: var(--emerald-l); border-color: var(--emerald); color: #065f46; box-shadow: 0 0 0 3px rgba(16,185,129,.15); }
.pick input:focus-visible + span { outline: 2px solid var(--navy-3); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: st; }
.steps form { display: contents; }
.step { position: relative; border: 0; background: var(--surface-2); color: var(--muted); border-radius: 14px; padding: 12px 6px 10px; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; text-align: center; line-height: 1.2; }
.step .ic { width: 22px; height: 22px; display: block; margin: 0 auto 4px; }
.step.done { background: var(--emerald-l); color: #047857; }
.step.on { background: var(--emerald); color: #fff; box-shadow: 0 8px 20px -8px rgba(16,185,129,.7); }
.step.on.won { background: linear-gradient(150deg, #34d399, #059669); }
.step:hover:not(.on) { background: #e2e8f0; color: var(--text); }
.story { list-style: none; margin: 0; padding: 0; position: relative; }
.story::before { content: ''; position: absolute; left: 20px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.story li { position: relative; display: flex; gap: 12px; padding: 10px 0; }
.story li .gl { flex: none; z-index: 1; }
.story li b { display: block; }
.story li small { color: var(--muted); }
.story li p { margin: 4px 0 0; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; white-space: pre-line; }
.lead-banner { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r); margin-bottom: 14px; }
.lead-banner.won { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 1px solid #a7f3d0; }
.lead-banner.lost { background: var(--surface-2); border: 1px solid var(--line); }
.lead-banner.open { background: #fffbeb; border: 1px solid #fde68a; }
.lead-banner b { font-size: 1.05rem; }
.lead-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.lead-kpis a.stat { color: inherit; }
.lead-kpis a.stat.on { outline: 2px solid var(--emerald); }
.funnel { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: flex; }
.funnel i { display: block; height: 100%; }
@media (max-width: 720px) {
  .lead-kpis { grid-template-columns: repeat(2, 1fr); }
  .steps { gap: 4px; } .step { font-size: .75rem; padding: 10px 2px 8px; }
}
.lead-li .avatar { background: var(--surface-2); }
.lead-li .meta { color: inherit; min-width: 0; }
.lead-li .meta b { white-space: normal; }
.lead-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 3px 0; }
.lead-tags .ic { width: 14px; height: 14px; vertical-align: -2px; }
.lead-last { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-act { display: flex; gap: 4px; flex: none; }
@media (max-width: 520px) { .lead-act .wa { display: none; } .lead-li .meta small { white-space: normal; } }

/* ================= Cashback at billing (1.4.0) ================= */
.cb-box { background: #fdf2f8; border: 1px solid #fbcfe8; border-radius: 14px; padding: 12px; margin: 10px 0; }
.cb-h { display: flex; align-items: center; gap: 6px; color: #9d174d; margin-bottom: 4px; }
.cb-h .ic { width: 18px; height: 18px; }
.cb-modes { margin-top: 8px; flex-wrap: wrap; }
.cb-modes label span { font-size: .78rem; padding: 7px 9px; }
.results a.add-new { color: var(--emerald-d); font-weight: 700; border-top: 1px dashed var(--line); }
.save-item { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.badge.b-amber { background: var(--amber-l); color: #92400e; }

/* ================= Brand logo (1.5.0) ================= */
.logo-mark.by { background: none; box-shadow: none; border-radius: 0; }
.logo-mark.by img { object-fit: contain; }
.auth-logo { display: block; width: min(240px, 70%); height: auto; margin: 0 auto 18px; }
.land-logo { display: block; height: 46px; width: auto; }
@media (max-width: 520px) { .land-logo { height: 36px; } }
.photo-pick { display: flex; gap: 14px; align-items: center; }
.photo-box { width: 96px; height: 96px; flex: none; border-radius: 16px; border: 2px dashed #cbd5e1; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; cursor: pointer; color: var(--muted); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box span { display: grid; place-items: center; gap: 2px; text-align: center; }
.photo-box span .ic { width: 24px; height: 24px; }
.photo-box span small { font-size: .72rem; font-weight: 600; }
.thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.results a .thumb { width: 36px; height: 36px; margin-right: 10px; }
.results a { align-items: center; }

/* ================= Bill on mobile (1.5.2) ================= */
.as-list { display: grid; gap: 0; }
.as-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.as-item:last-child { border-bottom: 0; }
.as-item > b { display: block; font-size: 1.02rem; }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.as-chips .badge { font-size: .78rem; }
.as-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.as-btns:empty { display: none; }
.doc .wins { margin-top: 2px; }
@media screen and (max-width: 600px) {
  .doc { padding: 16px 14px; font-size: 13px; }
  .doc-h { flex-direction: column; gap: 10px; }
  .doc .title { text-align: left; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
  .doc .title b { font-size: 1.05rem; width: 100%; }
  .doc-h h2 { font-size: 1.2rem; }
  .doc table { table-layout: auto; }
  .doc th, .doc td { padding: 7px 4px; }
  .doc th { font-size: 11px; }
  .doc .c-no, .doc .c-gst { display: none; }
  .doc td.r, .doc th.r { white-space: nowrap; }
  .doc .win-pill { font-size: 10.5px; margin: 3px 3px 0 0; }
  .doc .totals { width: 100%; }
}
