@charset "UTF-8";

:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", sans-serif;
  color: #f5f5f7;
  background: #000;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #f5f5f7;
  --muted: #929295;
  --subtle: #636366;
  --blue: #0a84ff;
  --green: #42c986;
  --danger: #ff686e;
  --line: #2c2c2e;
  --surface: #1c1c1e;
  --surface-raised: #252527;
  --background: #000;
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; padding-top: env(safe-area-inset-top, 0px); }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
button, a { -webkit-user-select: none; user-select: none; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
svg { display: inline-block; flex-shrink: 0; vertical-align: middle; }
button svg { width: 20px; height: 20px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.035em; font-weight: 650; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: 32px 18px 26px; border-right: 1px solid #202022; background: #080808; }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; color: var(--ink); background: transparent; font-size: 25px; font-weight: 650; letter-spacing: -.06em; text-decoration: none; }
.sidebar .brand { margin: 0 12px 45px; }
.brand-mark { position: relative; display: inline-grid; place-items: center; width: 39px; height: 39px; flex-shrink: 0; overflow: hidden; border-radius: 11px; }
.brand-mark img { position: absolute; top: 50%; left: 50%; width: 450%; height: 253.125%; max-width: none; object-fit: contain; transform: translate(-50%, -50%); }
.brand-mark svg { width: 26px; height: 26px; }
.brand .badge { margin-left: 2px; }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 13px 15px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 500; text-align: left; }
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { color: var(--ink); background: #1c1c1e; }
.nav-item.active { color: var(--ink); background: #202022; }
.nav-item.active svg { color: var(--blue); }
.sidebar > .eyebrow { margin: 0 15px 14px; }
.sidebar-note { margin-top: auto; padding: 24px 13px 10px; color: var(--subtle); font-size: 12px; line-height: 1.65; }
.sidebar-note svg { width: 20px; height: 20px; margin-bottom: 12px; }
.sidebar-note strong { display: block; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.sidebar-note .badge { margin-top: 14px; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; margin: 16px 13px 0; color: var(--subtle); font-size: 11px; }
.status-dot { display: inline-block; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: var(--green); }
.main { width: 100%; max-width: 1190px; min-width: 0; padding: 39px 40px 36px; margin: 0 auto; }
.mobile-header, .mobile-only { display: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 28px; }
.topbar > div:first-child { min-width: 0; }
.heading, h1.heading { color: var(--ink); font-size: 30px; letter-spacing: -.04em; line-height: 1.22; }
.subtitle { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.eyebrow { display: block; margin-bottom: 6px; color: var(--subtle); font-size: 10px; font-weight: 550; line-height: 1.6; letter-spacing: .09em; text-transform: uppercase; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.topbar .toolbar { flex-shrink: 0; justify-content: flex-end; }
.month-picker { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 12px; background: #111; }
.month-picker label { display: flex; min-width: 0; align-items: center; }
.month-picker input { width: 130px; min-width: 0; min-height: 40px; padding: 8px 3px; border: 0; border-radius: 7px; background: transparent; color: #d1d1d3; font-size: 12px; font-weight: 500; }
.month-picker input::-webkit-calendar-picker-indicator { width: 13px; margin: 0; cursor: pointer; opacity: .65; }
.month-picker > span, .month-picker > strong { padding: 0 8px; font-size: 13px; font-weight: 500; }
.month-label { position: relative; display: flex; align-items: center; justify-content: center; min-width: 118px; min-height: 44px; }
.month-text { color: #b8b8bd; font-size: 12px; font-weight: 500; text-transform: capitalize; white-space: nowrap; }
.month-label #month { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; color: transparent; background: transparent; font-size: 16px; opacity: 0; cursor: pointer; }
.month-label:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 7px; }
.icon-btn, .close-btn { display: inline-grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: transparent; }
.icon-btn:hover, .close-btn:hover { background: #29292c; }
.profile-avatar { display: inline-grid; place-items: center; width: 37px; height: 37px; border: 1px solid #333336; border-radius: 50%; color: var(--muted); background: var(--surface); font-size: 14px; font-weight: 600; }
.profile-avatar svg { width: 18px; height: 18px; }
.profile-card { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: auto; padding: 14px 11px; border: 0; border-radius: 12px; background: #151517; color: var(--ink); text-align: left; }
.profile-card > span:not(.profile-avatar) { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 4px; }
.profile-card strong { font-size: 12px; font-weight: 500; }
.profile-card small { color: var(--subtle); font-size: 10px; }
.profile-card > svg { width: 15px; height: 15px; color: var(--subtle); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 46px; padding: 11px 16px; border: 1px solid transparent; border-radius: 12px; color: var(--ink); background: var(--surface-raised); font-size: 14px; font-weight: 550; line-height: 1.4; text-align: center; text-decoration: none; white-space: normal; overflow-wrap: anywhere; transition: background .15s, opacity .15s; }
.button.primary { color: #fff; background: var(--blue); }
.button.primary:hover { background: #298fff; }
.button.secondary { background: #2c2c2e; color: var(--ink); }
.button.secondary:hover { background: #38383b; }
.button.ghost { border-color: #39393c; color: #d1d1d3; background: transparent; }
.button.ghost:hover { background: #272729; }
.button.danger { color: var(--danger); border-color: #522a2e; background: #2d1d20; }
.button.small { padding: 10px 13px; font-size: 13px; }
.link-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 44px; padding: 8px 2px; border: 0; color: var(--blue); background: transparent; font-size: 13px; font-weight: 500; line-height: 1.4; text-align: center; text-decoration: none; white-space: normal; }
.link-btn svg { width: 15px; height: 15px; }
.link-btn:hover { color: #55a6ff; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 6px; color: #a0a0a5; background: #2c2c2e; font-size: 10px; font-weight: 500; line-height: 1.3; }

.finance-tabs { display: flex; align-items: center; gap: 24px; margin-bottom: 22px; border-bottom: 1px solid #252527; }
.finance-tab { position: relative; min-height: 44px; padding: 0 0 13px; border: 0; border-radius: 0; color: var(--muted); background: transparent; font-size: 15px; font-weight: 550; }
.finance-tab.active { color: var(--ink); }
.finance-tab.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px; background: var(--blue); }
.summary-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.metric-card { min-width: 0; padding: 22px; border: 1px solid transparent; border-radius: var(--radius); background: var(--surface); }
.metric-card.hero { background: var(--surface); }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; color: #a1a1a6; font-size: 12px; font-weight: 450; }
.metric-label svg { width: 18px; height: 18px; color: #747479; }
.income-card .metric-label, .expense-card .metric-label { justify-content: flex-start; gap: 7px; }
.balance-currency { color: #818187; font-size: 11px; font-weight: 450; }
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 50%; color: var(--muted); background: #303033; }
.stat-icon svg { width: 14px; height: 14px; color: inherit; }
.metric-value { margin-top: 15px; color: var(--ink); font-size: clamp(25px, 2.3vw, 34px); font-weight: 600; line-height: 1.2; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-value small { margin-right: 3px; font-size: .6em; color: var(--muted); font-weight: 450; }
.hero .metric-value { font-size: clamp(29px, 2.6vw, 38px); }
.metric-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 11px; color: #77777c; font-size: 11px; line-height: 1.5; }
.metric-foot svg { width: 14px; height: 14px; }
.metric-divider { height: 1px; margin-top: 15px; background: var(--line); }
.metric-card > .link-btn { margin-top: 3px; }
.positive, .income-value, .income-card .metric-value { color: var(--green); }
.negative, .expense-value, .expense-card .metric-value { color: var(--danger); }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 27px; }
.action-grid .button { min-height: 48px; }
.action-grid .button svg { width: 18px; height: 18px; }
.budget-track, .category-track { height: 4px; border-radius: 20px; overflow: hidden; background: #333336; }
.budget-track { margin-top: 16px; }
.budget-fill, .category-fill { height: 100%; width: var(--progress, 0%); max-width: 100%; border-radius: inherit; background: var(--blue); transition: width .25s; }
.budget-fill.over { background: var(--danger); }
.budget-preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; margin-bottom: 24px; padding: 16px 18px; border: 1px solid #303033; border-radius: 14px; background: var(--surface); text-align: left; }
.budget-preview > div { min-width: 0; }
.budget-preview > div:first-child > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.budget-preview strong { display: block; font-size: 12px; font-weight: 500; }
.budget-preview small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.budget-preview .budget-track { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
.budget-preview .budget-percent { grid-column: 2; grid-row: 1; font-size: 11px; }
.budget-percent svg { width: 14px; height: 14px; margin-left: 4px; }
.budget-preview > span { color: var(--muted); font-size: 12px; font-weight: 500; }
.budget-preview > svg { width: 16px; height: 16px; color: var(--subtle); }

.card { min-width: 0; padding: 23px; border: 1px solid transparent; border-radius: var(--radius); background: var(--surface); }
.card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 15px; margin-bottom: 19px; }
.card-header > div, .card-header > h2 { min-width: 0; }
.card-header > .link-btn { flex-shrink: 0; }
.card-title { font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.025em; }
.card-title svg { width: 18px; height: 18px; margin-right: 6px; }
.text-muted { color: var(--muted); font-size: 12px; line-height: 1.6; }
.section-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.overview-section { margin-bottom: 24px; }
.overview-section > .card-header { margin-bottom: 18px; }
.categories { display: grid; gap: 19px; }
.category-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.category-icon, .transaction-icon { display: inline-grid; place-items: center; width: 39px; height: 39px; flex-shrink: 0; border-radius: 11px; color: var(--muted); background: #2e2e31; }
.category-icon svg, .transaction-icon svg { width: 19px; height: 19px; }
.category-info { flex: 1; min-width: 0; }
.category-info > span, .category-info > strong { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-track { width: 100%; height: 3px; }
.category-fill { background: var(--category-color, #7e7e83); }
.category-value { flex-shrink: 0; min-width: 64px; text-align: right; font-size: 12px; font-weight: 550; line-height: 1.5; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.category-value > strong { display: block; font-size: 12px; font-weight: 550; }
.category-value > span, .category-value small { display: block; padding-top: 3px; color: var(--subtle); font-size: 10px; font-weight: 450; }
.category-total { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.category-total span { color: var(--muted); font-size: 11px; }
.category-total strong { font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums; }

.transaction-list { display: grid; }
.transaction-day { display: block; padding: 18px 0 10px; color: var(--subtle); font-size: 11px; font-weight: 500; line-height: 1.4; letter-spacing: 0; }
.transaction-day:first-child { padding-top: 0; }
.transaction-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 62px; padding: 13px 0; border: 0; border-bottom: 1px solid #303033; border-radius: 0; color: inherit; background: transparent; text-align: left; line-height: 1.4; }
.transaction-row:last-child { border-bottom: 0; }
.transaction-row:hover { background: #232326; }
.transaction-row:focus-visible { position: relative; z-index: 1; border-radius: 8px; }
.transaction-info { flex: 1; min-width: 0; }
.transaction-info > strong, .transaction-info .transaction-note { display: block; margin: 0; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transaction-info .transaction-meta { display: block; min-width: 0; margin-top: 4px; color: #828287; font-size: 11px; font-weight: 400; line-height: 1.5; text-align: left; white-space: normal; }
.transaction-info .transaction-meta > span { padding: 0 2px; color: var(--subtle); }
.transaction-amount { flex-shrink: 0; min-width: 0; max-width: 48%; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -.015em; overflow-wrap: anywhere; }
.transaction-amount > strong { display: block; font-size: 13px; font-weight: 550; line-height: 1.5; }
.transaction-amount > span { display: block; margin-top: 4px; color: #828287; font-size: 10px; font-weight: 400; line-height: 1.5; }
.empty-state { display: grid; justify-items: center; align-content: center; gap: 9px; min-height: 191px; padding: 25px 12px; text-align: center; }
.empty-state h3 { font-size: 16px; font-weight: 550; }
.empty-state p { max-width: 285px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.empty-icon { display: grid; place-items: center; width: 51px; height: 51px; margin-bottom: 5px; border-radius: 15px; color: #9b9ba0; background: #2c2c2f; }
.empty-icon svg { width: 25px; height: 25px; }
.empty-action { display: flex; justify-content: center; margin-top: 7px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.setting-section .card-header > svg { width: 20px; height: 20px; color: #838388; }
.setting-separator { height: 1px; margin: 26px 0 22px; background: var(--line); }
.backup-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; margin-top: 18px; }
.backup-buttons .button { width: 100%; font-size: 13px; padding: 11px 13px; }
.install-card > .helper { margin-bottom: 17px; }
.form-stack { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px; }
.field-label { display: block; color: #b1b1b6; font-size: 12px; font-weight: 450; line-height: 1.5; }
.input, .select, .textarea { display: block; width: 100%; min-width: 0; min-height: 46px; padding: 12px 13px; border: 1px solid #38383b; border-radius: 11px; color: var(--ink); background: #141416; font-size: 13px; line-height: 1.45; }
.input::placeholder, .textarea::placeholder { color: #6a6a70; }
.input:hover, .select:hover, .textarea:hover { border-color: #505056; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); }
.select { appearance: auto; }
.input[type="date"] { appearance: none; min-width: 0; max-width: 100%; }
.input[type="date"]::-webkit-date-and-time-value { min-width: 0; text-align: left; }
.input[type="date"]::-webkit-calendar-picker-indicator { flex-shrink: 0; margin-left: 4px; }
.select option { color: var(--ink); background: var(--surface); }
.textarea { min-height: 86px; resize: vertical; }
.helper { color: var(--muted); font-size: 11px; line-height: 1.7; }
.error { color: var(--danger); font-size: 12px; line-height: 1.6; }
.alert { padding: 14px 16px; border: 1px solid #51452c; border-radius: 12px; color: #d8b775; background: #292319; font-size: 12px; line-height: 1.6; }
.pending-rate.alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.pending-rate.alert > svg { width: 18px; height: 18px; margin-top: 2px; }
.pending-rate.alert > div { flex: 1; min-width: 0; }
.pending-rate.alert p { margin-top: 4px; font-size: 11px; }
.pending-rate.alert .link-btn { min-height: 44px; color: #d8b775; }
.checkbox-line { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.checkbox-line input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--blue); }
.filters { display: grid; grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(150px, 1fr)); gap: 10px; margin-bottom: 24px; }
.filters .select { padding: 11px 12px; font-size: 13px; }
.search-box { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0 12px; border: 1px solid #38383b; border-radius: 11px; background: #141416; }
.search-box svg { width: 18px; height: 18px; color: #838388; }
.search-box input { width: 100%; min-width: 0; min-height: 46px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-box input::placeholder { color: #6a6a70; }
.search-box:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.list-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.list-footer .text-muted { flex: 1 1 180px; min-width: 0; font-size: 12px; }
.list-footer .link-btn { font-size: 13px; }
.budget-overview { padding: 2px 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.budget-number { display: block; margin-top: 12px; color: var(--ink); font-size: clamp(28px, 3vw, 37px); font-weight: 600; line-height: 1.2; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.budget-overview .budget-track { height: 5px; margin-top: 20px; }
.budget-overview .helper { margin-top: 11px; }
.exchange-card { margin-top: 22px; }
.currency-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.currency-card { display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 16px; border: 1px solid transparent; border-radius: 13px; background: #252527; }
.currency-symbol { display: inline-grid; place-items: center; width: 29px; height: 34px; color: #dedee1; font-size: 22px; font-weight: 450; line-height: 1; letter-spacing: -.05em; }
.currency-card > div { min-width: 0; }
.currency-card > div > strong { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; line-height: 1.4; }
.currency-card > div > span { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.currency-card > .badge { padding: 4px 5px; background: #333336; font-size: 8px; }
.exchange-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.exchange-footer .text-muted { flex: 1 1 220px; min-width: 0; color: #828287; font-size: 11px; line-height: 1.7; }
.exchange-footer .link-btn { flex: 0 0 auto; font-size: 13px; }
.setting-section > .exchange-card { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
.setting-section > .exchange-card > .card-header { display: none; }
.setting-section > .exchange-card .currency-grid { grid-template-columns: 1fr; }
.app-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 15px; margin-top: 25px; color: var(--subtle); font-size: 11px; line-height: 1.5; }
.app-footer > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.app-footer svg { width: 12px; height: 12px; }
.app-footer .link-btn { color: #a1a1a6; font-size: 12px; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 22px; padding: 12px 15px; border: 1px solid #39393c; border-radius: 12px; color: #b1b1b6; background: #1c1c1e; font-size: 11px; line-height: 1.5; }
.demo-bar .link-btn { font-size: 11px; }

.dialog { width: min(470px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid #38383b; border-radius: 21px; color: var(--ink); background: var(--surface); box-shadow: 0 25px 80px rgb(0 0 0 / 55%); overflow: hidden; overscroll-behavior: contain; }
.dialog[open] { display: flex; flex-direction: column; }
.dialog > form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.dialog::backdrop { background: rgb(0 0 0 / 70%); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dialog-wide { width: min(630px, calc(100vw - 40px)); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 12px; padding: 20px 24px 9px; }
.dialog-header > div { min-width: 0; }
.dialog-header h2 { font-size: 21px; line-height: 1.35; }
.dialog-header .eyebrow { margin-bottom: 3px; }
.dialog-header .close-btn { margin-right: -9px; color: #a1a1a6; }
.dialog-body { min-height: 0; padding: 10px 24px 25px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.dialog-body > p { font-size: 13px; line-height: 1.8; }
.dialog-body > p + p { margin-top: 13px; }
.dialog-footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); flex-shrink: 0; gap: 10px; padding: 17px 24px 22px; border-top: 1px solid var(--line); background: var(--surface); }
.dialog-footer .button { width: 100%; }
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 11px; background: #111113; }
.type-btn { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 12px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 500; }
.type-btn.active { color: var(--ink); background: #3a3a3d; }
.type-btn svg { width: 17px; height: 17px; }
.currency-pills, .pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.currency-pill, .pills button { min-width: 0; min-height: 44px; padding: 9px 7px; border: 1px solid #39393c; border-radius: 10px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 500; }
.currency-pill.active, .pills button.active { border-color: #1b63a8; color: #54a8ff; background: #0d2843; }
.amount-wrap { display: flex; align-items: center; gap: 10px; padding: 10px 15px; border: 1px solid #38383b; border-radius: 12px; background: #141416; }
#amount-symbol { flex-shrink: 0; color: #87878c; font-size: 26px; font-weight: 450; }
.amount-input { display: block; width: 100%; min-width: 0; max-width: 100%; margin: 0; padding: 7px 0; border: 0; outline: 0; border-radius: 7px; color: var(--ink); background: transparent; font-size: 38px; font-weight: 550; text-align: left; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.amount-input::placeholder { color: #535358; }
.amount-wrap:focus-within { border-color: var(--blue); }
.category-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.category-option { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 74px; padding: 10px 5px; border: 1px solid #39393c; border-radius: 12px; color: var(--muted); background: #141416; font-size: 10px; line-height: 1.4; }
.category-option.selected { border-color: #1b63a8; color: #54a8ff; background: #0d2843; }
.toast { position: fixed; z-index: 200; bottom: 28px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 36px); padding: 13px 18px; border: 1px solid #454549; border-radius: 13px; color: var(--ink); background: #2c2c2e; font-size: 12px; line-height: 1.5; box-shadow: 0 10px 35px rgb(0 0 0 / 40%); }
.toast svg { width: 17px; height: 17px; color: var(--green); }

.auth-page { display: grid; justify-items: center; align-content: center; min-height: 100vh; min-height: 100dvh; padding: 32px 20px calc(32px + var(--safe-bottom)); }
.auth-card { width: 100%; max-width: 420px; min-width: 0; padding: 28px; border: 1px solid #29292c; border-radius: 22px; background: #151517; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; margin-bottom: 28px; color: var(--ink); font-size: 28px; font-weight: 650; letter-spacing: -.06em; }
.auth-card h1 { font-size: 27px; line-height: 1.25; text-align: center; }
.auth-card > .subtitle, .auth-card > .helper { margin-top: 9px; text-align: center; }
.auth-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); gap: 4px; margin: 25px 0 22px; padding: 4px; border-radius: 12px; background: #09090b; }
.auth-tab { min-width: 0; min-height: 44px; padding: 8px 5px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 500; line-height: 1.4; text-align: center; }
.auth-tab.active, .auth-tab[aria-selected="true"] { color: var(--ink); background: #303033; }
.auth-form { display: grid; gap: 18px; }
.auth-form > .button { width: 100%; margin-top: 3px; }
.password-field { display: flex; align-items: center; min-width: 0; border: 1px solid #38383b; border-radius: 11px; background: #141416; }
.password-field:focus-within { outline: 2px solid var(--blue); outline-offset: 3px; border-color: var(--blue); }
.password-field > .input { flex: 1; min-width: 0; border: 0; background: transparent; }
.password-field > .input:focus-visible { outline: 0; }
.password-field > button { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 9px; color: #929295; background: transparent; }
.password-field > button:hover { color: var(--ink); }
.password-field > button svg { width: 20px; height: 20px; }
.auth-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.auth-actions .button { width: 100%; }
.auth-footer { margin-top: 22px; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: center; overflow-wrap: anywhere; }
.auth-footer .link-btn { min-height: 44px; }
.auth-card .alert { margin: 18px 0; }
.auth-card .error { overflow-wrap: anywhere; }
.auth-message { padding: 12px 14px; border-radius: 11px; color: #bbd9c8; background: #1b2b22; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.auth-notice { display: grid; gap: 12px; margin-top: 23px; padding-top: 20px; border-top: 1px solid #29292c; }
.auth-notice > p { color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.auth-notice > .button, .auth-biometric { width: 100%; }
.auth-biometric { margin-top: 12px; }
.auth-biometric + .helper { margin-top: 8px; text-align: center; }
.account-email { display: block; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.account-status { display: flex; align-items: flex-start; gap: 7px; margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.account-status svg { width: 16px; height: 16px; margin-top: 2px; }
.account-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 9px; margin-top: 20px; }
.account-actions .button { width: 100%; font-size: 13px; }
.account-card form { margin-top: 20px; }
.account-card > .button { width: 100%; margin: 16px 0 10px; }
.account-card > .account-status + .helper, .account-card > .account-actions + .helper { margin-top: 12px; }
.setting-label { margin-bottom: 9px; color: var(--ink); font-size: 14px; font-weight: 550; line-height: 1.5; letter-spacing: -.015em; }
.sync-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; max-width: 100%; padding: 5px 8px; border-radius: 7px; color: #a1a1a6; background: #262629; font-size: 11px; line-height: 1.4; }
.sync-pill svg { width: 13px; height: 13px; }
.notification-trigger { position: relative; }
.notification-dot { position: absolute; top: 7px; right: 8px; display: grid; place-items: center; width: 7px; height: 7px; border: 1.5px solid #000; border-radius: 50%; background: var(--blue); }
.notification-dot:not(:empty) { top: 3px; right: 2px; width: auto; min-width: 16px; height: 16px; padding: 0 3px; color: #fff; font-size: 8px; font-weight: 600; line-height: 1; }
.page-tabs { margin-top: -5px; }
.bills-card .card-header > div { flex: 1 1 150px; }
.bills-card .card-header .button { flex: 0 0 auto; }
.bills-card .card-header .helper { margin-top: 5px; }
.bill-progress { margin: 5px 0 18px; }
.bill-progress .budget-track { height: 5px; margin-top: 0; }
.bill-progress .complete { background: var(--green); }
.bill-achievement { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: #81d7a9; font-size: 13px; line-height: 1.55; }
.bill-achievement svg { width: 17px; height: 17px; }
.bills-list { display: grid; }
.bill-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; min-width: 0; padding: 16px 0; border-bottom: 1px solid #303033; }
.bill-row:first-child { padding-top: 6px; }
.bill-row:last-child { border-bottom: 0; }
.bill-info { display: flex; align-items: center; gap: 11px; width: 100%; min-width: 0; min-height: 64px; padding: 8px 0; border: 0; border-radius: 9px; color: var(--ink); background: transparent; text-align: left; }
.bill-info:hover { background: #252527; }
.bill-info > span:last-child { min-width: 0; }
.bill-info strong { display: block; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.bill-info small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.bill-status { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; color: #99999f; background: #2c2c2f; }
.bill-status svg { width: 18px; height: 18px; }
.bill-status.paid { color: #85d8af; background: #24332b; }
.bill-status.overdue { color: #eda3a6; background: #3a282c; }
.bill-action { display: grid; justify-items: stretch; gap: 9px; width: clamp(104px, 28vw, 144px); min-width: 0; }
.bill-action > strong { display: block; min-width: 0; color: var(--ink); font-size: 14px; font-weight: 550; line-height: 1.5; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bill-action > .button { width: 100%; }
.bill-row.paid .bill-info small { color: #88ad99; }
.bill-footnote { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.insight-card { display: flex; align-items: flex-start; gap: 12px; min-width: 0; margin-bottom: 18px; padding: 17px 18px; border-radius: 14px; background: #17191d; }
.insight-icon { display: inline-grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; color: #9bb7d8; background: #263344; }
.insight-icon svg { width: 18px; height: 18px; }
.insight-card > div { flex: 1; min-width: 0; padding-top: 1px; }
.insight-card strong { display: block; font-size: 13px; font-weight: 550; line-height: 1.5; }
.insight-card p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.insight-card > .icon-btn { width: 44px; height: 44px; margin: -5px -8px 0 0; color: #828287; }
.insight-card.warning { background: #221d16; }
.insight-card.warning .insight-icon { color: #dcb87e; background: #3b3022; }
.insight-card.success, .insight-card.achievement { background: #17221c; }
.insight-card.success .insight-icon, .insight-card.achievement .insight-icon { color: #93d1ac; background: #283c30; }
.notification-list { display: grid; }
.notification-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 16px 0; border-bottom: 1px solid #303033; }
.notification-row:first-child { padding-top: 5px; }
.notification-row:last-child { padding-bottom: 5px; border-bottom: 0; }
.notification-row > div { min-width: 0; }
.notification-row strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.5; }
.notification-row p { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.notification-meta { display: block; margin-top: 7px; color: var(--subtle); font-size: 11px; line-height: 1.5; }
.notification-row.warning .insight-icon { color: #dcb87e; background: #3b3022; }
.notification-row.success .insight-icon, .notification-row.achievement .insight-icon { color: #93d1ac; background: #283c30; }
.migration-card { margin-bottom: 18px; padding: 18px; border: 1px solid #304260; border-radius: 14px; background: #161e2a; }
.migration-card h2, .migration-card h3, .migration-card > strong { font-size: 15px; font-weight: 550; line-height: 1.5; }
.migration-card p { margin-top: 8px; color: #9da9ba; font-size: 12px; line-height: 1.65; }
.migration-card .button { margin-top: 14px; }
.migration-card .account-actions, .migration-card .toolbar { margin-top: 14px; }
.migration-card .account-actions .button, .migration-card .toolbar .button { margin-top: 0; }

@media (max-width: 1250px) and (min-width: 769px) {
  .main { padding: 34px 28px; }
  .topbar { align-items: flex-start; }
  .topbar .toolbar { max-width: 228px; }
  .topbar .toolbar > .button { width: 100%; }
  .metric-card { padding: 18px; }
  .metric-value { font-size: 25px; }
  .hero .metric-value { font-size: 30px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .search-box, .filters #filter-category { grid-column: 1 / -1; }
  .currency-card { grid-template-columns: 25px minmax(0, 1fr); padding: 14px 12px; gap: 7px; }
  .currency-card > .badge { display: none; }
}
@media (max-width: 1000px) and (min-width: 769px) {
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar { padding-right: 13px; padding-left: 13px; }
  .section-grid, .settings-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .metric-card.hero { grid-column: 1 / -1; }
  .currency-grid { grid-template-columns: 1fr; }
  .currency-card { grid-template-columns: 29px minmax(0, 1fr) auto; padding: 16px; }
  .currency-card > .badge { display: inline-flex; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .filters .search-box, .filters #filter-category { grid-column: auto; }
}
@media (max-width: 768px) {
  .desktop-only, .sidebar { display: none !important; }
  .mobile-only { display: initial; }
  .app-shell { display: block; }
  .main { max-width: 560px; padding: 16px 18px calc(40px + var(--safe-bottom)); }
  .app-shell[data-route="movimientos"] .main, .app-shell.route-movimientos .main, .main.has-fab { padding-bottom: calc(112px + var(--safe-bottom)); }
  .mobile-header { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; min-height: 44px; margin-bottom: 22px; }
  .mobile-header .brand { justify-self: center; gap: 8px; min-height: 44px; font-size: 24px; }
  .mobile-header .brand-mark { width: 33px; height: 33px; border-radius: 9px; }
  .mobile-header .profile-avatar { justify-self: end; width: 44px; height: 44px; }
  .mobile-header > .icon-btn:first-child { margin-left: -5px; }
  .mobile-header > .icon-btn:last-child { justify-self: end; margin-right: -5px; }
  .menu-trigger svg { width: 22px; height: 22px; }
  .topbar { align-items: center; flex-wrap: wrap; gap: 14px 10px; margin-bottom: 24px; }
  .topbar > div:first-child { flex: 1 1 150px; }
  .heading, h1.heading { font-size: 29px; line-height: 1.25; }
  .subtitle { max-width: 100%; font-size: 12px; line-height: 1.55; }
  .topbar .toolbar { margin-top: 0; gap: 0; }
  .month-picker { gap: 0; padding: 0; border: 0; background: transparent; }
  .month-picker .icon-btn { width: 44px; height: 44px; border-radius: 7px; }
  .month-picker .icon-btn svg { width: 16px; height: 16px; color: #a1a1a6; }
  .month-picker input { width: 108px; min-height: 44px; padding: 4px 1px; font-size: 12px; }
  .month-label { min-width: 104px; }
  .month-text { font-size: 12px; }
  .month-picker input::-webkit-calendar-picker-indicator { display: none; }
  .finance-tabs { justify-content: flex-start; gap: 28px; margin-bottom: 20px; }
  .finance-tab { min-height: 44px; padding-bottom: 12px; font-size: 14px; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 13px; }
  .metric-card { padding: 17px 16px; border-radius: 15px; }
  .metric-card.hero { grid-column: 1 / -1; padding: 21px; }
  .metric-label { min-height: 21px; font-size: 11px; }
  .metric-label svg { width: 17px; height: 17px; }
  .metric-value { margin-top: 12px; font-size: clamp(23px, 5.6vw, 29px); }
  .hero .metric-value { margin-top: 13px; font-size: 36px; }
  .metric-foot { margin-top: 9px; font-size: 10px; line-height: 1.6; }
  .metric-card > .link-btn { min-height: 44px; font-size: 12px; }
  .stat-icon { width: 23px; height: 23px; }
  .stat-icon svg { width: 13px; height: 13px; }
  .action-grid { gap: 11px; margin-bottom: 26px; }
  .action-grid .button { padding: 12px 9px; min-height: 48px; font-size: 13px; border-radius: 12px; }
  .section-grid, .settings-grid { grid-template-columns: 1fr; gap: 18px; }
  .card { padding: 19px 17px; border-radius: 16px; }
  .card-header { gap: 9px; margin-bottom: 17px; }
  .card-title { font-size: 16px; }
  .card-header .link-btn { min-height: 44px; font-size: 13px; }
  .eyebrow { margin-bottom: 5px; font-size: 9px; }
  .categories { gap: 18px; }
  .category-icon, .transaction-icon { width: 37px; height: 37px; border-radius: 10px; }
  .category-icon svg, .transaction-icon svg { width: 18px; height: 18px; }
  .category-info > span, .category-info > strong { font-size: 13px; }
  .category-value > strong { font-size: 12px; }
  .category-value > span { font-size: 10px; }
  .transaction-row { gap: 10px; min-height: 63px; padding: 13px 0; }
  .transaction-info > strong, .transaction-info .transaction-note { font-size: 14px; }
  .transaction-info .transaction-meta { font-size: 11px; }
  .transaction-amount > strong { font-size: 12px; }
  .transaction-amount > span { font-size: 9px; }
  .transaction-day { font-size: 10px; padding-top: 17px; }
  .empty-state { min-height: 170px; padding-top: 20px; padding-bottom: 20px; }
  .empty-state h3 { font-size: 15px; }
  .empty-state p { font-size: 11px; }
  .empty-icon { width: 45px; height: 45px; border-radius: 13px; }
  .empty-icon svg { width: 23px; height: 23px; }
  .currency-grid { grid-template-columns: 1fr; gap: 8px; }
  .currency-card { padding: 14px; grid-template-columns: 29px minmax(0, 1fr) auto; }
  .currency-card > div > strong { font-size: 13px; }
  .currency-card > div > span { font-size: 10px; }
  .exchange-card { margin-top: 18px; }
  .exchange-footer .text-muted { font-size: 11px; }
  .exchange-footer .link-btn { font-size: 13px; }
  .app-footer { align-items: center; gap: 8px; margin-top: 21px; font-size: 11px; }
  .app-footer .link-btn { font-size: 12px; }
  .filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 9px; margin-bottom: 22px; }
  .filters .search-box, .filters #filter-category { grid-column: 1 / -1; }
  .input, .select, .textarea, .search-box input, .filters .select { font-size: 16px; }
  .input, .select, .textarea { padding: 12px; }
  .filters .select { padding: 11px 9px; }
  .field-label { font-size: 12px; }
  .field-row { gap: 11px; }
  .form-stack { gap: 17px; }
  .helper { font-size: 11px; line-height: 1.7; }
  .backup-buttons { gap: 9px; }
  .backup-buttons .button { padding: 11px 12px; font-size: 13px; }
  .list-footer .text-muted { font-size: 12px; }
  .list-footer .link-btn { font-size: 13px; }
  .budget-number { font-size: 34px; }
  .pending-rate.alert { padding: 13px; gap: 8px; }
  .pending-rate.alert { flex-wrap: wrap; }
  .pending-rate.alert .link-btn { margin-left: auto; font-size: 13px; }
  .demo-bar { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; padding: 5px 13px; font-size: 11px; }
  .demo-bar .link-btn { min-height: 44px; font-size: 11px; }
  .fab { position: fixed; z-index: 40; right: 22px; bottom: calc(24px + var(--safe-bottom)); display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: var(--blue); box-shadow: 0 5px 20px rgb(0 0 0 / 35%); }
  .fab svg { width: 24px; height: 24px; }
  .dialog { position: fixed; inset: auto 0 0; width: 100%; max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px)); margin: 0; padding-top: 11px; padding-bottom: var(--safe-bottom); border: 0; border-radius: 22px 22px 0 0; }
  .dialog::before { content: ""; position: absolute; top: 8px; left: calc(50% - 18px); width: 36px; height: 4px; border-radius: 4px; background: #525257; }
  .dialog-header { padding: 16px 20px 8px; }
  .dialog-header h2 { font-size: 20px; }
  .dialog-body { padding: 10px 20px 23px; }
  .dialog-footer { padding: 16px 20px 20px; }
  .amount-input { font-size: 37px; }
  .amount-wrap { padding: 9px 13px; }
  .type-btn { font-size: 13px; }
  .toast { bottom: calc(24px + var(--safe-bottom)); padding: 12px 16px; font-size: 11px; }
  body:has(.app-shell[data-route="movimientos"]) .toast { bottom: calc(90px + var(--safe-bottom)); }
  .auth-page { align-content: start; padding: 22px 18px calc(24px + var(--safe-bottom)); }
  .auth-card { max-width: 420px; padding: 22px 18px; border-color: transparent; background: #111113; }
  .auth-brand { margin-bottom: 24px; }
  .auth-card h1 { font-size: 26px; }
  .auth-tabs { margin-top: 22px; }
  .auth-form .input { font-size: 16px; }
  .auth-form .button { min-height: 48px; }
  .auth-actions .link-btn { font-size: 13px; }
  .bill-row { gap: 11px; padding-top: 15px; padding-bottom: 15px; }
  .bill-info { gap: 9px; }
  .bill-info strong { font-size: 13px; }
  .bill-action > strong { font-size: 13px; }
  .insight-card { gap: 10px; padding: 16px; }
  .insight-card > .icon-btn { margin-right: -9px; }
  .migration-card .toolbar .button { flex: 1 1 180px; }
}
@media (max-width: 430px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .topbar .toolbar { width: 100%; justify-content: flex-start; }
  .month-picker { width: 100%; justify-content: space-between; padding: 2px 4px; border-radius: 12px; background: #161618; }
  .month-label { flex: 1; min-width: 0; }
  .month-text { font-size: 12px; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .filters .search-box, .filters #filter-category { grid-column: auto; }
  .dialog .field-row { grid-template-columns: minmax(0, 1fr); }
  .dialog-footer:has(.primary) .primary { order: -1; }
  .budget-preview { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .budget-preview .budget-percent { grid-column: 1; grid-row: 2; }
  .budget-preview .budget-track { grid-column: 1; grid-row: 3; }
}
@media (max-width: 380px) {
  .main { padding-right: 15px; padding-left: 15px; }
  .heading, h1.heading { font-size: 27px; }
  .subtitle { max-width: 100%; font-size: 12px; }
  .month-label { min-width: 96px; }
  .month-text { font-size: 12px; }
  .month-picker .icon-btn { width: 44px; }
  .metric-card { padding: 16px 14px; }
  .hero .metric-value { font-size: 33px; }
  .metric-value { font-size: 23px; }
  .card { padding: 18px 15px; }
  .card-title { font-size: 15px; }
  .transaction-row { gap: 9px; }
  .transaction-info > strong, .transaction-info .transaction-note { font-size: 13px; }
  .transaction-amount > strong { font-size: 11px; }
  .category-value > strong { font-size: 11px; }
  .field-row { grid-template-columns: 1fr; }
  .category-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .action-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .dialog-footer { grid-template-columns: minmax(0, 1fr); }
  .auth-page { padding-right: 14px; padding-left: 14px; }
  .auth-card { padding-right: 16px; padding-left: 16px; }
  .auth-tab { font-size: 11px; }
}
.mobile-menu-dialog:not([open]) { display: none; }
.mobile-menu-dialog[open] {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: min(320px, calc(100vw - 44px));
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  padding: env(safe-area-inset-top, 0px) 0 var(--safe-bottom);
  border: 0;
  border-right: 1px solid #29292c;
  border-radius: 0 20px 20px 0;
  color: var(--ink);
  background: #111113;
  box-shadow: 20px 0 70px rgb(0 0 0 / 35%);
  overflow: hidden;
  overscroll-behavior: contain;
}
.mobile-menu-dialog::before { display: none; }
.mobile-menu-dialog::backdrop { background: rgb(0 0 0 / 60%); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 12px; padding: 23px 20px 18px; }
.mobile-menu-header .brand { min-width: 0; min-height: 44px; font-size: 26px; }
.mobile-menu-header .wordmark { min-width: 0; }
.mobile-menu-header .icon-btn { width: 44px; height: 44px; margin-right: -4px; color: #a0a0a5; }
.mobile-menu-content { flex: 1 1 auto; min-height: 0; padding: 10px 16px 18px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.mobile-menu-content nav { display: grid; gap: 6px; }
.mobile-menu-content .nav-item { width: 100%; min-width: 0; min-height: 52px; padding: 13px 15px; font-size: 14px; }
.mobile-menu-content .nav-item > span { min-width: 0; line-height: 1.45; overflow-wrap: anywhere; }
.mobile-menu-content .nav-item.active { background: #28282b; }
.mobile-menu-profile { flex: 0 0 auto; min-width: 0; padding: 16px; border-top: 1px solid #242426; }
.mobile-menu-profile .profile-card { min-width: 0; min-height: 64px; margin: 0; padding: 13px; background: #202023; }
.mobile-menu-profile .profile-card strong { font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.mobile-menu-profile .profile-card small { line-height: 1.45; overflow-wrap: anywhere; }
.mobile-menu-note { flex: 0 0 auto; min-width: 0; padding: 0 20px 20px; }
.mobile-menu-note.sidebar-note { margin: 0; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.mobile-menu-note > svg { display: none; }
.mobile-menu-note > strong { margin-bottom: 3px; font-size: 11px; }
.mobile-menu-note .badge { margin-top: 10px; }
@media (max-height: 520px) and (max-width: 768px) {
  .mobile-menu-header { padding-top: 10px; padding-bottom: 8px; }
  .mobile-menu-profile { padding-top: 9px; padding-bottom: 9px; }
  .mobile-menu-note { display: none; }
}
@media (min-width: 769px) {
  .mobile-menu-dialog[open] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


