/* ==========================================================================
   13. MÓDULO: SURVEYS / CUESTIONARIOS (NIVEL 3)
   ========================================================================== */

/* Contenedor de la Pregunta */
.question-block {
    opacity: 0; /* Para animación de entrada */
    animation: fadeUp 0.5s ease-out forwards;
}

/* --- TARJETAS DE SELECCIÓN (Radio y Checkbox) --- */
/* Ocultamos el input nativo pero mantenemos la accesibilidad */
.custom-input-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.custom-input-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* El contenedor visual de la opción */
.custom-input-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-btn);
    transition: all 0.2s ease-in-out;
    margin-bottom: 0.5rem;
}

.custom-input-label:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    transform: translateX(5px);
}

/* Estado SELECCIONADO (Radio/Check) */
.custom-input-card input:checked + .custom-input-label {
    background-color: #e8f0fe; /* Fondo azul muy suave */
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(13, 71, 161, 0.1);
}

/* Indicadores visuales (Círculo o Cuadrado) */
.input-indicator {
    height: 20px;
    width: 20px;
    border: 2px solid #adb5bd;
    background-color: #fff;
    margin-right: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-indicator.radio { border-radius: 50%; }
.input-indicator.check { border-radius: 4px; }

/* Indicador Activo */
.custom-input-card input:checked + .custom-input-label .input-indicator {
    border-color: var(--primary);
    background-color: var(--primary);
}

/* El punto dentro del Radio o el Check */
.custom-input-card input:checked + .custom-input-label .input-indicator::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.custom-input-card input:checked + .custom-input-label .input-indicator.check::after {
    content: '✓'; /* Check simple */
    background: transparent;
    color: white;
    font-size: 14px;
    line-height: 1;
    font-weight: bold;
    width: auto; height: auto;
    border-radius: 0;
}

/* --- BOTONES DE ESCALA (1-5) --- */
.scale-container {
    display: flex;
    gap: 10px;
}

.scale-btn-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    background-color: #fff;
    border: 1px solid var(--primary);
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all 0.2s;
}

.scale-btn-label:hover {
    background-color: #e8f0fe;
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.custom-input-card input:checked + .scale-btn-label {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}


/* --- LISTA DE TAREAS EN WIDGET (Tarjeta Amarilla/Pendientes) --- */
.widget-task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.widget-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.6); /* Blanco semitransparente */
    border: 1px solid rgba(0,0,0,0.05);
    padding: 8px 12px;
    border-radius: var(--radius-btn);
    text-decoration: none;
    color: #856404; /* Color texto warning oscuro */
    transition: all 0.2s;
}

.widget-task-item:hover {
    background-color: #fff;
    transform: translateX(3px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    color: #533f03;
}

.widget-task-icon {
    font-size: 1.1rem;
    margin-right: 8px;
    opacity: 0.7;
}

/* Cuando solo hay 1 item y queremos destacarlo mucho */
.widget-task-single {
    background-color: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    display: block; /* Ocupa todo el ancho */
}


/* --- FIX DE ALTURA PARA DASHBOARD KIOSCO --- */
/* Esta clase fuerza a cualquier tarjeta a medir lo mismo que los módulos (340px) */
.h-module-fix {
    height: 340px !important;
    display: flex;
    flex-direction: column;
}

/* Si aplicamos esto a un wrapper, forzamos al widget hijo a expandirse */
.h-module-fix .widget-card {
    height: 100% !important;
    min-height: 100% !important;
    display: flex;
    flex-direction: column;
}

/* Asegura que el contenido interno (listas) ocupe el espacio disponible */
.h-module-fix .widget-card .card-body,
.h-module-fix .widget-card .results-list,
.h-module-fix .widget-card .widget-task-list {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra verticalmente si hay poco contenido */
}

/* Ajuste específico para que la lista de resultados scrollee si es muy larga */
.h-module-fix .widget-card .results-list {
    justify-content: flex-start;
    overflow-y: auto;
}


/* --- ESTILOS DEL CARRUSEL LANDING --- */
.landing-carousel {
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

.landing-carousel-item {
    height: 400px; /* Altura fija para uniformidad */
    position: relative;
}

.landing-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradiente oscuro para que el texto blanco se lea siempre */
.landing-carousel-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem 2rem 2rem 2rem;
    color: white;
    text-align: left;
}


/* --- WIDGET CUMPLEAÑOS (Personalizable) --- */
.widget-birthdays {
    /* Borde izquierdo usa la variable de acento */
    border-left-color: var(--color-accent) !important; 
}

.birthday-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-btn);
    transition: background 0.2s;
}

.birthday-item:hover {
    background-color: var(--bg-body); /* O usa un gris muy suave */
}

.birthday-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
}

/* Fallback para avatar sin foto (Iniciales) */
.birthday-avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--bg-body);
    color: var(--text-muted);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold;
    font-size: 1.1rem;
}

.birthday-info h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.birthday-date {
    font-size: 0.75rem;
    color: var(--color-accent); /* Usa variable */
    font-weight: 600;
    background: var(--color-accent-subtle); /* Usa variable */
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 2px;
}

/* Estado "Hoy" (Destacado) */
.birthday-today {
    background: linear-gradient(45deg, var(--color-accent-hover), #fff);
    border: 1px solid var(--color-accent-subtle);
}

.birthday-today .birthday-date {
    background: var(--color-accent); /* Fondo sólido del color acento */
    color: white;
    animation: pulse-subtle 2s infinite;
}

/* Ajuste al Hero para que use las variables de sombra */
.hero-content {
    background: linear-gradient(to top, var(--hero-overlay-start) 0%, rgba(0,0,0,0.4) 60%, var(--hero-overlay-end) 100%);
}


/* ==========================================================================
   NUEVO DASHBOARD EJECUTIVO (ADD-ON)
   ========================================================================== */

/* 1. Summary Cards (KPIs Superiores) */
.summary-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

/* Barra lateral sutil para indicar tipo (reemplaza al borde grueso) */
.summary-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}
.summary-card.type-primary::before { background-color: var(--primary); }
.summary-card.type-warning::before { background-color: var(--warning); }
.summary-card.type-success::before { background-color: var(--success); }
.summary-card.type-info::before { background-color: var(--info); }

.summary-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
/* Fondos suaves para los iconos */
.bg-soft-primary { background-color: rgba(13, 71, 161, 0.1); color: var(--primary); }
.bg-soft-warning { background-color: rgba(255, 193, 7, 0.15); color: #856404; }
.bg-soft-success { background-color: rgba(25, 135, 84, 0.1); color: var(--success); }
.bg-soft-info { background-color: rgba(13, 202, 240, 0.1); color: #0c9ebc; }

.summary-data h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    color: var(--text-main);
}
.summary-data span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 2. Carrusel Ejecutivo */
.carousel-executive {
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}
.carousel-executive .carousel-item {
    height: 380px; /* Altura fija para consistencia */
}
.carousel-executive img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-caption-executive {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    color: white;
    text-align: left;
}

/* 3. Sidebar Limpio (Unified Widget) */
.widget-clean {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.widget-clean-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}
.widget-clean-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    margin: 0;
}

/* --- WIDGET CUMPLEAÑOS MEJORADO --- */

/* Estilo del Recuadro de Fecha (Día sobre Mes) */
.date-box {
    width: 45px;          /* Ancho fijo para alineación perfecta */
    padding: 6px 2px;     /* Espaciado interno */
    flex-shrink: 0;       /* Evita que se aplaste si el nombre es largo */
    transition: all 0.2s ease;
}

/* Efecto Hover en la fila */
.birthday-row {
    transition: background-color 0.2s, transform 0.2s;
}

/* Solo las filas normales (no hoy) cambian al pasar el mouse */
.birthday-row:not(.birthday-today-highlight):hover {
    background-color: #f8f9fa !important;
    transform: translateX(3px);
}

/* Estilo Especial para HOY (Ya lo tenías, pero ajustado para este layout) */
.birthday-today-highlight {
    background: linear-gradient(to right, #fff5f5, #fff); /* Degradado rojo muy suave */
    border-left: 4px solid var(--danger);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

/* Scrollbar personalizado para la lista (delgado y elegante) */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Corrección para botones del carrusel */
.carousel-caption-executive a.btn {
    position: relative; /* Necesario para que z-index funcione */
    z-index: 1000;      /* Asegura que esté por encima de la imagen y los indicadores */
    pointer-events: auto; /* Fuerza que el botón reciba el clic */
}

/* Aseguramos que el contenedor de texto no bloquee los clics si cubre mucho espacio */
.carousel-caption-executive {
    pointer-events: none; /* El contenedor transparente deja pasar el clic... */
}

/* ...pero reactivamos los clics para el texto y los botones dentro de él */
.carousel-caption-executive h2,
.carousel-caption-executive p,
.carousel-caption-executive span {
    pointer-events: auto;
}





/* ==========================================================================
   KIOSCO LOGIN & WIDGETS (CORREGIDO)
   ========================================================================== */

/* 1. Altura Unificada */
.kiosco-widget-fixed {
    min-height: 450px;
    height: 100%;
}

/* 2. Overlay del Carrusel */
.kiosco-carousel-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 15%, rgba(0,0,0,0.4) 50%, transparent 100%);
    pointer-events: none; /* Deja pasar clicks generales */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    text-align: left;
    z-index: 10; 
}

/* 3. Contenido dentro del Carrusel (Texto y Botones) */
.kiosco-carousel-content {
    pointer-events: auto; /* Reactiva clicks */
    margin-bottom: 1.5rem;
    position: relative;
    /* FIX CRÍTICO: Z-Index 30 para estar POR ENCIMA de las flechas (que tienen 20) */
    z-index: 30; 
}

/* 4. Controles (Flechas) */
.carousel-control-prev,
.carousel-control-next,
.carousel-indicators {
    z-index: 20; 
}




