:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #020914;
  --surface: #071522;
  --surface-2: #0b1b2b;
  --surface-3: #102235;
  --line: rgba(154, 184, 208, .14);
  --line-strong: rgba(154, 184, 208, .24);
  --text: #f4f8fb;
  --muted: #91a5b7;
  --muted-2: #667d91;
  --green: #35dc8a;
  --green-soft: #8af4bd;
  --blue: #56c9ff;
  --purple: #bc91ff;
  --red: #ff636b;
  --red-soft: #ff989e;
  --amber: #ffc86a;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 82% -8%, rgba(53, 220, 138, .12), transparent 30rem),
    radial-gradient(circle at 4% 28%, rgba(86, 201, 255, .055), transparent 24rem),
    var(--bg);
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
input, select { font-size: 16px; }
button, input, select { -webkit-appearance: none; appearance: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.loading { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }
.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  position: relative;
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(6, 17, 29, .985), rgba(3, 11, 20, .99));
  border-inline: 1px solid rgba(255, 255, 255, .035);
  overflow-x: clip;
}

.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  min-height: 72px;
  padding-block: calc(12px + env(safe-area-inset-top)) 11px;
  padding-inline-start: max(16px, env(safe-area-inset-left));
  padding-inline-end: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(5, 16, 28, .98), rgba(5, 16, 28, .86));
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.topbar h1 { margin: 2px 0 0; font-size: 20px; line-height: 1.2; letter-spacing: -.3px; }
.topbar h1 i { color: var(--green); font-style: normal; }
.eyebrow { display: block; color: var(--muted); font-size: 11px; }
.local-pill { min-height: 30px; display: flex; align-items: center; gap: 6px; padding: 5px 9px; color: #bfceda; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 999px; font-size: 10px; white-space: nowrap; }
.local-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(53,220,138,.72); }

main {
  padding-block: 15px 24px;
  padding-inline-start: max(14px, env(safe-area-inset-left));
  padding-inline-end: max(14px, env(safe-area-inset-right));
}
.screen { display: flex; flex-direction: column; gap: 13px; animation: enter .18s ease-out; }
@keyframes enter { from { opacity: .45; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.notice {
  width: calc(100% - 28px);
  min-height: 45px;
  margin: 10px 14px 0;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(86,201,255,.24);
  border-radius: 13px;
  color: #dceef7;
  background: rgba(86,201,255,.08);
  text-align: start;
  font-size: 12px;
}
.notice.success { border-color: rgba(53,220,138,.28); background: rgba(53,220,138,.09); color: #ddfaeb; }
.notice.danger { border-color: rgba(255,99,107,.3); background: rgba(255,99,107,.09); color: #ffe1e3; }
.notice b { color: var(--muted); font-size: 18px; }

.hero-card, .plan-card, .reserve-card, .pnl-card, .form-card, .allocation-card,
.debt-card, .next-debt, .chart-card, .distribution-card, .report-hero,
.settings-card, .privacy-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0,0,0,.13);
}
.hero-card {
  min-height: 190px;
  padding: 19px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 38, 55, .98), rgba(6, 20, 33, .98));
}
.hero-card::after { content: ""; position: absolute; inline-size: 190px; block-size: 190px; inset-inline-end: -70px; inset-block-start: -105px; border-radius: 50%; background: rgba(53,220,138,.06); }
.hero-copy { min-width: 0; position: relative; z-index: 1; }
.hero-copy > small { display: block; color: var(--muted); margin-top: 15px; font-size: 11px; }
.hero-copy h2 { margin: 5px 0 5px; font-size: clamp(25px, 7.5vw, 34px); letter-spacing: -1px; color: var(--green-soft); white-space: nowrap; }
.hero-copy h2.negative { color: var(--red-soft); }
.hero-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.tag { display: inline-flex; align-items: center; width: fit-content; padding: 5px 8px; border-radius: 999px; border: 1px solid rgba(53,220,138,.18); background: rgba(53,220,138,.08); color: var(--green-soft); font-size: 10px; }
.tag.live { box-shadow: 0 0 20px rgba(53,220,138,.09); }
.ring { --progress: 0%; width: 112px; aspect-ratio: 1; flex: 0 0 auto; position: relative; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) var(--progress), rgba(255,255,255,.08) 0); box-shadow: 0 0 34px rgba(53,220,138,.08); }
.ring::before { content: ""; position: absolute; inset: 10px; border-radius: inherit; background: #0a1826; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
.ring div { position: relative; display: grid; text-align: center; }
.ring strong { font-size: 21px; }
.ring small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.allocation-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.metric { min-width: 0; min-height: 70px; padding: 11px 9px; display: grid; align-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.metric span { color: var(--muted); font-size: 10px; }
.metric strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; white-space: nowrap; }
.metric.purple { box-shadow: inset 0 2px 0 rgba(188,145,255,.38); }.metric.purple strong { color: #d9c0ff; }
.metric.blue { box-shadow: inset 0 2px 0 rgba(86,201,255,.38); }.metric.blue strong { color: #8bdbff; }
.metric.green { box-shadow: inset 0 2px 0 rgba(53,220,138,.38); }.metric.green strong { color: var(--green-soft); }

.primary, .secondary, .ghost, .danger-outline, .danger-solid, .icon-button {
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform .12s ease, border-color .12s ease, filter .12s ease;
}
.primary { color: #03150c; background: linear-gradient(180deg, #3be292, #21be6c); font-weight: 800; box-shadow: 0 10px 26px rgba(53,220,138,.14); }
.secondary { color: #c9f4ff; background: linear-gradient(180deg, rgba(86,201,255,.14), rgba(86,201,255,.07)); border-color: rgba(86,201,255,.24); font-weight: 700; }
.ghost { color: #d5e0e8; background: rgba(255,255,255,.035); border-color: var(--line-strong); }
.danger-outline { color: var(--red-soft); background: transparent; border-color: rgba(255,99,107,.48); }
.danger-solid { color: white; background: #c63f48; border-color: #e85b63; font-weight: 700; }
.primary:active, .secondary:active, .ghost:active, .danger-outline:active, .danger-solid:active { transform: translateY(1px); }
.big { width: 100%; min-height: 49px; }
.icon-button { width: 44px; padding: 0; display: grid; place-items: center; color: var(--green-soft); border-color: rgba(53,220,138,.24); background: rgba(53,220,138,.08); font-size: 25px; }

.plan-card { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border-radius: 17px; overflow: hidden; }
.plan-card > div { min-width: 0; padding: 12px 9px; display: grid; gap: 5px; border-inline-end: 1px solid var(--line); }
.plan-card > div:last-child { border: 0; }
.plan-card span { color: var(--muted); font-size: 9px; }
.plan-card strong { overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.section-heading { min-height: 35px; margin-top: 3px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-heading h2, .section-heading h3, .form-title h3 { margin: 3px 0 0; }
.section-heading h2 { font-size: 22px; }.section-heading h3 { font-size: 15px; }
.section-heading > span, .form-title > span { color: var(--muted); font-size: 10px; }
.section-heading p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.section-heading.major { align-items: center; margin-bottom: 2px; }
.section-heading.centered { text-align: center; justify-content: center; }
.section-heading.centered p { max-width: 360px; }
.kicker { color: var(--green); font-size: 10px; }

.stats-grid, .trade-stats, .report-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.trade-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
.stat { min-width: 0; min-height: 80px; padding: 11px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.stat span { color: var(--muted); font-size: 10px; }
.stat strong { overflow: hidden; text-overflow: ellipsis; font-size: 15px; white-space: nowrap; }
.stat small { color: var(--muted-2); font-size: 9px; }
.stat.positive-stat strong { color: var(--green-soft); }.stat.negative-stat strong { color: var(--red-soft); }
.reserve-card { padding: 13px; border-radius: 17px; }
.reserve-card > div:first-child { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.reserve-card > div > div { display: grid; gap: 4px; }
.reserve-card span, .reserve-card small { color: var(--muted); font-size: 10px; }.reserve-card strong { font-size: 14px; }
.progress-track { height: 7px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.065); }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--blue)); }

.stop-card { padding: 14px; display: grid; gap: 5px; border: 1px solid; border-radius: 17px; text-align: center; }
.stop-card span { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; }.stop-card strong { font-size: 16px; }.stop-card p { margin: 0; font-size: 10px; line-height: 1.6; }
.stop-profit { border-color: rgba(53,220,138,.32); background: linear-gradient(145deg, rgba(53,220,138,.13), rgba(53,220,138,.055)); }.stop-profit span, .stop-profit strong { color: var(--green-soft); }.stop-profit p { color: #a9cbb9; }
.stop-loss { border-color: rgba(255,99,107,.42); background: linear-gradient(145deg, rgba(255,99,107,.16), rgba(255,99,107,.055)); box-shadow: 0 0 30px rgba(255,99,107,.08); }.stop-loss span, .stop-loss strong { color: var(--red-soft); }.stop-loss strong { font-size: 22px; letter-spacing: 1px; }.stop-loss p { color: #d9a4a7; }

.setup-mark { width: 74px; height: 74px; margin: 7vh auto 2px; display: grid; place-items: center; color: var(--green); border: 1px solid rgba(53,220,138,.25); border-radius: 24px; background: rgba(53,220,138,.075); }
.setup-mark svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.form-card, .settings-card { padding: 14px; display: grid; gap: 12px; border-radius: 18px; }
.form-card.compact { gap: 10px; }
.form-card label, .modal-form label, .settings-card > label { display: grid; gap: 7px; }
.form-card label > span, .modal-form label > span, .settings-card > label > span { color: #c5d2dc; font-size: 11px; }
input, select { width: 100%; min-height: 46px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 11px; outline: 0; color: var(--text); background: #06121e; }
input::placeholder { color: #587084; }
input:focus, select:focus { border-color: rgba(53,220,138,.52); box-shadow: 0 0 0 3px rgba(53,220,138,.07); }
.money-field { position: relative; }
.money-field input { padding-inline-end: 48px; direction: ltr; text-align: start; }
.money-field b { position: absolute; inset-inline-end: 11px; inset-block-start: 50%; transform: translateY(-50%); color: var(--muted); font-size: 10px; pointer-events: none; }
.guardrail { min-height: 42px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.02); font-size: 11px; }
.guardrail span { color: var(--muted); }
.form-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.form-title h3 { font-size: 14px; }.form-title > strong { color: var(--green-soft); font-size: 12px; }
.segmented { display: grid; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.16); }
.segmented button { min-height: 38px; padding: 6px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 11px; }
.result-switch { grid-template-columns: 1fr 1fr; }
.result-switch button.active.profit { color: #c7f9dd; background: rgba(53,220,138,.16); }.result-switch button.active.loss { color: #ffd1d3; background: rgba(255,99,107,.16); }

.session-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.session-title h2 { margin: 7px 0 0; font-size: 21px; }.capital { display: grid; gap: 3px; text-align: end; }.capital small { color: var(--muted); font-size: 9px; }.capital strong { font-size: 14px; }
.pnl-card { padding: 18px 14px 11px; border-radius: 22px; text-align: center; background: linear-gradient(155deg, rgba(53,220,138,.105), rgba(7,21,34,.97)); border-color: rgba(53,220,138,.18); }
.pnl-card.loss { background: linear-gradient(155deg, rgba(255,99,107,.11), rgba(7,21,34,.97)); border-color: rgba(255,99,107,.23); }
.pnl-card > small { color: var(--muted); font-size: 11px; }.pnl-card > strong { display: block; margin: 5px 0 11px; color: var(--green-soft); font-size: 31px; }.pnl-card.loss > strong { color: var(--red-soft); }
.pnl-progress { height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.055); }.pnl-progress i { display: block; height: 100%; background: var(--green); }.pnl-card.loss .pnl-progress i { background: var(--red); }
.mini-row { margin-top: 9px; padding-top: 9px; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.locked-card, .completed-note { padding: 12px 13px; border: 1px solid rgba(255,200,106,.2); border-radius: 14px; color: #dac7a1; background: rgba(255,200,106,.065); font-size: 11px; line-height: 1.65; text-align: center; }
.completed-note { border-color: rgba(53,220,138,.2); color: #a8d7bd; background: rgba(53,220,138,.06); }
.allocation-card { padding: 13px; border-radius: 17px; }
.allocation-card .form-title { margin-bottom: 6px; }
.allocation-card > div:not(.form-title) { min-height: 40px; display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; border-top: 1px solid var(--line); font-size: 11px; }
.allocation-card > div strong { font-size: 12px; }
.purple-dot, .blue-dot, .green-dot, .red-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }.purple-dot { background: var(--purple); }.blue-dot { background: var(--blue); }.green-dot { background: var(--green); }.red-dot { background: var(--red); }
.trade-list, .debt-list, .closed-list, .history-list { display: grid; gap: 8px; }
.trade-row { min-height: 72px; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.trade-copy { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 7px; }.trade-copy strong { overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }.trade-copy small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.trade-result { padding: 3px 6px; border-radius: 7px; font-size: 8px; }.trade-result.profit { color: var(--green-soft); background: rgba(53,220,138,.1); }.trade-result.loss { color: var(--red-soft); background: rgba(255,99,107,.1); }
.trade-side { flex: 0 0 auto; display: grid; justify-items: end; gap: 7px; }.trade-side b { font-size: 12px; }.mini-actions { display: flex; gap: 9px; }.mini-actions button { min-height: 26px; padding: 2px; border: 0; color: var(--blue); background: transparent; font-size: 9px; }.mini-actions button.danger-link { color: var(--red-soft); }
.positive { color: var(--green-soft) !important; }.negative { color: var(--red-soft) !important; }
.empty-inline { min-height: 100px; padding: 20px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px dashed var(--line-strong); border-radius: 16px; text-align: center; }.empty-inline strong { font-size: 12px; }.empty-inline span { color: var(--muted); font-size: 10px; }

.next-debt { padding: 16px; border-radius: 21px; border-color: rgba(53,220,138,.22); background: linear-gradient(145deg, rgba(13,39,39,.94), rgba(7,23,35,.98)); }
.next-title { margin: 11px 0 4px; display: flex; align-items: start; justify-content: space-between; gap: 12px; }.next-title h3 { margin: 0 0 3px; font-size: 17px; }.next-title p { margin: 0; color: var(--muted); font-size: 10px; }.next-title > strong { color: var(--green-soft); font-size: 13px; }.next-debt > small { display: block; margin: 6px 0 12px; color: var(--muted); font-size: 9px; }
.debt-card { padding: 12px; border-radius: 17px; }
.debt-card-head, .debt-meta, .card-actions, .debt-name, .debt-details { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.priority-badge { padding: 4px 7px; border-radius: 8px; color: var(--green-soft); background: rgba(53,220,138,.09); font-size: 9px; }.score { color: var(--muted); font-size: 8px; }
.debt-name { margin: 11px 0; align-items: start; }.debt-name > div { min-width: 0; display: grid; gap: 3px; }.debt-name strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; white-space: nowrap; }.debt-name span { color: var(--muted); font-size: 10px; }.debt-name > b { flex: 0 0 auto; color: var(--green-soft); font-size: 13px; }
.debt-details { padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.12); }.debt-details > div { display: grid; gap: 4px; }.debt-details > div:last-child { text-align: end; }.debt-details span { color: var(--muted); font-size: 8px; }.debt-details strong { font-size: 11px; }
.early-payoff { margin-top: 8px; padding: 7px 9px; border-radius: 9px; color: #a7d8ee; background: rgba(86,201,255,.06); font-size: 9px; }.early-payoff strong { color: var(--blue); }
.debt-meta { margin: 9px 0; color: var(--muted-2); font-size: 8px; }.debt-meta span:last-child { color: var(--green); }
.card-actions { display: grid; grid-template-columns: .8fr 1fr 1fr; }.card-actions button { min-height: 40px; padding: 6px; font-size: 9px; }
.closed-debt { min-height: 66px; padding: 10px 11px; display: grid; grid-template-columns: 31px minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }.closed-check { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: rgba(53,220,138,.1); }.closed-debt > div:nth-child(2) { min-width: 0; display: grid; gap: 3px; }.closed-debt strong { overflow: hidden; text-overflow: ellipsis; font-size: 10px; white-space: nowrap; }.closed-debt span { color: var(--muted); font-size: 8px; }.closed-debt b { color: var(--green-soft); font-size: 9px; }
.success-box { min-height: 120px; padding: 20px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px solid rgba(53,220,138,.25); border-radius: 18px; color: var(--green-soft); background: rgba(53,220,138,.065); text-align: center; }.success-box span { color: var(--muted); font-size: 10px; }

.report-tabs { grid-template-columns: repeat(4, 1fr); }.report-tabs button.active { color: #06150e; background: var(--green); font-weight: 800; }
.period-label { margin-top: -4px; color: var(--muted); font-size: 9px; text-align: center; }
.report-hero { padding: 18px; border-radius: 21px; text-align: center; background: linear-gradient(150deg, rgba(53,220,138,.1), rgba(7,21,34,.98)); }.report-hero > span { color: var(--muted); font-size: 10px; }.report-hero > strong { display: block; margin: 5px 0 13px; color: var(--green-soft); font-size: 30px; }.report-hero > div { padding-top: 10px; display: flex; justify-content: space-around; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.report-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }.report-grid .stat { min-height: 74px; }
.chart-card, .distribution-card { padding: 13px; border-radius: 18px; }
.bar-chart { height: 145px; margin-top: 10px; padding-top: 12px; display: flex; align-items: stretch; gap: 5px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: none; }.bar-chart::-webkit-scrollbar { display: none; }.bar-column { min-width: 12px; flex: 1 0 12px; display: grid; grid-template-rows: 1fr auto; gap: 5px; text-align: center; }.bar-space { min-height: 110px; display: flex; align-items: end; justify-content: center; }.bar-space i { width: 70%; max-width: 14px; min-height: 5px; display: block; border-radius: 5px 5px 2px 2px; }.bar-space i.up { background: linear-gradient(180deg, var(--green), #1fae64); }.bar-space i.down { background: linear-gradient(180deg, var(--red), #b93840); }.bar-space i.flat { background: #53697b; }.bar-column > span { color: var(--muted-2); font-size: 7px; }
.chart-legend { margin-top: 8px; display: flex; justify-content: center; gap: 14px; color: var(--muted); font-size: 8px; }.chart-legend span { display: flex; align-items: center; gap: 5px; }
.distribution-bar { height: 9px; margin: 13px 0 8px; display: flex; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.06); }.distribution-bar i { height: 100%; }.distribution-bar .personal { background: var(--purple); }.distribution-bar .debt { background: var(--blue); }.distribution-bar .reserve { background: var(--green); }
.distribution-row { min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 9px; border-top: 1px solid var(--line); font-size: 10px; }.distribution-row span { display: flex; align-items: center; gap: 7px; }.distribution-row strong { font-size: 11px; }
.history-row { min-height: 60px; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }.history-row > div { display: grid; gap: 4px; }.history-row strong { font-size: 11px; }.history-row span { color: var(--muted); font-size: 8px; }.history-row > b { font-size: 11px; }

.setting-row { min-height: 62px; padding-bottom: 10px; display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.setting-row > span { display: grid; gap: 4px; }.setting-row > span strong { color: #d8e2ea; font-size: 11px; }.setting-row > span small { max-width: 220px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.setting-row .money-field { width: 125px; flex: 0 0 125px; }.setting-row .money-field input { min-height: 40px; }.setting-row select { width: 145px; min-height: 40px; color: var(--muted); font-size: 10px; opacity: 1; }
.backup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.file-button { min-height: 44px; display: grid; place-items: center; text-align: center; font-size: 12px; }.file-button input { display: none; }
.privacy-card { padding: 13px; display: grid; grid-template-columns: 36px 1fr; align-items: start; gap: 10px; border-radius: 17px; border-color: rgba(86,201,255,.15); background: rgba(86,201,255,.045); }.lock-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--blue); background: rgba(86,201,255,.1); }.privacy-card strong { color: #bcecff; font-size: 11px; }.privacy-card p, .muted { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.danger-zone { border-color: rgba(255,99,107,.18); }.danger-text { color: var(--red-soft); }.reset-confirm { padding: 11px; border: 1px solid rgba(255,99,107,.24); border-radius: 13px; background: rgba(255,99,107,.06); }.reset-confirm strong { color: var(--red-soft); font-size: 12px; }.reset-confirm p { margin: 6px 0 10px; color: #c7a3a6; font-size: 10px; line-height: 1.6; }.reset-confirm > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.reset-confirm.final { border-color: rgba(255,99,107,.42); }

.bottom-nav {
  position: fixed;
  z-index: 40;
  inset-inline-start: 50%;
  inset-block-end: 0;
  transform: translateX(50%);
  width: min(100%, 520px);
  min-height: calc(66px + env(safe-area-inset-bottom));
  padding-block: 6px calc(6px + env(safe-area-inset-bottom));
  padding-inline-start: max(7px, env(safe-area-inset-left));
  padding-inline-end: max(7px, env(safe-area-inset-right));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(4,14,24,.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.bottom-nav button { min-width: 44px; min-height: 52px; padding: 4px 1px; display: grid; justify-items: center; align-content: center; gap: 4px; border: 0; border-radius: 10px; color: #73899c; background: transparent; }
.bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }.bottom-nav span { font-size: 9px; }.bottom-nav button.active { color: var(--green); background: rgba(53,220,138,.045); }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; padding-block: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-bottom)); padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); display: flex; align-items: end; justify-content: center; background: rgba(0,6,12,.76); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.modal { width: min(100%, 486px); max-height: min(86vh, 720px); max-height: min(86dvh, 720px); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 22px; background: #091827; box-shadow: 0 30px 100px rgba(0,0,0,.55); animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: .5; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal-head { min-height: 58px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }.modal-head h2 { margin: 0; font-size: 17px; }.modal-head button { width: 38px; height: 38px; border: 0; border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.04); font-size: 22px; }
.modal-body { padding: 15px; }.modal-body > p { margin: 0 0 9px; color: #c3d0da; font-size: 12px; line-height: 1.75; }.modal-form { display: grid; gap: 11px; }.modal-form > small { color: var(--muted); font-size: 9px; line-height: 1.6; }
.modal-footer { padding: 12px 15px calc(12px + env(safe-area-inset-bottom)); display: flex; justify-content: end; gap: 8px; border-top: 1px solid var(--line); }.modal-footer > * { flex: 1; }.modal-footer > :only-child { flex: 1 1 100%; }
.confirm-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.confirm-summary span { padding: 9px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 9px; }.confirm-summary strong { color: var(--text); font-size: 11px; }.danger-modal .modal-head h2 { color: var(--red-soft); }

@media (min-width: 700px) {
  .app-shell { min-height: calc(100vh - 32px); min-height: calc(100dvh - 32px); margin-block: 16px; border-radius: 28px; box-shadow: 0 30px 100px rgba(0,0,0,.42); }
  .topbar { border-radius: 28px 28px 0 0; }
  .bottom-nav { inset-block-end: 16px; border-radius: 0 0 28px 28px; }
  .modal-backdrop { align-items: center; }
}

@media (max-width: 370px) {
  main { padding-inline: 10px; }
  .topbar { padding-inline: 12px; }
  .hero-card { min-height: 174px; padding: 15px; }
  .ring { width: 96px; }
  .allocation-grid { gap: 5px; }.metric { padding-inline: 6px; }.metric strong { font-size: 11px; }
  .report-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card-actions { grid-template-columns: 1fr 1fr; }.card-actions .primary { grid-column: 1 / -1; }
  .setting-row .money-field { width: 108px; flex-basis: 108px; }
  .bottom-nav span { font-size: 8px; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .topbar { position: relative; padding-top: max(10px, env(safe-area-inset-top)); }
  .setup-mark { margin-top: 8px; }
  .modal-backdrop { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
