:root {
    color-scheme: light;
    --background: #f5f5f7;
    --surface: #fff;
    --qr-background: #fff;
    --surface-muted: #f9f9fb;
    --surface-hover: #e9e9ed;
    --surface-selected: #e8eff9;
    --surface-control: #fff;
    --foreground: #1d1d1f;
    --muted: #606068;
    --subtle: #6b6b73;
    --navigation-text: #5f6067;
    --breadcrumb-text: #4b4b51;
    --avatar-text: #5a5b64;
    --border: #e7e7eb;
    --border-control: #858590;
    --border-input: #858590;
    --primary: #0066cc;
    --primary-soft: #e7f0fb;
    --primary-action: #0066cc;
    --primary-action-hover: #0056ad;
    --green: #26734d;
    --green-soft: #eaf5ee;
    --orange: #9c5018;
    --orange-soft: #fcf0e3;
    --purple: #7455ad;
    --purple-soft: #f0eafa;
    --pink: #b35076;
    --pink-soft: #f9eaf0;
    --gray: #8b93a2;
    --gray-soft: #eef0f3;
    --track: #f0f0f3;
    --row-hover: #fafafc;
    --insight-surface: #eef3fb;
    --insight-border: #e0e8f6;
    --insight-icon-surface: #e0eafa;
    --insight-text: #5c6c86;
    --placeholder: #62626c;
    --error: #9d3548;
    --error-soft: #fbecef;
    --chart-income: #267ddd;
    --chart-expense: #7d899b;
    --chart-grid: #ededf1;
    --chart-label: #6b6b73;
    --chart-area-start: #e2edfc;
    --chart-area-end: #ffffff;
    --chart-green: #428362;
    --chart-purple: #8a6bbb;
    --chart-orange: #c88643;
    --overlay: #16162240;
    --backdrop: #17172250;
    --dialog-shadow: #00000024;
    --radius: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--foreground);
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --background: #17191d;
    --surface: #202328;
    --surface-muted: #25282e;
    --surface-hover: #30343b;
    --surface-selected: #25374b;
    --surface-control: #202328;
    --foreground: #eceef1;
    --muted: #b9bec7;
    --subtle: #a6adb8;
    --navigation-text: #c1c6cf;
    --breadcrumb-text: #d2d6dd;
    --avatar-text: #d3d7de;
    --border: #383d45;
    --border-control: #7b8490;
    --border-input: #7b8490;
    --primary: #8bbcff;
    --primary-soft: #26384c;
    --primary-action: #0758a6;
    --primary-action-hover: #0a67c0;
    --green: #83d3a4;
    --green-soft: #203a2b;
    --orange: #f0b66f;
    --orange-soft: #40301f;
    --purple: #c0a4f2;
    --purple-soft: #352a48;
    --pink: #f0a3bf;
    --pink-soft: #402832;
    --gray: #aab2bf;
    --gray-soft: #30343b;
    --track: #343840;
    --row-hover: #292d33;
    --insight-surface: #222d3b;
    --insight-border: #35465b;
    --insight-icon-surface: #2b3c51;
    --insight-text: #c0cbd9;
    --placeholder: #aeb5bf;
    --error: #ffb1ba;
    --error-soft: #422b31;
    --chart-income: #82baff;
    --chart-expense: #b0bdcc;
    --chart-grid: #3c4149;
    --chart-label: #b7bec8;
    --chart-area-start: #2b425c;
    --chart-area-end: #202328;
    --chart-green: #83d3a4;
    --chart-purple: #c0a4f2;
    --chart-orange: #f0b66f;
    --overlay: #090b0ec9;
    --backdrop: #090b0ec9;
    --dialog-shadow: #00000070;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); font-size: 14px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button { color: inherit; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
button, a, select, input { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--primary); }
button, a { touch-action: manipulation; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.035em; }
h1 { font-size: 34px; font-weight: 650; }
h2 { font-size: 17px; font-weight: 630; letter-spacing: -.025em; }
h3 { font-size: 16px; font-weight: 600; }
strong { font-weight: 600; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 50; left: 16px; top: -80px; padding: 12px 20px; background: var(--primary-action); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 9px; color: var(--muted); flex-shrink: 0; transition: background 160ms; }
.icon-button:hover { background: var(--surface-hover); color: var(--foreground); }
.theme-control { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.theme-control select { min-height: 44px; min-width: 94px; border: 1px solid var(--border-control); border-radius: 9px; padding: 0 9px; background: var(--surface-control); color: var(--foreground); font-size: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; font-size: 24px; letter-spacing: -.055em; font-weight: 650; }
.brand-mark { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 29px; height: 31px; }
.brand-mark i { display: block; height: 4px; background: var(--primary); border-radius: 4px; }
.brand-mark i:nth-child(1) { width: 27px; }
.brand-mark i:nth-child(2) { width: 21px; }
.brand-mark i:nth-child(3) { width: 15px; }
.eyebrow { font-size: 10px; letter-spacing: .12em; font-weight: 650; color: var(--muted); }
.app-shell { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 222px; padding: 30px 16px 0; border-right: 1px solid var(--border); background: var(--surface-muted); z-index: 30; }
.sidebar > .brand { margin: 0 12px 50px; }
.workspace-label { font-size: 10px; font-weight: 600; letter-spacing: .12em; color: var(--subtle); margin: 0 14px 14px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 8px; color: var(--navigation-text); font-size: 13px; margin: 5px 0; transition: background 160ms; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item:hover { background: var(--surface-hover); }
.nav-item.active { color: var(--primary); background: var(--surface-selected); font-weight: 600; }
.active-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); margin-left: auto; }
.sidebar-bottom { margin-top: auto; }
.readonly-note { display: flex; align-items: center; gap: 10px; margin: 32px 12px 24px; color: var(--subtle); }
.readonly-note .icon { width: 16px; height: 16px; }
.readonly-note strong { font-size: 11px; color: var(--muted); display: block; }
.readonly-note span { font-size: 10px; display: block; margin-top: 3px; }
.profile-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 18px 0; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-hover); color: var(--avatar-text); font-weight: 600; }
.profile-row strong { display: block; font-size: 12px; }
.profile-row small { color: var(--subtle); font-size: 10px; }
.profile-row form { margin-left: auto; }
.app-content { grid-column: 2; min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 40px; border-bottom: 1px solid var(--border); }
.breadcrumb { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--subtle); }
.breadcrumb .icon { width: 12px; height: 12px; }
.breadcrumb strong { color: var(--breadcrumb-text); font-size: 12px; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.demo-badge > span { width: 5px; height: 5px; border-radius: 50%; background: #92929b; }
.main-content { max-width: 1460px; padding: 36px 40px 0; margin: 0 auto; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.page-header .eyebrow { margin-bottom: 8px; }
.page-subtitle { color: var(--muted); font-size: 13px; margin-top: 10px; }
.period-form select { min-height: 44px; padding: 0 36px 0 16px; border: 1px solid var(--border-control); border-radius: 9px; background: var(--surface-control); color: var(--foreground); font-size: 12px; }
.context-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 26px 0 25px; }
.segmented-control { display: inline-flex; align-items: center; background: var(--surface-hover); padding: 3px; border-radius: 9px; }
.segmented-control a { min-width: 88px; min-height: 38px; display: grid; place-items: center; padding: 8px 14px; font-size: 12px; color: var(--muted); border-radius: 7px; }
.segmented-control a.selected { color: var(--foreground); background: var(--surface); box-shadow: 0 1px 3px #0000000d; font-weight: 600; }
.data-note { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--subtle); font-size: 12px; }
.data-note .icon { width: 12px; height: 12px; color: var(--green); }
.data-note .stale { color: var(--orange); font-weight: 600; }
.summary-panel { display: grid; grid-template-columns: 1.12fr 2fr; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 30px; margin-bottom: 24px; }
.summary-primary { padding-right: 20px; }
.summary-primary > p { color: var(--muted); font-size: 12px; margin-bottom: 9px; }
.balance-value { display: block; font-size: clamp(27px, 2.7vw, 43px); letter-spacing: -.055em; line-height: 1.2; font-weight: 620; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-footnote { display: block; font-size: 10px; color: var(--subtle); margin-top: 10px; }
.summary-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { border-left: 1px solid var(--border); padding: 5px 0 5px 24px; min-width: 0; }
.stat-label { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); white-space: nowrap; }
.stat-label .icon { width: 12px; height: 12px; }
.stat-indicator { width: 5px; height: 5px; border-radius: 50%; }
.stat > strong { display: block; font-size: clamp(15px, 1.55vw, 23px); letter-spacing: -.04em; margin: 10px 0 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat small { font-size: 9px; color: var(--subtle); }
.stat-link:hover .stat-label { color: var(--primary); }
.two-columns { display: grid; grid-template-columns: 1.8fr 1fr; gap: 22px; margin-bottom: 24px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; position: relative; }
.panel-header { padding: 24px 24px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-header p { font-size: 11px; color: var(--subtle); margin-top: 6px; }
.panel-header > .icon { color: var(--muted); }
.subtle-tag { font-size: 10px; color: var(--muted); padding: 5px 9px; border-radius: 5px; background: var(--background); white-space: nowrap; }
.cash-panel { min-height: 321px; }
.chart-legend { display: flex; gap: 15px; padding: 0 24px; }
.legend-item { min-height: 35px; display: inline-flex; gap: 7px; align-items: center; padding: 0; color: var(--muted); font-size: 10px; }
.legend-item[aria-pressed="false"] { text-decoration: line-through; opacity: .6; }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.chart { height: 190px; width: 100%; }
.chart-table { font-size: 10px; margin: 0 24px 15px; color: var(--muted); }
.chart-table summary { width: fit-content; padding: 6px 0; }
.chart-table table { width: 100%; text-align: right; border-collapse: collapse; margin: 12px 0; font-variant-numeric: tabular-nums; }
.chart-table td, .chart-table th { padding: 6px; border-bottom: 1px solid var(--border); }
.chart-table th:first-child, .chart-table td:first-child { text-align: left; }
.spending-panel .panel-header { padding-bottom: 12px; }
.spending-total { padding: 0 24px; display: flex; align-items: baseline; gap: 8px; }
.spending-total > span { font-size: 24px; font-weight: 620; letter-spacing: -.04em; }
.spending-total small { font-size: 10px; color: var(--subtle); }
.category-bars { padding: 20px 24px 23px; display: grid; gap: 17px; }
.category-bar-row { display: block; }
.category-bar-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; margin-bottom: 8px; }
.category-bar-row > div:first-child > span { display: inline-flex; align-items: center; gap: 7px; }
.category-bar-row strong { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.category-bar-row:hover > div:first-child { color: var(--primary); }
.bar-track { height: 5px; border-radius: 5px; background: var(--track); overflow: hidden; }
.bar-fill { height: 100%; display: block; border-radius: inherit; min-width: 3px; }
.blue { --tone: var(--primary); --tone-soft: var(--primary-soft); }
.green { --tone: var(--green); --tone-soft: var(--green-soft); }
.orange { --tone: var(--orange); --tone-soft: var(--orange-soft); }
.purple { --tone: var(--purple); --tone-soft: var(--purple-soft); }
.pink { --tone: var(--pink); --tone-soft: var(--pink-soft); }
.gray { --tone: var(--gray); --tone-soft: var(--gray-soft); }
.legend-dot, .bar-fill, .stat-indicator { background: var(--tone); }
.insight-strip { display: flex; align-items: center; gap: 13px; min-height: 74px; padding: 16px 21px; background: var(--insight-surface); border: 1px solid var(--insight-border); border-radius: 11px; margin-bottom: 24px; }
.insight-symbol { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; color: var(--primary); background: var(--insight-icon-surface); flex-shrink: 0; }
.insight-symbol .icon { width: 20px; height: 20px; }
.insight-strip strong { font-size: 12px; display: block; }
.insight-strip span[data-sensitive] { font-size: 11px; color: var(--insight-text); display: block; margin-top: 3px; }
.insight-strip > .icon { margin-left: auto; color: var(--primary); width: 17px; height: 17px; }
.bottom-layout { grid-template-columns: 1.8fr 1fr; }
.text-link, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--primary); font-size: 11px; min-height: 44px; white-space: nowrap; }
.text-link .icon, .text-button .icon { width: 14px; height: 14px; }
.text-link:hover, .text-button:hover { text-decoration: underline; }
.table-container { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.transactions-table th, .positions-table th { text-align: left; color: var(--subtle); font-size: 10px; font-weight: 500; padding: 9px 16px; border-bottom: 1px solid var(--border); }
.transactions-table td, .positions-table td { padding: 9px 16px; border-bottom: 1px solid var(--track); font-size: 12px; }
.transactions-table tr:last-child td, .positions-table tr:last-child td { border-bottom: 0; }
.transactions-table th:first-child, .transactions-table td:first-child, .positions-table th:first-child, .positions-table td:first-child { padding-left: 24px; }
.transactions-table tbody tr:hover { background: var(--row-hover); }
.transaction-button { display: flex; align-items: center; gap: 11px; padding: 4px 0; text-align: left; min-height: 47px; }
.category-icon { display: inline-flex; width: 35px; height: 35px; align-items: center; justify-content: center; border-radius: 9px; color: var(--tone); background: var(--tone-soft); flex-shrink: 0; }
.category-icon .icon { width: 17px; height: 17px; }
.transaction-button strong, .position-name strong { display: block; font-size: 12px; font-weight: 550; }
.transaction-button small, .position-name small { display: block; font-size: 10px; color: var(--subtle); margin-top: 3px; }
.category-label { background: var(--background); color: var(--muted); font-size: 10px; padding: 4px 8px; border-radius: 5px; white-space: nowrap; }
.status-tag { margin-left: 6px; padding: 1px 7px; border-radius: 4px; background: var(--surface-hover); color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.status-tag.pending { background: var(--orange-soft); color: var(--orange); }
.bills-empty { color: var(--muted); font-size: 12px; margin: 12px 0; }
.transactions-table .table-date { color: var(--subtle); font-size: 10px; white-space: nowrap; }
.transactions-table .amount-cell, .positions-table .amount-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount-cell.positive { color: var(--green); }
.transactions-table .table-detail { width: 44px; padding-left: 0; padding-right: 10px; }
.compact-table .table-category, .compact-table .table-date { display: none; }
.mobile-date { display: none; }
.compact-table .mobile-date { display: inline; }
.bill-row { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--track); }
.date-block { display: flex; flex-direction: column; width: 35px; flex-shrink: 0; text-align: center; background: var(--background); border-radius: 7px; padding: 4px; }
.date-block strong { font-size: 14px; line-height: 1.3; }
.date-block small { font-size: 8px; text-transform: uppercase; color: var(--subtle); }
.bill-info { min-width: 0; }
.bill-info strong { display: block; font-size: 11px; font-weight: 550; }
.bill-info small { display: block; font-size: 10px; color: var(--subtle); margin-top: 3px; }
.bill-amount { font-size: 11px; font-weight: 550; margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.content-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0 22px; font-size: 9px; color: var(--subtle); }
.content-footer > span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.content-footer .icon { width: 11px; height: 11px; }
.content-footer > span:last-child { letter-spacing: -.04em; font-weight: 600; }
.search-form { display: flex; align-items: center; position: relative; max-width: 340px; width: 100%; }
.search-form > span { position: absolute; left: 12px; color: var(--subtle); }
.search-form .icon { width: 16px; height: 16px; }
.search-form input { min-height: 44px; width: 100%; background: var(--background); border: 1px solid transparent; border-radius: 9px; padding: 10px 42px 10px 36px; font-size: 12px; color: var(--foreground); }
.search-submit { position: absolute; right: 0; width: 42px; height: 44px; color: var(--primary); }
.empty-state { text-align: center; padding: 56px 20px; }
.empty-state > .icon { width: 30px; height: 30px; color: var(--subtle); margin-bottom: 18px; }
.empty-state p { color: var(--muted); font-size: 12px; margin: 10px 0; }
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 16px; }
.section-label > span { font-size: 10px; color: var(--subtle); }
.account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 26px; }
.account-panel { padding: 24px; }
.account-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 30px; }
.bank-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--tone-soft); color: var(--tone); font-size: 13px; letter-spacing: -.04em; font-weight: 700; }
.account-heading h2 { font-size: 14px; }
.account-heading p { font-size: 10px; color: var(--subtle); margin-top: 4px; }
.account-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin-left: auto; }
.account-balance-label { font-size: 11px; color: var(--muted); }
.account-value { font-size: 29px; letter-spacing: -.04em; display: block; margin: 4px 0 12px; white-space: nowrap; }
.note-panel { padding: 28px; }
.note-panel .category-icon { margin-bottom: 22px; }
.note-panel h2 { font-size: 22px; }
.note-panel p { color: var(--muted); font-size: 13px; margin: 14px 0; line-height: 1.7; }
.investment-top { grid-template-columns: 1fr 1.4fr; }
.portfolio-summary { padding: 30px; }
.portfolio-summary h2 { font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 22px; }
.portfolio-value { font-size: 40px; letter-spacing: -.055em; display: block; margin: 10px 0 12px; }
.portfolio-summary > p { font-size: 10px; color: var(--subtle); }
.portfolio-divider { height: 1px; background: var(--border); margin: 24px 0 20px; }
.portfolio-note { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.portfolio-note .icon { width: 16px; height: 16px; }
.allocation-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0 24px 20px 10px; }
.allocation-chart { min-width: 0; height: 220px; }
.allocation-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.allocation-legend li { display: flex; align-items: baseline; gap: 8px; font-size: 11px; color: var(--muted); }
.allocation-legend strong { display: block; font-size: 12px; color: var(--foreground); margin-top: 4px; }
.position-name { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.positions-table td { padding-top: 12px; padding-bottom: 12px; color: var(--muted); }
.positions-table .amount-cell { color: var(--foreground); padding-right: 24px; }
.analysis-intro { padding: 22px 0 30px; }
.analysis-intro .insight-symbol { margin-bottom: 18px; }
.analysis-intro h2 { font-size: 26px; }
.analysis-intro p { color: var(--muted); margin-top: 10px; font-size: 13px; }
.analysis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.analysis-card { padding: 28px; display: flex; flex-direction: column; align-items: flex-start; }
.analysis-card .category-icon { margin-bottom: 22px; }
.analysis-card h2 { font-size: 23px; line-height: 1.3; margin: 12px 0; }
.analysis-card > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.8; margin-bottom: 14px; }
.analysis-card .text-link { margin-top: auto; }
.analysis-breakdown { padding: 8px 24px 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 48px; }
.detail-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 24px 30px 30px; border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 24px 80px var(--dialog-shadow); background: var(--surface); color: var(--foreground); }
.detail-dialog::backdrop { background: var(--overlay); backdrop-filter: blur(5px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; margin: -8px -12px 18px 0; }
.dialog-icon { width: 48px; height: 48px; border-radius: 13px; margin-bottom: 20px; }
.dialog-icon .icon { width: 24px; height: 24px; }
.detail-dialog h2 { font-size: 24px; }
.detail-value { font-size: 34px; letter-spacing: -.05em; display: block; margin-top: 12px; }
.detail-dialog dl { margin: 25px 0; }
.detail-dialog dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.detail-dialog dt { color: var(--muted); }
.detail-dialog dd { margin: 0; text-align: right; }
.detail-origin { display: flex; gap: 10px; background: var(--background); border-radius: 10px; padding: 15px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.detail-origin .icon { width: 17px; height: 17px; margin-top: 3px; }
.chart-mask { display: none; position: absolute; inset: 110px 0 20px; place-items: center; font-size: 12px; color: var(--muted); pointer-events: none; }
.private .privacy-chart { visibility: hidden; }
.private .chart-mask { display: grid; }
.private .bar-fill { opacity: 0; }
.private [data-sensitive] { letter-spacing: .07em; }
.menu-toggle, .sidebar-backdrop { display: none; }
.login-header { max-width: 1440px; margin: auto; padding: 28px 48px; display: flex; align-items: center; justify-content: space-between; }
.quiet-label { color: var(--muted); font-size: 12px; }
.login-main { max-width: 460px; margin: 36px auto 70px; text-align: center; padding: 0 24px; }
.login-emblem { width: 72px; height: 72px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; margin: 0 auto 28px; }
.brand-mark.large { transform: scale(1.35); }
.login-intro h1 { font-size: 38px; line-height: 1.12; margin: 13px 0 18px; font-weight: 650; letter-spacing: -.055em; }
.login-intro > p:last-child { font-size: 14px; line-height: 1.65; color: var(--muted); }
.login-form { text-align: left; margin: 30px auto 0; max-width: 330px; }
.login-form label { display: block; font-size: 12px; font-weight: 550; margin-bottom: 8px; }
.login-form input:not([type="hidden"]) { display: block; width: 100%; min-height: 49px; border: 1px solid var(--border-input); border-radius: 10px; background: var(--surface-control); padding: 12px 14px; font-size: 14px; color: var(--foreground); }
.login-form > input:not([type="hidden"]) { margin-bottom: 20px; }
.security-main .auth-qr { display: block; max-width: 100%; height: auto; margin: 0 auto 24px; padding: 12px; border-radius: 9px; background: var(--qr-background); }
.security-main .login-form > p { margin: 12px 0 20px; color: var(--muted); }
.security-main .recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; list-style: none; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; text-align: center; }
.security-main .recovery-codes code { font-size: 15px; }
.login-form input::placeholder { color: var(--placeholder); }
.password-field { position: relative; }
.password-field input { padding-right: 46px !important; }
.password-field .icon-button { position: absolute; top: 3px; right: 4px; }
.primary-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 12px; border-radius: 10px; background: var(--primary-action); color: #fff; font-size: 14px; font-weight: 550; padding: 12px 20px; transition: background 160ms; }
.primary-button:hover { background: var(--primary-action-hover); }
.login-submit { width: 100%; margin-top: 24px; }
.login-submit .icon { width: 17px; height: 17px; }
.demo-form { margin-top: 15px; }
.demo-form .text-button { font-size: 12px; }
.demo-form > p { color: var(--subtle); font-size: 10px; }
.login-security { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 29px; color: var(--muted); font-size: 10px; }
.login-security .icon { width: 12px; height: 12px; }
.login-footer { max-width: 1344px; padding: 20px 0 26px; margin: 0 48px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; color: var(--subtle); font-size: 10px; }
.form-error { padding: 12px 14px; margin-bottom: 18px; color: var(--error); background: var(--error-soft); border-radius: 8px; font-size: 12px; }
@media (min-width: 1700px) {
    .main-content { padding-top: 48px; }
    .balance-value { font-size: 44px; }
    .stat > strong { font-size: 25px; }
}
@media (max-width: 1200px) {
    .main-content { padding: 28px 28px 0; }
    .topbar { padding: 0 28px; }
    .summary-panel { grid-template-columns: 1fr; padding: 25px; }
    .summary-primary { padding: 0 0 23px; }
    .summary-stats { border-top: 1px solid var(--border); padding-top: 20px; }
    .stat:first-child { border-left: 0; padding-left: 0; }
    .stat > strong { font-size: 20px; }
    .two-columns, .bottom-layout { grid-template-columns: 1.35fr 1fr; gap: 18px; }
    .panel-header, .bill-row { padding-left: 20px; padding-right: 20px; }
    .account-grid, .analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .investment-top { grid-template-columns: 1fr; }
    .allocation-layout { grid-template-columns: 1fr 1.2fr; }
    .transactions-table .table-category { display: none; }
    .summary-footnote { font-size: 10px; }
}
@media (max-width: 960px) {
    .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
    .sidebar { width: 190px; padding-left: 12px; padding-right: 12px; }
    .sidebar > .brand { margin-left: 10px; }
    .nav-item { padding-left: 11px; font-size: 12px; gap: 10px; }
    .context-row { align-items: flex-start; flex-direction: column; gap: 11px; }
    .two-columns { grid-template-columns: 1fr; }
    .cash-panel { min-height: 330px; }
    .chart { height: 210px; }
    .category-bars { grid-template-columns: 1fr 1fr; gap: 24px; }
    .spending-total { margin-top: 0; }
    .spending-panel { padding-bottom: 8px; }
    .panel-header h2 { font-size: 16px; }
    .page-header { align-items: flex-start; }
    .page-subtitle { max-width: 250px; }
    .period-form select { max-width: 150px; }
    .stat { padding-left: 18px; }
    .stat > strong { font-size: 17px; }
    .account-grid, .analysis-grid { grid-template-columns: 1fr; }
    .content-footer > span:last-child { display: none; }
    .transactions-table .table-date { display: none; }
    .mobile-date { display: inline; }
    .search-form { max-width: 240px; }
}
@media (max-width: 700px) {
    .app-shell { display: block; }
    .sidebar { width: 246px; transform: translateX(-100%); transition: transform 160ms; }
    .menu-open .sidebar { transform: translateX(0); }
    .menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: var(--backdrop); }
    .menu-toggle { display: inline-flex; }
    .breadcrumb { min-width: 0; flex: 1; gap: 5px; }
    .breadcrumb > span, .breadcrumb > .icon { display: none; }
    .breadcrumb .menu-toggle .icon { width: 20px; height: 20px; }
    .topbar { height: 62px; padding: 0 14px 0 8px; }
    .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .top-actions { gap: 4px; }
    .demo-badge { font-size: 9px; }
    .main-content { padding: 24px 18px 0; }
    .page-header { flex-wrap: wrap; gap: 17px; }
    .page-header h1 { font-size: 31px; }
    .page-header .eyebrow { font-size: 9px; }
    .page-subtitle { max-width: none; font-size: 12px; margin-top: 8px; }
    .period-form select { min-height: 44px; font-size: 11px; max-width: none; }
    .context-row { margin-top: 17px; margin-bottom: 20px; gap: 12px; }
    .segmented-control { width: 100%; }
    .segmented-control a { min-width: 0; min-height: 42px; flex: 1; }
    .data-note { font-size: 11px; }
    .summary-panel { padding: 23px 20px; margin-bottom: 18px; }
    .balance-value { font-size: 37px; }
    .summary-primary > p { font-size: 12px; }
    .summary-stats { grid-template-columns: 1fr 1fr; row-gap: 20px; }
    .stat:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); padding: 16px 0 0; display: grid; grid-template-columns: 1fr auto; }
    .stat:nth-child(3) > strong { margin: 0; grid-column: 2; grid-row: 1; }
    .stat:nth-child(3) > small { grid-column: 1 / -1; margin-top: 5px; }
    .stat > strong { font-size: 20px; }
    .stat-label { font-size: 10px; }
    .stat small { font-size: 9px; }
    .panel { border-radius: 12px; }
    .two-columns { margin-bottom: 18px; }
    .panel-header { padding: 20px 18px 14px; }
    .panel-header p { font-size: 10px; }
    .panel-header h2 { font-size: 15px; }
    .chart { height: 195px; }
    .chart-legend { padding-left: 18px; }
    .chart-table { margin-left: 18px; margin-right: 18px; }
    .category-bars { padding: 19px 18px; gap: 20px; }
    .spending-total { padding-left: 18px; }
    .category-bar-row > div:first-child, .category-bar-row strong { font-size: 10px; }
    .insight-strip { padding: 14px; gap: 11px; margin-bottom: 18px; }
    .insight-strip strong { font-size: 11px; }
    .insight-strip span[data-sensitive] { font-size: 10px; line-height: 1.6; }
    .insight-strip > .icon { width: 14px; }
    .transactions-table th:first-child, .transactions-table td:first-child, .positions-table th:first-child, .positions-table td:first-child { padding-left: 16px; }
    .transactions-table th, .transactions-table td { padding-right: 8px; padding-left: 8px; }
    .transaction-button { gap: 9px; }
    .transaction-button strong, .position-name strong { font-size: 11px; }
    .transaction-button small, .position-name small { font-size: 9px; }
    .transactions-table .table-detail { display: none; }
    .transactions-table .amount-cell { font-size: 11px; padding-right: 16px; }
    .category-icon { width: 31px; height: 31px; border-radius: 8px; }
    .bill-row { padding: 15px 18px; }
    .bill-info strong, .bill-amount { font-size: 12px; }
    .content-footer { flex-wrap: wrap; justify-content: flex-start; gap: 8px 20px; font-size: 9px; padding: 4px 0 20px; }
    .transactions-panel { padding-bottom: 7px; }
    .panel-header:has(.search-form) { flex-direction: column; align-items: stretch; }
    .search-form { max-width: none; }
    .search-form input { font-size: 14px; }
    .section-label { flex-wrap: wrap; }
    .section-label h2 { font-size: 16px; }
    .account-grid { gap: 14px; }
    .account-heading { margin-bottom: 22px; }
    .account-value { font-size: 33px; }
    .allocation-layout { padding: 0 16px 24px; grid-template-columns: 1fr 1fr; }
    .allocation-chart { height: 185px; }
    .allocation-legend li { font-size: 10px; }
    .allocation-legend strong { font-size: 11px; }
    .positions-table .table-category, .positions-table .table-date { display: none; }
    .positions-table .amount-cell { font-size: 12px; padding-left: 0; padding-right: 16px; }
    .portfolio-summary { padding: 25px; }
    .portfolio-value { font-size: 36px; }
    .analysis-intro h2 { font-size: 24px; }
    .analysis-breakdown { grid-template-columns: 1fr; gap: 24px; }
    .login-header { padding: 22px 24px; gap: 10px; }
    .login-header .quiet-label { display: none; }
    .login-header .theme-control { margin-left: auto; }
    .login-header .brand { font-size: 22px; }
    .login-main { margin-top: 32px; margin-bottom: 44px; }
    .login-intro h1 { font-size: 33px; }
    .login-form input:not([type="hidden"]) { font-size: 16px; }
    .login-footer { margin: 0 24px; }
    .theme-control select { min-width: 84px; }
}
@media (max-width: 370px) {
    .main-content { padding-left: 12px; padding-right: 12px; }
    .category-bars { grid-template-columns: 1fr; }
    .stat > strong { font-size: 18px; }
    .balance-value { font-size: 33px; }
    .transaction-button .category-icon { display: none; }
    .bill-row { gap: 9px; padding-left: 14px; padding-right: 14px; }
    .bill-info strong, .bill-amount { font-size: 11px; }
    .demo-badge { font-size: 8px; }
    .topbar .demo-badge { max-width: 70px; line-height: 1.3; }
    .topbar .theme-control { gap: 4px; }
    .topbar .theme-control select { min-width: 78px; }
    .allocation-layout { grid-template-columns: 1fr; }
    .allocation-chart { height: 220px; }
    .allocation-legend { grid-template-columns: 1fr 1fr; }
    .login-intro h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
