/* Money Tracker — dark blue theme */
:root {
  --bg: #0A1428;
  --bg-2: #0D1931;
  --card: #111E38;
  --line: #24365C;
  --line-soft: #1A2A4A;
  --seg: #18284A;
  --text: #E8EEF9;
  --text-2: #C3CFE3;
  --muted: #9FB0CC;
  --muted-2: #8597B5;
  --accent: #2F6BFF;
  --accent-2: #4C83FF;
  --accent-text: #7FA8FF;
  --accent-soft: #16305C;
  --hero: #1A3A8A;
  --pos: #5EE0A0;
  --danger: #FF8A8A;
  --warn: #FFA36B;
  --radius: 16px;
  --tabbar-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); min-height: 100%; }
body { font-size: 15px; line-height: 1.4; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1 { font-size: 22px; margin: 0; font-weight: 700; }
h2 { font-size: 15px; margin: 0; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
}
input::placeholder { color: #6E82A8; }
input[type='checkbox'] { width: 20px; min-height: 20px; height: 20px; padding: 0; accent-color: var(--accent); }
input[type='date'] { width: auto; color-scheme: dark; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
select:disabled, input:disabled { opacity: 0.6; }

/* ---- text helpers ---- */
.strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.center { text-align: center; }
.right { text-align: right; }
.pos { color: var(--pos); }
.danger { color: var(--danger); }
.error { color: var(--danger); font-size: 13px; min-height: 0; }
.error:empty { display: none; }
.warn { color: var(--warn); font-size: 13px; background: #3A2518; padding: 10px 12px; border-radius: 12px; }
.warn-text { color: var(--warn); }
.today-text { color: var(--accent-text); font-weight: 600; }
.label { font-size: 12px; font-weight: 600; color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--accent-text); }
.link { color: var(--accent-text); font-size: 13px; font-weight: 500; }

/* ---- layout helpers ---- */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.end { align-items: flex-end; text-align: right; }
.between { justify-content: space-between; }
.gap { gap: 10px; }
.gap-xs { gap: 6px; }
.wrap { flex-wrap: wrap; }
.center-y { align-items: center; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-xs { display: flex; flex-direction: column; gap: 6px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid-home { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.grid-cal { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }

/* ---- shell ---- */
.shell { min-height: 100vh; padding-top: var(--safe-t); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.content { min-width: 0; }
.shell:not(.bare):not(.focus) .content { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); }
.sidebar { display: none; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.page { max-width: 1180px; margin: 0 auto; padding: 18px 18px 24px; display: flex; flex-direction: column; gap: 16px; }
.page.narrow { max-width: 620px; }
.page-head { display: flex; align-items: center; gap: 10px; min-height: 44px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--card); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); min-height: 48px; justify-content: center; }
.tabbar a.on { color: var(--accent-text); font-weight: 600; }
.tabbar .tab-add { justify-self: center; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); margin-top: -26px; box-shadow: 0 6px 16px rgba(47, 107, 255, 0.4); }

@media (min-width: 900px) {
  .shell:not(.bare) { display: grid; grid-template-columns: 248px 1fr; }
  .shell:not(.bare):not(.focus) .content { padding-bottom: 32px; }
  .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 22px; position: sticky; top: var(--safe-t); height: calc(100vh - var(--safe-t));
    padding: 24px 16px; background: var(--bg-2); border-right: 1px solid #1E2E52;
  }
  .page { padding: 28px 32px 40px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .grid-home { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .grid-cal { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; padding: 0 8px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 16px; }
.side-add { justify-content: center; }
.side-nav { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.side-nav a { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px; }
.side-nav a:hover { color: var(--text); background: #121F3B; }
.side-nav a.on { background: var(--seg); color: #fff; font-weight: 600; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px; border-top: 1px solid #1E2E52; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #23407A; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 46px; height: 46px; font-size: 18px; }

/* ---- controls ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 14px; background: var(--card); color: var(--text); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-lg { min-height: 52px; border-radius: 14px; font-size: 16px; width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #3D76FF; }
.btn-ghost { border-color: var(--line); color: var(--text-2); font-weight: 500; }
.btn-danger { background: #B4232F; color: #fff; }
.btn-danger-ghost { border-color: #5A2A35; color: var(--danger); font-weight: 500; }
.btn-dashed { border: 1px dashed #4A6290; background: transparent; color: var(--text-2); font-weight: 500; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.icon-btn.ring { border: 1px solid var(--line); background: var(--card); width: 40px; height: 40px; }
.icon-btn.sm { width: 34px; height: 34px; color: var(--muted); }
.icon-btn.xs { width: 28px; height: 22px; color: var(--muted); border-radius: 6px; }
.icon-btn:disabled { opacity: 0.3; }
.icon-btn-space { width: 44px; flex: none; }
.link-btn { border: 0; background: transparent; color: var(--accent-text); font-weight: 500; padding: 0 12px; min-height: 44px; }
.seg { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg > * { flex: 1; min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; white-space: nowrap; }
.seg > .on { background: #2F4F95; color: #fff; }
.seg.inline { display: inline-flex; background: var(--seg); border: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.field > label, .field > .label { font-size: 12px; font-weight: 600; color: var(--muted); }
.hint { font-size: 11px; color: var(--muted-2); }
.hint.good { color: var(--pos); }
.hint.bad { color: var(--danger); }
.input-with-btn { display: flex; align-items: center; border: 1px solid var(--line); background: var(--card); border-radius: 12px; }
.input-with-btn input { border: 0; background: transparent; }
.strength { display: flex; gap: 4px; }
.strength span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.strength span.on { background: var(--warn); }
.strength span.on.s3, .strength span.on.s4 { background: var(--pos); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); min-height: 44px; }
.chip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chip { min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); min-height: 32px; border-radius: 16px; }
.chip-select { min-height: 40px; font-size: 13px; }
.chip-row { display: flex; gap: 6px; overflow-x: auto; align-items: center; padding-bottom: 2px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.option { text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 3px; }
.option.on { border: 2px solid var(--accent-2); }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.swatch { height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: flex; align-items: center; justify-content: center; }
.swatch span { width: 24px; height: 24px; border-radius: 50%; }
.swatch.on { border: 2px solid var(--text); }
.icon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.icon-pick { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: flex; align-items: center; justify-content: center; }
.icon-pick.on { border-width: 1.5px; }
.pill { align-self: flex-start; font-size: 11px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); padding: 3px 8px; border-radius: 8px; }
.pill.blue { color: #C9D8FF; background: var(--hero); }
.pill-dark { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: rgba(10, 20, 40, 0.18); }
.badge { font-size: 10px; font-weight: 600; color: var(--muted); border: 1px solid #2F4470; padding: 3px 6px; border-radius: 6px; }
.tag { font-size: 11px; padding: 3px 7px; border-radius: 8px; white-space: nowrap; }
.tile { display: inline-flex; align-items: center; justify-content: center; border-radius: 30%; flex: none; background: var(--seg); }

/* ---- cards & lists ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card.list { padding: 0; }
.card.accent { border-color: var(--accent-2); }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 52px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; width: 100%; text-align: left; font-size: 14px; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover, button.list-row:hover { background: #142343; }
.list-row.faded { opacity: 0.5; }
.card .list .list-row { padding-left: 0; padding-right: 0; }
.reorder { display: flex; flex-direction: column; }
.empty { text-align: center; color: var(--muted); padding: 24px 12px; display: flex; flex-direction: column; gap: 12px; align-items: center; font-size: 14px; }
details.archived summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 2px; }

/* ---- auth ---- */
.auth { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 28px 18px; }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.auth-card.wide { max-width: 520px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0 4px; text-align: center; }
@media (min-width: 700px) { .auth { align-items: center; } .auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; } }

/* ---- home ---- */
.balance-card { background: var(--hero); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 6px; color: #fff; }
.balance-card .big { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; }
.soft { color: #C9D8FF; } .soft2 { color: #DDE6FF; } .soft3 { color: #A9BEF0; }
.warn-btn { margin-top: 4px; align-self: flex-start; border: 0; border-radius: 10px; background: rgba(255, 163, 107, 0.18); color: #FFD2B5; padding: 8px 10px; font-size: 12px; text-align: left; }
.wallet-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.wallet-strip::-webkit-scrollbar { display: none; }
.wallet-mini { flex: 0 0 140px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--accent); display: flex; flex-direction: column; gap: 5px; }
.wallet-mini.add { align-items: center; justify-content: center; color: var(--muted); border-style: dashed; border-top-width: 1px; }
.wallet-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--accent); }
.wallet-card { border-radius: 18px; padding: 18px; color: #0A1428; display: flex; flex-direction: column; gap: 8px; min-height: 92px; }

/* ---- add / transfer ---- */
.amount-box { padding: 10px 0 2px; display: flex; flex-direction: column; gap: 6px; }
.amount-line { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.amount-cur { font-size: 28px; font-weight: 700; color: var(--muted); }
.amount-input { border: 0; background: transparent; font-size: 42px; font-weight: 700; text-align: center; padding: 0; min-height: 56px; width: 100%; max-width: 320px; letter-spacing: -1px; }
.amount-input:focus { outline: none; }
.amount-input.sm { font-size: 26px; text-align: right; max-width: none; min-height: 44px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 560px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }
.cat-btn { min-height: 68px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 6px 4px; text-align: center; }
.cat-btn.on { border-width: 2px; background: #15264A; }
.cat-btn.add { border-style: dashed; color: var(--muted); }
.cat-btn span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sticky-actions { position: sticky; bottom: 0; padding: 10px 0 calc(10px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.target-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.target { min-height: 56px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
.target.on { background: var(--hero); border: 1.5px solid var(--accent-2); }
.calc { font-size: 17px; font-weight: 600; color: var(--accent-text); text-align: right; }

/* ---- reports ---- */
.period-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.donut { position: relative; width: 140px; height: 140px; flex: none; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bars { height: 120px; display: flex; align-items: flex-end; gap: 3px; }
.bar { flex: 1; min-width: 3px; background: #3B5A99; border-radius: 3px 3px 1px 1px; }
.bar.today { background: var(--accent); }
.bar:hover { background: var(--accent-2); }
.meter { display: block; height: 5px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 3px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 10px; color: var(--muted-2); text-align: center; padding-bottom: 2px; }
.cal-day { min-height: 54px; border-radius: 10px; border: 1px solid transparent; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; overflow: hidden; }
.cal-day.sel { border: 2px solid var(--text); }
.cal-day.today .cal-num { color: var(--accent-text); }
.cal-day.future { background: var(--bg-2); color: #4A6290; }
.cal-num { font-size: 12px; font-weight: 600; }
.cal-amt { font-size: 10px; color: var(--text-2); }
.cal-lines { display: flex; gap: 2px; }
.cal-line { display: inline-flex; align-items: center; gap: 4px; }
.cal-line .dot { width: 5px; height: 5px; }
.cal-line-text { display: none; font-size: 10px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) {
  .cal-day { min-height: 96px; align-items: stretch; text-align: left; padding: 8px; gap: 4px; }
  .cal-num { display: flex; }
  .cal-amt { font-size: 12px; font-weight: 600; color: var(--text); }
  .cal-lines { flex-direction: column; gap: 3px; }
  .cal-line-text { display: inline; }
}
.legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.legend-box { width: 12px; height: 9px; border-radius: 3px; display: inline-block; }
.week-chart { height: 170px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; }
.week-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 4px; text-align: center; }
.week-col.future { opacity: 0.5; }
.week-bar { display: flex; flex-direction: column-reverse; border-radius: 5px; overflow: hidden; background: var(--line-soft); min-height: 2px; }
.week-bar span { display: block; min-height: 3px; }
.day-card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
.day-card.today { border-color: var(--accent-2); }

/* ---- sheet & toast ---- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(3, 8, 20, 0.7); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; max-height: calc(100vh - var(--safe-t) - 12px); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 16px 18px calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; }
.sheet-actions .btn { flex: 1; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; transition: all 0.25s; z-index: 60; background: #1F3566; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: #6B1F2A; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.pill.warn-pill { color: #FFD2B5; background: rgba(255, 163, 107, 0.18); }

/* ---- swipe to delete ---- */
.swipe { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.swipe:last-child { border-bottom: 0; }
.swipe .swipe-front { position: relative; z-index: 1; background: var(--card); border-bottom: 0; touch-action: pan-y; }
.card .list .swipe .swipe-front { padding-left: 0; padding-right: 0; }
.swipe-delete { position: absolute; top: 0; right: 0; bottom: 0; width: 88px; border: 0; background: #B4232F; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; }

/* ---- home totals carousel ---- */
.totals { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }
.totals::-webkit-scrollbar { display: none; }
.total-card { flex: 0 0 100%; scroll-snap-align: center; box-sizing: border-box; border-radius: 20px; padding: 18px; color: #fff; display: flex; flex-direction: column; gap: 6px; background: var(--hero); }
.total-card.alt { background: #233F7E; }
.total-card .big { font-size: 30px; font-weight: 700; letter-spacing: -0.5px; }
.total-lines { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #DDE6FF; margin-top: 2px; }
.total-lines > span { display: flex; justify-content: space-between; gap: 10px; }
.dots { display: flex; justify-content: center; gap: 6px; }
.dots button { width: 6px; height: 6px; border-radius: 3px; border: 0; padding: 0; background: #2F4470; transition: width 0.2s; }
.dots button.on { width: 18px; background: var(--text); }
.eye-btn { height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; }
@media (min-width: 900px) {
  .totals { margin: 0; padding: 0; overflow: visible; display: grid; grid-template-columns: minmax(0, 1fr); }
  .dots { display: none; }
}

/* ---- quick add keypad (phones) ---- */
.sticky-actions.with-keypad { display: flex; flex-direction: column; gap: 8px; background: var(--card); border-top: 1px solid var(--line); margin: 0 -18px; padding: 10px 12px calc(12px + var(--safe-b)); }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.key { height: 50px; border: 0; border-radius: 12px; background: #17264A; color: var(--text); font-size: 22px; font-weight: 600; touch-action: manipulation; }
.key:active { background: #22365F; }
.key-000 { background: var(--hero); color: #C9D8FF; font-size: 20px; }
.key-del { font-size: 20px; }
.pill.gold-pill { color: #F2C94C; background: #3A3014; }
@media (pointer: fine) { .touch-only { display: none; } }

/* ---- report category filter ---- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip { height: 34px; padding: 0 11px 0 6px; border-radius: 17px; border: 1px solid var(--line); background: var(--card); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.cat-chip.on { color: var(--text); }
.cat-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; color: #0A1428; font-size: 12px; font-weight: 800; flex: none; }
.link-btn.sm { min-height: 28px; padding: 0; font-size: 12px; }
.bar.stacked { display: flex; flex-direction: column-reverse; overflow: hidden; background: var(--line-soft); }
.bar.stacked span { display: block; min-height: 1px; }
.big-num { font-size: 22px; }
.filter-note { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 12px; }
