/* 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 */
}

/* Insignia del rango (js/utils.js, insigniaRango): barras y rombos sobre fondo azul; la de agente va vacía */
.rank-badge-bg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 24px;
    padding: 1px 2px;
    background-color: #02012A;
    border: 1.5px solid #FCFE06;
    border-radius: 2px;
    vertical-align: middle;
}

.rank-badge-bg svg {
    display: block;
    width: 44px;
    height: 20px;
    fill: #FCFE06;
}

/* Distintivo de jefatura */
.rank-jefatura {
    display: inline-block;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 0;
}

.rank-jefatura svg {
    width: 34px;
    height: 14px;
    fill: #FCFE06;
    filter: drop-shadow(0 0 1px #02012A);
}

.rank-jefatura .rank-jefatura-centro {
    fill: #02012A;
}

/* 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: 16 / 10; /* el hueco del plano en el PDF (antes 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); }
    /* Sección actual: sin fondo; texto blanco, icono dorado y una barrita dorada redondeada debajo */
    .navbar-expand-xl .navbar-nav .nav-link { position: relative; }
    .navbar-expand-xl .navbar-nav .nav-item.active > .nav-link {
        background-color: transparent;
        color: #fff;
    }
    .navbar-expand-xl .navbar-nav .nav-item.active > .nav-link > i.fas { color: #c9a24a; }
    .navbar-expand-xl .navbar-nav .nav-item.active > .nav-link::before {
        content: "";
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: -1px;
        height: 3px;
        border-radius: 3px;
        background: #c9a24a;
    }
    .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 { border-radius: 0; box-shadow: inset 3px 0 0 #c9a24a; padding-left: 12px; }
    .navbar-collapse .nav-item.active > .nav-link > i.fas { color: #c9a24a; }
}

/* 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 {
    position: relative;
    font-weight: 600;
    cursor: default;
    outline: none;
}

/* Tarjeta con el origen del nombre: aparece encima del pie al pasar el ratón (o al tocar, en el móvil) */
.footer .footer-talos-info {
    position: absolute;
    left: -8px;
    bottom: calc(100% + 14px);
    width: 300px;
    max-width: calc(100vw - 24px);
    padding: 14px 16px;
    background: #fff;
    color: #343a40;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(10, 61, 98, .25);
    text-align: left;
    font-weight: normal;
    line-height: 1.45;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    pointer-events: none;
    z-index: 1100;
}
.footer .footer-talos-info::after {
    content: '';
    position: absolute;
    left: 24px;
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
}
.footer .footer-talos:hover .footer-talos-info,
.footer .footer-talos:focus .footer-talos-info,
.footer .footer-talos:focus-within .footer-talos-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.footer .footer-talos-info .fti-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.footer .footer-talos-info .fti-cab img { width: 38px; height: 38px; flex: none; }
.footer .footer-talos-info .fti-cab b { display: block; font-size: 1.05rem; color: #0a3d62; }
.footer .footer-talos-info .fti-cab small { display: block; color: #6c757d; font-size: .8rem; }
.footer .footer-talos-info .fti-texto { display: block; font-size: .85rem; }
.footer .footer-talos-info .fti-lema { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e9ecef;
    font-size: .85rem; font-style: italic; color: #0a3d62; }
@media (max-width: 575.98px) {
    /* En el móvil el pie ocupa dos líneas: la tarjeta va encima de todo el pie */
    .footer .footer-talos { position: static; }
    .footer .footer-talos-info { left: 12px; bottom: calc(100% + 12px); }
}

/* Versión de Talos en el pie, discreta */
.footer .footer-version {
    margin-left: 0.4em;
    font-size: 0.85em;
    opacity: 0.7;
}


/* Marca TalosPOL (estrella policial con T) */
.navbar-brand { display: inline-flex; align-items: center; }
/* El nombre no cambia de color al pasar el ratón ni al pulsarlo (Bootstrap lo ponía azul) */
.navbar-brand:hover, .navbar-brand:focus, .navbar-brand:active { color: #fff; text-decoration: none; }
.navbar-brand-logo { height: 1.6em; width: 1.6em; margin-right: 0.4em; flex: none; }
.brand-pol { color: #c9a24a; font-weight: 800; }

/* ---- Inicio de sesión (templates/base.html, js/modals/login.js) ---------------------------------------- */
body.en-login {
    padding: 0 !important;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    box-sizing: border-box;
    background: #edf3f8 radial-gradient(ellipse at 50% 45%, #f6f9fc 0%, #e2ecf5 60%, #cddde9 100%);
    position: relative;
}
body.en-login #env-banner {
    width: 100% !important;
    flex-shrink: 0;
}
body.en-login #navbar-container { display: none; }   /* sin sesión el menú no tiene nada: fuera */
body.en-proteger #static-page-content, body.en-proteger #dashboard-content { display: none !important; } /* 2FA obligatoria pendiente: solo la tarjeta */
body.en-login > .container {
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 20px 16px;
    margin: 0 auto !important;
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.login-pantalla { min-height: auto; display: flex !important; align-items: center; justify-content: center; padding: 0; width: 100%; position: relative; }
.login-pantalla[style*="display: none"] { display: none !important; }

/* Banda de damero policial horizontal difuminada en el fondo */
.login-damero-banda {
    position: fixed;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 36px;
    background: url('../assets/img/damero_oficial.png') repeat-x center center;
    background-size: auto 36px;
    opacity: 0.28;
    pointer-events: none;
    z-index: 0;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.8) 18%, rgba(0,0,0,0.8) 82%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.8) 18%, rgba(0,0,0,0.8) 82%, transparent 100%);
}

.login-tarjeta { display: flex; width: 100%; max-width: 920px; background: #fff; border-radius: 18px; overflow: hidden;
    box-shadow: 0 20px 55px rgba(10, 61, 98, .18), 0 3px 10px rgba(10, 61, 98, .08); margin: auto; position: relative; z-index: 1; }
.login-lado { flex: 0 0 42%; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 48px 40px;
    color: #fff; background: radial-gradient(120% 90% at 0% 0%, #14507d 0%, #0a3d62 55%, #072c47 100%); position: relative; }
.login-lado::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: #c9a24a; }
.login-escudos { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.login-escudo { width: 78px; height: 78px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25)); background: #fff; border-radius: 50%; padding: 6px; object-fit: contain; }
.login-escudo-municipio { background: #fff; padding: 6px; }
.login-titulo { margin: 0; font-size: 2.6rem; font-weight: 700; letter-spacing: -.5px; color: #fff; line-height: 1.05; }
.login-cuerpo { margin: 8px 0 0; font-size: 1.05rem; font-weight: 600; color: #e7eef5; }
.login-lema { margin: 2px 0 0; font-size: .9rem; color: #a9c0d6; }
.login-aviso { margin: 12px 0 0; font-size: .8rem; color: #a9c0d6; }
.login-aviso i { color: #c9a24a; margin-right: 6px; }
.login-zona { flex: 1 1 auto; display: flex; align-items: center; padding: 48px 48px; }
.login-paso { width: 100%; max-width: 380px; margin: 0 auto; }
.login-h2 { font-size: 1.55rem; font-weight: 700; color: #0a3d62; margin: 0 0 4px; text-align: left; }
.login-sub { color: #6b7a8c; margin: 0 0 24px; font-size: .95rem; }
.proteger-nota { margin: -12px 0 18px; padding: 10px 12px; border-radius: 8px; background: #eef5fc; border: 1px solid #cfe0f1; color: #234a6e; font-size: .88rem; line-height: 1.45; }
.proteger-nota i { margin-right: 6px; color: #3a78b5; }
.login-campo { margin-bottom: 16px; }
.login-campo label { display: block; font-size: .82rem; font-weight: 700; color: #33475b; margin-bottom: 6px; }
.login-input { position: relative; }
.login-input > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8a9bb0; pointer-events: none; }
.login-input .form-control { height: 48px; padding-left: 42px; border-radius: 10px; border: 1px solid #d5dde7; font-size: 1rem; background: #f8fafc; }
.login-input .form-control:focus { background: #fff; border-color: #0a3d62; box-shadow: 0 0 0 3px rgba(10, 61, 98, .15); }
.login-input #loginPassword { padding-right: 46px; }
.login-ojo { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #8a9bb0;
    width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.login-ojo:hover, .login-ojo:focus { color: #0a3d62; background: #eef3f8; outline: none; }
.login-boton { height: 48px; border-radius: 10px; font-weight: 700; font-size: 1.02rem; margin-top: 8px; }
.login-huella { display: none; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 14px; }
html.con-huella .login-huella { display: flex; }   /* lo decide un script en base.html antes de pintar: sin saltos */
.login-huella-o { display: flex; width: 100%; align-items: center; gap: 10px; color: #8a9bb0; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.login-huella-o::before, .login-huella-o::after { content: ""; flex: 1; height: 1px; background: #e3e8ef; }
.login-huella .btn { height: 46px; border-radius: 10px; font-weight: 600; }
/* Paso 2: código de 6 cifras. Un solo campo transparente encima de 6 casillas (así funcionan pegar y el autocompletado del móvil) */
.login-volver { border: 0; background: none; color: #6b7a8c; padding: 0; margin-bottom: 18px; font-size: .9rem; }
.login-volver:hover { color: #0a3d62; }
.login-2fa-icono { width: 54px; height: 54px; border-radius: 14px; background: #eef3f8; color: #0a3d62; display: flex;
    align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 14px; }
.login-codigo { position: relative; margin: 4px 0 16px; }
.login-codigo input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; z-index: 2; cursor: text; }
.login-casillas { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.login-casillas span { height: 58px; border: 1.5px solid #d5dde7; border-radius: 12px; background: #f8fafc; display: flex; align-items: center;
    justify-content: center; font-size: 1.6rem; font-weight: 700; color: #0a3d62; font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; }
.login-codigo.foco .login-casillas span.actual { border-color: #0a3d62; box-shadow: 0 0 0 3px rgba(10, 61, 98, .15); background: #fff; }
.login-codigo.comprobando .login-casillas span { border-color: #c9a24a; }
.login-codigo.ok .login-casillas span { border-color: #2e8b57; color: #2e8b57; }
.login-codigo.mal .login-casillas span { border-color: #c0392b; }
.login-codigo.mal { animation: login-temblor .35s; }
@keyframes login-temblor { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.login-2fa-estado { color: #6b7a8c; font-size: .9rem; margin-bottom: 8px; }
.login-ayuda { color: #8a9bb0; font-size: .82rem; margin: 8px 0 0; }
.login-carga { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff7e6; border: 1px solid #f0d9a8; color: #6b4e16; font-size: .88rem; }
.login-carga a { color: inherit; font-weight: 600; text-decoration: underline; }
.login-carga i { margin-right: 6px; }
@media (max-width: 767.98px), (max-height: 640px) {
    body.en-login { height: auto; min-height: 100vh; overflow-y: auto; padding: 20px 0 !important; }
    .login-pantalla { min-height: 0; align-items: flex-start; padding: 8px 0 24px; }
    .login-tarjeta { flex-direction: column; border-radius: 16px; }
    .login-lado { flex: none; flex-direction: row; align-items: center; gap: 14px; padding: 22px 20px; flex-wrap: wrap; }
    .login-escudos { gap: 10px; }
    .login-escudo { width: 50px; height: 50px; padding: 4px; }
    .login-titulo { font-size: 1.7rem; }
    .login-cuerpo { margin-top: 4px; font-size: .92rem; }
    .login-lema { display: none; }
    .login-aviso { display: none; }
    .login-zona { padding: 26px 20px 28px; }
    .login-h2 { font-size: 1.35rem; }
    .login-sub { margin-bottom: 18px; }
    .login-casillas { gap: 6px; }
    .login-casillas span { height: 52px; font-size: 1.4rem; }
}

/* Sin sesión el JS oculta la campana con display:none, pero .d-xl-block (!important) lo anulaba */
.nav-notification-bell[style*="display: none"] { display: none !important; }

/* Pie: © TalosPOL pegado a la izquierda, el cuerpo en el centro y la versión pegada a la derecha (a todo el ancho, sin el máximo de .container) */
.footer .footer-cols { display: flex; align-items: center; gap: 1rem; padding: 0 20px; max-width: none; width: 100%; }
.footer .footer-izq, .footer .footer-der { flex: 1 1 0; }
.footer .footer-izq { text-align: left; }
.footer .footer-centro { flex: none; font-weight: 600; }
.footer .footer-der { text-align: right; }
.footer .footer-der .footer-version { margin-left: 0; }
@media (max-width: 575.98px) { .footer .footer-cols { font-size: 0.85rem; gap: 0.5rem; } }

/* Integraciones apagadas en Parámetros del municipio: fuera sus menús y piezas */
body.sin-vinfopol [data-integracion="vinfopol"],
body.sin-solfix [data-integracion="solfix"] { display: none !important; }

/* Operativos: desvío entre secuencias, en el hueco central entre los títulos de A y B (js/dashboard.js) */
.desvio-wrapper { position: relative; }
.desvio-centro { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); z-index: 10; width: 250px; }
.desvio-arriba { display: flex; justify-content: center; margin-bottom: 12px; }
.desvio { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 250px; text-align: center;
    font-size: 11.5px; color: #555; cursor: help; }
.desvio-fila { display: flex; justify-content: space-between; align-items: center; width: 210px; }
.desvio-fila b { font-size: 12.5px; }
.desvio-a { color: #8a6a1f; }
.desvio-b { color: #0a3d62; }
.desvio-chip { font-weight: 700; font-size: 11.5px; padding: 1px 9px; border-radius: 99px; background: #e8f5ec; color: #1d6b3a; }
.desvio.alerta .desvio-chip { background: #fdecec; color: #a12a2a; }
.desvio-barra { display: flex; gap: 2px; width: 210px; height: 8px; border-radius: 99px; overflow: hidden; }
.desvio-barra .tramo-a { background: #c9a24a; }
.desvio-barra .tramo-b { background: #0a3d62; }
.desvio-dif { color: #1d6b3a; }
.desvio.alerta .desvio-dif { color: #a12a2a; }
.desvio-accion { color: #555; }

/* Seguridad de la cuenta (js/cuenta_seguridad.js): entrar con huella y panel de 2FA/huellas */
.login-huella { align-items: center; gap: 12px; margin-top: 4px; }   /* se ve solo con html.con-huella (móvil) */
.login-huella-o { color: #6c757d; font-size: .85rem; }
.login-huella .btn { font-weight: 600; }
.cs-panel section { border: 1px solid #e3e8ef; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.cs-panel h6 { font-weight: 700; color: #0a3d62; margin-bottom: 6px; }
.cs-panel h6 i { color: #c9a24a; margin-right: 4px; }
.cs-panel .btn { margin: 2px 4px 2px 0; }
.cs-disp { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid #eef2f6; }
.cs-disp i { color: #0a3d62; }
.cs-qr { display: flex; justify-content: center; margin: 6px 0 10px; }
.cs-qr svg { width: 200px; height: 200px; }
.cs-secreto { display: inline-block; font-size: .95rem; letter-spacing: .08em; background: #f5f7fa; padding: 4px 10px; border-radius: 6px; word-break: break-all; }


/* Navegación estilo escritorio en navbar (js/nav-desktop.js) */
.navbar .nav-desktop-link {
    cursor: pointer !important;
    user-select: none;
}
.navbar .nav-link.nav-desktop-link:hover {
    color: #f1f1f1;
}
.navbar .dropdown-item.nav-desktop-link {
    cursor: pointer !important;
    user-select: none;
}

/* Enlaces con el href oculto mientras el puntero está encima (js/enlaces-protegidos.js) */
a.enlace-protegido {
    cursor: pointer;
}

/* Paso «Protege tu cuenta» (verificación en dos pasos obligatoria) en la tarjeta del inicio de sesión: js/login_proteger.js */
.proteger-pasos { padding-left: 18px; margin: 0 0 12px; color: #33475b; font-size: .88rem; }
.proteger-qr-img { display: flex; justify-content: center; margin: 0 0 8px; }
.proteger-qr-img svg { width: 168px; height: 168px; border: 1px solid #e3e8ef; border-radius: 10px; padding: 6px; background: #fff; }
.proteger-clave { text-align: center; font-size: .8rem; color: #6b7a8c; margin: 0 0 14px; word-break: break-all; }
.proteger-clave code { color: #0a3d62; font-size: .82rem; }
.proteger-salir { display: block; margin: 14px auto 0; }
.login-2fa-icono.proteger-ok { background: #e3f4ea; color: #2e8b57; }
.login-recordar { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; font-size: .88rem;
    font-weight: 500; color: #33475b; cursor: pointer; user-select: none; }
.login-recordar input { width: 17px; height: 17px; margin: 0; accent-color: #0a3d62; cursor: pointer; }
#proteger-huella-oferta .btn-link { color: #6b7a8c; }

/* Cuadrante: fila del agente y columna del día resaltadas al pulsarlas (js/cuadrantes_module/renderer.js).
   Marco grueso + capa azul translúcida por encima: se nota la selección sin cambiar el color de los turnos. */
#tablaCuadrante tbody td.fixed-col, #tablaCuadrante thead th[data-fecha-col] { cursor: pointer; }
#gridContainer #tablaCuadrante tbody tr.cuad-sel-fila > td,
#gridContainer #tablaCuadrante tbody td.cuad-sel-col,
#gridContainer #tablaCuadrante tfoot td.cuad-sel-col { position: relative; }
#gridContainer #tablaCuadrante tbody tr.cuad-sel-fila > td::after,
#gridContainer #tablaCuadrante tbody td.cuad-sel-col::after,
#gridContainer #tablaCuadrante tfoot td.cuad-sel-col::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: rgba(37, 99, 235, .14);
}
#gridContainer #tablaCuadrante tbody tr.cuad-sel-fila > td::after { border-top: 3px solid #1d4ed8; border-bottom: 3px solid #1d4ed8; }
#gridContainer #tablaCuadrante tbody td.cuad-sel-col::after,
#gridContainer #tablaCuadrante tfoot td.cuad-sel-col::after { border-left: 3px solid #1d4ed8; border-right: 3px solid #1d4ed8; }
#gridContainer #tablaCuadrante tbody tr.cuad-sel-fila > td.cuad-sel-col::after { border: 3px solid #1d4ed8; background: rgba(37, 99, 235, .28); }
#gridContainer #tablaCuadrante tbody tr.cuad-sel-fila > td.fixed-col { background-color: #1d4ed8 !important; position: sticky; }
#gridContainer #tablaCuadrante tbody tr.cuad-sel-fila > td.fixed-col::after { background: none; }
#gridContainer #tablaCuadrante tbody tr.cuad-sel-fila > td.fixed-col div { color: #fff !important; }
#gridContainer #tablaCuadrante thead th.cuad-sel-col { background-color: #1d4ed8 !important; color: #fff !important; opacity: 1 !important; }

/* Ojo para ver la contraseña (ver-contrasena.js) */
.ojo-caja { position: relative; display: block; }
input.ojo-campo { padding-right: 2.4em !important; }
.ojo-boton { position: absolute; transform: translateY(-50%); width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px;
    background: transparent; color: #8a9bb0; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 3; }
.ojo-boton:hover, .ojo-boton:focus { color: #0a3d62; background: rgba(10, 61, 98, .08); outline: none; }
.ojo-boton[aria-pressed="true"] { color: #0a3d62; }

/* ========================================
   CONTACTOS (Información → Contactos, js/contactos.js)
   Misma línea que el resto de Talos: azul #0a3d62, grises pizarra, tarjetas blancas con borde suave.
   ======================================== */
.ct-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); padding: 18px; }
.ct-barra { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ct-titulo { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.ct-titulo h5 { margin: 0; font-weight: 700; color: #0f172a; font-size: 1.1rem; }
.ct-titulo small { color: #64748b; }
.ct-titulo-i { width: 40px; height: 40px; border-radius: 11px; background: #0a3d62; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.ct-buscador { position: relative; flex: 1 1 280px; max-width: 460px; }
.ct-buscador i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 13px; }
.ct-buscador input { width: 100%; height: 38px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; padding: 0 12px 0 36px; font-size: 14px; color: #0f172a; transition: border-color .15s, box-shadow .15s, background .15s; }
.ct-buscador input:focus { outline: none; background: #fff; border-color: #0a3d62; box-shadow: 0 0 0 3px rgba(10, 61, 98, .12); }
.ct-acciones { display: flex; gap: 8px; }
.ct-acciones .btn { border-radius: 9px; font-weight: 600; }

.ct-filtros { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; scrollbar-width: none; }
.ct-filtros::-webkit-scrollbar { display: none; }
.ct-chip { --ct-c: #0a3d62; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e2e8f0; background: #fff; color: #334155; border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.ct-chip i { color: var(--ct-c); font-size: 11px; }
.ct-chip span { background: #f1f5f9; color: #64748b; border-radius: 999px; padding: 0 7px; font-size: 11px; }
.ct-chip:hover { border-color: var(--ct-c); }
.ct-chip.activo { background: var(--ct-c); border-color: var(--ct-c); color: #fff; }
.ct-chip.activo i { color: #fff; }
.ct-chip.activo span { background: rgba(255, 255, 255, .22); color: #fff; }
.ct-chip[data-filtro="destacados"] { --ct-c: #d97706; }

.ct-grupo { margin-top: 18px; }
.ct-grupo-t { --ct-c: #0a3d62; display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #475569; margin: 0 0 10px; }
.ct-grupo-t i { color: var(--ct-c); }
.ct-grupo-t span { color: #94a3b8; font-weight: 600; }
.ct-grupo-t::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }

.ct-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 12px 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
.ct-card:hover, .ct-card:focus { border-color: #cbd5e1; box-shadow: 0 6px 18px rgba(15, 23, 42, .08); transform: translateY(-1px); outline: none; }
.ct-card:focus-visible { box-shadow: 0 0 0 3px rgba(10, 61, 98, .25); }
.ct-card-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ct-card-nom { flex: 1; min-width: 0; }
.ct-nombre { font-weight: 700; color: #0f172a; font-size: 14.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-sub { color: #64748b; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-avatar { --ct-c: #64748b; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--ct-c); background: color-mix(in srgb, var(--ct-c) 12%, #fff); }
.ct-avatar.grande { width: 54px; height: 54px; border-radius: 14px; font-size: 21px; }
.ct-estrella { border: 0; background: none; color: #cbd5e1; padding: 4px 6px; border-radius: 8px; line-height: 1; }
.ct-estrella:hover { color: #d97706; background: #fef3c7; }
.ct-estrella.activa { color: #f59e0b; }
.ct-estrella.solo-ver { pointer-events: none; }

.ct-card-cuerpo { display: flex; flex-direction: column; gap: 3px; }
.ct-medio { display: flex; align-items: center; gap: 8px; min-height: 26px; border-radius: 7px; padding: 0 4px; margin: 0 -4px; }
.ct-medio:hover { background: #f8fafc; }
.ct-medio-i { width: 16px; text-align: center; color: #94a3b8; font-size: 12px; flex: 0 0 auto; }
.ct-medio-v { color: #0f172a; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ct-medio-v:hover { color: #0a3d62; text-decoration: none; }
.ct-etq { flex: 0 0 auto; font-size: 10.5px; font-weight: 600; color: #475569; background: #f1f5f9; border-radius: 5px; padding: 1px 6px; }
.ct-copiar { margin-left: auto; flex: 0 0 auto; border: 0; background: none; color: #94a3b8; width: 26px; height: 24px; border-radius: 6px; opacity: 0; transition: opacity .15s; font-size: 12px; }
.ct-medio:hover .ct-copiar, .ct-copiar:focus, .ct-copiar.ct-copiado { opacity: 1; }
.ct-copiar:hover { background: #e2e8f0; color: #0a3d62; }
.ct-copiar.ct-copiado { color: #16a34a; }
@media (hover: none) { .ct-copiar { opacity: 1; } }
.ct-mas { font-size: 12px; color: #0a3d62; font-weight: 600; padding-left: 24px; }
.ct-sin-datos { font-size: 12.5px; color: #94a3b8; font-style: italic; }
.ct-card-nota { margin-top: 8px; padding-top: 7px; border-top: 1px dashed #e2e8f0; font-size: 12px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-card-nota i { margin-right: 6px; color: #94a3b8; }
.ct-vacio { text-align: center; color: #94a3b8; padding: 48px 12px; font-size: 14px; }
.ct-vacio i { display: block; font-size: 26px; margin-bottom: 10px; color: #cbd5e1; }

/* Modales de contacto */
.ct-modal { padding: 0 !important; border: 0; border-radius: 16px; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); overflow: hidden; position: relative; }
.ct-modal-cab { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #e2e8f0; }
.ct-modal-cab h5 { margin: 0; font-weight: 700; color: #0f172a; }
.ct-modal-cuerpo { padding: 18px 20px 8px; }
.ct-modal-cuerpo label { font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 4px; }
.ct-modal-cuerpo .form-control { border-radius: 9px; border-color: #e2e8f0; }
.ct-modal-cuerpo .form-control:focus { border-color: #0a3d62; box-shadow: 0 0 0 3px rgba(10, 61, 98, .12); }
.ct-modal-pie { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: #f8fafc; border-top: 1px solid #e2e8f0; }
.ct-modal-pie .btn { border-radius: 9px; font-weight: 600; }
.ct-cerrar { position: absolute; right: 16px; top: 14px; }
.ct-ficha-cab { display: flex; align-items: center; gap: 14px; padding: 22px 48px 16px 22px; background: linear-gradient(180deg, #f8fafc, #fff); border-bottom: 1px solid #e2e8f0; }
.ct-ficha-nombre { margin: 0 0 2px; font-weight: 700; color: #0f172a; font-size: 1.15rem; }
.ct-dest-i { color: #f59e0b; font-size: .85em; }
.ct-cat { --ct-c: #0a3d62; display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11.5px; font-weight: 600; color: var(--ct-c); background: color-mix(in srgb, var(--ct-c) 10%, #fff); border-radius: 999px; padding: 2px 9px; }
.ct-ficha-cuerpo { padding: 8px 22px 16px; max-height: 60vh; overflow-y: auto; }
.ct-ficha-bloque { margin-top: 12px; }
.ct-ficha-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #94a3b8; margin-bottom: 4px; }
.ct-ficha-cuerpo .ct-medio { min-height: 34px; }
.ct-ficha-cuerpo .ct-medio-v { font-size: 15px; }
.ct-notas { white-space: pre-wrap; font-size: 13.5px; color: #334155; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; word-break: break-word; }

/* Editor: filas de teléfonos/correos */
.ct-medios { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin-bottom: 12px; }
.ct-medios-bloque { min-width: 0; }
.ct-medio-fila { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ct-medio-fila .form-control { margin: 0 !important; height: 32px; }
.ct-medio-fila .ct-in-etq { flex: 0 0 104px; }
.ct-medio-fila .ct-in-valor { flex: 1; min-width: 0; }
.ct-quitar { display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; border: 0; background: none; color: #94a3b8; width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto; }
.ct-quitar:hover { background: #fee2e2; color: #dc2626; }
.ct-anadir { border: 1px dashed #cbd5e1; background: none; color: #0a3d62; font-size: 12.5px; font-weight: 600; border-radius: 8px; padding: 4px 10px; width: 100%; text-align: left; }
.ct-anadir:hover { background: #f1f5f9; border-color: #0a3d62; }
.ct-anadir i { margin-right: 6px; font-size: 11px; }

@media (max-width: 767.98px) {
    .ct-panel { padding: 12px; border-radius: 12px; }
    .ct-buscador { max-width: none; order: 3; flex-basis: 100%; }
    .ct-medios { grid-template-columns: 1fr; }
    .ct-grid { grid-template-columns: 1fr; }
    .ct-filtros { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .ct-chip { flex: 0 0 auto; }
}

/* ========================================
   INFORMACIÓN: categorías arrastrables, protocolos en lista compacta y licencias en el móvil
   ======================================== */
.cat-asa { width: 28px; color: #94a3b8; cursor: grab; touch-action: none; user-select: none; vertical-align: middle !important; }
.cat-asa:hover { color: #0a3d62; }
.ordenable-activo, .ordenable-activo * { cursor: grabbing !important; user-select: none !important; }
tr.ordenable-arrastrando > td { background: #e0ecf7 !important; }
.ordenable-arrastrando { opacity: .9; box-shadow: 0 4px 14px rgba(15, 23, 42, .15); }
#tabla-categorias td { vertical-align: middle; }

/* Protocolos */
.pr-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 8px; }
.pr-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.pr-item:hover { border-color: #cbd5e1; box-shadow: 0 3px 10px rgba(15, 23, 42, .06); }
.pr-icono { font-size: 22px; flex: 0 0 26px; text-align: center; color: #64748b; }
.pr-icono.pr-pdf { color: #dc2626; }
.pr-icono.pr-doc { color: #2563eb; }
.pr-icono.pr-xls { color: #16a34a; }
.pr-texto { flex: 1; min-width: 0; }
.pr-nombre { display: block; font-weight: 700; color: #0f172a; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.pr-nombre:hover { color: #0a3d62; text-decoration: none; }
.pr-desc { color: #64748b; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-ficheros { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; flex: 0 1 auto; max-width: 45%; }
.pr-fichero { display: inline-flex; align-items: center; border: 1px solid #e2e8f0; border-radius: 7px; overflow: hidden; font-size: 11.5px; font-weight: 600; max-width: 100%; }
.pr-fichero a { padding: 2px 7px; color: #0a3d62; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-fichero a:hover { background: #f1f5f9; text-decoration: none; }
.pr-fichero .pr-bajar { border-left: 1px solid #e2e8f0; color: #64748b; flex: 0 0 auto; }
.pr-sin { font-size: 12px; color: #94a3b8; font-style: italic; }
.pr-gestion { display: flex; flex: 0 0 auto; }
.pr-gestion .btn { padding: 2px 6px; }
.pr-vacio { grid-column: 1 / -1; text-align: center; color: #94a3b8; padding: 40px 12px; }
.pr-vacio > i { display: block; font-size: 26px; margin-bottom: 8px; }
@media (max-width: 767.98px) {
    .pr-lista { grid-template-columns: 1fr; }
    .pr-item { flex-wrap: wrap; }
    .pr-texto { flex-basis: calc(100% - 40px); }
    .pr-nombre, .pr-desc { white-space: normal; }
    .pr-ficheros { max-width: none; justify-content: flex-start; padding-left: 38px; flex: 1; }
}

/* Licencias: en el móvil cada licencia es una ficha (la tabla sigue igual en escritorio) */
@media (max-width: 767.98px) {
    #tabla-licencias thead { display: none; }
    #tabla-licencias, #tabla-licencias tbody, #tabla-licencias tr, #tabla-licencias td { display: block; width: 100%; }
    #tabla-licencias tr { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; position: relative; }
    #tabla-licencias td { border: 0; padding: 2px 0; font-size: 13.5px; display: flex; gap: 10px; }
    #tabla-licencias td[data-label]::before { content: attr(data-label); flex: 0 0 96px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #94a3b8; padding-top: 2px; }
    #tabla-licencias td.lic-nombre { order: -1; display: block; font-size: 15px; padding-right: 80px; margin-bottom: 4px; }
    #tabla-licencias td.lic-nombre::before { display: none; }
    #tabla-licencias tr { display: flex; flex-direction: column; }
    #tabla-licencias td.lic-estado { position: absolute; top: 10px; right: 12px; width: auto; }
    #tabla-licencias td.lic-estado::before { display: none; }
    #tabla-licencias td.lic-acciones { justify-content: flex-end; gap: 6px; padding-top: 6px; margin-top: 4px; border-top: 1px dashed #e2e8f0; }
    #tabla-licencias td[colspan] { display: block; text-align: center; }
    #tabla-licencias td[colspan]::before { display: none; }
}

/* Ordenanzas: fichas con datos del codificado de tráfico (DGT) */
.ord-calif { width: 45px; height: 45px; min-width: 45px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: bold; }
.ord-opcion { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 700; color: #0a3d62; background: #e8eef4; border-radius: 6px; padding: 1px 7px; vertical-align: 1px; }
.ord-sancion { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ord-importe { font-weight: 700; font-size: 14px; }
.ord-reducido { color: #475569; font-size: 12px; }
.ord-puntos { font-size: 11.5px; font-weight: 700; color: #fff; background: #dc2626; border-radius: 999px; padding: 1px 9px; }
.ord-datos { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px; }
.ord-datos span { font-size: 11.5px; color: #475569; background: #f1f5f9; border-radius: 6px; padding: 2px 8px; }
.ord-datos span i { margin-right: 5px; color: #94a3b8; font-size: 10px; }
.ord-nota { margin-top: 8px; font-size: 12.5px; color: #475569; }
.ord-nota summary { cursor: pointer; color: #0a3d62; font-weight: 600; font-size: 12px; outline: none; }
.ord-nota > div { margin-top: 4px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; line-height: 1.5; }
.ord-mas { border: 1px dashed #cbd5e1; color: #0a3d62; font-weight: 600; }

/* ========================================
   OCUPACIONES: log de envíos y vencidas
   ======================================== */
.ocup-log-scroll { max-height: 65vh; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 10px; }
#email-log-table thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid #e2e8f0; border-top: 0; }
#email-log-table td { vertical-align: middle; font-size: 13.5px; }
.ocup-log-origen { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.ocup-log-origen.acto { background: #e8eaf6; color: #3f51b5; }
.ocup-log-origen.multi { background: #e0f2fe; color: #0369a1; }
.ocup-log-origen.cartel { background: #f1f5f9; color: #475569; }
.ocup-log-asunto { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #0f172a; }
.ocup-log-dest { min-width: 170px; overflow-wrap: anywhere; }
.ocup-log-ubics { display: flex; flex-wrap: wrap; gap: 3px; }
.ocup-log-ubic { font-size: 11.5px; background: #f1f5f9; color: #334155; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.ocup-log-ubic.mas { background: #0a3d62; color: #fff; font-weight: 700; cursor: help; }
@media (max-width: 767.98px) {
    #email-log-table thead { display: none; }
    #email-log-table, #email-log-table tbody, #email-log-table tr, #email-log-table td { display: block; width: 100%; }
    #email-log-table tr { border-bottom: 1px solid #e2e8f0; padding: 8px 10px; }
    #email-log-table td { border: 0; padding: 2px 0; display: flex; gap: 8px; align-items: baseline; }
    #email-log-table td::before { content: attr(data-label); flex: 0 0 92px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: #94a3b8; }
    #email-log-table td[colspan]::before { display: none; }
    .ocup-log-asunto { max-width: none; white-space: normal; }
}

/* Vencidas: en pantallas estrechas los botones bajan debajo del texto */
.vencidas-item { flex-wrap: wrap; gap: 6px; }
.vencidas-item > div:first-child { min-width: 230px !important; }   /* su estilo en línea pone min-width: 0 */
.vencidas-item > div:last-child { flex-wrap: wrap; gap: 4px; }

/* ========================================
   OCTAVILLAS: diseñador con vista previa a escala
   ======================================== */
.oct-dis { display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; gap: 20px; }
.oct-dis-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #64748b; margin-bottom: 6px; }
.oct-dis-bloque { margin-bottom: 14px; }
.oct-dis-campo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.oct-dis-campo label { margin: 0; font-weight: 700; font-size: 13px; color: #334155; }
.oct-estilo { display: flex; align-items: center; gap: 4px; }
.oct-estilo select { width: 64px; height: 28px; padding: 0 6px; }
.oct-negrita { display: none; }
.oct-negrita + label { margin: 0; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; border-radius: 6px; color: #94a3b8; cursor: pointer; font-size: 12px; }
.oct-negrita:checked + label { background: #0a3d62; border-color: #0a3d62; color: #fff; }
.oct-plantillas { display: flex; flex-wrap: wrap; gap: 6px; }
.oct-plantilla { border: 1px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: #334155; }
.oct-plantilla i { margin-right: 6px; color: #0a3d62; }
.oct-plantilla:hover { border-color: #0a3d62; background: #f1f5f9; }
.oct-fecha-rapida { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.oct-fecha-rapida input { width: auto; }

.oct-dis-vista { background: #f1f5f9; border-radius: 12px; padding: 14px; min-width: 0; }
.oct-prev-marco { position: relative; width: 100%; overflow: hidden; box-shadow: 0 6px 20px rgba(15, 23, 42, .15); background: #fff; }
.oct-prev { position: absolute; top: 0; left: 0; width: 210mm; height: 74.2mm; transform-origin: 0 0; background: #fff; color: #000; --oct-logo: 16mm; }
.oct-prev-in { width: 100%; height: 100%; padding: 7mm 12mm; display: flex; flex-direction: column; justify-content: center; text-align: center; overflow: hidden; }
.oct-prev-cab { display: flex; align-items: center; margin-bottom: 2.5mm; }
.oct-prev-logo { height: var(--oct-logo); width: auto; max-width: 30mm; flex: 0 0 auto; }
.oct-prev-titulo { flex: 1; padding: 0 3mm; text-transform: uppercase; letter-spacing: .6px; line-height: 1.15; }
.oct-prev-sub { margin-bottom: 2mm; line-height: 1.25; white-space: pre-line; }
.oct-prev-mot { margin-bottom: 2mm; line-height: 1.2; }
.oct-prev-fecha { line-height: 1.2; }
.oct-ajuste { margin-top: 10px; font-size: 12.5px; border-radius: 8px; padding: 6px 10px; }
.oct-ajuste.cabe { background: #dcfce7; color: #166534; }
.oct-ajuste.reducido { background: #fef3c7; color: #92400e; }
.oct-ajuste i { margin-right: 6px; }
.oct-dis-pie { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.oct-hoja-mini { flex: 0 0 96px; width: 96px; background: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, .15); }
.oct-hoja-slot { position: relative; overflow: hidden; border-bottom: 1px dashed #b0b0b0; }
.oct-hoja-slot:last-child { border-bottom: none; }
.oct-hoja-slot .oct-prev { transform-origin: 0 0; }
@media (max-width: 991.98px) {
    .oct-dis { grid-template-columns: 1fr; }
    .oct-dis-vista { order: -1; }
}

/* Codificados: favoritas de cada persona */
.ord-fav { padding: 0.2rem 0.45rem; font-size: 0.95rem; color: #cbd5e1; border: 1px solid #e2e8f0; background: #fff; line-height: 1; }
.ord-fav:hover { color: #f59e0b; border-color: #f59e0b; }
.ord-fav.activa { color: #f59e0b; border-color: #fcd34d; background: #fffbeb; }
#tab-ordenanzas #contador-infracciones { width: auto !important; height: auto !important; min-width: 0 !important; white-space: nowrap; display: inline-block; }   /* la regla móvil «#tab-ordenanzas .badge-pill» (círculo de 40 px) es para la calificación */

/* Codificados: selector agrupado con buscador (bootstrap-select) */
#tab-ordenanzas .bootstrap-select .dropdown-menu li.dropdown-header { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #0a3d62; background: #f1f5f9; padding: 6px 12px; }
#tab-ordenanzas .bootstrap-select .dropdown-menu li a { white-space: normal; }
#tab-ordenanzas .bootstrap-select .dropdown-menu li a .text-muted { margin-left: 6px; font-size: 11px; background: #f1f5f9; border-radius: 999px; padding: 0 7px; }
#tab-ordenanzas .bootstrap-select .dropdown-menu li.selected a .text-muted { background: rgba(255, 255, 255, .25); }
#tab-ordenanzas .bootstrap-select > .dropdown-toggle { text-align: left; }

/* Historial común (js/traza.js) */
.traza { font-size: 13px; color: #334155; text-align: left; }
.traza-resumen { font-size: 12px; color: #64748b; }
.traza-desplegable { margin-top: 6px; }
.traza-desplegable > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #475569; list-style-position: inside; }
.traza-desplegable > summary:focus { outline: none; }
.traza-desplegable > summary:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; border-radius: 4px; }
.traza-n { font-size: 11px; font-weight: 600; color: #475569; background: #f1f5f9; border-radius: 999px; padding: 1px 7px; margin-left: 2px; }
.traza-filtros { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.traza-filtros button { font-size: 12px; line-height: 1; padding: 5px 10px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; color: #475569; cursor: pointer; }
.traza-filtros button:hover { background: #f8fafc; }
.traza-filtros button.activo { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.traza-dia { font-size: 11px; font-weight: 600; color: #94a3b8; padding: 8px 0 2px; }
.traza-linea { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; padding: 5px 0; border-bottom: 1px solid #f1f5f9; }
.traza-icono { font-size: 12px; color: #94a3b8; margin-top: 3px; text-align: center; }
.traza-texto b { font-weight: 600; color: #1e293b; }
.traza-quien { font-size: 12px; color: #64748b; }
.traza-contexto { font-size: 12px; color: #2563eb; }
.traza-detalle { font-size: 12px; color: #64748b; white-space: pre-wrap; overflow-wrap: anywhere; }
.traza-cambio { font-size: 12px; color: #64748b; overflow-wrap: anywhere; }
.traza-cambio del { color: #b91c1c; text-decoration: line-through; }
.traza-cambio ins { color: #15803d; text-decoration: none; }
.traza-cambio i { font-size: 9px; margin: 0 2px; color: #94a3b8; }
.traza-vacio, .traza-oculto { font-style: italic; color: #94a3b8; }
.traza-mas { margin-top: 6px; border: 0; background: none; padding: 0; font-size: 12px; color: #2563eb; cursor: pointer; }
.traza-mas:hover { text-decoration: underline; }
.oper-traza-btn { border: 0; background: none; padding: 0 2px; color: #94a3b8; cursor: pointer; }
.oper-traza-btn:hover, .oper-traza-btn.activo { color: #2563eb; }
.oper-traza-fila > td { background: #f8fafc; padding: 8px 12px !important; }
.swal2-html-container .traza { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e5e7ea; }
.actividad-filtros { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr 1fr 1fr 1.6fr auto; gap: 8px; align-items: end; }
.actividad-filtros label { font-size: 12px; color: #64748b; margin: 0 0 2px; display: block; }
.actividad-pie { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: #64748b; }
@media (max-width: 991px) { .actividad-filtros { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Fondo de la app (templates/base.html .talos-fondo) =====
   Degradado como el del inicio de sesión, banda de damero que nace del logo de TalosPOL y se difumina hacia los lados,
   y el logo tenue en el centro. La silueta pinta encima del damero el mismo degradado del fondo (fijo, así casa al
   píxel) con la forma del logo: dentro del logo no se ve el damero. Sin sesión no sale: el login tiene su banda. */
:root {
    --talos-fondo: #edf3f8 radial-gradient(ellipse at 50% 45%, #f6f9fc 0%, #e2ecf5 60%, #cddde9 100%);
    --talos-fondo-logo: min(52vmin, 460px);
}
body:not(.en-login) { background: var(--talos-fondo); background-attachment: fixed; }
.talos-fondo { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
body.en-login .talos-fondo { display: none; }
.talos-fondo-damero { position: absolute; left: 0; right: 0; top: calc(50% - 18px); height: 36px;
    background: url('../assets/img/damero_oficial.png') repeat-x center center; background-size: auto 36px; opacity: .24;
    mask-image: linear-gradient(to right, transparent 0%, #000 32%, #000 68%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 32%, #000 68%, transparent 100%); }
/* Sin transform: con él, el background-attachment: fixed de la silueta dejaría de casar con el fondo */
.talos-fondo-logo { position: absolute; width: var(--talos-fondo-logo); height: var(--talos-fondo-logo);
    left: calc(50% - var(--talos-fondo-logo) / 2); top: calc(50% - var(--talos-fondo-logo) / 2); }
.talos-fondo-silueta { position: absolute; inset: 0; background: var(--talos-fondo); background-attachment: fixed;
    mask: url('../assets/AppImages/talospol/talospol.svg') center / contain no-repeat;
    -webkit-mask: url('../assets/AppImages/talospol/talospol.svg') center / contain no-repeat; }
.talos-fondo-marca { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .08; }
/* Inicio: sin panel blanco, las tarjetas flotan sobre el fondo */
body.en-inicio > .container { background: transparent; box-shadow: none; }
body:not(.en-login) > .container, body:not(.en-login) > .container-fluid { background: transparent; box-shadow: none; } /* Ninguna página lleva panel blanco: todo va en tarjetas sobre el fondo, como Inicio */
body:not(.en-login) .table { background-color: #fff; } /* Las tablas sueltas, con su fondo blanco */
@media print { .talos-fondo { display: none; } body:not(.en-login) { background: #fff; } }
/* Operativos: cada secuencia y «Otros agentes» en su tarjeta */
#operativos-page .secuencia-group, #operativos-page .otros-agentes-group { background: #fff; border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px; box-shadow: 0 .125rem .25rem rgba(0,0,0,.075); padding: 14px 14px 4px; margin-bottom: 1rem; }
#operativos-page .secuencia-group .table, #operativos-page .otros-agentes-group .table { margin-bottom: .5rem; }

/* ===== Avisos en este móvil (js/modals/avisos_movil.js): tarjeta de Inicio y ventana ===== */
.home-avisos-movil { border: 1px solid rgba(10, 61, 98, .25); border-radius: 12px; transition: opacity .25s, transform .25s; }
.home-avisos-movil .card-body { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; }
.home-avisos-movil.avm-saliendo { opacity: 0; transform: translateY(-6px); }
.home-avisos-movil.avm-hecho { border-color: rgba(40, 167, 69, .45); }
.home-avisos-movil.avm-hecho .avm-icono { background: rgba(40, 167, 69, .12); color: #1e7e34; }
.avm-icono { flex: none; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(10, 61, 98, .08); color: #0a3d62; font-size: 18px; }
.avm-texto { flex: 1; min-width: 0; }
.avm-titulo { font-weight: 600; color: #0a3d62; line-height: 1.25; }
.avm-sub { font-size: .85rem; color: #6c757d; line-height: 1.4; margin-top: 2px; }
.avm-acciones { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.avm-btn-principal { background: #0a3d62; border-color: #0a3d62; color: #fff; }
.avm-btn-principal:hover, .avm-btn-principal:focus { background: #0d4d7a; border-color: #0d4d7a; color: #fff; }
.avm-btn-luego { color: #6c757d; }
.avm-popup .swal2-title { font-size: 1.25rem; }
.avm-ventana { font-size: .92rem; }
.avm-intro { color: #495057; margin-bottom: 10px; line-height: 1.45; }
.avm-estado { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; }
.avm-estado-ok { background: rgba(40, 167, 69, .1); color: #1e7e34; font-weight: 600; }
.avm-estado-aviso { display: block; background: rgba(255, 193, 7, .14); color: #6b4e00; line-height: 1.45; }
.avm-botones { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.avm-seccion { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #6c757d; margin: 16px 0 4px; }
.avm-seccion small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.avm-lista { border: 1px solid #e3e6ea; border-radius: 10px; overflow: hidden; }
.avm-fila, .avm-disp { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 0; cursor: pointer; }
.avm-disp { cursor: default; }
.avm-fila + .avm-fila, .avm-disp + .avm-disp { border-top: 1px solid #eef0f2; }
.avm-fila-icono { flex: none; width: 18px; text-align: center; color: #0a3d62; opacity: .75; }
.avm-fila-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.avm-fila-titulo { color: #212529; line-height: 1.3; }
.avm-fila-sub { font-size: .78rem; color: #6c757d; line-height: 1.3; }
.avm-fila .custom-switch { flex: none; padding-left: 2.25rem; margin-right: -4px; }

/* ==========================================================================
   Editor de actos (2026.11.09): mapa a toda la ventana, lateral plegable con
   pestañas, herramientas flotantes y modo consulta. Sustituye al modal xl con
   el panel de herramientas abajo (el mapa quedaba en ~350 px en un portátil).
   ========================================================================== */
#modal-acto-editor.acto-ed-modal { padding: 0 !important; }
#modal-acto-editor .acto-ed-dialog { max-width: none; width: 100vw; height: 100vh; height: 100dvh; margin: 0; }
#modal-acto-editor .acto-ed-content { height: 100%; padding: 0; border: 0; border-radius: 0; display: flex; flex-direction: column; overflow: hidden; }

.acto-ed-header { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 10px; min-height: 50px; background: #16365c; color: #fff; }
.acto-ed-title { margin: 0; font-size: 1.02rem; font-weight: 700; display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
#modal-acto-titulo-accion { flex-shrink: 0; }
.acto-ed-title-sub { font-weight: 400; opacity: .85; overflow: hidden; text-overflow: ellipsis; }
.acto-ed-estado { flex-shrink: 0; font-size: .75rem; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .12); white-space: nowrap; }
.acto-ed-estado:empty { display: none; }
.acto-ed-estado.pendiente { background: #f6edd0; color: #6b4f00; }
.acto-ed-estado.pendiente i { color: #c9a227; font-size: .55rem; vertical-align: middle; }
.acto-ed-estado.ok { background: rgba(46, 160, 92, .3); }
.acto-ed-estado.consulta { background: rgba(255, 255, 255, .2); }
.acto-ed-hactions { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.acto-ed-hactions > span.acto-ed-edicion { display: inline-flex; align-items: center; gap: 4px; }
.acto-ed-hbtn { color: #fff !important; background: transparent; border: 0; padding: 5px 9px; border-radius: 6px; font-size: .88rem; line-height: 1.2; white-space: nowrap; }
.acto-ed-hbtn:hover, .acto-ed-hbtn:focus { background: rgba(255, 255, 255, .15); box-shadow: none; }
.acto-ed-hbtn:disabled { opacity: .35; background: transparent; }
.acto-ed-txt, .acto-ed-txt-m { margin-left: 6px; }
.acto-ed-hsep { display: inline-block; width: 1px; height: 22px; background: rgba(255, 255, 255, .25); margin: 0 4px; }
.acto-ed-btn-oro { background: #c9a227; color: #16365c !important; font-weight: 700; border: 0; }
.acto-ed-btn-oro:hover, .acto-ed-btn-oro:focus { background: #d8b445; color: #16365c; }
#btn-acto-guardar { white-space: nowrap; }
.acto-ed-cerrar { font-size: 1.05rem; }
@media (max-width: 1279.98px) { .acto-ed-txt { display: none; } }

/* Modo edición / consulta */
.acto-ed-solo-consulta { display: none !important; }
.acto-ed-consulta .acto-ed-solo-consulta:not([hidden]) { display: inline-flex !important; }
.acto-ed-consulta .acto-ed-tab.acto-ed-solo-consulta:not([hidden]) { display: block !important; }
.acto-ed-consulta .acto-ed-edicion { display: none !important; }
.acto-ed-consulta .acto-ed-form { display: none !important; }
.acto-ed-consulta #acto-mapa .geoman-controls { display: none !important; }   /* solo ver: sin herramientas de dibujo */
body:has(#modal-acto-editor.show) #btn-volver-arriba { display: none !important; } /* tapaba la esquina del mapa */
#btn-acto-editar { background: #c9a227; color: #16365c !important; font-weight: 700; }

/* Cuerpo: lateral + mapa */
#modal-acto-editor .acto-ed-body { flex: 1 1 auto; display: flex; min-height: 0; padding: 0; position: relative; max-height: none; overflow: hidden; }
.acto-ed-side { flex: 0 0 340px; width: 340px; display: flex; flex-direction: column; min-height: 0; background: #f5f7fa; border-right: 1px solid #dbe2ea; transition: margin-left .2s ease; z-index: 6; }
.acto-ed-panel-cerrado .acto-ed-side, .acto-ed-solomapa .acto-ed-side { margin-left: -341px; }
.acto-ed-tabs { flex-shrink: 0; display: flex; background: #fff; border-bottom: 1px solid #dbe2ea; }
.acto-ed-tab { flex: 1; border: 0; background: none; padding: 10px 4px 8px; font-size: .82rem; font-weight: 600; color: #5b6b80; border-bottom: 3px solid transparent; white-space: nowrap; }
.acto-ed-tab:hover { color: #16365c; }
.acto-ed-tab.active { color: #16365c; border-bottom-color: #c9a227; }
.acto-ed-tab:focus { outline: none; box-shadow: inset 0 0 0 2px rgba(201, 162, 39, .5); }
.acto-ed-tab-mapa { display: none; }
.acto-ed-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.acto-ed-pane { display: none; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 14px 18px; }
.acto-ed-pane.active { display: block; }
.acto-ed-help { font-size: .76rem; color: #5b6b80; line-height: 1.35; display: block; }
.acto-ed-h { font-size: .74rem; font-weight: 700; color: #16365c; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .05em; }
.acto-ed-eyebrow { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #5b6b80; margin: 8px 0 5px; font-weight: 700; }
.acto-ed-card { background: #fff; border: 1px solid #dbe2ea; border-radius: 8px; padding: 10px; }
.acto-ed-calles { border: 1px solid #dbe2ea; background: #fff; border-radius: 6px; padding: 4px; }

/* Paleta de recursos */
.acto-paleta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.acto-recurso { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; min-height: 64px; padding: 8px 4px 6px; border: 1px solid #dbe2ea; border-radius: 8px; background: #fff; color: #14243a; font-size: .7rem; line-height: 1.15; cursor: pointer; }
.acto-recurso:hover { border-color: #16365c; }
.acto-recurso:focus { outline: none; box-shadow: 0 0 0 2px rgba(22, 54, 92, .35); }
.acto-recurso.activo { border-color: #c9a227; box-shadow: 0 0 0 2px #c9a227; background: #fffaf0; }
.acto-recurso.colocando { animation: actoRecursoPulso 1.4s ease-in-out infinite; }
@keyframes actoRecursoPulso { 0%, 100% { box-shadow: 0 0 0 2px #c9a227; } 50% { box-shadow: 0 0 0 5px rgba(201, 162, 39, .35); } }
@media (prefers-reduced-motion: reduce) { .acto-recurso.colocando { animation: none; } }
.acto-recurso-img { height: 24px; display: flex; align-items: center; }
.acto-recurso-txt { text-align: center; overflow-wrap: anywhere; }

/* Columna del mapa */
#modal-acto-editor .acto-ed-mapcol { flex: 1 1 auto; min-width: 0; height: auto; min-height: 0; position: relative; display: flex; overflow: hidden; }
#modal-acto-editor #acto-map-wrapper { flex: 1 1 auto; min-height: 0; }
.acto-ed-float { position: absolute; z-index: 5; }
#modal-acto-editor .acto-map-search.acto-ed-float { top: 10px; left: 56px; display: flex; align-items: center; gap: 6px; width: min(380px, calc(100% - 320px)); min-width: 220px; background: #fff; border-radius: 999px; padding: 4px 4px 4px 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
#modal-acto-editor .acto-map-search input { border: 0; box-shadow: none; background: transparent; padding-left: 2px; }
#modal-acto-editor .acto-map-search .btn { border-radius: 999px; padding: 2px 10px; }
.acto-ed-search-msg { position: absolute; top: calc(100% + 4px); left: 12px; right: 12px; font-size: .72rem; background: rgba(255, 255, 255, .95); color: #334155; padding: 2px 8px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.acto-ed-search-msg:empty { display: none; }
/* Buscador de calles con el callejero (2026.11.09) */
.acto-buscar-lista { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; background: #fff; border-radius: 10px; box-shadow: 0 6px 22px rgba(0, 0, 0, .2); padding: 4px; max-height: 300px; overflow-y: auto; }
.acto-buscar-lista[hidden] { display: none; }
.acto-buscar-op { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 7px; font-size: .86rem; color: #14243a; }
.acto-buscar-op i { color: #8a97a8; font-size: .75rem; }
.acto-buscar-op:hover, .acto-buscar-op.activa { background: #eef4fb; }
.acto-buscar-lista:not([hidden]) ~ .acto-ed-search-msg { display: none; }
#btn-acto-plano-derecho.active, #btn-acto-sentidos.active { background: #dbeafe; border: 1px solid #2563eb; color: #1d4ed8; }
#modal-acto-editor .acto-map-wrapper .acto-leyenda { top: 10px !important; right: 10px !important; left: auto !important; width: 230px; max-width: 230px; max-height: calc(100% - 80px); overflow: auto; z-index: 5; opacity: .97; }
.acto-ley-linea { display: inline-block; width: 22px; height: 4px; border-radius: 2px; vertical-align: middle; }
.acto-ley-zona { display: inline-block; width: 14px; height: 11px; opacity: .5; border-radius: 2px; vertical-align: middle; border: 1px solid rgba(0, 0, 0, .25); }

/* Barra del mapa (abajo a la izquierda) */
#modal-acto-editor #acto-map-tools-panel.acto-ed-mapbar { left: 10px; bottom: 10px; z-index: 5; max-height: none; overflow: visible; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 10px; padding: 5px 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); font-size: .78rem; }
#modal-acto-editor .acto-ed-mapbar select { width: 175px; font-size: .8rem; }
.acto-ed-zoom { color: #5b6b80; white-space: nowrap; }
#btn-configurar-impresion { white-space: nowrap; }
#btn-configurar-impresion.acto-ed-fijado { background: #f6edd0; border: 1px solid #c9a227; color: #6b4f00; }

/* Opciones de lo seleccionado */
.acto-ed-sel { top: 58px; left: 56px; max-width: calc(100% - 320px); min-width: 280px; background: #fff; border-radius: 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); padding: 8px 10px; font-size: .8rem; }
.acto-ed-sel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.acto-ed-sel-titulo { font-weight: 700; color: #16365c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acto-ed-sel-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.acto-ed-sel-item { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.acto-ed-sel-item > span { color: #5b6b80; }
.acto-ed-sel-item input[type="color"] { width: 34px; height: 26px; padding: 1px; border: 1px solid #dbe2ea; border-radius: 4px; cursor: pointer; background: #fff; }
.acto-ed-sel-item input[type="range"] { width: 84px; }
.acto-ed-val { min-width: 28px; color: #5b6b80; }
.acto-ed-sel-etiqueta { flex: 1 1 220px; }
.acto-ed-sel-etiqueta input { flex: 1; min-width: 0; }

/* Modo consulta: lo tocado en el mapa y el resumen */
.acto-ed-info { left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px); background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); padding: 10px 14px; font-size: .9rem; }
.acto-ed-info-txt { min-width: 0; }
.acto-ed-info-linea { display: inline-block; width: 20px; height: 4px; border-radius: 2px; vertical-align: middle; flex-shrink: 0; }
.acto-ed-info-zona { display: inline-block; width: 14px; height: 11px; opacity: .5; border-radius: 2px; vertical-align: middle; border: 1px solid rgba(0, 0, 0, .25); flex-shrink: 0; }
.acto-ed-side > .acto-ed-pane { flex: 1 1 auto; }
.acto-ed-res-cab { background: #16365c; color: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 2px; }
.acto-ed-res-tit { font-weight: 800; font-size: 1rem; }
.acto-ed-res-cab .text-muted { color: rgba(255, 255, 255, .75) !important; }
.acto-ed-res-desc { white-space: pre-line; color: #334155; }
.acto-ed-res-lista { display: grid; gap: 4px; }
.acto-ed-res-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: #fff; border: 1px solid #dbe2ea; border-radius: 8px; padding: 8px 10px; font-size: .85rem; color: #14243a; }
.acto-ed-res-item:hover { border-color: #16365c; }
.acto-ed-res-item small { margin-left: auto; color: #5b6b80; font-weight: 600; }
.acto-ed-res-sub { padding-left: 36px; font-size: .78rem; background: #f9fafb; }
.acto-ed-res-calle { padding: 6px 0; border-bottom: 1px dashed #dbe2ea; }

/* Vista del encuadre del PDF: sin flotantes encima del marco, y el marco cabe entero (a lo ancho y a lo alto) */
#acto-map-wrapper.acto-print-preview-mode .acto-ed-float { display: none !important; }
#modal-acto-editor #acto-map-wrapper.acto-print-preview-mode { align-items: center; background: #e9edf2; overflow: hidden; }
#modal-acto-editor #acto-map-wrapper.acto-print-preview-mode .acto-print-preview-header,
#modal-acto-editor #acto-map-wrapper.acto-print-preview-mode .acto-print-preview-footer { align-self: stretch; }
#modal-acto-editor .acto-map-viewport.acto-print-preview {
    flex: 0 0 auto;
    width: min(calc(100% - 2 * var(--acto-print-margin-h)), calc((100dvh - 50px - var(--acto-print-header-height) - var(--acto-print-footer-height) - 28px) * 1.6));
    max-width: none;
    margin: 10px auto;
}

/* Móvil */
@media (max-width: 767.98px) {
    .acto-ed-header { gap: 2px; padding: 4px 6px; min-height: 46px; }
    .acto-ed-title { font-size: .9rem; flex: 1 1 auto; }
    #modal-acto-titulo-accion { display: none; }
    .acto-ed-title-sub { opacity: 1; font-weight: 600; }
    .acto-ed-estado { padding: 3px 7px; }
    .acto-ed-estado span { display: none; }
    .acto-ed-hsep, #btn-versiones-plano, #btn-map-fullscreen, #btn-acto-rehacer, #btn-acto-guardar-cerrar { display: none !important; }
    .acto-ed-hbtn { padding: 5px 7px; }
    #btn-acto-guardar { padding: 4px 8px; }
    .acto-ed-side { position: absolute; top: 0; left: 0; bottom: 0; width: 100%; flex-basis: auto; margin-left: 0 !important; transform: translateX(0); transition: transform .2s ease, visibility .2s; z-index: 20; }
    .acto-ed-panel-cerrado .acto-ed-side { transform: translateX(-100%); visibility: hidden; }
    .acto-ed-tab-mapa { display: block; }
    .acto-ed-tab { font-size: .74rem; padding: 11px 2px 9px; }
    .acto-ed-tab i { display: block; margin-bottom: 2px; }
    .acto-paleta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    #modal-acto-editor .acto-map-search.acto-ed-float { left: 50px; right: 8px; width: auto; min-width: 0; top: 8px; }
    #modal-acto-editor .acto-map-wrapper .acto-leyenda { top: 56px !important; right: 8px !important; width: 175px; max-width: 175px; }
    .acto-ed-sel { left: 8px; right: 8px; top: auto; bottom: 58px; max-width: none; min-width: 0; }
    #modal-acto-editor #acto-map-tools-panel.acto-ed-mapbar { left: 8px; bottom: 8px; padding: 4px 6px; }
    #modal-acto-editor .acto-ed-mapbar select { width: 150px; }
    .acto-ed-mapbar .btn-group, .acto-ed-zoom { display: none !important; }
    .acto-ed-info { bottom: 58px; width: calc(100% - 16px); justify-content: space-between; }
}

/* Lista de actos (2026.11.09): por fecha en secciones, etiquetas de estado, «Abrir» y menú «⋯»; en el móvil, tarjetas */
.actos-hoy { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: #fff6dc; border: 1px solid #f0d58a; color: #5c4400; }
.actos-hoy > i { font-size: 1.3rem; color: #c9a227; }
.actos-lista-cab { background: #fff; gap: 8px; }
.actos-filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.acto-filtro { border: 1px solid #dbe2ea; background: #fff; color: #334155; border-radius: 999px; padding: 3px 11px; font-size: .8rem; font-weight: 600; }
.acto-filtro span { color: #8a97a8; font-weight: 700; margin-left: 2px; }
.acto-filtro:hover { border-color: #16365c; }
.acto-filtro.activo { background: #16365c; border-color: #16365c; color: #fff; }
.acto-filtro.activo span { color: #f6edd0; }
.acto-filtro.hay:not(.activo) { border-color: #f0d58a; background: #fff8e6; }
@media (min-width: 992px) {
    #actos-fila.actos-sin-calendario > .actos-col-lista { flex: 0 0 100%; max-width: 100%; }
    #actos-fila.actos-sin-calendario > .actos-col-agenda { display: none; }
}
#tabla-actos { table-layout: fixed; }
#tabla-actos td { vertical-align: middle; border-top: 1px solid #eef1f5; }
#tabla-actos td.c-ac { text-align: right; white-space: nowrap; }
#tabla-actos tr.acto-seccion td { background: #f5f7fa; color: #16365c; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 7px 12px; border-top: 1px solid #dbe2ea; }
#tabla-actos tr.acto-seccion td span { color: #8a97a8; margin-left: 4px; }
#tabla-actos tr.acto-seccion-hoy td { background: #fff6dc; color: #6b4f00; }
#tabla-actos tr.acto-pasado .acto-tit, #tabla-actos tr.acto-pasado .acto-fecha { opacity: .7; }
#tabla-actos tr.expediente-row td { background: #f0f4f9; }
#tabla-actos tr.subexpediente-row td { background: #f6f8fb; }
.acto-fecha { display: grid; justify-items: center; line-height: 1.05; color: #14243a; }
.acto-fecha b { font-size: 1.25rem; font-weight: 800; }
.acto-fecha span { font-size: .68rem; color: #5b6b80; text-transform: uppercase; letter-spacing: .03em; }
.acto-fecha small { font-size: .66rem; color: #5b6b80; margin-top: 2px; white-space: nowrap; }
.acto-carpeta { display: block; text-align: center; font-size: 1.25rem; }
.acto-tit { font-weight: 700; color: #14243a; overflow: hidden; text-overflow: ellipsis; }
.acto-meta { font-weight: 400; color: #5b6b80; font-size: .82rem; }
.acto-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.acto-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 6px; background: #eef1f5; color: #334155; white-space: nowrap; }
.acto-chip i { font-size: .65rem; opacity: .85; }
.acto-chip.ok { background: #dcfce7; color: #166534; }
.acto-chip.aviso { background: #fff1c7; color: #7a5600; }
.acto-chip.mal { background: #fde2e2; color: #9f1d1d; }
.acto-chip.fuerte { background: #16365c; color: #fff; }
.acto-chip.arch { background: #fbe9d0; color: #8a4b08; }
.acto-chip.gris { background: #eef1f5; color: #5b6b80; }
.acto-sangria { display: inline-block; }
.acto-abrir { min-width: 64px; }
.acto-menu .dropdown-menu { font-size: .86rem; }
.acto-menu .dropdown-header { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #8a97a8; padding: 6px 16px 3px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.acto-menu .dropdown-item.acto-menu-crear { color: #166534; }
.actos-solo-lectura .acto-menu .acto-menu-crear, .actos-solo-lectura .acto-menu .dropdown-header { display: none; }
.acto-menu .dropdown-item.acto-menu-crear i { color: #16a34a; }
.acto-menu .dropdown-item.acto-menu-crear:hover { background: #ecfdf3; }
.acto-menu > .btn { margin-left: 4px; }
@media (max-width: 767.98px) {
    #tabla-actos thead { display: none; }
    #tabla-actos, #tabla-actos tbody { display: block; width: 100%; }
    #tabla-actos { table-layout: auto; }
    #tabla-actos tbody tr { display: grid; grid-template-columns: auto 60px minmax(0, 1fr); grid-template-areas: "tg fe ti" "tg ac ac"; column-gap: 8px; row-gap: 6px; padding: 10px; border-bottom: 1px solid #dee2e6; }
    #tabla-actos tbody td { display: block; border: 0 !important; padding: 0 !important; min-width: 0; background: transparent !important; }
    #tabla-actos .c-tg { grid-area: tg; }
    #tabla-actos .c-fe { grid-area: fe; }
    #tabla-actos .c-ti { grid-area: ti; }
    #tabla-actos .c-ac { grid-area: ac; text-align: left; display: flex !important; gap: 6px; }
    #tabla-actos .acto-tit { white-space: normal; }
    #tabla-actos tbody tr.acto-seccion, #tabla-actos tbody tr.acto-vacio { display: block; padding: 0; }
    #tabla-actos tbody tr.acto-seccion td { padding: 7px 12px !important; background: #f5f7fa !important; }
    #tabla-actos tbody tr.acto-seccion-hoy td { background: #fff6dc !important; }
    #tabla-actos tbody tr.expediente-row { background: #f0f4f9; }
    #tabla-actos tbody tr.subexpediente-row { background: #f6f8fb; }
    .actos-hoy { flex-wrap: wrap; }
}

/* Fase 2 de Actos: botón de lugares activo y aforo */
#btn-acto-ubicaciones.active { background: #dbeafe; border: 1px solid #2563eb; color: #1d4ed8; }
.acto-ed-aforo { color: #16365c; white-space: nowrap; }
.acto-ed-ruta-aviso { flex: 1 1 100%; font-size: .74rem; color: #6b4f00; background: #fff7e0; border: 1px solid #f0d58a; padding: 4px 8px; border-radius: 6px; }
.acto-ed-ruta-aviso .btn-link { font-size: .74rem; font-weight: 700; }

/* Fase 3 de Actos: plano definitivo, comparar versiones */
.acto-ed-solo-bloqueado { display: none; }
.acto-ed-bloqueado .acto-ed-solo-bloqueado { display: block; }
.acto-ed-bloqueado #acto-mapa .geoman-controls { display: none !important; }
.acto-ed-bloqueado [data-pane="recursos"] .acto-paleta,
.acto-ed-bloqueado [data-pane="recursos"] .acto-ed-card,
.acto-ed-bloqueado #acto-paleta-buscar { opacity: .45; pointer-events: none; }
.acto-ed-aviso-mapa { top: 58px; left: 50%; transform: translateX(-50%); background: #16365c; color: #fff; border-radius: 999px; padding: 6px 14px; font-size: .8rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); white-space: nowrap; max-width: calc(100% - 140px); overflow: hidden; text-overflow: ellipsis; }
.acto-ed-aviso-mapa .btn-link { color: #f6edd0; font-weight: 700; }
.acto-ed-aviso-cmp { top: 104px; background: #fff; color: #14243a; border: 1px solid #dbe2ea; }
.acto-cmp-add { color: #16a34a; font-weight: 700; }
.acto-cmp-del { color: #dc2626; font-weight: 700; }
.acto-ver-mini { border: 1px solid #dbe2ea; border-radius: 4px; display: block; }
.acto-ver-nombre { font-weight: 800; color: #16365c; }
.acto-ver-def { background: #fffaf0; }
.acto-badge-definitiva { background: #16365c; color: #fff; }
.acto-ver-acciones { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: flex-end; align-items: center; }
@media (max-width: 767.98px) {
    .acto-ed-aviso-mapa { top: 52px; max-width: calc(100% - 16px); white-space: normal; border-radius: 10px; }
    .acto-ed-aviso-cmp { top: 96px; }
}
/* Fase 3: puestos, agentes, montaje y hora */
.acto-ed-puesto { flex: 1 1 100%; }
.acto-ed-puesto-campos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; width: 100%; }
.acto-ed-puesto-num { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; color: #16365c; }
.acto-ed-puesto-num input { width: 58px; }
#acto-ed-puesto-funcion { flex: 1 1 160px; min-width: 0; }
.acto-ed-puesto-hor { display: inline-flex; align-items: center; gap: 4px; }
.acto-ed-puesto-hor > span { color: #5b6b80; }
.acto-ed-puesto-hor input { width: 92px; }
.acto-ed-pnum { display: inline-block; min-width: 30px; text-align: center; background: #16365c; color: #fff; border-radius: 6px; font-weight: 800; font-size: .78rem; padding: 2px 6px; flex-shrink: 0; }
.acto-ed-mi-puesto { display: grid; gap: 2px; width: 100%; text-align: left; background: #f6edd0; border: 2px solid #c9a227; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; color: #14243a; }
.acto-ag-lista { max-height: 50vh; overflow-y: auto; }
.acto-ag-fila { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid #eef1f5; margin: 0; cursor: pointer; font-size: .86rem; }
.acto-ag-nom { flex: 1; min-width: 0; }
.acto-ag-turno { font-size: .72rem; font-weight: 700; border-radius: 4px; padding: 1px 6px; background: #eef1f5; color: #5b6b80; }
.acto-ag-turno.si { background: #dcfce7; color: #166534; }
.acto-ed-montaje { background: #fff; border: 1px solid #dbe2ea; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: .82rem; display: grid; gap: 4px; }
.acto-ed-montaje-barra { height: 8px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.acto-ed-montaje-barra span { display: block; height: 100%; background: #16a34a; }
.acto-ed-hora { left: 50%; bottom: 62px; transform: translateX(-50%); width: min(460px, calc(100% - 24px)); background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); padding: 8px 14px; font-size: .84rem; }
#btn-acto-hora.active { background: #f6edd0; border: 1px solid #c9a227; color: #6b4f00; }
@media (max-width: 767.98px) { .acto-ed-hora { bottom: 56px; } }
