/* SUB.STACION - HOJA DE ESTILOS MAESTRA
    Centralización de UI/UX - NO ELIMINAR BLOQUES
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colores Marca  */
    --primary: #363062;
    --vibrant: #1877F2;          /* Azul Eléctrico #27F542 */
    --cyan-ss: #00CCF2;          /* Celeste */
    --indigo-corp: #4F46E5;      /* Acciones Tácticas #9ACD32 */
    
    /* Colores Neutros */
    --bg-body: #F4F7FE;
    --white: #ffffff;
    --white: #ffffff;
    --text-main: #2B3674;
    --text-muted: #A3AED0;
    
    /* Layout */
    --radius-k: 8px;
    --sidebar-width: 280px;
    --topbar-height: 80px;
    --radius-buttons: 8px;
}

/* ==========================================================================
   ESTRUCTURA GLOBAL (LIMITADOR 1400px)
   ========================================================================== */

/* --- 1. BASE --- */
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body); /* El gris de los lados */
}

.cursor-pointer {
    cursor: pointer;
}

/* --- 2. EL CONTENEDOR QUE MANDA (1400px) --- */
.app-wrapper { 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
    
    /* Lógica de centrado */
    max-width: 1400px;
    width: 100%;
    margin: 0 auto; 
    
    background-color: #ffffff; 
    box-shadow: 0 0 40px rgba(0,0,0,0.05); 
    position: relative;
}

/* --- 3. TU TOPBAR (Respetando el flujo normal) --- */
.topbar {
    height: var(--topbar-height);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid #edf2f7;
    /* QUITAMOS: position: fixed, top, left, transform */
    width: 100%;
    box-sizing: border-box;
}

/* --- 4. DISEÑO PRINCIPAL --- */
.main-layout {
    display: flex;
    flex: 1;
    /* QUITAMOS: padding-top */
}

.content-page {
    flex: 1;
    padding: 30px;
    background-color: #ffffff;
    overflow-y: auto;
}

.user-menu-trip {
    cursor: pointer;
}

/* Banner de Bienvenida Limpio */
.ss-welcome-banner {
    background: linear-gradient(135deg, #363062 0%, #4d458c 100%);
    border-radius: 24px;
    padding: 35px 40px;
    color: white;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(54, 48, 98, 0.15);
    border: none;
}

.ss-welcome-banner .ss-decor {
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 7rem;
    opacity: 0.08;
    transform: rotate(15deg);
}

.ss-welcome-text h2 {
    font-weight: 850;
    font-size: 2.1rem;
    margin-bottom: 5px;
    letter-spacing: -1px;
}

.ss-welcome-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
    margin-bottom: 0;
}

/* Contabilidad */

.btn-modulo {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.btn-modulo:hover {
    background-color: #f8f9ff;
    border-color: #4318FF;
    transform: translateY(-3px);
}
.btn-modulo i {
    display: block;
}

/* Colores para las etiquetas de tipo de registro */
.badge-sub { background: #4318FF !important; color: #FFFFFF !important; border-radius: 6px !important; padding: 3px 8px; font-size: 0.70rem !important; }
.badge-ingreso { background-color: #E6F9F0 !important; color: #00B69B !important; border-radius: 6px !important; padding: 3px 8px; font-size: 0.80rem !important; }
.badge-egreso { background-color: #FFF0F0 !important; color: #EE5D50 !important; border-radius: 6px !important; padding: 3px 8px; font-size: 0.80rem !important; }
.badge-traspaso { background-color: #F4F7FE !important; color: #4318FF !important; border-radius: 6px !important; padding: 3px 8px; font-size: 0.80rem !important; }
.badge-prestamo { background-color: #800040 !important; color: #4318FF !important; border-radius: 6px !important; padding: 3px 8px; font-size: 0.80rem !important; }

/* Bloque Maestro de Títulos Workflows - ELÁSTICO */
.mision-restriccion-filas {
    display: block;                  /* Cambiado de -webkit-box a block para mayor elasticidad */
    white-space: normal !important;  /* Permite el salto de línea natural */
    line-height: 1.3;                /* Un poco más de aire entre líneas */
    text-align: left !important;     /* Alineado a la izquierda */
    word-wrap: break-word;           /* Rompe solo si la palabra es demasiado larga para la celda */
    overflow: visible;               /* Que no esconda nada */
    min-width: 150px;                /* Asegura un ancho mínimo para que no se apriete en móvil */
    max-width: 400px;                /* Evita que se estire demasiado en pantallas gigantes */
}

/* Contenedor Radar de Staciones */
.ss-widget-radar {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    height: 100%;
}

/* Cuadrícula Forzada de 4 */
.ss-radar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px;
    margin-top: 10px;
}

.ss-stacion-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 15px 10px;
    text-align: center;
    border: 1px solid #eee;
    text-decoration: none !important;
    display: block;
    position: relative; /* Necesario para la notificación flotante */
    transition: 0.3s;
}

.ss-stacion-card:hover {
    transform: translateY(-3px);
    background: #fff;
    border-color: #363062;
}

.ss-sem-info {
    display: flex;
    align-items: center; /* Centra el icono con las dos líneas de texto */
    gap: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.1;
}

.ss-sem-info i {
    font-size: 1.4rem; /* Icono un poco más grande para equilibrar las 2 líneas */
}

/* Ajustes para que FullCalendar se vea como tu imagen */
.fc { 
    background: white; 
    border-radius: 20px; 
    padding: 20px; 
}
.fc-daygrid-day-number { 
    font-weight: 600; 
    color: #4a5568; 
    padding: 10px !important; 
}
.fc-event { 
    border: none !important; 
    border-radius: 6px !important; 
    padding: 4px 8px !important; 
    font-size: 0.75rem !important; 
    font-weight: 700 !important;
}
.fc-col-header-cell-cushion { 
    text-transform: uppercase; 
    font-size: 0.7rem; 
    letter-spacing: 1px; 
    color: #a0aec0; 
}

/* ==========================================================================
   SISTEMA DE RADAR GLOBAL (POPOVER ANCHO)
   ========================================================================== */
.popover {
    /* Definimos un ancho real de 600px para que el calendario respire */
    max-width: 600px !important; 
    width: 600px !important;
    border-radius: 20px !important;
    border: none !important;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2) !important;
    background-color: #ffffff !important;
    z-index: 2050 !important; /* Por encima de todo */
}

.popover-body {
    padding: 20px !important;
    width: 100% !important;
}

/* Arreglo para que los números del calendario encajen en sus cuadros */
#mini_calendar {
    width: 100% !important;
    min-height: 450px;
    background: white;
}

.fc .fc-daygrid-day-number {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    padding: 8px !important;
    color: var(--text-main) !important;
}

/* Evita que el popover se "pegue" al borde de la pantalla */
.bs-popover-start, .bs-popover-left {
    margin-right: 15px !important;
}

/* Widget Pilotos en Acción (Full Width) */
.ss-widget-pilotos {
    background: #fff;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
}

.ss-pilotos-grid-interno {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.ss-piloto-row {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: #fcfcfc;
    border: 1px solid #f0f0f0;
}

.ss-avatar-piloto {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #363062;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    position: relative;
    flex-shrink: 0;
}

.ss-avatar-piloto::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
}

.ss-piloto-info {
    flex-grow: 1;
    margin-left: 12px;
    overflow: hidden;
}

.ss-piloto-mision {
    font-weight: 800;
    color: #2d3748;
    margin: 0;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-piloto-user {
    font-size: 0.8rem;
    color: #718096;
}

.ss-stacion-tag-mini {
    background: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.65rem;
    border: 1px solid #eee;
    margin-left: 10px;
}

/* La Notificación Flotante (Badge) */
.ss-radar-notif {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #3b82f6; /* Azul sub.stacion */
    color: white;
    font-size: 0.75rem;
    font-weight: 850;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 2px solid white;
    z-index: 10;
}

/* Badge especial para cuando hay revisiones */
.ss-radar-notif.revision {
    background: #f59e0b; /* Naranja/Amarillo alerta */
    right: auto;
    left: 5px; /* Las revisiones salen a la izquierda */
}

.ss-stacion-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
}

.ss-stacion-icon-mini {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: white;
}

.ss-stacion-name-mini {
    font-size: 0.7rem;
    font-weight: 800;
    color: #4a5568;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.badge-radar-mini {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 50px;
    font-weight: 700;
}

/* Widget Semáforo de una sola columna */
.ss-widget-semaforo {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    height: 100%; /* Para que se alinee con los otros widgets */
}

.ss-semaforo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 10px;
    transition: 0.3s;
    border: 1px solid transparent;
}

.ss-semaforo-item:last-child { margin-bottom: 0; }

/* Variaciones de color suaves */
.ss-sem-rojo { background: #fff1f0; border-color: #ffa39e; color: #cf1322; }
.ss-sem-amarillo { background: #fffbe6; border-color: #ffe58f; color: #d48806; }
.ss-sem-verde { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }

.ss-sem-info { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9rem; }
.ss-sem-info i { font-size: 1.2rem; }

.ss-sem-number {
    font-size: 1.1rem;
    font-weight: 850;
    background: rgba(255,255,255,0.6);
    padding: 2px 10px;
    border-radius: 8px;
}
/* ==========================================================================
   REFUERZO MÓDULO TRANSBORDADOR (Cero fallos)
   ========================================================================== */

/* Avatares perfectamente redondos */
.avatar-circle-ss {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #363062 !important; /* Color primario de tu sistema */
    color: #fff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.1);
}

/* --- REFUERZO TRANSBORDADOR SUB.STACION --- */

/* Contenedor de usuario en selección (Arregla image_5f38ac.png) */
/* --- REFUERZO FINAL TRANSBORDADOR --- */

.user-content-ss {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 12px;
    background: #ffffff !important; /* Forzamos blanco de base */
    border: 1px solid #e0e5f2;
    transition: 0.2s ease;
    position: relative;
}

/* Efecto de Selección: Fondo y Borde */
.user-row-select input:checked + .user-content-ss {
    background: #f0f7ff !important; /* Azul muy suave */
    border-color: #1877F2 !important;
}

/* Manejo de Iconos (Doble selector arreglado) */
.user-status-icon-box {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
}

.user-status-icon-box .bi-check-circle-fill {
    display: none;
    color: #1877F2;
    font-size: 1.2rem;
}

.user-status-icon-box .bi-circle {
    color: #d1d9e6;
    font-size: 1.2rem;
}

/* Lógica del Check */
.user-row-select input:checked + .user-content-ss .bi-circle {
    display: none !important;
}

.user-row-select input:checked + .user-content-ss .bi-check-circle-fill {
    display: block !important;
}

/* Textos */
.u-name-ss { color: #2B3674; font-weight: 700; font-size: 0.9rem; }
.u-nick-ss { color: #A3AED0; font-size: 1.0rem; }

/* Arreglo para mision.php (image_5f38cc.png) */
.info-item { margin-bottom: 1.5rem; }
.info-item .label-ss {
    color: #888 !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}
.info-item .value-ss {
    color: #2B3674 !important; /* Azul marino de tu sistema */
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
}

/* Efecto para las tarjetas del Radar */
.hover-radar {
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hover-radar:hover > div {
    border-color: #1877F2 !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(24, 119, 242, 0.08) !important;
    background-color: #f8fbff !important;
}

/* Forzar que el texto no cambie a azul de enlace común */
.hover-radar:hover div {
    text-decoration: none !important;
}

/* --- TRUCO MAESTRO TRANSBORDADOR --- */

/* 1. Cambio de fondo al marcar */
.user-row-select input:checked + .user-content-ss {
    background-color: #eef6ff !important; /* Azul sub.stacion clarito */
    border-color: #1877F2 !important;
}

/* 2. Ocultar circulo vacío cuando está marcado */
.user-row-select input:checked + .user-content-ss .icon-unselected {
    display: none !important;
}

/* 3. Mostrar check relleno cuando está marcado */
.user-row-select input:checked + .user-content-ss .icon-selected {
    display: block !important;
}

/* 4. Asegurar que los nombres no se pierdan */
.user-row-select input:checked + .user-content-ss span {
    color: #1877F2 !important;
}

/* --- BOTONES UNIFICADOS (CREACIÓN / EDICIÓN) --- */

.wf-ghost-card {
    opacity: 0.5;
    filter: grayscale(100%);
    border: 1px dashed #ff4d4f !important;
}

/* --- BOTÓN FLOTANTE DE NOTIFICACIONES (SISTEMA GLOBAL) --- */
#btn-push-flotante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    cursor: pointer;
    z-index: 9999; /* Para que siempre esté por encima de los widgets */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Estado: DESACTIVADO (Rojo y vibrando para llamar la atención) */
#btn-push-flotante.desactivado {
    background-color: #ff4d4f;
    animation: latido-advertencia 2s infinite;
}

/* Estado: ACTIVADO (Verde y tranquilo) */
#btn-push-flotante.activado {
    background-color: #52c41a;
}

/* Animación de latido para cuando no están suscritos */
@keyframes latido-advertencia {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(255, 77, 79, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); }
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    #btn-push-flotante {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
}

/* Botón Azul (Guardar) */
/* --- BOTONES UNIFICADOS CORREGIDOS --- */

.btn-save-ss {
    background-color: var(--vibrant) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px 20px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: all 0.3s ease;
    text-decoration: none !important; /* Quita el subrayado */
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.2);
}

.btn-cancel-ss {
    background-color: #ffffff !important;
    color: #475569 !important; /* Gris oscuro */
    border: 1px solid #E0E5F2 !important;
    border-radius: 12px !important;
    padding: 14px 20px !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: all 0.3s ease;
    text-decoration: none !important; /* Quita el subrayado */
}

/* Evitar que cambien de color al pasar el mouse por culpa de Bootstrap */
.btn-save-ss:hover { opacity: 0.9; color: white !important; transform: translateY(-1px); }
.btn-cancel-ss:hover { background: #f8f9fa !important; color: #1e293b !important; }

/* Ajuste para los iconos dentro de estos botones */
.btn-save-ss i, .btn-cancel-ss i {
    font-size: 1.2rem;
}

/* --- ESTILO UNIFICADO DE BOTONES (PRO) --- */
.btn-primary, 
.btn-ss {
    background-color: var(--vibrant) !important;
    color: #ffffff !important;
    border-radius: var(--radius-buttons) !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    border: none !important;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
}

.btn-primary:hover, 
.btn-ss:hover {
    transform: translateY(-2px) !important;
    opacity: 0.9 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

/* --- NUEVO ESTILO DE BOTÓN DE WHATSAPP (NATIVO) --- */
.btn-wa-ss {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Degradado oficial de WhatsApp */
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff !important; /* Forzar el blanco */
    padding: 10px 18px;
    border-radius: 8px; /* Bordes ligeramente más redondeados */
    text-decoration: none !important; /* Forzar quitar el subrayado */
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase; /* Todo en mayúsculas */
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); /* Transición suave */
    
    /* Sombra nativa para dar profundidad */
    box-shadow: 0 4px 6px rgba(18, 140, 126, 0.2); 
}

.btn-wa-ss:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%); /* Efecto al pasar el mouse */
    box-shadow: 0 6px 12px rgba(18, 140, 126, 0.35); /* Sombra más fuerte al hover */
    transform: translateY(-2px); /* Pequeño salto hacia arriba */
}

/* Efecto al hacer clic */
.btn-wa-ss:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(18, 140, 126, 0.2);
}

.btn-wa-ss i {
    font-size: 1.1rem; /* Icono un poco más grande */
    margin-right: 10px; /* Separación del texto */
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2)); /* Sombra para el icono */
}

/* --- TÍTULOS Y TEXTOS DE NAVEGACIÓN --- */

.text-vibrant {
    color: var(--vibrant) !important;
    font-weight: 700 !important;
    font-size: 1.75rem;
    letter-spacing: -0.5px;
}
 
/* --- TEXTO DE NAVEGACIÓN (EJ: "USUARIOS" O "CONFIGURACIÓN")   --- */
.text-acciones {
    color: #2B3674  !important; /* <--- CAMBIA ESTE COLOR (Azul Marino de tu captura) #ff0000 */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    opacity: 0.8; /* Le da ese toque sutil de la foto */
}

/* Efecto para filas de tareas vencidas */
.table-danger-light {
    background-color: rgba(220, 53, 69, 0.05) !important;
}

/* Estilo Tabla Premium Workflows */
.icon-marca-table {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.user-pill {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
}

.avatar-circle-xs, .avatar-circle-xs-vibrant {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}

.avatar-circle-xs { background: #eee; color: #777; }
.avatar-circle-xs-vibrant { background: var(--vibrant); color: white; }

.badge-status {
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
}

.btn-ver-ss {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 6px;
    color: #333;
    text-decoration: none !important;
    font-size: 0.75rem;
    font-weight: 700;
    transition: 0.2s;
}

.btn-ver-ss:hover {
    background: var(--vibrant);
    color: white;
    border-color: var(--vibrant);
}

/* Badge personalizado para marcas en el listado */
.badge-ss {
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
}

/* Hover suave para las filas de la pizarra */
.table-hover tbody tr:hover {
    background-color: rgba(var(--vibrant-rgb), 0.02);
}

/* --- CONTENEDOR DE PASSWORD CON OJITO --- */
.pass-container { 
    position: relative; 
}

.pass-container .bi-eye, 
.pass-container .bi-eye-slash {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    z-index: 10;
    font-size: 1.1rem;
    transition: 0.2s;
}

.pass-container .bi-eye:hover {
    color: var(--vibrant);
}

.main-layout { display: flex; flex-grow: 1; overflow: hidden; }
.content-page { flex-grow: 1; overflow-y: auto; padding: 35px; }


.logo-sub { font-size: 1.6rem; font-weight: 800; color: var(--primary); text-decoration: none; letter-spacing: -1px; }

/* --- CORRECCIÓN ICONOS TOPBAR (image_e64ff7.png) --- */
.topbar-btns { 
    display: flex; 
    align-items: center; 
    gap: 20px; /* El espacio exacto para que se vean elegantes y no amontonados */
}



.action-icon {
    font-size: 1.25rem !important; 
    color: var(--text-main) !important;
    cursor: pointer;
    transition: 0.2s ease;
    opacity: 0.7; /* Se ven un poco más tenues de base, igual que en la foto */
    margin: 0 !important; 
}

.action-icon:hover { 
    opacity: 1; 
    color: var(--vibrant) !important; /* Salto al azul eléctrico en hover */
    transform: scale(1.1); /* Un pequeño plus de suavidad */
}

/* --- ICONOS UNIFICADOS (Bootstrap Icons únicamente) --- */
.bi {
    vertical-align: middle;
    line-height: 1;
}

/* Iconos para Títulos y Destacados (Azul Vibrante) */
.icon-vibrant {
    color: var(--vibrant) !important;
}

/* Iconos de Apoyo / Información (Gris Suave) */
.icon-muted {
    color: var(--text-muted) !important;
}

/* Iconos de Acción (Índigo) - Siempre dentro de btn-action-base */
.btn-action-base .bi {
    color: var(--indigo-corp) !important;
}

/* --- BOTONES UNIFICADOS CORREGIDOS --- */
.btn-ss, .btn-save-ss, .btn-crear-ss {
    background-color: var(--vibrant) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    
    /* ESTO QUITA LA LÍNEA DEBAJO DEL TEXTO */
    text-decoration: none !important; 
    
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.2);
}

.btn-ss:hover, .btn-save-ss:hover {
    opacity: 0.9;
    color: white !important;
    transform: translateY(-2px);
    text-decoration: none !important; /* Refuerzo para el hover */
}

/* Ajuste específico para el icono '+' para que se vea delgado como en la foto */
.btn-ss i {
    font-size: 1.4rem;
    line-height: 0;
}

/* Iconos de Navegación (Heredan color del nav-link) */
.nav-link .bi {
    margin-right: 15px;
    font-size: 1.3rem;
}

/* --- ESTADOS DE WORKFLOW (Centralizado) --- */
.badge-status {
    padding: 6px 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    display: inline-block;
    border-left: 4px solid;
}

.st-espera { background: #fff4e5; color: #ff8800; border-color: #ff8800; }
.st-aceptado { background: #e7f1ff; color: #0d6efd; border-color: #0d6efd; }
.st-rechazado { background: #fff5f5; color: #e31a1a; border-color: #e31a1a; }
.st-proceso { background: #f3e8ff; color: #6b21a8; border-color: #6b21a8; }
.st-aclarar { background: #fef3c7; color: #92400e; border-color: #92400e; }
.st-pausa { background: #f3f4f6; color: #374151; border-color: #374151; }
.st-revision { background: #ecfeff; color: #0891b2; border-color: #0891b2; }
.st-correccion { background: #fdf2f8; color: #be185d; border-color: #be185d; }
.st-finalizado { background: #f0fdf4; color: #166534; border-color: #166534; }
.st-vencido { background: #000; color: #fff; border-color: #ff0000; }

/* Ajuste de Tabla */
.table thead th {
    padding: 20px 10px !important;
    border-bottom: 2px solid #f0f4ff !important;
}

.table tbody td {
    padding: 20px 10px !important;
}

/* Efecto de prioridad con color de marca */
.badge-ss {
    font-size: 0.6rem !important;
    padding: 4px 10px !important;
    letter-spacing: 0.5px;
}


/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid #edf2f7;
    padding: 20px;
    flex-shrink: 0;
    transition: 0.3s;
}
.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: 18px;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 10px;
}
.nav-link.active { background: var(--primary); color: var(--white); box-shadow: 0px 10px 20px rgba(54, 48, 98, 0.2); }
.nav-link i { margin-right: 15px; font-size: 1.3rem; }
.nav-link.active .bi {
    color: var(--white) !important;
}

/* --- COMPONENTES CORE --- */
.k-card { background: var(--white); border-radius: var(--radius-k); padding: 25px; box-shadow: 0px 10px 30px rgba(0,0,0,0.03); margin-bottom: 20px; }
.login-card { background: var(--white); width: 100%; max-width: 420px; padding: 45px; border-radius: var(--radius-k); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.k-input { border-radius: 15px; padding: 12px 18px; border: 1px solid #E0E5F2; width: 100%; margin-bottom: 15px; }
.avatar-circle { width: 48px; height: 48px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.avatar-circle i {
    color: #1877F2; /* Pon aquí el color específico para el escudo */
}

/* --- BOTONES DE ACCIÓN (Tablas) --- */
.btn-action-base {
    background-color: #F8F9FA !important; 
    border: none !important;
    border-radius: 12px !important; 
    padding: 10px !important;
    width: 40px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}
.btn-action-base:hover {
    background-color: #E9ECEF !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05) !important;
}
.btn-action-base i { color: var(--indigo-corp) !important; }

/* --- CÁPSULAS DE NIVEL (Badges) --- */
.badge-ss {
    border-radius: 8px !important;
    padding: 6px 18px !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    display: inline-block;
    text-transform: uppercase;
    border: none !important;
}
.badge-ceo { background-color: var(--vibrant) !important; color: white !important; }
.badge-regional { background-color: var(--cyan-ss) !important; color: var(--text-main) !important; }
.badge-operativo { background-color: var(--indigo-corp) !important; color: white !important; }
.badge-empleado { background-color: var(--text-muted) !important; color: white !important; }
.badge-cliente { background-color: var(--primary) !important; color: white !important; }

/* --- FORMULARIOS Y SWITCHES --- */
.form-check-input:checked {
    background-color: var(--vibrant) !important;
    border-color: var(--vibrant) !important;
}
.text-acciones {
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* --- SISTEMA DE AVISOS (image_e575a5.png) --- */
.aviso {
    border: none !important;
    border-radius: 15px !important;
    padding: 16px 24px !important;
    font-weight: 500 !important;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.aviso i { font-size: 1.25rem; margin-right: 12px; }
.aviso-verde { background-color: #FF6347 !important; color: #FFFF00 !important; } /* #D1E9E3 !important; color: #004434 */
.aviso-amarillo { background-color: #FF6347 !important; color: #FFFF00 !important; } /* #FFF4CC !important; color: #664D03 */
.aviso-rojo { background-color: #FF6347 !important; color: #FFFF00 !important; } /* #FFF5F5 !important; color: #E31A1A */
.aviso-azul { background-color: #FF6347 !important; color: #FFFF00 !important; } /* #FFF5F5 !important; color: #E31A1A */

/* --- UTILIDADES --- */
.user-inactive { opacity: 0.6; background-color: #f8f9fa !important; }
.user-inactive td { color: var(--text-muted) !important; }

/* --- DROPDOWNS --- */
.dropdown-menu { border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; border-radius: 15px; }
.dropdown-item:hover { background-color: var(--bg-body); color: var(--primary); }
.dropdown-item.text-danger:hover { background-color: #FFF5F5; color: #E31A1A !important; }

/* --- TABLAS (Limpieza total de bordes y espaciados) --- */
.table-responsive {
    border: none !important;
}

.table {
    border-collapse: separate !important;
    border-spacing: 0 5px !important; /* Crea el efecto de filas separadas */
}

.table thead th {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 10px !important;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-radius: 15px !important;
}

.table tbody td {
    background: transparent !important;
    border-bottom: 1px solid #f0f4ff !important; /* Línea sutil entre filas */
    padding: 18px 10px !important;
    vertical-align: middle;
    color: var(--text-main);
}

.table tbody tr:hover td {
    background-color: rgba(244, 247, 254, 0.5) !important;
}

/* Estilos Directorio */
.card-directorio {
    padding: 1.5rem;
    transition: transform 0.2s;
    border-left: 4px solid transparent;
}

.card-directorio:hover {
    transform: translateY(-5px);
}

.card-directorio.border-ceo {
    border-left-color: var(--vibrant); /* O tu color de CEO */
    background: linear-gradient(to right, #fffdfa, #fff);
}

.avatar-ceo {
    background: var(--vibrant) !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(var(--vibrant-rgb), 0.3);
}

.btn-wa-directorio {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: white;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: 0.3s;
}

.btn-wa-directorio:hover {
    background: #128C7E;
    color: white;
}

        .wf-card-main { border-left: 8px solid <?php echo $wf['color_marca']; ?> !important; }
        .wf-logo-circle { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; border: 2px solid <?php echo $wf['color_marca']; ?>; display: flex; align-items: center; justify-content: center; background: #fff; }
        .wf-logo-circle img { width: 100%; height: 100%; object-fit: cover; }
        .desc-tarea { text-align: left !important; background: #f9f9f9; padding: 25px; border-radius: 12px; color: #555; font-size: 0.95rem; line-height: 1.7; margin-bottom: 25px; }
        
        /* FILA DE INFO - SIMETRÍA Y NIVELADO TOTAL */
        .wf-info-row { 
            display: table; 
            width: 100%; 
            table-layout: fixed; 
            border-spacing: 0;
            padding: 20px 0; 
            background: #fff; 
            border: 1px solid #eee; 
            border-radius: 12px;
        }
        .info-group { 
            display: table-cell; 
            width: 33.33%; 
            vertical-align: top; /* Alinea al tope de la celda */
            text-align: center;
            padding: 0 5px;
        }

        .info-label { 
            font-size: 0.65rem; 
            font-weight: 700; 
            color: #A3AED0; 
            text-transform: uppercase; 
            letter-spacing: 0.8px; 
            margin: 0 0 8px 0; /* Margen inferior fijo */
            display: block; 
            line-height: 1; /* Altura de línea controlada */
        }

        .info-value { 
            font-size: 0.95rem; 
            font-weight: 500; 
            display: inline-flex; 
            align-items: center; 
            justify-content: center;
            gap: 8px; 
            line-height: 1.2; 
        }

        .info-value i {
            display: flex;
            align-items: center;
            font-size: 1.05rem;
        }

        .timeline-ss { border-left: 2px solid #eee; padding-left: 20px; position: relative; margin-left: 10px; }
        .timeline-item { position: relative; margin-bottom: 25px; }
        .timeline-item::before { content: ''; position: absolute; left: -27px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--vibrant); border: 2px solid white; box-shadow: 0 0 0 2px var(--vibrant); }

/* Estilo para el Visor de Imágenes Ejj */
#modalVisor .modal-content { background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
#imgVisor { 
    max-width: 90vw; 
    max-height: 85vh; 
    object-fit: contain; /* Esto hace que la imagen se adapte sin deformarse */
    border-radius: 10px;

}
.btn-close-visor {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* Estilo para el Visor de Imágenes Ejj (Limpio y Transparente) */
#modalVisor .modal-content { 
    background: transparent; /* Fondo del contenido transparente */
}

/* Forzamos que el "telón" de Bootstrap también sea transparente */
#modalVisor .modal-backdrop {
    background-color: transparent !important;
    opacity: 0 !important;
}

#imgVisor { 
    max-width: 90vw; 
    max-height: 85vh; 
    object-fit: contain; /* Se adapta a la pantalla sin deformarse */
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3); /* Sombra suave para separar la imagen del fondo */
    margin: auto; /* Centrado automático */
    display: block;
}

/* Botón de cerrar sobre la imagen (blanco con sombra para que se vea) */
.btn-close-visor {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1051; /* Por encima de la imagen */
    padding: 0;
    line-height: 1;
}

/* Historial Estilo Timeline Ejj */
.timeline-ss { border-left: 2px solid #e9ecef; padding-left: 20px; position: relative; margin-left: 10px; }
.timeline-item { position: relative; margin-bottom: 30px; background: #fff; border-radius: 12px; padding: 15px; border: 1px solid #f0f0f0; transition: all 0.3s ease; }
.timeline-item:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

/* El puntito de la línea */
.timeline-item::before { 
    content: ''; position: absolute; left: -27px; top: 15px; width: 12px; height: 12px; 
    border-radius: 50%; background: #A3AED0; border: 2px solid white; box-shadow: 0 0 0 2px #f0f2f5; 
}

/* Colores según quién escribe */
.item-solicitante { border-left: 4px solid var(--vibrant); } /* Tu color */
.item-receptor { border-left: 4px solid #4a5568; } /* Color del trabajador */

/* Estilo para los mensajes de sistema (Cambios de estado) */
.msg-sistema { background: #f8fafc; font-style: italic; color: #64748b; border: 1px dashed #e2e8f0; }
.msg-sistema::before { background: #28a745; box-shadow: 0 0 0 2px #c6f6d5; }

.adjunto-preview { margin-top: 12px; padding: 8px; background: #f1f5f9; border-radius: 8px; display: inline-block; }

/* Contenedor tipo "Chat" para el historial */
.historial-scroll-container {
    max-height: 550px; /* Altura máxima de la caja (ajustable) */
    overflow-y: auto;  /* Habilita el scroll vertical */
    padding-right: 15px;
    padding-left: 5px;
    scrollbar-width: thin; /* Scroll fino para navegadores modernos */
    scrollbar-color: var(--vibrant) #f0f2f5;
}

/* Estilo del scroll para Chrome/Safari */
.historial-scroll-container::-webkit-scrollbar { width: 6px; }
.historial-scroll-container::-webkit-scrollbar-track { background: #f0f2f5; border-radius: 10px; }
.historial-scroll-container::-webkit-scrollbar-thumb { background: #ccd2e3; border-radius: 10px; }
.historial-scroll-container::-webkit-scrollbar-thumb:hover { background: var(--vibrant); }

/* Ajuste de los items para que se vean como burbujas */
.timeline-item { 
    position: relative; 
    margin-bottom: 15px; 
    background: #fff; 
    border-radius: 12px; 
    padding: 12px; 
    border: 1px solid #edf2f7; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* ==========================================================================
   REFUERZO DINÁMICO: SCROLL TRANSBORDADOR (COLOR MARCA)
   ========================================================================== */

/* Forzamos el contenedor para que el JS calcule bien el final */
.historial-scroll-container {
    display: block !important;
    overflow-y: auto !important;
    max-height: 550px;
    padding-right: 15px;
}

/* Personalización del Scrollbar con Variable PHP (Inyectada en el archivo) */
/* Nota: En el CSS maestro usamos variables, pero el color específico 
   lo sobreescribimos en la etiqueta <style> del archivo gestionartransbordador.php */

.historial-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.historial-scroll-container::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 10px;
}

.historial-scroll-container::-webkit-scrollbar-thumb {
    background: #ccd2e3; /* Color base grisáceo */
    border-radius: 10px;
}

/* Timeline Item para el Transbordador (Burbujas de chat) */
.timeline-item.msg-me {
    border-left: 4px solid var(--vibrant); /* Por defecto azul vibrante */
    background: #f8fbff;
}

/* Busca este bloque en tu style.css y asegúrate que esté así */
.aviso {
    border: none !important;
    border-radius: 15px !important;
    padding: 16px 24px !important;
    font-weight: 500 !important;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.aviso i { font-size: 1.25rem; margin-right: 12px; }

/* Los colores que me pasaste en tu archivo CSS */
.aviso-verde { background-color: #D1E9E3 !important; color: #004434 !important; } 
.aviso-amarillo { background-color: #FFF4CC !important; color: #664D03 !important; } 
.aviso-rojo { background-color: #FFF5F5 !important; color: #E31A1A !important; }
.aviso-azul { background-color: #E0F2FE !important; color: #0369A1 !important; }

/* --- KPI DASHBOARD --- */
.kpi-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #edf2f7;
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 5px 0;
}

.kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-diff {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

.diff-up { background: #e6fffa; color: #38a169; }
.diff-down { background: #fff5f5; color: #e53e3e; }

.progress {
    background-color: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}

.border-warning {
    border-color: #f59e0b !important;
}

.text-warning {
    color: #d97706 !important;
}

/* --- RESPONSIVE (MÓVIL AL FINAL) ------------------------------------------------------------------------------------------------------------- */ 
@media (max-width: 768px) {
    .sidebar { position: fixed; left: -280px; z-index: 2000; height: 100%; }
    .sidebar.show { left: 0; }
    .topbar { padding: 0 15px; }
    .logo-sub { font-size: 1.3rem; }
}

/* Scroll horizontal suave para las stats en móvil */ 
@media (max-width: 768px) {
    .custom-scroll-x {
        padding-left: 10px;
        padding-right: 10px;
        scroll-snap-type: x mandatory; /* Hace que se "pegue" al deslizar */
        -webkit-overflow-scrolling: touch;
    }
    .custom-scroll-x::-webkit-scrollbar {
        display: none; /* Oculta la barra en Chrome/Safari */
    }
    .flex-shrink-0 {
        scroll-snap-align: center;
    }
}

/* --- GESTIÓN RESPONSIVA RO AGENCIA --- */

/* Contenedor de Info Triple (Prioridad, Entrega, Falta) */
.wf-info-row-responsive {
    display: flex;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    gap: 10px;
}

.info-group-item {
    flex: 1;
    text-align: center;
}

/* Ajustes para Celular */
@media (max-width: 768px) {
    .header-gestion-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    
    .status-badge-mobile {
        width: 100%;
        text-align: center;
        order: -1; /* Pone el estado arriba del logo en móvil si quieres, o quita esto para dejarlo abajo */
    }

    .wf-info-row-responsive {
        flex-direction: column; /* Apila los 3 cuadros uno encima de otro */
        gap: 0;
    }

    .info-group-item {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .info-group-item:last-child {
        border-bottom: none;
    }
    
    .desc-tarea {
        font-size: 0.85rem !important;
        padding: 15px !important;
    }
}

/* --- BOTÓN FLOTANTE NOTIFICACIONES --- */
#btn-push-flotante {
    display: none !important; /* OCULTO EN PC POR DEFECTO */
    position: fixed;
    bottom: 30px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #363062;
    color: #ffffff !important;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    z-index: 99999;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ------------------------------------------------ Encuestas */

.ss-encuesta-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 280px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    z-index: 10000;
    padding: 20px;
    border-top: 6px solid #4318FF;
    animation: ssBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes ssBounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.btn-voto-ss { 
    width: 100%; border: none; border-radius: 12px; padding: 10px; margin-bottom: 8px;
    font-weight: 700; font-size: 0.8rem; transition: 0.3s;
}
.btn-voto-a { background: #F4F7FE; color: #4318FF; }
.btn-voto-a:hover { background: #4318FF; color: #fff; }
.btn-voto-b { background: #F4F7FE; color: #01B574; }
.btn-voto-b:hover { background: #01B574; color: #fff; }

/* SOLO SE MUESTRA EN MÓVILES (Menos de 768px) */
@media (max-width: 767px) {
    #btn-push-flotante {
        display: flex !important; /* SE ACTIVA SOLO EN CELULAR */
    }
}

/* Estados de color */
#btn-push-flotante.desactivado {
    background-color: #e74c3c;
    animation: pulso-notif 2s infinite;
}

/* Clase para detener la vibración cuando ya está activo */
.sin-latencia {
    animation: none !important;
    box-shadow: none !important;
}

/* Aseguramos que el verde sea el de sub.stacion */
#btn-push-flotante.activado {
    background-color: #2ecc71 !important;
}

#btn-push-flotante.activado {
    background-color: #2ecc71;
}

@keyframes pulso-notif {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); transform: scale(1); }
    70% { box-shadow: 0 0 0 15px rgba(231, 76, 60, 0); transform: scale(1.05); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); transform: scale(1); }
}

/* --- RESPONSIVE FIXES SUB.STACION --- */

/* Arreglo para el grid de marcas (Radar de Staciones) */
@media (max-width: 768px) {
    .ss-radar-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* Fuerza 2 columnas */
        gap: 10px !important;
    }
    
    .ss-stacion-card {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Evitar que las alertas del dashboard se peguen */
    .radar-alerts-container .alert {
        margin-bottom: 15px !important; /* Espacio extra entre notificaciones */
        flex-direction: column; /* En móvil, botón abajo del texto */
        align-items: flex-start !important;
        gap: 10px;
    }

    .radar-alerts-container .alert a {
        width: 100%; /* Botón ancho completo en móvil */
        text-align: center;
    }
    
    /* Sidebar en móvil */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1060;
        transition: 0.3s;
    }
    .sidebar.show {
        left: 0;
    }
}

.btn-reprogramar-ss { background: #fff; color: #2B3674; border: 1.5px solid #E0E5F2; border-radius: 12px; padding: 10px; font-weight: 700; font-size: 0.75rem; margin-top: 10px; transition: 0.3s; width: 100%; }
.btn-reprogramar-ss:hover { background: #f8f9fa; border-color: #2B3674; }
.btn-emergencia-ss { background: #FFF5F5; color: #E53E3E; border: 1.5px solid #FEB2B2; border-radius: 12px; padding: 12px; font-weight: 800; font-size: 0.75rem; margin-top: 10px; animation: pulse-red 2s infinite; width: 100%; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.2); } 70% { box-shadow: 0 0 0 10px rgba(229, 62, 62, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0); } }

/* Ajuste general para el contenedor de la página en móvil */
.content-page {
    padding: 15px !important;
}

.k-card {
    padding: 15px !important;
}