:root{--navy:#101d2b;--navy2:#182a3b;--ink:#172433;--muted:#7b8793;--line:#e8edf0;--bg:#f5f7f8;--white:#fff;--green:#2d8a68;--green-soft:#e8f4ef;--red:#c65b5b;--red-soft:#fbefef;--amber:#b98535;--shadow:0 12px 34px rgba(21,39,55,.055);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-size:14px}.app-shell{min-height:100vh}.sidebar{width:248px;background:var(--navy);color:#dbe4eb;position:fixed;inset:0 auto 0 0;padding:28px 18px;display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:11px;font-size:14px;letter-spacing:1.3px;font-weight:750;color:#fff;margin:0 7px 54px}.brand b{color:#85c8a8}.brand-mark{width:34px;height:34px;border-radius:11px;background:#d9eee5;color:#183c32;display:grid;place-items:center;font-size:18px;font-weight:900}.side-label,.eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:750;color:#94a4b2}.side-label{margin:0 10px 12px}.sidebar nav{display:grid;gap:6px}.nav-item{border:0;background:transparent;color:#aebbc6;padding:12px 13px;border-radius:10px;text-align:left;font:inherit;display:flex;align-items:center;gap:13px;cursor:pointer;transition:.2s}.nav-item span{font-size:19px;width:20px;text-align:center}.nav-item:hover,.nav-item.active{background:#24394b;color:#fff}.nav-item.active{box-shadow:inset 3px 0 #86c7a7}.sidebar-bottom{margin-top:auto}.privacy-note{display:flex;gap:10px;align-items:center;padding:14px 10px;margin-bottom:14px;border-top:1px solid #2a3b4b;color:#dce7ee}.privacy-note b,.privacy-note small{display:block}.privacy-note b{font-size:11px}.privacy-note small{font-size:10px;color:#91a2b1;margin-top:4px}.privacy-dot{width:8px;height:8px;background:#76c49b;border-radius:50%;box-shadow:0 0 0 4px #29483e}.main{margin-left:248px;padding:0 42px 35px;max-width:1800px}.topbar{height:94px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.topbar .eyebrow{color:#9aa5ad}.topbar h1{font-size:22px;margin:5px 0 0;letter-spacing:-.5px}.top-actions{display:flex;align-items:center;gap:15px}.icon-button{width:38px;height:38px;border:0;border-radius:12px;background:var(--navy);color:white;font-size:24px;cursor:pointer}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#e1ece7;color:#315b4a;font-weight:750;font-size:11px}.view{display:none;padding:30px 0 10px}.view.active{display:block}.welcome-row,.section-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px}.welcome-row h2{font-size:26px;letter-spacing:-.8px;margin:0 0 6px}.welcome-row p,.section-toolbar p,.panel-heading p{margin:0;color:var(--muted);font-size:12px}.accent{color:var(--green)}.month-picker{display:flex;align-items:center;gap:15px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:7px 10px;font-size:12px;font-weight:650}.month-picker button{border:0;background:transparent;font-size:20px;color:#687684;cursor:pointer}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:18px}.stat-card,.panel{background:var(--white);border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow)}.stat-card{padding:19px 20px;min-height:126px}.balance-card{background:var(--navy);color:#fff;border-color:var(--navy)}.stat-head{display:flex;justify-content:space-between;align-items:center;color:#7d8994;font-size:11px}.balance-card .stat-head,.balance-card .stat-foot{color:#aebdca}.stat-icon{width:25px;height:25px;border-radius:8px;background:#294052;color:#b5dfc8;display:grid;place-items:center}.stat-value{font-size:25px;font-weight:750;letter-spacing:-.8px;margin:13px 0 7px;font-variant-numeric:tabular-nums}.stat-foot{font-size:10px;color:#a0aab2}.mini-icon{width:25px;height:25px;border-radius:8px;display:grid;place-items:center;font-size:15px}.green{color:var(--green);background:var(--green-soft)}.red{color:var(--red);background:var(--red-soft)}.amber{color:var(--amber);background:#fbf4e8}.blue{color:#557eaa;background:#edf3f8}.content-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:17px;margin-bottom:17px}.lower-grid{grid-template-columns:1.35fr 1fr}.panel{padding:21px}.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:22px}.panel-heading h3,.panel h3{margin:0 0 5px;font-size:14px;letter-spacing:-.2px}.panel-heading p{font-size:11px}.tag{font-size:9px;color:#668271;background:#edf5f0;padding:5px 8px;border-radius:6px}.bar-chart{height:170px;display:flex;align-items:flex-end;justify-content:space-around;gap:13px;padding:10px 8px 0;border-bottom:1px solid var(--line)}.bar-group{height:100%;display:flex;align-items:flex-end;gap:4px;position:relative;flex:1;justify-content:center}.bar{width:min(19px,35%);border-radius:5px 5px 0 0;min-height:2px}.bar.income{background:#82bda1}.bar.expense{background:#e6a4a0}.bar-label{position:absolute;bottom:-23px;font-size:9px;color:#8b969e;white-space:nowrap}.legend{display:flex;justify-content:center;gap:20px;margin-top:34px;color:#85919b;font-size:10px}.legend i{display:inline-block;width:7px;height:7px;border-radius:2px;margin-right:5px}.legend-income{background:#82bda1}.legend-expense{background:#e6a4a0}.category-list{display:grid;gap:16px}.category-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.category-name{font-size:11px}.category-amount{font-size:11px;font-weight:700}.category-track{grid-column:1/-1;height:5px;background:#f0f2f3;border-radius:10px;overflow:hidden}.category-track span{display:block;height:100%;background:#8dbba5;border-radius:10px}.transaction-list{display:grid}.transaction-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #f0f2f3}.transaction-row:last-child{border-bottom:0}.tx-icon{width:34px;height:34px;border-radius:10px;background:#f1f4f5;display:grid;place-items:center;color:#667a87;font-size:15px;flex-shrink:0}.tx-info{flex:1;min-width:0}.tx-info b,.tx-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-info b{font-size:11px}.tx-info small{font-size:10px;color:#96a0a8;margin-top:4px}.tx-amount{font-size:12px;font-weight:750;white-space:nowrap}.tx-amount.positive{color:var(--green)}.tx-amount.negative{color:#b75e5b}.text-button{border:0;background:transparent;color:var(--green);font-size:11px;font-weight:700;cursor:pointer}.ai-heading{display:flex;gap:11px;align-items:center;margin-bottom:15px}.ai-heading h3{margin:0 0 4px;font-size:14px}.ai-heading p{margin:0;color:var(--muted);font-size:10px}.ai-spark{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:#eef5f0;color:#4d8b70;font-size:20px}.ai-spark.large{width:48px;height:48px;font-size:27px}.insight-text{font-size:12px;line-height:1.65;color:#596772;min-height:75px}.outline-button,.primary-button,.danger-button{border-radius:9px;padding:10px 14px;font:inherit;font-size:11px;font-weight:700;cursor:pointer}.outline-button{background:white;border:1px solid #dce5e0;color:#416d58}.outline-button span{margin-left:10px}.primary-button{background:var(--navy);border:1px solid var(--navy);color:#fff}.primary-button:hover{background:#263c4f}.section-toolbar{margin-bottom:22px}.section-toolbar h2{margin:0 0 6px;font-size:22px;letter-spacing:-.5px}.filter-row{display:flex;gap:10px;margin-bottom:14px}.filter-row input,.filter-row select,.chat-form input{border:1px solid var(--line);border-radius:9px;padding:11px 13px;background:white;font:inherit;font-size:11px;outline:none}.filter-row input{flex:1}.table-panel{padding:8px 20px}.table-panel .transaction-row{padding:15px 3px}.tx-actions{display:flex;gap:5px}.small-action{border:0;background:#f4f6f7;color:#78858e;border-radius:6px;padding:6px 8px;cursor:pointer;font-size:10px}.budget-grid,.debt-grid,.goal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.budget-card,.debt-card,.goal-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:var(--shadow)}.budget-top,.debt-top,.goal-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.budget-top h3,.debt-top h3,.goal-top h3{font-size:13px;margin:0}.budget-number{font-size:20px;font-weight:750;margin:17px 0 8px}.progress{height:7px;border-radius:10px;background:#edf0f1;overflow:hidden}.progress span{height:100%;display:block;background:#83b99d;border-radius:10px}.progress.over span{background:#d7837e}.budget-foot,.goal-foot{display:flex;justify-content:space-between;margin-top:9px;color:#8b969d;font-size:10px}.debt-top .tx-icon{width:36px;height:36px}.debt-balance{font-size:22px;font-weight:750;margin:18px 0 5px}.debt-meta{display:flex;gap:18px;color:#7d8992;font-size:10px;margin-top:12px}.debt-meta b{display:block;color:#364653;font-size:12px;margin-top:4px}.compact-stats{grid-template-columns:repeat(2,minmax(0,1fr));max-width:650px}.compact-stats .stat-card{min-height:105px}.goal-card .budget-number{margin:15px 0}.advisor-hero{display:flex;align-items:center;gap:16px;padding:23px 25px;border-radius:15px;background:var(--navy);color:white;margin-bottom:18px}.advisor-hero .eyebrow{color:#9eb5a9}.advisor-hero h2{margin:5px 0;font-size:21px}.advisor-hero p{margin:0;color:#b5c2cc;font-size:11px}.advisor-layout{display:grid;grid-template-columns:1.15fr 1fr;gap:16px}.insights-stack{display:grid;gap:12px}.insight-card{border:1px solid #edf0f1;border-radius:10px;padding:14px;display:flex;gap:11px}.insight-symbol{width:27px;height:27px;display:grid;place-items:center;border-radius:8px;background:#f0f5f1;color:#54876d;flex-shrink:0}.insight-card.warning .insight-symbol{background:#fbf2e8;color:#ae803d}.insight-card.danger .insight-symbol{background:#fbefef;color:#bd6561}.insight-card b{font-size:11px;display:block;margin:1px 0 5px}.insight-card p{font-size:10px;line-height:1.55;color:#73808a;margin:0}.chat-messages{height:245px;overflow:auto;display:flex;flex-direction:column;gap:9px;padding:8px 0}.chat-bubble{max-width:90%;padding:11px 13px;border-radius:12px;font-size:11px;line-height:1.55}.chat-bubble.bot{background:#f0f4f2;color:#4c6257;align-self:flex-start;border-bottom-left-radius:3px}.chat-bubble.user{background:var(--navy);color:white;align-self:flex-end;border-bottom-right-radius:3px}.chat-form{display:flex;gap:8px;margin:8px 0 10px}.chat-form input{flex:1;min-width:0}.chat-form button{width:42px;padding:0}.muted{color:#a0a9b0;font-size:9px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.settings-grid .panel p{font-size:11px;line-height:1.6;color:#7d8992}.settings-grid .danger-panel{grid-column:1/-1}.button-row{display:flex;gap:9px;margin-top:17px}.file-label{display:inline-flex;align-items:center;position:relative}.file-label input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.setting-line{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid #f0f2f3;font-size:11px}.setting-line span{color:#84909a}.setting-line b{font-weight:650}.danger-button{background:#fff4f3;color:#b45f59;border:1px solid #f2d9d7}.empty-state{padding:28px 10px;text-align:center;color:#9aa4aa;font-size:11px}.modal{border:0;border-radius:16px;padding:25px;width:min(500px,calc(100% - 28px));box-shadow:0 25px 80px #101d2b33}.modal::backdrop{background:#0e1a26a8;backdrop-filter:blur(3px)}.modal form{display:grid;gap:14px}.modal-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.modal-heading h2{margin:5px 0 0;font-size:20px}.modal .eyebrow{color:#8c9a9f}.close-button{border:0;background:#f2f4f5;border-radius:8px;width:30px;height:30px;font-size:21px;color:#64717a;cursor:pointer}.modal label{display:grid;gap:6px;color:#596873;font-size:10px;font-weight:650}.modal input,.modal select,.modal textarea{width:100%;border:1px solid #e2e8eb;border-radius:8px;padding:10px 11px;font:inherit;font-size:12px;color:#233340;background:#fff;outline:none}.modal input:focus,.modal select:focus,.modal textarea:focus{border-color:#8db8a1}.form-two{display:grid;grid-template-columns:1fr 1fr;gap:11px}.type-switch{display:flex;background:#f1f4f4;padding:4px;border-radius:9px}.type-switch label{flex:1;display:block}.type-switch input{display:none}.type-switch span{display:block;text-align:center;padding:9px;border-radius:7px;cursor:pointer}.type-switch input:checked+span{background:white;color:#284d3e;box-shadow:0 1px 5px #152c3512}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:5px}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#172a39;color:white;padding:12px 17px;border-radius:9px;font-size:11px;box-shadow:var(--shadow);transition:.25s;z-index:20}.toast.show{opacity:1;transform:translate(-50%,0)}footer{padding:28px 0 8px;text-align:center;color:#a1abb1;font-size:9px;letter-spacing:1px}footer span{padding:0 5px;color:#77a68d}.mobile-nav{display:none}
@media(max-width:1100px){.main{padding:0 25px 30px}.sidebar{width:220px}.main{margin-left:220px}.stats-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){body{padding-bottom:75px}.sidebar{display:none}.main{margin:0;padding:0 16px 24px}.topbar{height:75px}.topbar h1{font-size:19px}.topbar .eyebrow{font-size:8px}.view{padding-top:23px}.welcome-row{align-items:flex-start;flex-direction:column}.welcome-row h2{font-size:23px}.month-picker{align-self:flex-start}.stats-grid{gap:9px}.stat-card{padding:14px;min-height:112px;border-radius:12px}.stat-value{font-size:21px}.stat-head{font-size:10px}.stat-foot{font-size:9px}.content-grid,.lower-grid,.advisor-layout,.settings-grid{grid-template-columns:1fr;gap:12px}.panel{padding:17px}.panel-heading{margin-bottom:17px}.section-toolbar{align-items:flex-start}.section-toolbar h2{font-size:20px}.section-toolbar p{max-width:230px;line-height:1.5}.section-toolbar .primary-button{white-space:nowrap;padding:10px;font-size:10px}.budget-grid,.debt-grid,.goal-grid{grid-template-columns:1fr}.compact-stats{grid-template-columns:1fr 1fr}.filter-row{flex-direction:column}.transaction-row{gap:9px}.tx-actions .small-action{padding:6px}.advisor-hero{padding:18px}.advisor-hero h2{font-size:18px}.settings-grid .danger-panel{grid-column:auto}.mobile-nav{position:fixed;display:flex;justify-content:space-around;align-items:center;bottom:0;left:0;right:0;height:68px;padding:6px 5px calc(6px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);z-index:10}.mobile-nav button{border:0;background:transparent;color:#87939b;display:grid;justify-items:center;gap:4px;min-width:48px}.mobile-nav button span{font-size:19px}.mobile-nav button small{font-size:9px}.mobile-nav button.active{color:#2e7558}.mobile-nav button.active span{transform:translateY(-1px)}footer{padding-bottom:15px}.form-two{gap:8px}}
@media(min-width:1500px){.main{padding-left:55px;padding-right:55px}.stats-grid{gap:20px}.panel{padding:25px}}

/* Account, accesso e sincronizzazione */
.auth-gate{position:fixed;inset:0;z-index:100;background:linear-gradient(145deg,#101d2b,#203a48);display:grid;place-items:center;padding:22px;overflow:auto}.auth-gate[hidden]{display:none}.auth-card{width:min(440px,100%);background:#fff;border-radius:22px;padding:34px;box-shadow:0 28px 90px #0004;display:grid;gap:13px}.auth-brand{margin-bottom:14px;color:#172a39}.auth-card h1{font-size:25px;margin:0;color:#172a39;letter-spacing:-.6px}.auth-card p{font-size:12px;line-height:1.6;color:#75828b;margin:0 0 7px}.auth-card label{display:grid;gap:6px;font-size:11px;font-weight:700;color:#52616b}.auth-card input{padding:13px;border:1px solid #dfe6e8;border-radius:9px;font:inherit;font-size:13px;min-width:0}.auth-main{width:100%;padding:13px}.passkey-button,.apple-button{width:100%;padding:13px;border-radius:9px;border:1px solid #dce4e6;background:#f7f9f9;color:#20323e;font-weight:700;font-size:12px;cursor:pointer}.apple-button{background:#101010;color:white;border-color:#101010}.link-button{border:0;background:none;color:#47785f;font-size:11px;cursor:pointer;padding:6px}.auth-message{font-size:11px;line-height:1.5;color:#a34f49;min-height:16px;overflow-wrap:anywhere}.auth-card>small{font-size:9px;line-height:1.5;color:#9aa4aa;text-align:center}.auth-locked{overflow:hidden}#cloud-status[data-ok="true"]{color:#3c8564}#cloud-status{font-weight:700;color:#9a7940}
@media(max-width:480px){.auth-card{padding:25px 21px;border-radius:17px}.auth-card h1{font-size:22px}}

/* MYFINANCE AI 0.4.0 — privacy and AI consent */
.ai-consent-row{display:flex;align-items:flex-start;gap:11px;margin:16px 0 8px;padding:14px;border:1px solid #e3eae6;border-radius:10px;background:#f8faf8;cursor:pointer}
.ai-consent-row input{width:17px;height:17px;flex:0 0 17px;margin:2px 0 0;accent-color:#4d8b70}
.ai-consent-row span{display:grid;gap:6px}
.ai-consent-row b{font-size:11px;color:#33463d}
.ai-consent-row small{font-size:10px;line-height:1.6;color:#75827c}
#ai-chat-status{max-width:220px;line-height:1.5}
.chat-form button:disabled{opacity:.55;cursor:wait}
