/* Budget — design system di Fullzcodedepthv chiuso sotto .fzb (generato da scope.js: non modificare a mano le regole importate). */
.fzb{color-scheme:dark;position:relative;color:var(--text);font-family:var(--font);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased;border-radius:var(--radius-l);padding:clamp(10px,2vw,22px);background:radial-gradient(1100px 700px at 85% -10%,color-mix(in oklab,var(--accent) 30%,transparent) 0%,transparent 60%),radial-gradient(900px 650px at -10% 110%,color-mix(in oklab,var(--accent-2) 22%,transparent) 0%,transparent 55%),var(--bg-0);min-height:calc(100vh - 140px);overflow:hidden}
.fzb *,.fzb *::before,.fzb *::after{box-sizing:border-box}
.fzb h1,.fzb h2,.fzb h3,.fzb h4{font-family:var(--font-display);letter-spacing:-0.02em;line-height:1.15;margin:0;color:inherit}
.fzb a{color:inherit;text-decoration:none}
.fzb button{font:inherit;color:inherit}
.fzb img{max-width:100%;display:block}
.fzb ::selection{background:color-mix(in oklab,var(--accent) 50%,transparent)}

/* =====================================================================
   FULLZCODEDEPTHV — Design system condiviso
   Estetica: "spatial OS" scuro, vetro scuro, profondità e luci aurora.
   Priorità alla velocità: nessun effetto continuo (scena 3D, parallasse, tilt, sfocature dal vivo)
   e nessuna animazione d'ingresso; restano colori, sfumature e ombre.
   Ogni modulo imposta --accent / --accent-2 tramite <ModuleShell>.
   ===================================================================== */

.fzb {
    color-scheme: dark;
    --bg-0: #05040f;
    --bg-1: #0b0a1f;
    --bg-2: #14123a;
    --surface: rgba(255, 255, 255, 0.055);
    --surface-2: rgba(255, 255, 255, 0.09);
    --surface-3: rgba(255, 255, 255, 0.14);
    --surface-solid: #16143a;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.22);
    --text: #f4f3ff;
    --text-2: #b9b6dc;
    --text-3: #7f7ba8;
    --accent: #8b5cf6;
    --accent-2: #22d3ee;
    --accent-soft: color-mix(in oklab, var(--accent) 22%, transparent);
    --success: #34d399;
    --danger: #fb7185;
    --warning: #fbbf24;
    --info: #60a5fa;
    --income: #34d399;
    --expense: #fb7185;
    --radius-s: 10px;
    --radius: 18px;
    --radius-l: 26px;
    --radius-xl: 34px;
    --shadow-1: 0 1px 0 rgba(255,255,255,.06) inset, 0 10px 30px -12px rgba(0,0,0,.6);
    --shadow-2: 0 1px 0 rgba(255,255,255,.08) inset, 0 30px 60px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.04);
    --shadow-glow: 0 0 0 1px color-mix(in oklab, var(--accent) 40%, transparent), 0 18px 50px -12px color-mix(in oklab, var(--accent) 55%, transparent);
    --blur: none;
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    /* "Twemoji Country Flags" copre solo i caratteri delle bandiere (unicode-range): Windows non ha le emoji delle bandiere. */
    --font: "Twemoji Country Flags", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Twemoji Country Flags", "Space Grotesk", "Inter", system-ui, sans-serif;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --scroll: 0;          /* fisse: un tempo seguivano scroll e puntatore */
    --mx: 0;
    --my: 0;
}

/* Bandiere (vedi --font): il file si scarica solo quando nella pagina c'è una bandiera da disegnare. */
/* Personalizza (Services/Theme): sfondo senza luci, dimensione del testo. Le variabili le imposta fz-theme in App.razor. */
/* Sfondo fisso su un livello proprio (con background-attachment: fixed il browser ridisegnava tutta la pagina a ogni scroll). */

.fzb h1, .fzb h2, .fzb h3, .fzb h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }

/* ---------- Sfondo 3D ---------- */
/* Aurora: due luci colorate con l'accento del modulo, ferme (niente sfocatura da 80px né animazione continua). */

/* Colonna alta almeno quanto lo schermo: il piè di pagina (margin-top: auto) resta in fondo anche nelle pagine quasi vuote. */

/* ---------- Superfici ---------- */
/* Vetro scuro semitrasparente: stesso aspetto del vetro smerigliato, ma senza la sfocatura ricalcolata
   dalla GPU a ogni scroll (era la causa principale di scroll e tocchi lenti). */
.fzb .glass {
    background: linear-gradient(145deg, rgba(34, 30, 78, .86), rgba(14, 12, 38, .88));
    border: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 10px 24px -14px rgba(0,0,0,.7);
}
.fzb .card {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 27, 70, .82), rgba(12, 10, 32, .86));
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: 20px;
    box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 10px 24px -14px rgba(0,0,0,.7);
}
.fzb .card-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.fzb .card-sub { color: var(--text-3); font-size: .82rem; }
.fzb .card.accent { background: linear-gradient(145deg, color-mix(in oklab, var(--accent) 35%, transparent), color-mix(in oklab, var(--accent-2) 12%, transparent)); border-color: color-mix(in oklab, var(--accent) 35%, var(--border)); box-shadow: var(--shadow-glow); }

/* Effetti un tempo dinamici (tilt 3D, comparsa allo scroll, parallasse): gli attributi restano nel markup
   ma non fanno più nulla, così ogni elemento è subito al suo posto e il browser non ricalcola nulla. */
.fzb [data-tilt]::after { display: none; }
.fzb [data-reveal] { opacity: 1; }
.fzb .depth-1, .fzb .depth-2, .fzb .depth-3 { transform: none; }

/* ---------- Tipografia & utility ---------- */
.fzb .muted { color: var(--text-2); }
.fzb .dim { color: var(--text-3); }
.fzb .small { font-size: .82rem; }
.fzb .tiny { font-size: .72rem; }
.fzb .mono { font-variant-numeric: tabular-nums; }
.fzb .num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.fzb .pos { color: var(--income); }
.fzb .neg { color: var(--expense); }
.fzb .grad-text { background: linear-gradient(120deg, #fff 10%, var(--accent-2) 55%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fzb .row { display: flex; align-items: center; gap: 12px; }
.fzb .row.wrap { flex-wrap: wrap; }
.fzb .row.between { justify-content: space-between; }
.fzb .stack { display: flex; flex-direction: column; gap: 12px; }
.fzb .stack.lg { gap: 20px; }
.fzb .grow { flex: 1 1 auto; min-width: 0; }
.fzb .grid { display: grid; gap: 16px; }
.fzb .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fzb .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fzb .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fzb .grid.auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 900px) { .fzb .grid.cols-3, .fzb .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fzb .grid.cols-2, .fzb .grid.cols-3 { grid-template-columns: minmax(0, 1fr); } .fzb .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.fzb .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fzb .hide-mobile { } @media (max-width: 700px) { .fzb .hide-mobile { display: none !important; } }
.fzb .only-mobile { display: none !important; } @media (max-width: 700px) { .fzb .only-mobile { display: initial !important; } }
.fzb .scroll-x { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.fzb .scroll-x > * { scroll-snap-align: start; flex: 0 0 auto; }
.fzb .scroll-x::-webkit-scrollbar { display: none; }
.fzb .divider { height: 1px; background: var(--border); margin: 12px 0; border: 0; }
.fzb .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Bottoni ---------- */
.fzb .btn {
    --b-bg: var(--surface-2);
    position: relative; overflow: hidden; isolation: isolate;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--b-bg); color: var(--text); font-weight: 600; font-size: .92rem; cursor: pointer;
    transition: transform .1s ease-out, background .12s, border-color .12s;
    user-select: none; white-space: nowrap;
}
.fzb .btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.fzb .btn:active { transform: scale(.96); }
.fzb .btn:focus-visible, .fzb .input:focus-visible, .fzb .chip:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.fzb .btn[disabled] { opacity: .45; pointer-events: none; }
.fzb .btn-primary { background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 50%, var(--accent-2))); border-color: transparent; box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--accent) 80%, transparent), inset 0 1px 0 rgba(255,255,255,.25); }
.fzb .btn-primary:hover { background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 85%, white), var(--accent-2)); box-shadow: 0 16px 40px -10px color-mix(in oklab, var(--accent) 90%, transparent), inset 0 1px 0 rgba(255,255,255,.3); }
.fzb .btn-ghost { background: transparent; border-color: transparent; }
.fzb .btn-ghost:hover { background: var(--surface-2); }
.fzb .btn-danger { background: color-mix(in oklab, var(--danger) 22%, transparent); border-color: color-mix(in oklab, var(--danger) 40%, transparent); color: #ffd5dc; }
.fzb .btn-success { background: color-mix(in oklab, var(--success) 22%, transparent); border-color: color-mix(in oklab, var(--success) 40%, transparent); color: #d1fae5; }
.fzb .btn-sm { height: 34px; padding: 0 12px; border-radius: 11px; font-size: .84rem; }
.fzb .btn-lg { height: 52px; padding: 0 24px; border-radius: 17px; font-size: 1rem; }
.fzb .btn-icon { width: 42px; padding: 0; }
.fzb .btn-icon.btn-sm { width: 34px; }
.fzb .btn-block { width: 100%; }

/* Floating action button */
.fzb .fab {
    position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: calc(24px + var(--safe-bottom)); z-index: 40;
    width: 62px; height: 62px; border-radius: 22px; border: 0; cursor: pointer; font-size: 28px; color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 20px 40px -10px color-mix(in oklab, var(--accent) 80%, transparent), inset 0 1px 0 rgba(255,255,255,.35);
    display: grid; place-items: center; transition: transform .12s ease-out;
}
.fzb .fab:hover { transform: translateY(-2px); }
.fzb .fab:active { transform: scale(.94); }

/* ---------- Form ---------- */
.fzb .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fzb .field > label, .fzb .label { font-size: .75rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.fzb .input, .fzb .select, .fzb .textarea {
    width: 100%; height: 46px; padding: 0 14px; border-radius: 14px;
    background: rgba(0,0,0,.25); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 16px;
    transition: border-color .2s, box-shadow .2s, background .2s; appearance: none; -webkit-appearance: none;
}
.fzb .textarea { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.fzb .select { background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.fzb .select option { background: var(--surface-solid); color: var(--text); }
.fzb .input:focus, .fzb .select:focus, .fzb .textarea:focus { outline: none; border-color: color-mix(in oklab, var(--accent) 70%, white); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent); background: rgba(0,0,0,.35); }
.fzb .input::placeholder, .fzb .textarea::placeholder { color: var(--text-3); }
.fzb .input-lg { height: 58px; font-size: 1.1rem; border-radius: 18px; }
.fzb input[type="date"].input, .fzb input[type="time"].input { color-scheme: dark; }
.fzb .check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.fzb .check input { width: 22px; height: 22px; accent-color: var(--accent); }

/* Switch */
.fzb .switch { position: relative; width: 48px; height: 28px; flex: none; }
.fzb .switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.fzb .switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); transition: .3s; cursor: pointer; }
.fzb .switch span::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: white; transition: .35s var(--ease-spring); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.fzb .switch input:checked + span { background: var(--accent); }
.fzb .switch input:checked + span::before { transform: translateX(20px); }

/* Segmented control */
.fzb .seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--border); position: relative; }
.fzb .seg button, .fzb .seg a { border: 0; background: transparent; padding: 7px 14px; border-radius: 10px; font-weight: 600; font-size: .86rem; color: var(--text-2); cursor: pointer; transition: color .2s, background .3s var(--ease-out); white-space: nowrap; }
.fzb .seg button:hover, .fzb .seg a:hover { color: var(--text); }
.fzb .seg .active { background: var(--surface-3); color: var(--text); box-shadow: 0 4px 14px -4px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12); }
.fzb .seg.full { display: flex; } .fzb .seg.full > * { flex: 1; text-align: center; }

/* Chip */
.fzb .chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: .85rem; font-weight: 500; cursor: pointer; transition: all .25s var(--ease-out); white-space: nowrap; }
.fzb .chip:hover { color: var(--text); border-color: var(--border-strong); }
.fzb .chip.active { background: color-mix(in oklab, var(--accent) 30%, transparent); border-color: color-mix(in oklab, var(--accent) 60%, transparent); color: white; }
.fzb .badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: .72rem; font-weight: 700; background: var(--surface-2); color: var(--text-2); letter-spacing: .02em; }
.fzb .badge.success { background: color-mix(in oklab, var(--success) 20%, transparent); color: #a7f3d0; }
.fzb .badge.danger { background: color-mix(in oklab, var(--danger) 22%, transparent); color: #fecdd3; }
.fzb .badge.warning { background: color-mix(in oklab, var(--warning) 22%, transparent); color: #fde68a; }
.fzb .badge.info { background: color-mix(in oklab, var(--info) 22%, transparent); color: #bfdbfe; }
.fzb .badge.accent { background: var(--accent-soft); color: white; }

/* Progress */
.fzb .progress { height: 10px; border-radius: 99px; background: rgba(0,0,0,.3); overflow: hidden; position: relative; }
.fzb .progress > span { display: block; height: 100%; border-radius: inherit; width: var(--v, 0%); background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 16px color-mix(in oklab, var(--accent-2) 60%, transparent); transition: width .25s ease-out; position: relative; }
.fzb .progress.danger > span { background: linear-gradient(90deg, #f97316, var(--danger)); }
.fzb .progress.warning > span { background: linear-gradient(90deg, #eab308, #f97316); }
.fzb .progress.success > span { background: linear-gradient(90deg, #10b981, #84cc16); }

/* Liste */
.fzb .list { display: flex; flex-direction: column; gap: 8px; }
.fzb .list-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid transparent; transition: background .12s, border-color .12s; cursor: pointer; }
.fzb .list-item:hover { background: var(--surface-2); border-color: var(--border); }
.fzb .avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex: none; background: var(--surface-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.fzb .avatar.sm { width: 34px; height: 34px; border-radius: 11px; font-size: 17px; }
.fzb .avatar.lg { width: 58px; height: 58px; border-radius: 18px; font-size: 30px; }

.fzb .kpi { display: flex; flex-direction: column; gap: 4px; }
.fzb .kpi .kpi-label { font-size: .75rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.fzb .kpi .kpi-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fzb .kpi .kpi-delta { font-size: .8rem; font-weight: 600; }

.fzb .empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.fzb .empty .empty-icon { font-size: 56px; display: inline-block; filter: drop-shadow(0 20px 20px rgba(0,0,0,.4)); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }

.fzb .skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 12px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Module shell ---------- */
.fzb .module { position: relative; max-width: 1280px; margin: 0 auto; padding: calc(14px + var(--safe-top)) 20px calc(36px + var(--safe-bottom)); } /* compare subito: niente animazione d'ingresso */
.fzb .module-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 0; margin: 0 -4px; }
.fzb .module-top::before { content: ""; position: absolute; inset: 0 -100vw; z-index: -1; background: linear-gradient(to bottom, rgba(5,4,15,.96), rgba(5,4,15,.8) 70%, transparent); opacity: 0; mask-image: linear-gradient(to bottom, black 70%, transparent); }
html.scrolled .fzb .module-top::before { opacity: 1; } /* classe messa da fullzcodedepthv.js appena si scorre */
.fzb .home-btn { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; font-size: 20px; }
.fzb .module-hero { position: relative; padding: 18px 0 26px; perspective: 900px; }
.fzb .module-hero .hero-icon { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; font-size: 40px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 24px 50px -16px color-mix(in oklab, var(--accent) 90%, transparent), inset 0 2px 0 rgba(255,255,255,.35), inset 0 -8px 20px rgba(0,0,0,.2); }
.fzb .module-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
.fzb .module-hero .hero-sub { color: var(--text-2); margin-top: 4px; }
.fzb .module-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px; margin-bottom: 20px; border-radius: 18px; background: rgba(0,0,0,.25); border: 1px solid var(--border); width: fit-content; max-width: 100%; }
.fzb .module-tabs::-webkit-scrollbar { display: none; }
.fzb .module-tabs a { padding: 9px 16px; border-radius: 13px; font-weight: 600; font-size: .88rem; color: var(--text-2); white-space: nowrap; transition: background .12s, color .12s; display: inline-flex; align-items: center; gap: 6px; }
.fzb .module-tabs a:hover { color: var(--text); background: var(--surface); }
.fzb .module-tabs a.active { color: white; background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 70%, transparent), color-mix(in oklab, var(--accent-2) 40%, transparent)); box-shadow: 0 8px 20px -8px color-mix(in oklab, var(--accent) 80%, transparent); }

/* ---------- Sheet / modal ---------- */
.fzb .sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(3, 2, 12, .78); display: flex; align-items: center; justify-content: center; padding: 20px; perspective: 1400px; }
.fzb .sheet { width: min(560px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; border-radius: var(--radius-xl); background: linear-gradient(160deg, rgba(34,30,80,.92), rgba(14,12,40,.96)); border: 1px solid var(--border-strong); box-shadow: 0 50px 100px -20px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.12); overflow: hidden; }
.fzb .sheet.wide { width: min(820px, 100%); }
.fzb .sheet-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 12px; }
.fzb .sheet-head h2 { font-size: 1.3rem; flex: 1; }
.fzb .sheet-body { padding: 8px 22px 20px; overflow-y: auto; overscroll-behavior: contain; }
.fzb .sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px calc(18px + var(--safe-bottom)); border-top: 1px solid var(--border); background: rgba(0,0,0,.18); }
.fzb .sheet-grip { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) {
    .fzb .sheet-backdrop { align-items: flex-end; padding: 0; }
    .fzb .sheet, .fzb .sheet.wide { width: 100%; max-height: 92vh; border-radius: 30px 30px 0 0; }
    .fzb .sheet-grip { display: block; width: 42px; height: 5px; border-radius: 9px; background: var(--border-strong); margin: 10px auto 0; }
    .fzb .sheet-foot > .btn { flex: 1; }
}

/* ---------- Toast ---------- */
.fzb .toast-host { position: fixed; z-index: 200; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 10px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.fzb .toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(24, 21, 60, .97); border: 1px solid var(--border-strong); box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); }
.fzb .toast .t-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--surface-3); flex: none; }
.fzb .toast.success .t-ico { background: var(--success); color: #052e1f; }
.fzb .toast.error .t-ico { background: var(--danger); color: #3f0612; }
.fzb .toast.warning .t-ico { background: var(--warning); color: #3d2a00; }

/* ---------- Errori Blazor ---------- */
.fzb #blazor-error-ui { display: none; position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 1000; padding: 12px 18px; border-radius: 16px; background: #3b0a18; border: 1px solid var(--danger); color: #ffe4e6; box-shadow: var(--shadow-2); }
.fzb #blazor-error-ui .reload { color: white; font-weight: 700; margin-left: 10px; text-decoration: underline; }
.fzb #blazor-error-ui .dismiss { cursor: pointer; margin-left: 10px; }
.fzb .blazor-error-boundary { padding: 1rem 1.2rem; border-radius: 16px; background: #3b0a18; color: white; }
.fzb .blazor-error-boundary::after { content: "Si è verificato un errore."; }
.fzb .validation-message { color: var(--danger); font-size: .8rem; }
.fzb .invalid { border-color: var(--danger) !important; }

/* Scrollbar */
.fzb ::-webkit-scrollbar { width: 10px; height: 10px; }
.fzb ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.fzb ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); background-clip: padding-box; border: 2px solid transparent; }

@media (prefers-reduced-motion: reduce) {
    .fzb [data-reveal] { opacity: 1; transform: none; }
}


/* ---------- Fluidità su telefoni e schermi touch ----------
   Il "vetro smerigliato" (backdrop-filter) sopra lo sfondo 3D animato costringe la GPU a ricalcolare la
   sfocatura di ogni pannello a ogni fotogramma: è la causa principale dei tocchi lenti sui telefoni.
   Qui il vetro diventa un vetro scuro semitrasparente (aspetto quasi identico, costo zero). */
@media (pointer: coarse), (max-width: 700px) {
    .fzb { --blur: none; }
    .fzb .glass { background: linear-gradient(145deg, rgba(34, 30, 78, .86), rgba(14, 12, 38, .88)); }
    .fzb .card { background: linear-gradient(145deg, rgba(30, 27, 70, .82), rgba(12, 10, 32, .86)); }
    .fzb .sheet-backdrop { background: rgba(3, 2, 12, .78); }
    .fzb .toast { background: rgba(24, 21, 60, .97); }
    .fzb .module-top::before { background: linear-gradient(to bottom, rgba(5,4,15,.96), rgba(5,4,15,.8) 70%, transparent); }
    /* Ombre enormi e sfocate costano a ogni animazione: più contenute sui telefoni */
    .fzb .card, .fzb .glass { box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 10px 24px -14px rgba(0,0,0,.7); }
}
/* Tocchi: nessun ritardo del doppio tocco, risposta visiva immediata */
@media (hover: none) {
    .fzb .btn:active, .fzb .chip:active, .fzb .fab:active, .fzb .list-item:active { transform: scale(.96); transition-duration: .08s; }
}
/* Aurora sui telefoni: niente sfocatura da 80px ricalcolata a ogni movimento del giroscopio né animazione
   continua (era l'unica fonte di ricalcoli di stile a riposo). I gradienti radiali sono già morbidi. */
@media (pointer: coarse), (max-width: 700px) {
}

/* ---------- Telefoni: apertura immediata ----------
   Niente animazioni d'ingresso (pagina, card a cascata, pulsanti fluttuanti) né scena 3D di sfondo:
   le app compaiono subito e la GPU resta libera per scroll e tocchi. Restano gli effetti di tocco. */
@media (pointer: coarse), (max-width: 700px) {
    .fzb #fullzcodedepthv-bg { display: none; }
    .fzb .module, .fzb .fab { animation: none; }
    .fzb [data-reveal], .fzb [data-reveal="left"], .fzb [data-reveal="right"], .fzb [data-reveal="zoom"] { opacity: 1; transform: none; transition: none; }
    .fzb .sd-rise, .fzb .sd-flip, .fzb .sd-parallax { animation: none; }
    .fzb .empty .empty-icon { animation: none; }
}

/* Copia istantanea della home mostrata mentre il server disegna quella vera (vedi fullzcodedepthv.js). */

/* Azioni nella barra in alto delle app: solo l'icona, senza riquadro (il pulsante Home resta com'è). */
.fzb .module-top .btn.glass:not(.home-btn), .fzb .module-top .btn.btn-icon:not(.home-btn) {
    background: none; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.fzb .module-top .btn.btn-icon:not(.home-btn) { font-size: 1.6rem; width: 46px; height: 46px; }
.fzb .module-top .btn.glass:not(.home-btn):hover, .fzb .module-top .btn.btn-icon:not(.home-btn):hover { background: var(--surface-1); }

/* La calcolatrice occupa tutto lo schermo: lì il piè di pagina non serve. */

/* ---------- Pagine legali (privacy, cookie) ---------- */
.fzb .legal { max-width: 760px; margin: 0 auto; padding: calc(24px + var(--safe-top)) 20px 40px; line-height: 1.65; color: var(--text-2); }
.fzb .legal h1 { font-family: var(--font-display); color: var(--text); font-size: clamp(1.6rem, 5vw, 2.2rem); margin: 18px 0 4px; }
.fzb .legal h2 { color: var(--text); font-size: 1.05rem; margin: 26px 0 6px; }
.fzb .legal a { color: var(--accent-2); }
.fzb .legal ul { padding-left: 20px; }
.fzb .legal-back { display: inline-block; font-weight: 700; text-decoration: none; color: var(--text) !important; }
.fzb .legal-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 8px; }
.fzb .legal-table th, .fzb .legal-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.fzb .legal-table th { color: var(--text); }

/* Pulsante "aggiungi" delle app: tondo rosso con il più disegnato (sempre in alto a destra). */
.fzb .module-top .btn.btn-icon.btn-add:not(.home-btn), .fzb .btn.btn-add {
    width: 44px; height: 44px; border-radius: 50%; padding: 0; color: #fff; border: 0;
    background: linear-gradient(145deg, #f43f5e, #dc2626);
    box-shadow: 0 8px 20px -6px rgba(225, 29, 72, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.fzb .module-top .btn.btn-icon.btn-add:not(.home-btn):hover, .fzb .btn.btn-add:hover { background: linear-gradient(145deg, #fb7185, #e11d48); }
.fzb .btn.btn-add:active { transform: scale(.92); }
.fzb .btn.btn-add svg { width: 22px; height: 22px; }

/* =====================================================================
   VELOCITÀ — regole finali, valgono per tutte le app
   • Nessuna sfocatura dal vivo (backdrop-filter): la GPU la ricalcolava a ogni scroll e a ogni tocco.
   • Animazioni decorative (ingressi, fluttuazioni, pulsazioni, luccichii) rese istantanee: l'elemento è
     subito nel suo stato finale. Restano solo quelle che segnalano qualcosa: caricamenti, registrazione,
     salvataggio, scansione, orologio, allarmi e la riconnessione.
   ===================================================================== */

/* ===================================================================
   Adattamenti a ZcodedepthV (non presenti nell'originale)
   - il Budget vive DENTRO il layout MudBlazor: la barra del modulo non può essere sticky a top:0,
     finirebbe sotto l'AppBar fissa; e il padding lo dà già .fzb.
   - la classe html.scrolled non esiste qui (la metteva fullzcodedepthv.js).
   =================================================================== */
.fzb .module { padding: 4px 2px 24px; }
.fzb .module-top { position: relative; top: auto; z-index: 2; padding: 4px 0 8px; }
.fzb .module-top::before { display: none; }
/* Le sheet (modali) restano sopra all'AppBar e ai drawer di MudBlazor. */
.fzb .sheet-backdrop { z-index: 1500; }
@media (max-width: 600px) {
    .fzb { border-radius: 18px; padding: 10px 8px; min-height: calc(100vh - 120px); }
}

/* ===================================================================
   Adattamenti — tema CHIARO allineato all'area admin (2026-10-08, 2° giro)
   Richiesta cliente: niente fondo nero né blu scuro; il Budget deve
   combaciare con il resto del sito (canvas azzurro #DDE7F3, card #F8FBFF,
   testo slate #1E293B / #475569).
   - .fzb non disegna più un pannello proprio: è trasparente, senza angoli
     né padding, quindi prende lo sfondo del layout (nell'admin la scena
     azzurra) e si allinea ai margini del MudContainer come ogni altra pagina.
   - Superfici, testi e stati ridefiniti qui; le regole importate sopra che
     davano per scontato il fondo scuro (testo bianco, vetro notte, badge
     pastello) sono sovrascritte una per una più sotto.
   - L'accento di pagina (--accent / --accent-2 inline) resta per grafici e
     dettagli; dove diventa TESTO si usa la sua versione scura
     --accent-ink / --accent-2-ink (accento mescolato al 50% con slate 900),
     che regge 4.5:1 anche con accenti chiari (lime, ambra, ciano).
   Contrasti su --surface-solid #F8FBFF: --text 14:1, --text-2 7:1,
   --text-3 5.3:1, income #047857 5.4:1, expense #BE123C 6:1.
   =================================================================== */
.fzb {
    color-scheme: light;
    --bg-0: #DDE7F3;
    --bg-1: #E6EEF8;
    --bg-2: #D4E1F0;
    --surface: rgba(248, 251, 255, 0.92);
    --surface-1: #EEF4FB;
    --surface-2: #EAF1FA;
    --surface-3: #DAE5F2;
    --surface-solid: #F8FBFF;
    --border: #D3DFEE;
    --border-strong: #B9CBE2;
    --text: #1E293B;
    --text-2: #475569;
    --text-3: #5B6B82;
    --success: #047857;
    --danger: #BE123C;
    --warning: #B45309;
    --info: #1D4ED8;
    --income: #047857;
    --expense: #BE123C;
    --accent-ink: color-mix(in oklab, var(--accent) 50%, #0F172A);
    --accent-2-ink: color-mix(in oklab, var(--accent-2) 50%, #0F172A);
    --accent-soft: color-mix(in oklab, var(--accent) 16%, transparent);
    --shadow-1: 0 1px 2px rgba(11, 16, 38, .05), 0 8px 22px -12px rgba(30, 58, 110, .22);
    --shadow-2: 0 2px 6px rgba(11, 16, 38, .06), 0 20px 44px -18px rgba(30, 58, 110, .30);
    --shadow-glow: 0 0 0 1px color-mix(in oklab, var(--accent) 30%, transparent), 0 14px 34px -14px color-mix(in oklab, var(--accent) 40%, transparent);
    /* barra delle sezioni sticky sotto l'AppBar; le intestazioni dei giorni scorrono sotto di lei */
    --fzb-sticky-top: calc(var(--zcd-appbar-h, 64px) + 62px);
    color: var(--text);
    background: transparent;
    border-radius: 0;
    padding: 0;
    min-height: 0;
    overflow: visible;           /* niente più sfondo da ritagliare: il vecchio overflow:hidden bloccava lo sticky delle sezioni e tagliava le ombre */
}
@media (max-width: 600px) {
    .fzb { border-radius: 0; padding: 0; min-height: 0; }
}
.fzb .module { padding: 0 0 24px; }

/* Superfici */
.fzb .glass,
.fzb .card {
    background: linear-gradient(160deg, #FBFDFF, var(--surface-solid));
    border-color: var(--border-strong);
    box-shadow: var(--shadow-1);
}
.fzb .card.accent {
    background: linear-gradient(145deg, color-mix(in oklab, var(--accent) 14%, var(--surface-solid)), color-mix(in oklab, var(--accent-2) 8%, var(--surface-solid)));
    border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
}
.fzb .grad-text {
    background: linear-gradient(120deg, var(--text) 25%, var(--accent-ink) 75%, var(--accent-2-ink));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fzb .module-hero .hero-sub { color: var(--text-2); }

/* Campi, controlli segmentati, barre */
.fzb .input, .fzb .select, .fzb .textarea { background-color: #FFFFFF; border-color: var(--border-strong); }
.fzb .input:focus, .fzb .select:focus, .fzb .textarea:focus {
    background-color: #FFFFFF;
    border-color: var(--accent-ink);
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
}
.fzb input[type="date"].input, .fzb input[type="time"].input { color-scheme: light; }
.fzb .seg { background: var(--surface-2); border-color: var(--border); }
.fzb .seg .active { background: var(--surface-solid); color: var(--text); box-shadow: 0 2px 8px -3px rgba(30, 58, 110, .35), inset 0 0 0 1px var(--border-strong); }
.fzb .progress { background: rgba(30, 58, 110, .10); }
.fzb .progress > span { box-shadow: none; }
.fzb .switch span::before { box-shadow: 0 2px 6px rgba(30, 58, 110, .35); }
.fzb .avatar { box-shadow: inset 0 0 0 1px var(--border); }
.fzb .empty .empty-icon { filter: drop-shadow(0 12px 14px rgba(30, 58, 110, .2)); }

/* Pulsanti: testo bianco solo su fondi scuriti dall'accento (>= 4.5:1) */
.fzb .btn-primary,
.fzb .fab {
    color: #FFFFFF;
    background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 62%, #0F172A), color-mix(in oklab, var(--accent-2) 52%, #0F172A));
    box-shadow: 0 10px 24px -12px color-mix(in oklab, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.fzb .btn-primary:hover {
    background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 55%, #0F172A), color-mix(in oklab, var(--accent-2) 45%, #0F172A));
}
.fzb .btn-danger { color: #9F1239; background: rgba(190, 18, 60, .10); border-color: rgba(190, 18, 60, .35); }
.fzb .btn-success { color: #065F46; background: rgba(4, 120, 87, .10); border-color: rgba(4, 120, 87, .35); }
.fzb .btn:focus-visible, .fzb .input:focus-visible, .fzb .chip:focus-visible { outline-color: var(--accent-ink); }

/* Chip e badge: sul chiaro servono le tinte scure, non i pastelli */
.fzb .chip { background: var(--surface-solid); border-color: var(--border-strong); }
.fzb .chip.active { color: var(--text); background: color-mix(in oklab, var(--accent) 16%, var(--surface-solid)); border-color: var(--accent-ink); }
.fzb .badge { background: var(--surface-3); color: var(--text-2); }
.fzb .badge.success { background: rgba(4, 120, 87, .12); color: #065F46; }
.fzb .badge.danger { background: rgba(190, 18, 60, .10); color: #9F1239; }
.fzb .badge.warning { background: rgba(180, 83, 9, .12); color: #92400E; }
.fzb .badge.info { background: rgba(29, 78, 216, .10); color: #1E40AF; }
.fzb .badge.accent { background: color-mix(in oklab, var(--accent) 16%, var(--surface-solid)); color: var(--accent-ink); }
.fzb .list-item { background: var(--surface-solid); border-color: var(--border); }
.fzb .list-item:hover { background: var(--surface-2); border-color: var(--border-strong); }

/* Barra delle sezioni del Budget: resta visibile (sticky sotto l'AppBar) e
   segna in modo netto la sezione corrente (link legato alla rotta da NavLink). */
.fzb .module-tabs {
    position: sticky;
    top: var(--zcd-appbar-h, 64px);
    z-index: 20;
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    box-shadow: 0 8px 20px -14px rgba(30, 58, 110, .45);
    scroll-padding-inline: 24px;
}
.fzb .module-tabs a { color: var(--text-2); min-height: 40px; }
.fzb .module-tabs a:hover { color: var(--text); background: var(--surface-2); }
.fzb .module-tabs a.active {
    color: var(--accent-ink);
    background: color-mix(in oklab, var(--accent) 14%, var(--surface-solid));
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 45%, transparent);
    font-weight: 700;
}
.fzb .module-tabs a:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -2px; }

/* Finestre (sheet), avvisi, errori */
.fzb .sheet-backdrop { background: rgba(15, 23, 42, .45); }
.fzb .sheet {
    background: linear-gradient(170deg, #FBFDFF, var(--surface-1));
    border-color: var(--border-strong);
    box-shadow: 0 40px 80px -24px rgba(15, 23, 42, .45);
}
.fzb .sheet-foot { background: var(--surface-2); }
.fzb .toast { background: var(--surface-solid); border-color: var(--border-strong); box-shadow: 0 20px 40px -14px rgba(15, 23, 42, .35); }
.fzb .toast .t-ico { background: var(--surface-3); }
.fzb .toast.success .t-ico { background: var(--success); color: #FFFFFF; }
.fzb .toast.error .t-ico { background: var(--danger); color: #FFFFFF; }
.fzb .toast.warning .t-ico { background: var(--warning); color: #FFFFFF; }
.fzb #blazor-error-ui, .fzb .blazor-error-boundary { background: #FFF1F2; color: #9F1239; }
.fzb #blazor-error-ui .reload { color: #9F1239; }
.fzb .legal a { color: var(--accent-2-ink); }
.fzb ::-webkit-scrollbar-thumb { background: rgba(30, 58, 110, .22); background-clip: padding-box; }
.fzb ::-webkit-scrollbar-thumb:hover { background: rgba(30, 58, 110, .34); background-clip: padding-box; }

/* Telefono: le regole "pointer: coarse" più sopra rimettevano vetro e card notte. */
@media (pointer: coarse), (max-width: 700px) {
    .fzb .glass, .fzb .card { background: linear-gradient(160deg, #FBFDFF, var(--surface-solid)); box-shadow: var(--shadow-1); }
    .fzb .sheet-backdrop { background: rgba(15, 23, 42, .45); }
    .fzb .toast { background: var(--surface-solid); }
}
