:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-deep: #040a13;
  --panel: rgba(13, 27, 47, .78);
  --panel-solid: #0d1b2f;
  --line: rgba(135, 170, 223, .16);
  --line-strong: rgba(135, 170, 223, .28);
  --text: #f4f7fb;
  --muted: #8ca0bd;
  --muted-2: #61728c;
  --accent: #7eb8ff;
  --accent-2: #b8d6ff;
  --success: #62d49a;
  --danger: #ff8290;
  --warning: #ffd275;
  --shadow: 0 28px 90px rgba(0,0,0,.42);
  --radius: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 15%, rgba(66, 123, 205, .18), transparent 30rem),
    radial-gradient(circle at 85% 80%, rgba(52, 185, 142, .10), transparent 32rem),
    linear-gradient(160deg, var(--bg-deep), var(--bg));
  color: var(--text);
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

/* ---------- Login ---------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  position: relative;
}
.auth-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 36px;
  position: relative;
  z-index: 4;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 790;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #c7ddff, #79aff1);
  color: #07111f;
  font-weight: 950;
  box-shadow: 0 12px 35px rgba(106, 167, 244, .22);
}
.brand span:last-child { color: #dfe9f8; }
.private-chip {
  border: 1px solid var(--line);
  background: rgba(9, 20, 36, .55);
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  backdrop-filter: blur(12px);
}
.auth-main {
  position: relative;
  display: grid;
  place-items: center;
  padding: 34px 20px 70px;
  z-index: 2;
}
.currency-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .95;
}
.currency-icon {
  position: absolute;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 21px;
  border: 1px solid rgba(157, 192, 240, .16);
  background: linear-gradient(145deg, rgba(20, 42, 70, .78), rgba(8, 19, 34, .68));
  color: rgba(210, 229, 255, .82);
  font-size: 26px;
  font-weight: 800;
  box-shadow: inset 0 1px rgba(255,255,255,.04), 0 20px 60px rgba(0,0,0,.18);
  backdrop-filter: blur(16px);
  animation: float 8s ease-in-out infinite;
}
.currency-icon:nth-child(2n) { animation-delay: -2.4s; }
.currency-icon:nth-child(3n) { animation-delay: -4.8s; }
.currency-icon.c1 { left: 8%; top: 18%; transform: rotate(-8deg); }
.currency-icon.c2 { left: 16%; bottom: 15%; transform: rotate(7deg); }
.currency-icon.c3 { right: 12%; top: 14%; transform: rotate(6deg); }
.currency-icon.c4 { right: 7%; bottom: 17%; transform: rotate(-8deg); }
.currency-icon.c5 { left: 32%; top: 5%; width: 52px; height: 52px; font-size: 22px; }
.currency-icon.c6 { right: 31%; bottom: 5%; width: 52px; height: 52px; font-size: 22px; }
@keyframes float { 0%,100%{ translate:0 0 } 50%{ translate:0 -10px } }

.auth-card {
  width: min(620px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  background: linear-gradient(160deg, rgba(16, 34, 58, .92), rgba(8, 19, 34, .91));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  padding: 54px 54px 42px;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  top: -190px;
  right: -90px;
  background: rgba(126,184,255,.15);
  filter: blur(3px);
}
.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 760;
  margin-bottom: 16px;
}
.kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(98,212,154,.10); }
.auth-card h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 64px);
  line-height: .98;
  letter-spacing: -.055em;
}
.auth-card .lead {
  color: #a6b6cd;
  font-size: 16px;
  line-height: 1.65;
  max-width: 480px;
  margin: 22px 0 34px;
}
.email-form { display: grid; gap: 13px; }
.email-label { color: #a7b7ce; font-size: 13px; font-weight: 700; }
.email-input-wrap { position: relative; }
.email-input-wrap svg { position: absolute; width: 21px; height: 21px; left: 18px; top: 50%; transform: translateY(-50%); color: #7290b6; }
.email-input {
  width: 100%;
  border: 1px solid #2b4264;
  border-radius: 16px;
  background: #09182a;
  color: #fff;
  padding: 18px 18px 18px 52px;
  outline: none;
  font-size: 16px;
  transition: .2s ease;
}
.email-input:focus { border-color: #77aff6; box-shadow: 0 0 0 4px rgba(126,184,255,.10); }
.email-input::placeholder { color: #58708f; }
.auth-button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 17px 20px;
  font-weight: 850;
  color: #07111f;
  background: linear-gradient(135deg, #eaf3ff, #9fcaff);
  box-shadow: 0 15px 38px rgba(111, 169, 242, .18);
  transition: transform .18s ease, filter .18s ease;
}
.auth-button:hover { transform: translateY(-1px); filter: brightness(1.03); }
.auth-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.auth-note { display: flex; gap: 10px; margin-top: 18px; color: #7589a6; font-size: 12px; line-height: 1.55; }
.auth-note svg { width: 16px; flex: 0 0 auto; margin-top: 1px; color: #6c91be; }
.auth-message { margin-top: 18px; padding: 14px 15px; border-radius: 14px; font-size: 13px; line-height: 1.5; border: 1px solid var(--line); background: rgba(7,17,31,.56); }
.auth-message.success { color: #b8efcf; border-color: rgba(98,212,154,.24); background: rgba(40, 120, 81, .09); }
.auth-message.error { color: #ffc0c8; border-color: rgba(255,130,144,.24); background: rgba(140, 42, 60, .10); }
.auth-message.warn { color: #ffe2a5; border-color: rgba(255,210,117,.24); background: rgba(147, 103, 31, .11); }
.auth-footer { padding: 0 28px 26px; text-align: center; color: #52647e; font-size: 11px; position: relative; z-index: 3; }

.sent-state { text-align: center; display: grid; justify-items: center; }
.sent-icon { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: rgba(98,212,154,.12); color: var(--success); border: 1px solid rgba(98,212,154,.22); margin-bottom: 24px; }
.sent-icon svg { width: 31px; height: 31px; }
.sent-state h2 { margin: 0; font-size: 34px; letter-spacing: -.035em; }
.sent-state p { margin: 13px auto 0; color: #92a5bf; max-width: 430px; line-height: 1.6; }
.sent-email { color: #dfeaff; font-weight: 780; }
.text-button { margin-top: 26px; background: transparent; border: 0; color: #8dbcf6; padding: 8px; font-weight: 750; }

/* ---------- Callback ---------- */
.callback-page { min-height:100vh; display:grid; place-items:center; padding:20px; }
.callback-card { width:min(520px,100%); text-align:center; padding:44px; border-radius:28px; border:1px solid var(--line); background:rgba(11,25,43,.88); box-shadow:var(--shadow); }
.callback-loader { width:50px; height:50px; margin:0 auto 24px; border-radius:50%; border:3px solid #203653; border-top-color:#a7cdff; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.callback-card h1 { margin:0 0 12px; font-size:30px; }
.callback-card p { color:var(--muted); line-height:1.6; margin:0; }

/* ---------- App ---------- */
.guard-screen { position:fixed; inset:0; z-index:100; background:#07111f; display:grid; place-items:center; }
.app-layout { min-height:100vh; display:grid; grid-template-columns:250px minmax(0,1fr); }
.sidebar { border-right:1px solid var(--line); background:rgba(5,13,24,.82); backdrop-filter:blur(18px); padding:24px 18px; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.sidebar .brand { padding:3px 8px 28px; }
.sidebar-nav { display:grid; gap:7px; }
.nav-btn { appearance:none; border:0; background:transparent; color:#8092ad; padding:12px; border-radius:13px; display:flex; align-items:center; gap:11px; text-align:left; font-weight:700; }
.nav-btn svg { width:19px; height:19px; }
.nav-btn:hover { color:#dfe9f8; background:#0e1d31; }
.nav-btn.active { color:#fff; background:#152944; box-shadow:inset 0 0 0 1px rgba(140,182,236,.08); }
.account-button { margin-top:auto; width:100%; border:1px solid var(--line); border-radius:16px; background:#0b1a2c; color:#d9e5f5; display:flex; gap:11px; align-items:center; padding:11px; text-align:left; }
.avatar { width:37px; height:37px; border-radius:12px; display:grid; place-items:center; background:linear-gradient(145deg,#97c4ff,#5f91d1); color:#07111f; font-weight:900; }
.account-meta { min-width:0; flex:1; }
.account-meta b, .account-meta span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-meta b { font-size:12px; }
.account-meta span { margin-top:3px; color:#7086a4; font-size:10px; }
.main-area { min-width:0; }
.app-header { min-height:105px; border-bottom:1px solid var(--line); padding:27px 34px 20px; display:flex; justify-content:space-between; align-items:flex-end; gap:20px; position:sticky; top:0; z-index:30; background:rgba(7,17,31,.82); backdrop-filter:blur(20px); }
.app-header h1 { margin:0; font-size:29px; letter-spacing:-.04em; }
.app-header p { margin:6px 0 0; color:var(--muted); font-size:13px; }
.header-pill { border:1px solid var(--line); border-radius:999px; padding:9px 12px; color:#7f94b1; font-size:11px; background:rgba(11,25,43,.72); }
.app-content { padding:30px 34px 60px; max-width:1440px; margin:0 auto; }
.welcome-panel { position:relative; overflow:hidden; border:1px solid var(--line-strong); border-radius:28px; background:linear-gradient(145deg,#10243d,#0b192b); padding:34px; min-height:250px; }
.welcome-panel::after { content:"₾  $  €  £"; position:absolute; right:-12px; bottom:-15px; font-size:82px; letter-spacing:10px; color:rgba(162,199,246,.06); font-weight:900; transform:rotate(-4deg); }
.welcome-panel .eyebrow { color:#88acd8; text-transform:uppercase; letter-spacing:.14em; font-size:10px; font-weight:800; }
.welcome-panel h2 { margin:13px 0 12px; font-size:36px; letter-spacing:-.045em; max-width:680px; }
.welcome-panel p { margin:0; max-width:690px; color:#93a7c2; line-height:1.65; }
.primary-action { margin-top:24px; border:0; border-radius:14px; padding:13px 17px; font-weight:850; background:#e7f1ff; color:#07111f; }
.setup-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin-top:16px; }
.setup-card { border:1px solid var(--line); border-radius:19px; background:#0b192b; padding:19px; min-height:150px; }
.setup-number { color:#6d87a8; font-size:10px; font-weight:900; letter-spacing:.1em; }
.setup-card h3 { font-size:14px; margin:18px 0 8px; }
.setup-card p { color:#7186a3; font-size:11px; line-height:1.55; margin:0; }
.empty-page { border:1px solid var(--line); border-radius:24px; padding:44px; text-align:center; background:#0b192b; }
.empty-page .big-icon { width:58px; height:58px; display:grid; place-items:center; margin:0 auto 18px; border-radius:18px; background:#102541; color:#8cbcff; font-size:28px; }
.empty-page h2 { margin:0; font-size:25px; }
.empty-page p { color:var(--muted); max-width:520px; margin:12px auto 0; line-height:1.65; }

.account-overlay { position:fixed; inset:0; z-index:90; display:grid; justify-items:end; background:rgba(0,0,0,.44); backdrop-filter:blur(5px); }
.account-drawer { height:100%; width:min(430px,100%); background:#091728; border-left:1px solid var(--line-strong); padding:26px; box-shadow:-30px 0 80px rgba(0,0,0,.36); }
.drawer-head { display:flex; align-items:center; justify-content:space-between; }
.drawer-head h2 { margin:0; font-size:22px; }
.icon-button { width:38px; height:38px; border:1px solid var(--line); border-radius:12px; background:#0c1d31; color:#a8bbd4; font-size:22px; }
.profile-card { margin-top:28px; padding:20px; border:1px solid var(--line); background:#0d1d31; border-radius:19px; }
.profile-card .avatar { width:48px; height:48px; border-radius:15px; margin-bottom:17px; }
.profile-label { color:#677d9b; text-transform:uppercase; font-size:9px; letter-spacing:.12em; font-weight:900; }
.profile-email { margin-top:6px; font-size:14px; word-break:break-word; }
.session-status { margin-top:14px; display:inline-flex; align-items:center; gap:8px; padding:7px 9px; border-radius:999px; background:rgba(98,212,154,.09); color:#9ce0ba; font-size:10px; }
.session-status i { width:6px; height:6px; border-radius:50%; background:var(--success); }
.drawer-copy { color:#7489a6; font-size:12px; line-height:1.6; margin:24px 3px; }
.logout-button { width:100%; border:1px solid rgba(255,130,144,.24); color:#ffb0ba; background:rgba(120,30,45,.09); border-radius:14px; padding:13px; font-weight:800; }

.mobile-nav { display:none; }

@media (max-width: 900px) {
  .currency-icon.c5, .currency-icon.c6 { display:none; }
  .app-layout { grid-template-columns:210px 1fr; }
  .setup-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 700px) {
  .auth-topbar { padding:20px; }
  .private-chip { display:none; }
  .auth-main { padding:18px 15px 55px; }
  .currency-icon { width:50px; height:50px; border-radius:17px; font-size:21px; opacity:.55; }
  .currency-icon.c1{left:-8px;top:12%}.currency-icon.c2{left:7px;bottom:9%}.currency-icon.c3{right:-8px;top:10%}.currency-icon.c4{right:7px;bottom:8%}
  .auth-card { border-radius:26px; padding:37px 23px 30px; }
  .auth-card h1 { font-size:43px; }
  .auth-card .lead { font-size:14px; margin:18px 0 28px; }
  .app-layout { display:block; }
  .sidebar { display:none; }
  .app-header { min-height:88px; padding:20px 18px 16px; }
  .app-header h1 { font-size:24px; }
  .app-header p { display:none; }
  .app-content { padding:17px 14px 95px; }
  .welcome-panel { padding:25px 20px; min-height:270px; }
  .welcome-panel h2 { font-size:29px; }
  .setup-grid { grid-template-columns:1fr 1fr; gap:9px; }
  .setup-card { padding:15px; min-height:135px; }
  .mobile-nav { position:fixed; left:0; right:0; bottom:0; display:grid; grid-template-columns:repeat(6,1fr); padding:7px 8px max(7px, env(safe-area-inset-bottom)); z-index:60; background:rgba(5,14,25,.94); border-top:1px solid var(--line); backdrop-filter:blur(20px); }
  .mobile-nav button { border:0; background:transparent; color:#7186a2; padding:5px 2px; display:grid; justify-items:center; gap:3px; font-size:17px; }
  .mobile-nav button span { font-size:8px; }
  .mobile-nav button.active { color:#dbe9fb; }
}

/* ---------- Finance 2026 snapshot ---------- */
.header-actions { display:flex; align-items:center; gap:9px; }
.snapshot-pill { border-radius:999px; padding:9px 12px; font-size:11px; font-weight:900; color:#07111f; background:#ffd966; }
.nav-symbol { width:19px; text-align:center; font-size:18px; line-height:1; }
.finance-content { max-width:none; }
.finance-hero { min-height:190px; border:1px solid var(--line-strong); border-radius:26px; padding:30px 32px; background:linear-gradient(145deg,#10243d,#0a192b); display:flex; justify-content:space-between; align-items:center; gap:24px; overflow:hidden; position:relative; }
.finance-hero h2 { margin:10px 0 10px; font-size:34px; letter-spacing:-.045em; }
.finance-hero p { color:#91a6c1; max-width:720px; margin:0; line-height:1.6; }
.finance-hero b { color:#dbe7f7; }
.hero-currency { font-size:140px; line-height:.8; color:rgba(186,216,255,.08); font-weight:900; padding-right:18px; }
.finance-kicker { color:#8faed4; text-transform:uppercase; letter-spacing:.13em; font-size:10px; font-weight:900; }
.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:14px; }
.metric-card { text-align:left; border:1px solid var(--line); border-radius:18px; padding:18px; background:#0b192b; color:var(--text); min-height:132px; }
.metric-card span,.metric-card small,.metric-card strong { display:block; }
.metric-card span { color:#7e93b0; font-size:11px; font-weight:800; }
.metric-card strong { margin-top:14px; font-size:26px; letter-spacing:-.04em; }
.metric-card small { margin-top:7px; color:#607590; font-size:10px; }
.metric-card:hover { border-color:var(--line-strong); transform:translateY(-1px); }
.metric-income { box-shadow:inset 0 3px 0 #b6d7a8; }
.metric-expense { box-shadow:inset 0 3px 0 #f4cccc; }
.metric-cash { box-shadow:inset 0 3px 0 #93c47d; }
.metric-capital { box-shadow:inset 0 3px 0 #ffe599; }
.finance-menu-grid { margin-top:14px; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:11px; }
.finance-menu-grid button { border:1px solid var(--line); background:#0b192b; color:var(--text); border-radius:17px; padding:17px; text-align:left; min-height:140px; }
.finance-menu-grid i { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:#132944; color:#a8cfff; font-style:normal; font-size:18px; }
.finance-menu-grid b,.finance-menu-grid span { display:block; }
.finance-menu-grid b { margin-top:15px; font-size:13px; }
.finance-menu-grid span { margin-top:7px; font-size:10px; line-height:1.5; color:#6e83a1; }
.snapshot-foot { margin-top:16px; color:#526984; font-size:10px; text-align:right; }
.finance-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:12px; }
.finance-note { margin-top:5px; color:#7187a4; font-size:11px; }
.readonly-chip { white-space:nowrap; border:1px solid rgba(255,217,102,.25); color:#e8c866; background:rgba(255,217,102,.06); border-radius:999px; padding:7px 10px; font-size:9px; font-weight:850; letter-spacing:.03em; }
.sheet-scroll { width:100%; overflow:auto; border-radius:14px; border:1px solid rgba(255,255,255,.13); background:#fff; box-shadow:0 20px 60px rgba(0,0,0,.22); scrollbar-color:#75869a #e7e7e7; }
.sheet-table { border-collapse:separate; border-spacing:0; min-width:1860px; width:100%; background:#fff; color:#111; font-family:Arial,Helvetica,sans-serif; font-size:14px; }
.sheet-table th,.sheet-table td { height:36px; min-width:92px; padding:7px 9px; border-right:1px solid #333; border-bottom:1px solid #333; text-align:center; white-space:nowrap; vertical-align:middle; }
.sheet-table tr > *:first-child { min-width:250px; text-align:left; border-left:0; }
.sheet-table tr:first-child > * { border-top:0; }
.sheet-table tr > *:last-child { border-right:0; }
.sheet-table .first-col { position:sticky; left:0; z-index:4; box-shadow:2px 0 0 rgba(0,0,0,.13); }
.sheet-table .row-header th,.sheet-table .row-savings-header th { position:sticky; top:0; z-index:7; background:#e5e5e5; font-weight:800; text-align:center; }
.sheet-table .row-header th.first-col,.sheet-table .row-savings-header th.first-col { z-index:9; }
.sheet-table .row-header th.current-month,.sheet-table .row-savings-header th.current-month { background:#ffd966; color:#3f2805; }
.sheet-table .row-normal td { background:#fff; }
.sheet-table .row-normal td.first-col { background:#fff; }
.sheet-table .row-income-group td,.sheet-table .row-income-total td { background:#93c47d; font-weight:800; }
.sheet-table .row-income-group td.first-col,.sheet-table .row-income-total td.first-col { background:#93c47d; }
.sheet-table .row-expense-fixed td { background:#e06666; font-weight:800; }
.sheet-table .row-expense-fixed td.first-col { background:#e06666; }
.sheet-table .row-expense-everyday td { background:#b6d7a8; font-weight:800; }
.sheet-table .row-expense-everyday td.first-col { background:#b6d7a8; }
.sheet-table .row-expense-irregular td { background:#f9cb9c; font-weight:800; }
.sheet-table .row-expense-irregular td.first-col { background:#f9cb9c; }
.sheet-table .row-expense-lifestyle td { background:#d5a6bd; font-weight:800; }
.sheet-table .row-expense-lifestyle td.first-col { background:#d5a6bd; }
.sheet-table .row-expense-contrib td { background:#a4c2f4; font-weight:800; }
.sheet-table .row-expense-contrib td.first-col { background:#a4c2f4; }
.sheet-table .row-expense-fixed .summary-tail,.sheet-table .row-expense-everyday .summary-tail,.sheet-table .row-expense-irregular .summary-tail,.sheet-table .row-expense-lifestyle .summary-tail,.sheet-table .row-expense-contrib .summary-tail { background:#93c47d; }
.sheet-table .row-expense-total td { background:#93c47d; font-weight:900; }
.sheet-table .row-expense-total td.first-col { background:#93c47d; }
.sheet-table .row-note td { background:#fff; font-size:12px; font-style:italic; color:#444; border-bottom:0; }
.sheet-table .row-note td.first-col { background:#fff; }
.sheet-table .sheet-spacer td { height:15px; padding:0; border:0; background:#fff; }
.sheet-table .row-budget-row td { background:#fff; font-weight:700; }
.sheet-table .row-budget-row td:first-child { font-weight:800; }
.sheet-table .row-fin-income td { background:#b6d7a8; }
.sheet-table .row-fin-expense td { background:#f4cccc; }
.sheet-table .row-fin-positive td { background:#b6d7a8; font-weight:800; }
.sheet-table .row-fin-income td.first-col { background:#b6d7a8; }
.sheet-table .row-fin-expense td.first-col { background:#f4cccc; }
.sheet-table .row-fin-positive td.first-col { background:#b6d7a8; }
.sheet-table .row-distributed td { background:#b6d7a8; font-weight:800; }
.sheet-table .row-distributed td.first-col { background:#b6d7a8; }
.sheet-table .row-cash-left td { background:#6aa84f; font-weight:800; }
.sheet-table .row-cash-left td.first-col { background:#6aa84f; }
.sheet-table .row-savings-header th:first-child { background:#d9d9d9; }
.balance-scroll { max-width:1180px; }
.sheet-table.balance-table { min-width:980px; font-size:14px; }
.balance-table th,.balance-table td { min-width:130px; }
.balance-table tr > *:first-child { min-width:270px; }
.balance-table tr > *:nth-child(2) { min-width:280px; }
.balance-table .row-balance-title td { background:#d9d9d9; font-weight:900; text-align:center; font-size:16px; }
.balance-table .row-balance-title td:first-child { position:static; }
.balance-table .row-assets-total td { background:#b6d7a8; font-weight:900; font-size:16px; }
.balance-table .row-assets-total td.first-col { background:#b6d7a8; }
.balance-table .row-balance-header th { background:#ffe599; font-weight:900; position:sticky; top:0; z-index:7; }
.balance-table .row-balance-header th.first-col { z-index:9; }
.balance-table .row-balance-group td { background:#d9d9d9; font-weight:800; }
.balance-table .row-balance-group td:first-child { font-style:italic; }
.balance-table .row-balance-group td.first-col { background:#d9d9d9; }
.balance-table .balance-qty { font-family:Georgia,serif; font-style:italic; font-size:13px; }
.balance-table .row-liabilities-total td { background:#ea9999; font-weight:900; }
.balance-table .row-liabilities-total td.first-col { background:#ea9999; }
.balance-table .row-capital-total td { background:#ffe599; font-weight:900; font-size:16px; }
.balance-table .row-capital-total td.first-col { background:#ffe599; }
.balance-table .row-capital-total td:nth-child(5) { background:#d9ead3; }
.balance-table .row-capital-total td:nth-child(6) { background:#fff2cc; color:#f00; }
.balance-table .row-capital-total td:nth-child(7) { background:#f4cccc; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .finance-menu-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .header-actions .header-pill { display:none; }
  .snapshot-pill { padding:7px 9px; }
  .finance-hero { min-height:180px; padding:23px 20px; }
  .finance-hero h2 { font-size:28px; }
  .finance-hero p { font-size:12px; }
  .hero-currency { font-size:90px; position:absolute; right:3px; bottom:24px; }
  .metric-grid { grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
  .metric-card { min-height:112px; padding:14px; }
  .metric-card strong { font-size:20px; }
  .finance-menu-grid { grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
  .finance-menu-grid button { min-height:125px; padding:14px; }
  .finance-toolbar { align-items:flex-start; }
  .finance-note { max-width:240px; line-height:1.45; }
  .readonly-chip { font-size:8px; }
  .sheet-scroll { border-radius:10px; }
  .sheet-table { font-size:12px; min-width:1650px; }
  .sheet-table th,.sheet-table td { height:34px; padding:6px 7px; min-width:84px; }
  .sheet-table tr > *:first-child { min-width:220px; }
  .balance-table { min-width:900px; }
  .balance-table tr > *:first-child { min-width:235px; }
  .balance-table tr > *:nth-child(2) { min-width:250px; }
  .finance-mobile-nav { display:flex; overflow-x:auto; justify-content:flex-start; grid-template-columns:none; scrollbar-width:none; }
  .finance-mobile-nav::-webkit-scrollbar { display:none; }
  .finance-mobile-nav button { flex:0 0 70px; }
}

/* Balance-sheet cell-level color fidelity */
.balance-table .row-assets-total td { background:#fff; font-weight:900; font-size:16px; }
.balance-table .row-assets-total td:nth-child(1),
.balance-table .row-assets-total td:nth-child(3),
.balance-table .row-assets-total td:nth-child(5) { background:#b6d7a8; }
.balance-table .row-assets-total td.first-col { background:#b6d7a8; }
.balance-table .row-balance-group td { background:#fff; font-weight:800; }
.balance-table .row-balance-group td:nth-child(1),
.balance-table .row-balance-group td:nth-child(3),
.balance-table .row-balance-group td:nth-child(4),
.balance-table .row-balance-group td:nth-child(5),
.balance-table .row-balance-group td:nth-child(6) { background:#d9d9d9; }
.balance-table .row-balance-group td.first-col { background:#d9d9d9; }
.balance-table .row-liabilities-total td { background:#fff; font-weight:900; }
.balance-table .row-liabilities-total td:nth-child(1),
.balance-table .row-liabilities-total td:nth-child(3),
.balance-table .row-liabilities-total td:nth-child(4),
.balance-table .row-liabilities-total td:nth-child(5) { background:#ea9999; }
.balance-table .row-liabilities-total td.first-col { background:#ea9999; }
.balance-table .row-capital-total td { background:#fff; font-weight:900; font-size:16px; }
.balance-table .row-capital-total td:nth-child(1),
.balance-table .row-capital-total td:nth-child(3) { background:#ffe599; }
.balance-table .row-capital-total td:nth-child(5) { background:#d9ead3; }
.balance-table .row-capital-total td:nth-child(6) { background:#fff2cc; color:#f00; }
.balance-table .row-capital-total td:nth-child(7) { background:#f4cccc; }
.balance-table .row-capital-total td.first-col { background:#ffe599; }

/* v8 — Tesuro money-green palette. Shared app surface and auth accents. */
:root {
  --bg:#0d1814; --bg-deep:#09120f; --panel:rgba(20,36,29,.91);
  --panel-solid:#17271f; --line:rgba(146,194,164,.15);
  --line-strong:rgba(151,210,173,.26); --text:#eef6ef;
  --muted:#a2b6a8; --muted-2:#718b78;
  --accent:#9be6b1; --accent-2:#c7f0cf; --success:#84df9f;
  --warning:#e7cb83;
}
body {background: radial-gradient(circle at 12% 10%,rgba(34,106,72,.15),transparent 34rem),#0d1814;color:var(--text);}
.auth-card {background:linear-gradient(155deg,#152c20,#102017 68%,#14231d);border-color:#325340;}
.auth-card::before {background:rgba(111,213,140,.12);}
.currency-icon {background:linear-gradient(145deg,rgba(33,69,46,.83),rgba(13,27,20,.78));border-color:rgba(150,219,165,.17);color:#b8e8c4;}
.auth-button {background:linear-gradient(120deg,#b7efc4,#89dba5);box-shadow:0 12px 34px rgba(62,160,95,.14);color:#102017;}
.email-input {background:#0e2017;border-color:#315441;}
.email-input:focus {border-color:#8bdda5;box-shadow:0 0 0 4px rgba(125,216,152,.12);}
.kicker,.text-button {color:#a9e7bb;}
.brand-mark,.avatar {background:#94dfa9;color:#0d2315;box-shadow:none;}
.guard-screen {background:#0d1814;}
.app-layout {background:#101a16;}
.sidebar {background:#111e18;border-color:#2b4434;}
.nav-btn {color:#91ad99;}
.nav-btn:hover {background:#1d3526;color:#e5f6e9;}
.nav-btn.active {background:#20422c;color:#e4f6e8;box-shadow:inset 3px 0 #79d99a;}
.account-button,.profile-card,.account-drawer {background:#15251c;border-color:#34513d;color:#e8f3e9;}
.app-header {background:rgba(14,25,18,.96);border-color:#2a4432;}
.header-pill {background:#1a3121;border-color:#36503d;color:#bddbc4;}
.snapshot-pill {background:#a7e7b9;color:#14301e;}
.finance-hero,.welcome-panel {background:linear-gradient(120deg,#1b402b,#193126 56%,#162920);border-color:#3a6247;}
.finance-hero p,.welcome-panel p {color:#b0cdb7;}
.metric-card,.setup-card,.finance-menu-grid button,.empty-page {background:#18281e;border-color:#304b39;color:#eaf5ed;}
.metric-card:hover,.finance-menu-grid button:hover {border-color:#629f73;background:#1e3627;}
.metric-card strong {color:#d0efd6;}
.finance-menu-grid button i {background:#23472d;color:#bcf0c9;}
.account-overlay {background:rgba(3,12,6,.72);}
.mobile-nav {background:rgba(16,31,22,.97);border-color:#30513a;}
.mobile-nav button.active {color:#93e3ac;}
@media(max-width:700px){.app-header{background:#132219;}}
