:root {
  --ink: #332633;
  --ink-soft: #665561;
  --muted: #8f808a;
  --line: #e9e2e6;
  --canvas: #faf7f5;
  --paper: #ffffff;
  --forest: #62435a;
  --forest-light: #f2eaf0;
  --lime: #e8c9a0;
  --gold: #c79b65;
  --gold-light: #fbf3e8;
  --rose: #c3545c;
  --rose-light: #faecee;
  --green: #16865f;
  --red: #c3545c;
  --orange: #dc873b;
  --blue: #4b87ac;
  --shadow: 0 16px 48px rgba(74, 45, 66, .055);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
svg { display: block; }
:focus-visible { outline: 3px solid #d8ad7a; outline-offset: 2px; }
::selection { background: #f1ddc3; }

.loading-screen { height: 100vh; display: grid; align-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.loading-screen p { font-size: 13px; }
.brand-mark { width: 38px; height: 38px; display: flex; align-items: flex-end; gap: 3px; transform: rotate(-18deg); }
.brand-mark span { display: block; width: 9px; border-radius: 3px; background: var(--forest); }
.brand-mark span:nth-child(1) { height: 16px; }
.brand-mark span:nth-child(2) { height: 27px; }
.brand-mark span:nth-child(3) { height: 37px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: #142321; color: #e9f0ea; display: flex; flex-direction: column; padding: 29px 17px 24px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px; margin-bottom: 44px; text-decoration: none; }
.brand .brand-mark { width: 29px; height: 31px; gap: 2px; }
.brand .brand-mark span { width: 7px; background: #cfe6ac; }
.brand .brand-mark span:nth-child(1) { height: 13px; }
.brand .brand-mark span:nth-child(2) { height: 23px; }
.brand .brand-mark span:nth-child(3) { height: 31px; }
.brand-name { font-family: Georgia, serif; letter-spacing: -.055em; font-size: 30px; line-height: 1; color: #fff; }
.brand-name .dot { color: #cfe6ac; }
.nav-label { color: #728c81; font-size: 10px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; padding: 0 15px; margin-bottom: 12px; }
.nav { display: grid; gap: 5px; }
.nav button { border: 0; background: transparent; color: #9fb2a9; height: 45px; padding: 0 15px; border-radius: 10px; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 620; text-align: left; width: 100%; transition: .2s ease; }
.nav button:hover { color: white; background: #203530; }
.nav button.active { color: white; background: #29463d; }
.nav button.active svg { color: #d0e8ae; }
.nav svg, .sidebar-bottom svg { width: 18px; height: 18px; stroke-width: 1.8; flex: none; }
.sidebar-spacer { flex: 1; }
.sidebar-bottom { padding: 0 5px; }
.demo-note { display: flex; gap: 9px; align-items: flex-start; color: #9bb0a4; font-size: 11px; line-height: 1.45; background: #1e332d; padding: 14px; border-radius: 12px; margin-bottom: 19px; }
.demo-note svg { color: #d7e8b9; }
.sidebar-profile { border-top: 1px solid #2a3d36; padding: 20px 8px 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 33px; height: 33px; flex: none; background: #dceacb; border-radius: 10px; display: grid; place-items: center; color: var(--forest); font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.sidebar-profile strong { display: block; font-size: 11px; color: #f6faf7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 145px; }
.sidebar-profile small { color: #829d8d; font-size: 10px; }

.main-area { min-width: 0; }
.topbar { min-height: 75px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.58); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 43px; }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.breadcrumb { font-size: 12px; color: var(--muted); white-space: nowrap; }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.crumb-sep { color: #c5d0c7; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-date { color: var(--muted); font-size: 11px; white-space: nowrap; }
.topbar-divider { width: 1px; height: 23px; background: var(--line); }
.topbar-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #e5ece7; color: var(--forest); font-size: 11px; font-weight: 800; }
.content { width: min(100%, 1440px); margin: 0 auto; padding: 38px 43px 68px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 10px; font-weight: 800; color: #7e9a83; margin: 0 0 10px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 3.1vw, 44px); line-height: 1.08; letter-spacing: -.048em; font-weight: 400; margin-bottom: 9px; }
.subtitle { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.55; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn { border-radius: 10px; min-height: 39px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; font-size: 12px; font-weight: 720; white-space: nowrap; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 15px; height: 15px; stroke-width: 2; }
.btn-primary { color: white; background: var(--forest); box-shadow: 0 7px 18px rgba(22,79,67,.15); }
.btn-primary:hover { background: #0f4137; }
.btn-secondary { color: var(--ink); background: white; border-color: var(--line); }
.btn-secondary:hover { border-color: #b7c6ba; }
.btn-danger { color: white; background: #a95349; }
.btn-ghost { color: var(--ink-soft); background: transparent; }
.btn-sm { min-height: 33px; padding: 0 11px; font-size: 11px; }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select { appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; height: 39px; padding: 0 32px 0 13px; font-size: 12px; font-weight: 700; color: var(--ink); outline: none; }
.select-wrap svg { pointer-events: none; position: absolute; right: 11px; width: 12px; height: 12px; color: var(--muted); }

.hero { min-height: 273px; border-radius: 19px; background: radial-gradient(circle at 85% 14%, #315247 0, transparent 35%), linear-gradient(112deg, #152721, #1e3b31); color: white; padding: 34px 40px; display: grid; grid-template-columns: minmax(0,1fr) 47%; gap: 28px; overflow: hidden; box-shadow: 0 24px 45px rgba(25,56,43,.12); }
.hero .eyebrow { color: #c8dfa8; margin-bottom: 18px; }
.hero h2 { font-family: Georgia, serif; font-size: clamp(31px,3.1vw,44px); font-weight: 400; letter-spacing: -.045em; line-height: 1.08; margin-bottom: 7px; }
.hero-value { font-size: clamp(28px,3vw,42px); font-weight: 700; letter-spacing: -.055em; margin-bottom: 7px; font-variant-numeric: tabular-nums; }
.hero-detail { color: #a9c0ae; font-size: 12px; margin-bottom: 25px; }
.hero-link { border: 0; background: transparent; color: #e0efcf; font-weight: 700; font-size: 11px; padding: 0; display: inline-flex; align-items: center; gap: 7px; }
.hero-link svg { width: 14px; }
.hero-art { position: relative; min-height: 200px; display: flex; align-items: flex-end; justify-content: center; }
.hero-art::before, .hero-art::after { content: ""; position: absolute; border: 1px solid rgba(222,240,202,.1); border-radius: 50%; width: 340px; height: 340px; left: 15%; top: -170px; }
.hero-art::after { width: 500px; height: 500px; top: -247px; left: -5%; }
.hero-art svg { width: 100%; height: 170px; overflow: visible; position: relative; z-index: 1; }
.hero-pill { position: absolute; z-index: 2; right: 0; top: 16px; border-radius: 8px; padding: 9px 13px; background: rgba(241,249,234,.12); border: 1px solid rgba(227,243,210,.13); backdrop-filter: blur(9px); font-size: 11px; color: #e7f4db; }
.hero-pill svg { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; margin-right: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-top: 18px; }
.stat-card { min-height: 140px; background: var(--paper); border: 1px solid #edf0eb; box-shadow: var(--shadow); border-radius: 15px; padding: 22px 22px 19px; position: relative; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 22px; }
.stat-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; }
.stat-icon svg { width: 15px; height: 15px; stroke-width: 2; }
.stat-icon.green { color: #2b7b5d; background: #e7f4e9; }
.stat-icon.gold { color: #a4763e; background: #fbf2e4; }
.stat-icon.blue { color: #50738d; background: #e9f1f6; }
.stat-icon.rose { color: #ad6a5d; background: #faeeeb; }
.stat-value { color: var(--ink); font-size: clamp(19px,1.8vw,25px); font-weight: 750; letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-foot { color: #9aaba0; font-size: 10px; margin-top: 6px; }
.section-grid { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(285px,1fr); gap: 17px; margin-top: 18px; }
.panel { background: white; border: 1px solid #ebefea; border-radius: 16px; box-shadow: var(--shadow); min-width: 0; }
.panel-pad { padding: 23px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.panel-title { font-size: 14px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 4px; }
.panel-subtitle { color: var(--muted); font-size: 11px; margin: 0; }
.chart { height: 203px; width: 100%; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-empty { min-height: 203px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 11px; }
.chart-labels { display: flex; justify-content: space-between; color: #9faea4; font-size: 10px; font-weight: 700; margin: 0 0 0 2px; }
.chart-legend { display: flex; gap: 16px; color: #798b80; font-size: 10px; font-weight: 650; margin-top: 16px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); }
.legend-dot.gold { background: var(--gold); }
.breakdown { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 16px; min-height: 195px; }
.donut { width: 108px; height: 108px; position: relative; display: grid; place-items: center; }
.donut svg { width: 108px; height: 108px; transform: rotate(-90deg); }
.donut-hole { width: 72px; height: 72px; border-radius: 50%; background: white; display: grid; align-content: center; text-align: center; position: absolute; }
.donut-hole b { font-size: 14px; letter-spacing: -.04em; }
.donut-hole span { color: var(--muted); font-size: 9px; }
.breakdown-list { display: grid; gap: 15px; }
.breakdown-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10px; color: var(--ink-soft); }
.breakdown-row b { color: var(--ink); font-size: 11px; }
.breakdown-label { display: flex; align-items: center; gap: 8px; }
.breakdown-label i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.breakdown-label i.costs { background: #658c72; }
.breakdown-label i.expenses { background: #c3a16f; }
.breakdown-label i.investments { background: #a9b8b7; }
.recent-panel { margin-top: 18px; }
.recent-list { display: grid; }
.recent-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid #eef1ed; }
.recent-row:last-child { border: 0; padding-bottom: 0; }
.entry-glyph { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.entry-glyph svg { width: 15px; height: 15px; }
.entry-glyph.income { color: #2c7d5e; background: #e7f4e9; }
.entry-glyph.expense { color: #bb7d64; background: #f9eeea; }
.recent-row strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.recent-amount { font-size: 11px; font-weight: 760; white-space: nowrap; }
.recent-amount.income { color: #2a8062; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { margin-left: auto; }
.segmented { display: inline-flex; gap: 3px; background: #eaf0e9; border-radius: 10px; padding: 3px; }
.segmented button { border: 0; background: transparent; color: #7e9084; border-radius: 8px; min-height: 32px; padding: 0 14px; font-size: 11px; font-weight: 750; }
.segmented button.active { background: white; color: var(--forest); box-shadow: 0 2px 8px rgba(23,36,33,.07); }
.search { position: relative; }
.search svg { position: absolute; width: 15px; height: 15px; top: 10px; left: 13px; color: #9fac9f; }
.search input { width: 230px; height: 37px; border: 1px solid var(--line); background: white; border-radius: 9px; padding: 0 12px 0 36px; font-size: 11px; color: var(--ink); outline: none; }
.search input:focus { border-color: #8db598; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.entries-table { min-width: 820px; }
th { background: #f9fbf8; color: #84958a; text-align: left; text-transform: uppercase; letter-spacing: .09em; font-size: 9px; font-weight: 800; padding: 15px 17px; white-space: nowrap; }
td { border-top: 1px solid #edf0eb; padding: 14px 17px; font-size: 11px; color: #465950; vertical-align: middle; }
tbody tr:hover { background: #fbfcfa; }
.td-main { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.td-main strong { color: var(--ink); font-size: 11px; display: block; max-width: 230px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.td-main small { color: var(--muted); display: block; font-size: 10px; margin-top: 4px; }
.td-money { color: var(--ink); font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.td-money.income { color: #2a8062; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 720; padding: 5px 8px; border-radius: 20px; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.paid { color: #28765c; background: #eaf5eb; }
.status.partial { color: #a27737; background: #faf2df; }
.status.pending { color: #9b6c60; background: #faeeeb; }
.table-actions { display: flex; gap: 3px; justify-content: flex-end; }
.icon-btn { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #94a399; display: grid; place-items: center; }
.icon-btn:hover { color: var(--forest); background: #edf5ed; }
.icon-btn.danger:hover { color: #a95349; background: #fbefed; }
.icon-btn svg { width: 15px; height: 15px; }
.table-footer { display: flex; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-icon { width: 42px; height: 42px; margin: 0 auto 13px; border-radius: 12px; background: var(--forest-light); color: var(--forest); display: grid; place-items: center; }
.empty-icon svg { width: 21px; height: 21px; }
.empty strong { display: block; color: var(--ink); font-size: 13px; margin-bottom: 5px; }
.empty p { font-size: 11px; margin: 0; }

.annual-wrap { overflow-x: auto; }
.annual-table { min-width: 1810px; table-layout: fixed; }
.annual-table th:first-child, .annual-table td:first-child { width: 215px; text-align: left; position: sticky; left: 0; z-index: 2; background: white; }
.annual-table th:first-child { background: #f9fbf8; }
.annual-table td, .annual-table th { text-align: right; padding: 13px 12px; font-variant-numeric: tabular-nums; font-size: 10px; white-space: nowrap; }
.annual-table .row-section td { background: #f5f8f4; color: var(--forest); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding-top: 16px; padding-bottom: 11px; }
.annual-table .row-section td:first-child { background: #f5f8f4; }
.annual-table .row-total td { color: var(--ink); background: #f9fbf8; font-weight: 800; }
.annual-table .row-total td:first-child { background: #f9fbf8; }
.annual-table th:last-child, .annual-table td:last-child { background: #f2f7f0; font-weight: 800; color: var(--forest); }
.annual-table .row-section td:last-child { background: #f5f8f4; }
.annual-note { padding: 19px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.55; }

.profile-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(250px,.8fr); gap: 20px; align-items: start; }
.form-panel { padding: 26px; }
.form-panel h2 { font-size: 15px; margin-bottom: 5px; }
.form-panel p { color: var(--muted); font-size: 11px; line-height: 1.5; margin-bottom: 25px; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 10px; font-weight: 800; color: #566a5d; }
.field input, .field select, .field textarea { width: 100%; min-height: 39px; border: 1px solid #dce5dc; outline: none; border-radius: 9px; background: #fff; color: var(--ink); padding: 9px 11px; font-size: 12px; }
.field textarea { resize: vertical; min-height: 73px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7bac88; box-shadow: 0 0 0 3px #edf6eb; }
.field input::placeholder, .field textarea::placeholder { color: #acb8ad; }
.field-hint { color: #9aaa9f; font-size: 10px; line-height: 1.4; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.aside-card { border-radius: 16px; background: #e8f0e5; padding: 27px; color: var(--forest); }
.aside-card svg { width: 25px; height: 25px; margin-bottom: 35px; }
.aside-card h3 { font-family: Georgia, serif; font-size: 23px; letter-spacing: -.04em; line-height: 1.15; font-weight: 400; margin-bottom: 11px; }
.aside-card p { font-size: 11px; line-height: 1.65; color: #63806d; margin: 0; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(11,29,22,.52); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 20px; backdrop-filter: blur(3px); }
.modal { background: white; border-radius: 17px; width: min(100%, 615px); max-height: min(95vh,900px); overflow: auto; box-shadow: 0 30px 100px rgba(8,30,19,.25); }
.modal-head { padding: 24px 27px 20px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 15px; }
.modal-head .eyebrow { margin-bottom: 7px; }
.modal-head h2 { font-family: Georgia,serif; font-size: 26px; letter-spacing: -.045em; font-weight: 400; margin: 0; }
.modal-close { border: 0; background: #f3f6f2; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-soft); }
.modal-close svg { width: 15px; height: 15px; }
.modal-body { padding: 23px 27px 27px; }
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 21px; }
.type-switch button { height: 42px; background: #f8faf7; color: #86988b; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 800; display: flex; justify-content: center; align-items: center; gap: 8px; }
.type-switch button.active { color: var(--forest); background: #edf6ed; border-color: #a9cdb0; }
.type-switch button.expense.active { color: #a16658; background: #fbf1ec; border-color: #ebc9bf; }
.type-switch svg { width: 16px; height: 16px; }
.form-error { background: #fbefec; color: #a55047; padding: 10px 12px; border-radius: 8px; font-size: 11px; margin-bottom: 15px; display: none; }
.form-error.show { display: block; }
.quick-settle { border: 0; background: none; padding: 0; color: var(--forest); font-size: 10px; font-weight: 760; justify-self: start; }
.check-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 9px; min-height: 42px; padding: 0 11px; gap: 12px; }
.check-row label { color: var(--ink-soft); font-size: 11px; font-weight: 680; }
.check-row select { border: 0; min-height: 35px; width: 70px; font-size: 11px; background: transparent; color: var(--ink); outline: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.confirm-modal { max-width: 390px; }
.confirm-modal .modal-body p { color: var(--ink-soft); line-height: 1.55; font-size: 12px; }
.toast { position: fixed; right: 23px; bottom: 23px; z-index: 110; padding: 12px 16px; border-radius: 9px; background: #172e25; color: white; font-size: 12px; font-weight: 650; box-shadow: 0 15px 40px rgba(13,44,29,.2); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #a55147; }
.mobile-menu { display: none; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 214px minmax(0,1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .content { padding-left: 28px; padding-right: 28px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .stat-card { padding: 18px; }
  .stat-value { font-size: 19px; }
  .breakdown { grid-template-columns: 1fr; justify-items: center; gap: 3px; }
  .breakdown-list { width: 100%; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; width: 252px; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 18px 0 50px rgba(0,0,0,.13); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: grid; border: 0; color: var(--ink); background: transparent; padding: 0; }
  .mobile-menu svg { width: 21px; height: 21px; }
  .topbar { padding: 0 25px; }
  .content { padding: 32px 25px 55px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .topbar { min-height: 64px; padding: 0 18px; }
  .topbar-date, .topbar-divider { display: none; }
  .content { padding: 27px 16px 48px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 16px; }
  .page-head .head-actions { width: 100%; }
  .hero { grid-template-columns: 1fr; padding: 27px; min-height: auto; }
  .hero-art { display: none; }
  .hero-detail { margin-bottom: 24px; }
  .stat-grid { gap: 9px; }
  .stat-card { min-height: 118px; padding: 16px; }
  .stat-top { margin-bottom: 14px; align-items: flex-start; }
  .stat-value { font-size: 16px; }
  .stat-foot { font-size: 9px; }
  .section-grid { grid-template-columns: 1fr; }
  .breakdown { grid-template-columns: 105px 1fr; }
  .toolbar .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .profile-grid { grid-template-columns: 1fr; }
  .field-grid { gap: 13px; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 17px 17px 0 0; max-height: 94vh; }
  .modal-body { padding: 20px; }
  .modal-head { padding: 20px; }
}
@media (max-width: 420px) {
  .field-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 15px; }
  .breakdown { grid-template-columns: 1fr; }
}

/* Nobre identity and sign-in */
.loading-logo { width: 190px; height: auto; }
.sidebar { background: linear-gradient(166deg, #63435b 0%, #422b3e 72%, #342237 100%); color: #fffaf6; }
.brand { background: #fffaf5; border: 1px solid rgba(255,255,255,.65); border-radius: 13px; padding: 11px 14px; margin: 0 4px 39px; box-shadow: 0 12px 26px rgba(27,14,28,.1); }
.brand-logo { display: block; width: 100%; max-width: 168px; height: auto; object-fit: contain; }
.nav-label { color: #d8bcbf; }
.nav button { color: #decbd7; }
.nav button:hover { background: rgba(255,255,255,.11); }
.nav button.active { background: rgba(255,255,255,.17); box-shadow: inset 3px 0 0 #dfb67d; }
.nav button.active svg { color: #eac694; }
.demo-note { color: #e6d4df; background: rgba(255,255,255,.085); }
.demo-note svg { color: #eac694; }
.sidebar-profile { border-color: rgba(255,255,255,.17); }
.sidebar-profile small { color: #d1bacb; }
.avatar { background: #ead4bd; color: #5a3650; }
.sidebar-logout { margin: 16px 0 0; padding: 10px 9px; display: flex; align-items: center; gap: 10px; width: 100%; color: #ecdde6; background: transparent; border: 0; border-radius: 9px; font-size: 11px; font-weight: 700; text-align: left; }
.sidebar-logout:hover { background: rgba(255,255,255,.1); color: white; }
.sidebar-logout svg { width: 17px; height: 17px; }
.topbar { background: rgba(255,255,255,.76); }
.topbar-avatar { background: #f0e5ed; }
.eyebrow { color: #a47883; }
.btn-primary { box-shadow: 0 7px 18px rgba(98,67,90,.18); }
.btn-primary:hover { background: #4b3146; }
.btn-secondary:hover { border-color: #c9a7bd; }
.hero { background: radial-gradient(circle at 87% 18%, rgba(212,156,166,.28), transparent 38%), linear-gradient(115deg, #55374f, #76546a); box-shadow: 0 24px 45px rgba(78,47,71,.15); }
.hero .eyebrow { color: #efd3a9; }
.hero-detail { color: #e6d5e0; }
.hero-link { color: #f4d6a8; }
.hero-art::before, .hero-art::after { border-color: rgba(250,218,180,.16); }
.hero-pill { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.19); color: #fff7ea; }
.stat-card { border-color: #f0e9ec; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--tone, var(--gold)); }
.stat-card:has(.stat-icon.green) { --tone: var(--green); }
.stat-card:has(.stat-icon.red) { --tone: var(--red); }
.stat-card:has(.stat-icon.orange) { --tone: var(--orange); }
.stat-card:has(.stat-icon.blue) { --tone: var(--blue); }
.stat-icon.green { color: var(--green); background: #e4f4ec; }
.stat-icon.red { color: var(--red); background: #fae9ec; }
.stat-icon.orange { color: var(--orange); background: #fff0df; }
.stat-icon.blue { color: var(--blue); background: #e8f2f8; }
.stat-foot { color: #988992; }
.panel { border-color: #f0e9ec; }
.legend-dot { background: var(--green); }
.legend-dot.gold { background: var(--red); }
.breakdown-label i.costs { background: var(--red); }
.breakdown-label i.expenses { background: var(--orange); }
.breakdown-label i.investments { background: var(--blue); }
.entry-glyph.income { color: var(--green); background: #e4f4ec; }
.entry-glyph.expense { color: var(--red); background: #fae9ec; }
.recent-amount.income, .td-money.income { color: var(--green); }
.segmented { background: #f1e9ef; }
.segmented button { color: #8c7885; }
.search input:focus { border-color: #c8a1b7; }
th, .annual-table th:first-child { background: #fbf8fa; color: #8b7885; }
td { color: #655360; border-color: #f0e9ed; }
tbody tr:hover { background: #fdf9fb; }
.status.paid { color: var(--green); background: #e4f4ec; }
.status.partial, .status.pending { color: #a96b2c; background: #fff0df; }
.annual-table .row-section td, .annual-table .row-section td:first-child, .annual-table .row-section td:last-child { background: #f7eff4; }
.annual-table .row-total td, .annual-table .row-total td:first-child { background: #fbf8fa; }
.annual-table th:last-child, .annual-table td:last-child { background: #f6eff3; }
.field label { color: #655060; }
.field input, .field select, .field textarea { border-color: #e7dce3; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #ba8da8; box-shadow: 0 0 0 3px #f6edf3; }
.aside-card { background: #f3e8ef; }
.aside-card p { color: #866b7b; }
.modal-backdrop { background: rgba(39,25,38,.56); }
.type-switch button.active { background: #e4f4ec; border-color: #b2dac3; color: var(--green); }
.type-switch button.expense.active { background: #fae9ec; border-color: #eac2c8; color: var(--red); }
.toast { background: #493247; }

.login-screen { min-height: 100svh; display: grid; grid-template-columns: minmax(390px, 1fr) minmax(0, 2fr); background: #fdfaf7; }
.login-panel { position: relative; z-index: 5; padding: clamp(26px,3.3vw,54px) clamp(29px,3.7vw,60px) 31px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100svh; box-shadow: 14px 0 45px rgba(54,31,51,.09); }
.login-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.login-top .brand-logo { max-width: 176px; }
.login-top-label { color: #ae8b9c; font-size: 9px; letter-spacing: .2em; font-weight: 800; white-space: nowrap; }
.login-center { width: 100%; max-width: 400px; margin: 54px auto 50px; }
.login-kicker { display: inline-flex; align-items: center; gap: 10px; color: #a97982; font-size: 10px; letter-spacing: .19em; font-weight: 850; }
.login-kicker span { width: 18px; height: 2px; background: #c69b6a; }
.login-center h1 { color: #50384b; font-size: clamp(39px,3.5vw,55px); line-height: 1.05; letter-spacing: -.055em; margin: 21px 0 18px; }
.login-center h1 em { font-style: normal; color: #c39868; }
.login-center > p { color: #806e78; font-size: 13px; line-height: 1.7; max-width: 330px; margin-bottom: 35px; }
.login-form { display: grid; gap: 18px; }
.login-field { display: grid; gap: 8px; }
.login-field label { color: #5e4858; font-size: 11px; font-weight: 800; }
.login-field > input, .login-password { height: 49px; width: 100%; background: white; border: 1px solid #e3d9de; border-radius: 9px; box-shadow: 0 5px 19px rgba(61,36,53,.025); }
.login-field > input, .login-password input { outline: none; padding: 0 15px; color: #493748; font-size: 13px; }
.login-field > input:focus, .login-password:focus-within { border-color: #bd9bae; box-shadow: 0 0 0 3px #f3eaf0; }
.login-password { display: flex; align-items: center; }
.login-password input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; }
.login-password button { display: grid; place-items: center; width: 48px; height: 48px; color: #9e8c98; background: transparent; border: 0; }
.login-password button svg { width: 18px; height: 18px; }
.login-field input::placeholder { color: #b0a0aa; }
.login-error { border-radius: 8px; background: #fae9ec; color: #9e394d; font-size: 11px; padding: 11px 12px; }
.login-error[hidden] { display: none; }
.login-submit { height: 50px; margin-top: 7px; padding: 0 19px; border: 0; border-radius: 9px; background: #604158; color: white; box-shadow: 0 13px 24px rgba(90,58,81,.22); display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; letter-spacing: .015em; }
.login-submit:hover { background: #4d3147; transform: translateY(-1px); }
.login-submit svg { width: 17px; height: 17px; }
.login-footer { display: flex; align-items: center; gap: 8px; color: #a28c9a; font-size: 10px; white-space: nowrap; }
.login-footer-mark { width: 6px; height: 6px; border-radius: 50%; background: #c59a66; }
.login-visual { position: relative; min-height: 100svh; overflow: hidden; background: radial-gradient(circle at 75% 35%, rgba(213,176,178,.47), transparent 38%), radial-gradient(circle at 10% 110%, #52394f, transparent 62%), linear-gradient(138deg, #765568, #986f80 53%, #5f415b); isolation: isolate; }
.login-visual::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(61,36,61,.21), transparent 55%), radial-gradient(circle at 72% 62%, transparent 25%, rgba(55,34,56,.18) 90%); }
.login-visual-grid { position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(255,231,220,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,231,220,.4) 1px, transparent 1px); background-size: 54px 54px; mask-image: linear-gradient(90deg, black, transparent 80%); }
.login-orbit { position: absolute; border: 1px solid rgba(255,229,214,.22); border-radius: 50%; pointer-events: none; }
.login-orbit-one { width: 670px; height: 670px; right: -135px; top: -210px; }
.login-orbit-two { width: 920px; height: 920px; right: -265px; top: -310px; }
.login-visual-copy { position: absolute; z-index: 3; top: clamp(90px,17vh,180px); left: clamp(43px,7vw,120px); max-width: 48%; color: white; text-shadow: 0 3px 26px rgba(55,34,56,.15); }
.visual-overline { color: #f0d7bb; font-size: 10px; font-weight: 800; letter-spacing: .24em; }
.login-visual-copy h2 { font-family: Georgia,serif; font-size: clamp(44px,5.3vw,86px); line-height: .99; font-weight: 400; letter-spacing: -.06em; margin: 31px 0 22px; }
.login-visual-copy h2 i { color: #f1d1a4; font-style: normal; }
.login-visual-copy p { max-width: 275px; color: #f1e3e9; font-size: 13px; line-height: 1.7; }
.login-photo-frame { position: absolute; z-index: 2; bottom: -5%; right: 5%; width: min(47%, 620px); height: 89%; overflow: hidden; border-radius: 300px 300px 0 0; background: #f5f0ee; border: 1px solid rgba(255,255,255,.52); box-shadow: 0 27px 65px rgba(49,30,48,.27), 0 0 0 13px rgba(255,255,255,.07); }
.login-photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.visual-glass-card { position: absolute; z-index: 4; left: clamp(42px,7vw,118px); bottom: 17%; min-width: 320px; max-width: 365px; padding: 17px 18px; display: flex; align-items: center; gap: 13px; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; background: rgba(75,47,69,.65); color: white; box-shadow: 0 18px 35px rgba(36,21,38,.19); backdrop-filter: blur(17px); }
.glass-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; color: #f3d2a6; background: rgba(255,255,255,.13); flex: none; }
.glass-icon svg { width: 19px; height: 19px; }
.visual-glass-card small { display: block; color: #eccbac; font-size: 8px; letter-spacing: .17em; font-weight: 800; margin-bottom: 5px; }
.visual-glass-card strong { display: block; font-size: 12px; white-space: nowrap; }
.glass-spark { margin-left: auto; color: #e9c69d; font-size: 18px; }
.visual-corner { position: absolute; z-index: 3; left: clamp(43px,7vw,120px); bottom: 42px; color: #ead4de; letter-spacing: .18em; font-size: 9px; font-weight: 750; }
.visual-corner span { color: #e6b981; margin: 0 10px; }

@media (max-width: 1150px) {
  .login-screen { grid-template-columns: minmax(365px, 40%) minmax(0, 1fr); }
  .login-visual-copy { left: 6%; max-width: 53%; }
  .login-visual-copy h2 { font-size: clamp(40px,5vw,65px); }
  .visual-glass-card { left: 6%; min-width: 280px; }
  .login-photo-frame { right: -9%; width: 54%; }
}
@media (max-width: 790px) {
  .login-screen { display: flex; flex-direction: column; }
  .login-panel { min-height: 660px; padding: 29px clamp(25px,7vw,55px) 25px; }
  .login-center { margin: 48px auto; }
  .login-visual { min-height: 380px; }
  .login-visual-copy { top: 58px; left: 7%; max-width: 52%; }
  .login-visual-copy h2 { font-size: clamp(39px,7vw,59px); margin: 16px 0; }
  .login-visual-copy p { display: none; }
  .login-photo-frame { right: 7%; width: 38%; height: 100%; bottom: -25%; }
  .visual-glass-card { left: 7%; bottom: 65px; }
  .visual-corner { left: 7%; bottom: 25px; }
}
@media (max-width: 480px) {
  .login-panel { min-height: 630px; }
  .login-top-label { display: none; }
  .login-center h1 { font-size: 43px; }
  .login-footer { font-size: 9px; flex-wrap: wrap; }
  .login-visual { min-height: 330px; }
  .login-photo-frame { right: -5%; width: 48%; }
  .login-visual-copy { top: 38px; max-width: 58%; }
  .login-visual-copy h2 { font-size: 39px; }
  .visual-overline { font-size: 8px; }
  .visual-glass-card { bottom: 47px; min-width: 0; width: 57%; padding: 10px; gap: 8px; }
  .visual-glass-card strong { font-size: 9px; white-space: normal; }
  .visual-glass-card small { font-size: 7px; }
  .glass-icon { width: 30px; height: 30px; }
  .glass-spark { display: none; }
  .visual-corner { font-size: 7px; bottom: 17px; }
}
