/* =====================================================================
   Smart Shop — UI Pro (v3) · design-only layer
   Loaded AFTER style.css. Only visual rules: no IDs/classes renamed,
   no layout used by app.js removed. Delete this file's <link> to revert.
   Brand: pink #E2136E · ink header · Premium 4 logo (gold ring)
   ===================================================================== */
:root {
  --pk: #e2136e; --pk-deep: #c40e63; --pk-dark: #8f0a47; --pk-bright: #f2498f;
  --pk-soft: #fde8f1; --pk-pale: #fff6fa;
  --gold: #d4af37;
  --amber-deep: #c2700a; --amber-soft: #fff3df;
  --red-soft: #ffe9ea; --grn-soft: #dff6ec; --blu-soft: #e4effe; --vio-soft: #efe9fd;
  --ink: #15171d; --ink-2: #3a3f4a; --muted: #646a77; /* 4.9:1 on white — WCAG AA */
  --line: #eee9f0; --line-2: #f5f1f6;
  --bg: #f5f3f7; --card: #ffffff; --field: #f8f6fa;
  --radius: 20px; --r-sm: 12px; --r-md: 16px;
  --shadow-sm: 0 1px 2px rgba(20,23,30,.05);
  --shadow: 0 1px 2px rgba(20,23,30,.04), 0 10px 28px -14px rgba(20,23,30,.16);
  --shadow-lg: 0 24px 60px -18px rgba(60,8,36,.35);
  --shadow-pk: 0 10px 24px -8px rgba(226,19,110,.55);
  --grad-pk: linear-gradient(135deg, #e8287c 0%, var(--pk) 40%, var(--pk-deep) 100%);
  --grad-ink: linear-gradient(165deg, #262a33 0%, #15171c 55%, #0b0c0f 100%);
  --nav-h: 66px;
  --nav-gap: 10px;
}

/* ---------- canvas ---------- */
body { background: var(--bg); padding-bottom: calc(var(--nav-h) + var(--nav-gap) + 24px + env(safe-area-inset-bottom)); }
#app { background: var(--bg); }
.view, #view-home { background: transparent; padding: 18px 16px 24px; }
::selection { background: var(--pk-soft); color: var(--pk-dark); }

/* ---------- header ---------- */
.topbar {
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 18px 38px;
  background:
    radial-gradient(220px 140px at 0% 0%, rgba(226,19,110,.38), transparent 70%),
    radial-gradient(200px 120px at 100% 10%, rgba(212,175,55,.12), transparent 70%),
    var(--grad-ink);
  box-shadow: none;
}
.topbar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 16px 16px; mask-image: linear-gradient(180deg, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.topbar::after { height: 24px; background: var(--bg); border-radius: 24px 24px 0 0; }
.brand { gap: 13px; }
.logo-img img { width: 48px; height: 48px; border-radius: 15px; box-shadow: 0 0 0 1.5px rgba(212,175,55,.7), 0 8px 20px rgba(0,0,0,.45); }
.logo-img { box-shadow: none; border-radius: 15px; }
.greet { color: #ff9cc6; font-size: 12px; font-weight: 600; letter-spacing: .2px; margin: 0 0 1px; }
.topbar h1 { font-size: 21px; font-weight: 700; line-height: 1.25; }
.subtitle { opacity: 1; color: rgba(255,255,255,.74); font-size: 10.5px; letter-spacing: 2px; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.subtitle .pill { letter-spacing: .3px; text-transform: none; background: rgba(255,255,255,.12); color: #fff; }
.topbar .icon-btn {
  width: 42px; height: 42px; border-radius: 14px; font-size: 18px;
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.net-dot.on { background: #3ee0a1; box-shadow: 0 0 0 3px rgba(62,224,161,.18); }

/* ---------- generic icon buttons (search mic etc.) ---------- */
.icon-btn { border-radius: 14px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.search-row .icon-btn { width: 50px; height: 50px; }

/* ---------- section headings ---------- */
.sec { margin-top: 26px; }
.sec-head { margin-bottom: 12px; }
.sec-head h2, .card h2, .cta-card h2 { color: var(--ink); letter-spacing: .1px; }
.sec-head h2 { font-size: 16.5px; margin: 0; }
.link-btn {
  color: var(--pk-deep); font-size: 13px; padding: 8px 14px; min-height: 36px; border-radius: 999px;
  background: var(--pk-soft); transition: background .15s;
}
.link-btn:active { background: #fbd3e5; }
.lock-box .link-btn { background: rgba(255,255,255,.14); }

/* ---------- home stats: clean white KPI cards ---------- */
.home-stats { margin-top: -20px; gap: 12px; }
.alert-banner:not(.hidden) ~ .home-stats { margin-top: 0; }
#view-home > .alert-banner { position: relative; z-index: 3; margin-top: -14px; }
.home-stats .stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 15px 14px; box-shadow: var(--shadow); min-height: 124px;
  display: flex; flex-direction: column;
}
.home-stats .stat::after {
  top: auto; bottom: -46px; right: -36px; width: 120px; height: 120px;
  background: var(--glow); opacity: .45; filter: blur(34px);
}
.home-stats .stat-ic { width: 40px; height: 40px; border-radius: 13px; font-size: 19px; box-shadow: 0 6px 14px -4px var(--tsh); }
.home-stats .stat-num { color: var(--ink); font-size: 25px; margin-top: auto; padding-top: 12px; letter-spacing: -.2px; }
.home-stats .stat-lb { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
#statAlerts { color: var(--amber-deep) !important; }

/* ---------- quick actions ---------- */
.qa-grid { gap: 10px; margin-top: 14px; grid-template-columns: repeat(5, 1fr); }
.qa {
  border-radius: 18px; border: 1px solid var(--line); background: var(--card);
  box-shadow: var(--shadow); font-size: 12px; font-weight: 700; color: var(--ink-2);
  min-height: 92px; gap: 8px; padding: 14px 4px 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.qa .qi { width: 46px; height: 46px; border-radius: 15px; font-size: 21px; box-shadow: none; }

/* ---------- surfaces ---------- */
.card, .group, .cta-card, .tile, .stat-card, .pcard {
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.card { border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card h2 { font-size: 16px; margin-bottom: 12px; }
.card h2::before, .sec-head h2::before {
  content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--grad-pk); flex-shrink: 0;
}
.card-head { margin-bottom: 12px; gap: 10px; }
.card .muted { line-height: 1.6; }
.group { border-radius: var(--radius); }
.group .mini-row { padding: 14px 16px; border-bottom-color: var(--line-2); }
.group .empty-note { padding: 24px 16px; font-size: 13px; }
.row.sum-row { padding: 16px; border-bottom-color: var(--line-2); background: linear-gradient(180deg, var(--pk-pale), transparent); }
.row.sum-row .v1.big { font-size: 22px; }

/* ---------- lists ---------- */
.mini-list { gap: 8px; }
.mini-row { background: var(--field); border: 1px solid var(--line-2); border-radius: 16px; padding: 11px 12px; }
.mini-row img { border-radius: 14px; width: 46px; height: 46px; box-shadow: none; border: 1px solid var(--line); }
.mini-row .t1 { color: var(--ink); }
.empty-note { color: var(--muted); }
.pill { padding: 4px 10px; font-size: 11px; letter-spacing: .1px; }
.pill.red { background: #ffe8ea; color: #c4262e; }
.pill.orange { background: #ffeedd; color: #c2540a; }
.pill.yellow { background: #fff6d6; color: #9a6a00; }
.pill.green { background: #dcf6ea; color: #047a4f; }
.pill.blue { background: #e1edff; color: #1d5fd8; }
.pill.gray { background: #f0eef3; color: var(--muted); }

/* ---------- CTA / tiles / promo ---------- */
.cta-card {
  border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden;
  background: radial-gradient(180px 120px at 100% 0%, rgba(226,19,110,.10), transparent 70%), var(--card);
}
.cta-card h2 { font-size: 16.5px; margin: 0; }
.cta-card p { line-height: 1.6; }
.tiles { gap: 12px; }
.tile { border-radius: var(--radius); padding: 16px; transition: transform .15s ease; }
.tile .ti { width: 46px; height: 46px; border-radius: 15px; }
.tile .tt { color: var(--ink); }
.tile .td { line-height: 1.5; }
.tile .bdg { background: var(--pk); box-shadow: 0 4px 10px -2px rgba(226,19,110,.5); }
.qa:active, .tile:active, .pcard:active { transform: scale(.97); }
#view-home .promo-card {
  border-radius: 24px; padding: 22px 20px;
  background:
    radial-gradient(240px 160px at 100% 0%, rgba(226,19,110,.55), transparent 65%),
    radial-gradient(200px 140px at 0% 100%, rgba(212,175,55,.18), transparent 70%),
    var(--grad-ink);
  border: 1px solid rgba(212,175,55,.28);
  box-shadow: 0 20px 40px -18px rgba(20,23,30,.6);
}
#view-home .promo-card::after { opacity: .12; font-size: 96px; right: 6px; top: 2px; }
#view-home .promo-card h2 { font-size: 17.5px; line-height: 1.45; }
#view-home .promo-card p { color: rgba(255,255,255,.78); line-height: 1.6; }
.btn-white { background: #fff; color: var(--pk-deep); box-shadow: 0 8px 18px -6px rgba(0,0,0,.4); }

/* ---------- KPI cards on other pages ---------- */
.stats-grid { gap: 12px; }
.stat-card { border-radius: var(--radius); padding: 15px 14px; gap: 8px; }
.stat-top { gap: 10px; }
.stat-icon { width: 42px; height: 42px; border-radius: 13px; font-size: 19px; }
.stat-card .stat-num { font-size: 21px; color: var(--ink); }
.stat-card.warn .stat-num { color: var(--amber-deep); }
.stat-label { font-size: 12px; font-weight: 600; }

/* ---------- alert banner ---------- */
.alert-banner { border-radius: 18px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; border-width: 1px; box-shadow: 0 10px 24px -14px rgba(194,112,10,.5); }
.alert-banner::before { width: 40px; height: 40px; border-radius: 13px; font-size: 20px; }

/* ---------- inputs ---------- */
.input, .price-input, select.input {
  background-color: var(--field); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 13px 15px; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: #7c828e; opacity: 1; }
.input:focus, .price-input:focus { background-color: var(--card); border-color: var(--pk); box-shadow: 0 0 0 4px rgba(226,19,110,.12); }
.field > span { font-size: 12.5px; color: var(--ink-2); letter-spacing: .1px; }
.form-grid { gap: 14px; }

/* ---------- buttons ---------- */
.btn { border-radius: 14px; padding: 14px 16px; letter-spacing: .1px; transition: transform .12s ease, box-shadow .15s ease, filter .15s; }
.btn-primary, .btn-pk {
  background: var(--grad-pk); color: #fff; box-shadow: var(--shadow-pk), inset 0 1px 0 rgba(255,255,255,.22);
  text-shadow: none;
}
.btn-primary:active, .btn-pk:active { filter: brightness(.95); }
.btn-outline { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-outline:active { background: var(--field); }
.btn-danger { background: linear-gradient(135deg, #f0525a, #c4262e); box-shadow: 0 10px 22px -8px rgba(196,38,46,.55); }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 12px; }
.sell-btn { background: var(--grad-pk); border-radius: 12px; padding: 10px 0; box-shadow: 0 8px 16px -8px rgba(226,19,110,.7); }
.qty-btn { background: var(--grad-pk); box-shadow: var(--shadow-pk); }
.danger-zone { border: 1.5px solid #ffd3d6; background: linear-gradient(180deg, #fff7f7, var(--card) 60%); }

/* ---------- chips & segmented tabs ---------- */
.chip-row { gap: 8px; padding: 2px 2px 14px; }
.chip { background: var(--card); border: 1.5px solid var(--line); color: var(--ink-2); padding: 8px 16px; box-shadow: var(--shadow-sm); }
.chip.active { background: var(--grad-pk); border-color: transparent; color: #fff; box-shadow: 0 8px 16px -8px rgba(226,19,110,.7); }
.seg-tabs { background: #ece7ee; border-radius: 16px; padding: 4px; box-shadow: none; margin-bottom: 16px; }
.seg-btn { border-radius: 12px; color: var(--muted); }
.seg-btn.active { background: var(--card); color: var(--pk-deep); box-shadow: 0 4px 12px -4px rgba(20,23,30,.18); }

/* ---------- products ---------- */
.product-grid { gap: 12px; }
.pcard { border-radius: var(--radius); }
.pcard .pimg { height: 124px; background: var(--field); }
.pcard .pbody { padding: 11px 12px 12px; }
.pcard .pname { color: var(--ink); }
.pcard .pprice { background: var(--grn-soft); color: #047a4f; padding: 3px 10px; font-size: 14.5px; }
.empty { padding: 56px 20px; }
.empty-icon { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 30px; display: flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 48px; filter: none; }
.empty p { font-weight: 600; color: var(--ink-2); margin: 0 0 16px; }

/* ---------- expiry ---------- */
.exp-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.exp-group > h3 { margin: 0 0 8px; font-size: 15px; }
.exp-count { background: var(--pk-soft); color: var(--pk-deep); font-size: 12px; padding: 2px 10px; }
.exp-group .empty-note { padding: 8px; text-align: left; }

/* ---------- charts ---------- */
.vbar { border-radius: 10px 10px 4px 4px; }
.hbar-track { background: #f1edf3; }

/* ---------- dues ---------- */
.due-avatar { background: var(--grad-pk); border-radius: 15px; }
.due-home-stat, .price-edit, .stock-ctl, .perm-check { background: var(--pk-pale); border: 1px solid #f7e1ec; }
.due-balance-card { border-radius: var(--radius); border-width: 1px; }
.txn-ico { border-radius: 13px; box-shadow: none; }

/* ---------- settings switch ---------- */
.switch .slider { background: #e3dfe7; }
.switch input:checked + .slider { background: var(--grad-pk); }

/* ---------- bottom nav: floating bar ---------- */
.bottomnav {
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-gap) + env(safe-area-inset-bottom));
  width: calc(100% - 24px); max-width: 496px;
  height: var(--nav-h); padding: 0 6px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(20,23,30,.06); border-radius: 24px;
  box-shadow: 0 18px 40px -16px rgba(20,23,30,.35), 0 2px 6px rgba(20,23,30,.05);
}
.nav-btn { color: #646a77; font-size: 11.5px; gap: 2px; }
.nav-btn .nav-ico { opacity: 1; display: flex; align-items: center; justify-content: center; width: 44px; height: 30px; border-radius: 999px; transition: background .2s, color .2s, transform .2s; }
.nav-ico svg { width: 22px; height: 22px; }
.nav-btn.active { color: var(--pk-deep); }
.nav-btn.active .nav-ico { background: var(--pk-soft); transform: none; }
.nav-fab {
  position: relative; top: -16px; left: auto; bottom: auto; transform: none; align-self: center;
  width: 58px; height: 58px; margin: 0 6px; flex: 0 0 auto;
  background: var(--grad-pk); border: 4px solid var(--bg);
  box-shadow: 0 12px 24px -6px rgba(226,19,110,.65);
}
.nav-fab::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(212,175,55,.35); pointer-events: none; }
.nav-fab:active { transform: scale(.94); }
.badge { top: 4px; right: calc(50% - 24px); background: var(--pk); border-color: #fff; box-shadow: 0 4px 10px -2px rgba(226,19,110,.6); }

/* ---------- toast ---------- */
.toast { bottom: calc(var(--nav-h) + var(--nav-gap) + 26px + env(safe-area-inset-bottom)); background: var(--ink); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 12px 18px; box-shadow: 0 16px 32px -12px rgba(20,23,30,.6); }

/* ---------- modal sheets ---------- */
.modal { background: rgba(18,10,16,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-sheet { border-radius: 28px 28px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); }
.modal-sheet::before { width: 40px; height: 5px; background: #e6dde6; margin: 2px auto 10px; }
.modal-head { position: sticky; top: -10px; z-index: 3; background: inherit; margin: 0 -18px 14px; padding: 8px 18px 12px; border-bottom: 1px solid var(--line-2); }
.modal-sheet { background: var(--card); }
.modal-head h2 { font-size: 18px; color: var(--ink); }
.modal-head .icon-btn { width: 44px; height: 44px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); font-size: 15px; }
.photo-picker { border-radius: 18px; border: 2px dashed #f1c4d9; background: radial-gradient(160px 100px at 50% 40%, #fff, var(--pk-pale)); }
.kv { border-bottom-color: var(--line-2); padding: 11px 2px; }
.detail-photo { border-radius: 18px; }
.sell-total b { background: var(--grad-pk); border-radius: 14px; padding: 6px 18px; box-shadow: var(--shadow-pk); }
.qty-num { color: var(--ink); }

/* ---------- auth / lock / splash ---------- */
.lock-screen, #bootSplash {
  background:
    radial-gradient(340px 240px at 100% 0%, rgba(255,255,255,.18), transparent 65%),
    radial-gradient(320px 260px at 0% 100%, rgba(212,175,55,.16), transparent 70%),
    linear-gradient(160deg, #f0408b 0%, var(--pk) 38%, var(--pk-deep) 70%, var(--pk-dark) 100%);
}
.bs-logo, .auth-logo {
  background: url("icons/icon-512.webp") center / cover no-repeat;
  box-shadow: 0 0 0 1.5px rgba(212,175,55,.75), 0 16px 32px -10px rgba(0,0,0,.55);
}
.bs-logo svg, .auth-logo svg { display: none; }
.bs-logo { width: 80px; height: 80px; border-radius: 24px; }
.auth-logo { width: 72px; height: 72px; border-radius: 22px; margin-bottom: 14px; }
.auth-card {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.26);
  border-radius: 28px; padding: 30px 22px 22px;
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 30px 60px -24px rgba(60,0,30,.65), inset 0 1px 0 rgba(255,255,255,.25);
}
.auth-title { font-size: 32px; letter-spacing: .2px; }
.auth-feats { gap: 8px; }
.auth-feat { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 10px 12px; align-items: center; }
.af-ic { width: 34px; height: 34px; border-radius: 11px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.auth-gbtn { border-radius: 16px; padding: 15px; box-shadow: 0 14px 28px -12px rgba(0,0,0,.5); }
.auth-skip { border-radius: 16px; border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.06); }
.logo.lg { width: 84px; height: 84px; border-radius: 26px; margin: 0 auto; background: url("icons/icon-512.webp") center / cover no-repeat; border: none; box-shadow: 0 0 0 1.5px rgba(212,175,55,.75), 0 16px 32px -10px rgba(0,0,0,.55); }
.logo.lg svg { display: none; }
.pin-key { border-radius: 18px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.lock-user { border-radius: 16px; }

/* ---------- chat & tutorials ---------- */
.chat-msgs { background: var(--field); }
.chat-msg { border-radius: 16px 16px 16px 6px; box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); }
.chat-msg.mine { border-radius: 16px 16px 6px 16px; background: var(--pk-soft); border-color: #f8d6e6; }
.chat-input-row { border-top: 1px solid var(--line-2); background: var(--card); }
.tut-item { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }

/* ---------- desktop & tablet ---------- */
@media (min-width: 700px) {
  .view, #view-home { padding: 26px 30px 30px; }
  .bottomnav { max-width: 680px; }
  .modal-sheet { border-radius: 28px; }
  .modal-head { top: -10px; }
}

/* =====================  DARK MODE  ===================== */
[data-theme="dark"] {
  --bg: #0c0e12; --card: #151920; --field: #10131a;
  --ink: #f2f4f8; --ink-2: #cdd3dc; --muted: #929bab;
  --line: #232833; --line-2: #1c212a;
  --pk-soft: #3a1328; --pk-pale: #1d1017;
  --amber-deep: #f0b04a;
  --grn-soft: #0e2a21; --blu-soft: #12263f; --amber-soft: #2e2410; --red-soft: #2e1518; --vio-soft: #221740;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 30px -16px rgba(0,0,0,.7);
}
[data-theme="dark"] .topbar::after { background: var(--bg); }
[data-theme="dark"] .card, [data-theme="dark"] .group, [data-theme="dark"] .cta-card, [data-theme="dark"] .tile,
[data-theme="dark"] .stat-card, [data-theme="dark"] .pcard, [data-theme="dark"] .qa, [data-theme="dark"] .home-stats .stat,
[data-theme="dark"] .exp-group { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .mini-row { background: var(--field); border-color: var(--line-2); }
[data-theme="dark"] .group .mini-row { background: none; }
[data-theme="dark"] .row.sum-row { background: linear-gradient(180deg, rgba(226,19,110,.07), transparent); }
[data-theme="dark"] .input, [data-theme="dark"] .price-input { background-color: var(--field); border-color: var(--line); }
[data-theme="dark"] .input:focus { background-color: #131720; }
[data-theme="dark"] .chip { background: var(--card); border-color: var(--line); color: var(--ink-2); }
[data-theme="dark"] .chip.active { background: var(--grad-pk); border-color: transparent; color: #fff; }
[data-theme="dark"] .seg-tabs { background: #191d25; }
[data-theme="dark"] .seg-btn.active { background: #262c37; color: #ff8ab8; }
[data-theme="dark"] .btn-outline { background: #1a1f28; border-color: var(--line); color: var(--ink); }
[data-theme="dark"] .icon-btn { background: #1a1f28; border-color: var(--line); color: var(--ink); }
[data-theme="dark"] .topbar .icon-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
[data-theme="dark"] .link-btn { background: rgba(226,19,110,.14); color: #ff8ab8; }
[data-theme="dark"] .bottomnav { background: rgba(21,25,32,.86); border-color: rgba(255,255,255,.06); box-shadow: 0 18px 40px -14px rgba(0,0,0,.8); }
[data-theme="dark"] .nav-btn { color: #7d8695; }
[data-theme="dark"] .nav-btn.active { color: #ff6aa4; }
[data-theme="dark"] .nav-btn.active .nav-ico { background: rgba(226,19,110,.16); }
[data-theme="dark"] .badge { border-color: #151920; }
[data-theme="dark"] .modal-sheet { background: #13171e; }
[data-theme="dark"] .modal-head { border-bottom-color: var(--line); }
[data-theme="dark"] .modal-head .icon-btn { background: #1d222b; border-color: var(--line); }
[data-theme="dark"] .modal-sheet::before { background: #2a303b; }
[data-theme="dark"] .photo-picker { background: var(--field); border-color: #5b2b44; }
[data-theme="dark"] .empty-icon { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .pcard .pprice { background: #0e2a21; color: #3ee0a1; }
[data-theme="dark"] .pill.red { background: #3a1518; color: #ff8d92; }
[data-theme="dark"] .pill.orange { background: #36210f; color: #ffb06b; }
[data-theme="dark"] .pill.yellow { background: #332a10; color: #f5cf5b; }
[data-theme="dark"] .pill.green { background: #0e2a21; color: #3ee0a1; }
[data-theme="dark"] .pill.blue { background: #12263f; color: #79b2ff; }
[data-theme="dark"] .exp-count { background: rgba(226,19,110,.18); color: #ff8ab8; }
[data-theme="dark"] .hbar-track { background: #222833; }
[data-theme="dark"] .switch .slider { background: #2a303b; }
[data-theme="dark"] .danger-zone { border-color: #5a2328; background: linear-gradient(180deg, #1d1214, var(--card) 60%); }
[data-theme="dark"] .due-home-stat, [data-theme="dark"] .price-edit, [data-theme="dark"] .stock-ctl, [data-theme="dark"] .perm-check { background: var(--field); border-color: var(--line); }
[data-theme="dark"] .chat-msgs { background: #0a0c10; }
[data-theme="dark"] .chat-msg { background: #1b2029; border-color: var(--line); }
[data-theme="dark"] .chat-msg.mine { background: #3a1328; border-color: #4f1a37; }
[data-theme="dark"] .chat-input-row { background: var(--card); border-top-color: var(--line); }
[data-theme="dark"] .tut-item { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .toast { background: #1b2029; border-color: rgba(226,19,110,.4); }
[data-theme="dark"] .nav-fab { border-color: var(--bg); }
[data-theme="dark"] .alert-banner { box-shadow: none; }


/* =====================================================================
   Premium icons (SVG line set, sprite in index.html) + accessibility
   ===================================================================== */
.ico { width: 1.15em; height: 1.15em; flex-shrink: 0; display: inline-block; vertical-align: -0.2em;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* inline icons inside buttons / chips / tabs */
.btn .ico, .chip .ico, .seg-btn .ico, .sell-btn .ico { width: 18px; height: 18px; margin-right: 7px; vertical-align: -4px; }
.btn-sm .ico { width: 16px; height: 16px; margin-right: 5px; vertical-align: -3px; }
#chatSendBtn .ico { margin: 0; width: 20px; height: 20px; }
.qty-btn { display: inline-flex; align-items: center; justify-content: center; }
.qty-btn .ico { width: 24px; height: 24px; stroke-width: 2.4; }
.price-ctl .qty-btn .ico { width: 22px; height: 22px; }
.icon-btn .ico { width: 21px; height: 21px; }
.modal-head .icon-btn .ico { width: 18px; height: 18px; stroke-width: 2.2; }
.topbar .icon-btn .ico { width: 22px; height: 22px; stroke-width: 1.8; }
.field > span .ico, .price-edit-top .ico { width: 16px; height: 16px; margin-right: 5px; vertical-align: -3px; color: var(--pk-deep); }
.auth-priv .ico, .card p.muted > .ico { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }

/* headings: icon sits in a soft tinted chip (replaces the pink bar) */
.sec-head h2:has(> .ico)::before, .card h2:has(> .ico)::before, .cta-card h2:has(> .ico)::before { display: none; }
.sec-head h2 > .ico, .card h2 > .ico, .cta-card h2 > .ico, .modal-head h2 > .ico, .promo-card h2 > .ico {
  width: 30px; height: 30px; padding: 6px; border-radius: 10px; margin-right: 2px;
  background: var(--pk-soft); color: var(--pk-deep); stroke-width: 2; box-sizing: border-box;
}
.modal-head h2 { display: flex; align-items: center; gap: 10px; }
#view-home .promo-card h2 > .ico { background: rgba(255,255,255,.14); color: #fff; }
#view-home .promo-card h2 { display: flex; align-items: center; gap: 10px; }

/* home KPI tiles: white glyph on brand gradient */
.home-stats .stat-ic { color: #fff; }
.home-stats .stat-ic .ico { width: 21px; height: 21px; stroke-width: 2; }
.home-stats .stat:nth-child(1) { --tint: linear-gradient(135deg,#f2498f,#c40e63); --tsh: rgba(226,19,110,.45); --glow: rgba(226,19,110,.28); }

/* quick actions + feature tiles: duotone (tinted tile, coloured line) */
.qa .qi, .tile .ti { color: var(--ic, var(--pk-deep)); }
.qa .qi .ico, .tile .ti .ico { width: 23px; height: 23px; stroke-width: 1.9; }
.qa:nth-child(1) { --ic: #c40e63; } .qa:nth-child(2) { --ic: #037a50; }
.qa:nth-child(3) { --ic: #1b62d1; } .qa:nth-child(4) { --ic: #b45d06; } .qa:nth-child(5) { --ic: #6d28d9; }
.tiles .tile:nth-child(1) { --ic: #c4262e; } .tiles .tile:nth-child(2) { --ic: #1b62d1; } .tiles .tile:nth-child(3) { --ic: #b45d06; }

/* page KPI cards */
.stat-icon { color: var(--pk-deep); }
.stat-icon .ico { width: 21px; height: 21px; }
.stat-card:nth-child(4n+1) .stat-icon { color: #037a50; }
.stat-card:nth-child(4n+2) .stat-icon { color: #1b62d1; }
.stat-card:nth-child(4n+3) .stat-icon { color: var(--pk-deep); }
.stat-card.warn .stat-icon { color: #b45d06; background: var(--amber-soft); }

/* login features, empty state, photo picker */
.af-ic { color: #fff; }
.af-ic .ico { width: 18px; height: 18px; }
.empty-icon { color: var(--pk-deep); }
.empty-icon .ico { width: 44px; height: 44px; stroke-width: 1.6; }
.photo-placeholder { color: var(--pk-deep); }
.photo-placeholder span .ico { width: 38px; height: 38px; stroke-width: 1.6; }
.photo-placeholder p { color: var(--ink-2); }

/* CSS-drawn icons for decorative spots */
.alert-banner::before {
  content: ""; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b45d06' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.27 21a2 2 0 0 0 3.46 0'/%3E%3Cpath d='M3.26 15.33A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.67C19.41 13.96 18 12.5 18 8A6 6 0 0 0 6 8c0 4.5-1.41 5.96-2.74 7.33'/%3E%3C/svg%3E") center / 21px no-repeat;
}
.alert-banner.danger::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4262e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E"); }
#view-home .promo-card::after {
  content: ""; width: 132px; height: 132px; right: -18px; top: -14px; opacity: .13;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E") center / contain no-repeat;
}
input.input[type="search"], input.input[type="search"]:focus {
  padding-left: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23646a77' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7.5'/%3E%3Cpath d='m20.5 20.5-4.2-4.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 15px center; background-size: 19px;
}

/* ---------- accessibility ---------- */
/* clear keyboard focus ring everywhere */
:where(button, a, input, select, textarea, [tabindex], .tile, .qa):focus-visible {
  outline: 3px solid var(--pk-deep); outline-offset: 2px; border-radius: 12px;
}
.input:focus-visible { outline: none; } /* inputs use the pink glow ring instead */
.switch input:focus-visible + .slider { outline: 3px solid var(--pk-deep); outline-offset: 2px; }
.topbar :focus-visible, .lock-screen :focus-visible, #view-home .promo-card :focus-visible { outline-color: #fff; }

/* comfortable tap targets (≥ 40–44px) */
.icon-btn { min-width: 44px; min-height: 44px; }
.chip { min-height: 40px; }
.btn-sm { min-height: 40px; }
.seg-btn { min-height: 44px; }
.nav-btn { min-height: 48px; }

/* legibility: no text below ~11.5px, stronger secondary text */
.pill, .exp-count { font-size: 11.5px; }
.stat-lb, .stat-label, .tile .td, .row.sum-row .t2, .mini-row .t2 { font-size: 12.5px; }
.home-stats .stat-lb, .stat-label { color: var(--ink-2); opacity: .82; }
.vbar-label { font-size: 11.5px; }
.vbar-label span { font-size: 10.5px; opacity: 1; }
.chat-msg .ctm { color: #6b7280; font-size: 11px; }
.auth-note { color: rgba(255,255,255,.92); }
.auth-priv { color: rgba(255,255,255,.86); }
.lock-box .muted { color: rgba(255,255,255,.88); }
.greet { color: #ffb3d4; }
.badge { font-size: 11px; }

/* status pills keep an icon/word, never colour alone (text already present) — boost contrast */
.pill.orange { color: #a8470a; } .pill.yellow { color: #7f5800; }

/* honour reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* dark-mode icon colours */
[data-theme="dark"] .sec-head h2 > .ico, [data-theme="dark"] .card h2 > .ico,
[data-theme="dark"] .cta-card h2 > .ico, [data-theme="dark"] .modal-head h2 > .ico { background: rgba(226,19,110,.16); color: #ff8ab8; }
[data-theme="dark"] .qa:nth-child(1), [data-theme="dark"] .tiles .tile:nth-child(1) { --ic: #ff7aae; }
[data-theme="dark"] .qa:nth-child(2) { --ic: #3ee0a1; }
[data-theme="dark"] .qa:nth-child(3), [data-theme="dark"] .tiles .tile:nth-child(2) { --ic: #79b2ff; }
[data-theme="dark"] .qa:nth-child(4), [data-theme="dark"] .tiles .tile:nth-child(3) { --ic: #f5c062; }
[data-theme="dark"] .tiles .tile:nth-child(1) { --ic: #ff8d92; }
[data-theme="dark"] .stat-card:nth-child(4n+1) .stat-icon { color: #3ee0a1; }
[data-theme="dark"] .stat-card:nth-child(4n+2) .stat-icon { color: #79b2ff; }
[data-theme="dark"] .stat-card:nth-child(4n+3) .stat-icon { color: #ff8ab8; }
[data-theme="dark"] .stat-card.warn .stat-icon { color: #f5c062; }
[data-theme="dark"] .empty-icon, [data-theme="dark"] .photo-placeholder,
[data-theme="dark"] .field > span .ico, [data-theme="dark"] .price-edit-top .ico { color: #ff8ab8; }
[data-theme="dark"] .alert-banner::before { background-color: #2a2111; }
[data-theme="dark"] .alert-banner.danger::before { background-color: #2b1215; }
[data-theme="dark"] .home-stats .stat-lb, [data-theme="dark"] .stat-label { color: var(--muted); opacity: 1; }
[data-theme="dark"] .chat-msg .ctm { color: #9aa4b2; }
[data-theme="dark"] .nav-btn { color: #9aa3b2; }
[data-theme="dark"] .nav-btn.active { color: #ff7aae; }
[data-theme="dark"] .link-btn { color: #ff9cc4; }
[data-theme="dark"] :where(button, a, input, select, textarea, [tabindex], .tile, .qa):focus-visible { outline-color: #ff7aae; }
[data-theme="dark"] .photo-placeholder p { color: var(--ink-2); }
.empty-note.ok { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); }
.empty-note.ok .ico { width: 20px; height: 20px; color: #037a50; }
[data-theme="dark"] .empty-note.ok .ico { color: #3ee0a1; }

/* photo-less products: branded package placeholder instead of an empty box */
div.pimg, .mini-row:has(> img[style*="hidden"])::before {
  background: var(--pk-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2136e' stroke-opacity='.55' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.5 9.4 7.55 4.24'/%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpath d='M3.27 6.96 12 12.01l8.73-5.05'/%3E%3Cpath d='M12 22.08V12'/%3E%3C/svg%3E") center / 44px no-repeat;
}
.mini-row { position: relative; }
.mini-row:has(> img[style*="hidden"])::before {
  content: ""; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background-size: 22px;
}
.group .mini-row:has(> img[style*="hidden"])::before { left: 16px; }
[data-theme="dark"] div.pimg, [data-theme="dark"] .mini-row:has(> img[style*="hidden"])::before { background-color: #1d1017; }

/* ---------- Gmail register flow (bKash-style, #authScreen only) ---------- */
/* Fixed soft premium theme: scoped variables so dark mode can never wash the text out */
#authScreen { --ink: #21252c; --muted: #667085; --pk: #E2136E; --line: #f0d3e2; --field: #fff; color-scheme: light; color: var(--ink); background: linear-gradient(180deg, #fbdcec 0%, #fdeef5 30%, #fdf3f7 62%, #fce9f1 100%); padding: 0; align-items: stretch; justify-content: flex-start; }
#authScreen .reg-wrap { width: 100%; max-width: 420px; margin: 0 auto; background: transparent; min-height: 100%; display: flex; flex-direction: column; }
#authScreen .reg-view { display: flex; flex-direction: column; flex: 1; }
#authScreen .reg-hero { background: transparent; padding: 26px 24px 10px; text-align: center; }
#authScreen .reg-art { height: 190px; display: flex; align-items: center; justify-content: center; }
#authScreen .reg-art svg { width: 280px; max-width: 100%; height: 185px; }
#authScreen .reg-art img.reg-logo { width: 300px; max-width: 100%; height: auto; border-radius: 16px; box-shadow: 0 10px 26px -12px rgba(20,23,30,.35); display: block; }
#authScreen .reg-slide h2 { font-family: "Baloo Da 2", sans-serif; font-size: 19px; font-weight: 800; line-height: 1.4; margin-top: 8px; color: var(--ink); }
#authScreen .reg-slide p { color: #4b5563; font-size: 14px; line-height: 1.55; margin-top: 4px; }
#authScreen .reg-dots { display: flex; gap: 7px; justify-content: center; margin: 16px 0 4px; }
#authScreen .reg-dots button { width: 8px; height: 8px; border-radius: 999px; border: none; background: #f3c6da; cursor: pointer; padding: 0; transition: all .25s; }
#authScreen .reg-dots button.on { width: 26px; background: var(--ink); }
#authScreen .reg-form { padding: 22px 22px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; flex: 1; background: #fff; border-radius: 24px; margin: 14px 16px 18px; box-shadow: 0 18px 40px -18px rgba(194,14,99,.28), 0 2px 8px rgba(33,37,44,.05); }
#authScreen .reg-form h2 { font-size: 23px; font-weight: 800; font-family: "Baloo Da 2", sans-serif; color: var(--ink); }
#authScreen .reg-eyebrow { color: var(--pk); font-size: 12px; font-weight: 800; letter-spacing: 3px; margin: 2px 0 6px; }
#authScreen .reg-label { font-size: 14px; font-weight: 800; color: var(--ink); margin: 18px 0 0; }
#authScreen .reg-label + .reg-field { margin-top: 8px; }
#authScreen .reg-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; line-height: 1.5; }
#authScreen .reg-field { display: flex; align-items: center; gap: 12px; border: 1.5px solid #d8d3da; border-radius: 14px; padding: 0 16px; height: 56px; margin-top: 18px; background: #fff; box-shadow: 0 2px 12px rgba(226,19,110,.07); transition: border-color .2s, box-shadow .2s; }
#authScreen .reg-field:focus-within { border-color: var(--pk); box-shadow: 0 0 0 3px rgba(226,19,110,.12); }
#authScreen .reg-field.err { border-color: #dc2626; }
#authScreen .reg-field svg { width: 22px; height: 22px; color: #6b7280; flex: none; }
#authScreen .reg-field input { border: none; outline: none; font-family: inherit; font-size: 16px; flex: 1; min-width: 0; background: transparent; color: var(--ink); }
#authScreen .reg-field input::placeholder { color: #a7adb8; }
#authScreen .reg-hint { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin-top: 10px; }
#authScreen .reg-hint b { color: var(--ink); }
#authScreen .reg-err-msg { display: none; color: #dc2626; font-size: 12.5px; margin-top: 8px; font-weight: 700; }
#authScreen .reg-err-msg.on { display: block; }
#authScreen .reg-err { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-top: 14px; text-align: left; line-height: 1.5; }
#authScreen .reg-spacer { flex: 1; }
#authScreen .reg-btn { width: 100%; height: 54px; border: none; border-radius: 16px; margin-top: 18px; font-family: inherit; font-size: 17px; font-weight: 800; color: #fff; cursor: pointer; background: var(--pk); box-shadow: 0 10px 24px -8px rgba(226,19,110,.55); }
#authScreen .reg-btn:disabled { background: #f3c6da; box-shadow: none; cursor: not-allowed; }
#authScreen .reg-btn:active:not(:disabled) { transform: scale(.98); }
#authScreen .reg-skip { width: 100%; border: none; background: none; cursor: pointer; padding: 13px; margin-top: 6px; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--ink); border-radius: 12px; }
#authScreen .reg-skip:active { background: #f7f5f8; }
#authScreen .reg-skip span { color: var(--pk); }
#authScreen .reg-terms { text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.6; margin-top: 12px; }
#authScreen .reg-terms a { color: var(--pk); font-weight: 700; text-decoration: underline; }
#authScreen .reg-priv { color: #a7adb8; font-size: 11.5px; line-height: 1.55; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
#authScreen .reg-back { align-self: flex-start; border: none; background: none; cursor: pointer; color: var(--ink); font-family: inherit; font-size: 14px; font-weight: 700; padding: 6px 0; }
#authScreen .reg-otp { display: flex; gap: 9px; margin-top: 22px; justify-content: space-between; }
#authScreen .reg-otp input { width: 48px; height: 54px; text-align: center; font-size: 22px; font-weight: 800; font-family: inherit; border: 1.5px solid #d8d3da; border-radius: 13px; outline: none; background: var(--field); color: var(--ink); }
#authScreen .reg-otp input:focus { border-color: var(--pk); background: #fff; box-shadow: 0 0 0 3px rgba(226,19,110,.12); }
#authScreen .reg-resend { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 18px; }
#authScreen .reg-resend button { border: none; background: none; color: var(--pk); font-weight: 800; font-family: inherit; font-size: 13.5px; cursor: pointer; }
#authScreen .reg-resend button:disabled { color: #c4c9d1; cursor: default; }

/* ============ পার্সোনাল হিসাব — PDF প্রিন্ট ============ */
#printArea { display: none; }
@media print {
  body * { visibility: hidden !important; }
  #printArea, #printArea * { visibility: visible !important; }
  #printArea { display: block !important; position: absolute; top: 0; left: 0; width: 100%; padding: 0; background: #fff; color: #000; }
  .pf-print h1 { font-size: 20px; margin: 0 0 4px; color: #000; }
  .pf-print-sub { font-size: 13px; color: #444; margin: 0 0 14px; }
  .pf-print table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .pf-print th, .pf-print td { border: 1px solid #999; padding: 7px 9px; text-align: left; }
  .pf-print th { background: #f0f0f0 !important; }
  .pf-print th:nth-child(3), .pf-print th:nth-child(4), .pf-print td.num { text-align: right; }
  .pf-print tfoot td { font-weight: 700; }
  .pf-print-foot { font-size: 12px; color: #555; margin-top: 14px; }
}
@page { margin: 12mm; }
