/* দাওয়াত সাথী — স্টাইল। ডান-থেকে-বামে (উর্দু/আরবি) ভাষার জন্য logical property ব্যবহার করা হয়েছে */
:root {
  --pri: #0b6b3a; --on-pri: #fff;
  --bg: #f1f5f2; --card: #fff; --text: #17221c; --muted: #66756c; --line: #dfe7e2;
  --ok: #137a3b; --ok-bg: #e2f4e8; --warn: #9a5b00; --warn-bg: #fff0d3; --bad: #c62828; --bad-bg: #fde6e6;
  --pri-soft: color-mix(in srgb, var(--pri) 11%, var(--card));
  --radius: 16px; --nav-h: 62px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
  --font: system-ui, "Noto Sans Bengali", "Hind Siliguri", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1511; --card: #18211b; --text: #e8efe9; --muted: #9aa99f; --line: #28342d;
  --ok: #62d28d; --ok-bg: #163220; --warn: #f2b655; --warn-bg: #372b10; --bad: #ff8d84; --bad-bg: #3b1b1b;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0f1511; --card: #18211b; --text: #e8efe9; --muted: #9aa99f; --line: #28342d;
    --ok: #62d28d; --ok-bg: #163220; --warn: #f2b655; --warn-bg: #372b10; --bad: #ff8d84; --bad-bg: #3b1b1b;
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.45; overscroll-behavior-y: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pri); text-decoration: none; }
h1, h2, h3 { margin: 0; }
.hide, .hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.center { text-align: center; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.msg { white-space: pre-line; margin: 6px 0 16px; }
.ico { flex: none; }

/* ---------- শুরুর স্প্ল্যাশ ---------- */
#boot { position: fixed; inset: 0; z-index: 500; display: flex; flex-direction: column; gap: 22px; align-items: center; justify-content: center; background: var(--pri); transition: opacity .3s; }
#boot img { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-spin { width: 26px; height: 26px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- কাঠামো ---------- */
#app { min-height: 100dvh; }
#view { padding-bottom: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
.page-pad { padding: 12px 14px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0; background: var(--card); border-bottom: 1px solid var(--line); }
.top-title { flex: 1; font-size: 1.1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-logo img { width: 30px; height: 30px; border-radius: 8px; display: block; margin-inline: 4px; }
.nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -2px 12px rgba(0,0,0,.05); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--muted); font-size: .72rem; }
.nav-item.on { color: var(--pri); font-weight: 700; }
.nav-item.on .ico { stroke-width: 2.6; }
.fab-wrap { position: fixed; inset-inline: 0; bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); z-index: 25; display: flex; justify-content: center; pointer-events: none; }
.fab { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 24px; border: 0; border-radius: 26px; background: var(--pri); color: var(--on-pri); font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.28); }

/* ---------- বাটন ও ইনপুট ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font-weight: 600; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--pri); border-color: var(--pri); color: var(--on-pri); }
.btn.danger { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn.block { display: flex; width: 100%; margin-top: 10px; }
.btn.wide { flex: 1; }
.btn.big { flex-direction: column; gap: 2px; min-height: 64px; font-size: 1.05rem; }
.btn.big small { font-weight: 400; opacity: .85; }
.btn.link { border: 0; background: none; color: var(--pri); text-decoration: underline; min-height: 36px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; flex: none; }
.icon-btn:active { background: var(--pri-soft); }
.icon-btn.small { width: 34px; height: 34px; }
.icon-btn.danger { color: var(--bad); }
.icon-btn.glass { background: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(6px); }
[dir="rtl"] .flip .ico { transform: scaleX(-1); }

.field { display: block; margin: 12px 0; }
.field-label { display: block; margin-bottom: 6px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.field-hint { display: block; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); outline: none; }
textarea.input { padding: 10px 12px; min-height: 90px; resize: vertical; }
.input:focus, .search-box:focus-within { border-color: var(--pri); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pri) 20%, transparent); }
.pin-input { text-align: center; letter-spacing: .5em; font-size: 1.2rem; }
.row { display: flex; align-items: center; gap: 10px; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.row.wrap { flex-wrap: wrap; margin: 10px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font-size: .9rem; }
.chip.on { background: var(--pri); border-color: var(--pri); color: var(--on-pri); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.seg button { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 36px; padding: 0 12px; border: 0; background: none; }
.seg button.on { background: var(--pri); color: var(--on-pri); }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; height: 42px; font-weight: 600; }

.card { margin: 12px 0; padding: 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.info { display: block; }
.info-title { font-size: 1.1rem; font-weight: 700; }
.big-count { margin-top: 6px; font-size: 2rem; font-weight: 800; color: var(--pri); }
.big-count span { margin-inline-start: 8px; font-size: 1rem; font-weight: 500; color: var(--muted); }
.notice { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--pri-soft); font-size: .9rem; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--pri-soft); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.pill { padding: 2px 10px; border-radius: 999px; background: var(--pri-soft); font-size: .78rem; }
.count-badge { min-width: 28px; padding: 2px 9px; border-radius: 999px; background: var(--pri); color: var(--on-pri); font-size: .8rem; font-weight: 700; text-align: center; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--pri); color: var(--on-pri); font-weight: 700; flex: none; }
.avatar.big { width: 56px; height: 56px; font-size: 1.4rem; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 16px; color: var(--muted); text-align: center; }
.empty.small { padding: 16px; }
.section-title { margin: 18px 0 6px; font-size: .88rem; font-weight: 700; color: var(--muted); }
.day-head { margin: 14px 0 4px; font-weight: 700; color: var(--pri); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.num { min-width: 24px; color: var(--muted); }

/* ---------- সিঙ্ক চিহ্ন ---------- */
.sync-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--pri-soft); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.sync-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sync-pill.ok { background: var(--ok-bg); color: var(--ok); }
.sync-pill.warn { background: var(--warn-bg); color: var(--warn); }
.sync-pill.bad { background: var(--bad-bg); color: var(--bad); }
.banner .sync-pill { background: rgba(255,255,255,.92); }
.banner .sync-pill.ok { color: #137a3b; } .banner .sync-pill.warn { color: #9a5b00; } .banner .sync-pill.bad { color: #c62828; }
.topbar .sync-pill { margin-inline-end: 4px; }

/* ---------- হোম ---------- */
.banner { display: flex; flex-direction: column; justify-content: space-between; min-height: 200px; padding: calc(10px + env(safe-area-inset-top)) 14px 16px; background-size: cover; background-position: center; color: #fff; border-radius: 0 0 26px 26px; }
.banner-top { display: flex; align-items: center; justify-content: space-between; }
.banner-name { font-size: 1.55rem; font-weight: 800; line-height: 1.25; text-shadow: 0 2px 8px rgba(0,0,0,.55); }
.banner-sub { opacity: .92; font-size: .9rem; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.search-box { display: flex; align-items: center; gap: 8px; height: 46px; margin: 4px 0 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--muted); }
.search-input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); }
.datebar { display: flex; align-items: center; gap: 6px; margin: 8px 0 12px; }
.date-btn { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--pri); text-align: start; }
.date-main { font-weight: 700; color: var(--text); }
.date-sub { font-size: .78rem; color: var(--muted); min-height: 1em; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.stat b { font-size: 1.35rem; }
.stat span { font-size: .75rem; color: var(--muted); }
.stat.warn b { color: var(--warn); } .stat.ok b { color: var(--ok); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 10px; }

/* ---------- দাওয়াতের কার্ড ---------- */
.dlist { display: flex; flex-direction: column; gap: 12px; }
.dlist.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlist > .section-title, .dlist > .day-head, .dlist > .empty { grid-column: 1 / -1; }
.dcard { padding: 12px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); border-inline-start: 5px solid var(--warn); }
.dcard.done { border-inline-start-color: var(--ok); }
.dc-top { display: flex; align-items: center; gap: 6px; }
.dc-when { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dc-date { font-size: .85rem; font-weight: 700; }
.dc-time { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
.dc-donor { margin: 8px 0 2px; font-size: 1.1rem; font-weight: 800; }
.dc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; }
.dc-phone { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; color: var(--pri); font-weight: 600; }
.dc-recipient { margin-top: 2px; font-size: .88rem; color: var(--muted); }
.dc-actions { display: flex; gap: 8px; margin-top: 10px; }
.dc-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border: 0; border-radius: 12px; background: var(--pri-soft); color: var(--text); }
.dc-num { font-size: 1.15rem; font-weight: 800; }
.dc-lbl { font-size: .82rem; }
.dc-btn.money.ok { background: var(--ok-bg); color: var(--ok); }
.dc-btn.money.bad { background: var(--bad-bg); color: var(--bad); }
.dc-btn.money.warn, .dc-btn.money.wait { background: var(--warn-bg); color: var(--warn); }
.dcard.grid { padding: 10px; }
.dcard.grid .dc-donor { font-size: 1rem; }
.dcard.grid .dc-phone { margin-inline-start: 0; }
.dcard.grid .dc-btn { height: 40px; gap: 4px; padding: 0 4px; }
.dcard.grid .dc-lbl { display: none; }
.dcard.grid .dc-btn.money .dc-lbl { display: inline; }

/* ---------- গ্রাম / তালিকা ---------- */
.vlist { display: flex; flex-direction: column; gap: 8px; }
.vrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-align: start; color: var(--text); }
.vrow.off { opacity: .55; }
.vname { font-weight: 700; }
.row-item { display: flex; align-items: center; gap: 10px; margin: 6px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.blist { margin-top: 4px; }
.log { align-items: flex-start; }

/* ---------- ছাত্র ---------- */
.slist { display: flex; flex-direction: column; }
.srow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 4px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.srow.on, .pick-row.on { background: var(--pri-soft); border-color: var(--pri); }
.sname { font-weight: 600; }
.check { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: none; border: 2px solid var(--line); border-radius: 7px; color: var(--on-pri); }
.on > .check { background: var(--pri); border-color: var(--pri); }
.multi-bar { position: sticky; top: 56px; z-index: 10; display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; padding: 8px 10px; border-radius: 12px; background: var(--pri); color: var(--on-pri); }
.multi-bar.show { display: flex; }
.multi-bar .btn { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.fab-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin: 14px 0; }
.trips { font-size: .78rem; color: var(--muted); }
.pick-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 70px; }
.pick-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: start; color: var(--text); }
.pick-name { flex: 1; font-weight: 600; }
.pick-count { font-weight: 700; color: var(--pri); }
.sticky-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 4px; background: var(--card); border-top: 1px solid var(--line); }
.sticky-actions { position: sticky; bottom: calc(var(--nav-h) * 0 + 8px); margin-top: 18px; padding: 8px 0; }

/* ---------- ফর্ম ---------- */
.form { padding-bottom: 20px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper b { min-width: 44px; text-align: center; font-size: 1.4rem; }
.boy-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

/* ---------- টাকার পেজ ---------- */
.mrow { margin: 10px 0; padding: 12px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); border-inline-start: 5px solid var(--line); }
.mrow.ok { border-inline-start-color: var(--ok); }
.mrow.bad { border-inline-start-color: var(--bad); }
.mrow-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mrow-label { font-weight: 700; }
.mrow-amt { margin: 6px 0; font-size: 1.7rem; font-weight: 800; }
.mrow.ok .mrow-amt { color: var(--ok); }
.fund { margin: 12px 0; padding: 14px; border-radius: var(--radius); text-align: center; background: var(--ok-bg); color: var(--ok); }
.fund b { display: block; font-size: 2rem; }
.fund.neg { background: var(--bad-bg); color: var(--bad); }
.fund.big b { font-size: 2.3rem; }
.fund.total { background: var(--card); box-shadow: var(--shadow); border: 2px solid currentColor; }

/* ---------- ড্যাশবোর্ড ---------- */
.dash .datebar { margin-top: 10px; }
.dx-summary { margin: 4px 0 10px; text-align: center; }
.dx-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.dcardx { padding: 12px 14px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); border-inline-start: 5px solid var(--pri); }
.dx-title { font-size: .85rem; font-weight: 700; color: var(--muted); }
.dx-amt { margin: 2px 0 6px; font-size: 1.7rem; font-weight: 800; }
.dx-line { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; }
.dx-line.ok { color: var(--ok); } .dx-line.bad { color: var(--bad); }
.dtable { margin-top: 6px; }
.dt-scroll { overflow-x: auto; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.dt-row { display: grid; grid-template-columns: minmax(96px, 1.5fr) repeat(4, minmax(64px, 1fr)); gap: 4px; align-items: center; width: 100%; min-width: 440px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: start; font-size: .85rem; }
.dt-row.head { font-weight: 700; color: var(--muted); font-size: .75rem; }
.dt-row .ok, .dt-row .pos { color: var(--ok); font-weight: 600; }
.dt-row .neg { color: var(--bad); font-weight: 600; }
.dt-day { display: flex; flex-direction: column; font-weight: 700; }
.dt-day i { font-style: normal; font-weight: 400; font-size: .72rem; color: var(--muted); }
.dt-item { display: block; width: 100%; margin: 8px 0; padding: 12px; border: 0; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); text-align: start; color: var(--text); }
.dt-head { display: flex; flex-direction: column; margin-bottom: 8px; }
.dt-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dt-cell { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 10px; background: var(--pri-soft); font-size: .85rem; }
.dt-cell.ok { background: var(--ok-bg); color: var(--ok); }
.dt-cell.bad { background: var(--bad-bg); color: var(--bad); }
.dt-cell.wait { color: var(--muted); }
.dt-l { font-size: .72rem; opacity: .85; }
.dt-fund { margin-top: 8px; font-size: .88rem; }
.dt-fund.pos b { color: var(--ok); } .dt-fund.neg b { color: var(--bad); }

/* ---------- সেটিং, স্টাফ, মেনু ---------- */
.sec-title { margin-bottom: 4px; font-weight: 800; color: var(--pri); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 3px solid transparent; border-radius: 50%; color: #fff; box-shadow: 0 0 0 1px var(--line); }
.swatch.on { border-color: var(--card); box-shadow: 0 0 0 3px var(--text); }
.perms { margin: 8px 0; }
.permrow { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.permrow input { width: 20px; height: 20px; accent-color: var(--pri); }
.danger-zone { margin-top: 18px; padding-top: 6px; border-top: 1px dashed var(--line); }
.menu-list.card { padding: 0; overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: start; }
.menu-item:last-child { border-bottom: 0; }
.menu-item.danger { color: var(--bad); }
.profile { display: flex; align-items: center; gap: 14px; }
.about { margin-top: 16px; }

/* ---------- লগইন / লক ---------- */
.authroot { position: fixed; inset: 0; z-index: 200; display: none; overflow-y: auto; background: linear-gradient(rgba(6,40,24,.78), rgba(6,40,24,.9)), url("../img/login.jpg") center / cover; }
.authroot.show { display: block; }
.auth { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-height: 100%; max-width: 440px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.auth-lang { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.auth-hero { text-align: center; color: #fff; }
.auth-hero h1 { margin-top: 10px; font-size: 1.5rem; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.auth-sub { opacity: .9; }
.auth-logo { width: 86px; height: 86px; border-radius: 22px; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.auth-card { padding: 16px; border-radius: 22px; background: var(--card); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.lock-user { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 6px; }

/* ---------- পিন ও নাম্বার প্যাড, ক্যালকুলেটর ---------- */
.pinpad { margin: 8px auto; max-width: 320px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 10px 0 6px; }
.pin-dots span { width: 15px; height: 15px; border: 2px solid var(--pri); border-radius: 50%; }
.pin-dots span.on { background: var(--pri); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-msg { min-height: 1.5em; margin-bottom: 8px; text-align: center; font-size: .85rem; color: var(--muted); }
.pin-msg.bad { color: var(--bad); }
.np-grid, .calc-grid { direction: ltr; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.calc-grid { grid-template-columns: repeat(4, 1fr); }
.np-key { display: flex; align-items: center; justify-content: center; height: 56px; border: 0; border-radius: 14px; background: var(--pri-soft); color: var(--text); font-size: 1.4rem; font-weight: 600; user-select: none; }
.np-key:active { background: var(--pri); color: var(--on-pri); }
.np-key.alt { background: var(--bg); color: var(--muted); }
.np-key.op { background: var(--pri); color: var(--on-pri); }
.np-key.w2 { grid-column: span 2; }
.np-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; }
.np-disp { flex: 1; padding: 10px 14px; border-radius: 14px; background: var(--bg); font-size: 2rem; font-weight: 800; text-align: end; direction: ltr; }
.np-hint { margin-bottom: 6px; text-align: center; font-size: .85rem; color: var(--muted); }
.calc-disp { margin-bottom: 12px; padding: 10px 14px; border-radius: 14px; background: var(--bg); text-align: end; direction: ltr; }
.calc-expr { min-height: 1.3em; font-size: .9rem; color: var(--muted); }
.calc-out { font-size: 2.2rem; font-weight: 800; overflow-x: auto; }

/* ---------- ক্যালেন্ডার ---------- */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-month { font-weight: 800; font-size: 1.05rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { padding: 4px 0; text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); }
.cal-day { position: relative; display: flex; align-items: center; justify-content: center; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--text); font-weight: 600; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--pri); }
.cal-day.sel { background: var(--pri); color: var(--on-pri); }
.cal-day.has:not(.sel) { background: var(--pri-soft); }
.cal-dot { position: absolute; top: 2px; inset-inline-end: 3px; min-width: 15px; padding: 0 3px; border-radius: 8px; background: var(--warn); color: #fff; font-size: .6rem; font-style: normal; line-height: 15px; text-align: center; }

/* ---------- শিট ও মেসেজ ---------- */
#overlay .backdrop { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .18s; }
#overlay .backdrop.show { opacity: 1; }
.sheet { display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: 92dvh; border-radius: 22px 22px 0 0; background: var(--card); color: var(--text); transform: translateY(30px); transition: transform .2s; padding-bottom: env(safe-area-inset-bottom); }
.backdrop.show .sheet { transform: none; }
.sheet.full { height: 92dvh; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 4px 18px; }
.sheet-title { font-size: 1.1rem; font-weight: 800; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 18px 20px; }
#toasts { position: fixed; inset-inline: 0; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; max-width: min(92vw, 440px); padding: 11px 16px; border-radius: 12px; background: #26302b; color: #fff; font-size: .92rem; box-shadow: 0 6px 20px rgba(0,0,0,.3); opacity: 0; transform: translateY(10px); transition: .22s; pointer-events: auto; }
.toast.show { opacity: 1; transform: none; }
.toast.ok { background: #14683a; } .toast.warn { background: #8a5400; } .toast.bad { background: #a42222; }
.toast-act { border: 0; background: none; color: #ffd54f; font-weight: 800; text-transform: uppercase; }

@media (min-width: 720px) {
  .dx-grid { grid-template-columns: repeat(3, 1fr); }
  .dlist.grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
