:root{--accent: #2563eb;--accent-soft: #dbeafe;--bg: #f6f7f9;--blue: #2563eb;--border: #d9dee7;--field: #f1f4f8;--focus: #93c5fd;--green: #2f855a;--muted: #687385;--red: #c05621;--shadow: 0 18px 50px rgba(28, 40, 56, .12);--soft-shadow: 0 8px 20px rgba(28, 40, 56, .08);--surface: #ffffff;--text: #273142;--text-strong: #101820;color:var(--text);background:var(--bg);font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;line-height:1.45;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;min-width:320px}h1,h2,h3,p{letter-spacing:0}h1{color:var(--text-strong);font-size:28px;font-weight:850;line-height:1.12}h2{color:var(--text-strong);font-size:18px;font-weight:850;line-height:1.2}@media(prefers-color-scheme:dark){:root{--accent: #60a5fa;--accent-soft: #193552;--bg: #101820;--border: #2a3543;--field: #172231;--focus: #60a5fa;--muted: #9aa7b7;--shadow: 0 18px 50px rgba(0, 0, 0, .3);--soft-shadow: 0 8px 20px rgba(0, 0, 0, .22);--surface: #121d2a;--text: #e5edf6;--text-strong: #f8fbff}}.auth-shell,.app-shell{min-height:100svh}.auth-shell{align-items:center;display:flex;justify-content:center;padding:24px}.auth-panel{background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow);max-width:420px;padding:28px;width:100%}.auth-icon{align-items:center;background:var(--accent-soft);border-radius:8px;color:var(--accent);display:inline-flex;height:48px;justify-content:center;margin-bottom:18px;width:48px}.auth-panel h1,.topbar h1{margin:0}.auth-panel p{color:var(--muted);margin:10px 0 0}.auth-form,.entry-form{display:grid;gap:16px;margin-top:24px}label{color:var(--muted);display:grid;font-size:13px;font-weight:700;gap:7px}input,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--field);border:1px solid var(--border);border-radius:8px;color:var(--text);font:inherit;min-height:46px;padding:0 12px;width:100%}input:focus,select:focus,button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}button{font:inherit}.primary-button,.small-button,.ghost-button,.icon-button,.bottom-nav button,.toast,.settings-list button,.transaction-main,.delete-button{align-items:center;border:0;cursor:pointer;display:inline-flex;justify-content:center}.primary-button{background:var(--accent);border-radius:8px;color:#fff;font-weight:800;min-height:50px;padding:0 18px;width:100%}.primary-button:disabled{cursor:not-allowed;opacity:.6}.small-button,.ghost-button{border-radius:8px;font-size:14px;font-weight:800;gap:7px;min-height:38px;padding:0 12px}.small-button{background:var(--accent);color:#fff}.ghost-button{background:var(--field);color:var(--text)}.wide{width:100%}.hidden-file-input{display:none}.icon-button{background:var(--field);border-radius:8px;color:var(--text);height:42px;width:42px}.app-shell{display:grid;grid-template-rows:auto auto 1fr auto;margin:0 auto;max-width:960px;padding-bottom:calc(76px + env(safe-area-inset-bottom))}.topbar{align-items:center;display:flex;justify-content:space-between;padding:22px 18px 12px}.eyebrow{color:var(--muted);display:block;font-size:12px;font-weight:800;letter-spacing:0;margin-bottom:4px}.month-strip{align-items:end;border-bottom:1px solid var(--border);display:flex;gap:12px;justify-content:space-between;padding:0 18px 14px}.month-strip label{min-width:150px}.month-strip input{min-height:40px}.month-strip span{color:var(--muted);font-size:12px;text-align:right}.screen{display:grid;gap:18px;padding:18px}.summary-grid{display:grid;gap:10px;grid-template-columns:repeat(3,minmax(0,1fr))}.metric,.chart-panel,.security-note,.integration-panel{background:var(--surface);border:1px solid var(--border);border-radius:8px}.metric{display:grid;gap:9px;min-height:96px;padding:14px}.metric span{color:var(--muted);font-size:13px;font-weight:800}.metric strong{color:var(--text-strong);font-size:18px;line-height:1.15;overflow-wrap:anywhere}.income{border-top:4px solid var(--green)}.expense{border-top:4px solid var(--red)}.balance{border-top:4px solid var(--blue)}.section-head{align-items:center;display:flex;justify-content:space-between}.section-head h2{margin:0}.chart-panel{min-height:232px;overflow:hidden;padding:12px}.chart-panel.tall{min-height:292px}.empty-state{align-items:center;color:var(--muted);display:flex;justify-content:center;min-height:120px;text-align:center}.list,.category-list,.settings-list{display:grid;gap:10px}.transaction-row{align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:8px;display:grid;gap:10px;grid-template-columns:minmax(0,1fr) auto 38px;min-height:72px;padding:10px}.transaction-main{background:transparent;color:inherit;gap:11px;justify-content:flex-start;min-width:0;padding:0;text-align:left}.transaction-main span:last-child{display:grid;gap:3px;min-width:0}.transaction-main strong,.transaction-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.transaction-main small{color:var(--muted);font-size:12px}.category-dot{align-items:center;border-radius:8px;color:#fff;display:inline-flex;flex:0 0 auto;height:40px;justify-content:center;width:40px}.money-out,.money-in{font-size:14px;white-space:nowrap}.money-out{color:var(--red)}.money-in{color:var(--green)}.delete-button{background:var(--field);border-radius:8px;color:var(--muted);height:38px;width:38px}.entry-form{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:16px}.segmented{background:var(--field);border-radius:8px;display:grid;grid-template-columns:repeat(2,1fr);padding:4px}.segmented button{background:transparent;border:0;border-radius:6px;color:var(--muted);cursor:pointer;font-weight:800;min-height:42px}.segmented .active{background:var(--surface);box-shadow:var(--soft-shadow);color:var(--text-strong)}.amount-field input{font-size:34px;font-weight:800;height:68px}.title-field{display:grid;gap:6px}.title-field input{font-size:17px;font-weight:700}.title-field small{color:var(--muted);font-size:12px}.form-grid{display:grid;gap:14px;grid-template-columns:repeat(2,minmax(0,1fr))}.check-row{align-items:center;background:var(--field);border:1px solid var(--border);border-radius:8px;color:var(--text);display:flex;gap:12px;padding:12px}.check-row.is-enabled{background:color-mix(in srgb,var(--accent) 10%,var(--field));border-color:color-mix(in srgb,var(--accent) 48%,var(--border))}.check-option{cursor:pointer}.check-option input{opacity:0;position:absolute}.check-option .checkmark{align-items:center;background:var(--surface);border:2px solid var(--border);border-radius:6px;color:#fff;display:flex;flex:0 0 auto;height:24px;justify-content:center;width:24px}.check-option.is-enabled .checkmark{background:var(--accent);border-color:var(--accent)}.check-option input:focus-visible+.checkmark{outline:3px solid color-mix(in srgb,var(--accent) 38%,transparent);outline-offset:2px}.check-option input:disabled+.checkmark{opacity:.65}.check-option:has(input:disabled){cursor:default}.repeat-enabled-label{color:var(--accent)!important;font-weight:800!important}.check-row input{accent-color:var(--accent);flex:0 0 auto;height:22px;min-height:22px;padding:0;width:22px}.check-row span{display:grid;gap:2px}.check-row small{color:var(--muted);font-size:12px;font-weight:600}.auto-backup-status{align-items:center;display:inline-flex;gap:4px}.check-row.is-enabled .auto-backup-status{color:var(--accent)}.check-row.is-disabled .auto-backup-status{color:var(--muted)}.category-line{align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:8px;display:grid;gap:10px;grid-template-columns:12px 1fr auto;min-height:50px;padding:10px 12px}.recurring-panel{display:grid;gap:10px}.recurring-row{align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:8px;display:grid;gap:10px;grid-template-columns:40px minmax(0,1fr) auto auto;min-height:64px;padding:10px}.recurring-row span:nth-child(2){display:grid;gap:3px;min-width:0}.recurring-row strong,.recurring-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.recurring-row small{color:var(--muted);font-size:12px}.compact{min-height:72px}.category-line span{border-radius:999px;height:12px;width:12px}.category-line p{margin:0}.settings-list button{background:var(--surface);border:1px solid var(--border);border-radius:8px;color:var(--text);gap:12px;justify-content:flex-start;min-height:56px;padding:0 14px;text-align:left}.settings-list .danger{color:var(--red)}.integration-panel{display:grid;gap:16px;padding:16px}.integration-heading{align-items:flex-start;display:flex;gap:12px}.integration-heading h3,.integration-heading p{margin:0}.integration-heading p,.google-signin-area p,.integration-notice{color:var(--muted);font-size:13px;line-height:1.6}.integration-icon,.account-avatar{align-items:center;background:var(--accent-soft);border-radius:8px;color:var(--accent);display:inline-flex;flex:0 0 auto;height:40px;justify-content:center;width:40px}.integration-notice{background:var(--field);border:1px solid var(--border);border-radius:8px;margin:0;padding:12px}.drive-reconnect-banner{align-items:center;background:var(--accent-soft);border:1px solid var(--accent);border-radius:12px;display:flex;gap:16px;justify-content:space-between;margin:0 0 16px;padding:14px 16px}.drive-reconnect-banner strong,.drive-reconnect-banner p{margin:0}.drive-reconnect-banner p{color:var(--muted);font-size:13px;line-height:1.5;margin-top:4px}.drive-reconnect-banner .primary-button{flex:0 0 auto}.account-card{align-items:center;background:var(--field);border:1px solid var(--border);border-radius:8px;display:grid;gap:12px;grid-template-columns:42px minmax(0,1fr) auto;padding:12px}.account-avatar{border-radius:999px;font-weight:900;height:42px;width:42px}.account-card span:nth-child(2){display:grid;gap:3px;min-width:0}.account-card strong,.account-card small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-card small{color:var(--muted)}.google-signin-area{display:grid;gap:10px}.google-signin-area p{margin:0}.google-button{min-height:44px}.backup-status{border:1px solid var(--border);border-radius:8px;display:grid;margin:0}.backup-status div{align-items:center;display:flex;gap:16px;justify-content:space-between;min-height:44px;padding:8px 12px}.backup-status div+div{border-top:1px solid var(--border)}.backup-status dt{color:var(--muted);font-size:13px;font-weight:700}.backup-status dd{font-size:13px;font-weight:800;margin:0;text-align:right}.drive-actions{display:grid;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}.drive-actions .primary-button,.drive-actions .text-danger-button{grid-column:1 / -1}.drive-actions button{gap:8px}.text-danger-button{align-items:center;background:transparent;border:0;color:var(--red);cursor:pointer;display:inline-flex;font-size:13px;font-weight:800;gap:7px;justify-self:start;padding:4px 0}.text-danger-button:disabled,.drive-actions button:disabled{cursor:not-allowed;opacity:.55}.security-note{align-items:start;color:var(--muted);display:flex;gap:10px;padding:14px}.security-note p{margin:0}.toast{background:var(--text-strong);border-radius:8px;color:var(--surface);font-size:13px;font-weight:800;left:18px;min-height:42px;padding:0 14px;position:fixed;right:18px;top:12px;z-index:20}.alert{background:#fff5f5;border:1px solid #fed7d7;border-radius:8px;color:#9b2c2c;margin:0;padding:10px 12px}.bottom-nav{background:#fffffff5;border-top:1px solid var(--border);bottom:0;display:grid;grid-template-columns:repeat(5,1fr);left:0;margin:0 auto;max-width:960px;padding:8px 8px calc(8px + env(safe-area-inset-bottom));position:fixed;right:0;z-index:10}.bottom-nav button{background:transparent;border-radius:8px;color:var(--muted);flex-direction:column;font-size:11px;font-weight:800;gap:3px;min-height:56px}.bottom-nav .active{background:var(--accent-soft);color:var(--accent)}@media(max-width:680px){.summary-grid,.form-grid{grid-template-columns:1fr}.metric{min-height:82px}.transaction-row{grid-template-columns:minmax(0,1fr) auto}.delete-button{grid-column:2}.recurring-row{grid-template-columns:40px minmax(0,1fr) auto}.account-card,.drive-actions{grid-template-columns:1fr}.drive-reconnect-banner{align-items:stretch;flex-direction:column}.account-avatar{display:none}.account-card .ghost-button,.drive-actions .primary-button,.drive-actions .text-danger-button{grid-column:auto}.recurring-row .ghost-button{grid-column:2 / 4;justify-self:stretch}}@media(prefers-color-scheme:dark){.bottom-nav{background:#101820f5}.alert{background:#2d1f21;border-color:#744248;color:#feb2b2}}
