/* ==========================================================================
   VARIABLES GLOBALES Y TEMA DE BOOTSTRAP
   ========================================================================== */
:root {
    /* Color verde oscuro corporativo */
    --bs-primary: #00443F;
    --bs-primary-rgb: 0, 68, 63;

    /* Variable personalizada para estados hover */
    --custom-primary-hover: #002b28;
}

/* ==========================================================================
   TIPOGRAFÍA GLOBAL
   ========================================================================== */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
div,
li,
button,
input,
select,
textarea,
.navbar-brand {
    font-family: 'Raleway', sans-serif !important;
}

/* Forzar colores de fondo y texto base */
.bg-primary {
    background-color: var(--bs-primary) !important;
}

.text-primary {
    color: var(--bs-primary) !important;
}

/* Botones principales */
.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
    transition: all 0.4s ease-in-out;
}

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


/* ==========================================================================
   COMPONENTE: NAVBAR PREMIUM (GLASSMORPHISM)
   ========================================================================== */
   
/* 1. La barra principal flotante */
.premium-glass-navbar {
    background: rgba(var(--bs-primary-rgb), 0.92) !important; /* Verde corporativo translúcido */
    backdrop-filter: blur(12px); /* Efecto cristal desenfocado */
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15); /* Sombra suave para separar del fondo */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 2. Logo y Texto de Marca */
.brand-logo-wrapper {
    background-color: #ffffff;
    padding: 4px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.premium-glass-navbar .navbar-brand:hover .brand-logo-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.brand-text {
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 3. Botones de Navegación (Píldoras) */
.nav-custom-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent; /* Preparar borde invisible para el hover */
}

/* Hover: Se convierte en una píldora blanca translúcida */
.nav-custom-link:hover, .nav-custom-link:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Active: Cuando el usuario está en esa página */
.nav-custom-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* 4. Botones Circulares (Notificaciones) */
.btn-glass-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-glass-icon:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Animación de latido suave para las notificaciones rojas */
@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(220, 53, 69, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}
.notification-pulse {
    animation: pulse-red 2s infinite;
}

/* 5. Botón del Menú de Usuario (Perfil) */
.user-profile-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Ocultamos la flechita por defecto del dropdown */
.dropdown-toggle::after { display: none !important; }

/* 6. Diseño de los Menús Desplegables (Dropdowns) */
.custom-dropdown-menu {
    border-top: 4px solid var(--bs-primary) !important; /* Acento verde arriba */
    padding-top: 0;
    overflow: hidden;
}

.custom-dropdown-item {
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 8px; /* Separación de los bordes laterales */
}

.custom-dropdown-item:hover {
    background-color: #f0fdf4 !important; /* Un verde muuuuy clarito */
    transform: translateX(5px); /* Pequeño salto a la derecha */
}

.custom-dropdown-item.text-danger:hover {
    background-color: #fff5f5 !important; /* Rojito suave para el botón de cerrar sesión */
}

/* 7. Utilidad rápida de transición general */
.transition-all { transition: all 0.3s ease-in-out; }


/* ==========================================================================
   COMPONENTE: KANBAN BOARD (.kanban)
   ========================================================================== */
/* Tarjeta individual */
.kanban-card {
    border-radius: 12px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    background-color: #ffffff;
}

/* Efecto al pasar el ratón: Flotado suave y sombra */
.kanban-card:hover {
    transform: translateY(-4px);
    /* Sustituimos scale por translateY, es más nítido */
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
    z-index: 10;
}

/* Opcional: Columnas del tablero (si quieres darles un fondo gris suave) */
.kanban-column {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    height: 100%;
}

.kanban-group-header {
        transition: all 0.2s ease;
        border-radius: 6px;
    }
    .kanban-group-header:hover {
        background-color: rgba(0,0,0,0.03);
    }
    .transition-transform { transition: transform 0.3s ease; }
    .kanban-group-header.collapsed .chevron-icon { transform: rotate(-90deg); }
    

/* ==========================================================================
   COMPONENTE: DASHBOARD RIESGOS (.dash-risk)
   ========================================================================== */

/* 1. Tarjeta principal */
.dash-risk-card {
    background-color: #ffffff !important;
    /* Aseguramos fondo blanco puro */
    border-left: 4px solid #dc3545 !important;
    /* Borde izquierdo rojo para indicar atención */
}

/* 2. Encabezado de la tarjeta */
.dash-risk-header {
    background-color: #ffffff;
    color: #212529;
    /* Texto gris muy oscuro, excelente contraste */
    border-bottom: 1px solid #f8f9fa;
    /* Línea separadora muy sutil */
}

.dash-risk-header i {
    color: #dc3545;
    /* Icono del triángulo en rojo */
}

/* 3. Cada fila de la lista de usuarios */
.dash-risk-item {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e9ecef;
    /* Separador sutil entre personas */
    transition: background-color 0.2s ease-in-out;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Quitar el borde de la última fila para que quede limpio abajo */
.dash-risk-item:last-child {
    border-bottom: none;
}

/* Efecto al pasar el ratón por encima de la fila */
.dash-risk-item:hover {
    background-color: #fff5f5 !important;
    /* Un fondo rojizo/rosado muuuuy suave */
}

/* El icono del usuario */
.dash-risk-item .icon-user {
    color: #858c93;
    /* Gris medio */
}

/* 4. El enlace con el nombre del usuario */
.dash-risk-link {
    color: #2b3035;
    /* Texto oscuro por defecto */
    transition: color 0.2s ease-in-out;
}

/* Efecto hover en el nombre del usuario */
.dash-risk-link:hover {
    color: var(--bs-primary);
    /* Cambia al verde corporativo de tu marca al pasar el mouse */
    text-decoration: underline !important;
}

/* 5. La burbuja con el número de tareas */
.dash-risk-badge {
    background-color: #dc3545;
    /* Fondo rojo sólido */
    color: #ffffff;
    /* Número en blanco */
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
    /* Pequeña sombra roja para darle efecto 3D */
}

/* ==========================================================================
   COMPONENTE: DESPLEGABLES GLOBALES (.select-corporate)
   ========================================================================== */

/* 1. Estilo para el select estándar de HTML (Si decides no usar Select2) */
.select-corporate {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select-corporate:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
    outline: 0;
}

/* 2. Domando a Select2 (Haciendo que combine con Bootstrap y tu marca) */
.select2-container--classic .select2-selection--single,
.select2-container--default .select2-selection--single {
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    height: 38px !important;
    /* Altura estándar de los inputs de Bootstrap */
    padding: 4px 6px !important;
    background-image: none !important;
    /* Quita el degradado viejo de Select2 */
    background-color: #ffffff !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

/* Color del borde y sombra al hacer clic (Focus) */
.select2-container--classic.select2-container--open .select2-selection--single,
.select2-container--classic.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25) !important;
}

/* Color verde corporativo al pasar el ratón por las opciones de la lista */
.select2-container--classic .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   5. MODERNIZANDO LA FLECHA DEL DESPLEGABLE (SELECT2)
   ========================================================================== */

/* A. Ocultar el triángulo viejo y tosco por defecto */
.select2-container--classic .select2-selection--single .select2-selection__arrow b,
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none !important;
}

/* B. Reemplazar el contenedor por un icono SVG moderno (Estilo Bootstrap 5) */
.select2-container--classic .select2-selection--single .select2-selection__arrow,
.select2-container--default .select2-selection--single .select2-selection__arrow {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 14px 14px !important;
    /* Tamaño del icono */
    border-left: none !important;
    /* Quita la línea gris vertical */
    background-color: transparent !important;
    /* Quita el fondo gris degradado */
    width: 30px !important;
    transition: transform 0.3s ease-in-out !important;
    /* Animación de giro */
}

/* C. Animación: Girar la flecha 180 grados cuando el menú se abre */
.select2-container--open .select2-selection--single .select2-selection__arrow {
    transform: rotate(-180deg) !important;
}

/* D. Quitar el "brillo" extraño que le pone Select2 classic al abrirse */
.select2-container--classic.select2-container--open .select2-selection--single {
    background-image: none !important;
}


/* ==========================================================================
   COMPONENTE: VISTAS DE DETALLE (TAREAS Y SOLICITUDES)
   ========================================================================== */

/* 1. Caja de texto descriptivo (Lectura cómoda) */
.detail-text-box {
    background-color: #f8f9fa;
    /* Gris muy claro y limpio */
    border: 1px solid #e9ecef;
    /* Borde súper sutil */
    border-radius: 10px;
    /* Bordes amigables */
    padding: 1.25rem;
    color: #495057;
    /* Texto oscuro pero no negro (fatiga menos la vista) */
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 2. Etiquetas modernas (Reemplaza a los viejos badges cuadrados) */
.tag-modern {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    background-color: rgba(var(--bs-primary-rgb), 0.08);
    /* Fondo verde muuuuy transparente */
    color: var(--bs-primary);
    /* Texto verde corporativo */
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    /* Borde verde suave */
    border-radius: 50rem;
    /* Estilo píldora circular perfecta */
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    /* Sombreado microscópico */
}

/* Ajuste para el icono dentro de la etiqueta */
.tag-modern i {
    margin-right: 0.4rem;
    font-size: 1.05rem;
}

/* Variante de etiqueta para elementos secundarios (como usuarios) */
.tag-modern.tag-secondary {
    background-color: #ffffff;
    color: #6c757d;
    border-color: #dee2e6;
}


/* ==========================================================================
   COMPONENTE: FILTROS DE TIEMPO (CONTROL SEGMENTADO MODERNO)
   ========================================================================== */
.filter-group-modern {
    display: inline-flex;
    background-color: #e9ecef;
    /* Cápsula gris suave de fondo */
    border-radius: 50rem;
    /* Forma de píldora total */
    padding: 0.3rem;
    /* Espacio para que los botones "respiren" adentro */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Profundidad interior sutil */
}

.filter-btn-modern {
    border: none;
    background: transparent;
    color: #6c757d;
    /* Texto gris para los inactivos */
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 1.2rem;
    border-radius: 50rem;
    /* Botón en forma de píldora */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    /* Animación muy suave */
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Efecto al pasar el ratón por los botones inactivos */
.filter-btn-modern:hover:not(.active) {
    color: var(--bs-primary);
    background-color: rgba(0, 0, 0, 0.03);
}

/* El botón activo (El que está seleccionado) */
.filter-btn-modern.active {
    background-color: var(--bs-primary);
    /* Tu verde corporativo */
    color: #ffffff;
    /* Texto blanco */
    box-shadow: 0 3px 6px rgba(var(--bs-primary-rgb), 0.3);
    /* Sombra para que parezca flotar */
}

/* ==========================================================================
   COMPONENTE: NOTIFICACIONES PREMIUM (.premium-glass-alert)
   ========================================================================== */

/* Variables de color específicas para la notificación (inspiradas en tu verde) */
:root {
    --emerald-green-bright: #10B981; /* Verde esmeralda vivo y moderno */
    --emerald-green-neon: rgba(16, 185, 129, 0.9); /* Transparente para efectos neon */
}

/* 1. La tarjeta base (Con efecto de desenfoque/glassmorphism) */
.premium-glass-alert {
    background: rgba(255, 255, 255, 0.8) !important; /* Fondo blanco semi-transparente */
    backdrop-filter: blur(10px); /* ¡ESTA ES LA MAGIA! Desenfoque de fondo */
    -webkit-backdrop-filter: blur(10px); /* Soporte para Safari */
    border: none !important; /* Quitamos bordes Bootstrap */
    border-radius: 12px !important; /* Bordes redondeados modernos */
    position: relative;
    overflow: hidden; /* Para que la barra de progreso no se escape */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important; /* Sombra suave pero profunda */
}

/* 2. Barra de acento lateral izquierdo (color vivo) */
.alert-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
}

/* 3. Colores de acento según el tipo de alerta (Success/Error) */
.success-alert .alert-accent-bar { background-color: var(--emerald-green-bright); }
.error-alert .alert-accent-bar { background-color: #dc3545; } /* Rojo Bootstrap */

/* 4. Contenedor del icono (Con efecto neón verde suave) */
.alert-icon-container {
    color: var(--emerald-green-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.success-alert .alert-icon-container::after {
    content: '';
    position: absolute;
    width: 45px; height: 45px;
    background-color: var(--emerald-green-neon);
    border-radius: 50%;
    filter: blur(10px); /* Brillo neón suave */
    opacity: 0.3;
    z-index: -1;
}

/* Colores de icono para error */
.error-alert .alert-icon-container { color: #dc3545; }
.error-alert .alert-icon-container::after { display: none; } /* Sin neón en error */

/* 5. Estilos de texto (Título y mensaje) */
.alert-title {
    font-size: 0.95rem;
    line-height: 1.2;
}

.alert-message {
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Botón de cerrar (Camuflado pero visible) */
.premium-glass-alert .btn-close {
    opacity: 0.4;
    font-size: 0.8rem;
}

.premium-glass-alert .btn-close:hover {
    opacity: 1;
}

/* 6. Barra de progreso inferior (Animada) */
.alert-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%; /* Empieza en 0 */
    height: 3px; /* Muy delgadita y elegante */
    transition: width 3s linear; /* ¡ESTO DEBE COINCIDIR CON EL JS! */
}

/* Colores de barra según el tipo */
.success-alert .alert-progress-bar { background-color: var(--emerald-green-bright); }
.error-alert .alert-progress-bar { background-color: #dc3545; }


/* ==========================================================================
COMPONENTE: BOTÓN FLOTANTE ANALÍTICA (MEDIO DERECHA)
========================================================================== */

/* Contenedor posicionado exactamente a la mitad vertical */
.fab-container-right-middle {
position: fixed;
top: 30%; /* Lo empuja a la mitad de la pantalla */
right: 20px; /* Mantiene la misma alineación que tu botón inferior */
transform: translateY(-50%); /* Ajuste fino para que el centro del botón sea el centro exacto */
z-index: 1000;
}

/* Estilos de color y efectos premium para el botón naranja */
.analytics-btn {
background-color: #fd7e14; /* Naranja vibrante y corporativo */
color: #ffffff;
border: none;
/* Suaviza la transición de la sombra y el movimiento */
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

/* Efecto hover moderno y profesional (sobrescribe el scale(1.4) general para que sea más elegante) */
.analytics-btn:hover {
background-color: #e86e04; /* Un naranja ligeramente más oscuro */
color: #ffffff;
/* Escalado más sutil (1.15) con una leve elevación (-3px) */
transform: scale(1.15) translateY(-3px) !important;
/* Sombra naranja brillante para darle un efecto "Glow" o neón suave */
box-shadow: 0 10px 20px rgba(253, 126, 20, 0.4) !important;
}

/* ==========================================================================
   COMPONENTE: INSIGNIAS DE RESPONSABILIDAD (OWNERSHIP BADGES)
   ========================================================================== */

/* Contenedor principal de la sección de asignación */
.assignment-box {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

/* Un sutil acento visual en el borde superior izquierdo */
.assignment-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--bs-primary);
    border-radius: 12px 0 0 12px;
}

/* Insignia del Líder (La Estrella del Show) */
.leader-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #00665e 100%);
    color: #ffffff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 50rem;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(var(--bs-primary-rgb), 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.3px;
}

.leader-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--bs-primary-rgb), 0.4);
}

.leader-badge i.crown-icon {
    color: #ffc107; /* Amarillo brillante para la corona/estrella */
    font-size: 1.2rem;
    margin-right: 0.5rem;
    filter: drop-shadow(0 0 2px rgba(255, 193, 7, 0.5));
}

/* Insignia de los colaboradores (Elegante pero secundaria) */
.collaborator-badge {
    display: inline-flex;
    align-items: center;
    background-color: #ffffff;
    color: #495057;
    padding: 0.4rem 1rem;
    border-radius: 50rem;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
}

.collaborator-badge i {
    color: #adb5bd;
    margin-right: 0.4rem;
}

.collaborator-badge:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
    transform: translateY(-1px);
}

/* Etiqueta de "Sin asignar" (Llama a la acción sutilmente) */
.unassigned-badge {
    display: inline-flex;
    align-items: center;
    background-color: #fff3cd; /* Fondo amarillo muy suave */
    color: #856404; /* Texto mostaza oscuro */
    padding: 0.5rem 1.25rem;
    border-radius: 50rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px dashed #ffe8a1;
}

.unassigned-badge i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* ==========================================================================
   UTILIDADES: ANIMACIONES Y EFECTOS GLOBALES
   ========================================================================== */

/* Zoom sutil (3%) y elevación para botones o tarjetas pequeñas */
.hover-zoom-sm {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hover-zoom-sm:hover {
    transform: scale(1.1) translateY(-2px) !important;
    /* Sombra basada en tu verde corporativo con transparencia */
    box-shadow: 0 10px 20px rgba(0, 68, 63, 0.25) !important;
}

/* raiz/static/css/style.css */

/* ... resto de tu CSS anterior ... */

/* ==========================================================================
   Estilos para Solicitudes Esperando Aprobación (Maker-Checker)
   ========================================================================== */
   
.waiting-approval-row td {
    /* Un fondo ámbar extremadamente sutil (98% transparencia) */
    background-color: rgba(245, 158, 11, 0.02) !important;
    position: relative;
}

/* Indicador visual de borde izquierdo distintivo */
.waiting-approval-row td:first-child {
    box-shadow: inset 4px 0 0 -1px #ff0000; /* Color Ámbar */
    padding-left: 1rem; /* Ajuste ligero para que el texto no pegue al borde */
}

/* Opcional: Hacer el badge un poco más llamativo en esta fila */
.waiting-approval-row .badge.esperando-aprobacion {
    background-color: #f59e0b;
    color: #fff;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   COMPONENTE: PAGE LOADER / TRANSICIÓN UX
   ========================================================================== */
.page-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 999999; /* Por encima de la navbar flotante */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

/* Clase que aplicaremos por JS para ocultarlo suavemente */
.page-loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Soporte para tu Dark Mode */
[data-bs-theme="dark"] .page-loader-overlay {
    background-color: #121212;
}

/* ==========================================================================
   COMPONENTE: BOTÓN FLOTANTE REPORTE DE HORAS (VIBRANTE & MODERNO)
   ========================================================================== */

.report-hours-btn {
    /* Gradiente azul profundo a eléctrico */
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    position: relative;
    overflow: hidden; /* Necesario para el efecto de brillo */
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Efecto de elevación y resplandor al pasar el mouse */
.report-hours-btn:hover {
    transform: scale(1.15) translateY(-5px) !important;
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.6) !important;
    filter: brightness(1.1);
}

/* --- ANIMACIÓN DE BRILLO (SHIMMER) --- */
/* Crea un rayo de luz que recorre el botón periódicamente */
.report-hours-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%; /* Empieza fuera del botón */
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer-btn 5s infinite;
}

@keyframes shimmer-btn {
    0% { left: -150%; }
    15% { left: 150%; } /* El brillo pasa rápido */
    100% { left: 150%; } /* Espera el resto del tiempo */
}

/* Adaptación para Modo Oscuro: Brillo más intenso */
[data-bs-theme="dark"] .report-hours-btn {
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* ==========================================================================
   COMPONENTE: FULLCALENDAR (REPORTE DE HORAS)
   ========================================================================== */

/* 1. Variables globales de FullCalendar (Sobrescribiendo el tema por defecto) */
:root {
    --fc-border-color: #e5e7eb;
    --fc-daygrid-event-dot-width: 8px;
    --fc-today-bg-color: rgba(0, 68, 63, 0.05); /* Un verde corporativo muy, muy transparente */
    
    /* Colores de los botones superiores (Mes, Semana, Hoy) */
    --fc-button-bg-color: #ffffff;
    --fc-button-border-color: #d1d5db;
    --fc-button-text-color: #374151;
    --fc-button-hover-bg-color: #f3f4f6;
    --fc-button-hover-border-color: #d1d5db;
    
    /* Botón activo (El que está seleccionado) usando tu color primario */
    --fc-button-active-bg-color: var(--bs-primary);
    --fc-button-active-border-color: var(--bs-primary);
    --fc-button-active-text-color: #ffffff;
}

/* 2. Redondear y estilizar la botonera superior */
.fc .fc-button {
    border-radius: 8px !important;
    text-transform: capitalize;
    font-weight: 600 !important;
    padding: 0.4rem 1rem !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    transition: all 0.2s ease-in-out;
}

.fc .fc-button-group > .fc-button {
    border-radius: 0 !important;
}
.fc .fc-button-group > .fc-button:first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}
.fc .fc-button-group > .fc-button:last-child {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

/* Título del calendario (Ej: "4 - 10 May 2026") */
.fc .fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1f2937;
}

/* 3. Ajustes de la cuadrícula y horas */
.fc-theme-standard th {
    padding: 8px 0;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b7280;
}
.fc-timegrid-slot-label-cushion {
    font-weight: 600;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* 4. Estilos para los Eventos Regulares (Los reportes locales) */
.fc-v-event {
    border-radius: 6px !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2px 4px;
    transition: transform 0.2s;
}
.fc-v-event:hover {
    transform: scale(1.02);
    z-index: 10 !important; /* Para que resalte sobre los de Google al pasar el mouse */
}

/* 5. Estilo "Fantasma" para los eventos de Google Calendar */
.google-event-ghost {
    /* Patrón de rayas diagonales para indicar que es de "referencia" */
    background: repeating-linear-gradient(
        45deg,
        #f1f5f9,
        #f1f5f9 10px,
        #e2e8f0 10px,
        #e2e8f0 20px
    ) !important;
    border: 1px dashed #94a3b8 !important;
    color: #475569 !important;
    opacity: 0.85;
    box-shadow: none !important;
}
.google-event-ghost .fc-event-main {
    color: #475569 !important;
    font-weight: 500;
}
.google-event-ghost:hover {
    opacity: 1;
    border-style: solid !important;
    border-color: #64748b !important;
}


/* ==========================================================================
   ADAPTACIÓN PARA EL MODO OSCURO
   ========================================================================== */
[data-bs-theme="dark"] .fc {
    --fc-border-color: #374151;
    --fc-today-bg-color: rgba(255, 255, 255, 0.03);
    
    --fc-button-bg-color: #1f2937;
    --fc-button-border-color: #374151;
    --fc-button-text-color: #d1d5db;
    --fc-button-hover-bg-color: #374151;
}

[data-bs-theme="dark"] .fc .fc-toolbar-title {
    color: #f3f4f6;
}
[data-bs-theme="dark"] .fc-theme-standard th,
[data-bs-theme="dark"] .fc-timegrid-slot-label-cushion {
    color: #9ca3af;
}

/* Fantasma de Google en Modo Oscuro */
[data-bs-theme="dark"] .google-event-ghost {
    background: repeating-linear-gradient(
        45deg,
        #1e293b,
        #1e293b 10px,
        #0f172a 10px,
        #0f172a 20px
    ) !important;
    border-color: #475569 !important;
    color: #94a3b8 !important;
}
[data-bs-theme="dark"] .google-event-ghost .fc-event-main {
    color: #cbd5e1 !important;
}