:root {
    --bg: #ffffff;
    --shell: #ffffff;
    --sidebar: #ffffff;
    --card: #ffffff;
    --surface: #f6f7f9;
    --text: #1c2434;
    --muted: #8b95a8;
    --faint: #a8b0bf;
    --line: #e6e8ee;
    --blue: #3b82f6;
    --blue-2: #2f6fed;
    --blue-soft: #e7f0ff;
    --green: #15915a;
    --green-2: #22c55e;
    --mint: #e7f8ee;
    --red: #ef5364;
    --rose: #fdecee;
    --purple: #8b5cf6;
    --lilac: #f3eaff;
    --orange: #f0a02a;
    --peach: #fff3df;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    --radius: 18px;
    --sidebar-w: 248px;
}

body.dark {
    color-scheme: dark;
    --bg: #140f0c;
    --shell: #140f0c;
    --sidebar: #1c1511;
    --card: #241c16;
    --surface: #2c221b;
    --text: #f6efe8;
    --muted: #b7a89a;
    --faint: #8d7d70;
    --line: #3d2f26;
    --blue: #e07a2f;
    --blue-2: #f0944a;
    --blue-soft: #3a2618;
    --green: #e0a15a;
    --green-2: #e07a2f;
    --mint: #2a2118;
    --red: #f0a090;
    --rose: #3a221c;
    --purple: #e08a45;
    --lilac: #2e2218;
    --orange: #e07a2f;
    --peach: #3a2818;
    --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    font-family: "Plus Jakarta Sans", Inter, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--shell);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
.icon { width: 20px; height: 20px; flex: none; }

.app {
    width: 100%;
    min-height: 100vh;
    background: var(--shell);
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

.sidebar {
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    padding: 20px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 8px; }
.brand strong { display: block; font-size: 20px; letter-spacing: -0.04em; white-space: nowrap; }
.brand small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.25; max-width: 150px; font-weight: 500; }
.brand-mark { width: 34px; height: 34px; display: flex; align-items: flex-end; gap: 3px; }
.brand-mark i { display: block; width: 7px; border-radius: 3px; background: #60a5fa; }
.brand-mark i:nth-child(1) { height: 12px; }
.brand-mark i:nth-child(2) { height: 18px; background: #3b82f6; }
.brand-mark i:nth-child(3) { height: 26px; background: #2563eb; }
.brand-sm strong { font-size: 18px; }

.nav { display: flex; flex-direction: column; gap: 8px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 12px;
    color: #66758b; font-size: 14.5px; font-weight: 600;
}
body.dark .nav-item { color: var(--muted); }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item.active { background: var(--blue-soft); color: var(--blue-2); font-weight: 650; }
.nav-item:hover { background: #f6f7f9; }
body.dark .nav-item:hover { background: #2a201a; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 0 6px; }
.side-progress-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 650; }
.side-progress small { color: var(--muted); display: block; margin: 2px 0 8px; }
.theme-switch {
    display: flex; background: #eef2f7; border-radius: 999px; padding: 3px; width: fit-content;
}
body.dark .theme-switch { background: #2a201a; }
.theme-switch button {
    width: 34px; height: 28px; border: 0; border-radius: 999px; background: transparent; color: #94a3b8;
    display: grid; place-items: center;
}
.theme-switch button.is-on { background: #fff; color: #334155; box-shadow: 0 1px 3px rgba(15,23,42,.08); }
body.dark .theme-switch button.is-on { background: #e07a2f; color: #1a120c; }
.theme-switch .icon { width: 15px; height: 15px; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.page-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    padding: 36px 48px 0;
}
.page-title h1 { font-size: 30px; letter-spacing: -0.045em; font-weight: 800; line-height: 1.1; }
.sub { color: #8b95a8; margin-top: 6px; font-size: 14px; font-weight: 500; }
.mob-sub { display: none; }
.page-tools { display: flex; align-items: center; gap: 14px; padding-top: 8px; color: #8b95a8; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; box-shadow: 0 0 0 1px #e6edf5; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.content { padding: 32px 48px 64px; display: flex; flex-direction: column; gap: 40px; }
.content > * { min-width: 0; max-width: 100%; }

.mobile-header, .bottom-nav, .mob { display: none; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.kpi { border-radius: 18px; padding: 20px 20px 18px; min-height: 128px; }
.kpi-green { background: #e7f8ee; color: #12824e; }
.kpi-blue { background: #e7f1ff; color: #2b62d9; }
.kpi-red { background: #fdecee; color: #e11d48; }
.kpi-purple { background: #f3e8ff; color: #7c3aed; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 650; }
.kpi-top i {
    width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(255,255,255,.78); color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
body.dark .kpi-top i { background: rgba(15,23,42,.28); }
.kpi-top .icon { width: 16px; height: 16px; }
.kpi strong { display: block; margin: 10px 0 6px; font-size: 30px; letter-spacing: -0.045em; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi p { font-size: 12.5px; color: #7d8aa0; font-weight: 500; }
.kpi .delta.up { color: #15915a; font-weight: 650; }
.kpi-split { display: flex; justify-content: space-between; gap: 8px; }
.kpi-split b { color: var(--purple); }

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 24px 20px;
    box-shadow: none;
}
.panel h2 { font-size: 15.5px; font-weight: 750; letter-spacing: -0.03em; color: #172033; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.link-more { color: var(--blue); font-size: 13px; font-weight: 650; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.link-more .icon { width: 14px; height: 14px; }

.mid-grid { display: grid; grid-template-columns: 1.02fr 1.2fr; gap: 28px; }
.pay-body { display: grid; grid-template-columns: 1fr 210px; gap: 8px 8px; margin-top: 16px; align-items: center; }
.pay-stats { display: flex; flex-direction: column; gap: 14px; }
.stat { display: flex; gap: 10px; align-items: center; }
.stat small, .stat-ico + div small { display: block; color: var(--muted); font-size: 12px; }
.stat strong { font-size: 15px; letter-spacing: -0.02em; }
.stat-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat-ico .icon { width: 16px; height: 16px; }
.stat-ico.blue { background: #e7f0ff; color: #3b82f6; }
.stat-ico.slate { background: #f1f5f9; color: #64748b; }
.stat-ico.green { background: #e7f8ee; color: #16a34a; }
.stat-ico.orange { background: #fff4e5; color: #f59e0b; }
.donut-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut { position: relative; width: 168px; height: 168px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .track { fill: none; stroke: #e7eef6; stroke-width: 16; }
.donut .value { fill: none; stroke: #22c55e; stroke-width: 16; stroke-linecap: round; }
.donut-label {
    position: absolute; inset: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.donut-label strong { font-size: 20px; letter-spacing: -0.04em; color: #172033; }
.donut-label small { color: #8b95a8; font-size: 11px; line-height: 1.3; font-weight: 550; margin-top: 2px; }
.legend { display: flex; justify-content: center; gap: 14px; font-size: 12px; color: #64748b; margin-top: 2px; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.green { background: #22c55e; }
.dot.gray { background: #d5dbe3; }

.cat-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.cat-row { display: grid; grid-template-columns: 32px 112px minmax(80px, 1fr) 38px 84px; gap: 10px; align-items: center; }
.cat-name { font-size: 13.5px; font-weight: 650; color: #243044; }
.cat-pct { font-size: 12.5px; color: #8b95a8; text-align: right; font-weight: 650; }
.cat-val { font-size: 13.5px; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; color: #172033; }
.cat-ico {
    width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--c) 18%, white); color: var(--c);
}
body.dark .cat-ico { background: color-mix(in srgb, var(--c) 22%, #0f172a); }
.cat-ico .icon { width: 15px; height: 15px; }
.bar { height: 10px; background: #eef2f6; border-radius: 99px; overflow: hidden; position: relative; }
body.dark .bar { background: #3d2f26; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--green-2); }
.side-progress .bar > span { background: #22c55e; }
.commit { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.commit .bar > span { background: linear-gradient(90deg, #34d399, #22c55e); }
.commit b { color: var(--text); }

.month-pick { position: relative; }
.month-pick summary {
    list-style: none; cursor: pointer; background: #f4f7fb; border-radius: 999px;
    padding: 6px 10px; font-size: 12px; font-weight: 650; color: #526075; display: inline-flex; align-items: center; gap: 4px;
}
.month-pick summary::-webkit-details-marker { display: none; }
.month-pick .icon { width: 12px; height: 12px; transform: rotate(90deg); }
.month-menu {
    position: absolute; left: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line);
    border-radius: 12px; min-width: 168px; max-width: calc(100vw - 32px); max-height: min(280px, 52vh);
    overflow: auto; z-index: 40; box-shadow: var(--shadow); padding: 6px;
}
.panel-head .month-menu { left: auto; right: 0; }
.month-menu::after { content: ""; display: block; height: 220px; }
.month-menu a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.month-menu a.is-on, .month-menu a:hover { background: var(--blue-soft); color: var(--blue-2); }
.type-pick .month-menu { max-height: none; }
.type-pick .month-menu::after { display: none; }
.type-trigger {
    cursor: pointer; background: #f4f7fb; border: 0; border-radius: 999px;
    padding: 6px 10px; font-size: 12px; font-weight: 650; color: #526075;
    display: inline-flex; align-items: center; gap: 4px;
}
.type-trigger .icon { width: 12px; height: 12px; transform: rotate(90deg); }
.modal-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice-list a {
    display: flex; align-items: center; min-height: 52px; padding: 12px 14px;
    border-radius: 14px; border: 1px solid var(--line); font-weight: 750;
}
.choice-list a.is-on { border-color: #e07a2f; background: #2a2118; color: #f0944a; }

.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.action {
    border: 0; border-radius: 16px; min-height: 54px; font-weight: 750; font-size: 14.5px; letter-spacing: -0.02em;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.action .icon { width: 16px; height: 16px; }
.action-green { background: #dff8e9; color: #15915a; }
.action-red { background: #fde4e8; color: #e11d48; }
.action-blue { background: #e7f1ff; color: #2f6fed; }
.action-orange { background: #fff3df; color: #e09416; }
.action:hover { filter: saturate(1.05) brightness(.98); }

.cards-grid { display: grid; grid-template-columns: 1.05fr 1fr 1fr 1fr; gap: 24px; align-items: stretch; }
.summary-card, .bank {
    border: 1px solid transparent; border-radius: 14px; padding: 14px; background: var(--surface);
    box-shadow: none;
    display: flex; flex-direction: column; min-height: 210px;
}
.mini-pill {
    display: inline-flex; margin-top: 3px; background: #f4f7fb; color: #64748b;
    border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 700;
}
body.dark .summary-card, body.dark .bank { background: #1c1612; border-color: #4a382c; }
.summary-top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.summary-top strong { display: block; font-size: 14px; }
.summary-top small { color: var(--muted); font-size: 12px; }
.kv-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.kv-list div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.kv-list dt { color: var(--muted); }
.kv-list dd { margin: 0; font-weight: 750; }
.danger { color: var(--red); }
.ok { color: var(--green); }
.bank-head { display: flex; gap: 10px; align-items: center; }
.bank-head strong { display: block; font-size: 14px; }
.bank-head small { color: var(--muted); font-size: 12px; }
.limit-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin: 2px 0 4px; }
.limit-line em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.bank-foot { display: flex; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; color: var(--muted); font-size: 12px; }
.bank-edit { margin-top: 12px; align-self: flex-start; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 750; text-align: center; }
.cal-day {
    min-height: 58px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    color: var(--text); font-size: 14px;
}
.cal-day b { font-weight: 750; }
.cal-dots { display: flex; gap: 3px; align-items: center; min-height: 7px; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, #e07a2f); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
    display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
    border-radius: 999px; padding: 7px 10px; background: var(--surface); color: var(--text);
    font-size: 12.5px; font-weight: 750;
}
.cat-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #e07a2f); flex: none; }
.cat-chip b { color: var(--muted); font-weight: 650; }
.cat-chip.is-on { background: var(--blue-soft); border-color: transparent; color: var(--blue-2); }
.cal-day.has-spent { background: #fff3df; border-color: #e7b15a; }
.cal-day.is-on { box-shadow: inset 0 0 0 2px #e07a2f; }
.cal-pad { min-height: 58px; }
body.dark .cal-day.has-spent { background: #3a2618; border-color: #e07a2f; }
.bank-foot b { color: var(--text); font-weight: 650; }
img.logo-mark {
    width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex: none; display: block;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .08); background: #fff;
}
img.logo-sicredi { object-fit: contain; padding: 3px; border-radius: 50%; }
span.logo-mark {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    color: #fff; font-weight: 800; flex: none; background: #64748b;
}

.bottom-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 28px; }
.rows { display: flex; flex-direction: column; }
.row, .bill-row {
    display: grid; grid-template-columns: 48px 1fr auto auto; gap: 10px; align-items: center;
    padding: 11px 0; border-top: 1px solid #f1f5f9; font-size: 13px;
}
.row time, .bill-row time { color: var(--muted); font-variant-numeric: tabular-nums; }
.row-main strong, .bill-row strong, .goal strong { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.paid-flag {
    display: inline-flex; align-items: center; gap: 3px; flex: none;
    background: #e7f8ee; color: #15804a; border-radius: 999px;
    padding: 2px 7px; font-size: 11px; font-weight: 750;
}
.paid-flag .icon { width: 12px; height: 12px; }
body.dark .paid-flag { background: #163526; color: #4ade80; }
.mini-btn.ok { color: #e07a2f; border-color: #c45c12; }
.row-main small, .bill-row small, .goal small { color: var(--muted); font-size: 12px; }
.row b, .bill-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill {
    background: color-mix(in srgb, var(--c) 16%, white); color: var(--c);
    border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700;
}
body.dark .pill { background: color-mix(in srgb, var(--c) 25%, #0f172a); }
.bill-table { margin-top: 4px; }
.bill-head, .bill-row { grid-template-columns: 78px 1fr auto auto; }
.bill-head { display: grid; color: var(--faint); font-size: 11px; padding-bottom: 4px; }
.bill-row { border-top: 1px solid var(--line); padding: 10px 0; }
.status { font-size: 11px; font-weight: 750; border-radius: 999px; padding: 3px 8px; }
.status.ok { background: #e7f8ee; color: #15804a; }
.status.wait { background: #fff1f2; color: #e11d48; }
.goal-list { display: flex; flex-direction: column; gap: 14px; }
.goal-top { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.goal-top b { color: var(--muted); font-size: 13px; }

.page-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: none; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin-top: 6px; font-size: 22px; letter-spacing: -0.03em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips a, .filter-btn {
    border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 650; color: #526075;
}
.chips a.is-on { background: var(--blue-soft); color: var(--blue-2); border-color: transparent; }
.list-panel .row { grid-template-columns: 52px 1fr auto auto auto; }
.row-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.row-actions form { margin: 0; }
.mini-btn {
    border: 1px solid var(--line); background: var(--surface); color: var(--text);
    border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700;
}
.mini-btn.danger { color: var(--red); }
.icon-btn { border: 0; background: transparent; color: var(--faint); padding: 4px; }
.icon-btn .icon { width: 16px; height: 16px; }
.pager { display: flex; justify-content: flex-end; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.pager a { color: var(--blue); font-weight: 700; }
.empty { color: var(--muted); padding: 18px 0; font-size: 14px; }

.account-grid, .goal-grid, .install-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.account-card, .install-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
}
.account-card header, .install-card header { display: flex; justify-content: space-between; align-items: center; }
.swatch { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.account-card strong, .install-card .amount { font-size: 24px; letter-spacing: -0.03em; display: block; margin: 10px 0 4px; }

.btn, .status-btn {
    border: 0; border-radius: 12px; padding: 10px 14px; font-weight: 700; background: var(--blue); color: #fff;
}
.btn-ghost, .status-btn { background: #f3f6fb; color: var(--text); }
.status-btn { padding: 6px 10px; font-size: 12px; }
.btn-primary { background: var(--blue-2); color: #fff; }
.search { display: flex; gap: 8px; }
.search input, .search select, .modal input, .modal select, .settings-form input, .settings-form select, .aporte input, .aporte select {
    width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; outline: none;
}
body.dark .search input, body.dark .search select, body.dark .modal input, body.dark .modal select, body.dark .settings-form input, body.dark .settings-form select, body.dark .aporte input, body.dark .aporte select {
    background: #1a1410;
    color: var(--text);
}
.search select { width: auto; flex: none; }
.modal label, .settings-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 650; color: #526075; }
.modal label[hidden] { display: none; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
dialog:not([open]) { display: none; }
.modal, .sheet {
    border: 0; border-radius: 20px; padding: 0; width: min(460px, calc(100% - 24px)); background: var(--card); color: var(--text); box-shadow: 0 24px 80px rgba(15,23,42,.2);
}
.modal form, .sheet[open] { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.modal header, .sheet header { display: flex; justify-content: space-between; align-items: center; }
.modal header button, .sheet header button { border: 0; background: #f3f6fb; width: 32px; height: 32px; border-radius: 10px; font-size: 20px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal::backdrop, .sheet::backdrop { background: rgba(15, 23, 42, .35); }
.form-error { background: var(--rose); color: var(--red); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.toast {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    background: #122033; color: #fff; padding: 10px 14px; border-radius: 12px; z-index: 50; font-size: 14px;
}
.settings-form { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.aporte { display: flex; gap: 8px; margin-top: 10px; }
.aporte input { max-width: 140px; }

.report-bars { display: flex; flex-direction: column; gap: 12px; }
.report-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.report-row.rich { grid-template-columns: minmax(108px, 160px) 1fr auto auto; }
.report-row em { font-style: normal; color: var(--muted); font-size: 12px; min-width: 1.5rem; text-align: right; }
.report-label { margin: 16px 0 8px; font-size: 13px; font-weight: 750; color: var(--muted); }
.spend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.spend-grid .report-bars { margin-top: 14px; }
.report-row.is-on span { color: var(--blue-2); font-weight: 750; }
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.more-grid a {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
    display: flex; align-items: center; gap: 12px; font-weight: 700; min-height: 56px;
}
.more-grid .icon { width: 22px; height: 22px; color: var(--blue-2); }

.qa { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.qa .icon { width: 18px; height: 18px; }
.qa-green { background: #22c55e; }
.qa-red { background: #f43f5e; }
.qa-blue { background: #3b82f6; }
.qa-orange { background: #f59e0b; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-grid button { border: 1px solid var(--line); background: transparent; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-weight: 700; }

@media (max-width: 1180px) {
    .cards-grid { grid-template-columns: 1fr 1fr; }
    .bottom-grid, .mid-grid { grid-template-columns: 1fr; }
    .cat-row { grid-template-columns: 28px 100px 1fr 36px 72px; }
}

@media (max-width: 860px) {
    body { background: var(--shell); }
    .app { width: 100%; margin: 0; min-height: 100vh; border-radius: 0; display: block; box-shadow: none; overflow: visible; }
    .sidebar { position: static; height: auto; border-radius: 0; }
    .main { border-radius: 0; }
    .sidebar, .page-tools, .desk, .desk-sub { display: none; }
    .mob-sub, .mob, .mobile-header { display: block; }
    .mob { display: flex; flex-direction: column; gap: 12px; }
    .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0; }
    .mobile-tools { display: flex; align-items: center; gap: 10px; }
    .page-head { padding: 18px 16px 0; }
    .page-title h1 { font-size: 26px; }
    .content { display: flex; flex-direction: column; gap: 18px; width: 100%; padding: 18px 16px 120px; }
    .panel, .mob, .kpi { max-width: 100%; min-width: 0; }
    .card-scroller { width: 100%; max-width: 100%; min-width: 0; contain: inline-size; }
    .qa-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .bottom-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 72px;
        background: var(--card); border-top: 1px solid var(--line); z-index: 30;
        justify-content: space-around; align-items: flex-end; padding: 8px 6px 10px;
    }
    .tab { background: none; border: 0; color: #94a3b8; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 0; }
    .tab .icon { width: 20px; height: 20px; }
    .tab.active { color: var(--blue); font-weight: 700; }
    .fab {
        width: 58px; height: 58px; border-radius: 50%; border: 4px solid var(--card); background: var(--blue); color: #fff;
        display: grid; place-items: center; margin-top: -32px; box-shadow: 0 8px 18px rgba(59,130,246,.35);
    }
    .fab .icon { width: 26px; height: 26px; }
    .bell { position: relative; }
    .bell summary { list-style: none; width: 36px; height: 36px; display: grid; place-items: center; color: #526075; }
    .bell summary::-webkit-details-marker { display: none; }
    .bell-menu {
        position: absolute; right: 0; top: 40px; width: 230px; background: var(--card); border: 1px solid var(--line);
        border-radius: 14px; padding: 8px; box-shadow: var(--shadow); z-index: 20;
    }
    .bell-menu a { display: flex; justify-content: space-between; gap: 8px; padding: 8px; font-size: 13px; }
    .bell-title { font-size: 12px; font-weight: 700; padding: 4px 8px 8px; }
    .kpi-hero strong { font-size: 34px; }
    .mob-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .mob-stats .kpi { min-height: 86px; }
    .mob-stats .kpi strong { font-size: 20px; }
    .mob-pay { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px; margin-top: 12px; }
    .mob-pay strong { font-size: 18px; letter-spacing: -0.03em; }
    .mob-pay span { font-size: 12px; white-space: nowrap; color: var(--muted); }
    .mob-spent, .mob-week { margin: 8px 0 4px; color: var(--muted); font-size: 13px; }
    .mob-week b { color: var(--text); }
    .card-scroller { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; width: 100%; max-width: 100%; min-width: 0; contain: inline-size; }
    .bank.is-compact { flex: 0 0 158px; width: 158px; }
    .bank-figure { font-size: 20px; font-weight: 800; margin: 10px 0 0; letter-spacing: -0.03em; }
    .bank-of, .bank-pct { color: var(--muted); font-size: 12px; font-style: normal; }
    .bank.is-compact .bar { margin: 8px 0; }
    .qa-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
    .qa-grid button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; }
    .list-panel .row { grid-template-columns: 46px 1fr auto; padding: 14px 0; }
    .list-panel .pill, .list-panel .icon-btn { display: none; }
    .list-panel .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .stat-card { padding: 12px 10px; }
    .stat-card strong { font-size: 16px; margin-top: 4px; }
    .page-bar { align-items: center; }
    .account-grid, .goal-grid, .install-grid, .more-grid { grid-template-columns: 1fr; gap: 12px; }
    .actions { grid-template-columns: 1fr 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
    .spend-grid { grid-template-columns: 1fr; gap: 16px; }
    .cal-day, .cal-pad { min-height: 46px; }
}

a.payables {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: inherit;
}
.pay-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; font-weight: 550; }
.pay-side { display: inline-flex; align-items: center; gap: 8px; }
.pay-side strong { font-size: 18px; letter-spacing: -0.03em; color: var(--orange); }
.payables .chev { width: 18px; height: 18px; color: var(--muted); }

body.dark .panel h2,
body.dark .cat-name,
body.dark .cat-val,
body.dark .donut-label strong,
body.dark .page-title h1 { color: var(--text); }
body.dark .sub,
body.dark .page-tools,
body.dark .kpi p,
body.dark .donut-label small { color: var(--muted); }
body.dark .kpi-green { background: #2a2118; color: #f0b27a; }
body.dark .kpi-blue { background: #2c2218; color: #f0a05a; }
body.dark .kpi-red { background: #321c18; color: #f0a090; }
body.dark .kpi-purple { background: #2a1e16; color: #e8a060; }
body.dark .kpi .delta.up { color: #f0b27a; }
body.dark .kpi-split b { color: #f0944a; }
body.dark .action-green { background: #2a2118; color: #f0b27a; }
body.dark .action-red { background: #321c18; color: #f0a090; }
body.dark .action-blue { background: #3a2818; color: #f0944a; }
body.dark .action-orange { background: #3a2814; color: #f0a04a; }
body.dark .nav-item.active { background: #3a2618; color: #f0944a; }
body.dark .brand-mark i,
body.dark .brand-mark i:nth-child(1) { background: #c45c12; }
body.dark .brand-mark i:nth-child(2) { background: #e07a2f; }
body.dark .brand-mark i:nth-child(3) { background: #f0944a; }
body.dark .donut .track { stroke: #3d2f26; }
body.dark .donut .value { stroke: #e07a2f; }
body.dark .dot.green { background: #e07a2f; }
body.dark .side-progress .bar > span,
body.dark .commit .bar > span { background: #e07a2f; }
body.dark .link-more,
body.dark .more-grid .icon,
body.dark .tab.active,
body.dark .pager a { color: #f0944a; }
body.dark .btn,
body.dark .btn-primary,
body.dark .fab,
body.dark .qa-blue { background: #c45c12; color: #fff; }
body.dark .fab { border-color: var(--card); box-shadow: 0 8px 18px rgba(196, 92, 18, .35); }
body.dark .stat-ico.blue { background: #3a2818; color: #f0944a; }
body.dark .stat-ico.green { background: #2a2118; color: #f0b27a; }
body.dark .stat-ico.slate { background: #2c221b; color: #b7a89a; }
body.dark .stat-ico.orange { background: #3a2814; color: #f0a04a; }
body.dark .month-pick summary,
body.dark .type-trigger,
body.dark .mini-pill,
body.dark .btn-ghost,
body.dark .status-btn { background: #2c221b; color: var(--text); }
body.dark .status.ok { background: #2a2118; color: #f0b27a; }
body.dark .status.wait { background: #3a221c; color: #f0a090; }
body.dark .avatar { border-color: #241c16; box-shadow: 0 0 0 1px #3d2f26; }
body.dark .modal header button,
body.dark .sheet header button { background: #2c221b; color: var(--text); }

button.nav-item {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
}
.more-grid form { display: contents; }
.more-grid button {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    min-height: 56px;
    text-align: left;
    color: var(--text);
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background: #140f0c;
}
.login-card {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #241c16;
    border: 1px solid #3d2f26;
    border-radius: 20px;
    padding: 28px 24px;
}
.login-card h1 { font-size: 28px; letter-spacing: -0.04em; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 650; color: #b7a89a; }
.login-card input[type="email"],
.login-card input[type="password"] {
    width: 100%;
    border: 1px solid #3d2f26;
    background: #1a1410;
    color: #f6efe8;
    border-radius: 12px;
    padding: 12px;
    outline: none;
}
.login-card .remember { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.login-card .btn { min-height: 48px; background: #c45c12; color: #fff; }

@media (min-width: 861px) {
    .desk { display: flex; flex-direction: column; gap: 48px; }
    .content { gap: 48px; padding: 40px 56px 80px; }
    .kpi-grid { gap: 36px; }
    .mid-grid { gap: 40px; }
    .actions { gap: 32px; }
    .cards-grid { gap: 32px; }
    .bottom-grid { gap: 40px; }
    .stats-row { gap: 28px; }
    .account-grid, .goal-grid, .install-grid { gap: 32px; }
    .spend-grid { gap: 40px; }
}
