:root {
  color-scheme: light;
  --ink: #17191f;
  --ink-soft: #656b78;
  --background: #eef1f6;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-line: rgba(255, 255, 255, 0.88);
  --line: rgba(88, 96, 114, 0.14);
  --blue: #4777ed;
  --blue-dark: #2f5ed2;
  --mint: #3ca988;
  --rose: #d86883;
  --violet: #8b6bd8;
  --amber: #d6903f;
  --red: #d75050;
  --shadow: 0 20px 60px rgba(45, 55, 75, 0.12), 0 2px 10px rgba(45, 55, 75, 0.05);
  --shadow-soft: 0 10px 36px rgba(45, 55, 75, 0.08);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1240px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--background); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 5%, rgba(164, 190, 255, .28), transparent 31rem),
    radial-gradient(circle at 93% 23%, rgba(179, 234, 218, .2), transparent 28rem),
    linear-gradient(145deg, #f4f6fa 0%, #e9edf4 100%);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(3px);
  pointer-events: none;
}
.ambient-one { width: 420px; height: 420px; top: -210px; right: -80px; background: rgba(126, 159, 247, .2); }
.ambient-two { width: 350px; height: 350px; left: -180px; top: 55%; background: rgba(121, 219, 184, .16); }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, .6);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 14px;
  display: flex;
  width: min(calc(100% - 32px), var(--max-width));
  height: 64px;
  align-items: center;
  justify-content: space-between;
  margin: 14px auto 0;
  padding: 0 12px 0 16px;
  border-radius: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 18px; font-weight: 720; text-decoration: none; letter-spacing: -.02em; }
.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #5a84ef, #315bd0);
  border-radius: 12px;
  box-shadow: 0 7px 16px rgba(55, 95, 205, .28), inset 0 1px 0 rgba(255,255,255,.3);
}
.brand-icon svg { width: 21px; height: 21px; }
.top-actions { display: flex; align-items: center; gap: 4px; }
.sync-label { margin: 0 10px 0 0; color: var(--ink-soft); font-size: 12px; }
.icon-button, .sheet-close {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: #515866;
  background: transparent;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.icon-button:hover, .sheet-close:hover { background: rgba(255,255,255,.72); }
.icon-button:active { transform: scale(.94); }
.icon-button.is-spinning svg { animation: spin .8s linear infinite; }

.page-shell { width: min(calc(100% - 32px), var(--max-width)); margin: 0 auto; padding: 72px 0 100px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: center; gap: 70px; padding: 8px 44px 54px; }
.eyebrow { margin: 0 0 9px; color: #707887; font-size: 11px; font-weight: 760; letter-spacing: .11em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(42px, 6vw, 72px); line-height: .98; letter-spacing: -.055em; font-weight: 760; }
.hero h1 span { color: #777f8e; font-weight: 590; }
.hero-copy { max-width: 610px; margin: 25px 0 0; color: var(--ink-soft); font-size: 17px; line-height: 1.55; }
.hero-orb {
  display: flex;
  width: 270px;
  aspect-ratio: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,.84), rgba(226,235,255,.48));
  box-shadow: 0 28px 80px rgba(50,78,140,.14), inset 0 1px 1px #fff;
  text-align: center;
}
.orb-label { color: var(--ink-soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.hero-orb strong { margin: 7px 0 4px; font-size: 36px; letter-spacing: -.045em; }
.hero-orb > span:last-child { max-width: 170px; color: var(--ink-soft); font-size: 13px; line-height: 1.35; }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.metric-card { min-height: 150px; padding: 23px 25px; border-radius: var(--radius-lg); }
.metric-card p { margin: 0; color: var(--ink-soft); font-size: 13px; font-weight: 620; }
.metric-card strong { display: block; margin: 15px 0 7px; font-size: 31px; letter-spacing: -.04em; }
.metric-card span { color: var(--ink-soft); font-size: 12px; }
.metric-selected { background: linear-gradient(145deg, rgba(79,119,230,.88), rgba(55,91,196,.88)); color: #fff; border-color: rgba(255,255,255,.35); }
.metric-selected p, .metric-selected span { color: rgba(255,255,255,.78); }
.skeleton { min-height: 150px; background: linear-gradient(100deg, rgba(255,255,255,.4) 30%, rgba(255,255,255,.8) 50%, rgba(255,255,255,.4) 70%); background-size: 220% 100%; animation: shimmer 1.5s infinite; }
.portfolio-visual { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 42px; margin-bottom: 72px; padding: 29px 31px; border-radius: var(--radius-xl); }
.portfolio-summary { display: flex; flex-direction: column; justify-content: center; padding-right: 30px; border-right: 1px solid var(--line); }
.portfolio-summary h2 { margin: 2px 0 5px; font-size: 36px; letter-spacing: -.045em; }
.portfolio-summary > p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.global-status { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 10px 12px; border-radius: 13px; }
.global-status.is-over { color: #a44747; background: rgba(215,80,80,.09); }
.global-status.is-safe { color: #28775f; background: rgba(60,169,136,.1); }
.global-status strong { font-size: 18px; }
.global-status span { font-size: 10px; line-height: 1.3; }
.portfolio-bars { display: grid; gap: 15px; }
.portfolio-row-label, .portfolio-row-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.portfolio-row-label { margin-bottom: 6px; }
.portfolio-row-label > span { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 660; }
.portfolio-row-label .tab-dot { display: inline-block; width: 7px; height: 7px; }
.portfolio-row-label strong { font-size: 11px; }
.is-over { color: var(--red) !important; }
.is-safe { color: #2f8c70 !important; }
.portfolio-track, .consumption-track { position: relative; height: 7px; border-radius: 99px; }
.budget-progress {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(75,88,115,.09);
  border: 0;
  border-radius: 99px;
}
.budget-progress::-webkit-progress-bar { background: rgba(75,88,115,.09); border-radius: 99px; }
.budget-progress::-webkit-progress-value { border-radius: 99px; transition: width .25s ease; }
.budget-progress::-moz-progress-bar { border-radius: 99px; }
.budget-progress.accent-mint::-webkit-progress-value { background: var(--mint); }
.budget-progress.accent-blue::-webkit-progress-value { background: var(--blue); }
.budget-progress.accent-rose::-webkit-progress-value { background: var(--rose); }
.budget-progress.accent-violet::-webkit-progress-value { background: var(--violet); }
.budget-progress.accent-amber::-webkit-progress-value { background: var(--amber); }
.budget-progress.is-over-fill::-webkit-progress-value { background: linear-gradient(90deg, #e28d65, var(--red)); }
.budget-progress.accent-mint::-moz-progress-bar { background: var(--mint); }
.budget-progress.accent-blue::-moz-progress-bar { background: var(--blue); }
.budget-progress.accent-rose::-moz-progress-bar { background: var(--rose); }
.budget-progress.accent-violet::-moz-progress-bar { background: var(--violet); }
.budget-progress.accent-amber::-moz-progress-bar { background: var(--amber); }
.budget-progress.is-over-fill::-moz-progress-bar { background: linear-gradient(90deg, #e28d65, var(--red)); }
.portfolio-row-meta { margin-top: 5px; color: var(--ink-soft); font-size: 9px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 5px 22px; }
.section-heading h2 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
.read-only-badge { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; color: #657080; background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.7); border-radius: 99px; font-size: 11px; }
.read-only-badge svg { width: 14px; height: 14px; }
.category-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 7px; border-radius: 20px; }
.category-tab {
  display: grid;
  min-width: 0;
  min-height: 64px;
  grid-template-columns: 9px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 8px;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 15px;
  text-align: left;
  cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .2s;
}
.category-tab:hover { background: rgba(255,255,255,.48); }
.category-tab.is-active { background: rgba(255,255,255,.88); box-shadow: 0 5px 18px rgba(52,63,85,.1); }
.category-tab:active { transform: scale(.98); }
.category-tab > span:nth-child(2) { overflow: hidden; font-size: 12px; font-weight: 660; text-overflow: ellipsis; white-space: nowrap; }
.category-tab strong { grid-column: 2; margin-top: 3px; color: var(--ink-soft); font-size: 11px; font-weight: 550; }
.tab-dot { align-self: center; width: 8px; height: 8px; grid-row: 1 / span 2; border-radius: 50%; }
.accent-mint { background-color: var(--mint); }
.accent-blue { background-color: var(--blue); }
.accent-rose { background-color: var(--rose); }
.accent-violet { background-color: var(--violet); }
.accent-amber { background-color: var(--amber); }

.category-panel { margin-top: 15px; }
.category-overview { display: flex; min-height: 255px; align-items: center; justify-content: space-between; gap: 30px; padding: 30px 34px; border-radius: var(--radius-xl); }
.accent-border-mint { box-shadow: var(--shadow-soft), inset 4px 0 var(--mint); }
.accent-border-blue { box-shadow: var(--shadow-soft), inset 4px 0 var(--blue); }
.accent-border-rose { box-shadow: var(--shadow-soft), inset 4px 0 var(--rose); }
.accent-border-violet { box-shadow: var(--shadow-soft), inset 4px 0 var(--violet); }
.accent-border-amber { box-shadow: var(--shadow-soft), inset 4px 0 var(--amber); }
.category-copy { flex: 1; }
.category-title-row { display: flex; align-items: center; gap: 14px; }
.category-title-row h3 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.category-glyph { display: grid; width: 45px; height: 45px; place-items: center; color: #fff; border-radius: 14px; font-size: 18px; font-weight: 750; box-shadow: inset 0 1px rgba(255,255,255,.35); }
.budget-equation { display: flex; align-items: center; gap: 20px; margin: 27px 0 0 59px; }
.budget-equation > div { display: flex; flex-direction: column; gap: 4px; }
.budget-equation span { color: var(--ink-soft); font-size: 11px; }
.budget-equation strong { font-size: 20px; letter-spacing: -.025em; }
.equation-sign { font-size: 18px !important; }
.equation-total { padding: 9px 14px; background: rgba(255,255,255,.62); border-radius: 13px; }
.category-consumption { display: grid; max-width: 560px; grid-template-columns: auto minmax(120px, 1fr) auto; align-items: center; gap: 13px; margin: 22px 0 0 59px; }
.category-consumption > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.category-consumption > div:first-child span { color: var(--ink-soft); font-size: 9px; }
.category-consumption > div:first-child strong { font-size: 16px; }
.category-consumption p { margin: 0; font-size: 10px; font-weight: 620; text-align: right; }
.progress-ring {
  display: grid;
  position: relative;
  width: 142px;
  aspect-ratio: 1;
  flex: 0 0 142px;
  place-items: center;
}
.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track,
.ring-value {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}
.ring-track { stroke: rgba(79,93,125,.1); }
.ring-value { stroke: var(--blue); }
.progress-ring.is-over .ring-value { stroke: var(--red); }
.progress-ring::before { content: ""; width: 112px; aspect-ratio: 1; background: rgba(248,250,253,.92); border-radius: 50%; box-shadow: inset 0 2px 8px rgba(55,67,90,.06); }
.progress-ring > div { position: absolute; display: flex; flex-direction: column; align-items: center; }
.progress-ring strong { font-size: 26px; letter-spacing: -.04em; }
.progress-ring span { color: var(--ink-soft); font-size: 11px; }

.partial-notice { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 17px 20px; border-radius: var(--radius-md); background: linear-gradient(100deg, rgba(231,239,255,.8), rgba(255,255,255,.6)); }
.notice-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; color: var(--blue-dark); background: rgba(255,255,255,.75); border-radius: 13px; }
.partial-notice strong { display: block; margin-bottom: 3px; font-size: 13px; }
.partial-notice p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.history-card { margin-top: 14px; padding: 23px 26px 18px; border-radius: var(--radius-lg); }
.history-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.history-heading h3 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.history-legend { display: flex; gap: 14px; color: var(--ink-soft); font-size: 9px; }
.history-legend span { display: flex; align-items: center; gap: 5px; }
.history-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; }
.legend-budget { background: rgba(70,84,110,.14); }
.legend-spend { background: var(--blue); }
.history-chart { display: grid; height: 180px; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 21px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.history-column { display: grid; min-width: 0; grid-template-rows: 130px 17px 18px; align-items: end; justify-items: center; }
.history-bars { position: relative; display: grid; width: min(100%, 62px); height: 120px; place-items: end center; }
.history-svg { display: block; width: min(100%, 62px); height: 120px; overflow: visible; }
.history-budget { fill: rgba(70,84,110,.14); }
.history-spend { fill: var(--blue-dark); filter: drop-shadow(0 5px 7px rgba(52,91,203,.16)); }
.history-spend.is-over { fill: var(--red); filter: drop-shadow(0 5px 7px rgba(190,72,72,.16)); }
.history-missing { position: absolute; bottom: 5px; color: #a3a8b1; font-size: 13px; }
.history-column > strong { align-self: center; font-size: 10px; }
.history-column > span { align-self: start; overflow: hidden; max-width: 100%; color: var(--ink-soft); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.history-column.is-live > strong::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 4px; background: var(--blue); border-radius: 50%; vertical-align: 1px; }
.history-note { margin: 12px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .65fr); align-items: start; gap: 14px; margin-top: 14px; }
.task-section, .side-card { border-radius: var(--radius-lg); }
.task-section { overflow: hidden; }
.task-heading { display: flex; align-items: end; justify-content: space-between; padding: 25px 25px 17px; }
.task-heading h3 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.section-total { font-size: 22px; letter-spacing: -.03em; }
.task-list { padding: 0 10px; }
.task-row { display: grid; min-height: 68px; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line); }
.task-row.is-partial { margin: 4px 0; background: rgba(226,235,255,.52); border: 1px solid rgba(90,122,205,.15); border-radius: 15px; }
.task-status { display: grid; width: 30px; height: 30px; place-items: center; color: var(--mint); background: rgba(60,169,136,.11); border-radius: 50%; }
.is-partial .task-status { color: var(--blue); background: rgba(71,119,237,.11); }
.task-status svg { width: 16px; height: 16px; }
.task-copy { min-width: 0; }
.task-copy strong { display: block; overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.task-copy span, .task-amount span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.task-amount { text-align: right; }
.task-amount strong { font-size: 14px; }
.proposal-footer { display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 20px; margin-top: 8px; padding: 17px 24px; background: rgba(255,255,255,.36); border-top: 1px solid var(--line); }
.footer-stat { display: flex; flex-direction: column; gap: 3px; }
.footer-stat span { color: var(--ink-soft); font-size: 10px; }
.footer-stat strong { font-size: 13px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px; padding: 0 19px; border: 0; border-radius: 15px; font-size: 13px; font-weight: 680; cursor: pointer; transition: transform .18s, box-shadow .18s, opacity .18s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: scale(.98); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button svg { width: 17px; height: 17px; }
.button-primary { color: #fff; background: linear-gradient(145deg, #5582ef, #315dce); box-shadow: 0 9px 22px rgba(51,91,204,.25), inset 0 1px rgba(255,255,255,.25); }
.button-secondary { color: var(--ink); background: rgba(255,255,255,.72); border: 1px solid rgba(110,120,140,.12); }
.side-stack { display: flex; flex-direction: column; gap: 14px; }
.side-card { padding: 20px; }
.side-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.side-heading h3 { margin: 0; font-size: 13px; }
.side-heading span { display: grid; min-width: 24px; height: 24px; padding: 0 7px; place-items: center; color: var(--ink-soft); background: rgba(255,255,255,.62); border-radius: 9px; font-size: 10px; }
.mini-list { border-top: 1px solid var(--line); }
.mini-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.mini-row span { overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.mini-row strong { font-size: 11px; }
.more-label { margin: 11px 0 0; color: var(--ink-soft); font-size: 10px; }
.warning-card { background: rgba(255,244,230,.64); }
.warning-card p { margin: 0 0 6px; font-size: 11px; line-height: 1.5; }
.warning-card small { color: var(--ink-soft); font-size: 9px; }
.inline-empty { display: flex; min-height: 100px; align-items: center; justify-content: center; gap: 10px; color: var(--ink-soft); border-top: 1px solid var(--line); }
.inline-empty p { margin: 0; font-size: 12px; }
.loading-state, .error-state { display: grid; min-height: 300px; place-items: center; align-content: center; gap: 13px; border-radius: var(--radius-xl); text-align: center; }
.loading-state p, .error-state p { max-width: 440px; margin: 0; color: var(--ink-soft); font-size: 13px; }
.error-state h3 { margin: 0; }
.error-state > svg { width: 28px; height: 28px; color: var(--red); }
.spinner, .button-spinner { width: 24px; height: 24px; border: 2px solid rgba(71,119,237,.18); border-top-color: var(--blue); border-radius: 50%; animation: spin .75s linear infinite; }
.button-spinner { width: 16px; height: 16px; border-color: rgba(255,255,255,.3); border-top-color: #fff; }

.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(25,30,42,.25); backdrop-filter: blur(12px); animation: fade-in .18s ease; }
.confirm-sheet { position: relative; width: min(100%, 520px); padding: 34px; border-radius: 30px; background: rgba(248,250,253,.86); box-shadow: 0 40px 110px rgba(24,31,48,.28); animation: sheet-in .22s ease; }
.sheet-close { position: absolute; top: 15px; right: 15px; }
.confirm-icon { display: grid; width: 52px; height: 52px; margin-bottom: 19px; place-items: center; color: #fff; background: linear-gradient(145deg, #55b99c, #319171); border-radius: 17px; box-shadow: 0 9px 20px rgba(49,145,113,.24); }
.confirm-sheet h2 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.confirm-copy { margin: 12px 0 21px; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.confirm-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.confirm-details div { display: flex; min-height: 76px; flex-direction: column; justify-content: center; gap: 5px; padding: 11px; background: rgba(255,255,255,.66); border: 1px solid rgba(255,255,255,.86); border-radius: 15px; }
.confirm-details span { color: var(--ink-soft); font-size: 9px; }
.confirm-details strong { font-size: 16px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
.toast { position: fixed; z-index: 130; right: 24px; bottom: 24px; max-width: 390px; padding: 14px 18px; color: #fff; background: #293142; border-radius: 14px; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(15px); transition: opacity .25s, transform .25s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.success { background: #2f856c; }
.toast.error { background: #a74545; }

.login-page { display: grid; place-items: center; }
.login-shell { display: flex; width: min(100% - 32px, 480px); min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: 28px 0; }
.login-card { width: 100%; padding: 36px; border-radius: 32px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 730; }
.login-brand .brand-icon { width: 36px; height: 36px; }
.login-brand svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.login-heading { margin: 56px 0 30px; }
.login-heading h1 { margin: 0; font-size: 35px; line-height: 1.05; letter-spacing: -.05em; }
.login-heading > p:last-child { margin: 15px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.login-form { display: grid; gap: 13px; }
.field { display: grid; gap: 7px; }
.field span { padding-left: 4px; color: var(--ink-soft); font-size: 10px; font-weight: 650; }
.field input { width: 100%; height: 50px; padding: 0 15px; color: var(--ink); background: rgba(255,255,255,.66); border: 1px solid rgba(117,127,145,.16); border-radius: 15px; outline: none; transition: border .2s, box-shadow .2s; }
.field input:focus { border-color: rgba(71,119,237,.5); box-shadow: 0 0 0 4px rgba(71,119,237,.1); }
.login-button { width: 100%; margin-top: 5px; }
.login-error { margin: 0; padding: 10px 12px; color: #9a3e3e; background: rgba(215,80,80,.1); border-radius: 11px; font-size: 11px; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 25px 0 0; color: var(--ink-soft); font-size: 9px; }
.privacy-note svg { width: 13px; height: 13px; }
.login-caption { margin: 18px 0 0; color: var(--ink-soft); font-size: 10px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -120% 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 10px 16px 45px; }
  .hero-orb { display: none; }
  .portfolio-visual { grid-template-columns: 1fr; gap: 24px; }
  .portfolio-summary { padding: 0 0 22px; border-right: 0; border-bottom: 1px solid var(--line); }
  .content-grid { grid-template-columns: 1fr; }
  .side-stack { display: grid; grid-template-columns: repeat(2, 1fr); }
  .category-tabs { overflow-x: auto; grid-template-columns: repeat(5, minmax(130px, 1fr)); }
}

@media (max-width: 650px) {
  .topbar { top: 8px; width: calc(100% - 16px); margin-top: 8px; }
  .sync-label { display: none; }
  .page-shell { width: calc(100% - 20px); padding-top: 48px; }
  .hero { padding-inline: 8px; }
  .hero h1 { font-size: 43px; }
  .hero-copy { font-size: 15px; }
  .summary-grid { grid-template-columns: 1fr; gap: 9px; margin-bottom: 54px; }
  .portfolio-visual { margin-top: -40px; margin-bottom: 54px; padding: 23px 19px; }
  .metric-card { min-height: 118px; }
  .metric-card strong { font-size: 27px; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading h2 { font-size: 26px; }
  .read-only-badge { display: none; }
  .category-overview { align-items: flex-start; padding: 24px 20px; }
  .progress-ring { width: 92px; flex-basis: 92px; }
  .progress-ring::before { width: 72px; }
  .progress-ring strong { font-size: 19px; }
  .budget-equation { flex-wrap: wrap; gap: 12px; margin-left: 0; }
  .budget-equation strong { font-size: 17px; }
  .category-consumption { grid-template-columns: 1fr; gap: 7px; margin-left: 0; }
  .category-consumption p { text-align: left; }
  .history-card { padding-inline: 15px; }
  .history-chart { gap: 5px; padding-inline: 0; }
  .history-bars, .history-svg { width: min(100%, 46px); }
  .content-grid { gap: 10px; }
  .task-row { grid-template-columns: 31px minmax(0, 1fr); }
  .task-amount { grid-column: 2; text-align: left; }
  .proposal-footer { align-items: stretch; flex-direction: column; }
  .side-stack { grid-template-columns: 1fr; }
  .confirm-sheet { padding: 29px 20px 20px; }
  .confirm-details { grid-template-columns: 1fr; }
  .confirm-details div { min-height: 57px; }
  .modal-actions { grid-template-columns: 1fr; }
  .login-card { padding: 28px 22px; }
  .login-heading { margin-top: 44px; }
}

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