:root {
  --bg: #f3f5f1;
  --surface: #ffffff;
  --surface-2: #f8faf6;
  --surface-3: #eef2ea;
  --ink: #182019;
  --ink-soft: #3f4a41;
  --muted: #7b857c;
  --line: #dfe5dc;
  --soft-line: #edf1eb;
  --dark: #111713;
  --dark-2: #1b241d;
  --accent: #c7ef45;
  --accent-strong: #9fc82d;
  --accent-soft: #eff8d7;
  --income: #6e9622;
  --income-soft: #eef6dc;
  --expense: #c75d4d;
  --expense-soft: #fbedE9;
  --warning: #bd8124;
  --warning-soft: #fff5dc;
  --blue: #657fdc;
  --danger: #b9443c;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 8px 24px rgba(27, 38, 29, .06);
  --shadow: 0 18px 50px rgba(27, 38, 29, .09);
  --sidebar-width: 260px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

:root[data-theme="dark"] {
  --bg: #111612;
  --surface: #19201b;
  --surface-2: #202921;
  --surface-3: #263128;
  --ink: #f3f6f1;
  --ink-soft: #c6cec7;
  --muted: #89938b;
  --line: #303a32;
  --soft-line: #273128;
  --dark: #0b0f0c;
  --dark-2: #171e18;
  --accent-soft: #26341a;
  --income-soft: #25331b;
  --expense-soft: #38231f;
  --warning-soft: #392f1f;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .16);
  --shadow: 0 18px 50px rgba(0, 0, 0, .24);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(159, 200, 45, .28); outline-offset: 2px; }
.hidden { display: none !important; }

.eyebrow { margin: 0 0 8px; color: #78902f; font-size: 11px; font-weight: 850; letter-spacing: 1.55px; }
.eyebrow.light { color: #c7ef45; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  background: var(--accent);
  color: #111713;
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 10px 28px rgba(199, 239, 69, .18);
}
.brand-mark.small { width: 40px; height: 40px; border-radius: 12px; font-size: 19px; box-shadow: none; }

.button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
  color: var(--ink);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #111713; box-shadow: 0 10px 24px rgba(159, 200, 45, .18); }
.button.primary:hover { background: #d3f568; box-shadow: 0 12px 30px rgba(159, 200, 45, .24); }
.button.outline { border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: none; }
.button.full { width: 100%; margin-top: 10px; }
.button.compact { min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: 12px; }
.button.loading::after { content: ""; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 19px;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.icon-button:hover { border-color: var(--accent-strong); transform: translateY(-1px); }

/* Authentication */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1.1fr) minmax(480px, .9fr); background: var(--dark); }
.auth-brand {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 44px clamp(42px, 5vw, 76px);
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 80% 40%, rgba(199, 239, 69, .15), transparent 22%),
    radial-gradient(circle at 55% 95%, rgba(101, 127, 220, .1), transparent 30%),
    #101612;
}
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border: 1px solid rgba(199, 239, 69, .09); border-radius: 50%; pointer-events: none; }
.auth-brand::before { width: 480px; height: 480px; right: -220px; top: -170px; box-shadow: 0 0 0 60px rgba(199, 239, 69, .018), 0 0 0 120px rgba(199, 239, 69, .012); }
.auth-brand::after { width: 320px; height: 320px; left: -180px; bottom: -170px; }
.brand-lockup { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; }
.brand-lockup > div:last-child { display: flex; flex-direction: column; }
.brand-lockup strong { font-size: 19px; }
.brand-lockup span { margin-top: 2px; color: #8f9a91; font-size: 11px; }
.auth-copy { position: relative; z-index: 2; max-width: 650px; margin: auto 0 34px; }
.auth-copy h1 { margin: 8px 0 24px; font-size: clamp(48px, 5.3vw, 82px); line-height: .98; letter-spacing: -3.4px; }
.auth-copy h1 em { color: var(--accent); font-style: normal; }
.auth-copy > p:last-child { max-width: 590px; margin: 0; color: #b4bdb5; font-size: 17px; line-height: 1.68; }
.auth-demo {
  position: relative;
  z-index: 2;
  width: min(560px, 94%);
  padding: 24px 25px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .25);
  backdrop-filter: blur(15px);
}
.demo-top { display: flex; justify-content: space-between; align-items: center; color: #aab3ab; font-size: 12px; }
.demo-top i { padding: 5px 9px; border-radius: 20px; background: rgba(199, 239, 69, .12); color: var(--accent); font-size: 10px; font-style: normal; font-weight: 800; }
.auth-demo > strong { display: block; margin-top: 9px; font-size: 36px; letter-spacing: -1.5px; }
.demo-chart { height: 98px; margin: 21px 0; display: flex; align-items: end; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.demo-chart i { flex: 1; max-width: 34px; min-width: 12px; border-radius: 7px 7px 0 0; background: #344037; animation: grow .7s ease both; }
.demo-chart i:nth-child(1) { height: 34%; }
.demo-chart i:nth-child(2) { height: 58%; }
.demo-chart i:nth-child(3) { height: 46%; }
.demo-chart i:nth-child(4) { height: 82%; background: var(--accent); }
.demo-chart i:nth-child(5) { height: 65%; }
.demo-chart i:nth-child(6) { height: 74%; }
.demo-chart i:nth-child(7) { height: 92%; background: #7d9550; }
@keyframes grow { from { transform: scaleY(0); transform-origin: bottom; opacity: 0; } }
.demo-insight { display: flex; gap: 12px; align-items: center; }
.demo-insight > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--accent); color: #111713; }
.demo-insight p { margin: 0; display: flex; flex-direction: column; color: #9da79f; font-size: 11px; line-height: 1.5; }
.demo-insight b { color: #fff; font-size: 12px; }
.auth-trust { position: relative; z-index: 2; display: flex; gap: 20px; flex-wrap: wrap; margin-top: 22px; color: #7f8b81; font-size: 10px; }
.auth-trust span::first-letter { color: var(--accent); }

.auth-form-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 46px;
  overflow: auto;
  background: radial-gradient(circle at 92% 7%, rgba(199, 239, 69, .22), transparent 26%), #f5f7f2;
}
.auth-card { width: min(490px, 100%); padding: 30px 36px 34px; border: 1px solid #e1e6de; border-radius: 24px; background: rgba(255, 255, 255, .93); box-shadow: 0 34px 100px rgba(28, 39, 30, .14); backdrop-filter: blur(14px); }
.auth-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.mobile-brand { display: none; align-items: center; gap: 10px; }
.secure-chip { padding: 7px 10px; border: 1px solid #e0e7d9; border-radius: 20px; color: #697361; background: #f7faf3; font-size: 10px; font-weight: 800; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 28px; padding: 5px; border-radius: 13px; background: #eef1ec; }
.auth-tabs button { height: 42px; border: 0; border-radius: 9px; background: transparent; color: #7a827b; font-size: 12px; font-weight: 850; }
.auth-tabs button.active { color: #182019; background: #fff; box-shadow: 0 5px 16px rgba(31, 42, 33, .08); }
.auth-form { width: 100%; animation: slideUp .35s ease; }
.auth-form h2 { margin: 0 0 9px; font-size: 31px; line-height: 1.15; letter-spacing: -.8px; }
.auth-form > .muted { margin: 0 0 25px; font-size: 13px; line-height: 1.6; }
.auth-form label, .modal-field, .settings-form label { display: block; margin: 15px 0; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.auth-form label small { float: right; color: var(--muted); font-weight: 500; }
.auth-form input, .modal-field input, .modal-field select, .settings-form input, .settings-form select {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  border: 1px solid #d9dfd6;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: #182019;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-form input:focus, .modal-field input:focus, .modal-field select:focus, .settings-form input:focus, .settings-form select:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 4px rgba(199, 239, 69, .18); outline: 0; }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 70px; }
.password-control button { position: absolute; right: 8px; top: 16px; height: 34px; border: 0; padding: 0 8px; background: transparent; color: #6f7c67; font-size: 10px; font-weight: 800; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.two-fields.single { grid-template-columns: 1fr; }
.form-link-row { display: flex; justify-content: flex-end; margin: -7px 0 5px; }
.text-link, .back-link { border: 0; padding: 4px 0; background: transparent; color: #64782c; font-size: 11px; font-weight: 800; }
.text-link:hover, .back-link:hover { text-decoration: underline; }
.back-link { margin-bottom: 16px; }
.form-error { min-height: 19px; margin: 10px 0 0; color: var(--danger); font-size: 12px; line-height: 1.4; }
.privacy-note { margin: 13px 0 0; padding: 12px 13px; border-radius: 11px; background: #f0f6e3; color: #64705e; font-size: 10px; line-height: 1.55; }
.password-strength { position: relative; height: 23px; margin: -6px 0 2px; padding-top: 6px; border-top: 3px solid #edf0eb; color: #7d857d; font-size: 10px; }
.password-strength i { position: absolute; left: 0; top: -3px; width: 0; height: 3px; border-radius: 4px; background: #c9cdc7; transition: width .2s ease, background .2s ease; }
.password-strength[data-level="weak"] i { background: #d86453; }
.password-strength[data-level="fair"] i { background: #d7a43e; }
.password-strength[data-level="good"] i { background: #8eb743; }
.password-strength[data-level="strong"] i { background: #4f9c68; }
.auth-footnote { max-width: 480px; margin: 17px 0 0; color: #858e86; font-size: 10px; text-align: center; }

/* App shell */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar-width); padding: 22px 17px; display: flex; flex-direction: column; color: #fff; background: var(--dark); }
.app-brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 26px; }
.app-brand > div:last-child { min-width: 0; display: flex; flex-direction: column; }
.app-brand strong { font-size: 18px; letter-spacing: -.2px; }
.app-brand span { margin-top: 2px; overflow: hidden; color: #869087; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.nav { display: grid; gap: 5px; }
.nav button { position: relative; height: 46px; padding: 0 12px; border: 0; border-radius: 12px; display: flex; align-items: center; gap: 12px; color: #929c94; background: transparent; font-size: 12px; font-weight: 720; text-align: left; transition: color .18s ease, background .18s ease; }
.nav button:hover { color: #fff; background: rgba(255, 255, 255, .055); }
.nav button.active { color: #111713; background: var(--accent); box-shadow: 0 10px 28px rgba(199, 239, 69, .13); }
.nav-icon { width: 22px; font-size: 18px; text-align: center; }
.new-badge { margin-left: auto; padding: 3px 5px; border-radius: 5px; color: var(--accent); background: rgba(199, 239, 69, .12); font-size: 8px; font-style: normal; font-weight: 900; }
.nav button.active .new-badge { color: #111713; background: rgba(17, 23, 19, .1); }
.sidebar-health { margin-top: 22px; padding: 14px; border: 1px solid #283129; border-radius: 14px; background: #171e19; }
.sidebar-health > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.sidebar-health span { color: #98a199; font-size: 10px; }
.sidebar-health strong { color: var(--accent); font-size: 12px; }
.mini-progress { height: 5px; margin: 10px 0 8px; overflow: hidden; border-radius: 10px; background: #2a342b; }
.mini-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s ease; }
.sidebar-health small { color: #707a72; font-size: 9px; }
.sidebar-foot { margin-top: auto; }
.quiet-button { width: 100%; border: 0; padding: 10px 11px; color: #89928b; background: transparent; font-size: 10px; text-align: left; }
.quiet-button:hover { color: #fff; }
.profile { margin-top: 10px; padding: 18px 5px 0; border-top: 1px solid #283029; display: grid; grid-template-columns: 38px 1fr 30px; gap: 10px; align-items: center; }
.profile > div:first-child { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: #273028; font-weight: 850; }
.profile > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.profile strong { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.profile span { margin-top: 2px; color: #7f8981; font-size: 9px; }
.profile button { border: 0; color: #869087; background: transparent; font-size: 20px; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; min-height: 98px; padding: 22px clamp(24px, 4vw, 58px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); }
.page-heading h1 { margin: 0; font-size: 25px; letter-spacing: -.6px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.month-control { height: 46px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; justify-content: center; background: var(--surface); }
.month-control span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.month-control input { width: 132px; border: 0; padding: 0; color: var(--ink); background: transparent; font-size: 11px; font-weight: 700; outline: 0; }
.mobile-account { display: none; }
.content { max-width: 1680px; margin: 0 auto; padding: 28px clamp(24px, 4vw, 58px) 60px; }
.view { display: none; animation: slideUp .32s ease; }
.view.active { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(7px); } }

.install-banner { margin: 12px clamp(24px, 4vw, 58px) 0; padding: 11px 13px; border: 1px solid #283129; border-radius: 14px; display: grid; grid-template-columns: 36px 1fr auto 30px; gap: 11px; align-items: center; color: #fff; background: var(--dark); box-shadow: var(--shadow-sm); }
.install-banner .mini-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #111713; background: var(--accent); font-weight: 900; }
.install-banner > div:nth-child(2) { display: flex; flex-direction: column; }
.install-banner strong { font-size: 11px; }
.install-banner span { margin-top: 2px; color: #8f9991; font-size: 9px; }
.install-banner .dismiss { border: 0; color: #8d978f; background: transparent; font-size: 20px; }

/* Dashboard */
.budget-hero { min-height: 240px; padding: 35px 38px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: space-between; gap: 28px; overflow: hidden; position: relative; color: #fff; background: radial-gradient(circle at 80% 25%, rgba(199, 239, 69, .16), transparent 24%), linear-gradient(135deg, #111713, #1b261d); box-shadow: 0 24px 60px rgba(17, 23, 19, .16); }
.budget-hero::before, .budget-hero::after { content: ""; position: absolute; border: 1px solid rgba(199, 239, 69, .09); border-radius: 50%; }
.budget-hero::before { width: 330px; height: 330px; right: -115px; top: -125px; }
.budget-hero::after { width: 230px; height: 230px; right: -40px; bottom: -170px; box-shadow: 0 0 0 38px rgba(255, 255, 255, .012); }
.hero-copy { position: relative; z-index: 2; max-width: 720px; }
.live-pill { width: max-content; padding: 7px 10px; border: 1px solid rgba(199, 239, 69, .18); border-radius: 20px; display: flex; align-items: center; gap: 7px; color: #b9c6ba; background: rgba(199, 239, 69, .07); font-size: 9px; font-weight: 750; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero-copy h2 { max-width: 720px; margin: 18px 0 9px; font-size: clamp(28px, 3.1vw, 45px); line-height: 1.08; letter-spacing: -1.6px; }
.hero-copy p { max-width: 650px; margin: 0; color: #aab5ac; font-size: 13px; line-height: 1.6; }
.hero-tags { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 23px; }
.hero-tags span { padding: 8px 10px; border: 1px solid #303a32; border-radius: 9px; color: #bac2bb; background: rgba(255, 255, 255, .035); font-size: 9px; }
.health-ring { --score: 0; position: relative; z-index: 2; width: 156px; aspect-ratio: 1; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--score) * 1%), #2b352d 0); box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 18px 45px rgba(0,0,0,.25); }
.health-ring::after { content: ""; position: absolute; width: 122px; aspect-ratio: 1; border-radius: 50%; background: #151d17; }
.health-ring > div { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.health-ring strong { font-size: 34px; letter-spacing: -1.4px; }
.health-ring span { color: #909c92; font-size: 9px; }

.metric-strip { margin-top: 17px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric-strip article { min-width: 0; padding: 20px 21px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto auto; column-gap: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-strip .metric-icon { grid-row: 1 / 4; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; font-weight: 900; }
.metric-icon.income { color: var(--income); background: var(--income-soft); }
.metric-icon.expense { color: var(--expense); background: var(--expense-soft); }
.metric-icon.balance { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, var(--surface)); }
.metric-icon.savings { color: #4f681d; background: rgba(199, 239, 69, .42); }
.metric-strip article > span { color: var(--muted); font-size: 9px; font-weight: 750; }
.metric-strip article > strong { min-width: 0; margin: 3px 0 1px; overflow: hidden; font-size: clamp(20px, 2.1vw, 30px); letter-spacing: -.8px; white-space: nowrap; text-overflow: ellipsis; }
.metric-strip article > strong.negative { color: var(--danger); }
.metric-strip article > small { color: var(--muted); font-size: 8px; }
.metric-strip .accent-metric { color: #111713; border-color: #b9df3a; background: linear-gradient(135deg, var(--accent), #dbf878); }
.metric-strip .accent-metric > span, .metric-strip .accent-metric > small { color: #58682b; }

.dashboard-grid { margin-top: 17px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .75fr); gap: 17px; }
.dashboard-grid.lower { grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr); }
.dashboard-grid.insights-grid { grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); }
.panel { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-head > div { min-width: 0; }
.section-head h2 { margin: 0; font-size: 15px; letter-spacing: -.2px; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.section-head > div:first-child:has(.section-icon) { display: flex; gap: 11px; }
.section-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #111713; background: var(--accent); }
.text-button { border: 0; padding: 5px 0; color: #667359; background: transparent; font-size: 9px; font-weight: 800; white-space: nowrap; }
:root[data-theme="dark"] .text-button { color: #a9c36e; }

.insight-list { margin-top: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.insight-item { min-width: 0; padding: 13px; border: 1px solid var(--soft-line); border-radius: 12px; display: flex; align-items: flex-start; gap: 10px; background: var(--surface-2); }
.insight-icon { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; color: #61702f; background: var(--accent-soft); font-size: 13px; font-weight: 900; }
.insight-item.warning .insight-icon { color: var(--warning); background: var(--warning-soft); }
.insight-item.danger .insight-icon { color: var(--danger); background: var(--expense-soft); }
.insight-item.positive .insight-icon { color: var(--income); background: var(--income-soft); }
.insight-item strong { display: block; overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.insight-item p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.budget-panel .section-head > strong { font-size: 25px; letter-spacing: -1px; }
.budget-progress { height: 10px; margin: 27px 0 16px; overflow: hidden; border-radius: 20px; background: var(--surface-3); }
.budget-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent-strong); transition: width .55s ease; }
.budget-progress i.warning { background: var(--warning); }
.budget-progress i.danger { background: var(--danger); }
.budget-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.budget-numbers div { padding: 11px; border-radius: 11px; background: var(--surface-2); }
.budget-numbers span { display: block; color: var(--muted); font-size: 8px; }
.budget-numbers strong { display: block; margin-top: 4px; overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }

.legend { display: flex; gap: 12px; color: var(--muted); font-size: 9px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 7px; height: 7px; border-radius: 3px; }
.income-dot { background: var(--accent); }
.expense-dot { background: #657168; }
.history-chart { height: 220px; margin-top: 23px; padding: 0 9px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: end; }
.chart-month { position: relative; height: 100%; display: grid; grid-template-rows: 1fr 25px; gap: 7px; color: var(--muted); font-size: 9px; text-align: center; }
.chart-bars { display: flex; gap: 5px; align-items: end; justify-content: center; }
.chart-bar { width: min(17px, 34%); min-height: 3px; border-radius: 5px 5px 0 0; transition: height .55s ease; }
.chart-bar.income { background: var(--accent); }
.chart-bar.expense { background: #657168; }
.chart-tooltip { position: absolute; z-index: 5; left: 50%; top: 30px; width: 150px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; display: none; transform: translateX(-50%); color: var(--ink); background: var(--surface); box-shadow: var(--shadow); text-align: left; }
.chart-tooltip b, .chart-tooltip span { display: block; }
.chart-tooltip span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.chart-month:hover .chart-tooltip { display: block; }
.category-layout { margin-top: 22px; display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center; }
.donut { width: 136px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(var(--accent) 0 100%); }
.donut::after { content: ""; position: absolute; width: 86px; aspect-ratio: 1; border-radius: 50%; background: var(--surface); }
.donut > div { position: relative; z-index: 1; display: flex; flex-direction: column; text-align: center; }
.donut strong { font-size: 14px; }
.donut span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.category-list { display: grid; gap: 10px; }
.category-row { display: grid; grid-template-columns: 8px 1fr auto; gap: 8px; align-items: center; font-size: 10px; }
.category-row > i { width: 7px; height: 7px; border-radius: 3px; }
.category-row > span { min-width: 0; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); white-space: nowrap; }
.category-row span small { color: var(--muted); font-size: 8px; }
.category-row strong { font-size: 10px; }

.list, .transaction-table, .user-list, .goal-list, .reminder-list, .upcoming-list { margin-top: 16px; }
.list-row { padding: 10px 0; display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; gap: 11px; align-items: center; }
.list-row + .list-row { border-top: 1px solid var(--soft-line); }
.type-icon { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; font-weight: 900; }
.type-icon.income { color: var(--income); background: var(--income-soft); }
.type-icon.expense { color: var(--expense); background: var(--expense-soft); }
.list-main { min-width: 0; display: flex; flex-direction: column; }
.list-main strong { overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.list-main span { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.amount { font-size: 11px; white-space: nowrap; }
.amount.income { color: var(--income); }
.amount.expense { color: var(--expense); }
.upcoming-row { padding: 10px 0; display: grid; grid-template-columns: 40px 1fr auto; gap: 11px; align-items: center; }
.upcoming-row + .upcoming-row { border-top: 1px solid var(--soft-line); }
.due-box { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface-2); }
.due-box strong { font-size: 13px; }
.due-box span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.upcoming-row > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.upcoming-row > div:nth-child(2) strong { overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.upcoming-row > div:nth-child(2) span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.upcoming-row > b { font-size: 10px; }
.empty { padding: 34px 10px; display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; text-align: center; }
.empty strong { color: var(--ink-soft); font-size: 12px; }
.empty span { font-size: 9px; }
.empty.compact { padding: 18px 8px; }

/* Transactions */
.page-section-head { margin-bottom: 18px; align-items: center; }
.page-section-head h2 { font-size: 23px; }
.transaction-toolbar { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.search-box { width: min(480px, 100%); height: 45px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 9px; background: var(--surface); }
.search-box span { color: var(--muted); font-size: 18px; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.segmented { padding: 4px; border-radius: 11px; display: flex; background: var(--surface-3); }
.segmented button { border: 0; padding: 7px 13px; border-radius: 8px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 800; }
.segmented button.active { color: var(--ink); background: var(--surface); box-shadow: 0 3px 10px rgba(20, 30, 22, .07); }
.table-panel { padding: 0 22px 8px; }
.table-summary { min-height: 50px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 9px; }
.table-summary b { color: var(--ink); }
.table-summary .income b { color: var(--income); }
.table-summary .expense b { color: var(--expense); }
.transaction-row { padding: 13px 0; border-bottom: 1px solid var(--soft-line); display: grid; grid-template-columns: 42px minmax(150px, 1fr) 115px 100px 125px 64px; gap: 11px; align-items: center; }
.transaction-row:last-child { border-bottom: 0; }
.transaction-row .date, .transaction-row .who { color: var(--muted); font-size: 9px; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.row-actions button { width: 28px; height: 28px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 15px; }
.row-actions button:hover { color: var(--danger); background: var(--expense-soft); }

/* Plans */
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.goal-item { padding: 16px 0; border-bottom: 1px solid var(--soft-line); }
.goal-item:last-child { border-bottom: 0; }
.goal-top { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.goal-top > div { min-width: 0; display: flex; flex-direction: column; }
.goal-top strong { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.goal-top span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.goal-top > b { color: #70872c; font-size: 12px; }
.progress { height: 7px; margin-top: 12px; overflow: hidden; border-radius: 10px; background: var(--surface-3); }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); }
.plan-actions { margin-top: 11px; display: flex; gap: 12px; }
.plan-actions button { border: 0; padding: 0; color: #68785a; background: transparent; font-size: 8px; font-weight: 800; }
.plan-actions .danger-link { color: var(--expense); }
.reminder-item { padding: 13px 0; border-bottom: 1px solid var(--soft-line); display: grid; grid-template-columns: 43px minmax(0, 1fr) auto 62px; gap: 11px; align-items: center; }
.reminder-item:last-child { border-bottom: 0; }
.calendar-chip { width: 43px; height: 43px; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #4f6424; background: var(--accent-soft); }
.calendar-chip strong { font-size: 14px; }
.calendar-chip span { font-size: 6px; font-weight: 850; }
.reminder-item > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.reminder-item > div:nth-child(2) strong { overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.reminder-item > div:nth-child(2) span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.reminder-item > b { font-size: 10px; white-space: nowrap; }

/* Coach */
.coach-view { max-width: 1280px; margin: 0 auto; }
.assistant-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr); gap: 18px; align-items: start; }
.coach-shell { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.coach-heading { padding: 25px 28px; border-bottom: 1px solid var(--line); display: flex; gap: 16px; align-items: flex-start; background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.coach-title { min-width: 0; flex: 1; }
.assistant-clear { width: 36px; height: 36px; flex: 0 0 auto; font-size: 15px; }
.coach-orb { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 15px; display: grid; place-items: center; color: #111713; background: var(--accent); font-size: 20px; box-shadow: 0 12px 30px rgba(159, 200, 45, .2); }
.local-badge { padding: 5px 8px; border-radius: 20px; color: #60714f; background: var(--accent-soft); font-size: 8px; font-weight: 800; }
.coach-heading h2 { margin: 10px 0 6px; font-size: 24px; }
.coach-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.capability-strip { padding: 10px 28px; border-bottom: 1px solid var(--soft-line); display: flex; gap: 8px; flex-wrap: wrap; background: var(--surface); }
.capability-strip span { padding: 6px 8px; border: 1px solid var(--soft-line); border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 8px; font-weight: 750; }
.chat { min-height: 390px; max-height: 580px; overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 15px; background: var(--surface-2); scroll-behavior: smooth; }
.message { max-width: 83%; display: flex; gap: 9px; align-items: flex-end; }
.message.assistant { align-self: flex-start; }
.message.user { align-self: flex-end; }
.message-avatar { width: 29px; height: 29px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; color: #111713; background: var(--accent); font-size: 11px; }
.message-bubble { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; color: var(--ink-soft); background: var(--surface); box-shadow: 0 5px 16px rgba(20, 30, 22, .04); font-size: 11px; line-height: 1.55; }
.message-bubble p { margin: 0; white-space: normal; }
.message-bubble p + p { margin-top: 6px; }
.message.user .message-bubble { border-color: var(--dark); border-radius: 14px 14px 4px 14px; color: #fff; background: var(--dark); }
.coach-cards { margin-top: 11px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.coach-card { min-width: 0; padding: 9px; border-radius: 9px; background: var(--surface-2); }
.coach-card span { display: block; overflow: hidden; color: var(--muted); font-size: 7px; white-space: nowrap; text-overflow: ellipsis; }
.coach-card strong { display: block; margin-top: 3px; overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.coach-card.income strong { color: var(--income); }
.coach-card.expense strong, .coach-card.danger strong { color: var(--expense); }
.coach-card.warning strong { color: var(--warning); }
.message.typing .message-bubble { min-width: 57px; display: flex; gap: 4px; }
.message.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite alternate; }
.message.typing i:nth-child(2) { animation-delay: .2s; }
.message.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { to { opacity: .25; transform: translateY(-2px); } }
.suggestions { padding: 14px 28px 5px; display: flex; gap: 7px; flex-wrap: wrap; background: var(--surface); }
.suggestions button { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; color: var(--ink-soft); background: var(--surface-2); font-size: 8px; }
.suggestions button:hover { border-color: var(--accent-strong); }
.coach-input { margin: 8px 28px 12px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; display: grid; grid-template-columns: 1fr 43px; background: var(--surface); box-shadow: var(--shadow-sm); }
.coach-input input { min-width: 0; border: 0; padding: 0 10px; color: var(--ink); background: transparent; font-size: 11px; outline: 0; }
.send-button { width: 43px; height: 43px; border: 0; border-radius: 11px; display: grid; place-items: center; color: #111713; background: var(--accent); font-size: 19px; }
.disclaimer { margin: 0; padding: 0 28px 17px; color: var(--muted); font-size: 8px; text-align: center; }


.allocation-list { margin-top: 12px; padding: 11px; border-radius: 10px; background: var(--surface-2); }
.allocation-list > div { display: grid; grid-template-columns: 112px minmax(70px, 1fr) 32px; gap: 8px; align-items: center; margin: 7px 0; }
.allocation-list span { overflow: hidden; color: var(--ink-soft); font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.allocation-list i { height: 6px; overflow: hidden; border-radius: 10px; background: var(--surface-3); }
.allocation-list b { display: block; height: 100%; border-radius: inherit; background: var(--accent-strong); }
.allocation-list strong { color: var(--ink); font-size: 8px; text-align: right; }
.assistant-warnings { margin-top: 11px; padding: 9px 11px; border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--line)); border-radius: 10px; background: var(--warning-soft); }
.assistant-warnings p { color: var(--warning); font-size: 8px; }
.assistant-actions { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--soft-line); display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.assistant-actions span { color: var(--muted); font-size: 8px; }
.answer-mode { display: block; width: max-content; margin-top: 9px; padding: 3px 6px; border-radius: 8px; color: #60714f; background: var(--accent-soft); font-size: 7px; font-weight: 800; }
.assistant-profile-panel { position: sticky; top: 86px; }
.profile-score { min-width: 46px; padding: 7px 9px; border-radius: 20px; color: #56701a; background: var(--accent-soft); font-size: 10px; font-weight: 900; text-align: center; }
.assistant-profile-form { margin-top: 10px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.assistant-profile-form label { display: block; margin: 9px 0; color: var(--ink-soft); font-size: 9px; font-weight: 750; }
.assistant-profile-form input, .assistant-profile-form select, .assistant-profile-form textarea { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: var(--ink); background: var(--surface); outline: 0; }
.assistant-profile-form input, .assistant-profile-form select { height: 39px; }
.assistant-profile-form textarea { padding: 10px; resize: vertical; line-height: 1.45; }
.assistant-profile-form input:focus, .assistant-profile-form select:focus, .assistant-profile-form textarea:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(199, 239, 69, .14); }
.profile-notes { grid-column: 1 / -1; }
.privacy-note { margin-top: 14px; padding: 12px; border-radius: 11px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }
.privacy-note strong { font-size: 9px; }
.privacy-note span { color: var(--muted); font-size: 8px; line-height: 1.5; }

/* Admin */
.admin-layout { display: grid; grid-template-columns: minmax(290px, .65fr) minmax(0, 1.35fr); gap: 17px; }
.settings-form { margin-top: 17px; }
.settings-form input, .settings-form select { height: 45px; color: var(--ink); background: var(--surface); }
.settings-form > .button,
.settings-form > button[type="submit"] { width: 100%; margin-top: 4px; }
.settings-api-box { margin: 16px 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.settings-api-label { display: block !important; font-weight: 700 !important; margin-bottom: 8px !important; font-size: 13px !important; color: var(--ink) !important; }
.api-key-input-wrap { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 8px !important; width: 100% !important; box-sizing: border-box !important; }
.api-key-input-wrap input { flex: 1 1 auto !important; width: 100% !important; min-width: 0 !important; height: 44px !important; padding: 0 14px !important; margin: 0 !important; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important; font-size: 13px !important; background: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; border-radius: 9px !important; box-sizing: border-box !important; outline: none !important; }
.api-key-input-wrap input:focus { border-color: var(--accent-strong) !important; box-shadow: 0 0 0 3px rgba(199, 239, 69, .14) !important; }
.api-key-input-wrap .btn-key-action,
.api-key-input-wrap .button,
.api-key-input-wrap button { flex: 0 0 auto !important; width: auto !important; min-width: max-content !important; height: 44px !important; padding: 0 16px !important; margin: 0 !important; font-size: 12px !important; font-weight: 700 !important; white-space: nowrap !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; box-sizing: border-box !important; }
.user-row { padding: 13px 0; border-bottom: 1px solid var(--soft-line); display: grid; grid-template-columns: 39px minmax(120px, 1fr) 85px 48px 116px; gap: 9px; align-items: center; }
.user-row:last-child { border-bottom: 0; }
.user-avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #57701e; background: var(--accent-soft); font-size: 11px; font-weight: 850; }
.role-badge { width: max-content; padding: 5px 7px; border-radius: 7px; color: #61732f; background: var(--accent-soft); font-size: 7px; font-weight: 800; }
.status { color: var(--income); font-size: 8px; }
.status.off { color: var(--expense); }
.user-actions { display: flex; justify-content: flex-end; gap: 5px; }
.user-actions button { border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; color: var(--ink-soft); background: var(--surface); font-size: 7px; }
.admin-tools { margin-top: 17px; padding: 0 23px; }
.connection-row, .backup-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.connection-row { border-bottom: 1px solid var(--soft-line); }
.connection-row > div:first-child, .backup-row > div { display: flex; flex-direction: column; }
.connection-row strong, .backup-row strong { font-size: 11px; }
.connection-row span, .backup-row span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.address-list { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.address-list button { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: #536344; background: var(--surface-2); font-size: 9px; }
.address-list button span { margin-left: 6px; color: #81906e; }

/* Modal */
dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 32px); border: 0; border-radius: 20px; padding: 0; color: var(--ink); background: var(--surface); box-shadow: 0 35px 100px rgba(0, 0, 0, .28); }
dialog::backdrop { background: rgba(12, 17, 13, .66); backdrop-filter: blur(5px); }
#modal-form { max-height: calc(100vh - 32px); overflow-y: auto; padding: 27px; }
.modal-head { margin-bottom: 19px; display: flex; justify-content: space-between; align-items: flex-start; }
.modal-head h2 { margin: 0; font-size: 21px; letter-spacing: -.5px; }
.modal-fields { display: grid; gap: 12px; }
.modal-field { margin: 0; }
.modal-field input, .modal-field select { height: 48px; margin-top: 7px; color: var(--ink); background: var(--surface); }
.type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-toggle label { position: relative; }
.type-toggle input { position: absolute; opacity: 0; }
.type-toggle span { height: 46px; border: 1px solid var(--line); border-radius: 11px; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); font-size: 11px; }
.type-toggle input:checked + span { border-color: var(--accent-strong); color: #536b1c; background: var(--accent-soft); font-weight: 850; }
.modal-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 8px; }
.account-summary { margin: -3px 0 19px; padding: 13px; border-radius: 13px; display: flex; gap: 11px; align-items: center; background: var(--surface-2); }
.account-avatar { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #536b1c; background: var(--accent-soft); font-weight: 850; }
.account-summary > div:last-child { display: flex; flex-direction: column; }
.account-summary strong { font-size: 12px; }
.account-summary span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.modal-section + .modal-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal-section h3 { margin: 0 0 13px; font-size: 12px; }
.session-list { display: grid; gap: 7px; }
.session-row { padding: 10px; border: 1px solid var(--soft-line); border-radius: 10px; display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--surface-2); }
.session-row > div { min-width: 0; display: flex; flex-direction: column; }
.session-row strong { font-size: 10px; }
.session-row span { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 7px; white-space: nowrap; text-overflow: ellipsis; }
.session-row i { color: var(--income); font-size: 8px; font-style: normal; }
.session-row button { border: 0; color: var(--expense); background: transparent; font-size: 8px; font-weight: 800; }
.contribution-summary { margin-bottom: 18px; padding: 16px; border-radius: 13px; display: flex; flex-direction: column; background: var(--accent-soft); }
.contribution-summary span, .contribution-summary small { color: var(--muted); font-size: 8px; }
.contribution-summary strong { margin: 5px 0 3px; font-size: 23px; }

.toast { position: fixed; z-index: 120; right: 24px; top: 20px; max-width: min(380px, calc(100% - 32px)); padding: 12px 16px; border: 1px solid #2c352e; border-radius: 12px; color: #fff; background: var(--dark); box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(-10px); pointer-events: none; transition: .24s ease; }
.toast.show { opacity: 1; transform: none; }
.toast[data-tone="success"] { border-color: #587a26; }
.toast[data-tone="error"] { border-color: #a84c40; }
.mobile-nav { display: none; }

@media (max-width: 1180px) {
  .assistant-layout { grid-template-columns: minmax(0, 1fr); }
  .assistant-profile-panel { position: static; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .dashboard-grid.lower, .dashboard-grid.insights-grid { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .transaction-row { grid-template-columns: 42px minmax(130px, 1fr) 105px 110px 64px; }
  .transaction-row .who { display: none; }
}

@media (max-width: 920px) {
  :root { --sidebar-width: 224px; }
  .auth-shell { grid-template-columns: minmax(400px, 1fr) minmax(430px, 1fr); }
  .auth-brand { padding: 38px; }
  .auth-copy h1 { font-size: 54px; }
  .auth-demo { width: 100%; }
  .content, .topbar { padding-left: 24px; padding-right: 24px; }
  .plans-grid { grid-template-columns: 1fr; }
  .user-row { grid-template-columns: 39px 1fr 70px 108px; }
  .user-row .status { display: none; }
}

@media (max-width: 760px) {
  .auth-shell { display: block; background: #f5f7f2; }
  .auth-brand { min-height: 280px; padding: 26px 23px 30px; }
  .brand-lockup { display: none; }
  .auth-copy { margin: auto 0 0; }
  .auth-copy h1 { margin: 6px 0 12px; font-size: 42px; letter-spacing: -2px; }
  .auth-copy > p:last-child { font-size: 13px; line-height: 1.55; }
  .auth-demo, .auth-trust { display: none; }
  .auth-form-wrap { min-height: auto; padding: 18px 13px 36px; display: block; }
  .auth-card { margin: -2px auto 0; padding: 20px 20px 26px; border-radius: 19px; box-shadow: 0 20px 60px rgba(28, 39, 30, .12); }
  .auth-card-head { margin-bottom: 18px; }
  .mobile-brand { display: flex; }
  .auth-form h2 { font-size: 26px; }
  .two-fields { grid-template-columns: 1fr; gap: 0; }
  .auth-footnote { margin-left: auto; margin-right: auto; }

  .app { display: block; padding-bottom: 79px; }
  .sidebar { display: none; }
  .workspace { display: block; }
  .topbar { min-height: 82px; padding: 15px 14px; }
  .topbar .eyebrow { display: none; }
  .page-heading h1 { font-size: 20px; }
  .top-actions { gap: 6px; }
  .month-control { height: 42px; padding: 4px 9px; }
  .month-control input { width: 116px; font-size: 10px; }
  .top-actions #theme-toggle, .top-actions .mobile-account { width: 40px; height: 40px; }
  .top-actions .mobile-account { display: grid; }
  .top-actions .button { display: none; }
  .content { padding: 13px 11px 32px; }
  .install-banner { margin: 8px 9px 0; grid-template-columns: 34px 1fr auto 24px; }
  .install-banner span { display: none; }

  .budget-hero { min-height: auto; padding: 25px 22px; border-radius: 19px; }
  .hero-copy h2 { font-size: 28px; }
  .hero-copy p { font-size: 11px; }
  .hero-tags { margin-top: 18px; }
  .health-ring { width: 105px; }
  .health-ring::after { width: 82px; }
  .health-ring strong { font-size: 24px; }
  .health-ring span { font-size: 7px; }
  .metric-strip { grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }
  .metric-strip article { padding: 15px; grid-template-columns: 34px 1fr; column-gap: 9px; border-radius: 14px; }
  .metric-strip .metric-icon { width: 34px; height: 34px; border-radius: 10px; }
  .metric-strip article > strong { font-size: 18px; }
  .dashboard-grid { gap: 10px; margin-top: 10px; }
  .panel { padding: 18px; border-radius: 15px; }
  .insight-list { grid-template-columns: 1fr; }
  .history-chart { height: 185px; padding: 0; gap: 5px; }
  .chart-tooltip { display: none !important; }
  .category-layout { grid-template-columns: 112px 1fr; gap: 13px; }
  .donut { width: 108px; }
  .donut::after { width: 68px; }

  .page-section-head { display: flex; }
  .page-section-head h2 { font-size: 20px; }
  .desktop-add { display: none; }
  .transaction-toolbar { display: block; }
  .search-box { width: 100%; }
  .segmented { width: max-content; margin-top: 9px; }
  .table-panel { padding: 0 14px 6px; }
  .table-summary { gap: 11px; overflow: auto; white-space: nowrap; }
  .transaction-row { grid-template-columns: 38px minmax(110px, 1fr) auto 58px; gap: 7px; }
  .transaction-row .date, .transaction-row .who { display: none; }
  .transaction-row .amount { font-size: 10px; }

  .coach-heading { padding: 19px; }
  .capability-strip { padding: 9px 14px; }
  .profile-grid { grid-template-columns: 1fr; }
  .coach-orb { width: 41px; height: 41px; border-radius: 12px; }
  .coach-heading h2 { font-size: 20px; }
  .chat { min-height: 300px; padding: 18px 14px; }
  .message { max-width: 94%; }
  .coach-cards { grid-template-columns: 1fr; }
  .suggestions { padding: 11px 14px 4px; }
  .coach-input { margin: 7px 14px 10px; }
  .disclaimer { padding: 0 14px 15px; }

  .admin-tools { padding: 0 18px; }
  .connection-row, .backup-row { padding: 14px 0; align-items: flex-start; flex-direction: column; }
  .address-list { width: 100%; align-items: stretch; }
  .address-list button { width: 100%; text-align: left; }
  .user-row { grid-template-columns: 36px 1fr auto; }
  .user-row .role-badge, .user-row .status { display: none; }
  .user-actions { grid-column: 2 / -1; justify-content: flex-start; }

  .mobile-nav { position: fixed; z-index: 40; inset: auto 0 0; padding: 6px max(5px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left)); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr 64px 1fr 1fr; align-items: center; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); }
  .mobile-nav button { border: 0; padding: 3px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); background: transparent; font-size: 8px; }
  .mobile-nav button span { font-size: 18px; }
  .mobile-nav button.active { color: #698323; }
  .mobile-nav .mobile-add { width: 50px; height: 50px; border-radius: 16px; justify-self: center; transform: translateY(-15px); color: #111713; background: var(--accent); box-shadow: 0 10px 24px rgba(102, 127, 30, .25); font-size: 24px; }

  dialog { margin: auto 14px; width: calc(100% - 28px); border-radius: 17px; }
  #modal-form { padding: 21px; }
}

@media (max-width: 520px) {
  .budget-hero { display: block; }
  .health-ring { position: absolute; right: 18px; top: 19px; width: 78px; opacity: .95; }
  .health-ring::after { width: 61px; }
  .health-ring strong { font-size: 18px; }
  .health-ring span { display: none; }
  .live-pill { padding-right: 70px; }
  .hero-copy h2 { max-width: calc(100% - 35px); font-size: 25px; }
  .metric-strip article { grid-template-columns: 1fr; }
  .metric-strip .metric-icon { grid-row: auto; margin-bottom: 8px; }
  .metric-strip article > strong { font-size: 17px; }
  .category-layout { grid-template-columns: 100px 1fr; }
  .donut { width: 96px; }
  .donut::after { width: 60px; }
  .reminder-item { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .reminder-item .row-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

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

/* Finansal profil — tek ve kesin yerlesim */
.finance-profile-v8 {
  position: sticky;
  top: 86px;
  width: 100%;
  min-width: 0;
  padding: 24px;
  border: 1px solid #344238;
  border-radius: 20px;
  box-sizing: border-box;
  background: linear-gradient(145deg, #111912 0%, #172118 100%);
  box-shadow: 0 18px 48px rgba(5, 10, 6, .16);
}

.finance-profile-v8 .section-head {
  margin-bottom: 20px;
  align-items: flex-start;
  gap: 18px;
}

.finance-profile-v8 .section-head > div {
  min-width: 0;
}

.finance-profile-v8 .section-head h2 {
  margin: 0;
  color: #f4f7f0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.finance-profile-v8 .section-head p {
  margin: 6px 0 0;
  color: #95a091;
  font-size: 11px;
  line-height: 1.45;
}

.finance-profile-v8 .profile-score {
  min-width: 52px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(199, 239, 69, .26);
  border-radius: 999px;
  color: #d8ff55;
  background: rgba(199, 239, 69, .1);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.finance-profile-form-v8 {
  display: block;
  min-width: 0;
  margin-top: 0;
}

.finance-profile-form-v8 .profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.finance-profile-form-v8 .profile-field {
  display: flex;
  min-width: 0;
  margin: 0;
  flex-direction: column;
  gap: 8px;
  color: #dbe3d7;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.finance-profile-form-v8 .profile-field > span:first-child {
  min-height: 17px;
}

.finance-profile-form-v8 input,
.finance-profile-form-v8 select,
.finance-profile-form-v8 textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid #465448;
  border-radius: 11px;
  box-sizing: border-box;
  color: #f3f6f0;
  background: #202a21;
  font: inherit;
  font-size: 14px;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.finance-profile-form-v8 input,
.finance-profile-form-v8 select {
  height: 46px;
  min-height: 46px;
  margin: 0;
  padding: 0 13px;
}

.finance-profile-form-v8 select {
  cursor: pointer;
  color-scheme: dark;
}

.finance-profile-form-v8 input::placeholder,
.finance-profile-form-v8 textarea::placeholder {
  color: #778277;
  opacity: 1;
}

.finance-profile-form-v8 input:hover,
.finance-profile-form-v8 select:hover,
.finance-profile-form-v8 textarea:hover {
  border-color: #667466;
  background: #243025;
}

.finance-profile-form-v8 input:focus,
.finance-profile-form-v8 select:focus,
.finance-profile-form-v8 textarea:focus {
  border-color: #bde936;
  box-shadow: 0 0 0 3px rgba(199, 239, 69, .14);
}

.finance-profile-form-v8 .field-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.finance-profile-form-v8 .field-control input {
  padding-right: 48px;
}

.finance-profile-form-v8 .field-control em {
  position: absolute;
  right: 13px;
  top: 50%;
  color: #8f9a8c;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.finance-profile-form-v8 .profile-notes {
  width: 100%;
  margin-top: 18px;
}

.finance-profile-form-v8 textarea {
  min-height: 108px;
  margin: 0;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.5;
}

.finance-profile-form-v8 .button {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  border-radius: 12px;
  font-size: 13px;
}

.finance-profile-v8 .privacy-note {
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid rgba(199, 239, 69, .12);
  border-radius: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: #859080;
  background: #eef3e2;
}

.finance-profile-v8 .privacy-note strong {
  flex: 0 0 auto;
  color: #536144;
  font-size: 8px;
}

.finance-profile-v8 .privacy-note span {
  min-width: 0;
  margin: 0;
  color: #66715f;
  font-size: 8px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .finance-profile-v8 {
    position: static;
  }
}

@media (max-width: 920px) {
  .finance-profile-form-v8 .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .finance-profile-v8 {
    padding: 18px;
    border-radius: 16px;
  }

  .finance-profile-v8 .section-head {
    margin-bottom: 17px;
  }

  .finance-profile-form-v8 .profile-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .finance-profile-v8 .privacy-note {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ==========================================================================
   EvKasam Gelişmiş Özellikler: Hızlı Harcama, Taksitler, Günlük Bütçe & CSV
   ========================================================================== */

/* Hızlı Harcama Çubuğu */
.quick-action-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: thin;
}

.quick-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: .5px;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: all .18s ease;
  box-shadow: var(--shadow-sm);
}

.quick-chip:hover {
  background: var(--surface-2);
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}

.quick-chip.custom {
  background: var(--accent-soft);
  color: var(--income);
  border-color: rgba(159, 200, 45, .4);
}

/* Günlük Güvenli Harcama Rozeti */
.daily-safe-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: all .2s ease;
}

.daily-safe-pill.healthy {
  background: var(--income-soft);
  color: var(--income);
  border-color: rgba(110, 150, 34, .3);
}

.daily-safe-pill.caution {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(189, 129, 36, .3);
}

.daily-safe-pill.exceeded {
  background: var(--expense-soft);
  color: var(--expense);
  border-color: rgba(199, 93, 77, .3);
}

/* Kredi Kartı Taksit Yükü Paneli */
.installment-panel {
  margin-top: 20px;
}

.installment-forecast-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.installment-month-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform .18s ease, border-color .18s ease;
}

.installment-month-card.active {
  border-color: rgba(108, 140, 255, .35);
  background: var(--surface);
}

.installment-month-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
}

.inst-month-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: capitalize;
}

.installment-month-card strong {
  font-size: 17px;
  font-weight: 900;
  color: var(--ink);
}

.installment-month-card small {
  font-size: 11px;
  color: var(--muted);
}

/* Taksit Etiketi */
.inst-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(101, 127, 220, .14);
  color: var(--blue);
  margin-left: 6px;
  vertical-align: middle;
}

/* Modal içi Taksit Kutusu */
.installment-toggle-row {
  margin-top: 6px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-strong);
  cursor: pointer;
}

.installment-box {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  margin-top: 10px;
}

.installment-hint {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* CSV İçe Aktarma Modalı */
.csv-dialog {
  max-width: 580px;
  width: 92%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 24px;
}

.csv-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.csv-file-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.csv-preview-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-2);
  max-height: 220px;
  overflow-y: auto;
}

.csv-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
}

.csv-preview-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.csv-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 12px;
}

.type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.type-dot.income { background: var(--income); }
.type-dot.expense { background: var(--expense); }

.csv-preview-row strong {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-pill {
  padding: 2px 6px;
  background: var(--surface-3);
  border-radius: 4px;
  font-size: 10px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Yazdır / PDF Rapor Görünümü (@media print)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #111111 !important;
  }

  .sidebar,
  .mobile-nav,
  .top-actions,
  .quick-action-strip,
  .row-actions,
  .coach-view,
  .toast,
  dialog,
  #install-banner {
    display: none !important;
  }

  .app {
    display: block !important;
  }

  .workspace {
    margin: 0 !important;
    padding: 0 !important;
  }

  .content {
    padding: 0 !important;
  }

  .panel {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 16px !important;
  }

  .metric-strip {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
  }

  .metric-strip article {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }

  .dashboard-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  .page-heading h1::after {
    content: " · Aylık Ev Bütçesi Raporu";
    font-size: 18px;
    font-weight: 500;
    color: #666;
  }
}

/* ==========================================================================
   Borsa & Ekonomi Yapay Zekâ Ajanı Stilleri
   ========================================================================== */
.coach-mode-bar {
  padding: 14px 28px 12px;
  border-bottom: 1px solid var(--soft-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
}

.agent-mode-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.agent-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: all .2s ease;
}

.agent-tab:hover {
  color: var(--ink);
}

.agent-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.agent-tab .tab-icon {
  font-size: 14px;
}

.agent-tab .tab-badge {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent);
  color: #111713;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .02em;
}

.agent-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: all .2s ease;
}

.agent-live-badge.online {
  color: #247539;
  background: rgba(46, 175, 78, 0.12);
  border-color: rgba(46, 175, 78, 0.35);
}

.agent-live-badge.online .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28a745;
  box-shadow: 0 0 10px #28a745;
  animation: pulse-agent-dot 2s infinite ease-in-out;
}

.agent-live-badge.offline {
  color: #94711f;
  background: rgba(220, 165, 40, 0.12);
  border-color: rgba(220, 165, 40, 0.28);
}

.agent-live-badge.offline .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dca528;
}

@keyframes pulse-agent-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(1.25); }
}

.agent-api-notice {
  margin: 4px 28px 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(199, 239, 69, 0.14);
  border: 1px dashed rgba(120, 160, 30, 0.38);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}

.agent-api-notice .text-link {
  border: 0;
  background: transparent;
  color: #557218;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}

.settings-api-box {
  margin: 14px 0 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.settings-api-box label {
  margin: 0 0 6px !important;
  font-weight: 750;
  display: block;
}

.api-key-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.api-key-input-wrap input {
  flex: 1;
  min-width: 0;
  height: 45px;
}

.api-key-input-wrap .button {
  flex: 0 0 auto;
  height: 45px;
  padding: 0 14px;
  margin-top: 0 !important;
}

@media (max-width: 760px) {
  .coach-mode-bar { padding: 12px 14px; }
  .agent-tab { padding: 6px 10px; font-size: 10px; }
  .agent-live-badge { font-size: 9px; padding: 5px 10px; }
  .agent-api-notice { margin: 4px 14px 10px; font-size: 10px; }
}

/* ==========================================================================
   MUHASEBE & ERP STİLLERİ (v8.4.0)
   ========================================================================== */

/* 1. Net Varlık & Bilanço Kahraman Kartı */
.networth-hero-card {
  background: linear-gradient(135deg, #111713 0%, #1c281e 50%, #132218 100%);
  border-radius: var(--radius-lg);
  color: #f3f6f1;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 16px 40px rgba(17, 23, 19, 0.28);
  border: 1px solid rgba(199, 239, 69, 0.2);
  position: relative;
  overflow: hidden;
}

.networth-hero-card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 239, 69, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.networth-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.networth-main-val {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 4px 0 6px;
}

.networth-main-val span {
  font-size: 14px;
  color: #a4b3a5;
  font-weight: 600;
}

.networth-main-val strong {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
}

#hero-net-worth-copy {
  margin: 0;
  font-size: 12px;
  color: #8c9b8e;
  max-width: 520px;
}

.networth-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.accent-btn {
  background: var(--accent) !important;
  color: #111713 !important;
  font-weight: 850;
  border: 0;
  box-shadow: 0 4px 16px rgba(199, 239, 69, 0.3);
}

.accent-btn:hover {
  background: var(--accent-strong) !important;
}

.button.outline.light {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f3f6f1;
  background: rgba(255, 255, 255, 0.05);
}

.button.outline.light:hover {
  background: rgba(255, 255, 255, 0.12);
}

.networth-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nw-item {
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nw-label {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.5px;
  color: #a4b3a5;
}

.nw-item strong {
  font-size: 18px;
  font-weight: 850;
  color: #ffffff;
}

.nw-item small {
  font-size: 11px;
  color: #8c9b8e;
}

.nw-item small b {
  color: #d1ddd2;
}

/* 2. Mini Kasa & Hesaplar Paneli (Dashboard) */
.mini-accounts-panel {
  margin-bottom: 24px;
}

.accounts-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.acc-chip {
  flex: 0 0 auto;
  min-width: 170px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.acc-chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent-strong);
}

.acc-chip-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acc-chip-icon {
  font-size: 16px;
}

.acc-chip-name {
  font-size: 12px;
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-chip-bal {
  font-size: 15px;
  font-weight: 850;
  color: var(--ink);
}

.acc-chip-type {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 3. Kasa & Hesaplar Görünümü */
.accounts-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.acc-sum-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acc-sum-item.highlight {
  background: var(--accent-soft);
  border-color: rgba(159, 200, 45, 0.4);
}

.acc-sum-item span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.acc-sum-item strong {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}

.accounts-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* FinTech Bank / Kredi Kartı Görseli */
.fintech-card {
  position: relative;
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-2) 100%);
  border-radius: 20px;
  border: 1px solid var(--line);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fintech-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.fintech-card.credit-card {
  background: linear-gradient(135deg, #1b2028 0%, #2a313d 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
}

.fintech-card.credit-card .fintech-card-sub,
.fintech-card.credit-card .card-metric-label {
  color: #9aa5b5;
}

.fintech-card.credit-card .fintech-card-title {
  color: #ffffff;
}

.fintech-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.card-bank-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-bank-icon {
  font-size: 24px;
}

.fintech-card-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: var(--ink);
}

.fintech-card-sub {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-chip {
  width: 38px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d4af37 0%, #f6e27a 50%, #aa771c 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
}

.card-chip::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 3px;
}

.fintech-card-body {
  margin: 10px 0 16px;
}

.card-balance-display {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-balance-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.card-balance-val {
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
}

.credit-card .card-balance-val {
  color: #ff8c7a;
}

.card-limit-wrap {
  margin-top: 10px;
}

.card-limit-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
  margin: 4px 0 6px;
}

.card-limit-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--expense);
  transition: width 0.3s ease;
}

.card-limit-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #9aa5b5;
}

.fintech-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--soft-line);
}

.credit-card .fintech-card-actions {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.fintech-card-actions button {
  font-size: 12px;
  padding: 6px 12px;
  min-height: 32px;
}

/* 4. Zarf Bütçeleme (Envelope Budgets) */
.envelope-overview-panel {
  margin-bottom: 24px;
}

.envelope-budgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.envelope-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.envelope-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-strong);
}

.envelope-card.status-warning {
  border-color: var(--warning);
}

.envelope-card.status-exceeded {
  border-color: var(--expense);
  background: var(--expense-soft);
}

.envelope-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.envelope-cat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
}

.envelope-status-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.envelope-status-badge.healthy {
  background: var(--income-soft);
  color: var(--income);
}

.envelope-status-badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.envelope-status-badge.exceeded {
  background: var(--expense);
  color: #ffffff;
}

.envelope-meters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.envelope-amounts-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
}

.envelope-amounts-row strong {
  font-size: 16px;
  color: var(--ink);
}

.envelope-bar-track {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
  position: relative;
}

.envelope-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--income);
  transition: width 0.3s ease;
}

.envelope-bar-fill.warning {
  background: var(--warning);
}

.envelope-bar-fill.exceeded {
  background: var(--expense);
}

.envelope-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* 5. Cari Borç ve Alacak Defteri */
.debts-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.debt-sum-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.debt-sum-card.receivable {
  border-left: 4px solid var(--income);
}

.debt-sum-card.payable {
  border-left: 4px solid var(--expense);
}

.debt-sum-card.net {
  border-left: 4px solid var(--blue);
}

.debt-sum-card span {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
}

.debt-sum-card strong {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}

.debt-sum-card small {
  font-size: 11px;
  color: var(--muted);
}

.debts-toolbar {
  margin-bottom: 18px;
}

.debts-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.debt-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.debt-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.debt-card.payable {
  border-top: 3px solid var(--expense);
}

.debt-card.receivable {
  border-top: 3px solid var(--income);
}

.debt-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.debt-person-name {
  font-size: 16px;
  font-weight: 850;
  color: var(--ink);
  margin: 0;
}

.debt-dir-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.debt-dir-badge.receivable {
  background: var(--income-soft);
  color: var(--income);
}

.debt-dir-badge.payable {
  background: var(--expense-soft);
  color: var(--expense);
}

.debt-amounts-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.debt-rem-label {
  font-size: 11px;
  color: var(--muted);
}

.debt-rem-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}

.debt-progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}

.debt-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--income);
}

.debt-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.debt-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--soft-line);
}

.debt-card-actions button {
  flex: 1;
  font-size: 12px;
  padding: 6px 10px;
  min-height: 34px;
}

/* 6. Fatura & Ödeme Takvimi */
.calendar-card {
  padding: 20px;
  margin-bottom: 24px;
}

.calendar-month-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.calendar-month-bar strong {
  font-size: 18px;
  font-weight: 850;
  color: var(--ink);
}

.calendar-legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
}

.cal-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.leg-dot.bill { background: var(--blue); }
.leg-dot.debt { background: var(--expense); }
.leg-dot.paid { background: var(--income); }

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day-cell {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-height: 80px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.calendar-day-cell.is-today {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
}

.cal-day-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.cal-events-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.cal-event-pill {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}

.cal-event-pill.bill {
  background: rgba(101, 127, 220, 0.15);
  color: #3b5cb8;
}

.cal-event-pill.paid {
  background: var(--income-soft);
  color: var(--income);
  text-decoration: line-through;
}

.cal-event-pill.debt {
  background: var(--expense-soft);
  color: var(--expense);
}

.calendar-bills-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-bill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-bill-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-due-box {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--surface-3);
  display: grid;
  place-content: center;
  text-align: center;
  font-weight: 850;
  color: var(--ink);
  line-height: 1.1;
}

.cal-due-box span {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
}

.calendar-bill-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-bill-amount {
  font-size: 16px;
  font-weight: 850;
  color: var(--ink);
}

/* 7. Mobil Menü İyileştirmesi */
@media (max-width: 768px) {
  .mobile-nav {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 8px;
    gap: 4px;
    scrollbar-width: none;
  }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav button {
    flex: 0 0 auto;
    min-width: 52px;
    padding: 6px 4px;
    font-size: 10px;
  }
  .calendar-days-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }
  .calendar-day-cell {
    min-height: 58px;
    padding: 4px;
  }
  .cal-day-num { font-size: 11px; }
  .cal-event-pill { font-size: 8px; padding: 1px 3px; }
  .networth-head { flex-direction: column; }
  .networth-actions { width: 100%; justify-content: flex-start; }
}



