/* FoFfo × 小四爷 — personal night ledger, shared across every page. */
:root{color-scheme:dark;--blue:#65e6df;--muted:#9aaac4;--border:#ffffff14;color:#edf3ff;background:#080d19}
body{background:radial-gradient(ellipse at 85% 0,#42267838,transparent 52%),radial-gradient(ellipse at 5% 45%,#07776c17,transparent 45%),#080d19;color:#edf3ff;min-height:100dvh}
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;background-image:linear-gradient(#ffffff02 1px,transparent 1px),linear-gradient(90deg,#ffffff02 1px,transparent 1px);background-size:48px 48px}
.sidebar{background:#0b1224e8;backdrop-filter:blur(20px);border-color:var(--border)}
.brandmark,.mark{background:linear-gradient(145deg,#72f0d1,#7078fb);color:#081727;box-shadow:0 0 28px #66e5d421}.brand small{letter-spacing:2px;color:#92a9c8}.brand{font-size:20px}.nav-label,.sidebar-foot{color:#8292ad}
.nav{color:#8c9db8}.nav.active{background:linear-gradient(95deg,#60e5d91b,#8d77ff13);color:#79eee2;box-shadow:inset 2px 0 #72e8df}.nav:hover{color:#efffff}
.eyebrow{color:#78dacc;letter-spacing:1.6px;font-size:11px;text-transform:uppercase}.header-actions{gap:16px}h1{letter-spacing:-.5px}h2,h3{color:#edf3ff}
.panel,.metric{background:linear-gradient(135deg,#151f35ed,#10182beb);border:1px solid var(--border);box-shadow:0 12px 36px #00000014;border-radius:20px}
.summary article{border-radius:20px}.summary .balance{background:linear-gradient(120deg,#143e53,#343376 72%,#543479);border:1px solid #80c7ff42;box-shadow:0 12px 35px #6040ba18}.balance::after{content:"";position:absolute;width:165px;height:165px;right:-30px;top:-65px;border:1px solid #c8aaff2b;border-radius:50%;box-shadow:0 0 0 24px #b99bff08,0 0 0 48px #b99bff05;pointer-events:none}.balance .card-label,.balance p{color:#c7d7ef}.summary strong{font-weight:700;letter-spacing:-1.4px}.metric:last-child strong,.positive{color:#74e6c7}.metric:nth-child(2) strong{color:#f1deff}.card-label{color:#b5c3db}
.primary{background:linear-gradient(115deg,#73ebd4,#80cfe8);color:#081b28;box-shadow:0 5px 22px #70ead41a;border:1px solid #a2ffe233}.primary:hover{background:linear-gradient(115deg,#9bffe6,#a3dffa);box-shadow:0 5px 28px #70ead433}.text-button{color:#8ae9df}.secondary,.manage-row button{background:#23314b;color:#d5e5ff;border:1px solid #52678355}.danger{background:#823d53;color:#ffe1e8}
input,select,input[type=month]{background:#0d1628;color:#e7f1ff;border-color:#34445f}input::placeholder{color:#8190aa}input:focus,select:focus{outline:2px solid #6ce8d3;outline-offset:2px}button:focus-visible,a:focus-visible{outline:2px solid #9cf5e7}.category-filter-label,.search-controls label,#custom-dates label,.month-label,#range-caption,.period-caption{color:#9aacc6}
.range-buttons,.filters,.type-switch{background:#0b1325;border-color:#2a3850}.range-buttons button,.filters button{color:#9caccc}.range-buttons button.selected,.filters .selected,.quick-buttons button.selected,.type-switch input:checked+span{background:#66ded1;color:#102331;box-shadow:none}.quick-buttons button,#category-chips button{background:#202b43;color:#b0c0dc}#category-chips .selected{background:#2a3f50;color:#89f4de;border-color:#69e2cf}.type-switch span{color:#9baecc}
#sync-banner{background:#122c304d;border:1px solid #62dfc31f;padding:12px 16px;border-radius:12px;margin:0 0 24px;color:#91dacb;flex-wrap:wrap;gap:8px}#sync-banner.error{background:#35263780;color:#ffc593;border-color:#db9d5533}#sync-text::before{content:"●";font-size:9px;margin-right:8px}#offline-readiness{font-size:11px;color:#90a5bc;margin:0 0 18px}#reauth{font-size:12px;color:#ffd7a9}.pending-badge{display:inline-block;font-size:10px;padding:3px 6px;margin-left:8px;background:#fbb56a18;color:#ffcf93;border-radius:5px}
#siye-today{background:radial-gradient(ellipse at 100% 0,#744ca529,transparent 65%),linear-gradient(125deg,#152135,#11192b);border-color:#8e74e334}#siye-today .tag{background:#a684ff18;color:#c2aaff}.siye-main{background:linear-gradient(125deg,#263c64,#3d3379);border:1px solid #9b89fa38}.siye-other{background:#152b37;color:#c0e9e6;border:1px solid #73d7c921}.siye-main strong{color:#e4d9ff}.siye-other strong{color:#84e7d6}.siye-grid span{color:#b3bfd6}.siye-grid p{color:#b3bfd6}.siye-track,.progress{background:#27334b}.siye-track>div,.progress>div{background:linear-gradient(90deg,#61dbcd,#9a87ff)}
#insight-teaser,.helper{background:linear-gradient(115deg,#163132ab,#202840b3);border-color:#65dacc29}.tag,#insight-teaser .tag{background:#68e8cb15;color:#80e6d2}.analysis-card{background:#0e182b;border:1px solid #829bdd1a}.analysis-card span,.analysis-card small{color:#9faec6}.analysis-card strong{color:#c1b6ff}#analysis-text p{border-color:#766bc0}.trend-bar{background:linear-gradient(#86efe0,#7364d4)}.trend-bars{border-color:#30415c}
.budget-note,.date-label{background:#0b1528;color:#9cabc5}.budget-alert{background:#392f20;color:#ffda9d;border-color:#d6a5504d}.budget-alert.over,.budget-alert.full{background:#3b2430;color:#ffb4c9;border-color:#da74974d}.bill,.manage-row,.trash-row,.account-row,.comparison-table th,.comparison-table td{border-color:#ffffff10}.bill-tools button{color:#9aaccc}.bill-tools button:hover,.category-drill:hover{background:#738af41a;color:#92eade}.empty-copy,.trash-row p,.account-row p{color:#9babc5}
dialog{background:linear-gradient(135deg,#1a2440,#101a2d);color:#edf3ff;border:1px solid #7d92c447;box-shadow:0 25px 100px #0009}dialog::backdrop{background:#030715aa;backdrop-filter:blur(8px)}.amount-input{border-color:#344760}.amount-input input{background:transparent;color:#87edda}.close{color:#aec3de}.form-error,#error,#message,#status{color:#ffbe9f}#toast{background:#d0fff1;color:#14352f;border:1px solid #93f1d6;box-shadow:0 5px 25px #0008}.muted,.subtitle,.note{color:#9aabc5}footer{color:#8596b2}#invite-result{background:#1d2c47}
body:not(:has(.sidebar)) main{position:relative}body:has(#login-form) main,body:has(.mark) main{background:linear-gradient(145deg,#1b2843,#101a2c);border-color:#7a96d133;box-shadow:0 20px 100px #0005}body:has(.mark) button{background:linear-gradient(115deg,#78ead7,#93c7fa);color:#102438}body:has(.mark) .eyebrow{color:#8ce5d4}
@media(min-width:851px){.summary .balance{padding:30px}.summary strong{margin-top:26px}}
@media(max-width:600px){body[data-view] header{display:block;margin-bottom:20px}.header-actions{margin-top:18px;display:flex;flex-direction:row;align-items:center;gap:14px}.header-actions a,.header-actions #logout{font-size:12px;padding:0}.header-actions #add{margin-left:auto;padding:11px 14px}.sidebar{background:#0d172aef;border-color:#80e1d526}.nav.active{box-shadow:none;background:#6ee5d00c;border-radius:12px}.summary .balance{padding:24px}.panel{border-radius:17px}#sync-banner{padding:11px 12px;margin-bottom:12px}#sync-banner #refresh{margin-left:auto;font-size:12px}.section-heading{gap:10px}.siye-grid strong{font-size:25px}#siye-today h2{font-size:20px}body:has(.mark){padding:20px}body:has(.mark) main{padding:28px}}
@media(prefers-reduced-motion:no-preference){.primary,.panel,.nav{transition:border-color .2s,box-shadow .2s,background .2s}.panel:hover{border-color:#92b5e32b}}

/* Two original companion stickers, with an independent calendar selector. */
.duo-heading{display:flex;align-items:center;gap:14px;min-width:0}.duo-avatar{object-fit:contain;flex-shrink:0;filter:drop-shadow(0 5px 12px #0003)}#siye-today .tag{margin-bottom:8px}#siye-intro{margin:8px 0 0;font-size:12px;color:#afbad4}.duo-periods{display:flex;width:fit-content;gap:4px;padding:5px;margin:22px 0 14px;border:1px solid #8b8cd130;border-radius:12px;background:#0b1426}.duo-periods button{padding:9px 26px;color:#afbed8;background:transparent;border-radius:8px;font-size:13px}.duo-periods .selected{background:#f5d766;color:#342815;font-weight:650}#siye-today[data-persona=blond]{background:radial-gradient(ellipse at 0 0,#a3873420,transparent 65%),linear-gradient(125deg,#192338,#11192b)}#siye-today[data-persona=blond] .tag{color:#f8dc7f;background:#eac45a15}#siye-today[data-persona=flame] .tag{color:#ffb594;background:#ff995518}#siye-today[data-persona=flame] .duo-periods .selected{background:#ffb28c;color:#3e2419}#siye-today[data-persona=flame] .siye-main{background:linear-gradient(125deg,#56344a,#41316b);border-color:#ffad8d33}#siye-today[data-persona=flame] .siye-main strong{color:#ffe0d2}
@media(max-width:600px){#siye-today .section-heading{align-items:center;flex-wrap:wrap}.duo-avatar{width:72px;height:72px}.duo-heading{gap:10px}.duo-heading h2{font-size:20px}#siye-today .section-heading>a{margin-left:auto;font-size:12px}.duo-periods{width:100%;margin-top:16px}.duo-periods button{flex:1;padding:10px 14px}#siye-intro{font-size:11px;line-height:1.6}}

/* Keep frequent actions visible; put detailed querying in the Bills view. */
body[data-view=overview] .bills-panel .filters,body[data-view=overview] .search-controls,body[data-view=overview] #search-note,body[data-view=overview] #export,body[data-view=overview] .bill-tools{display:none}
body[data-view=overview] .bills-panel{min-height:0}body[data-view=overview] .bill{padding:15px 0}body[data-view=overview] #more-bills{background:transparent;color:var(--blue);border-color:var(--border)}
#amount-filters{grid-column:1/-1;border:1px solid var(--border);border-radius:9px;padding:10px 12px}summary{cursor:pointer;font-size:13px;color:#a9bbd5}summary:focus-visible{outline:2px solid #9cf5e7;outline-offset:4px}.amount-filter-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding-top:12px}.settings-links{display:flex;flex-wrap:wrap;gap:20px;align-items:center}.account-shortcuts>h2{margin-bottom:12px}.settings-links .secondary{display:inline-block;font-size:14px}.form-grid:has(>label[hidden]){grid-template-columns:1fr}.income-metric strong{color:#74e6c7!important}.balance-metric strong{color:#edf3ff!important}
@media(max-width:600px){body[data-view] header{display:flex;align-items:center;gap:12px}.header-actions{margin-top:0}.header-actions #add{margin-left:0}.eyebrow{font-size:9px;letter-spacing:.7px}h1{font-size:24px}.settings-links{gap:18px}#sync-banner{padding:10px 12px}#offline-readiness{font-size:10px}}

.stat-help{margin-top:18px;padding-top:12px;border-top:1px solid var(--border)}.stat-help summary{font-size:12px;color:#9aabc5}.stat-help p{line-height:1.7}
