
#map {
    height: 100vh;
    width: 100vw;
    background-color: #f8f9fa;
}

#map.mapa-calor-activo {
    background-color: #e8f5e9;
}

#map.mapa-calor-activo .leaflet-tile-pane {
    filter: sepia(8%) saturate(92%) hue-rotate(58deg) brightness(1.02);
}

.cluster-reportes-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
}

.cluster-reportes-icon span {
    display: flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.cluster-delito {
    background: rgba(168, 28, 8, 0.2);
}

.cluster-delito span {
    background: #A81C08;
}

.cluster-comunitario {
    background: rgba(32, 166, 106, 0.2);
}

.cluster-comunitario span {
    background: #20a66a;
}

.leaflet-control-zoom-in {
    display: none !important;
}

.leaflet-control-zoom-out {
    display: none !important;
}

/* Caja de búsqueda */
.search-box {
    position: absolute;
    top: 30px;
    left: 20px;
    z-index: 1010;
    width: 380px;
}
.search-box .card {
    border-radius: 8px;
}

/*menú desplegable*/
.dropdown-menu {
    z-index: 1050;
}

/* Caja de filtros rápidos */
.filter-bar {
    position: absolute;
    top: 110px; 
    left: 20px;
    z-index: 1000;
}

/* Base para botones circulares */
.btn-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: #ffffff; 
}

.btn-circle:hover {
    transform: scale(1.05);
    background-color: #f8f9fa;
}

.btn-sos {
    background-color: #e80606; 
    color: #ffffff;
}
.btn-sos:hover {
    background-color: #c90505;
}

/* Controles inferiores derechos*/
.bottom-buttons {
    position: absolute;
    bottom: 25px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Caja del botón Reportar Alerta */
.report-box {
    position: absolute;
    left: 20px;
    bottom: 25px;
    z-index: 1000;
}

.img-filtro {
    width: 16px ;
    height: 16px ;
    margin-right: 5px;
    object-fit: contain;
}

.img-fuego {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    object-fit: contain;
}

/* Ajustes para el logo en la barra de búsqueda */
.pre-logo-search {
    padding-left: 0;
    padding-right: 8px;
}

.img-search-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.8;
}
/* ==========================================
   MODAL / POPUP Y OVERLAY
========================================== */

/* Fondo oscuro detrás del modal */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    backdrop-filter: blur(2px);
}

/* Contenedor del popup centrado en pantalla */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background-color: #ffffff;
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
/* Panel deslizable de subfiltros */
.panel-subfiltros {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    margin-top: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    width: fit-content;
    animation: slideDownFilter 0.22s ease-out;
}

.subfiltro-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.subfiltro-item input[type="checkbox"] {
    accent-color: #212529;
    cursor: pointer;
    width: 14px;
    height: 14px;
}

@keyframes slideDownFilter {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ocultar elementos auxiliares */
.hidden {
    display: none !important;
}
/* =====================================================
   NAV-DRAWER (PANEL LATERAL)
===================================================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 9998 !important;
    transition: opacity 0.3s ease;
}

.nav-drawer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 290px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    background-color: #ffffff !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25) !important;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    overflow: hidden;
}

.nav-drawer.open {
    transform: translateX(0) !important;
}

/* Cabecera */
.drawer-header {
    background-color: #0b2536;
    padding: 24px 18px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom-right-radius: 24px;
}

.avatar-container {
    position: relative;
    font-size: 52px;
    color: #4da8da;
    line-height: 1;
}

.badge-verified {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #d49a37;
    color: #ffffff;
    font-size: 11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0b2536;
}

.user-meta {
    overflow: hidden;
}

.user-meta h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.user-role-badge {
    font-size: 0.78rem;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
}

.auth-links {
    font-size: 0.8rem;
    margin-top: 4px;
}

.link-auth {
    color: #cbd5e1;
    text-decoration: underline;
    font-size: 0.8rem;
}

.link-auth:hover {
    color: #ffffff;
}

.auth-divider {
    color: #94a3b8;
    margin: 0 4px;
}

/* Cuerpo y Secciones */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
    margin: 0 0 8px 6px;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 6px;
    background-color: #f0f7fb;
    border: none;
    border-radius: 10px;
    color: #0284c7;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s, transform 0.1s;
}

.drawer-item:hover {
    background-color: #e0f2fe;
    transform: translateX(3px);
}

.drawer-item i {
    font-size: 1.1rem;
}

/* Switches de Capas */
.drawer-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-bottom: 6px;
    background-color: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.drawer-toggle-item .toggle-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
}

.drawer-toggle-item .toggle-info i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Grilla de Emergencias */
.sos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.sos-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 4px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.78rem;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.sos-chip i {
    font-size: 1.1rem;
    margin-bottom: 4px;
}
.sos-chip:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.sos-chip.police {
    background-color: #e0f2fe;
    color: #0369a1;
}

.sos-chip.ambulance {
    background-color: #dcfce7;
    color: #15803d;
}

.sos-chip.fire {
    background-color: #fee2e2;
    color: #b91c1c;
}

.admin-item {
    background-color: #f1f5f9;
    color: #475569;
}

/* Pie del menú */
.drawer-footer {
    padding: 16px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
}

.drawer-logo{
    width:28px;
    height:28px;
}

.drawer-footer .brand-text {
    font-weight: 800;
    letter-spacing: 1px;
    color: #0b2536;
    font-size: 1rem;
}
.btn-comisarias i {
    color: #1a56db;
    margin-right: 4px;
}

.btn-comisarias.activo {
    background: #1a56db !important;
    border-color: #1a56db !important;
    color: #ffffff !important;
}

.btn-comisarias.activo i {
    color: #ffffff;
}

.panel-comisarias {
    width: min(340px, calc(100vw - 40px));
    max-height: calc(100vh - 260px);
    display: flex;
    flex-direction: column;
    margin-top: 8px;
    padding: 12px 14px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    animation: slideDownFilter 0.22s ease-out;
}

.panel-comisarias-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.panel-comisarias-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.panel-comisarias-header span {
    font-size: 11px;
    color: #6c757d;
}

.btn-cerrar-panel {
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 16px;
    line-height: 1;
    padding: 2px 4px;
}

.aviso-comisarias {
    font-size: 11px;
    color: #664d03;
    background: #fff3cd;
    border-radius: 8px;
    padding: 6px 8px;
    margin-bottom: 8px;
}

.lista-comisarias {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
}

.item-comisaria {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
}

.item-comisaria + .item-comisaria {
    border-top: 1px solid #f0f0f0;
}

.item-comisaria:hover {
    background: #f4f7fe;
}

.item-comisaria.mas-cercana {
    background: #eaf1ff;
}

.item-comisaria-info strong {
    display: block;
    font-size: 13px;
}

.item-comisaria-info small {
    display: block;
    font-size: 11px;
    color: #6c757d;
}

.badge-cercana {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    background: #1a56db;
    border-radius: 10px;
    padding: 1px 7px;
    margin: 2px 0;
}

.item-comisaria-lado {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.item-comisaria-lado .distancia {
    font-size: 12px;
    font-weight: 700;
    color: #1a56db;
}

.item-comisaria-acciones {
    display: flex;
    gap: 6px;
}

.item-comisaria-acciones a {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f3f5;
    color: #1a56db;
    font-size: 12px;
    text-decoration: none;
}

.item-comisaria-acciones a:hover {
    background: #1a56db;
    color: #ffffff;
}

.incluir-postas {
    margin-top: 8px;
}

.fuente-datos {
    margin-top: 6px;
    font-size: 10px;
    color: #adb5bd;
}

.icono-comisaria {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a56db;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    font-size: 15px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.icono-posta {
    background: #5b6b8c;
    font-size: 11px;
}

.popup-comisaria {
    min-width: 190px;
    font-family: sans-serif;
}

.popup-comisaria-tipo {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1a56db;
}

.popup-comisaria h4 {
    margin: 4px 0 6px;
    font-size: 14px;
}

.popup-comisaria p {
    margin: 0 0 4px;
    font-size: 12px;
    color: #333;
}

.popup-comisaria-acciones {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    font-size: 12px;
}

.location-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.location-actions .map-button i {
    margin-right: 4px;
}

.map-button-secundario {
    background: #ffffff;
    color: var(--azul, #1a56db);
    border: 1px solid currentColor;
}

@media (max-width: 768px) {
    .location-actions {
        width: 100%;
        flex-direction: row;
    }

    .location-actions .map-button {
        flex: 1;
    }
}

#map.modo-seleccion,
#map.modo-seleccion .leaflet-interactive {
    cursor: crosshair;
}

.banner-seleccion {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 10px 14px;
    background: #212529;
    color: #ffffff;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    font-size: 13px;
}

.banner-seleccion button {
    border: none;
    background: #ffffff;
    color: #212529;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 576px) {

    .search-box {
        top: 16px;
        left: 12px;
        right: 12px;
        width: auto;
    }

    .filter-bar {
        top: 92px;
        left: 12px;
        right: 12px;
    }

    .filter-bar > .d-flex {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .filter-bar > .d-flex::-webkit-scrollbar {
        display: none;
    }

    .filter-bar > .d-flex > .btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .panel-subfiltros {
        max-width: 100%;
        overflow-x: auto;
    }

    .panel-comisarias {
        width: 100%;
        max-height: calc(100vh - 290px);
    }

    .report-box {
        left: 12px;
        right: 12px;
        bottom: 16px;
    }

    .report-box .btn {
        width: 100%;
    }

    .bottom-buttons {
        right: 12px;
        bottom: 80px;
        gap: 10px;
    }
}

.popup-reporte-resumen {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
    color: #444;
}

.btn-ver-reporte {
    width: 100%;
    margin-top: 8px;
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    background: #0d6efd;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-ver-reporte:hover {
    background: #0b5ed7;
}

.modal-reporte {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-reporte.d-none {
    display: none !important;
}

.modal-reporte-fondo {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.modal-reporte-caja {
    position: relative;
    width: min(520px, 100%);
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-reporte-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #eef0f3;
}

.modal-reporte-header h2 {
    margin: 2px 0 0;
    font-size: 18px;
    font-weight: 700;
}

.modal-reporte-categoria {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal-reporte-categoria.delito {
    color: #c0392b;
}

.modal-reporte-categoria.comunitario {
    color: #20a66a;
}

.modal-reporte-cerrar {
    border: none;
    background: #f1f3f5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.modal-reporte-cuerpo {
    padding: 16px 18px 20px;
    overflow-y: auto;
}

.detalle-descripcion {
    font-size: 14px;
    color: #212529;
    margin-bottom: 10px;
    white-space: pre-line;
}

.detalle-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 6px;
    font-size: 12px;
    color: #6c757d;
}

.detalle-meta li {
    margin-bottom: 3px;
}

.detalle-meta i {
    width: 16px;
    color: #adb5bd;
}

.detalle-seccion {
    border-top: 1px solid #eef0f3;
    padding-top: 12px;
    margin-top: 12px;
}

.detalle-seccion h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.detalle-gris {
    color: #6c757d;
    font-size: 12px;
}

.detalle-resumen-calificacion {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.detalle-estrellas {
    color: #f5a623;
    font-size: 16px;
    letter-spacing: 1px;
}

.detalle-calificar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: #495057;
}

.selector-estrellas {
    display: flex;
}

.selector-estrellas .estrella {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    padding: 0 2px;
    color: #d0d5dd;
    cursor: pointer;
    transition: transform 0.1s;
}

.selector-estrellas .estrella.activa {
    color: #f5a623;
}

.selector-estrellas .estrella:hover {
    transform: scale(1.15);
}

.lista-comentarios {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    max-height: 220px;
    overflow-y: auto;
}

.lista-comentarios li {
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 6px;
}

.lista-comentarios li.sin-comentarios {
    background: transparent;
    padding: 0;
}

.comentario-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.comentario-meta span {
    color: #adb5bd;
    font-size: 11px;
}

.lista-comentarios p {
    margin: 2px 0 0;
    font-size: 13px;
    white-space: pre-line;
    word-break: break-word;
}

.form-comentario textarea,
.form-denuncia textarea,
.form-denuncia select {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    resize: vertical;
}

.form-comentario-pie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.form-comentario-pie .contador {
    font-size: 11px;
    color: #adb5bd;
}

.form-comentario-pie button {
    border: none;
    background: #0d6efd;
    color: #ffffff;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
}

.form-comentario-pie button:disabled {
    opacity: 0.6;
}

.btn-abrir-denuncia {
    border: none;
    background: transparent;
    color: #c0392b;
    font-size: 13px;
    font-weight: 600;
    padding: 0;
}

.form-denuncia label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.form-denuncia select {
    margin-bottom: 6px;
}

.form-denuncia-acciones {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.form-denuncia-acciones button {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
}

.btn-cancelar-denuncia {
    background: #f1f3f5;
    color: #495057;
}

.btn-enviar-denuncia {
    background: #c0392b;
    color: #ffffff;
}

.detalle-invitado {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 14px;
    background: #f4f7fe;
    border-radius: 12px;
    font-size: 13px;
}

.detalle-invitado > i {
    color: #0d6efd;
    font-size: 18px;
    margin-top: 2px;
}

.detalle-invitado p {
    margin: 2px 0 6px;
    color: #495057;
}

.detalle-invitado-links {
    display: flex;
    gap: 14px;
}

.detalle-invitado-links a {
    font-weight: 600;
    text-decoration: none;
}

.detalle-mensaje {
    font-size: 13px;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.detalle-mensaje.ok {
    background: #d1e7dd;
    color: #0f5132;
}

.detalle-mensaje.error {
    background: #f8d7da;
    color: #842029;
}

body.modal-reporte-abierto {
    overflow: hidden;
}

@media (max-width: 576px) {
    .modal-reporte {
        align-items: flex-end;
        padding: 0;
    }

    .modal-reporte-caja {
        width: 100%;
        max-height: 88vh;
        border-radius: 16px 16px 0 0;
    }
}

.modal-reporte-categoria.historial {
    color: #0d6efd;
}

.historial-resumen {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.historial-resumen div {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: #f4f7fe;
    border-radius: 12px;
}

.historial-resumen strong {
    font-size: 20px;
    line-height: 1.1;
    color: #0d6efd;
}

.historial-resumen span {
    font-size: 11px;
    color: #6c757d;
}

.historial-filtros {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.historial-filtros button {
    border: 1px solid #dee2e6;
    background: #ffffff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
}

.historial-filtros button.activo {
    background: #212529;
    border-color: #212529;
    color: #ffffff;
}

.historial-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.historial-item {
    border: 1px solid #eef0f3;
    border-left: 4px solid #20a66a;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.historial-item.delito {
    border-left-color: #c0392b;
}

.historial-item-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.historial-categoria {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #20a66a;
}

.historial-item.delito .historial-categoria {
    color: #c0392b;
}

.historial-estado {
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
    background: #fff3cd;
    color: #664d03;
}

.historial-estado.verificado {
    background: #d1e7dd;
    color: #0f5132;
}

.historial-estado.rechazado {
    background: #f8d7da;
    color: #842029;
}

.historial-tipo {
    display: block;
    font-size: 14px;
    margin-top: 2px;
}

.historial-descripcion {
    margin: 2px 0 6px;
    font-size: 13px;
    color: #495057;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.historial-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 11px;
    color: #6c757d;
}

.historial-meta i {
    color: #adb5bd;
    margin-right: 3px;
}

.historial-pie {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 8px;
    font-size: 12px;
    color: #495057;
}

.historial-acciones {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.historial-acciones button {
    border: none;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f3f5;
    color: #0d6efd;
}

.historial-acciones .btn-historial-detalle {
    background: #0d6efd;
    color: #ffffff;
}

.historial-vacio {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 8px;
}

.historial-vacio i {
    font-size: 36px;
    color: #0d6efd;
    margin-bottom: 8px;
}

.historial-vacio p {
    font-size: 13px;
    color: #6c757d;
    margin: 4px 0 12px;
}

.btn-historial-nuevo {
    border: none;
    border-radius: 999px;
    background: #0d6efd;
    color: #ffffff;
    padding: 8px 18px;
    font-weight: 600;
}

.historial-resaltado {
    animation: historialPulso 1s ease-in-out infinite;
}

@keyframes historialPulso {
    0%, 100% { stroke-opacity: 1; }
    50% { stroke-opacity: 0.25; }
}

@media (max-width: 576px) {
    .historial-resumen {
        grid-template-columns: repeat(2, 1fr);
    }

    .historial-acciones {
        width: 100%;
        margin-left: 0;
    }

    .historial-acciones button {
        flex: 1;
    }
}

.resultado-busqueda {
    flex-shrink: 0;
    align-self: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #e7f0ff;
    color: #0d6efd;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.resultado-busqueda.sin-resultados {
    background: #fdecec;
    color: #b02a37;
}

#buscadorMapa::-webkit-search-cancel-button {
    display: none;
}

#btnLimpiarBusqueda {
    cursor: pointer;
}

.drawer-item.drawer-item-externo {
    background-color: #fff1f0;
    color: #c0262d;
}

.drawer-item.drawer-item-externo:hover {
    background-color: #ffe3e0;
    color: #a51d24;
}

.drawer-item .icono-externo {
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.7;
}

.cred-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.popup-reporte-resumen + .cred-badge {
    margin-top: 6px;
}

.cred-badge.cred-alta {
    background: #d1e7dd;
    color: #0f5132;
}

.cred-badge.cred-media {
    background: #fff3cd;
    color: #8a6100;
}

.cred-badge.cred-baja {
    background: #f8d7da;
    color: #842029;
}

.cred-medidor {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8f9fb;
}

.cred-medidor-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.cred-medidor-cabecera > strong {
    font-size: 22px;
    line-height: 1;
}

.cred-medidor-cabecera small {
    font-size: 12px;
    color: #adb5bd;
    font-weight: 600;
}

.cred-barra {
    height: 8px;
    margin-top: 8px;
    border-radius: 999px;
    background: #e9ecef;
    overflow: hidden;
}

.cred-barra span {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.cred-alta .cred-barra span {
    background: #20a66a;
}

.cred-media .cred-barra span {
    background: #f59e0b;
}

.cred-baja .cred-barra span {
    background: #ef4444;
}

.cred-detalle {
    margin-top: 8px;
    font-size: 12px;
}

.cred-detalle summary {
    cursor: pointer;
    color: #0d6efd;
    font-weight: 600;
}

.cred-detalle ul {
    list-style: none;
    padding: 0;
    margin: 6px 0;
}

.cred-detalle li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    border-bottom: 1px dashed #e4e7ee;
}

.cred-detalle li strong.positivo {
    color: #20a66a;
}

.cred-detalle li strong.negativo {
    color: #c0262d;
}

.cred-detalle p {
    margin: 4px 0 0;
}

.drawer-credibilidad {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.drawer-credibilidad .punto {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.drawer-credibilidad.cred-alta .punto {
    background: #4ade80;
}

.drawer-credibilidad.cred-media .punto {
    background: #fbbf24;
}

.drawer-credibilidad.cred-baja .punto {
    background: #f87171;
}

.marcador-robo {
    background: transparent;
    border: none;
}

.marcador-robo span {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.marcador-robo span::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #ffffff;
}

.marcador-robo.robo-armado span {
    background: #c0392b;
}

.marcador-robo.robo-hurto span {
    background: #e67e22;
}

.marcador-robo.robo-vehiculo span {
    background: #8e44ad;
}

.marcador-robo.comunitario-luminaria span {
    background: #d4a017;
}

.marcador-robo.comunitario-bache span {
    background: #2980b9;
}

.marcador-robo.comunitario-basura span {
    background: #27ae60;
}

.report-box .btn-cargar-reporte {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 54px;
    padding: 0 26px 0 8px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #000e40, #15265c);
    color: #ffffff;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 24px rgba(0, 14, 64, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.report-box .btn-cargar-reporte:hover,
.report-box .btn-cargar-reporte:focus-visible {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 14, 64, 0.42);
}

.report-box .btn-cargar-reporte:active {
    transform: translateY(0);
}

.report-box .icono-cargar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #4ec6c0;
    color: #000e40;
    font-size: 20px;
    transition: transform 0.2s;
}

.report-box .btn-cargar-reporte:hover .icono-cargar {
    transform: rotate(90deg);
}

@media (max-width: 576px) {
    .report-box .btn-cargar-reporte {
        justify-content: center;
    }
}

.search-box .card {
    border-radius: 18px !important;
    box-shadow: 0 8px 22px rgba(0, 14, 64, 0.16) !important;
}

.search-box #btnAbrirDrawer {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #000e40 !important;
    transition: background 0.15s;
}

.search-box #btnAbrirDrawer:hover {
    background: #eef1f8;
}

.search-box #buscadorMapa {
    color: #000e40;
    font-size: 15px;
}

.search-box #buscadorMapa::placeholder {
    color: #8a93a6;
}

.search-box #buscadorMapa:focus {
    box-shadow: none;
}

.search-box .bi-search {
    color: #000e40 !important;
}

.filter-bar > .d-flex > .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 0 16px !important;
    border-radius: 999px !important;
    font-weight: 600;
    font-size: 13.5px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.filter-bar > .d-flex > .btn.btn-white {
    border: 1px solid #e4e7ee !important;
    color: #000e40;
    box-shadow: 0 4px 12px rgba(0, 14, 64, 0.1) !important;
}

.filter-bar > .d-flex > .btn.btn-white:hover {
    transform: translateY(-1px);
    color: #000e40;
}

.filter-bar > .d-flex > .btn.btn-dark,
.filter-bar > .d-flex > .btn.btn-comisarias.activo {
    background: linear-gradient(135deg, #000e40, #15265c) !important;
    border: 1px solid #000e40 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(0, 14, 64, 0.3) !important;
}

.filter-bar .btn-comisarias i {
    color: #000e40;
}

.filter-bar .btn-comisarias.activo i {
    color: #4ec6c0;
}

.bottom-buttons > .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.bottom-buttons > .btn.btn-light {
    background: #ffffff;
    border: 1px solid #e4e7ee;
    color: #000e40;
    box-shadow: 0 6px 16px rgba(0, 14, 64, 0.16) !important;
}

.bottom-buttons > .btn.btn-light:hover {
    transform: translateY(-2px);
    background: #ffffff;
    color: #000e40;
}

.bottom-buttons > .btn.btn-danger {
    background: #ff6300;
    border: 1px solid #ff6300;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(255, 99, 0, 0.35) !important;
}

.bottom-buttons > .btn.btn-danger:hover {
    background: #e85a00;
    border-color: #e85a00;
}

.bottom-buttons #btnCentrar i {
    color: #000e40;
    margin: 0 !important;
}

.bottom-buttons .btn-sos {
    width: 54px;
    height: 54px;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 20px rgba(232, 6, 6, 0.4);
    transition: transform 0.15s, background 0.15s;
}

.bottom-buttons .btn-sos:hover {
    transform: scale(1.06);
    background-color: #c90505;
}

.leaflet-container .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px 0 0 0;
    padding: 0 6px;
    font-size: 10px;
    color: #70798c;
}

.leaflet-container .leaflet-control-attribution a {
    color: #70798c;
}

.marcador-seleccion {
    background: transparent;
    border: none;
}

.marcador-seleccion .seleccion-gota {
    display: block;
    overflow: visible;
    filter: drop-shadow(0 4px 6px rgba(0, 14, 64, 0.35));
    transform-origin: 50% 92%;
    animation: seleccionCaida 0.35s ease-out;
}

.marcador-seleccion .seleccion-sombra {
    fill: #000e40;
    opacity: 0.2;
}

@keyframes seleccionCaida {
    0% {
        transform: translateY(-14px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.leaflet-tooltip.etiqueta-jurisdiccion {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #e4e7ee;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 14, 64, 0.15);
    color: #000e40;
    line-height: 1.2;
    pointer-events: none;
}

.leaflet-tooltip.etiqueta-jurisdiccion::before {
    display: none;
}

.etiqueta-jurisdiccion strong {
    font-size: 13px;
    font-weight: 800;
}

.etiqueta-jurisdiccion span {
    font-size: 10px;
    color: #70798c;
}

.historial-acciones .btn-historial-borrar {
    background: #fdecec;
    color: #c0262d;
}

.historial-acciones .btn-historial-borrar:hover {
    background: #c0262d;
    color: #ffffff;
}

.historial-acciones .btn-historial-borrar:disabled {
    opacity: 0.5;
}

/* Celular: "Cargar reporte" como botón redondo en el centro,
   con Calor y Centrar a la izquierda y SOS a la derecha */
@media (max-width: 768px) {

    .report-box {
        left: 50% !important;
        right: auto !important;
        bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) - 10px)) !important;
        transform: translateX(-50%);
    }

    .report-box .btn-cargar-reporte {
        position: relative;
        width: 70px !important;
        height: 70px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        border: 5px solid #ffffff;
        font-size: 0;
        letter-spacing: 0;
        gap: 0;
    }

    .report-box .btn-cargar-reporte:hover,
    .report-box .btn-cargar-reporte:focus-visible {
        transform: none;
    }

    .report-box .btn-cargar-reporte:active {
        transform: scale(0.94);
    }

    .report-box .icono-cargar {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .report-box .btn-cargar-reporte::after {
        content: "REPORTAR";
        position: absolute;
        top: calc(100% + 4px);
        left: 50%;
        transform: translateX(-50%);
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.92);
        color: #000e40;
        font-size: 10.5px;
        font-weight: 800;
        letter-spacing: 0.4px;
        white-space: nowrap;
        box-shadow: 0 2px 8px rgba(0, 14, 64, 0.12);
    }

    .bottom-buttons {
        left: 14px !important;
        right: 14px !important;
        bottom: max(32px, calc(env(safe-area-inset-bottom, 0px) - 2px)) !important;
        gap: 10px !important;
        pointer-events: none;
    }

    .bottom-buttons > * {
        pointer-events: auto;
    }

    .bottom-buttons > #btnCalor,
    .bottom-buttons > #btnCentrar {
        width: 48px;
        height: 48px;
        padding: 0 !important;
        border-radius: 50% !important;
        font-size: 0 !important;
        gap: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .bottom-buttons > #btnCentrar i {
        margin: 0 !important;
    }

    .bottom-buttons > #btnCalor .img-fuego {
        width: 22px;
        height: 22px;
        margin: 0 !important;
    }

    .bottom-buttons > #btnCentrar i {
        font-size: 19px !important;
    }

    .bottom-buttons > #btnSos {
        margin-left: auto;
    }
}

/* Zona segura: en celulares con muesca o isla, nada queda debajo de la hora ni de la barra de gestos */
:root {
    --zona-arriba: env(safe-area-inset-top, 0px);
    --zona-abajo: env(safe-area-inset-bottom, 0px);
    --zona-izquierda: env(safe-area-inset-left, 0px);
    --zona-derecha: env(safe-area-inset-right, 0px);
}

.search-box {
    top: calc(30px + var(--zona-arriba));
    margin-left: var(--zona-izquierda);
}

.filter-bar {
    top: calc(110px + var(--zona-arriba));
    margin-left: var(--zona-izquierda);
}

.banner-seleccion {
    top: calc(20px + var(--zona-arriba));
}

.nav-drawer .drawer-header {
    padding-top: calc(24px + var(--zona-arriba));
}

.nav-drawer .drawer-footer {
    padding-bottom: calc(14px + var(--zona-abajo));
}

.modal-reporte {
    padding-top: calc(16px + var(--zona-arriba));
    padding-bottom: calc(16px + var(--zona-abajo));
}

.report-box {
    bottom: calc(25px + var(--zona-abajo));
}

.bottom-buttons {
    bottom: calc(25px + var(--zona-abajo));
    right: calc(20px + var(--zona-derecha));
}

@media (max-width: 576px) {
    .search-box {
        top: calc(16px + var(--zona-arriba));
    }

    .filter-bar {
        top: calc(92px + var(--zona-arriba));
    }
}

.leaflet-bottom {
    margin-bottom: var(--zona-abajo);
}

/* El mapa ocupa toda la pantalla, también detrás de la hora y de la barra del navegador.
   El fondo usa el color del mapa para que la franja de arriba no se vea blanca. */
html,
body {
    background: #f2efe9 !important;
}

#map {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: auto;
    background-color: #f2efe9;
}

/* App instalada en la pantalla de inicio: el mapa se ve detrás de la hora.
   Una sombra suave arriba mantiene legible la hora y la batería. */
@media (display-mode: standalone) {
    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: calc(env(safe-area-inset-top, 0px) + 16px);
        background: linear-gradient(rgba(0, 14, 64, 0.55), rgba(0, 14, 64, 0));
        z-index: 1020;
        pointer-events: none;
    }
}

/* Celular: el panel de comisarías es una hoja baja que deja ver el mapa.
   Tocando el encabezado se achica o se agranda. */
.panel-comisarias-header .btn-plegar-panel {
    display: none;
}

@media (max-width: 768px) {

    @keyframes subir-panel {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .panel-comisarias {
        position: fixed !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: auto !important;
        max-width: none !important;
        max-height: 44vh !important;
        margin: 0 !important;
        padding: 18px 16px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 22px 22px 0 0 !important;
        box-shadow: 0 -8px 24px rgba(0, 14, 64, 0.18) !important;
        z-index: 1200;
        animation: subir-panel 0.22s ease-out !important;
    }

    .panel-comisarias::before {
        content: "";
        position: absolute;
        top: 7px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: 2px;
        background: #d0d5dd;
    }

    .panel-comisarias-header {
        cursor: pointer;
        align-items: center;
        gap: 6px;
    }

    .panel-comisarias-header > div:first-child {
        flex: 1;
    }

    .panel-comisarias-header .btn-plegar-panel {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border: none;
        border-radius: 50%;
        background: #f1f3f7;
        color: #000e40;
        transition: transform 0.2s;
    }

    .panel-comisarias.minimizado .btn-plegar-panel {
        transform: rotate(180deg);
    }

    .panel-comisarias .btn-cerrar-panel {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: #f1f3f7;
    }

    .panel-comisarias .lista-comisarias {
        flex: 1 1 auto;
        min-height: 0;
        overscroll-behavior: contain;
    }

    .panel-comisarias .item-comisaria {
        padding: 10px 8px;
    }

    .panel-comisarias .item-comisaria-acciones a {
        min-width: 38px;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .panel-comisarias.minimizado .lista-comisarias,
    .panel-comisarias.minimizado .aviso-comisarias,
    .panel-comisarias.minimizado .incluir-postas,
    .panel-comisarias.minimizado .fuente-datos {
        display: none !important;
    }

    .panel-comisarias.minimizado .panel-comisarias-header {
        margin-bottom: 0;
    }

    /* Mientras el panel está abierto, los botones de abajo se ocultan para no taparse */
    body.comisarias-abiertas .report-box,
    body.comisarias-abiertas .bottom-buttons {
        display: none !important;
    }
}

/* Menú lateral: alto real de la pantalla (en Android y Brave 100vh queda debajo de la barra del navegador) */
.nav-drawer {
    height: 100vh !important;
    height: 100dvh !important;
}

.nav-drawer .drawer-body {
    min-height: 0;
}

/* Cerrar sesión: ícono chico arriba a la derecha del menú */
.btn-salir-icono {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.btn-salir-icono:hover,
.btn-salir-icono:focus-visible {
    background: #c0262d;
    color: #ffffff;
}

.nav-drawer .drawer-header .user-meta {
    padding-right: 34px;
    min-width: 0;
}

/* Filtros (Todo, Robos, Comunidad, Comisarías): fondo sólido y sombra suave.
   En algunos celulares se veían translúcidos y con una sombra marcada al tocarlos. */
.filter-bar > .d-flex {
    padding: 4px 2px 8px;
}

.filter-bar > .d-flex > .btn {
    opacity: 1 !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.filter-bar > .d-flex > .btn.btn-white,
.filter-bar > .d-flex > .btn.btn-white:hover,
.filter-bar > .d-flex > .btn.btn-white:focus,
.filter-bar > .d-flex > .btn.btn-white:active {
    background-color: #ffffff !important;
    background-image: none !important;
    color: #000e40 !important;
    box-shadow: 0 2px 6px rgba(0, 14, 64, 0.12) !important;
    outline: none;
}

.filter-bar > .d-flex > .btn.btn-dark,
.filter-bar > .d-flex > .btn.btn-dark:hover,
.filter-bar > .d-flex > .btn.btn-dark:focus,
.filter-bar > .d-flex > .btn.btn-dark:active,
.filter-bar > .d-flex > .btn.btn-comisarias.activo {
    background-color: #000e40 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(0, 14, 64, 0.25) !important;
    outline: none;
}

@media (hover: none) {
    .filter-bar > .d-flex > .btn:hover {
        transform: none !important;
    }
}

/* Pines de los tipos "Otro" */
.marcador-robo.robo-otro span {
    background: #5d6d7e;
}

.marcador-robo.comunitario-otro span {
    background: #16a085;
}

/* Celular: los cuatro filtros entran en una fila sin desplazar (Comisarías queda solo con el ícono) */
@media (max-width: 576px) {
    .filter-bar > .d-flex {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.25fr) auto;
        gap: 6px !important;
        overflow: visible !important;
    }

    .filter-bar > .d-flex > .btn {
        min-width: 0;
        justify-content: center;
        padding: 0 10px !important;
        font-size: 12.5px;
        white-space: nowrap;
        overflow: hidden;
    }

    .filter-bar > .d-flex > .btn .img-filtro {
        flex-shrink: 0;
    }

    .filter-bar > .d-flex > .btn.btn-comisarias {
        width: 38px;
        padding: 0 !important;
        font-size: 0 !important;
        gap: 0;
    }

    .filter-bar > .d-flex > .btn.btn-comisarias i {
        font-size: 16px;
    }
}

/* Logos más grandes: el del buscador y el del menú lateral */
.search-box .img-search-logo {
    width: 32px;
    height: 32px;
}

.search-box .pre-logo-search {
    padding-left: 4px;
    padding-right: 6px;
}

.nav-drawer .drawer-logo {
    width: 46px;
    height: 46px;
}

/* Confirmar la dirección buscada */
.confirmar-direccion {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.confirmar-direccion strong {
    font-size: 14px;
    color: #000e40;
}

.confirmar-direccion span {
    font-size: 13px;
    color: #333;
}

.confirmar-direccion small {
    font-size: 11px;
    color: #6c757d;
}

.confirmar-direccion-botones {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.confirmar-direccion-botones button {
    border: none;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
}

.confirmar-direccion-botones .confirmar-si {
    flex: 1;
    background: #000e40;
    color: #ffffff;
}

.confirmar-direccion-botones .confirmar-no {
    background: #f1f3f7;
    color: #000e40;
}

.search-box .bi-search {
    cursor: pointer;
}

/* Lista de direcciones sugeridas debajo del buscador */
.search-box {
    position: absolute;
}

.sugerencias-direccion {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1060;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 14, 64, 0.18);
    max-height: 50vh;
    overflow-y: auto;
}

.sugerencias-direccion .sugerencias-titulo {
    padding: 6px 10px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #8a93a6;
}

.sugerencias-direccion button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: none;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    color: #000e40;
}

.sugerencias-direccion button:hover,
.sugerencias-direccion button:focus-visible {
    background: #f1f4fb;
}

.sugerencias-direccion button i {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef3ff;
    color: #1a56db;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sugerencias-direccion strong {
    display: block;
    font-size: 14px;
}

.sugerencias-direccion small {
    display: block;
    font-size: 12px;
    color: #6c757d;
}

/* Buscador más ancho en tablet y compu */
@media (min-width: 577px) {
    .search-box {
        width: min(560px, calc(100vw - 40px));
    }
}

/* Mientras se confirma la sesión no se muestra nada (evita ver el mapa antes del login) */
html.verificando-sesion body {
    visibility: hidden;
}

/* Aviso para activar la ubicación */
.aviso-ubicacion {
    position: fixed;
    left: 50%;
    bottom: calc(110px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 1300;
    width: min(440px, calc(100vw - 24px));
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 14px 16px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0, 14, 64, 0.22);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #000e40;
}

.aviso-ubicacion > i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef3ff;
    color: #1a56db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.aviso-ubicacion > div:first-of-type {
    flex: 1;
    min-width: 0;
}

.aviso-ubicacion strong {
    display: block;
    font-size: 14px;
}

.aviso-ubicacion span {
    display: block;
    font-size: 12.5px;
    color: #5b6478;
}

.aviso-ubicacion-botones {
    display: flex;
    gap: 8px;
    width: 100%;
    justify-content: flex-end;
}

.aviso-ubicacion button {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
}

.aviso-ubicacion .aviso-ubicacion-si {
    background: #000e40;
    color: #ffffff;
}

.aviso-ubicacion .aviso-ubicacion-cerrar {
    background: #f1f3f7;
    color: #000e40;
}

.aviso-ubicacion > .aviso-ubicacion-cerrar {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
}

/* Nombre de usuario editable en el menú lateral */
.drawer-nombre-fila {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.drawer-nombre-fila h3 {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-editar-nombre {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nombre {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(4, 12, 35, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-nombre-caja {
    width: min(400px, 100%);
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #000e40;
}

.modal-nombre-caja h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
}

.modal-nombre-caja p,
.modal-nombre-caja small {
    display: block;
    margin: 0 0 10px;
    font-size: 12.5px;
    color: #5b6478;
}

.modal-nombre-caja input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    margin-bottom: 6px;
    border: 1px solid #d9dee8;
    border-radius: 12px;
    font-size: 16px;
}

.modal-nombre-caja input:focus {
    outline: none;
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

.modal-nombre-error {
    min-height: 18px;
    font-size: 13px;
    color: #c0262d;
}

.modal-nombre-botones {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.modal-nombre-botones button {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
}

.modal-nombre-botones .cancelar {
    background: #f1f3f7;
    color: #000e40;
}

.modal-nombre-botones .guardar {
    background: #000e40;
    color: #ffffff;
}
