/* ----------------------------------------------------
   VARIABLES CSS Y FUENTES
   ---------------------------------------------------- */
:root {
    /* Colores Basados en el Diseño Anterior */
    --primary-blue: #4A90E2;
    --dark-blue: #1a2332;
    --darker-blue: #0f1419;
    --accent-cyan: #00D9FF;
    --accent-teal: #4ECDC4;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f5f7fa;
    --white: #ffffff;
    --error-red: #e74c3c;
    --success-green: #27ae60;
}

/* ----------------------------------------------------
   RESET & LAYOUT PRINCIPAL
   ---------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8eef5 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Layout de escritorio: 1/3 para sidebar, 2/3 para contenido */
    min-height: 100vh;
}

/* ----------------------------------------------------
   SECCIÓN IZQUIERDA (Sidebar)
   ---------------------------------------------------- */
.login-left {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--darker-blue) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    color: var(--white);
    overflow: hidden;
}

.school-logo { 
    max-width: 200px; 
    margin-bottom: 30px; 
}

/* Elementos de texto de la sidebar */
.welcome-text {
    position: relative;
    z-index: 10;
    text-align: center;
    margin-top: 20px;
}
.welcome-text h1 { font-size: 1.8em; }
.welcome-text p { color: rgba(255, 255, 255, 0.8); }


/* ----------------------------------------------------
   SECCIÓN DERECHA (Contenido Principal)
   ---------------------------------------------------- */
.login-right {
    position: relative;
    display: flex;
    align-items: flex-start; /* Alinea el contenido arriba */
    justify-content: center;
    padding: 60px 80px;
    overflow-y: auto; /* Permite scroll del contenido */
}

.main-form-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 700px;
}

/* Estilo para todas las secciones (Login, Selection, Summary) */
.section-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-title { color: var(--text-dark); font-size: 1.8em; margin-bottom: 10px; font-weight: 700; }
.form-subtitle { color: var(--text-light); margin-bottom: 30px; font-size: 0.95em; }


/* INPUTS */
.form-group { margin-bottom: 25px; }
.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 1em;
    background: var(--bg-light);
}

/* ----------------------------------------------------
   BOTONES
   ---------------------------------------------------- */
.login-button, .btn {
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 15px;
}

/* Botón Principal */
.btn-primary, .login-button {
    background: linear-gradient(135deg, var(--primary-blue), #5b9eeb);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}
.btn-primary:hover, .login-button:hover { transform: translateY(-2px); }

/* Botón de Confirmación (Success) */
.btn-success {
    background: linear-gradient(135deg, var(--success-green), #2ecc71);
    color: var(--white);
}

/* Botón de Reinicio (Secundario) */
.btn-secondary, .reiniciar-btn {
    background-color: var(--text-dark);
    color: var(--white);
    margin-top: 30px;
}
.reiniciar-btn:hover { background-color: #2c3e50; }


/* ----------------------------------------------------
   ESTILOS DE TALLERES (INYECCIÓN JS)
   ---------------------------------------------------- */

.taller-group {
    /* CRÍTICO: Asegura que cada bloque tenga un fondo visible */
    background: var(--white);
    border: 1px solid #e0e6ed;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.taller-group h3 {
    color: var(--text-dark); 
    font-size: 1.3em; 
    margin-bottom: 15px; 
    padding-bottom: 10px; 
    border-bottom: 3px solid var(--primary-blue);
}

.taller-option {
    /* Uso de Flex para separación y alineación en la opción */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px; 
    border: 1px solid #e0e6ed; 
    border-radius: 10px; 
    margin-bottom: 10px; 
    background: var(--bg-light); 
    cursor: pointer;
    transition: all 0.2s;
}

.taller-option:hover { border-color: var(--primary-blue); }

.taller-option.selected { 
    border: 3px solid var(--success-green); 
    background-color: #e8f4fd; 
}

/* Estructura interna de la opción (para alinear Nombre y Botón) */
.taller-info { 
    max-width: 70%;
    font-size: 1.05em;
    font-weight: 500;
    color: var(--text-dark);
}
.taller-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
}

/* Indicadores de Cupos */
.cupos-info { color: var(--text-light); font-weight: 500; }
.cupos-info.low { 
    color: var(--error-red); 
    font-weight: 700;
}

/* Mensajes de Status (Errores, Confirmación) */
.message { margin-top: 20px; padding: 12px; border-radius: 8px; font-weight: 500; display: none; }
.message.error { display: block; background-color: #fee; color: var(--error-red); border: 1px solid #fcc; }
.message.success { display: block; background-color: #efe; color: var(--success-green); border: 1px solid #cfc; }


/* -----------------------------------------------------------
   RESPONSIVE DESIGN
   ----------------------------------------------------------- */
/* Ocultar barra lateral en pantallas medianas y pequeñas */
@media (max-width: 1200px) { 
    .login-wrapper {
        grid-template-columns: 1fr; /* Una sola columna */
    }

    .login-left {
        display: none; /* Ocultar sidebar para maximizar el espacio de selección */
    }

    .login-right {
        padding: 40px 30px; 
        align-items: center;
    }
    
    .taller-option {
        flex-direction: column; /* Apilar nombre y acciones en móviles */
        align-items: flex-start;
    }
    .taller-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }
}