/* =====================================================================
   Pesuma v2 · experiencia premium (se carga después de finanzas.css)
   ===================================================================== */
:root { --fz-radius: 1.1rem; --fz-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px -12px rgb(0 0 0 / .12); --fz-ring-track: rgb(228 228 231); }
.dark { --fz-shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 12px 32px -16px rgb(0 0 0 / .6); --fz-ring-track: rgb(255 255 255 / .08); }

/* Tipografía y superficies */
.fi-body { -webkit-font-smoothing: antialiased; }
.fi-header-heading { letter-spacing: -0.025em; }
.fi-section, .fi-wi-stats-overview-stat, .fi-ta-ctn { border-radius: var(--fz-radius) !important; box-shadow: var(--fz-shadow) !important; }
.fi-wi-stats-overview-stat { transition: transform .15s ease; }
.fi-wi-stats-overview-stat:hover { transform: translateY(-1px); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid rgb(16 185 129); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Hero del Panorama */
.fz-hero { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.fz-hero-card {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .55rem;
    padding: 1.25rem 1.35rem; border-radius: var(--fz-radius); background: var(--fz-card);
    border: 1px solid var(--fz-border); box-shadow: var(--fz-shadow);
}
.fz-hero-card.is-ok { background: linear-gradient(150deg, rgb(16 185 129 / .14), transparent 55%), var(--fz-card); border-color: rgb(16 185 129 / .35); }
.fz-hero-card.is-danger { background: linear-gradient(150deg, rgb(244 63 94 / .14), transparent 55%), var(--fz-card); border-color: rgb(244 63 94 / .4); }
.fz-hero-label { display: flex; align-items: center; gap: .45rem; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--fz-muted); }
.fz-ic { width: 1rem; height: 1rem; }
.fz-hero-value { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.fz-hero-value small { font-size: .9rem; font-weight: 600; color: var(--fz-muted); margin-left: .25rem; letter-spacing: 0; }
.fz-hero-sub { font-size: .85rem; line-height: 1.5; color: var(--fz-muted); margin: 0; }
.fz-hero-sub b { color: inherit; filter: brightness(1.35); font-weight: 700; }
.fz-hero-kv { margin: .35rem 0 0; display: flex; flex-direction: column; gap: .3rem; border-top: 1px solid var(--fz-border); padding-top: .65rem; }
.fz-hero-kv > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; }
.fz-hero-kv dt { color: var(--fz-muted); }
.fz-hero-kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Anillo de salud financiera */
.fz-health { display: flex; align-items: center; gap: 1rem; }
.fz-ring { width: 104px; height: 104px; flex-shrink: 0; }
.fz-ring circle { fill: none; stroke-width: 9; transform: rotate(-90deg); transform-origin: 50% 50%; }
.fz-ring-track { stroke: var(--fz-ring-track); }
.fz-ring-value { stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.fz-tone-success .fz-ring-value { stroke: var(--fz-success); }
.fz-tone-warning .fz-ring-value { stroke: var(--fz-warning); }
.fz-tone-danger .fz-ring-value { stroke: var(--fz-danger); }
.fz-ring text { text-anchor: middle; fill: currentColor; }
.fz-ring-num { font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.fz-ring .fz-ring-of { font-size: 9px; fill: var(--fz-muted); }
.fz-health-label { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: .2rem; }
.fz-hero-details summary { cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--fz-success); }
.fz-factors { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-direction: column; gap: .5rem; }
.fz-factors li { display: grid; grid-template-columns: 1fr 70px 42px; gap: .6rem; align-items: center; font-size: .78rem; }
.fz-factors li > span:first-child { display: flex; flex-direction: column; }
.fz-factors small { color: var(--fz-muted); font-size: .72rem; }
.fz-factors b { text-align: right; font-variant-numeric: tabular-nums; }
.fz-factor-bar { height: .35rem; border-radius: 99px; background: var(--fz-track); overflow: hidden; }
.fz-factor-bar i { display: block; height: 100%; background: var(--fz-success); border-radius: inherit; }

/* Avance del mes */
.fz-month { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: var(--fz-radius); background: var(--fz-card); border: 1px solid var(--fz-border); box-shadow: var(--fz-shadow); }
.fz-month-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; font-size: .82rem; color: var(--fz-muted); margin-bottom: .55rem; }
.fz-month-head b { color: inherit; filter: brightness(1.35); }
.fz-bar.is-over > span { background: linear-gradient(90deg, #f59e0b, #f43f5e); }

/* Línea de tiempo de pagos */
.fz-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fz-tl { display: grid; grid-template-columns: 3rem 1fr auto auto; gap: .85rem; align-items: center; padding: .7rem .2rem; border-bottom: 1px solid var(--fz-border); }
.fz-tl:last-child { border-bottom: 0; }
.fz-tl-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: .8rem; background: var(--fz-track); font-size: .65rem; text-transform: uppercase; color: var(--fz-muted); line-height: 1.1; }
.fz-tl-date b { font-size: 1.05rem; color: inherit; filter: brightness(1.6); }
.fz-tl-vencido .fz-tl-date { background: rgb(244 63 94 / .15); color: var(--fz-danger); }
.fz-tl-hoy .fz-tl-date, .fz-tl-pronto .fz-tl-date { background: rgb(245 158 11 / .15); color: var(--fz-warning); }
.fz-tl-ingreso .fz-tl-date { background: rgb(16 185 129 / .15); color: var(--fz-success); }
.fz-tl-body { min-width: 0; }
.fz-tl-name { display: flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .9rem; }
.fz-tl-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fz-tl-after { font-size: .75rem; color: var(--fz-muted); margin-top: .1rem; font-variant-numeric: tabular-nums; }
.fz-tl-amount { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .92rem; white-space: nowrap; }
.fz-tl-action { justify-self: end; font-size: .75rem; font-weight: 700; padding: .4rem .75rem; border-radius: 99px; background: rgb(16 185 129 / .14); color: var(--fz-success); text-decoration: none; }
.fz-tl-action:hover { background: rgb(16 185 129 / .24); }
.fz-chip { flex-shrink: 0; font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: .12rem .45rem; border-radius: 99px; }
.fz-chip-vencido { background: rgb(244 63 94 / .16); color: var(--fz-danger); }
.fz-chip-hoy, .fz-chip-pronto { background: rgb(245 158 11 / .16); color: var(--fz-warning); }
.fz-chip-ingreso { background: rgb(16 185 129 / .16); color: var(--fz-success); }
@media (max-width: 640px) {
    .fz-tl { grid-template-columns: 2.6rem 1fr auto; gap: .65rem; }
    .fz-tl-date { width: 2.6rem; height: 2.6rem; }
    .fz-tl-action { grid-column: 2 / -1; justify-self: start; }
    .fz-tl-action-spacer { display: none; }
}

/* Barra de navegación inferior (celular y tablet) */
.fz-tabbar { display: none; }
@media (max-width: 1023px) {
    .fz-tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
        background: color-mix(in srgb, var(--fz-card) 88%, transparent);
        backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
        border-top: 1px solid var(--fz-border);
    }
    .fi-main { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important; }
    .fz-tab { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem 0; font-size: .66rem; font-weight: 600; color: var(--fz-muted); text-decoration: none; background: none; border: 0; min-height: 44px; cursor: pointer; }
    .fz-tab svg { width: 1.45rem; height: 1.45rem; }
    .fz-tab.is-active { color: var(--fz-success); }
    .fz-tabbar-fab {
        justify-self: center; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; margin-top: -1.6rem; border-radius: 1.1rem;
        background: linear-gradient(145deg, #34d399, #059669); color: #fff; box-shadow: 0 10px 24px -6px rgb(16 185 129 / .6), 0 0 0 4px var(--fz-card);
    }
    .fz-tabbar-fab svg { width: 1.7rem; height: 1.7rem; }
    .fz-tabbar-fab:active { transform: scale(.94); }
}

.fz-tl-actions { display: flex; gap: .35rem; justify-self: end; }
.fz-tl-ghost { background: transparent; border: 1px solid var(--fz-border); color: var(--fz-muted); cursor: pointer; }
.fz-tl-ghost:hover { background: var(--fz-track); color: inherit; }
@media (max-width: 640px) { .fz-tl-actions { grid-column: 2 / -1; justify-self: start; } }

/* =====================================================================
   v3 · Sistema visual unificado
   Colorimetría:  verde esmeralda = entra / ahorro / logro · rosa = gasto / peligro
                  ámbar = deuda / atención · azul cielo = información · zinc = neutros
   ===================================================================== */
:root { --fz-green: #10b981; --fz-rose: #f43f5e; --fz-amber: #f59e0b; --fz-sky: #0ea5e9; }
.fz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fz-dot { width: .6rem; height: .6rem; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.fz-err { color: var(--fz-danger); font-size: .8rem; font-weight: 600; margin: .35rem 0 0; }
.fz-btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.2rem; border-radius: .9rem; font-weight: 700; font-size: .9rem;
    background: linear-gradient(145deg, #34d399, #059669); color: #fff; text-decoration: none; box-shadow: 0 8px 20px -8px rgb(16 185 129 / .6); }

/* ---------- Registro rápido ---------- */
.fz-qe { max-width: 34rem; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 1rem; }
.fz-seg { display: grid; grid-template-columns: 1fr 1fr; padding: .25rem; border-radius: 1rem; background: var(--fz-track); gap: .25rem; }
.fz-seg button { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .6rem; border-radius: .8rem; font-weight: 700; font-size: .9rem; color: var(--fz-muted); }
.fz-seg button svg { width: 1.05rem; height: 1.05rem; }
.fz-seg button.is-on { background: var(--fz-card); color: inherit; box-shadow: var(--fz-shadow); }
.fz-seg button.is-on.is-out { color: var(--fz-danger); }
.fz-seg button.is-on.is-in { color: var(--fz-success); }
.fz-amount { display: flex; align-items: baseline; justify-content: center; gap: .3rem; padding: .9rem 1rem .4rem; border-bottom: 2px solid var(--fz-border); transition: border-color .2s; }
.fz-amount:focus-within { border-color: var(--fz-green); }
.fz-amount.is-out:focus-within { border-color: var(--fz-rose); }
.fz-amount-cur { font-size: 1.8rem; font-weight: 700; color: var(--fz-muted); }
.fz-amount input { width: 100%; max-width: 16rem; background: transparent; border: 0; outline: none; text-align: center; font-size: clamp(2.4rem, 11vw, 3.2rem); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; padding: 0; color: inherit; }
.fz-amount input::placeholder { color: var(--fz-border); }
.fz-amount input:focus { box-shadow: none; }
.fz-quick-add { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.fz-quick-add button { font-size: .75rem; font-weight: 700; padding: .35rem .7rem; border-radius: 99px; background: var(--fz-track); color: var(--fz-muted); }
.fz-quick-add button:active { transform: scale(.95); }
.fz-qe-h { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--fz-muted); margin: 0 0 .55rem; }
.fz-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.fz-cat { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .6rem .25rem .5rem; border-radius: .95rem; border: 1px solid var(--fz-border); background: var(--fz-card); min-height: 5.2rem; transition: transform .12s, border-color .12s, background .12s; }
.fz-cat:active { transform: scale(.96); }
.fz-cat-ic { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .8rem; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.fz-cat-ic svg { width: 1.3rem; height: 1.3rem; }
.fz-cat-name { font-size: .68rem; font-weight: 600; line-height: 1.15; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fz-cat-meta { font-size: .6rem; color: var(--fz-muted); font-variant-numeric: tabular-nums; }
.fz-cat.is-on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--fz-card)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 35%, transparent); }
.fz-cat.is-on .fz-cat-ic { background: var(--c); color: #fff; }
.fz-cat-more { --c: #71717a; border-style: dashed; }
.fz-qe-row { display: flex; flex-direction: column; gap: .6rem; }
.fz-chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .1rem; }
.fz-chips::-webkit-scrollbar { display: none; }
.fz-chips button { flex-shrink: 0; padding: .5rem .9rem; border-radius: 99px; border: 1px solid var(--fz-border); font-size: .82rem; font-weight: 600; color: var(--fz-muted); background: var(--fz-card); white-space: nowrap; min-height: 2.5rem; }
.fz-chips button.is-on { border-color: var(--fz-green); color: var(--fz-success); background: rgb(16 185 129 / .1); }
.fz-chips-sm button { padding: .35rem .75rem; min-height: 2.1rem; font-size: .78rem; }
.fz-note { width: 100%; border-radius: .85rem; border: 1px solid var(--fz-border); background: var(--fz-card); padding: .7rem .9rem; font-size: .9rem; color: inherit; }
.fz-note:focus { outline: none; border-color: var(--fz-green); box-shadow: 0 0 0 3px rgb(16 185 129 / .15); }
.fz-qe-save { position: sticky; bottom: calc(5rem + env(safe-area-inset-bottom)); z-index: 5; }
@media (min-width: 1024px) { .fz-qe-save { bottom: 1rem; } }
.fz-qe-save button { width: 100%; padding: 1rem; border-radius: 1rem; font-weight: 800; font-size: 1rem; color: #fff; background: linear-gradient(145deg, #34d399, #059669); box-shadow: 0 12px 28px -10px rgb(16 185 129 / .7); }
.fz-qe-save button.is-out { background: linear-gradient(145deg, #fb7185, #e11d48); box-shadow: 0 12px 28px -10px rgb(244 63 94 / .7); }
.fz-qe-save button:disabled { opacity: .7; }
.fz-qe-today { border: 1px solid var(--fz-border); border-radius: var(--fz-radius); background: var(--fz-card); padding: .9rem 1rem; }
.fz-qe-today-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.fz-qe-today ul { list-style: none; margin: 0; padding: 0; }
.fz-qe-today li { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--fz-border); font-size: .85rem; }
.fz-qe-today-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fz-qe-today li b { font-variant-numeric: tabular-nums; }
.fz-qe-today li button { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: .6rem; color: var(--fz-muted); }
.fz-qe-today li button:hover { background: var(--fz-track); color: var(--fz-danger); }
.fz-qe-today li button svg { width: 1rem; height: 1rem; }
.fz-qe-foot { text-align: center; font-size: .78rem; color: var(--fz-muted); }
.fz-qe-foot a { color: var(--fz-success); font-weight: 600; }

/* ---------- KPIs compactos ---------- */
.fz-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.fz-kpi { display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem; border-radius: var(--fz-radius); border: 1px solid var(--fz-border); background: var(--fz-card); box-shadow: var(--fz-shadow); }
.fz-kpi span { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fz-muted); }
.fz-kpi b { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fz-kpi small { font-size: .74rem; color: var(--fz-muted); }
@media (max-width: 640px) { .fz-kpis { grid-template-columns: 1fr 1fr; gap: .5rem; } .fz-kpi { padding: .7rem .8rem; } .fz-kpi b { font-size: 1.1rem; } }

/* ---------- Presupuestos ---------- */
.fz-budgets { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.fz-budget { display: flex; flex-direction: column; gap: .5rem; padding: .95rem 1.05rem; border-radius: var(--fz-radius); border: 1px solid var(--fz-border); background: var(--fz-card); box-shadow: var(--fz-shadow); }
.fz-budget-head { display: flex; align-items: center; gap: .5rem; }
.fz-budget-name { flex: 1; font-weight: 700; font-size: .92rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fz-budget-nums { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .2rem .8rem; font-size: .82rem; font-variant-numeric: tabular-nums; }
.fz-budget .fz-bar > span { background: var(--fz-green); }
.fz-b-fast .fz-bar > span { background: var(--fz-amber); }
.fz-b-over .fz-bar > span { background: var(--fz-rose); }
.fz-b-over { border-color: rgb(244 63 94 / .35); }
.fz-budget-edit { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.fz-budget-edit label { display: flex; flex-direction: column; gap: .2rem; font-size: .7rem; color: var(--fz-muted); font-weight: 600; }
.fz-input-money { display: inline-flex; align-items: center; gap: .25rem; border: 1px solid var(--fz-border); border-radius: .7rem; padding: 0 .6rem; background: var(--fz-track); }
.fz-input-money i { font-style: normal; color: var(--fz-muted); font-size: .85rem; }
.fz-input-money input { width: 8.5rem; background: transparent; border: 0; padding: .45rem 0; font-size: .88rem; font-weight: 600; color: inherit; font-variant-numeric: tabular-nums; }
.fz-input-money input:focus { outline: none; box-shadow: none; }
.fz-input-money:focus-within { border-color: var(--fz-green); }
.fz-chip-ok { background: rgb(16 185 129 / .14); color: var(--fz-success); }
.fz-chip-fast { background: rgb(245 158 11 / .16); color: var(--fz-warning); }
.fz-chip-over { background: rgb(244 63 94 / .16); color: var(--fz-danger); }
.fz-chip-none { background: var(--fz-track); color: var(--fz-muted); }
.fz-budgets-mini { margin-top: .75rem; }
.fz-budgets-mini .fz-budget { flex-direction: row; align-items: center; justify-content: space-between; padding: .6rem .8rem; }

/* ---------- Hitos del plan de deudas ---------- */
.fz-milestones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .25rem 1.5rem; counter-reset: ms; }
.fz-milestones li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--fz-border); font-size: .86rem; }
.fz-ms-n { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: rgb(16 185 129 / .15); color: var(--fz-success); font-weight: 800; font-size: .75rem; flex-shrink: 0; }
.fz-ms-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fz-ms-date { font-variant-numeric: tabular-nums; color: var(--fz-muted); font-size: .8rem; }

/* ---------- Estado vacío ---------- */
.fz-empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; padding: 2rem 1.25rem; border-radius: var(--fz-radius); border: 1px dashed rgb(16 185 129 / .4); background: rgb(16 185 129 / .05); }
.fz-empty-state-ic { width: 2.6rem; height: 2.6rem; color: var(--fz-success); }
.fz-empty-state h2 { font-size: 1.05rem; font-weight: 800; margin: 0; }
.fz-empty-state p { max-width: 30rem; font-size: .86rem; color: var(--fz-muted); margin: 0 0 .4rem; line-height: 1.5; }

/* ---------- Celular: compacto y limpio ---------- */
@media (max-width: 1023px) {
    .fz-desktop-only { display: none !important; }
    .fi-topbar .fi-global-search-ctn { display: none !important; }
    .fi-topbar-start { display: flex !important; align-items: center; margin-inline-end: auto; }
    .fi-topbar-start .fi-topbar-collapse-sidebar-btn-ctn { display: none !important; }
    .fi-topbar-start .fi-logo { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }
}
@media (max-width: 640px) {
    .fi-main { padding-left: .85rem !important; padding-right: .85rem !important; }
    .fi-header { gap: .5rem !important; }
    .fi-header-heading { font-size: 1.45rem !important; line-height: 1.2; }
    .fi-header-subheading { font-size: .85rem !important; margin-top: .15rem !important; }
    .fi-page-header-main-ctn, .fi-page-content { row-gap: 1rem !important; }
    .fi-section-header { padding: .85rem 1rem !important; }
    .fi-section-content { padding: .9rem 1rem !important; }
    .fi-section-header-heading { font-size: .98rem !important; }
    .fi-section-header-description { font-size: .78rem !important; }
    .fi-wi-stats-overview-stat { padding: .85rem 1rem !important; }
    .fi-wi-stats-overview-stat-value { font-size: 1.3rem !important; }
    .fz-hero { gap: .75rem; }
    .fz-hero-card { padding: 1rem 1.05rem; }
    .fz-ring { width: 88px; height: 88px; }
    .fz-month { padding: .75rem .9rem; margin-top: .75rem; }
    .fz-tl { grid-template-columns: 2.6rem minmax(0, 1fr) auto; row-gap: .35rem; padding: .65rem 0; }
    .fz-tl-name { font-size: .86rem; }
    .fz-tl-name > span:first-child { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .fz-tl-amount { font-size: .86rem; }
    .fz-tl-actions { grid-column: 2 / -1; }
    .fz-tl-action { padding: .3rem .65rem; font-size: .72rem; }
    .fi-fo-toggle-buttons .fi-btn, .fi-fo-toggle-buttons label { padding: .45rem .7rem !important; font-size: .82rem !important; }
    .fi-ac-btn-group, .fi-header-actions-ctn { flex-wrap: wrap; gap: .4rem !important; }
    .fz-cats { gap: .4rem; }
}
@media (max-width: 360px) { .fz-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.fz-mobile-only { display: none; }
@media (max-width: 767px) { .fz-mobile-only { display: inline; } }

/* ===== v4: Calendario de pagos ===== */
.fz-k-deuda { --k: var(--fz-amber); } .fz-k-fijo { --k: var(--fz-sky); } .fz-k-ingreso { --k: var(--fz-green); } .fz-k-gasto { --k: var(--fz-rose); }
.fz-cal-wrap { display: flex; flex-direction: column; gap: 1rem; }
.fz-cal-progress { height: .4rem; border-radius: 99px; background: var(--fz-track); overflow: hidden; margin-top: -.35rem; }
.fz-cal-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--fz-green), #34d399); border-radius: inherit; transition: width .5s ease; }
.fz-cal-alert { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--fz-radius); background: rgb(244 63 94 / .1); border: 1px solid rgb(244 63 94 / .3); font-size: .85rem; }
.fz-cal-alert svg { width: 1.2rem; height: 1.2rem; color: var(--fz-rose); flex: none; margin-top: .1rem; }
.fz-cal-alert div { display: flex; flex-direction: column; gap: .1rem; } .fz-cal-alert span { color: var(--fz-muted); }
.fz-cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1rem; align-items: start; }
.fz-cal, .fz-cal-detail, .fz-cal-noday { background: var(--fz-card); border: 1px solid var(--fz-border); border-radius: var(--fz-radius); box-shadow: var(--fz-shadow); }
.fz-cal { padding: 1rem; min-width: 0; }
.fz-cal-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.fz-cal-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; min-width: 9.5rem; text-align: center; }
.fz-cal-title span { color: var(--fz-muted); font-weight: 600; }
.fz-cal-nav { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 99px; border: 1px solid var(--fz-border); background: transparent; cursor: pointer; color: inherit; transition: background .15s; }
.fz-cal-nav:hover { background: var(--fz-track); } .fz-cal-nav svg { width: 1.1rem; height: 1.1rem; }
.fz-cal-today { margin-left: auto; font-size: .78rem; font-weight: 700; padding: .4rem .85rem; border-radius: 99px; background: rgb(16 185 129 / .14); color: var(--fz-success); border: 0; cursor: pointer; }
.fz-cal-loading { width: .9rem; height: .9rem; border-radius: 99px; border: 2px solid var(--fz-track); border-top-color: var(--fz-green); animation: fz-spin .7s linear infinite; margin-left: .25rem; }
@keyframes fz-spin { to { transform: rotate(360deg); } }
.fz-cal-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .85rem; }
.fz-cal-filter { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 600; padding: .35rem .7rem; border-radius: 99px; border: 1px solid var(--fz-border); background: transparent; color: var(--fz-muted); cursor: pointer; transition: all .15s; }
.fz-cal-filter i { width: .55rem; height: .55rem; border-radius: 99px; background: var(--k); opacity: .35; }
.fz-cal-filter.is-on { color: inherit; border-color: color-mix(in srgb, var(--k) 45%, transparent); background: color-mix(in srgb, var(--k) 10%, transparent); }
.fz-cal-filter.is-on i { opacity: 1; }
.fz-cal-grid { display: flex; flex-direction: column; gap: .3rem; }
.fz-cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.fz-cal-wd > span { text-align: center; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fz-muted); padding: .2rem 0; }
.fz-cal-cell { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: .2rem; min-height: 6.4rem; padding: .4rem; border-radius: .75rem; border: 1px solid var(--fz-border); background: transparent; text-align: left; cursor: pointer; color: inherit; transition: border-color .15s, background .15s, transform .1s; font: inherit; overflow: hidden; }
.fz-cal-cell:hover { border-color: color-mix(in srgb, var(--fz-green) 45%, transparent); }
.fz-cal-cell:active { transform: scale(.97); }
.fz-cal-cell.is-out { opacity: .3; cursor: default; border-style: dashed; }
.fz-cal-cell.is-past:not(.is-sel) { background: color-mix(in srgb, var(--fz-track) 60%, transparent); }
.fz-cal-cell.is-neg { background: rgb(244 63 94 / .07); border-color: rgb(244 63 94 / .25); }
.fz-cal-cell.is-sel { border-color: var(--fz-green); box-shadow: 0 0 0 1px var(--fz-green) inset; background: rgb(16 185 129 / .06); }
.fz-cal-day { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 99px; flex: none; }
.fz-cal-cell.is-today .fz-cal-day { background: var(--fz-green); color: #fff; }
.fz-cal-cell.has-late .fz-cal-day { box-shadow: 0 0 0 2px var(--fz-rose); }
.fz-cal-evs { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.fz-cal-ev { display: flex; flex-direction: column; gap: 0; font-size: .66rem; line-height: 1.2; padding: .15rem .35rem; border-radius: .35rem; background: color-mix(in srgb, var(--k) 13%, transparent); border-left: 2px solid var(--k); min-width: 0; }
.fz-cal-ev-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fz-cal-ev-amt { font-weight: 700; font-variant-numeric: tabular-nums; opacity: .85; }
.fz-cal-ev.fz-s-pagado, .fz-cal-ev.fz-s-pasado { opacity: .5; } .fz-cal-ev.fz-s-pagado .fz-cal-ev-name { text-decoration: line-through; }
.fz-cal-ev.fz-s-vencido { background: rgb(244 63 94 / .16); border-left-color: var(--fz-rose); }
.fz-cal-more { font-size: .64rem; color: var(--fz-muted); padding-left: .35rem; }
.fz-cal-bal { margin-top: auto; font-size: .62rem; color: var(--fz-muted); font-variant-numeric: tabular-nums; text-align: right; }
.fz-cal-dots { gap: .18rem; justify-content: center; min-height: .4rem; } .fz-cal-dots i { width: .38rem; height: .38rem; border-radius: 99px; background: var(--k); }
.fz-cal-sum { font-size: .62rem; font-weight: 700; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.fz-mob { display: none !important; }
/* detalle del día */
.fz-cal-detail { position: sticky; top: 5rem; padding: 1.1rem; display: flex; flex-direction: column; gap: .9rem; }
.fz-cal-detail header { display: flex; flex-direction: column; gap: .1rem; }
.fz-cal-detail-wd { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--fz-success); }
.fz-cal-detail h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; }
.fz-cal-detail-bal { font-size: .8rem; color: var(--fz-muted); margin-top: .25rem; } .fz-cal-detail-bal b { font-variant-numeric: tabular-nums; }
.fz-cal-empty { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.2rem 0; color: var(--fz-muted); font-size: .85rem; }
.fz-cal-empty svg { width: 1.8rem; height: 1.8rem; color: var(--fz-green); }
.fz-cal-list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.fz-cal-list li { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr) auto; gap: .65rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--fz-border); }
.fz-cal-list li:last-child { border-bottom: 0; }
.fz-cal-ic { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .65rem; background: color-mix(in srgb, var(--k) 15%, transparent); color: var(--k); }
.fz-cal-ic svg { width: 1rem; height: 1rem; }
.fz-cal-list-body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.fz-cal-list-body b { font-size: .86rem; line-height: 1.3; }
.fz-cal-list-body small { font-size: .72rem; color: var(--fz-muted); }
.fz-cal-list-amt { font-weight: 800; font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fz-cal-list li.fz-s-pagado .fz-cal-list-amt { text-decoration: line-through; color: var(--fz-muted); }
.fz-cal-list-actions { grid-column: 2 / -1; display: flex; gap: .4rem; }
.fz-chip-st-pagado, .fz-chip-st-ingreso { background: rgb(16 185 129 / .14); color: var(--fz-success); }
.fz-chip-st-vencido { background: rgb(244 63 94 / .16); color: var(--fz-danger); }
.fz-chip-st-hoy, .fz-chip-st-pronto { background: rgb(245 158 11 / .16); color: var(--fz-warning); }
.fz-chip-st-proximo, .fz-chip-st-pasado, .fz-chip-st-real { background: var(--fz-track); color: var(--fz-muted); }
.fz-cal-list small .fz-chip { font-size: .62rem; padding: .05rem .4rem; white-space: nowrap; display: inline-block; }
.fz-cal-add { display: flex; align-items: center; justify-content: center; gap: .4rem; font-size: .82rem; font-weight: 700; padding: .65rem; border-radius: .8rem; border: 1px dashed var(--fz-border); color: var(--fz-success); text-decoration: none; }
.fz-cal-add:hover { background: rgb(16 185 129 / .08); } .fz-cal-add svg { width: 1rem; height: 1rem; }
/* gastos fijos sin día */
.fz-cal-noday { padding: 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.fz-cal-noday h2 { font-size: 1rem; font-weight: 800; } .fz-cal-noday p { font-size: .8rem; color: var(--fz-muted); margin: .15rem 0 0; }
.fz-cal-noday ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; }
.fz-cal-noday li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .7rem; border-radius: .75rem; border: 1px solid var(--fz-border); border-left: 3px solid var(--fz-sky); }
.fz-cal-noday li div { display: flex; flex-direction: column; min-width: 0; } .fz-cal-noday li b { font-size: .83rem; } .fz-cal-noday li small { font-size: .72rem; color: var(--fz-muted); }
.fz-cal-noday input { width: 3.6rem; text-align: center; font-weight: 700; padding: .45rem; border-radius: .6rem; border: 1px solid var(--fz-border); background: var(--fz-track); color: inherit; font-size: 1rem; }
.fz-cal-noday input:focus { outline: 2px solid var(--fz-green); outline-offset: 1px; }

@media (max-width: 1100px) {
    .fz-cal-layout { grid-template-columns: minmax(0, 1fr); }
    .fz-cal-detail { position: static; }
}
@media (max-width: 767px) {
    .fz-desk { display: none !important; }
    .fz-mob { display: inline !important; }
    .fz-cal-dots.fz-mob { display: flex !important; }
    .fz-cal-sum.fz-mob { display: block !important; }
    .fz-cal { padding: .75rem .55rem; }
    .fz-cal-head { justify-content: center; }
    .fz-cal-title { font-size: 1.1rem; min-width: 8rem; }
    .fz-cal-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .1rem; }
    .fz-cal-filter { flex: none; }
    .fz-cal-row, .fz-cal-grid { gap: .2rem; }
    .fz-cal-cell { min-height: 3.7rem; padding: .25rem .1rem; align-items: center; border-radius: .6rem; gap: .15rem; }
    .fz-cal-day { font-size: .78rem; width: 1.5rem; height: 1.5rem; }
    .fz-cal-detail { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .fz-cal-progress i, .fz-cal-cell { transition: none; } .fz-cal-loading { animation: none; } }
