:root {
    --color-muni-navy: #12335c;
    --color-muni-blue: #1f5b91;
    --color-muni-cyan: #00a6a6;
    --color-muni-red: #e84a4a;
    --color-muni-yellow: #f2c14e;
    --color-muni-green: #36a269;
}

body { background: #f8fafc; }
::selection { background: #cffafe; color: #12335c; }

.sigati-sidebar-classic {
    background: linear-gradient(180deg, #12335c 0%, #17466f 48%, #1f5b91 100%);
}
.sigati-sidebar-classic .nav-link { color: #e0f2fe; font-weight: 650; text-shadow: 0 1px 1px rgb(15 23 42 / 22%); }
.sigati-sidebar-classic .nav-link:hover { color: #fff; background: rgb(255 255 255 / 16%); }
.sigati-sidebar-classic .nav-link-active,
.sigati-sidebar-classic .nav-link-active:hover { color: #12335c; background: #fff; box-shadow: 0 8px 24px rgb(15 23 42 / 18%); text-shadow: none; }
.sigati-sidebar-classic .nav-link-active svg { color: #1f5b91; }
.sigati-sidebar-classic nav section > p { color: #bae6fd; opacity: 1; text-shadow: 0 1px 1px rgb(15 23 42 / 22%); }
.sigati-sidebar-classic .text-blue-100,
.sigati-sidebar-classic .text-blue-200 { color: #e0f2fe !important; }

.dashboard-level-heading { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:.75rem; border-bottom:1px solid #cffafe; padding-bottom:.75rem; }
.dashboard-stat-card::after { position:absolute; right:0; bottom:0; left:0; height:.25rem; content:''; background:linear-gradient(90deg,#1f5b91 0%,#0284c7 50%,#00a6a6 100%); opacity:0; transition:opacity .2s ease; }
.dashboard-stat-card:hover::after { opacity:1; }
.dashboard-bar-fill { background:linear-gradient(90deg,#1f5b91 0%,#0284c7 50%,#00a6a6 100%); box-shadow:0 0 16px rgb(2 132 199 / 22%); }
.trend-chart { width:100%; height:18rem; min-height:18rem; overflow:hidden; padding:.5rem; border:1px solid #cffafe; border-radius:1rem; background:linear-gradient(180deg,rgb(240 249 255 / 80%) 0%,#fff 100%); }
.trend-chart svg { width:100%; height:100%; overflow:visible; }
.trend-chart-grid { stroke:#bae6fd; stroke-width:1; stroke-dasharray:4 5; }
.trend-chart-axis-label { fill:#64748b; font-size:11px; font-weight:600; }
.trend-chart-line { fill:none; stroke-width:3.5; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 4px 4px rgb(18 51 92 / 12%)); }
.trend-chart-point { stroke:#fff; stroke-width:3; }
.bg-gradient-to-br.from-muni-navy.via-muni-blue.to-muni-cyan { background-image:linear-gradient(135deg,#12335c 0%,#1f5b91 52%,#00a6a6 100%) !important; }
[data-donut] circle:first-child { stroke:#e0f2fe; }
@media (max-width:640px) { .trend-chart { height:15rem; min-height:15rem; } .sigati-sidebar-classic { width:min(19rem,88vw); } }

/* SIGATI Gran Coloso 4.3.8 · Panel Ejecutivo Inteligente */
.dashboard-command-bar {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    padding:1rem 1.1rem;
    border:1px solid #dbeafe;
    border-radius:1rem;
    background:linear-gradient(135deg,#fff 0%,#f0f9ff 100%);
    box-shadow:0 10px 28px rgb(18 51 92 / 7%);
}
.dashboard-period-selector { display:flex; flex-wrap:wrap; gap:.5rem; }
.dashboard-period-option,
.dashboard-period-active {
    display:inline-flex;
    min-height:2.25rem;
    align-items:center;
    justify-content:center;
    border-radius:.75rem;
    padding:.45rem .85rem;
    font-size:.75rem;
    font-weight:800;
    transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.dashboard-period-option { border:1px solid #bfdbfe; background:#fff; color:#1f5b91; }
.dashboard-period-option:hover { transform:translateY(-1px); background:#eff6ff; }
.dashboard-period-active { border:1px solid #12335c; background:#12335c; color:#fff; box-shadow:0 8px 18px rgb(18 51 92 / 20%); }
.executive-health-card {
    position:relative;
    min-height:21rem;
    overflow:hidden;
    border-radius:1.5rem;
    padding:1.5rem;
    background:
        radial-gradient(circle at 85% 10%,rgb(103 232 249 / 26%) 0,transparent 30%),
        linear-gradient(145deg,#12335c 0%,#1f5b91 58%,#008f98 100%);
    box-shadow:0 18px 42px rgb(18 51 92 / 24%);
}
.executive-health-card::after {
    position:absolute;
    right:-4rem;
    bottom:-5rem;
    width:15rem;
    height:15rem;
    border:1px solid rgb(255 255 255 / 16%);
    border-radius:999px;
    content:'';
    box-shadow:0 0 0 2rem rgb(255 255 255 / 4%),0 0 0 4rem rgb(255 255 255 / 3%);
}
.executive-health-ring {
    display:flex;
    width:5.75rem;
    height:5.75rem;
    flex:none;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    color:#fff;
    font-size:1rem;
    box-shadow:inset 0 0 0 1px rgb(255 255 255 / 12%),0 12px 28px rgb(0 0 0 / 18%);
}
.dashboard-comparison-card {
    position:relative;
    overflow:hidden;
    border:1px solid #e2e8f0;
    border-radius:1.25rem;
    padding:1.1rem;
    background:#fff;
    box-shadow:0 10px 25px rgb(15 23 42 / 6%);
    transition:transform .18s ease, box-shadow .18s ease;
}
.dashboard-comparison-card:hover { transform:translateY(-2px); box-shadow:0 16px 32px rgb(18 51 92 / 10%); }
.dashboard-comparison-card::after { position:absolute; right:0; bottom:0; left:0; height:.2rem; content:''; background:linear-gradient(90deg,#1f5b91,#00a6a6); }
.dashboard-delta { display:inline-flex; align-items:center; gap:.2rem; border-radius:999px; padding:.25rem .55rem; font-size:.7rem; font-weight:900; }
.dashboard-delta-up { background:#ecfdf5; color:#047857; }
.dashboard-delta-down { background:#fff1f2; color:#be123c; }
.dashboard-delta-flat { background:#f1f5f9; color:#64748b; }
.dashboard-priority-row {
    display:flex;
    align-items:center;
    gap:.85rem;
    border-width:1px;
    border-radius:1rem;
    padding:.85rem;
    transition:transform .15s ease, box-shadow .15s ease;
}
.dashboard-priority-row:hover { transform:translateX(2px); box-shadow:0 8px 22px rgb(15 23 42 / 7%); }
.dashboard-mini-stat { border:1px solid #dbeafe; border-radius:1rem; padding:.9rem; background:linear-gradient(145deg,#fff,#f0f9ff); }
.dashboard-mini-stat span { display:block; color:#64748b; font-size:.72rem; font-weight:700; }
.dashboard-mini-stat strong { display:block; margin-top:.35rem; color:#12335c; font-size:1.55rem; line-height:1; font-weight:900; }
.dashboard-quick-action {
    display:flex;
    min-height:3.25rem;
    align-items:center;
    gap:.65rem;
    border:1px solid #dbeafe;
    border-radius:1rem;
    padding:.8rem 1rem;
    background:linear-gradient(135deg,#fff 0%,#f0f9ff 100%);
    color:#12335c;
    font-size:.82rem;
    font-weight:850;
    transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.dashboard-quick-action:hover { transform:translateY(-1px); border-color:#38bdf8; box-shadow:0 10px 22px rgb(2 132 199 / 11%); color:#1f5b91; }
@media (max-width:640px) {
    .dashboard-command-bar { align-items:flex-start; }
    .dashboard-period-selector { width:100%; }
    .dashboard-period-option,.dashboard-period-active { flex:1; }
    .executive-health-card { min-height:19rem; padding:1.25rem; }
    .executive-health-ring { width:4.8rem; height:4.8rem; }
    .dashboard-priority-row { align-items:flex-start; }
}

/* SIGATI Gran Coloso 4.3.8 · selección simultánea de fotografías y archivos */
.multi-file-zone {
    border:1px dashed #93c5fd;
    border-radius:1rem;
    padding:1rem;
    background:linear-gradient(145deg,#fff 0%,#f0f9ff 100%);
    transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.multi-file-zone-active {
    border-color:#0891b2;
    background:#ecfeff;
    box-shadow:0 0 0 3px rgb(6 182 212 / 12%);
}
.multi-file-preview { margin-top:.85rem; }
.multi-file-summary { color:#475569; font-size:.75rem; font-weight:800; }
.multi-file-message { margin-top:.35rem; color:#64748b; font-size:.75rem; line-height:1.4; }
.multi-file-message[data-tone="success"] { color:#047857; }
.multi-file-message[data-tone="error"] { color:#be123c; }
.multi-file-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(10.5rem,1fr));
    gap:.75rem;
    margin-top:.75rem;
}
.multi-file-item {
    min-width:0;
    overflow:hidden;
    border:1px solid #dbeafe;
    border-radius:.9rem;
    background:#fff;
    box-shadow:0 7px 18px rgb(15 23 42 / 6%);
}
.multi-file-visual {
    display:flex;
    height:7.5rem;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    background:#e0f2fe;
}
.multi-file-visual img { width:100%; height:100%; object-fit:cover; }
.multi-file-extension {
    display:flex;
    width:3.75rem;
    height:3.75rem;
    align-items:center;
    justify-content:center;
    border-radius:1rem;
    background:#12335c;
    color:#fff;
    font-size:.75rem;
    font-weight:900;
    letter-spacing:.04em;
}
.multi-file-body { padding:.7rem; }
.multi-file-name {
    overflow:hidden;
    color:#12335c;
    font-size:.78rem;
    font-weight:850;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.multi-file-meta { margin-top:.2rem; color:#64748b; font-size:.68rem; }
.multi-file-remove {
    margin-top:.55rem;
    border:1px solid #fecdd3;
    border-radius:.65rem;
    padding:.3rem .55rem;
    background:#fff1f2;
    color:#be123c;
    font-size:.68rem;
    font-weight:850;
}
.multi-file-remove:hover { border-color:#fb7185; background:#ffe4e6; }
@media (max-width:640px) {
    .multi-file-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .multi-file-visual { height:6.25rem; }
}

/* SIGATI 4.3.8 · Pulso operativo contextual */
.sigati-pulse {
    --pulse-accent: #047857;
    margin: 1rem 1rem 0;
    padding: .8rem 1rem;
    border: 1px solid #a7f3d0;
    border-radius: 1rem;
    background: rgba(236, 253, 245, .96);
    color: #064e3b;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sigati-pulse--warning {
    --pulse-accent: #b45309;
    border-color: #fde68a;
    background: rgba(255, 251, 235, .97);
    color: #78350f;
}
.sigati-pulse--critical {
    --pulse-accent: #be123c;
    border-color: #fecdd3;
    background: rgba(255, 241, 242, .97);
    color: #881337;
}
.sigati-pulse__summary {
    min-width: 15rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.sigati-pulse__signal {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .9rem;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .1);
    display: grid;
    place-items: center;
    position: relative;
}
.sigati-pulse__signal::before,
.sigati-pulse__signal span {
    content: '';
    width: .72rem;
    height: .72rem;
    border-radius: 999px;
    background: var(--pulse-accent);
}
.sigati-pulse__signal::before {
    position: absolute;
    animation: sigati-pulse-wave 1.8s ease-out infinite;
}
@keyframes sigati-pulse-wave {
    0% { transform: scale(.8); opacity: .45; }
    75%, 100% { transform: scale(2.8); opacity: 0; }
}
.sigati-pulse__eyebrow {
    margin: 0;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .68;
}
.sigati-pulse__status {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}
.sigati-pulse__status strong { font-size: 1.05rem; font-weight: 900; }
.sigati-pulse__status span { font-size: .74rem; font-weight: 800; opacity: .7; }
.sigati-pulse__items {
    min-width: 0;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .5rem;
}
.sigati-pulse__item,
.sigati-pulse__empty {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: .8rem;
    background: rgba(255, 255, 255, .88);
    color: #334155;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.sigati-pulse__item {
    padding: .55rem .65rem;
    display: flex;
    align-items: center;
    gap: .65rem;
}
.sigati-pulse__item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}
.sigati-pulse__item--critico:hover { border-color: #fb7185; }
.sigati-pulse__item--alto:hover { border-color: #fb923c; }
.sigati-pulse__item--medio:hover { border-color: #fbbf24; }
.sigati-pulse__item--bajo:hover { border-color: #38bdf8; }
.sigati-pulse__value { color: #12335c; font-size: 1.28rem; font-weight: 900; }
.sigati-pulse__copy { min-width: 0; display: block; }
.sigati-pulse__title,
.sigati-pulse__detail { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sigati-pulse__title { font-size: .72rem; font-weight: 900; }
.sigati-pulse__detail { margin-top: .08rem; font-size: .64rem; color: #64748b; }
.sigati-pulse__arrow { margin-left: auto; opacity: .45; }
.sigati-pulse__empty {
    grid-column: 1 / -1;
    padding: .65rem .9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #047857;
    font-size: .8rem;
    font-weight: 800;
}
@media (max-width: 1279px) {
    .sigati-pulse { align-items: stretch; flex-direction: column; }
    .sigati-pulse__items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
    .sigati-pulse { margin-inline: .75rem; padding: .75rem; }
    .sigati-pulse__summary { min-width: 0; }
    .sigati-pulse__items { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .sigati-pulse__signal::before { animation: none; }
    .sigati-pulse__item { transition: none; }
}

/* SIGATI 4.4.0 · Punto 2 R2 · Menú lateral automático por proximidad */
[data-sidebar-action-icon] { display:none; }

@media (min-width:1024px) {
    [data-sidebar] {
        width:5.25rem !important;
        transition:width .2s ease, box-shadow .2s ease;
        will-change:width;
    }
    [data-shell-content] {
        padding-left:5.25rem !important;
        transition:padding-left .2s ease;
    }

    [data-sidebar][data-sidebar-auto-hover="true"][data-sidebar-collapsed="false"] {
        width:18rem !important;
        box-shadow:0 18px 55px rgb(15 23 42 / 28%);
    }

    [data-sidebar][data-sidebar-collapsed="true"] > div:first-of-type {
        justify-content:center;
        padding-left:.75rem;
        padding-right:.75rem;
    }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-brand] > div {
        justify-content:center;
        gap:0;
    }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-brand] > div > div:last-child { display:none; }

    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-scroll] {
        padding-left:.7rem;
        padding-right:.7rem;
    }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-group] { margin-bottom:.8rem; }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-group-label] {
        height:1px;
        margin:.6rem .4rem .7rem;
        padding:0;
        overflow:hidden;
        background:rgb(186 230 253 / 32%);
        color:transparent;
    }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-nav-link] {
        min-height:2.85rem;
        justify-content:center;
        gap:0;
        padding:.7rem;
    }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-nav-link] svg {
        width:1.2rem;
        height:1.2rem;
    }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-link-label] { display:none; }

    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-user] { padding:.75rem .65rem; }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-user] > div:first-child {
        justify-content:center;
        gap:0;
    }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-user-details] { display:none; }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-user-actions] {
        grid-template-columns:1fr;
        gap:.4rem;
    }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-user-actions] .btn {
        width:100%;
        padding-left:.4rem;
        padding-right:.4rem;
    }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-action-label] { display:none; }
    [data-sidebar][data-sidebar-collapsed="true"] [data-sidebar-action-icon] {
        display:inline;
        font-weight:900;
    }
}

@media (min-width:1024px) and (hover:none), (min-width:1024px) and (pointer:coarse) {
    [data-sidebar] { width:18rem !important; }
    [data-shell-content] { padding-left:18rem !important; }
}

@media (prefers-reduced-motion:reduce) {
    [data-sidebar], [data-shell-content] { transition:none !important; }
}

