/* UD Shop bKash Ledger v2 — mobile-first */
:root {
  --bg: #f1f5f9; --surface: #fff; --surface-2: #f6f8fb; --text: #0f2236; --muted: #5a6e85; --line: #e2e8f0; --line-2: #c9d4e0;
  --brand: #0b6e7a; --btn: #0b6e7a; --on-btn: #fff; --accent: #6ee7c7; --on-accent: #06312f; --nav: #0f2236;
  --pos: #0f8a5f; --neg: #c8372d; --warn-bg: #fff4de; --warn-text: #7a4a07; --info-bg: #e4f0ff; --info-text: #174a8b;
  --s0: #4a7fd4; --s1: #16a394; --s2: #8f68c9;
  --radius: 18px; --shadow: 0 1px 2px rgba(15, 34, 54, .05), 0 10px 28px rgba(15, 34, 54, .07);
  --sb: env(safe-area-inset-bottom, 0px); --st: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
:root[data-theme=dark] {
  --bg: #0c1624; --surface: #121f31; --surface-2: #172a42; --text: #e8eff7; --muted: #94a8bf; --line: #223650; --line-2: #34506f;
  --brand: #4fd1bd; --btn: #6ee7c7; --on-btn: #06312f; --nav: #0a1320;
  --pos: #4ade9c; --neg: #ff8a80; --warn-bg: #3a2a0c; --warn-text: #ffd89a; --info-bg: #14304f; --info-text: #a9cdf7;
  --s0: #7aa7ee; --s1: #4fd1bd; --s2: #b69cf0; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #0c1624; --surface: #121f31; --surface-2: #172a42; --text: #e8eff7; --muted: #94a8bf; --line: #223650; --line-2: #34506f;
    --brand: #4fd1bd; --btn: #6ee7c7; --on-btn: #06312f; --nav: #0a1320;
    --pos: #4ade9c; --neg: #ff8a80; --warn-bg: #3a2a0c; --warn-text: #ffd89a; --info-bg: #14304f; --info-text: #a9cdf7;
    --s0: #7aa7ee; --s1: #4fd1bd; --s2: #b69cf0; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", "Noto Sans Bengali", "Hind Siliguri", Roboto, "Helvetica Neue", sans-serif;
  font-variant-numeric: tabular-nums; overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.05rem; letter-spacing: -.01em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.pad { padding: 4px 18px 18px; }
.pre { white-space: pre-line; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.hide-m { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: .95rem; white-space: nowrap; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: .85rem; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--btn); color: var(--on-btn); }
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn.accent { background: var(--accent); color: var(--on-accent); }
.btn.glass { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.btn.glass-d { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--neg); color: #fff; }
.btn.danger-ghost { color: var(--neg); background: color-mix(in srgb, var(--neg) 10%, transparent); }
.btn:hover { filter: brightness(1.05); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--neg); }
.only-m { display: inline-grid; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- boot / auth ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 100; }
.auth { min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + var(--st)) 18px calc(24px + var(--sb)); background: radial-gradient(900px 500px at 10% -10%, #1a6b7a55, transparent), radial-gradient(700px 500px at 110% 110%, #6ee7c733, transparent), var(--bg); }
.auth-card { width: min(100%, 430px); display: grid; gap: 16px; padding: 28px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.2; }
.auth-top { display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, #6ee7c7, #29b79d); color: #06312f; font-weight: 800; letter-spacing: -.03em; }
#auth-status { min-height: 1.3em; color: var(--neg); font-size: .92rem; }
.pw { position: relative; display: block; }
.pw input { padding-right: 52px; }
.pw .icon-btn { position: absolute; right: 2px; top: 2px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; font-size: .86rem; font-weight: 650; color: var(--muted); }
input:not([type=checkbox]), select { width: 100%; min-width: 0; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 13px; background: var(--surface-2); color: var(--text); font-size: 16px; }
input[type=date] { min-height: 48px; }
input:focus, select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ferr { display: flex; gap: 8px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; background: color-mix(in srgb, var(--neg) 12%, transparent); color: var(--neg); font-size: .9rem; font-weight: 600; }
.ferr .ic { width: 20px; height: 20px; margin-top: 1px; }
.preview { min-height: 64px; display: grid; align-content: center; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.pv { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.pv dt { font-size: .74rem; color: var(--muted); font-weight: 650; }
.pv dd { margin: 2px 0 0; font-weight: 750; font-size: 1.02rem; }

/* ---------- layout ---------- */
#app { min-height: 100dvh; }
.side { display: none; }
.main { min-width: 0; }
.appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; padding: calc(10px + var(--st)) 12px 8px 18px; background: var(--bg); background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.appbar h1 { flex: 1; font-size: 1.45rem; letter-spacing: -.025em; }
.top-actions { display: flex; gap: 8px; }
.view > * { min-width: 0; }
.view { display: grid; gap: 14px; align-content: start; max-width: 1120px; margin: 0 auto; padding: 6px 16px calc(104px + var(--sb)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; }
.card-foot { display: flex; gap: 8px; padding: 6px 14px 14px; }
.cols { display: grid; gap: 14px; }

.banner { display: flex; align-items: center; gap: 10px; margin: 4px 16px 0; padding: 11px 14px; border-radius: 14px; font-size: .9rem; font-weight: 600; }
.banner.warn { background: var(--warn-bg); color: var(--warn-text); } .banner.info { background: var(--info-bg); color: var(--info-text); }
.banner span { flex: 1; }
#banner { max-width: 1120px; margin: 0 auto; }

/* ---------- navigation ---------- */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: end; padding: 6px 6px calc(6px + var(--sb)); background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.bnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 4px 2px; color: var(--muted); font-size: .72rem; font-weight: 650; border-radius: 12px; }
.bnav button[aria-current=page] { color: var(--brand); }
.bnav button[aria-current=page] .ic { stroke-width: 2.3; }
.bnav .fab { width: 58px; height: 58px; min-height: 0; margin: -28px auto 4px; border-radius: 50%; background: var(--btn); color: var(--on-btn); box-shadow: 0 8px 22px color-mix(in srgb, var(--btn) 45%, transparent), 0 0 0 5px var(--bg); }
.bnav .fab .ic { width: 28px; height: 28px; stroke-width: 2.4; }
#mnav.on { color: var(--brand); background: var(--surface-2); }

/* ---------- hero / tiles ---------- */
.hero-card { position: relative; overflow: hidden; display: grid; gap: 6px; padding: 22px 20px 18px; border-radius: 24px; color: #fff; background: radial-gradient(420px 220px at 100% 0%, #6ee7c755, transparent 70%), linear-gradient(135deg, #0d2a43 0%, #0f5666 62%, #13917f 100%); box-shadow: 0 14px 34px rgba(11, 60, 80, .28); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: .85rem; opacity: .82; font-weight: 600; }
.chip { padding: 4px 11px; border-radius: 99px; background: rgba(255, 255, 255, .16); font-size: .8rem; font-weight: 650; }
.hero-num { font-size: clamp(2rem, 9vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
.hero-num small { font-size: .45em; font-weight: 700; opacity: .8; }
.hero-sub { font-size: .9rem; opacity: .88; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: grid; gap: 4px; padding: 15px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); border-top: 3px solid var(--brand); }
.tile:nth-child(2) { border-top-color: var(--s0); } .tile:nth-child(3) { border-top-color: var(--s2); } .tile:nth-child(4) { border-top-color: #e0a526; }
.tile-l { font-size: .8rem; color: var(--muted); font-weight: 650; }
.tile strong { font-size: 1.18rem; letter-spacing: -.02em; overflow-wrap: anywhere; line-height: 1.2; }
.tile strong small { font-size: .6em; color: var(--muted); font-weight: 650; }
.tile-s { font-size: .78rem; color: var(--muted); }

/* ---------- stock ---------- */
.stock { list-style: none; margin: 0; padding: 0 18px 16px; display: grid; gap: 16px; }
.stock-top, .stock-sub { display: flex; justify-content: space-between; gap: 8px; }
.stock-top span { font-weight: 750; }
.stock-sub { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.stock-sub b { color: var(--text); }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 7px; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--s1), var(--s0)); }

/* ---------- chart ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 18px; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--s0); }
.dot.s1, .bar.s1 { background: var(--s1); } .dot.s2, .bar.s2 { background: var(--s2); } .dot.s0, .bar.s0 { background: var(--s0); }
.chart-plot { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; padding: 14px 10px 4px; }
.mcol { display: flex; flex-direction: column; height: 200px; border-radius: 12px; padding: 0; min-width: 0; }
.mcol[aria-pressed=true] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.bars { position: relative; flex: 1; width: 100%; }
.bars::before { content: ''; position: absolute; left: 4px; right: 4px; top: var(--zero); border-top: 1px solid var(--line-2); }
.bar { position: absolute; left: 50%; width: 22%; max-width: 14px; min-width: 7px; border-radius: 4px; }
.bar.s0 { transform: translateX(calc(-50% - 16px)); } .bar.s1 { transform: translateX(-50%); } .bar.s2 { transform: translateX(calc(-50% + 16px)); }
.mlab { height: 28px; display: grid; place-items: center; font-size: .75rem; color: var(--muted); font-weight: 650; }
.readout { margin: 0 14px 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 8px; }
.readout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.readout-grid small { display: block; color: var(--muted); font-size: .72rem; }
.readout-grid b { font-size: .9rem; overflow-wrap: anywhere; }
.readout .dot { margin-right: 5px; }

/* ---------- activity & transactions ---------- */
.acts { list-style: none; margin: 0; padding: 0 8px; }
.act, .tx { display: flex; align-items: center; gap: 12px; }
.act { padding: 10px 10px; border-top: 1px solid var(--line); }
.act:first-child { border-top: 0; }
.act b, .tx b { font-weight: 700; } .act small, .tx small { display: block; color: var(--muted); font-size: .8rem; }
.amt { text-align: right; } .amt small.pos { color: var(--pos); } .amt small.neg { color: var(--neg); }
.tx-ic { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; flex: none; background: var(--surface-2); color: var(--muted); }
.tx-ic.buy { background: color-mix(in srgb, var(--s0) 16%, transparent); color: var(--s0); }
.tx-ic.sell { background: color-mix(in srgb, var(--s1) 16%, transparent); color: var(--s1); }
.menu-item .tx-ic.buy, .menu-item .tx-ic.sell { width: 46px; height: 46px; }

.toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.search { position: relative; grid-column: 1 / -1; display: block; }
.search .ic { position: absolute; left: 13px; top: 13px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 42px; }
.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.summary b { white-space: nowrap; }
.summary div { padding: 11px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.summary small { display: block; font-size: .72rem; color: var(--muted); font-weight: 650; }
.summary b { font-size: .98rem; overflow-wrap: anywhere; }
.tx-list { display: grid; gap: 10px; }
.tx { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); align-items: center; }
.tx-main { min-width: 0; } .tx-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-amt { text-align: right; }
.tx-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-top: 8px; margin-top: 4px; border-top: 1px dashed var(--line); font-size: .8rem; color: var(--muted); }
.tx-meta b { color: var(--text); }
.tx-meta .row-actions { margin: -8px -8px -8px auto; }
.row-actions { display: flex; gap: 2px; }
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 750; background: var(--surface-2); color: var(--muted); }
.pill.pos { background: color-mix(in srgb, var(--pos) 14%, transparent); color: var(--pos); }
.pill.neg { background: color-mix(in srgb, var(--neg) 14%, transparent); color: var(--neg); }
.pill.warn { background: var(--warn-bg); color: var(--warn-text); }
.table-wrap { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; white-space: nowrap; }
th, td { padding: 11px 10px; text-align: left; border-top: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 16px; } th:last-child, td:last-child { padding-right: 10px; }
th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 700; border-top: 0; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; } td.num { font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--surface-2); }
td .row-actions { justify-content: flex-end; }
.more-wrap { display: grid; place-items: center; padding: 6px; }

/* ---------- people / settings ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.seg button { min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.seg button span { margin-left: 4px; font-size: .78rem; opacity: .75; }
.seg button[aria-selected=true], .seg button[aria-pressed=true] { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(15, 34, 54, .14); }
.seg.sm button { min-height: 44px; font-size: .84rem; }
.people-head { display: flex; }
.people-head .btn { width: 100%; }
.people { display: grid; gap: 12px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.person header { display: flex; align-items: center; gap: 12px; padding: 12px 8px 4px 14px; }
.person dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin: 0; padding: 10px 16px 16px; }
.person dt { font-size: .74rem; color: var(--muted); font-weight: 650; } .person dd { margin: 2px 0 0; font-weight: 750; overflow-wrap: anywhere; }
.avatar { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #6ee7c7, #3ba7d4); color: #06312f; font-weight: 800; }
.avatar.lg { width: 52px; height: 52px; font-size: 1.2rem; }
.account { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.account b { overflow-wrap: anywhere; } .account small { display: block; color: var(--muted); }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px 14px; font-weight: 650; }
.pref .seg { min-width: 190px; }
.set-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 18px; text-align: left; border-top: 1px solid var(--line); min-height: 64px; }
.set-row:hover { background: var(--surface-2); }
.set-row small { display: block; color: var(--muted); font-size: .82rem; }
.set-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--brand); flex: none; }
.callout { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.callout-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.callout p { color: var(--muted); font-size: .9rem; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 34px 22px; text-align: center; }
.empty-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--surface-2); color: var(--brand); }
.empty-ic .ic { width: 30px; height: 30px; }
.empty p { color: var(--muted); max-width: 34ch; }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ---------- sheets (bottom sheet on mobile, dialog on desktop) ---------- */
dialog.sheet { width: 100%; max-width: 540px; max-height: min(94dvh, 820px); margin: auto auto 0; padding: 0; border: 0; border-radius: 26px 26px 0 0; background: var(--surface); color: var(--text); box-shadow: 0 -10px 50px rgba(8, 18, 32, .35); overflow: auto; overscroll-behavior: contain; }
dialog.sheet[open] { animation: sheet-up .24s cubic-bezier(.2, .8, .2, 1); }
dialog.sheet.small { max-width: 420px; }
dialog.sheet::backdrop { background: rgba(8, 18, 32, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 8px 22px; background: var(--surface); }
.sheet-head h2 { font-size: 1.2rem; }
.sheet-body { display: grid; gap: 14px; padding: 8px 22px 18px; }
.sheet-actions { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 22px calc(16px + var(--sb)); background: var(--surface); border-top: 1px solid var(--line); }
dialog.small .sheet-body { padding-top: 22px; }
dialog.small .sheet-actions { position: static; border: 0; padding-top: 0; }
dialog.small .sheet-actions .btn { flex: 1; }
.menu { gap: 8px; padding-bottom: calc(22px + var(--sb)); }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); text-align: left; min-height: 66px; }
.menu-item small { display: block; color: var(--muted); font-size: .82rem; }

/* ---------- toast / busy ---------- */
#toast { position: fixed; left: 50%; bottom: calc(92px + var(--sb)); transform: translateX(-50%); z-index: 200; max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 14px; background: #0f2236; color: #fff; font-weight: 650; font-size: .93rem; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
#toast.bad { background: #b3261e; }
#toast:empty { display: none; }
:root[data-theme=dark] #toast { background: #e8eff7; color: #0c1624; } :root[data-theme=dark] #toast.bad { background: #ff8a80; color: #3b0a07; }
.busy { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(8, 18, 32, .45); backdrop-filter: blur(3px); }
.busy-box { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: 18px; background: var(--surface); font-weight: 650; box-shadow: var(--shadow); }
body:has(dialog[open]) { overflow: hidden; }

/* ---------- sidebar & desktop ---------- */
@media (max-width: 359px) { .grid2 { grid-template-columns: 1fr; } .tiles { grid-template-columns: 1fr; } }
@media (min-width: 640px) {
  .summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  dialog.sheet { margin: auto; border-radius: 26px; }
  .sheet-actions { position: static; }
  .toolbar { grid-template-columns: 1fr auto auto; } .search { grid-column: auto; }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-head .btn { width: auto; }
  #toast { bottom: 28px; }
}
@media (min-width: 900px) {
  #app { display: grid; grid-template-columns: 264px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100dvh; padding: 26px 16px; background: var(--nav); color: #fff; }
  .brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; } .brand b { display: block; font-size: 1.1rem; } .brand small { color: #9db4cd; }
  #side-nav { display: grid; gap: 4px; }
  #side-nav button { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 13px; color: #c9d7e8; font-weight: 650; text-align: left; }
  #side-nav button:hover { background: #ffffff12; color: #fff; }
  #side-nav button[aria-current=page] { background: #ffffff1c; color: #fff; box-shadow: inset 3px 0 #6ee7c7; }
  #side-nav .ic { color: #6ee7c7; }
  .side-foot { margin-top: auto; padding: 0 8px; color: #9db4cd; font-size: .85rem; overflow-wrap: anywhere; }
  .bnav, .only-m { display: none !important; }
  .hide-m { display: inline-flex !important; }
  .appbar { padding: 22px 32px 10px; } .appbar h1 { font-size: 1.7rem; }
  .view { padding: 8px 32px 56px; } .banner { margin-inline: 32px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-card { padding: 28px 30px 24px; } .hero-actions { max-width: 420px; }
  .cols { grid-template-columns: 1fr 1.25fr; align-items: start; }
  .tx-list { display: none; } .table-wrap { display: block; }
  .toolbar { grid-template-columns: 1fr 190px 200px auto; }
  .people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bar { max-width: 18px; } .bar.s0 { transform: translateX(calc(-50% - 20px)); } .bar.s2 { transform: translateX(calc(-50% + 20px)); }
  .chart-plot .mcol { height: 230px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .bnav, .side, .appbar, #toast { display: none !important; } }
tbody td:nth-child(2) { max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
