/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   VARIABLES CSS - TEMA POR DEFECTO (PRODUCCIÓN)
   ======================================== */
:root {
    --color-primary: #0a3d62;
    --color-primary-hover: #1e3799;
    --color-primary-light: #f4f4f9;
    --color-header-bg: #0a3d62;
    --color-header-text: #fff;
    --env-banner-display: none;
}

/* ========================================
   TEMA ENTORNO DE PRUEBAS
   Solo banner + borde rojo para identificar, colores iguales a producción
   ======================================== */
body.env-pruebas {
    --env-banner-display: block;
    /* Borde rojo alrededor de toda la página para identificar */
    border: 4px solid #b91c1c;
    min-height: 100vh;
}

/* Banner de entorno de pruebas */
.env-banner {
    display: var(--env-banner-display);
    background: repeating-linear-gradient(45deg,
            #b91c1c,
            #b91c1c 10px,
            #991b1b 10px,
            #991b1b 20px);
    color: #fff;
    text-align: center;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(185, 28, 28, 0.4);
    animation: pulse-banner 2s ease-in-out infinite;
}

.env-banner i {
    margin-right: 10px;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes pulse-banner {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--color-primary-light);
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-bottom: 60px;
    /* Aumenta este valor según la altura del footer */
}

/* Botón flotante "Volver arriba" */
#btn-volver-arriba {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-primary, #0a3d62);
    color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: none;
    z-index: 10000;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

#btn-volver-arriba:hover {
    background-color: var(--color-primary-hover, #1e3799);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#btn-volver-arriba.show {
    display: flex;
}

#btn-volver-arriba i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    #btn-volver-arriba {
        width: 45px;
        height: 45px;
        bottom: 70px;
        right: 15px;
    }

    #btn-volver-arriba i {
        font-size: 1rem;
    }
}

header {
    background: var(--color-primary);
    color: var(--color-header-text);
    padding: 20px 0;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

main {
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h2 {
    color: var(--color-primary);
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: var(--color-primary);
    color: var(--color-header-text);
}

table tr:hover {
    background: #f1f1f1;
}

button,
.button {
    background: var(--color-primary);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}

button:hover,
.button:hover {
    background: var(--color-primary-hover);
}

/* Prevenir que los iconos dentro de botones capturen clics (soluciona delegación de eventos) */
button i,
.btn i {
    pointer-events: none;
}

.footer {
    background-color: var(--color-primary);
    color: var(--color-header-text);
    text-align: center;
    padding: 10px 0;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
    /* Asegura que el footer esté por encima de otros elementos */
}

/* Anular estilos del .container general para el div dentro del footer */
.footer .container {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    /* Opcional: quitar bordes redondeados si los hubiera */
    padding: 0;
    /* Opcional: quitar padding si lo hubiera heredado */
}

.fa-info-circle {
    margin-right: 8px;
}

/* Estilos personalizados adicionales si es necesario */
.navbar {
    background-color: var(--color-primary) !important;
    padding: 10px 20px;
    /* Espaciado interior del menú */
}

.navbar-brand {
    color: #fff;
    /* Color del texto del logo o título */
    font-size: 1.5rem;
    /* Tamaño del texto */
    font-weight: bold;
    /* Grosor del texto */
}

.navbar-nav .nav-item .nav-link {
    color: #fff;
    /* Color del texto de los enlaces */
    font-weight: 600;
    /* Grosor del texto */
}

.navbar-nav .nav-item .nav-link:hover {
    color: #f1f1f1;
    /* Color del texto al pasar el mouse sobre los enlaces */
}

/* Estilo para el botón navbar-toggler en vista móvil */
.navbar-toggler {
    border-color: #fff;
    /* Cambia el color del borde del botón */
}

.navbar-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255, 255, 255, 0.7%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    /* Cambia el color de las líneas */
}

/* Asegura que los íconos tengan un alto y ancho adecuado */
.navbar-toggler .navbar-toggler-icon {
    width: 30px;
    height: 30px;
}

/* Estilo adicional para el botón Volver */
.btn-volver {
    margin-bottom: 20px;
    /* Espacio en la parte inferior */
}

/* Alinear el contenido del modal */
.modal-body ul {
    padding-left: 20px;
    /* Ajuste de sangría para la lista */
}

/* Ajuste de margen y padding en el modal */
.modal-content {
    padding: 20px;
}

/* Estilo para el título del modal */
.modal-title {
    font-weight: bold;
    font-size: 1.25rem;
    /* Tamaño de fuente un poco más grande */
    margin-bottom: 10px;
    /* Margen inferior para separación */
}

/* Estilo para el modal de inicio de sesión */
#modalIniciarSesion .modal-header {
    background: var(--color-primary);
    color: var(--color-header-text);
    border-bottom: none;
    padding: 15px 20px;
}

#modalIniciarSesion .modal-title {
    font-size: 1.5rem;
}

#modalIniciarSesion .modal-body {
    padding: 20px;
}

#modalIniciarSesion .form-group label {
    font-weight: bold;
    color: var(--color-primary);
}

#modalIniciarSesion .form-control {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 15px;
}

/* Sobrescribir Bootstrap btn-primary para usar colores del tema */
.btn-primary {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--color-primary-hover) !important;
    border-color: var(--color-primary-hover) !important;
}

#modalIniciarSesion .btn-primary {
    background-color: var(--color-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#modalIniciarSesion .btn-primary:hover {
    background-color: var(--color-primary-hover);
}

/* Remove or comment out previous rank styles */
/* 
.rank-display {
    display: inline-block;
    width: 25px; 
    height: 1.2em; 
    position: relative;
    vertical-align: middle;
    margin-right: 5px; 
    font-size: 0; 
    line-height: 0; 
}

.rank-oficial::before,
.rank-inspector::before,
.rank-inspector::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px; 
    background-color: #a9a9a9; 
    border-radius: 1px;
}

.rank-oficial::before {
    top: 50%;
    transform: translateY(-50%);
}

.rank-inspector::before {
    top: 30%; 
    transform: translateY(-50%);
}

.rank-inspector::after {
    content: ''; 
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #a9a9a9;
    border-radius: 1px;
    bottom: 30%; 
    transform: translateY(50%);
}

.rank-agente {
    width: 0; 
    margin-right: 0;
}
*/

/* Optional: Add styling for the Font Awesome icons if needed */
.rank-icon {
    color: #FCFE06;
    /* Updated icon color */
    vertical-align: middle;
    /* Align icon nicely with text in other cells */
    font-size: 0.9em;
    /* Slightly smaller icon */
    /* Ensure icon is centered within the badge */
    display: inline-block;
    /* Needed for vertical align */
    line-height: 1;
    /* Match badge line-height */
}

/* New styles for the rank background badge */
.rank-badge-bg {
    display: inline-flex;
    /* Use Flexbox for internal alignment */
    align-items: center;
    /* Vertically center items */
    justify-content: flex-start;
    /* Align items to the start (letter first) */
    background-color: #02012A;
    /* Dark blue background */
    width: 55px;
    /* Fixed width for consistent size */
    padding: 2px 5px;
    /* Adjust padding (less horizontal now width controls size) */
    border-radius: 3px;
    /* Slightly rounded corners */
    min-height: 1.2em;
    /* Ensure empty badges have height */
    vertical-align: middle;
    /* Align badge with text */
    color: #FCFE06;
    /* Default text color (for the letter) */
}

/* Style for the rank letter */
.rank-badge-bg b {
    font-weight: bold;
    margin-right: 8px;
    /* Increased space between letter and icon */
    line-height: 1;
    /* Match badge line-height */
}

/* Adjust icon style slightly for better contrast/position on badge */
.rank-badge-bg .rank-icon {
    color: #FCFE06;
    /* Ensure yellow color */
    font-size: 0.9em;
    line-height: 1;
    flex-grow: 1;
    /* Allow icon to take remaining space */
    text-align: center;
    /* Center icon within its space */
}

/* Remove rule that hides agent badge */
/*
.rank-agente {
    width: 0;
    margin-right: 0;
}
*/

/* --- Admin Agentes: edición inline --- */
.inline-editing {
    background-color: #fff8e1;
    /* Suave fondo para modo edición */
}

.inline-editing input.form-control,
.inline-editing select.form-control {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

.gap-1>*+* {
    margin-left: 4px;
}

/* --- Modal Administrar Agentes: más ancho y aireado --- */
#modalAdministrarAgente .modal-dialog {
    max-width: 1200px;
    /* Más ancho que modal-lg estándar */
    width: 95%;
}

/* Modal Administrar Usuarios: más ancho */
#modalAdministrarUsuario .modal-dialog {
    max-width: 1000px;
    width: 95%;
}

#modalAdministrarAgente .modal-body {
    padding-top: 10px;
}

#modalAdministrarAgente table.table {
    margin-top: 10px;
}

/* --- Turnos Operativos --- */
.badge-turno-manana {
    background: #e3f2fd;
    color: #0d47a1;
}

.badge-turno-tarde {
    background: #fff3e0;
    color: #e65100;
}

.badge-turno-noche {
    background: #ede7f6;
    color: #4a148c;
}

.badge-turno-regularizacion {
    background: #e0f2f1;
    color: #004d40;
}

/* Day of week badges (used in permutas and operativos) */
.badge-day {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 50%;
    background: #64748b;
    color: #fff;
    text-align: center;
    font-size: 10px;
    font-weight: 900;
    margin-right: 4px;
    vertical-align: middle;
}

.badge-day-weekend {
    background: #ef4444;
    /* Red for weekends (S and D) */
}

/* Corrección para Summernote en modo pantalla completa dentro de modales Bootstrap */
.note-editor.note-frame.fullscreen {
    z-index: 2050 !important;
    background-color: #fff !important;
}

/* --- Admin Agentes: Mejoras Premium --- */
.table-danger-light {
    background-color: #fff5f5 !important;
}

/* Ocupaciones vinculadas al módulo de actos: fondo discreto para identificarlas */
tr.ocup-row-acto {
    background-color: #f0f4ff !important;
}

tr.ocup-row-acto:hover {
    background-color: #e8eeff !important;
}

.ocup-acto-badge {
    color: #5c6bc0;
    font-size: 0.85em;
    margin-left: 0.25rem;
    opacity: 0.9;
}

.opacity-75 {
    opacity: 0.75;
}

/* Tarjetas de estadísticas */
#statsAgentes .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

#statsAgentes .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Badges y Estados */
.badge-warning {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

.badge-success {
    border: 1px solid #c8e6c9;
}

.badge-secondary {
    background-color: #f5f5f5;
    color: #616161;
    border: 1px solid #e0e0e0;
}

/* Ajustes tabla admin */
#listaAgentes table thead th {
    background: #f8f9fa;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-top: none;
}

#listaAgentes table tbody tr {
    transition: background-color 0.15s ease;
}

#listaAgentes .sequence-header {
    border-left: 4px solid var(--color-primary);
}

/* Switches en edición inline */
.custom-control-input:checked~.custom-control-label::before {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.gap-1 {
    gap: 0.25rem;
}

/* Ajuste buscador */
#searchAgente:focus {
    box-shadow: none;
    border-color: var(--color-primary);
}

#searchAgente::placeholder {
    font-size: 0.9rem;
    color: #adb5bd;
}

/* --- Admin: Vista Compacta (Agentes y Usuarios) --- */
.listaAgentes table td,
.listaAgentes table th,
.listaUsuarios table td,
.listaUsuarios table th {
    padding: 0.4rem 0.5rem !important;
    font-size: 0.85rem;
}

.listaAgentes,
.listaUsuarios {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 4px;
}

.text-strikethrough {
    text-decoration: line-through;
    opacity: 0.6;
}

.btn-xs {
    padding: 0.1rem 0.3rem;
    font-size: 0.75rem;
    line-height: normal;
    border-radius: 0.2rem;
}

.nav-tabs .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    color: #6c757d;
}

.nav-tabs .nav-link.active {
    font-weight: bold;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
}

#agentTabs {
    margin-bottom: 1rem !important;
}



#agentTabsContent {
    background: #fff;
    padding: 2px;
}

.gap-2 {
    gap: 0.5rem;
}

/* Toast/SweetAlert2 por encima del mapa a pantalla completa (z-index 9999) */
.swal2-container {
    z-index: 10002 !important;
}

/* --- Notificaciones Apilables --- */
.notification-stack {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 10000;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* Dejar pasar clics si no hay nada */
    transition: top 0.3s ease-in-out;
}

.notif-item {
    pointer-events: auto;
    /* Activar clics en la notificación */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    animation: slideInRight 0.3s ease-out;
    border-left: 5px solid var(--color-primary);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.notif-item:hover {
    transform: scale(1.02);
}

.notif-item.notif-danger {
    border-left-color: #dc3545;
}

.notif-item.notif-warning {
    border-left-color: #ffc107;
}

.notif-item.notif-info {
    border-left-color: #17a2b8;
}

.notif-item.notif-success {
    border-left-color: #28a745;
}

.notif-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.notif-danger .notif-icon {
    color: #dc3545;
}

.notif-warning .notif-icon {
    color: #ffc107;
}

.notif-info .notif-icon {
    color: #17a2b8;
}

.notif-success .notif-icon {
    color: #28a745;
}

.notif-content {
    flex-grow: 1;
}

.notif-title {
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: 3px;
    display: block;
}

.notif-text {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.3;
}

.notif-close {
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 0.9rem;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
}

.notif-close:hover {
    color: #999;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Campana de Notificaciones (Navbar) --- */
.nav-notification-bell {
    position: relative;
}

.nav-notification-bell .nav-link {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.5rem 0.75rem !important;
    position: relative;
}

.nav-notification-bell .nav-link:hover {
    color: #fff !important;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background-color: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    border: 1.5px solid var(--color-primary);
    display: none;
}

.notification-badge.show {
    display: block;
}

/* Animación de campanilla cuando hay notificaciones */
@keyframes bell-ring {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-12deg);
    }

    30% {
        transform: rotate(10deg);
    }

    40% {
        transform: rotate(-8deg);
    }

    50% {
        transform: rotate(5deg);
    }

    60% {
        transform: rotate(-3deg);
    }

    70% {
        transform: rotate(2deg);
    }

    80% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.nav-notification-bell .nav-link .fa-bell {
    display: inline-block;
    transform-origin: top center;
}

/* La campana timbra solo cuando el badge es visible */
.notification-badge.show~.fa-bell,
.nav-notification-bell:has(.notification-badge.show) .fa-bell {
    animation: bell-ring 1.2s ease-in-out 0.3s 3;
}

/* Dropdown de la campana en Desktop */
.nav-notification-bell .notification-dropdown {
    width: 380px;
    max-width: 90vw;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

@media (max-width: 1199.98px) {

    /* Forzar que la campana móvil esté en la misma línea que la marca y el botón */
    .navbar {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
    }

    .navbar-brand {
        margin-right: auto !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60%;
    }

    /* Contenedor de la campana móvil */
    .navbar>.navbar-nav.flex-row {
        margin-left: 0 !important;
        margin-right: 10px !important;
    }

    .nav-notification-bell .nav-link {
        padding: 5px 10px !important;
        font-size: 1.25rem;
    }

    /* El dropdown de la campana en móvil */
    .nav-notification-bell .notification-dropdown {
        position: fixed !important;
        top: 56px !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        max-width: none !important;
        margin: 0 !important;
        z-index: 1050;
    }

    /* El menú desplegable normal debe ocupar todo el ancho */
    .navbar-collapse {
        width: 100%;
        order: 3;
    }
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
}

.btn-notif-clear {
    font-size: 0.75rem;
    color: #6c757d;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-weight: 400;
}

.btn-notif-clear:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.notification-list {
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
    transition: background 0.15s ease;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notif-bell-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: #fff;
    margin-top: 2px;
}

.notif-bell-icon.type-info {
    background-color: #17a2b8;
}

.notif-bell-icon.type-warning {
    background-color: #ffc107;
    color: #333;
}

.notif-bell-icon.type-danger {
    background-color: #dc3545;
}

.notif-bell-icon.type-success {
    background-color: #28a745;
}

.notif-bell-body {
    flex-grow: 1;
    min-width: 0;
}

.notif-bell-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.25;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-bell-text {
    font-size: 0.78rem;
    color: #6c757d;
    line-height: 1.35;
}

.notification-empty-state {
    padding: 32px 16px;
    text-align: center;
    color: #adb5bd;
}

.notification-empty-state i {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 8px;
    opacity: 0.45;
}

.notification-empty-state p {
    margin: 0;
    font-size: 0.85rem;
}

/* --- Agentes en Baja (Refuerzos) --- */
/* --- Agentes en Baja (Refuerzos) --- */
option.agente-baja {
    background-color: #fff5f5;
    /* Fondo muy suave rojizo */
    color: #c53030 !important;
    /* Rojo elegante */
}

/* --- Mapa Actos: controles a la izquierda, leyenda a la derecha (sin solaparse) --- */
.acto-map-wrapper .maplibre-gl-ctrl-top-left {
    left: 10px;
    top: 50px;
}

.acto-map-wrapper .maplibre-gl-ctrl-top-right {
    display: none;
}

.acto-map-wrapper .acto-leyenda {
    left: auto !important;
    right: 58px !important;
    top: 10px !important;
    max-width: 200px;
    z-index: 1000;
}

/* --- Mapa Actos: medidas fijas para que el mapa cargue bien en modales --- */
.acto-map-column {
    height: 75vh;
    min-height: 450px;
    overflow: hidden;
}

.acto-map-wrapper {
    min-height: 450px;
    width: 100%;
}

.acto-map-viewport {
    flex: 1;
    min-height: 0;
}

/* Vista impresión: medidas fijas = misma escala que la impresión real (A4 horizontal 297×210mm) */
:root {
    /* A4 horizontal: más margen arriba/abajo/lados → cabecera 20mm, mapa 277×166mm (márgenes 10mm L/R), pie 24mm → total 210mm */
    --acto-print-header-mm: 20;
    --acto-print-map-height-mm: 166;
    --acto-print-footer-mm: 24;
    --acto-print-margin-h-mm: 10;
    /* En px para el configurador (≈ 3.78px/mm a 96dpi) */
    --acto-print-header-height: 76px;
    /* ~20mm: más margen título/fecha */
    --acto-print-footer-height: 91px;
    /* ~24mm: más espacio leyenda */
    --acto-print-margin-h: 38px;
    /* ~10mm: margen izquierdo y derecho del marco */
}

/* Vista impresión: modo "Configurar impresión" = simulación de página impresa */
#acto-map-wrapper.acto-print-preview-mode .acto-map-search {
    display: none !important;
}

.acto-print-preview-header {
    flex: 0 0 auto;
    height: var(--acto-print-header-height);
    min-height: var(--acto-print-header-height);
    padding: 0.4em 0.6em;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
}

.acto-print-preview-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25em;
    width: 100%;
}

.acto-print-preview-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.acto-print-preview-fecha {
    font-size: 0.75rem;
    color: #555;
}

.acto-print-preview-listo {
    flex-shrink: 0;
}

.acto-print-preview-footer {
    flex: 0 0 auto;
    height: var(--acto-print-footer-height);
    min-height: var(--acto-print-footer-height);
    padding: 0.35em 0.5em;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 0.7rem;
    overflow: auto;
}

.acto-print-preview-leyenda strong {
    display: block;
    margin-bottom: 0.2em;
}

.acto-print-preview-leyenda-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 0.75em;
}

.acto-print-preview-leyenda-body>div {
    margin-bottom: 0.15em;
}

/* Marco del plano: proporción fija 297/178, con márgenes laterales (no pegado a los bordes) */
.acto-map-viewport.acto-print-preview {
    flex: 0 0 auto;
    width: calc(100% - 2 * var(--acto-print-margin-h));
    max-width: calc(100% - 2 * var(--acto-print-margin-h));
    margin-left: var(--acto-print-margin-h);
    margin-right: var(--acto-print-margin-h);
    aspect-ratio: 297 / 178;
    border: 2px solid #333;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

#acto-mapa.acto-mapa-fixed,
.acto-map-wrapper #acto-mapa {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

/* --- Mapa Actos: pantalla completa (fallback si Fullscreen API no disponible) --- */
#acto-map-wrapper.map-fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    z-index: 9999 !important;
    background: #fff;
}

#acto-map-wrapper.map-fullscreen-mode .acto-map-viewport {
    flex: 1;
    min-height: 0;
}

#acto-map-wrapper.map-fullscreen-mode #acto-mapa {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Marcador fijo: Central Policía Local (icono building-shield) */
.acto-marker-policia-local {
    cursor: pointer;
    font-size: 1.5rem;
    color: #007bff;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.acto-marker-policia-local:hover {
    color: #0056b3;
}

/* Ubicaciones fijas del mapa (icono FA + popup) */
.acto-ubicacion-fija {
    cursor: pointer;
    line-height: 1;
    font-size: 1.5rem;
    color: #007bff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.acto-ubicacion-fija:hover {
    color: #0056b3;
}

.acto-ubicacion-fija i {
    display: block;
}

/* Herramientas del mapa: por encima del mapa (z-index) y más compactas */
#modal-acto-editor #acto-map-tools-panel {
    z-index: 1100;
    max-height: 45vh;
    overflow-y: auto;
}

#modal-acto-editor .acto-marker-dropdown .dropdown-menu {
    z-index: 1110;
}

#modal-acto-editor #acto-map-tools-content {
    padding: 0.4rem 0.5rem !important;
}

#modal-acto-editor #acto-map-tools-content .acto-tool-group {
    font-size: 0.7rem;
}

#modal-acto-editor #acto-map-tools-content .btn-group-sm .btn,
#modal-acto-editor #acto-map-tools-content .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
}

#modal-acto-editor #acto-map-tools-content select.form-control-sm {
    font-size: 0.8rem;
    padding: 0.2rem 0.35rem;
    min-height: 28px;
}

/* Desplegable de marcador: toggle manual, abre hacia arriba (sin Bootstrap dropdown.js) */
#modal-acto-editor .acto-marker-dropdown.show .dropdown-menu {
    display: block;
}

#modal-acto-editor .acto-marker-dropdown.dropup .dropdown-menu {
    top: auto;
    bottom: 100%;
    margin-bottom: 0.125rem;
}

#modal-acto-editor .acto-marker-dropdown .dropdown-menu {
    max-height: 240px;
    overflow-y: auto;
}

#modal-acto-editor #acto-map-tools-content label.small {
    font-size: 0.75rem;
}

#modal-acto-editor #acto-map-tools-content .border-top.pt-2 {
    padding-top: 0.4rem !important;
}

#modal-acto-editor #acto-map-tools-content .mb-2 {
    margin-bottom: 0.35rem !important;
}

/* Footer del editor de acto: siempre visible y clickable (evita que el mapa lo tape) */
#modal-acto-editor .modal-body {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

#modal-acto-editor .modal-footer-acto-editor {
    position: relative;
    z-index: 1060;
    flex-shrink: 0;
}

/* Modal editor: maximizar a ancho de ventana (no pantalla completa) */
#modal-acto-editor .modal-dialog.acto-editor-maximized {
    width: calc(100vw - 2rem) !important;
    max-width: none !important;
    margin: 1rem auto;
}

/* Asignar servicio: por encima de Registro de Servicios Extraordinarios (Bootstrap 1050) */
#modalAsignarServicio {
    z-index: 1060 !important;
}

/* Modales de impresión de actos: z-index superior para mostrarse sobre el modal editor */
#modal-imprimir-acto {
    z-index: 1070 !important;
}

#modal-acto-imprimir-carteles {
    z-index: 1075 !important;
}

/* Modal imprimir carteles: tipo de cartel con iconos (cards) */
.acto-cartel-tipo-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.acto-cartel-tipo-option {
    border: 2px solid #cfd4dc;
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 120px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    background: #f8fafc;
}

.acto-cartel-tipo-option:hover {
    border-color: #818cf8;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.15);
}

.acto-cartel-tipo-option.active {
    border-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.2);
}

.acto-cartel-tipo-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.acto-cartel-tipo-option .acto-cartel-tipo-icon {
    display: block;
    margin-bottom: 6px;
}

.acto-cartel-tipo-option .acto-cartel-tipo-icon img {
    height: 44px;
    width: auto;
    max-width: 100px;
    display: block;
    margin: 0 auto;
}

.acto-cartel-tipo-icon-none {
    margin: 0 auto;
    width: 36px;
    height: 36px;
    border: 2px dashed #94a3b8;
    border-radius: 8px;
    position: relative;
    display: block;
}

.acto-cartel-tipo-icon-none::before,
.acto-cartel-tipo-icon-none::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 15px;
    width: 2px;
    height: 18px;
    background: #94a3b8;
    border-radius: 2px;
}

.acto-cartel-tipo-icon-none::before {
    transform: rotate(45deg);
}

.acto-cartel-tipo-icon-none::after {
    transform: rotate(-45deg);
}

.acto-cartel-tipo-option .acto-cartel-tipo-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
}

/* Filas clicables en modal imprimir carteles */
#acto-carteles-tbody tr[data-id] {
    cursor: pointer;
}

/* Expedientes: filas de actos anidados */
tr.acto-en-expediente.expediente-actos-row {
    background-color: rgba(0, 0, 0, 0.02);
}

tr.expediente-row td:first-child {
    width: 30px;
}

/* Utilidades Generales */
.no-caret::after {
    display: none !important;
}

/* ========================================================
   MÓDULO VEHÍCULOS ABANDONADOS - OPTIMIZACIONES MÓVILES Y DENUNCIAS
   ======================================================== */
@media (max-width: 991.98px) {
    #va-table th, #va-table td {
        padding: 0.4rem 0.3rem !important;
        font-size: 0.85rem;
    }
    #va-table td strong {
        font-size: 0.95rem;
    }
    .va-table-thumb {
        width: 32px !important;
        height: 24px !important;
    }
    #va-detail-card {
        scroll-margin-top: 70px;
    }
    #va-list-col {
        scroll-margin-top: 70px;
    }
    .va-mobile-touch-btn {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

.va-denuncia-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-left: 4px solid #ffc107 !important;
}

.va-denuncia-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.va-denuncia-thumb {
    width: 60px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.va-denuncia-thumb:hover {
    opacity: 0.85;
}

/* Optimizaciones Modal Denuncias (+8 días) */
#vaDenunciaModal .modal-dialog {
    max-width: 500px;
    margin: 1.5rem auto;
}

@media (max-width: 576px) {
    #vaDenunciaModal {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    #vaDenunciaModal .modal-dialog {
        margin: 0.5rem auto !important;
        max-width: calc(100vw - 16px) !important;
        width: calc(100vw - 16px) !important;
    }
    #vaDenunciaModal .modal-content {
        max-height: calc(100vh - 1rem);
        border-radius: 8px;
        display: flex;
        flex-direction: column;
    }
    #vaDenunciaModal .modal-body {
        padding: 0.75rem !important;
        overflow-y: auto;
        max-height: calc(100vh - 130px);
        -webkit-overflow-scrolling: touch;
    }
    #vaDenunciaModal .modal-footer {
        padding: 0.5rem 0.75rem !important;
        display: flex;
        justify-content: flex-end;
        gap: 6px;
    }
    #vaDenunciaModal .form-group {
        margin-bottom: 0.5rem !important;
    }
    #vaDenunciaModal .form-control {
        font-size: 0.88rem;
    }
    #vaDenunciaModal .custom-file-label {
        font-size: 0.82rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Animación y estilos toggle denuncias (sin hover/focus azul) */
.va-toggle-denuncias-btn {
    color: #212529 !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

.va-toggle-denuncias-btn:hover,
.va-toggle-denuncias-btn:focus,
.va-toggle-denuncias-btn:active {
    color: #212529 !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.va-toggle-denuncias-btn[aria-expanded="true"] .va-chevron-icon {
    transform: rotate(180deg);
}

/* Galería de fotos - Botones navegación */
#vaPhotoViewPrev,
#vaPhotoViewNext {
    background: rgba(0, 0, 0, 0.35) !important;
    border: none !important;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, opacity 0.2s;
    text-decoration: none !important;
    box-shadow: none !important;
}

#vaPhotoViewPrev:hover,
#vaPhotoViewNext:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    opacity: 1 !important;
}

#vaPhotoViewPrev i,
#vaPhotoViewNext i {
    font-size: 1.3rem;
}

@media (max-width: 576px) {
    #vaPhotoViewPrev,
    #vaPhotoViewNext {
        width: 36px;
        height: 36px;
    }
    #vaPhotoViewPrev i,
    #vaPhotoViewNext i {
        font-size: 1rem;
    }
}

.fa-police-car-custom {
    display: inline-block;
    width: 1.6em;
    height: 1.6em;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='128' height='128' viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M26.84 69.43c-.77.11-15.41 2.86-18.16 4.84s-3.98 3.98-4.53 6.95c-.55 2.97 3.54 6.04 3.54 6.04l30.16 2.86l31.26-4.95l45.79 3.85l10.51-6.44s-.39-7.5-3.03-9.81c-2.64-2.31-9.33-3.01-11.42-4.22s-7.08-10.7-13.34-15.86c-7.49-6.16-17.9-6.59-26.48-6.49c-9.58.11-16.14.8-18.78 1.79c-4.07 1.54-7.02 3.04-10.77 5.91c-5.74 4.4-14.75 15.53-14.75 15.53z' fill='%23e3e3e1'/%3E%3Cpath d='M8.79 83.19l-4.84-.22s-.66 8.04-.77 14.2c-.11 6.27-.33 9.03 2.31 11.45c1.74 1.6 4.91 2.32 10.08 2.21s101.54.44 103.97.33c2.42-.11 4.62-1.54 5.06-5.28c.44-3.74.99-17.94.99-17.94l-5.5-5.72l-111.3.97z' fill='%23474c4f'/%3E%3Cpath d='M49.59 110.91s-.16-18.18-17.05-17.89c-18.37.31-16.98 17.81-16.98 17.81l34.03.08z' fill='%232f2f2f'/%3E%3Cpath d='M84.85 111.07s.29-18.55 17.36-17.95c17.75.62 16.35 18.06 16.35 18.06l-33.71-.11z' fill='%232f2f2f'/%3E%3Cpath d='M17.81 110.34c.09 5.52 4.49 13.46 14.07 13.52c9.58.06 14.55-7.28 14.25-14.8c-.31-7.64-6.25-13.04-14.8-12.8c-8 .24-13.64 6.44-13.52 14.08z' fill='%234e433d'/%3E%3Cpath d='M24.48 109.88c.05 2.91 2.41 7.1 7.56 7.13c5.15.03 7.64-3.62 7.48-7.58c-.17-4.03-3.46-7.03-7.78-6.97c-4.3.07-7.33 3.39-7.26 7.42z' fill='%23c8c8c8'/%3E%3Cpath d='M88.53 110.81c.09 5.48 4.39 13.36 13.77 13.42c9.38.06 14.24-7.22 13.95-14.68c-.3-7.59-6.11-12.94-14.48-12.7c-7.83.22-13.36 6.37-13.24 13.96z' fill='%234e433d'/%3E%3Cpath d='M94.79 110.37c.05 2.91 2.41 7.1 7.56 7.13c5.15.03 7.64-3.62 7.48-7.58c-.17-4.03-3.46-7.03-7.78-6.97c-4.29.07-7.32 3.39-7.26 7.42z' fill='%23c8c8c8'/%3E%3Cpath d='M4.09 81.2s10.01-.67 10.53.12c.29.44-2.06 8.84-2.77 9.4c-1.31 1.05-8.64 3.32-8.64 3.32s-.02-4.96.26-7.86c.3-2.97.62-4.98.62-4.98z' fill='%23fda431'/%3E%3Cpath d='M120.03 78.14c-.52.52-.18 3.05 0 6.47c.13 2.38.18 5.49.98 5.68c.79.18 4.64.12 4.64.12s.12-3.11-.06-6.53c-.17-3.24-.73-5.8-.73-5.8s-4.34-.43-4.83.06z' fill='%23ff2a23'/%3E%3Cpath d='M98.84 74.62c.49-.24 6.2-5.63 6.28-6.2c.08-.57-5.87-10.85-12.89-14.52c-7.01-3.67-11.82-3.99-19.72-4.23c-8.15-.25-19.91.65-27.17 5.95c-5.52 4.03-12.72 13.86-13.7 15.17s-.24 3.33 2.12 3.43c5.79.23 65.08.4 65.08.4z' fill='%232f2f2f'/%3E%3Cpath d='M37.84 69.89c.23.34 31.56.57 32.22.24c.16-.08.39-16.19.31-16.29c-.07-.08-1-.05-1.71-.04c-4 .05-14.4.52-19.28 3.84c-5.69 3.87-11.87 11.76-11.54 12.25z' fill='%23535456'/%3E%3Cpath d='M75.34 53.99c-.12.18-.1 16.51.02 16.55c.24.08 20.8.24 21.12.08c.33-.16 3.26-2.77 3.34-3.02s-3.89-7.63-9.54-10.52c-4.99-2.56-10.38-3.01-13.41-3.12c-.82-.03-1.46-.09-1.53.03z' fill='%23535456'/%3E%3Cpath d='M38.33 76.08c.39.74 12.15.57 12.97-.33c.56-.62.69-7.13-.16-7.83c-.9-.73-5-.63-7.91-.16c-2.54.41-5.64 6.94-4.9 8.32z' fill='%23000000'/%3E%3Cpath d='M55.95 47.15s-.58-5.82 1.2-7.07c.81-.57 2.82-.54 5.63-.6c2.91-.06 5.87 0 5.87 0l2.34 6.47l-2.73 1.19l-12.31.01z' fill='%231064cb'/%3E%3Cpath d='M73.53 39.44s1.88-.04 4.51.01c2.36.05 5.74-.02 6.69 1.29c1.23 1.68.81 6.52.81 6.52l-11.93-.11l-2.39-4.51l2.31-3.2z' fill='%23dc0d27'/%3E%3Cpath fill='%23c3ccc7' d='M68.23 39.48l5.34-.03l.05 7.7h-5.39z'/%3E%3Cpath d='M59.89 87.74c-.93.2-2.12 16.26 8.59 16c10.58-.26 8.86-15.88 8.33-16.07c-.93-.33-1.72 2.58-4.03 2.45c-1.91-.11-3.41-2.85-4.47-2.79c-1.12.07-1.95 2.72-4.53 2.78c-1.84.06-2.96-2.56-3.89-2.37z' fill='%23e3e4de'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    vertical-align: middle;
}

/* Icono de ambulancia personalizado */
.fa-ambulance-custom {
    display: inline-block;
    width: 2.5em;
    height: 1.6em;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='128' height='128' viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M47.95 111.51l37.52.05l39.77-16.2s.26-12.59-.51-25.62c-.77-13.03-4.38-32.84-4.38-32.84s.22-3.62-.22-5.58c-.42-1.86-1.54-3.37-4.65-3.55c-2.85-.17-67.12 0-68.87.22s-12.3 12.97-12.3 12.97S19.43 65.58 19 66.13c-.44.55-10.16 7.1-11.71 9.09C5.67 77.3 5.78 79 5.78 79l.06 16.83l42.11 15.68z' fill='%23e1e1e1'/%3E%3Cpath d='M125.25 95.35s-21.72-.2-26.21.74s-7.51 3.62-10.05 7.71c-2.55 4.09-3.55 7.78-3.55 7.78s35.46-.07 36.66 0s2.82-1.81 2.95-4.36c.14-2.55.2-11.87.2-11.87z' fill='%23516c73'/%3E%3Cpath d='M47.97 111.5s-3.08-7.37-6.3-10.66s-7.91-5.5-13.54-5.7c-5.63-.2-22.27-.33-22.27-.33s-3.74 3.08-4.01 7.43c-.27 4.36 0 8.51 3.49 8.78s42.63.48 42.63.48z' fill='%23516c73'/%3E%3Cpath d='M15.48 112.45c.08 4.73 3.85 11.55 12.07 11.6s12.48-6.24 12.22-12.69c-.26-6.56-5.36-11.18-12.69-10.98c-6.87.2-11.71 5.52-11.6 12.07z' fill='%234e433d'/%3E%3Cpath d='M21.35 112.17c.04 2.5 2.02 6.09 6.34 6.12c4.32.03 6.42-3.1 6.28-6.5c-.14-3.46-2.9-6.03-6.53-5.98c-3.6.05-6.14 2.91-6.09 6.36z' fill='%23c8c8c8'/%3E%3Cpath d='M93.93 111.89c.08 4.73 3.85 11.55 12.07 11.6s12.48-6.24 12.22-12.69c-.26-6.56-5.36-11.18-12.69-10.98c-6.87.2-11.71 5.52-11.6 12.07z' fill='%234e433d'/%3E%3Cpath d='M99.81 111.61c.04 2.5 2.02 6.09 6.34 6.12c4.32.03 6.42-3.1 6.28-6.5c-.14-3.46-2.9-6.03-6.53-5.98c-3.6.05-6.15 2.9-6.09 6.36z' fill='%23c8c8c8'/%3E%3Cpath d='M5.82 90.86l119.47.47s.02-2.12.02-4.92c0-2.76-.1-4.83-.1-4.83L5.74 81.55l.08 9.31z' fill='%23d70617'/%3E%3Cpath d='M5.76 78.97s12.17-.05 12.83-.05s1.18.51 1.18 1.38c0 .87.36 4.09-2.25 6.49c-1.12 1.03-3.54 1.25-5.83 1.28c-3.43.04-5.62.06-5.9.06c0 0-.15-6.81-.13-7.64c.04-.97.1-1.52.1-1.52z' fill='%23ffe365'/%3E%3Cpath d='M34.05 41.4l87.09-.02l-.35-2.26c-.2-1.29-.43-2.21-.43-2.21L46.53 37l.09-9.02s-1.79-.21-2.73.67c-1.33 1.25-3.72 3.76-6.03 6.79c-1.81 2.37-3.81 5.96-3.81 5.96z' fill='%23c9c9c9'/%3E%3Cpath d='M37.32 31.86c-2.3 2.57-1.65 6.79-1.65 6.79s7.48.24 7.74-.18c.26-.41.15-9.46.15-9.46s-3.13-.64-6.24 2.85z' fill='%23fa2b23'/%3E%3Cpath d='M46.62 28.01c.41-.05 23.78-.2 23.78-.2s0-4.01-.04-5.46c-.05-1.97-1.61-3.47-4.45-3.57c-1.99-.07-13.31-.16-15.12-.05c-1.81.1-3.88 1.61-3.99 3.88s-.18 5.4-.18 5.4z' fill='%23dd0f26'/%3E%3Cpath d='M55.42 23.2l1.32 2.88l-3.16-.05s-2.43-2.33-2.43-2.85s2.69-2.54 2.69-2.54l3.33-.04l-1.75 2.6z' fill='%23ff5b5e'/%3E%3Cpath d='M61.07 23.26l-1.17 2.9l2.63-.02s2.7-2.32 2.73-2.77c.04-.65-2.71-2.76-2.71-2.76l-2.95-.01l1.47 2.66z' fill='%23ff5b5e'/%3E%3Cpath d='M90.78 44.69c-.21 1.68-.35 16.27-.35 16.27l.07 14.94l7.47-.14l.42-15.29l-.28-15.64l-7.33-.14z' fill='%231e86fe'/%3E%3Cpath fill='%231e86fe' d='M79.77 65.24l12.56-8.59l12.99-8.24l4.05 6l-12.85 8.94l-12.98 8.03z'/%3E%3Cpath fill='%231e86fe' d='M83.12 48.69l-3.91 5.86l12.42 9.15l12.85 7.96l4.12-5.87l-12.99-9.14z'/%3E%3Cpath d='M38.09 45.76c-1.39.13-2.72.56-3.77 2.16c-1.05 1.61-10.12 18.01-11.03 19.55c-.49.83-1.07 2.12-.85 3.13c.19.85 1.07 1.49 2.03 1.55c2.09.14 28.76-.07 30.23-.07c1.47 0 2.72-1.26 2.79-3.49s.18-18.44 0-20.18c-.21-2.02-1.54-2.65-3.21-2.72c-1.54-.07-14.73-.07-16.19.07z' fill='%23557077'/%3E%3Cpath d='M39.7 50.04c-1.37.02-2.43.47-3.48 2.22c-.61 1.02-7.89 14.24-8.1 14.87c-.21.63.28 1.19 1.33 1.19s21.22-.14 22.48-.14c1.26 0 1.89-.91 1.95-2.79c.07-1.89 0-12.36 0-13.47s-.56-1.89-2.02-1.89c-1.46-.01-10.9-.02-12.16.01z' fill='%23afe3fb'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    vertical-align: middle;
}

/* Icono de cono personalizado para el módulo de actos */
.fa-cone-custom {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='512' height='512' viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill:%23FFA055;' d='M467.862,512H44.138c-4.875,0-8.828-3.953-8.828-8.828v-17.655c0-4.875,3.953-8.828,8.828-8.828 h423.724c4.875,0,8.828,3.953,8.828,8.828v17.655C476.69,508.047,472.737,512,467.862,512z'/%3E%3Cpath style='fill:%23FFB45A;' d='M269.3,0h-26.6c-7.819,0-14.707,5.143-16.928,12.64L88.276,476.69h335.448L286.228,12.64 C284.007,5.143,277.119,0,269.3,0z'/%3E%3Cg%3E%3Cpolygon style='fill:%23FFEBBE;' points='171.975,194.207 340.025,194.207 319.101,123.586 192.899,123.586'/%3E%3Cpolygon style='fill:%23FFEBBE;' points='119.662,370.759 392.338,370.759 371.413,300.138 140.587,300.138'/%3E%3C/g%3E%3Cg%3E%3Cpolygon style='fill:%23FFA055;' points='219.055,35.31 292.945,35.31 287.714,17.655 224.286,17.655'/%3E%3Cpolygon style='fill:%23FFA055;' points='208.593,70.621 303.407,70.621 298.176,52.966 213.824,52.966'/%3E%3C/g%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    vertical-align: middle;
}

/* Icono de camión de bomberos personalizado */
.fa-fire-truck-custom {
    display: inline-block;
    width: 1.6em;
    height: 1.6em;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='1024' height='1024' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M835.7 313.3c-1.4-5.1-6.9-9.3-12.2-9.3h-56.8c-5.3 0-10.8 4.2-12.2 9.3l-12.7 46c-1.4 5.1 1.8 9.3 7.1 9.3h92.5c5.3 0 8.5-4.2 7.1-9.3l-12.8-46z' fill='%23FF8189' /%3E%3Cpath d='M192.7 293.5h48.6V342h-48.6zH310.2 293.5h48.6V342h-48.6zH427.6 293.5h48.6V342h-48.6z' fill='%23A4A9AD' /%3E%3Cpath d='M95.2 695.1V390.2c0-26.5 21.7-48.1 48.1-48.1h737.1c26.5 0 48.1 21.7 48.1 48.1V695H95.2z' fill='%23FF5959' /%3E%3Cpath d='M95.2 530.4h833.4v37.8H95.2z' fill='%23D1D3D3' /%3E%3Cpath d='M958.9 709.6c0 9.9-8.1 17.9-17.9 17.9h-40.3c-9.9 0-17.9-8.1-17.9-17.9v-29.1c0-9.9 8.1-17.9 17.9-17.9H941c9.9 0 17.9 8.1 17.9 17.9v29.1zM133.3 709.6c0 9.9-8.1 17.9-17.9 17.9H82.7c-9.9 0-17.9-8.1-17.9-17.9v-29.1c0-9.9 8.1-17.9 17.9-17.9h32.6c9.9 0 17.9 8.1 17.9 17.9l0.1 29.1z' fill='%23A4A9AD' /%3E%3Cpath d='M293.4 695.1m-97 0a97 97 0 1 0 194 0 97 97 0 1 0-194 0Z' fill='%23333E48' /%3E%3Cpath d='M293.4 695.1m-49.2 0a49.2 49.2 0 1 0 98.4 0 49.2 49.2 0 1 0-98.4 0Z' fill='%23A4A9AD' /%3E%3Cpath d='M730.3 695.1m-97 0a97 97 0 1 0 194 0 97 97 0 1 0-194 0Z' fill='%23333E48' /%3E%3Cpath d='M730.3 695.1m-49.2 0a49.2 49.2 0 1 0 98.4 0 49.2 49.2 0 1 0-98.4 0Z' fill='%23A4A9AD' /%3E%3Cpath d='M730.3 251.2c0-10.6-8.7-19.3-19.3-19.3H159.5c-10.6 0-19.3 8.7-19.3 19.3v23.1c0 10.6 8.7 19.3 19.3 19.3h551.6c10.6 0 19.3-8.7 19.3-19.3l-0.1-23.1z' fill='%23D1D3D3' /%3E%3Cpath d='M739.9 463.9c0 8.5 6.9 15.4 15.4 15.4h112.1c8.5 0 15.4-6.9 15.4-15.4v-66.8c0-8.5-6.9-15.4-15.4-15.4H755.3c-8.5 0-15.4 6.9-15.4 15.4v66.8z' fill='%23333E48' /%3E%3Cpath d='M599.6 463.9c0 8.5 6.9 15.4 15.4 15.4h65.9c8.5 0 15.4-6.9 15.4-15.4v-66.8c0-8.5-6.9-15.4-15.4-15.4H615c-8.5 0-15.4 6.9-15.4 15.4v66.8z' fill='%23333E48' /%3E%3Cpath d='M439.6 507.3h144.6v187.8H439.6z' fill='%23A4A9AD' /%3E%3Cpath d='M483.2 556.7m-13.5 0a13.5 13.5 0 1 0 27 0 13.5 13.5 0 1 0-27 0Z' fill='%23D1D3D3' /%3E%3Cpath d='M540.5 556.7m-13.5 0a13.5 13.5 0 1 0 27 0 13.5 13.5 0 1 0-27 0Z' fill='%23D1D3D3' /%3E%3Cpath d='M540.5 618.5h-57.3c-8 0-14.4-6.5-14.4-14.4s6.5-14.4 14.4-14.4h57.3c8 0 14.4 6.5 14.4 14.4s-6.4 14.4-14.4 14.4zM540.5 662.6h-57.3c-8 0-14.4-6.5-14.4-14.4s6.5-14.4 14.4-14.4h57.3c8 0 14.4 6.5 14.4 14.4s-6.4 14.4-14.4 14.4z' fill='%23D1D3D3' /%3E%3Cpath d='M185.4 416.1h317V445h-317z' fill='%23FFB819' /%3E%3Cpath d='M528.5 405.5c0-5.3-4.3-9.6-9.6-9.6h-32.8c-5.3 0-9.6 4.3-9.6 9.6v50.1c0 5.3 4.3 9.6 9.6 9.6h32.8c5.3 0 9.6-4.3 9.6-9.6v-50.1zM211.4 405.5c0-5.3-4.3-9.6-9.6-9.6H169c-5.3 0-9.6 4.3-9.6 9.6v50.1c0 5.3 4.3 9.6 9.6 9.6h32.8c5.3 0 9.6-4.3 9.6-9.6v-50.1z' fill='%23D1D3D3' /%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    vertical-align: middle;
}

/* Icono de camión personalizado */
.fa-truck-custom {
    display: inline-block;
    width: 2.2em;
    height: 1.6em;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 511.99 511.99' xml:space='preserve'%3E%3Cpolygon style='fill:%23E6E9ED;' points='310.557,373.18 329.649,202.62 420.975,202.527 463.116,264.588 501.303,283.76 501.115,373.18 '/%3E%3Cpolygon style='fill:%234FC2E9;' points='457.491,256.291 420.975,202.527 329.649,202.62 323.649,256.291 '/%3E%3Cpath style='fill:%23E6E9ED;' d='M470.382,256.291l-43.75-64.437l-106.529,0.109l-21.468,191.873h213.121l0.234-106.654 L470.382,256.291z M490.475,362.508H322.493l16.688-149.231l76.155-0.078l37.405,55.077l3.109,4.594l4.953,2.484l29.812,14.969 L490.475,362.508z'/%3E%3Cpath style='fill:%23FC6E51;' d='M319.977,85.201H21.328C9.547,85.201,0,94.748,0,106.529v255.979 c0,11.781,9.547,21.328,21.328,21.328h298.634c11.781,0,21.344-9.547,21.344-21.328v-255.98 C341.306,94.747,331.759,85.201,319.977,85.201z'/%3E%3Crect x='362.645' y='213.244' style='fill:%233BAFDA;' width='21.328' height='43.05'/%3E%3Cg%3E%3Crect x='63.748' y='84.966' style='fill:%23E9573F;' width='21.328' height='297.09'/%3E%3Crect x='127.995' y='84.966' style='fill:%23E9573F;' width='21.328' height='297.09'/%3E%3Crect x='192.245' y='84.966' style='fill:%23E9573F;' width='21.328' height='297.09'/%3E%3Crect x='256.495' y='84.966' style='fill:%23E9573F;' width='21.328' height='297.09'/%3E%3C/g%3E%3Cg%3E%3Ccircle style='fill:%23434A54;' cx='415.965' cy='373.694' r='53.33'/%3E%3Ccircle style='fill:%23434A54;' cx='106.655' cy='373.694' r='53.33'/%3E%3C/g%3E%3Cg%3E%3Cpath style='fill:%23F5F7FA;' d='M405.289,373.695c0,5.891,4.781,10.672,10.672,10.672c5.89,0,10.671-4.781,10.671-10.672 s-4.781-10.656-10.671-10.656C410.07,363.039,405.289,367.805,405.289,373.695z'/%3E%3Cpath style='fill:%23F5F7FA;' d='M95.982,373.695c0,5.891,4.781,10.672,10.672,10.672c5.891,0,10.656-4.781,10.656-10.672 s-4.765-10.656-10.656-10.656C100.763,363.039,95.982,367.805,95.982,373.695z'/%3E%3C/g%3E%3Cpath style='fill:%23ED5564;' d='M511.943,298.51h-21.312c-5.891,0-10.656,4.781-10.656,10.67c0,5.891,4.766,10.656,10.656,10.656 h21.265L511.943,298.51z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    vertical-align: middle;
}

/* Icono de agente de policía personalizado */
.fa-police-agent-custom {
    display: inline-block;
    width: 1.6em;
    height: 1.6em;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='128' height='128' viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M98.72 78.24c-1.34-2.44.13-4.91 2.67-7.94c4-4.77 7.96-15.61 3.19-26.32c.02-.06-.91-1.83-.89-1.89l-1.71-.09c-.55-.08-19.26-.12-37.98-.12c-18.72 0-37.43.04-37.98.12c0 0-2.62 1.92-2.6 1.98c-4.77 10.71-.8 21.55 3.19 26.32c2.54 3.03 4.01 5.5 2.67 7.94c-1.31 2.39-4.92 2.74-4.92 2.74s.71 2.46 2.66 3.79c1.81 1.23 4.08 1.53 5.66 1.57c0 0 5.89 9.47 22.23 9.47H73.1c16.34 0 22.23-9.47 22.23-9.47c1.58-.04 3.85-.33 5.66-1.57c1.94-1.33 2.66-3.79 2.66-3.79s-3.62-.36-4.93-2.74z' fill='%23312d2d'/%3E%3Cpath d='M63.99 95.79V85.3l28.59-2.47l2.74 3.5s-5.89 9.47-22.23 9.47l-9.1-.01z' fill='%23454140'/%3E%3Cpath d='M95.07 81.82c-4.51-7 4.78-9.59 4.78-9.59l.01.01c-1.54 2.18-2.2 4.1-1.16 6c1.31 2.39 4.92 2.74 4.92 2.74s-4.68 4.75-8.55.84z' fill='%23454140'/%3E%3Cpath d='M104.6 43.98c4.64 10.37.9 21.33-2.97 26.05c-.54.65-2.83 3.19-3.29 5.23c0 0-9.89-13.98-12.89-21.98c-.6-1.6-1.14-3.23-1.25-4.91c-.08-1.26.07-2.74.73-3.8c.81-1.3 19.14-1.68 19.14-1.68c-.01.01.53 1.09.53 1.09z' fill='%23454140'/%3E%3Cpath d='M23.42 43.98c-4.64 10.37-.9 21.33 2.98 26.05c.54.65 2.83 3.19 3.29 5.23c0 0 9.89-13.98 12.89-21.98c.6-1.6 1.14-3.23 1.25-4.91c.08-1.26-.07-2.74-.73-3.8c-.81-1.3-1.81-.95-3.25-.95c-2.74 0-14.71-.73-15.64-.73c0 .01-.79 1.09-.79 1.09z' fill='%23454140'/%3E%3Cpath d='M64.03 95.79V85.3l-28.59-2.47l-2.74 3.5s5.89 9.47 22.23 9.47l9.1-.01z' fill='%23454140'/%3E%3Cpath d='M32.95 81.82c4.51-7-4.78-9.59-4.78-9.59l-.01.01c1.54 2.18 2.2 4.1 1.16 6c-1.31 2.39-4.92 2.74-4.92 2.74s4.69 4.75 8.55.84z' fill='%23454140'/%3E%3Cpath d='M64.14 96H64c-25.65.03-52 7.1-52 24.99V124h104v-3.01C116 104.12 89.9 96 64.14 96z' fill='%23283593'/%3E%3Cpath d='M76.32 106.27s6.88.59 13.84 2.73c13 4 16.91-2.86 16.91-2.86s-14.22-9.32-32.22-9.45c0 0-1.19 8.85 1.47 9.58z' fill='%23283593'/%3E%3Cpath d='M20.59 106s4 7 17 3c6.96-2.14 13.84-2.73 13.84-2.73c2.66-.73 1.47-9.58 1.47-9.58c-18 .12-32.31 9.31-32.31 9.31z' fill='%23283593'/%3E%3Cpath d='M45.75 119.71H34.83c-1.2 0-2.17-.97-2.17-2.17s.97-2.17 2.17-2.17h10.92c1.2 0 2.17.97 2.17 2.17s-.97 2.17-2.17 2.17z' fill='%23e0e0e0'/%3E%3Cpath d='M113.88 113.17l-5 .08l-2.34 4.29l4.83 6.46h4.99c.26-7.38-2.48-10.83-2.48-10.83z' fill='%23333'/%3E%3Cpath d='M19.08 113.25l-5-.08s-2.74 3.46-2.48 10.83h4.99l4.83-6.46l-2.34-4.29z' fill='%23333'/%3E%3Cpath d='M63.99 121.94l9.32-17.08h-19.9z' fill='%23212121'/%3E%3Cpath d='M54.92 86.08v13.98c0 4.51 3.7 8.17 8.26 8.17h1.65c4.56 0 8.26-3.66 8.26-8.17V86.08H54.92z' fill='%23edc391'/%3E%3Cpath d='M47.1 97.18l-8 16.22l10.87-3.26l14.02 11.8l-9.11-25.67z' fill='%233674ce'/%3E%3Cpath d='M73.12 96.27l-9.11 25.67l14.8-11.64l10.09 3.1l-8-16.22z' fill='%233674ce'/%3E%3Cpath d='M91.33 50.43H36.67c-5.89 0-10.71 5.14-10.71 11.41s4.82 11.41 10.71 11.41H91.32c5.89 0 10.71-5.14 10.71-11.41s-4.81-11.41-10.7-11.41z' fill='%23edc391'/%3E%3Cpath d='M64 11.07c-17.4 0-33.52 18.61-33.52 45.4c0 26.64 16.61 39.81 33.52 39.81S97.52 83.1 97.52 56.46c0-26.78-16.12-45.39-33.52-45.39z' fill='%23f9ddbd'/%3E%3Cpath d='M72.42 76.14c-3.18 1.89-13.63 1.89-16.81 0c-1.83-1.09-3.7.58-2.94 2.24c.75 1.63 6.44 5.42 11.37 5.42s10.55-3.79 11.3-5.42c.75-1.66-1.09-3.33-2.92-2.24z' fill='%23444'/%3E%3Cpath d='M67.86 68.06c-.11-.04-.21-.07-.32-.08h-7.08c-.11.01-.22.04-.32.08c-.64.26-.99.92-.69 1.63c.3.71 1.71 2.69 4.55 2.69s4.25-1.99 4.55-2.69c.3-.71-.05-1.37-.69-1.63z' fill='%23dba689'/%3E%3Cellipse cx='47.56' cy='58.81' rx='4.93' ry='5.1' fill='%23312d2d'/%3E%3Cellipse cx='80.44' cy='58.81' rx='4.93' ry='5.1' fill='%23312d2d'/%3E%3Cpath d='M54.8 49.82c-.93-1.23-3.07-3.01-7.23-3.01s-6.31 1.79-7.23 3.01c-.41.54-.31 1.17-.02 1.55c.26.35 1.04.68 1.9.39s2.54-1.16 5.35-1.18c2.81.02 4.49.89 5.35 1.18c.86.29 1.64-.03 1.9-.39c.28-.38.39-1.01-.02-1.55z' fill='%23454140'/%3E%3Cpath d='M87.67 49.82c-.93-1.23-3.07-3.01-7.23-3.01s-6.31 1.79-7.23 3.01c-.41.54-.31 1.17-.02 1.55c.26.35 1.04.68 1.9.39s2.54-1.16 5.35-1.18c2.81.02 4.49.89 5.35 1.18c.86.29 1.64-.03 1.9-.39c.28-.38.39-1.01-.02-1.55z' fill='%23454140'/%3E%3Cpath d='M101.15 23.27c-2.42-3.44-7.65-8-12.16-8.3c-.86-4.3-5.56-7.89-10.03-9.28c-11.99-3.72-19.78.45-24 2.72c-.88.47-6.59 3.58-10.5 1.35c-2.44-1.39-10.1-2.24-7.76 5.97c-2.69.11-6.27 1.25-8.32 5.05c-2.47 4.58-1.86 8.45-1.3 10.32c-2.47 2.05-5.69 6.45-3.94 12.23c1.33 4.41 7.5 6.46 7.5 6.46c-.79 8.12-.63 13.2.06 15.27c.12.36.61.33.71-.05c1.13-4.11 5.96-18.13 5.73-20.52c0 0 10.86-2.22 21.2-9.98c2.08-1.56 4.32-2.88 6.7-3.85c12.63-5.13 15.47 3.66 15.47 3.66s8.8-1.74 11.94 11.02c1.2 4.89 3.39 12.85 4.2 18.52c.06.4.57.49.71.12c.84-2.26 1.31-6.7 1.56-11.19c.08-1.56 4-3.62 5.38-10.24c1.81-8.64-1.38-16.77-3.15-19.28z' fill='%23312d2d'/%3E%3Cpath d='M63.79 24.22c-33.6 0-38.98 11.36-38.98 11.36s10.36 9.91 38.98 10.1c28.63-.19 39.51-10.73 39.51-10.73s-5.91-10.73-39.51-10.73z' fill='%23454140'/%3E%3Cpath d='M19.96 34.5c1.71 6.19 3.35 8.81 3.35 8.81C25.04 41.31 35.35 32 63.93 32h.16c28.58 0 38.42 9.36 40.16 11.36c0 0 2.07-2.8 3.78-8.99C112 20.05 92.35 4 64.06 4c-28.23 0-48.05 16.2-44.1 30.5z' fill='%23283593'/%3E%3Cpath d='M100.04 35.61a4.614 4.614 0 0 0-1.74-2.81c-3.78-2.9-15.09-10.1-34.24-10.1c-19.65 0-30.65 7.19-34.3 10.1c-.87.69-1.46 1.67-1.67 2.75l-.01.06c-.25 1.32.09 2.56.79 3.54C34.7 35.86 45.53 32 63.93 32h.16c18.7 0 29.38 4.01 35.01 7.34c.81-.99 1.21-2.32.94-3.73z' fill='%233b78e7'/%3E%3Cpath d='M71.28 13.2c-.26 0-.5.12-.64.33c-.55.84-1.36 1.4-2.79 1.4c-1.39 0-2.4-1.28-3.01-2.07c-.19-.25-.49-.41-.82-.41c-.33 0-.63.16-.82.41c-.6.79-1.56 2.07-2.95 2.07c-1.43 0-2.24-.57-2.79-1.4a.76.76 0 0 0-.64-.33c-.24 0-.47.11-.61.29l-.31.4c-.37.48-.43 1.12-.15 1.65c.42.8.64 1.68.64 2.57v3.48c0 2.54 4.14 7.72 7.65 7.72s7.65-5.18 7.65-7.72v-3.48c0-.89.22-1.77.64-2.57c.28-.53.22-1.17-.15-1.65l-.31-.4c-.12-.18-.35-.29-.59-.29z' fill='%23fc0'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    vertical-align: middle;
}

/* Utilidades Generales */
.no-caret::after {
    display: none !important;
}
/* ============================================================
   Cuadrante — vista compacta (mes completo sin scroll)
   Lleva !important porque renderer.js fija min-width/top/height inline.
   ============================================================ */
#gridContainer { max-height: none !important; overflow-x: hidden; }
#gridContainer table { table-layout: fixed; width: 100% !important; min-width: 0 !important; }
#gridContainer .fixed-col { width: 190px !important; min-width: 190px !important; max-width: 190px !important; padding: 2px 6px !important; }
#gridContainer td.fixed-col .pl-2 { padding-left: 0 !important; display: flex; gap: 6px; align-items: baseline; white-space: nowrap; overflow: hidden; font-size: 12px; line-height: 1.1; }
#gridContainer td.fixed-col .pl-2 > div:last-child { font-size: 11px; color: #6c757d; overflow: hidden; text-overflow: ellipsis; }
#gridContainer .dia-col { width: auto !important; min-width: 0 !important; padding: 1px !important; }
#gridContainer thead th { min-width: 0 !important; padding: 2px 0 !important; font-size: 10px; line-height: 1.1; }
#gridContainer thead tr:first-child th { top: 0 !important; height: 18px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#gridContainer thead tr:last-child th { top: 18px !important; height: auto !important; }
#gridContainer thead tr:last-child th .font-weight-bold:last-child { font-size: 13px; }
#gridContainer .celda-turno { width: 100% !important; height: 22px !important; margin: 0 !important; font-size: 11px !important; line-height: 22px !important; border-radius: 3px !important; box-shadow: none !important; padding: 0 !important; }
#gridContainer tbody tr:nth-child(even) td { background-color: #f8f9fb; }
#gridContainer tbody tr:hover td { background-color: #eef3fb; }

/* Cuadrante — pie de totales de efectivos por turno */
#gridContainer tfoot .cuad-total-row td,
#gridContainer tfoot .cuad-total-row th { font-weight: 700; font-size: 12px !important; padding: 2px !important; background-color: #fff; }
#gridContainer tfoot .cuad-total-row:first-child td,
#gridContainer tfoot .cuad-total-row:first-child th { border-top: 2px solid #94a3b8 !important; }
#gridContainer tfoot .cuad-total-cell { height: 20px; line-height: 20px; }

/* Cuadrante — servicios mínimos no cubiertos (día laborable) */
#gridContainer tfoot .cuad-min-incumplido { background-color: #dc3545 !important; color: #fff !important; font-weight: 800; border-radius: 3px; }

/* Cuadrante — marcado de findes y festivos */
#gridContainer thead th.dia-festivo { background-color: #e7f0ff !important; color: #1d4ed8 !important; }
#gridContainer thead th.dia-festivo .fas.fa-star { color: #f59e0b; }
#gridContainer tbody td.col-finde { background-color: #fdf2f2 !important; }
#gridContainer tbody td.col-festivo { background-color: #eaf1ff !important; }

/* Cuadrante — columna del día de hoy */
#gridContainer thead th.dia-hoy { background-color: #f59e0b !important; color: #fff !important; }
#gridContainer tbody td.col-hoy { background-color: #fff7e0 !important; box-shadow: inset 2px 0 0 #f59e0b, inset -2px 0 0 #f59e0b; }
#gridContainer tfoot td.col-hoy { box-shadow: inset 2px 0 0 #f59e0b, inset -2px 0 0 #f59e0b; }
#gridContainer tfoot td.col-hoy:not(.cuad-min-incumplido) { background-color: #fff7e0 !important; }

/* Cuadrante — separación clara entre agentes y el totalizador */
#gridContainer tfoot { border-top: 3px solid #334155; }
#gridContainer tfoot .cuad-total-row:first-child td,
#gridContainer tfoot .cuad-total-row:first-child th {
    border-top: 3px solid #334155 !important;
    box-shadow: inset 0 3px 4px -3px rgba(0,0,0,0.35);
}
#gridContainer tfoot .cuad-total-row td { background-color: #eef2f7; }
#gridContainer tfoot .cuad-total-row th { background-color: #e2e8f0 !important; }


/* ============================================================
   Menú principal — rediseño
   - <1200px: hamburguesa (navbar-expand-xl)
   - 1200-1799px: compacto (etiquetas cortas; <1400 el usuario solo con icono)
   - >=1800px: etiquetas completas
   ============================================================ */
.navbar .nav-link,
.navbar .dropdown-item { white-space: nowrap; }
.navbar .lbl-short { display: none; }
.navbar .nav-link i.fas,
.navbar .dropdown-item i.fas { width: 1.15em; text-align: center; }
.navbar .nav-link .fa-info-circle { margin-right: 0; } /* la regla global le añade 8px */

@media (min-width: 1200px) {
    .navbar { padding: 8px 16px; flex-wrap: nowrap; }
    .navbar-expand-xl .navbar-nav { align-items: center; }
    .navbar-brand { font-size: 1.35rem; margin-right: 12px; white-space: nowrap; }
    .navbar-expand-xl .navbar-nav .nav-link {
        padding: 6px 10px;
        border-radius: 8px;
        transition: background-color .15s ease;
    }
    .navbar-expand-xl .navbar-nav .nav-link:hover,
    .navbar-expand-xl .navbar-nav .show > .nav-link { background-color: rgba(255, 255, 255, 0.12); }
    .navbar-expand-xl .navbar-nav .nav-item.active > .nav-link {
        background-color: rgba(255, 255, 255, 0.18);
        box-shadow: inset 0 -2px 0 #fff;
    }
    .navbar-expand-xl .navbar-nav .nav-item + .nav-item { margin-left: 2px; }
    #navbar-username { display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

    /* Desplegables */
    .navbar .dropdown-menu {
        border: none;
        border-radius: 10px;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
        padding: 6px;
        margin-top: 6px;
    }
    .navbar .dropdown-menu:not(.notification-dropdown) .dropdown-item {
        border-radius: 6px;
        padding: 7px 12px;
        font-size: 0.92rem;
    }
    .navbar .dropdown-item.active,
    .navbar .dropdown-item:active { background-color: var(--color-primary); color: #fff; }
}

@media (min-width: 1200px) and (max-width: 1799.98px) {
    .navbar .lbl-long { display: none; }
    .navbar .lbl-short { display: inline; }
    .navbar-brand { font-size: 1.2rem; }
    .navbar-expand-xl .navbar-nav .nav-link { padding: 6px 8px; font-size: 0.9rem; }
    #navbar-username { max-width: 110px; }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    #navbar-username { display: none !important; }
    #userDropdown { padding-left: 10px; padding-right: 10px; }
}

/* Menú desplegado (hamburguesa): resaltar la sección actual */
@media (max-width: 1199.98px) {
    .navbar-collapse .nav-item.active > .nav-link { background-color: rgba(255, 255, 255, 0.12); border-radius: 6px; }
}

/* Sin hueco a los lados, las .row (margen -15px) se salían de la pantalla por debajo de ~1230px */
@media (max-width: 1229.98px) {
    .container { padding-left: 15px; padding-right: 15px; }
}

/* Nombre de la app en el pie: explicación al pasar el ratón */
.footer .footer-talos {
    font-weight: 600;
    border-bottom: 1px dotted currentColor;
    cursor: help;
}

/* Versión de Talos en el pie, discreta */
.footer .footer-version {
    margin-left: 0.4em;
    font-size: 0.85em;
    opacity: 0.7;
}
