/* ميزان البيت
   Layout: one phone-width column, big type, a voice/photo/text bar always at hand above the tab bar.
   Palette: muted sage on a soft grey-green paper; never pure white, never near-black. */
:root {
  --bg: #F3F5F4;
  --surface: #FBFCFB;
  --surface-2: #EDF1EF;
  --line: #DCE3E0;
  --ink: #2E3A37;
  --muted: #6B7975;
  --accent: #4E8677;
  --accent-ink: #FBFCFB;
  --accent-soft: #DFECE7;
  --out: #B0656B;
  --out-soft: #F4E4E5;
  --in: #4A8760;
  --in-soft: #E1EFE5;
  --warn: #A87C2E;
  --warn-soft: #F5ECD9;
  --shadow: 0 1px 2px rgb(46 58 55 / .05), 0 6px 20px rgb(46 58 55 / .06);
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --nav-h: 66px;
  --composer-h: 74px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #23292B; --surface: #2B3235; --surface-2: #323A3D; --line: #3E474A;
    --ink: #E2E7E5; --muted: #A1ADA9; --accent: #84BBAC; --accent-ink: #1D2624; --accent-soft: #30443F;
    --out: #DD9AA0; --out-soft: #45343A; --in: #8DC69E; --in-soft: #2F4236; --warn: #DDB873; --warn-soft: #463F2F;
    --shadow: 0 1px 2px rgb(0 0 0 / .18), 0 8px 24px rgb(0 0 0 / .16);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #23292B; --surface: #2B3235; --surface-2: #323A3D; --line: #3E474A;
  --ink: #E2E7E5; --muted: #A1ADA9; --accent: #84BBAC; --accent-ink: #1D2624; --accent-soft: #30443F;
  --out: #DD9AA0; --out-soft: #45343A; --in: #8DC69E; --in-soft: #2F4236; --warn: #DDB873; --warn-soft: #463F2F;
  --shadow: 0 1px 2px rgb(0 0 0 / .18), 0 8px 24px rgb(0 0 0 / .16);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.sprite { position: absolute; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
[hidden] { display: none !important; }
/* arrows drawn for right-to-left; mirror them in English */
html[dir="ltr"] svg.i.flip { transform: scaleX(-1); }
html[lang="en"] body { font-family: "Readex Pro", var(--font-body); }
.lang-btn { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; }
.lang-btn:hover { background: var(--surface-2); }
.auth-top { display: flex; justify-content: flex-end; }
.wipe-opts { display: flex; flex-direction: column; gap: 8px; }
.wipe-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.wipe-opt:has(input:checked) { border-color: var(--out); background: var(--out-soft); }
.wipe-opt input { margin-top: 5px; accent-color: var(--out); width: 18px; height: 18px; flex: none; }
.wipe-opt[aria-disabled="true"] { opacity: .5; cursor: default; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.boot-mark { width: 54px; height: 54px; border-radius: 18px; background: var(--accent-soft); position: relative; }
.boot-mark::after { content: ""; position: absolute; inset: 15px; border-radius: 50%; border: 3px solid var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { padding: 24px; text-align: center; }

/* ---------- shell ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  padding-block: 10px; padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.topbar-in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 19px/1.2 var(--font-display); }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.brand-mark svg { width: 22px; height: 22px; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; color: var(--ink);
}
.icon-btn:hover { background: var(--surface-2); }

main.view {
  flex: 1; width: 100%; max-width: 640px; margin: 0 auto;
  padding-top: 6px;
  padding-bottom: calc(var(--nav-h) + var(--composer-h) + 34px + env(safe-area-inset-bottom, 0px));
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  display: flex; flex-direction: column; gap: 16px;
}
.view-title { font: 600 24px/1.3 var(--font-display); margin: 6px 2px 0; text-wrap: balance; }
.view-sub { color: var(--muted); margin: -10px 2px 0; font-size: 15px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.card.flat { box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title { font: 600 17px/1.4 var(--font-display); margin: 0; }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 600; font-size: 15px; padding: 6px 4px; display: inline-flex; align-items: center; gap: 2px; }
.link-btn svg.i { width: 18px; height: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* hero balance */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 22px 20px 20px; box-shadow: var(--shadow); }
.hero-label { color: var(--muted); font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.hero-amount { font: 600 clamp(40px, 11vw, 54px)/1.1 var(--font-display); margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.hero-amount .cur { font-size: .42em; color: var(--muted); font-weight: 500; margin-inline-start: 6px; }
.hero-amount.neg { color: var(--out); }
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.pill-stat { border-radius: var(--r-md); padding: 10px 14px; }
.pill-stat.in { background: var(--in-soft); }
.pill-stat.out { background: var(--out-soft); }
.pill-stat .k { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.pill-stat .k svg.i { width: 16px; height: 16px; }
.pill-stat.in .k svg { color: var(--in); }
.pill-stat.out .k svg { color: var(--out); }
.pill-stat .v { font: 600 21px/1.3 var(--font-display); font-variant-numeric: tabular-nums; }
.meter { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 14px; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .5s ease; }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--out); }
.meter-cap { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; }

/* per-day */
.perday { display: flex; align-items: center; gap: 16px; }
.perday-num { font: 600 30px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.perday-ring { width: 64px; height: 64px; flex: none; }
.perday-ring circle { fill: none; stroke-width: 7; }
.perday-ring .track { stroke: var(--surface-2); }
.perday-ring .fill { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.perday-ring text { fill: var(--ink); font: 600 15px var(--font-display); }

/* alerts */
.alerts { display: flex; flex-direction: column; gap: 10px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-soft); }
.alert.late { background: var(--out-soft); }
.alert .a-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--warn); flex: none; }
.alert.late .a-ico { color: var(--out); }
.alert .a-body { flex: 1; min-width: 0; }
.alert .a-t { font-weight: 600; }
.alert .a-s { font-size: 14px; color: var(--muted); }

/* rows */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); background: none; border-inline: 0; border-top: 0; width: 100%; text-align: start; }
.row:last-child { border-bottom: 0; }
button.row:hover { background: var(--surface-2); border-radius: 12px; }
.dot { width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center; color: #FBFCFB; }
.dot svg.i { width: 22px; height: 22px; stroke-width: 1.9; }
.row-main { flex: 1; min-width: 0; }
.row-t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-s { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt { font: 600 18px/1.2 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.out { color: var(--ink); }
.amt.in { color: var(--in); }
.day-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; padding: 14px 4px 4px; font-weight: 600; }

/* category bars */
.stack { display: flex; height: 18px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.stack > span { height: 100%; }
.catrow { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 4px 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); background: none; border-inline: 0; border-top: 0; width: 100%; text-align: start; }
.catrow:last-child { border-bottom: 0; }
.catrow .bar { grid-column: 2 / 4; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.catrow .bar > span { display: block; height: 100%; border-radius: inherit; }
.catrow .meta { grid-column: 2 / 4; display: flex; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.delta svg.i { width: 14px; height: 14px; }
.delta.up { color: var(--out); }
.delta.down { color: var(--in); }
.chip-warn { color: var(--warn); font-weight: 600; }
.chip-bad { color: var(--out); font-weight: 600; }

/* insights */
.insights { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.insight { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.insight .ib { width: 8px; align-self: stretch; border-radius: 99px; background: var(--accent); flex: none; }
.insight.warn .ib { background: var(--warn); }
.insight.bad .ib { background: var(--out); }
.insight.good .ib { background: var(--in); }
.ai-box { white-space: pre-line; line-height: 1.9; }
.ai-box.loading { color: var(--muted); }

/* month switcher */
.switcher { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px; }
.switcher .label { font: 600 17px var(--font-display); text-align: center; flex: 1; }
.switcher .icon-btn { border: 0; background: var(--surface-2); }
.switcher .icon-btn:disabled { opacity: .35; cursor: default; }

/* chips / segmented */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 7px 14px; font-size: 15px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; border-radius: 11px; padding: 9px 8px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.seg.type button[data-v="out"][aria-pressed="true"] { color: var(--out); }
.seg.type button[data-v="in"][aria-pressed="true"] { color: var(--in); }

/* ---------- empty / welcome ---------- */
.welcome { text-align: start; }
.welcome h2 { font: 600 22px/1.4 var(--font-display); margin: 0 0 6px; text-wrap: balance; }
.welcome p { margin: 0 0 14px; color: var(--muted); }
.examples { display: flex; flex-direction: column; gap: 8px; }
.example { display: flex; align-items: center; gap: 10px; text-align: start; border: 1px dashed var(--line); background: var(--surface-2); border-radius: var(--r-md); padding: 10px 14px; }
.example svg.i { color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }

/* ---------- composer ---------- */
.composer-wrap {
  position: fixed; inset: auto 0 calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)) 0; z-index: 25;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 8px;
  pointer-events: none;
}
.composer {
  pointer-events: auto; max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 8px;
  box-shadow: var(--shadow);
}
.composer.listening { border-color: var(--out); box-shadow: 0 0 0 4px color-mix(in srgb, var(--out) 18%, transparent), var(--shadow); }
.mic {
  width: 56px; height: 56px; border-radius: 18px; border: 0; flex: none;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; position: relative;
}
.mic svg.i { width: 28px; height: 28px; }
.composer.listening .mic { background: var(--out); }
.composer.listening .mic::after { content: ""; position: absolute; inset: -6px; border-radius: 22px; border: 2px solid var(--out); animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { from { opacity: .8; transform: scale(.92); } to { opacity: 0; transform: scale(1.12); } }
.composer textarea {
  flex: 1; min-width: 0; border: 0; background: none; resize: none; outline: none;
  font-size: 17px; line-height: 1.5; padding: 8px 4px; max-height: 120px; height: 42px;
}
.composer textarea::placeholder { color: var(--muted); }
.composer .side { width: 46px; height: 46px; border-radius: 15px; border: 0; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; flex: none; }
.composer .side.go { background: var(--accent-soft); color: var(--accent); }
.composer .side:disabled { opacity: .5; }
.composer-hint { max-width: 640px; margin: 0 auto 6px; text-align: center; font-size: 14px; color: var(--out); font-weight: 600; pointer-events: none; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 26;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.tabbar-in { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"] svg.i { stroke-width: 2.2; }

/* ---------- sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgb(20 28 26 / .38); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 26px 26px 0 0;
  padding: 10px var(--gutter-r) calc(18px + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  animation: up .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
.sheet-grip { width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet-head h3 { flex: 1; margin: 0; font: 600 20px/1.35 var(--font-display); }
.sheet-body { display: flex; flex-direction: column; gap: 12px; }
.sheet-foot { display: flex; gap: 10px; margin-top: 16px; position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); background: var(--bg); padding-block: 10px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .lbl { font-size: 14px; font-weight: 600; color: var(--muted); }
.input, select.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm);
  padding: 12px 14px; font-size: 17px; min-height: 50px;
}
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input.amount { font: 600 22px var(--font-display); font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > * { min-width: 0; }
.btn {
  border: 0; border-radius: 16px; padding: 14px 18px; font-weight: 600; font-size: 17px; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); flex: 1; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--out-soft); color: var(--out); }
.btn.danger.armed { background: var(--out); color: var(--surface); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; }
.err { color: var(--out); font-size: 14.5px; font-weight: 600; min-height: 1em; }

/* item editor rows in the confirm sheet */
.ed { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ed.unsure { border-color: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.ed-top { display: flex; gap: 10px; align-items: center; }
.ed-top .seg { flex: 1; }
.ed .x { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.ed .warn-note { font-size: 14px; color: var(--warn); font-weight: 600; }
.cat-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-pick button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px 6px 10px; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.cat-pick button .sw { width: 10px; height: 10px; border-radius: 50%; }
.cat-pick button[aria-pressed="true"] { border-color: var(--ink); background: var(--surface-2); font-weight: 600; }
.photo-prev { width: 100%; max-height: 180px; object-fit: contain; border-radius: var(--r-md); background: var(--surface-2); }
.clarify { background: var(--warn-soft); border-radius: var(--r-md); padding: 10px 14px; font-weight: 600; }
.source-note { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.source-note svg.i { width: 16px; height: 16px; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding-block: 28px; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.auth-card { width: 100%; max-width: 430px; display: flex; flex-direction: column; gap: 16px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-bottom: 6px; }
.auth-brand .brand-mark { width: 64px; height: 64px; border-radius: 22px; }
.auth-brand .brand-mark svg { width: 38px; height: 38px; }
.auth-brand h1 { font: 600 30px/1.2 var(--font-display); margin: 0; }
.auth-brand p { margin: 0; color: var(--muted); }
.trust { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.trust svg.i { color: var(--accent); width: 20px; height: 20px; margin-top: 2px; }

/* misc */
.goal-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.code-box { display: flex; align-items: center; gap: 8px; }
.code-box .code { flex: 1; font: 600 22px var(--font-display); letter-spacing: .18em; text-align: center; background: var(--surface-2); border-radius: var(--r-sm); padding: 10px; direction: ltr; user-select: all; }
.learned { display: flex; flex-wrap: wrap; gap: 8px; }
.learned .chip { display: inline-flex; align-items: center; gap: 6px; }
.learned .chip button { border: 0; background: none; color: var(--muted); padding: 0; display: grid; place-items: center; }
.learned .chip svg.i { width: 16px; height: 16px; }
.fx-prog { font-size: 13.5px; color: var(--muted); }
.status { font-size: 13px; font-weight: 600; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.status.paid { background: var(--in-soft); color: var(--in); }
.status.due { background: var(--warn-soft); color: var(--warn); }
.status.late { background: var(--out-soft); color: var(--out); }
.status.later { background: var(--surface-2); color: var(--muted); }
.mini-btn { border: 0; border-radius: 12px; padding: 8px 12px; font-weight: 600; font-size: 14.5px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.fx-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.fx-row:last-child { border-bottom: 0; }
.fx-row .row-main { cursor: pointer; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--composer-h) + 30px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 520px); }
.toast { background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; box-shadow: var(--shadow); animation: up .2s ease; text-align: center; }
.toast.bad { background: var(--out); color: var(--surface); }

@media (min-width: 700px) {
  main.view { gap: 18px; }
  .hero { padding: 26px 26px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
