/* --- Reset y General --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    min-height: 100vh;
    color: #333;
}

body.login,
body.registro {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Contenedor Principal (Login/Registro) --- */
.contenedor-login {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* --- Tarjeta (Card) --- */
.caja-login {
    background-color: #ffffff;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid #e0e0e0;
}

/* --- Encabezado --- */
.encabezado-login {
    margin-bottom: 30px;
}

.encabezado-login h2 {
    color: #003366;
    /* Azul Institucional */
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 700;
}

.subtitulo {
    color: #666;
    font-size: 1rem;
}

/* --- Formulario --- */
.formulario-login {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.grupo-input {
    text-align: left;
}

.grupo-input label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 600;
    font-size: 0.95rem;
}

.grupo-input input,
.grupo-input select,
.grupo-input textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background-color: #fff;
}

.grupo-input input:focus,
.grupo-input select:focus,
.grupo-input textarea:focus {
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* --- Botones Generales --- */
.btn-login,
.btn-accion {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
    background-color: #003366;
    /* Color por defecto */
}

.btn-login:hover,
.btn-accion:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.btn-login:active,
.btn-accion:active {
    transform: translateY(0);
}

/* --- Botones de Acción (Tablas) --- */
.btn-editar {
    background-color: #ff9800;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 5px;
    display: inline-block;
    transition: background 0.2s;
}

.btn-editar:hover {
    background-color: #f57c00;
}

.btn-eliminar {
    background-color: #d32f2f;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    transition: background 0.2s;
}

.btn-eliminar:hover {
    background-color: #b71c1c;
}

/* --- Badges --- */
.badge {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.badge-admin {
    background-color: #e3f2fd;
    color: #0d47a1;
}

.badge-estudiante {
    background-color: #e8f5e9;
    color: #1b5e20;
}

/* --- Pie de página (Login) --- */
.pie-login {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #888;
}

.pie-login a {
    color: #003366;
    text-decoration: none;
    font-weight: 600;
}

.pie-login a:hover {
    text-decoration: underline;
}

/* --- Tablas --- */
.tabla-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    background: white;
}

.tabla-usuarios {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.tabla-usuarios th,
.tabla-usuarios td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tabla-usuarios th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.tabla-usuarios tr:hover {
    background-color: #f9f9f9;
}

/* --- Checkbox Groups (Multi-selección) --- */
.checkbox-group {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
    cursor: pointer;
}

.checkbox-item:hover {
    background-color: #f0f4f8;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #003366;
}

.checkbox-item label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    flex: 1;
    margin: 0;
    /* Override default label margin */
}

/* --- Resultados Detallados --- */
.tarjeta-resultado-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
    text-align: center;
}

.resultado-principal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.nota-circulo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    border: 8px solid #eee;
}

.borde-verde {
    border-color: #2e7d32;
    color: #2e7d32;
}

.borde-rojo {
    border-color: #d32f2f;
    color: #d32f2f;
}

.texto-aprobado {
    color: #2e7d32;
    margin-bottom: 5px;
}

.texto-reprobado {
    color: #d32f2f;
    margin-bottom: 5px;
}

.contenedor-desglose,
.contenedor-revision {
    width: 100%;
    max-width: 800px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.item-modulo {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.info-modulo {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.barra-contenedor {
    width: 100%;
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.barra-progreso {
    height: 100%;
    transition: width 1s ease-in-out;
}

.mensaje-recomendacion {
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Tarjetas de Revisión */
.tarjeta-revision {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fafafa;
}

.borde-verde-suave {
    border-left: 5px solid #2e7d32;
}

.borde-rojo-suave {
    border-left: 5px solid #d32f2f;
}

.encabezado-pregunta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    color: #555;
}

.enunciado-revision {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
}

.comparativa-respuestas {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.bloque-respuesta {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    min-width: 200px;
}

.bg-verde {
    background-color: #e8f5e9;
    color: #1b5e20;
}

.bg-rojo {
    background-color: #ffebee;
    color: #b71c1c;
}

.explicacion-revision {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
    font-size: 0.95rem;
    color: #444;
}

.acciones-finales {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}