/* ═══════════════════════════════════════════════════════════════════
   Balza GLP — tema "Corporativo oscuro"
   Barra lateral azul noche · contenido claro · acento naranja energía
   ═══════════════════════════════════════════════════════════════════ */
:root {
    --bz-navy-900: #0b1422;
    --bz-navy-800: #0f1b2d;
    --bz-navy-700: #16263d;
    --bz-navy-600: #1f3350;
    --bz-accent: #f97316;
    --bz-accent-soft: rgba(249, 115, 22, .14);
    --bz-bg: #f4f6f9;
    --bz-card: #ffffff;
    --bz-line: #e6eaf0;
    --bz-ink: #0f1b2d;
    --bz-muted: #64748b;
    --bz-radius: 14px;
    --bz-shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 6px 18px rgba(15, 27, 45, .05);
}

/* ─── Base ─── */
.fi-body { background: var(--bz-bg) !important; color: var(--bz-ink); -webkit-font-smoothing: antialiased; }
.dark .fi-body { background: #0a111c !important; }

/* ─── Logo ─── */
.bz-logo { display: inline-flex; align-items: center; gap: .6rem; color: inherit; line-height: 1; }
.bz-logo-mark { flex: 0 0 auto; filter: drop-shadow(0 2px 6px rgba(249, 115, 22, .35)); }
.bz-logo-text { display: inline-flex; align-items: baseline; gap: .35rem; }
.bz-logo-name { font-weight: 800; font-size: 1.15rem; letter-spacing: .12em; }
.bz-logo-tag { font-weight: 800; font-size: .66rem; letter-spacing: .12em; color: #fff; background: var(--bz-accent); padding: .22rem .38rem; border-radius: .35rem; }
.fi-topbar .bz-logo { color: var(--bz-ink); }
.dark .fi-topbar .bz-logo { color: #fff; }

/* ─── Barra lateral ─── */
.fi-sidebar {
    background: linear-gradient(180deg, var(--bz-navy-800) 0%, var(--bz-navy-900) 100%) !important;
    border-inline-end: 0 !important;
    box-shadow: 4px 0 24px rgba(11, 20, 34, .18);
}
.fi-sidebar-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, .07) !important;
    box-shadow: none !important;
    color: #fff;
}
.fi-sidebar-header .bz-logo { color: #fff; }
.fi-sidebar-nav { padding-top: 1rem !important; }
.fi-sidebar-nav::-webkit-scrollbar { width: 6px; }
.fi-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 3px; }

.fi-sidebar-group-label {
    color: rgba(148, 163, 184, .75) !important;
    text-transform: uppercase; letter-spacing: .09em; font-size: .68rem !important; font-weight: 700 !important;
}
.fi-sidebar-group-btn .fi-icon, .fi-sidebar-group-collapse-btn .fi-icon { color: rgba(148, 163, 184, .6) !important; }
.fi-sidebar-group-collapse-btn:hover { background: rgba(255, 255, 255, .05) !important; }

.fi-sidebar-item-btn {
    border-radius: 10px !important;
    transition: background .15s, color .15s;
}
.fi-sidebar-item-label { color: #cbd5e1 !important; font-weight: 500 !important; }
.fi-sidebar-item-icon { color: #7c8ba1 !important; }
.fi-sidebar-item-btn:hover { background: rgba(255, 255, 255, .06) !important; }
.fi-sidebar-item-btn:hover .fi-sidebar-item-label { color: #fff !important; }
.fi-sidebar-item-btn:hover .fi-sidebar-item-icon { color: #e2e8f0 !important; }

.fi-sidebar-item.fi-active .fi-sidebar-item-btn {
    background: linear-gradient(90deg, rgba(249, 115, 22, .22), rgba(249, 115, 22, .06)) !important;
    box-shadow: inset 3px 0 0 var(--bz-accent);
}
.fi-sidebar-item.fi-active .fi-sidebar-item-label { color: #fff !important; font-weight: 600 !important; }
.fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: var(--bz-accent) !important; }
.fi-sidebar-item-badge-ctn .fi-badge { box-shadow: none !important; }

/* Botón de colapsar y demás íconos dentro de la barra */
.fi-sidebar .fi-icon-btn { color: #94a3b8 !important; }
.fi-sidebar .fi-icon-btn:hover { background: rgba(255, 255, 255, .06) !important; color: #fff !important; }

/* ─── Barra superior ─── */
.fi-topbar {
    background: rgba(255, 255, 255, .82) !important;
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--bz-line) !important;
    box-shadow: none !important;
}
.dark .fi-topbar { background: rgba(15, 23, 35, .85) !important; border-color: rgba(255, 255, 255, .06) !important; }
.fi-topbar .fi-input-wrp { border-radius: 10px !important; background: #f1f4f8 !important; box-shadow: none !important; border: 1px solid transparent; }
.fi-topbar .fi-input-wrp:focus-within { background: #fff !important; border-color: var(--bz-accent); }
.dark .fi-topbar .fi-input-wrp { background: rgba(255, 255, 255, .05) !important; }
.fi-user-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--bz-accent-soft); }

/* ─── Encabezado de página ─── */
.fi-header-heading { font-weight: 800 !important; letter-spacing: -.02em; color: var(--bz-ink); }
.dark .fi-header-heading { color: #f1f5f9; }
.fi-header-subheading { color: var(--bz-muted) !important; max-width: 70ch; }

/* ─── Tarjetas / secciones / tablas ─── */
.fi-section, .fi-ta-ctn, .fi-wi-widget > .fi-section, .fi-fo-tabs, .fi-sc-tabs, .fi-tabs {
    border-radius: var(--bz-radius) !important;
}
.fi-section, .fi-ta-ctn {
    box-shadow: var(--bz-shadow) !important;
    border: 1px solid var(--bz-line);
    --tw-ring-shadow: 0 0 #0000 !important;
}
.dark .fi-section, .dark .fi-ta-ctn { border-color: rgba(255, 255, 255, .07); }
.fi-ta-header-cell { text-transform: uppercase; letter-spacing: .05em; font-size: .7rem !important; color: var(--bz-muted) !important; font-weight: 700 !important; }
.fi-ta-row:hover { background: #fafbfd !important; }
.dark .fi-ta-row:hover { background: rgba(255, 255, 255, .02) !important; }

/* Botones */
.fi-btn { border-radius: 10px !important; font-weight: 600 !important; }
.fi-btn.fi-color-primary:not(.fi-outlined) { box-shadow: 0 4px 12px rgba(249, 115, 22, .28) !important; }

/* Pestañas */
.fi-tabs { box-shadow: var(--bz-shadow) !important; }

/* Tarjetas propias (resumen, KPIs) al mismo estilo */
.bz-kpi { border-radius: 12px !important; border-color: var(--bz-line) !important; box-shadow: var(--bz-shadow); }
.bz-map { border-radius: 12px !important; box-shadow: var(--bz-shadow); }
.bz-cal { border-radius: var(--bz-radius) !important; box-shadow: var(--bz-shadow); border-color: var(--bz-line) !important; }
.bz-help { border-radius: 12px !important; }

/* ─── Modelos y ejemplos de documentación ─── */
.bz-ex { display: grid; gap: .75rem; }
.bz-ex-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.bz-ex-badge { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: .2rem .55rem; border-radius: 999px; }
.bz-ex-b-off { background: #dbeafe; color: #1e40af; }
.bz-ex-b-ej { background: #ffedd5; color: #9a3412; }
.bz-ex-b-ck { background: #e2e8f0; color: #334155; }
.bz-ex-ref { font-size: .8rem; color: var(--bz-muted); }
.bz-ex-figure { background: #fff; border: 1px solid var(--bz-line); border-radius: 12px; padding: .5rem; }
.bz-ex-svg { width: 100%; height: auto; display: block; font-family: Inter, system-ui, sans-serif; }
.bz-ex-svg .bz-ex-label { font-size: 14px; font-weight: 800; fill: #0f172a; }
.bz-ex-svg .bz-ex-small { font-size: 11.5px; fill: #334155; }
.bz-ex-svg .bz-ex-tiny { font-size: 9.5px; fill: #334155; font-weight: 700; }
.bz-ex-svg .bz-ex-dim { font-size: 11.5px; font-weight: 700; fill: #1d4ed8; }
.bz-ex-svg .bz-ex-num { font-size: 12px; font-weight: 800; fill: #0f172a; }
.bz-ex-h { font-weight: 800; font-size: .95rem; margin: .25rem 0 0; }
.bz-ex-check { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.bz-ex-check li { padding-left: 1.6rem; position: relative; font-size: .9rem; }
.bz-ex-check li::before { content: "✓"; position: absolute; left: .2rem; top: 0; color: #16a34a; font-weight: 800; }
.bz-ex-table { border-collapse: collapse; width: 100%; font-size: .85rem; }
.bz-ex-table th, .bz-ex-table td { border: 1px solid var(--bz-line); padding: .4rem .55rem; text-align: left; vertical-align: top; }
.bz-ex-table th { background: #fff7ed; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.bz-ex-note, .bz-ex-disclaimer { font-size: .78rem; color: var(--bz-muted); margin: 0; }
.bz-ex-disclaimer { border-top: 1px dashed var(--bz-line); padding-top: .5rem; }
.bz-ex-notes summary { cursor: pointer; font-weight: 700; font-size: .85rem; color: #9a3412; }
.bz-ex-notes ul { margin: .4rem 0 0 1.1rem; list-style: disc; display: grid; gap: .3rem; font-size: .85rem; }
.bz-ex-official { margin: 0; background: #fff; border: 1px solid var(--bz-line); border-radius: 12px; padding: .5rem; }
.bz-ex-official img { width: 100%; height: auto; display: block; border-radius: 6px; }
.bz-ex-official figcaption { font-size: .75rem; color: var(--bz-muted); margin-top: .35rem; }
.bz-ex-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.bz-ex-card { display: flex; flex-direction: column; gap: .4rem; padding: 1rem; background: #fff; border: 1px solid var(--bz-line); border-radius: 14px; box-shadow: var(--bz-shadow); text-decoration: none; color: inherit; transition: transform .12s; }
.bz-ex-card:hover { transform: translateY(-2px); }
.bz-ex-card b { font-size: .95rem; }
.bz-ex-card small { color: var(--bz-muted); font-size: .78rem; }
.dark .bz-ex-figure, .dark .bz-ex-official, .dark .bz-ex-card { background: rgb(24 24 27); border-color: rgba(255,255,255,.1); }
.dark .bz-ex-figure { background: #fff; }

/* ─── Pantalla de ingreso ─── */
.fi-simple-layout {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(249, 115, 22, .18), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(56, 189, 248, .10), transparent 60%),
        linear-gradient(160deg, var(--bz-navy-800) 0%, var(--bz-navy-900) 100%) !important;
    min-height: 100vh;
}
.fi-simple-layout::before {
    content: ""; position: fixed; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent 80%);
}
.fi-simple-main {
    border-radius: 20px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35) !important;
    border: 1px solid rgba(255, 255, 255, .6);
    position: relative;
}
.fi-simple-header .bz-logo { color: var(--bz-ink); transform: scale(1.25); margin-bottom: .6rem; }
.dark .fi-simple-header .bz-logo { color: #fff; }
.fi-simple-header-heading { font-weight: 800 !important; letter-spacing: -.02em; }
.bz-login-tagline { text-align: center; color: var(--bz-muted); font-size: .88rem; margin: -.4rem 0 .6rem; }
.bz-login-foot { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(203, 213, 225, .55); font-size: .75rem; }
