/**
 * 🛰️ GPS: COMPONENTES INSTITUCIONALES (V2.1 - GRID EDITION)
 * Neuropedagogía: Diseño basado en tarjetas para reducir fatiga visual.
 * Auditoría Nómina: Interfaz clara para evitar errores en Art. 161 CST.
 */

/* --- BOTONES --- */
.btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 86, 179, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary { background-color: #6c757d; color: white; }

.btn-outline {
    background-color: transparent;
    border: 1px solid #dee2e6;
    color: var(--text-main);
}










/* Botón Proyectar */

/* 1. ESTADO BASE: El botón cuando NO está listo (Desactivado) */
.btn-proyectar {
    /* 1. FORZAMOS EL COLOR AZUL */
    background-color: #007bff !important; /* El !important vence al estilo gris por defecto */
    color: white !important;
    
    /* 2. FORZAMOS LA VISIBILIDAD */
    opacity: 1 !important; /* Esto anula el "opacity: 0.5" que tienes en el HTML */
    cursor: pointer !important; /* Quitamos el símbolo de "prohibido" */
    
    /* 3. ESTRUCTURA Y SOMBRA 3D */
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 8px; /* O var(--radius-md) si lo tienes definido */
    
    /* Sombra 3D Sólida */
    box-shadow: 0 5px 0 #0056b3 !important; 
    
    transition: all 0.1s ease;
    position: relative;
}

/* Efecto al presionar (Active) */
.btn-proyectar:active {
    transform: translateY(4px) !important;
    box-shadow: 0 1px 0 #0056b3 !important;
}

/* Efecto Hover (opcional) */
.btn-proyectar:hover {
    background-color: #0069d9 !important;
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #0056b3 !important;
}
/* fin boton proyectar */


















@keyframes pulseReady {
    0% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 123, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0); }
}

/* --- BARRA DE PROGRESO --- */
.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.progress-steps::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    background: var(--bg-white);
    padding: 0 10px;
}

.step-icon {
    width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 5px;
    font-size: 1.1rem;
    color: var(--text-muted);
    background: white;
}

.step-item.active .step-icon {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* 📍 GPS: SELECTOR DE PATRONES (MODIFICACIÓN IMAGEN 2) */
.pattern-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.pattern-card {
    background: white;
    border: 2px solid #edf2f7;
    border-radius: 16px;
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-height: 120px;
}

/* Efecto elevación al pasar el mouse */
.pattern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

/* Estado Seleccionado (Borde Amarillo Imagen 2) */
.pattern-card.selected {
    border-color: #f6ad55 !important; /* Amarillo institucional */
    background-color: #fffaf0;
    box-shadow: 0 0 0 1px #f6ad55, 0 10px 15px -3px rgba(246, 173, 85, 0.2);
}

.pattern-card h4 {
    margin: 8px 0 4px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #2d3748;
}

.pattern-card p {
    font-size: 0.75rem;
    color: #718096;
    margin: 0;
    line-height: 1.2;
}

/* --- CALENDARIO --- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--grid-gap);
    margin: 15px 0;
}

.day-card {
    aspect-ratio: 1;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 0.8rem;
    transition: transform 0.1s;
    user-select: none;
    background-color: white;
}

.day-card:active { transform: scale(0.92); }

.day-number {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--text-muted);
}

.day-icon { font-size: 1.3rem; margin-bottom: 2px; }
.day-desc { font-size: 0.55rem; text-align: center; font-weight: 600; }

/* --- ESTADOS DE TURNO --- */
.turno-unassigned { border: 1px dashed #ced4da; color: #adb5bd; }
.turno-D { background-color: var(--cal-dia-bg); color: var(--cal-dia-text); border-color: #ffe082; }
.turno-N { background-color: var(--cal-noche-bg); color: var(--cal-noche-text); border-color: #cfd8dc; }
.turno-X { background-color: var(--cal-descanso-bg); color: var(--cal-descanso-text); border-color: #c8e6c9; }
.turno-F { background-color: var(--cal-festivo-bg); color: var(--cal-festivo-text); border-color: #ffcdd2; }

/* --- MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    width: 92%;
    max-width: 360px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* 📱 OPTIMIZACIONES EXTREMAS (FINALES) */
@media (max-width: 480px) {
    .step-icon { width: 34px; height: 34px; font-size: 0.9rem; }
    .progress-steps::before { top: 17px; }
    .step-label { font-size: 0.55rem; }
    
    /* Ajuste de tarjetas en móvil (2 por fila) */
    .pattern-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .pattern-card { padding: 15px 5px; min-height: 100px; }
    .pattern-card h4 { font-size: 0.95rem; }

    .day-icon { font-size: 1.1rem; }
    .day-desc { display: none; } 
    .day-number { font-size: 0.6rem; }
    
    .btn { padding: 10px; font-size: 0.9rem; }
}

/* 📍 GPS: ANIMACIONES DE ORIENTACIÓN AL USUARIO */

/* Definición del pulso biológico (Respiración) */
@keyframes breathing {
  0% { transform: scale(1); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
  50% { transform: scale(1.02); box-shadow: 0 8px 15px rgba(211, 47, 47, 0.15); }
  100% { transform: scale(1); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
}

/* Clase para el botón bloqueado */
.btn-breathing {
    animation: breathing 2.5s ease-in-out infinite !important;
    background-color: #f8f9fa !important; /* Gris muy claro */
    border: 1px solid #dee2e6 !important;
    transition: all 0.3s ease;
}

/* Color para el número de alerta (Respaldo por si falla el style inline) */
.num-alerta {
    color: #d32f2f !important; /* Rojo Sangre / Auditoría */
    font-weight: 900;
}