/* ============================================================
   SIGI — DASHBOARD PÚBLICO (Mobile-First)
   Base móvil · Desktop como expansión · Bootstrap Icons
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-dark:       #0d1117;
    --bg-card:       #161b22;
    --bg-panel:      rgba(13, 17, 23, 0.96);
    --azul:          #1f6feb;
    --azul-hover:    #388bfd;
    --acento:        #46d6f7;
    --texto:         #e6edf3;
    --texto-suave:   #8b949e;
    --borde:         rgba(255, 255, 255, 0.08);
    --rojo:          #f85149;
    --amarillo:      #e3b341;
    --magenta:       #bc8cff;
    --verde:         #3fb950;
    --radio:         10px;
    --sombra:        0 4px 16px rgba(0, 0, 0, 0.4);
    --header-h:      48px;
    --bottom-nav-h:  64px;
    --fab-size:      52px;
    --safe-bottom:   env(safe-area-inset-bottom, 0px);
}

.contFlex           { display: flex; }
.contFlexCent       { display: flex; align-items: center; }
.contFlexCentColumn { display: flex; justify-content: center; align-items: center; flex-direction: column; }

.desktop-only { display: none !important; }
.mobile-only  { display: flex; }

.icono-desktop,
.texto-desktop { display: none; }

.icono-mobile { display: inline; }

.esconder { display: none !important; }

/* ── Feedback táctil global ── */
button:active,
.bottom-nav-item:active,
.incidente:active,
.fab:active {
    transform: scale(0.94);
    opacity: 0.88;
}

/* ════════════════════════════════
   HEADER (compacto en móvil)
════════════════════════════════ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    width: 100%;
    height: var(--header-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--borde);
    padding: 0 1rem;
    display: flex;
    align-items: center;
}

nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

nav h1 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--acento);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

nav h1 i {
    color: var(--verde);
    font-size: 1.35rem;
}

.nav-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

.titulo-completo { display: none; }
.titulo-corto    { display: inline; }

/* ════════════════════════════════
   BOTTOM NAVIGATION (móvil)
════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2100;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-card);
    border-top: 1px solid var(--borde);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
    justify-content: space-around;
    align-items: stretch;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: transparent;
    color: var(--texto-suave);
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease;
    padding: 6px 4px;
}

.bottom-nav-item i {
    font-size: 1.35rem;
    transition: transform 0.2s ease;
}

.bottom-nav-item.active {
    color: var(--acento);
}

.bottom-nav-item.active i {
    transform: scale(1.08);
}

/* ════════════════════════════════
   MAIN / MAPA
════════════════════════════════ */
main {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
    width: 100%;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

/* ════════════════════════════════
   FAB — Botones flotantes
════════════════════════════════ */
.fab {
    position: absolute;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--borde);
    cursor: pointer;
    box-shadow: var(--sombra);
    transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.fab-filtros {
    bottom: calc(72px + var(--safe-bottom));
    left: 16px;
    width: var(--fab-size);
    height: var(--fab-size);
    border-radius: 50%;
    background: var(--azul);
    color: #fff;
    font-size: 1.25rem;
    border-color: transparent;
}

.fab-filtros:active {
    background: var(--azul-hover);
}

.fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--rojo);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.fab-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.fab-reset {
    bottom: calc(72px + var(--safe-bottom));
    right: 16px;
    width: var(--fab-size);
    height: var(--fab-size);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--texto-suave);
    font-size: 1.2rem;
}

.fab-reset:active {
    background: var(--rojo);
    color: #fff;
    border-color: var(--rojo);
}

.fab-reset .texto-desktop {
    display: none;
}

/* Ocultar FAB cuando el panel de filtros está abierto */
main.filtros-abiertos .fab-filtros,
main.filtros-abiertos .fab-reset {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* ════════════════════════════════
   OVERLAY + BOTTOM SHEET (filtros)
════════════════════════════════ */
.filtros-overlay {
    position: fixed;
    inset: 0;
    top: var(--header-h);
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
    background: rgba(0, 0, 0, 0.55);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.filtros-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#panelFiltros {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-panel);
    border: 1px solid var(--borde);
    border-radius: 18px 18px 0 0;
    z-index: 1002;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.35s ease;
}

#panelFiltros.abierto {
    transform: translateY(0);
    visibility: visible;
}

#panelFiltros::-webkit-scrollbar { width: 4px; }
#panelFiltros::-webkit-scrollbar-track { background: transparent; }
#panelFiltros::-webkit-scrollbar-thumb { background: var(--borde); border-radius: 4px; }

#cerrarFiltros {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--texto);
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
}

#cerrarFiltros:active {
    background: rgba(248, 81, 73, 0.25);
    color: var(--rojo);
}

.contenedorFiltros {
    padding: 20px 16px 28px;
    color: var(--texto);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contenedorFiltros h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    padding-right: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--acento);
}

.contenedorFiltros label {
    font-size: 0.72rem;
    color: var(--texto-suave);
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.contenedorFiltros input {
    width: 100%;
    padding: 14px 14px;
    border-radius: 12px;
    border: 1px solid var(--borde);
    background: rgba(255, 255, 255, 0.05);
    color: var(--texto);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.contenedorFiltros input:focus {
    outline: none;
    border-color: var(--azul);
}

.contenedorFiltros input::placeholder { color: var(--texto-suave); }

#sugerencias {
    position: relative;
    width: 100%;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--borde);
    border-radius: 0 0 12px 12px;
    max-height: 140px;
    overflow-y: auto;
    box-shadow: var(--sombra);
}

.itemSugerencia {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--texto);
    transition: background 0.2s;
}

.itemSugerencia:active {
    background: var(--azul);
    color: #fff;
}

/* Chips de tipo de incidente */
.tiposIncidente {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.incidente {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--borde);
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--texto);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 44px;
}

.incidente:focus { outline: none; }

.incidente:active,
.incidente.resaltarBtnFiltro {
    border-color: var(--acento);
    background: rgba(70, 214, 247, 0.18);
    color: var(--acento);
}

.resaltarBtnFiltro {
    background: rgba(70, 214, 247, 0.2) !important;
    border-color: var(--acento) !important;
    color: var(--acento) !important;
}

/* Móvil: chips con icono Bootstrap */
.incidente .chip-icon {
    font-size: 1rem;
    opacity: 0.85;
}

.incidente span:not(.chip-icon) {
    display: none;
}

.robo .chip-icon     { color: var(--rojo); }
.piques .chip-icon   { color: var(--magenta); }
.agresion .chip-icon { color: var(--amarillo); }
.accidente .chip-icon{ color: var(--verde); }

.btnActualizar {
    width: 100%;
    margin-top: 22px;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: var(--azul);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s ease;
    letter-spacing: 0.02em;
}

.btnActualizar:active { background: var(--azul-hover); }

/* ════════════════════════════════
   LEYENDA
════════════════════════════════ */
.leyenda {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-panel);
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid var(--borde);
    z-index: 999;
    box-shadow: var(--sombra);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100% - 24px);
}

.itemLeyenda {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--texto);
    white-space: nowrap;
}

.itemLeyenda span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: latido 2.5s infinite;
}

@keyframes latido {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.45); }
}

/* Leyenda en pantallas pequeñas */
@media (max-width: 768px) {
    .leyenda {
        gap: 10px;
        padding: 6px 14px;
        bottom: 12px;
    }

    .itemLeyenda {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .leyenda {
        gap: 8px;
        padding: 6px 12px;
        bottom: 10px;
        width: calc(100% - 24px);
        left: 12px;
        transform: none;
    }
}

.rojo    { background: var(--rojo); }
.morado  { background: var(--magenta); }
.amarillo{ background: var(--amarillo); }
.verde   { background: var(--verde); }

/* ════════════════════════════════
   ESTADÍSTICAS
════════════════════════════════ */
#estadisticas {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
    width: 100%;
    background: var(--bg-dark);
    overflow-y: auto;
    padding: 20px 14px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Título de sección */
.seccion-titulo {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--texto-suave);
    margin-bottom: -8px;
}

.contResumen {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* ── Cards sin borde, con glow y gradiente ── */
.cardResumen {
    border-radius: 18px;
    padding: 18px 16px 14px;
    color: var(--texto);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    background: var(--bg-card);
}

/* Quitamos la línea de color anterior */
.cardResumen::before { display: none; }

/* Brillo decorativo en esquina superior */
.cardResumen::after {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    opacity: 0.18;
    filter: blur(22px);
    pointer-events: none;
}

.cardResumen span {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 10px;
    opacity: 0.75;
}

.cardResumen h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #fff 40%, rgba(255,255,255,0.5));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topBarrio h2,
.topVereda h2 {
    font-size: 1rem;
    -webkit-text-fill-color: var(--texto);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

/* Colores individuales por card */
.totalResumen {
    background: linear-gradient(135deg, #1a237e22 0%, #1f6feb18 100%);
    box-shadow: 0 4px 24px rgba(31, 111, 235, 0.25), inset 0 1px 0 rgba(255,255,255,0.06);
}
.totalResumen::after    { background: var(--azul); }
.totalResumen span      { color: #7ab4ff; }

.roboResumen {
    background: linear-gradient(135deg, #3d000022 0%, #f8514918 100%);
    box-shadow: 0 4px 24px rgba(248, 81, 73, 0.22), inset 0 1px 0 rgba(255,255,255,0.06);
}
.roboResumen::after     { background: var(--rojo); }
.roboResumen span       { color: #ff8a84; }

.accidenteResumen {
    background: linear-gradient(135deg, #00200a22 0%, #3fb95018 100%);
    box-shadow: 0 4px 24px rgba(63, 185, 80, 0.22), inset 0 1px 0 rgba(255,255,255,0.06);
}
.accidenteResumen::after { background: var(--verde); }
.accidenteResumen span   { color: #7de890; }

.piqueResumen {
    background: linear-gradient(135deg, #1e003d22 0%, #bc8cff18 100%);
    box-shadow: 0 4px 24px rgba(188, 140, 255, 0.22), inset 0 1px 0 rgba(255,255,255,0.06);
}
.piqueResumen::after     { background: var(--magenta); }
.piqueResumen span       { color: #d4aaff; }

.agresionResumen {
    background: linear-gradient(135deg, #2d200022 0%, #e3b34118 100%);
    box-shadow: 0 4px 24px rgba(227, 179, 65, 0.22), inset 0 1px 0 rgba(255,255,255,0.06);
}
.agresionResumen::after  { background: var(--amarillo); }
.agresionResumen span    { color: #f0cc6e; }

.topBarrio {
    background: linear-gradient(135deg, #00202222 0%, #00d2d318 100%);
    box-shadow: 0 4px 24px rgba(0, 210, 211, 0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}
.topBarrio::after        { background: #00d2d3; }
.topBarrio span          { color: #5ee8e9; }

.topVereda {
    background: linear-gradient(135deg, #2d150022 0%, #ff9f4318 100%);
    box-shadow: 0 4px 24px rgba(255, 159, 67, 0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}
.topVereda::after        { background: #ff9f43; }
.topVereda span          { color: #ffc07a; }

/* Gráfico de barras — Canvas */
.grafico-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
}

#panelIncidentes {
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    border-radius: 18px;
    padding: 16px 12px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}

#graficoBarras {
    display: block;
    border-radius: 10px;
    cursor: crosshair;
}

/* Chips desktop */
.tpincidentes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.tpincidentes p {
    padding: 4px 10px;
    border-left: 3px solid;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
}

.robo     { color: #ff4d4d; border-color: #ff4d4d; background: rgba(255, 77, 77, 0.1); }
.accidente{ color: var(--verde); border-color: var(--verde); background: rgba(63, 185, 80, 0.1); }
.pique    { color: var(--magenta); border-color: var(--magenta); background: rgba(188, 140, 255, 0.1); }
.agresion { color: var(--amarillo); border-color: var(--amarillo); background: rgba(227, 179, 65, 0.12); }

/* ════════════════════════════════
   DESKTOP — Expansión (min-width: 769px)
════════════════════════════════ */
@media (min-width: 769px) {
    :root {
        --header-h:     52px;
        --bottom-nav-h: 0px;
        --fab-size:     auto;
    }

    header {
        position: sticky;
        top: 0;
        z-index: 2000;
        height: var(--header-h);
        padding: 0 1.25rem;
    }

    .desktop-only { display: flex !important; }
    .mobile-only  { display: none !important; }

    .icono-mobile  { display: none !important; }
    .icono-desktop { display: inline !important; }
    .texto-desktop { display: inline !important; }

    .titulo-corto    { display: none; }
    .titulo-completo { display: inline; }

    nav h1 { font-size: clamp(0.85rem, 2vw, 1.1rem); white-space: nowrap; }

    .botonesNav {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .botonesNav button {
        position: relative;
        border: none;
        padding: 6px 14px;
        border-radius: var(--radio);
        background: transparent;
        color: var(--texto);
        font-weight: 600;
        font-size: 0.82rem;
        cursor: pointer;
        white-space: nowrap;
        transition: color 0.25s ease;
    }

    .botonesNav button::after {
        content: "";
        position: absolute;
        left: 10%;
        bottom: 0;
        width: 80%;
        height: 2px;
        background: var(--acento);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
        border-radius: 2px;
    }

    .botonesNav button:hover { color: var(--acento); }
    .botonesNav button:hover::after { transform: scaleX(1); }

    #iniciarSesion i { color: var(--texto); margin-left: 4px; }

    main {
        position: relative;
        top: auto;
        bottom: auto;
        height: calc(100vh - var(--header-h));
    }

    #estadisticas {
        position: relative;
        top: auto;
        bottom: auto;
        min-height: calc(100vh - var(--header-h));
        padding: 24px 20px;
        gap: 24px;
    }

    .filtros-overlay {
        display: none !important;
    }

    /* Botones mapa — estilo original PC */
    #btnFiltros.fab-filtros {
        position: absolute;
        top: 12px;
        left: 5%;
        bottom: auto;
        right: auto;
        width: auto;
        height: auto;
        border-radius: var(--radio);
        padding: 8px 12px;
        font-size: 1.1rem;
        background: var(--bg-card);
        color: var(--texto);
        border: 1px solid var(--borde);
        box-shadow: var(--sombra);
    }

    #btnFiltros.fab-filtros:hover {
        background: var(--azul);
        color: #fff;
    }

    #btnFiltros .fab-badge {
        display: none !important;
    }

    .restablecer.fab-reset {
        position: absolute;
        top: 12px;
        left: 10%;
        right: auto;
        bottom: auto;
        width: auto;
        height: auto;
        border-radius: var(--radio);
        padding: 7px 14px;
        font-size: 0.78rem;
        font-weight: 700;
        color: var(--texto-suave);
        background: var(--bg-card);
        border: 1px solid var(--borde);
        box-shadow: var(--sombra);
    }

    .restablecer.fab-reset:hover {
        background: var(--rojo);
        color: #fff;
        border-color: var(--rojo);
    }

    main.filtros-abiertos .fab-filtros,
    main.filtros-abiertos .fab-reset {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    #panelFiltros {
        position: absolute;
        top: 12px;
        left: 12px;
        bottom: auto;
        width: 280px;
        max-height: calc(100vh - var(--header-h) - 24px);
        border-radius: 14px;
        transform: none;
        visibility: hidden;
        display: none;
        transition: opacity 0.25s ease;
    }

    #panelFiltros.abierto {
        display: block;
        visibility: visible;
        transform: none;
    }

    #cerrarFiltros {
        width: auto;
        height: auto;
        background: transparent;
        font-size: 1.2rem;
        border-radius: 0;
        top: 10px;
        right: 10px;
    }

    #cerrarFiltros:hover { color: var(--texto); }

    .contenedorFiltros {
        padding: 18px 16px 20px;
        gap: 4px;
    }

    .contenedorFiltros h2 {
        font-size: 1rem;
        margin-bottom: 10px;
        padding-right: 0;
    }

    .contenedorFiltros label {
        font-size: 0.75rem;
        margin-top: 12px;
        margin-bottom: 4px;
    }

    .contenedorFiltros input {
        padding: 8px 10px;
        font-size: 0.82rem;
        border-radius: 8px;
    }

    /* Botones tipo incidente — estilo original PC */
    .incidente {
        padding: 5px 10px;
        font-size: 0.78rem;
        min-height: auto;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.04);
    }

    .incidente .chip-icon {
        display: none;
    }

    .incidente span:not(.chip-icon) {
        display: inline-block;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .incidente:hover {
        border-color: var(--azul-hover);
        background: rgba(56, 139, 253, 0.15);
    }

    .robo span:not(.chip-icon)     { background: var(--rojo); }
    .piques span:not(.chip-icon)   { background: var(--magenta); }
    .agresion span:not(.chip-icon) { background: var(--amarillo); }
    .accidente span:not(.chip-icon){ background: var(--verde); }

    .btnActualizar {
        padding: 9px;
        font-size: 0.84rem;
        margin-top: 18px;
        border-radius: 8px;
    }

    #sugerencias {
        position: absolute;
        top: 150px;
        width: calc(100% - 32px);
        max-height: 100px;
    }

    .itemSugerencia {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .itemSugerencia:hover {
        background: var(--azul);
        color: #fff;
    }

    .leyenda {
        bottom: 85px; /* Ajustado para no chocar con el footer */
    }

    .tpincidentes p:hover {
        transform: translateX(4px);
        filter: brightness(1.15);
    }

    .contResumen {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
        justify-content: center;
    }

    .cardResumen {
        flex: 1 1 160px;
        max-width: 210px;
        padding: 20px 18px 16px;
        border-radius: 20px;
    }

    .cardResumen h2 { font-size: 2.2rem; }

    .topBarrio h2,
    .topVereda h2 { font-size: 1.1rem; }

    .cardResumen:hover {
        transform: translateY(-6px);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    }

    .grafico-scroll { overflow: visible; }

    #panelIncidentes {
        min-height: 320px;
        padding: 20px 16px 16px;
        border-radius: 20px;
    }
}

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
.sigi-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: linear-gradient(180deg, transparent 0%, rgba(11, 15, 26, 0.95) 30%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 18px 16px 12px;
    text-align: center;
}

.footer-contenido {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-marca {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(70, 214, 247, 0.7);
    letter-spacing: 0.04em;
}

.footer-autor {
    font-size: 0.65rem;
    color: rgba(139, 148, 158, 0.8);
    font-weight: 500;
}

.footer-copy {
    font-size: 0.6rem;
    color: rgba(139, 148, 158, 0.55);
    font-weight: 400;
    margin-top: 2px;
}

/* En móvil el bottom-nav ocupa el espacio, ocultar footer */
@media (max-width: 768px) {
    .sigi-footer {
        display: none;
    }
}
