body{
    margin:0;
  padding:0;
    font-family:Arial, Helvetica, sans-serif;
    background:#f4f6f9;
}



/* ==========================================
   SEGURIDAD - BLOQUEAR SELECCIÓN Y ARRASTRE
========================================== */

.pagina-menu,
.pagina-historial,
.pagina-resultado,
.pagina-profesor,
.pagina-test {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.pagina-menu img,
.pagina-historial img,
.pagina-resultado img,
.pagina-profesor img,
.pagina-test img {
    -webkit-user-drag: none;
    user-drag: none;
}

/* Protección específica de imágenes */
.foto,
.progreso-velocimetro {
    -webkit-touch-callout: none;
}

/* ==========================================
   FIN SEGURIDAD
========================================== */



.contenedor-centrado{
    text-align:center;
	margin-bottom:15px;
}

/* ==========================================
  iconos
========================================== */
.acciones img{
    width:22px;
    height:22px;
    vertical-align:middle;
}

.acciones a{
    display:inline-block;
    margin:0 4px;
}

.icono-pequeño{
    width:20px;
    height:20px;
    flex:0 0 20px;
	transform:translateY(-1px);
}

.icono-menu,
.icono-candado{
    width: 28px;
    height: 28px;
    vertical-align: middle;
	transform:translateY(-1px);
}
.icono-menu{
    margin-right: 10px;
}
.icono-candado{
    margin-left: 10px;
}

/* ==========================================
   LOGIN
========================================== */
.login{
    min-height:50vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:15px;
}

.login-tarjeta{
    width:100%;
    max-width:400px;
    background:white;
    border-radius:18px;
    box-shadow:0 8px 25px rgba(0,0,0,.10);
    padding:20px;
    text-align:center;
}

.login-logo{
    width:180px;
    margin-bottom:4px;
}

.login-tarjeta label{
    display:block;
    text-align:left;
    font-weight:600;
    margin-bottom:8px;
    margin-top:18px;
}

.login-tarjeta input{
    width:100%;
    box-sizing:border-box;
    padding:14px;
    border:1px solid #d7d7d7;
    border-radius:10px;
    font-size:16px;
    transition:.2s;
}

.login-tarjeta input:focus{
    outline:none;
    border-color:#0056d6;
    box-shadow:0 0 0 3px rgba(0,86,214,.15);
}

.boton-login{
    width:100%;
    margin-top:30px;
    padding:15px;
    border:none;
    border-radius:10px;
    background:#0056d6;
    color:white;
    font-size:17px;
    font-weight:bold;
    cursor:pointer;
    transition:.2s;
}

.boton-login:hover{
    filter:brightness(90%);
}

.boton-login:active{
    filter:brightness(80%);
}

.login-error{
    background:#ffe5e5;
    color:#b00020;
    border:1px solid #ffb5b5;
    border-radius:10px;
    padding:12px;
    margin-bottom:25px;
    font-weight:bold;
}

.login-ayuda{
    margin-bottom:14px;
	margin-top:10px;
    color:#777;
    font-size:12px;
    line-height:1.5;
}

.boton-instalar{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:4px;
    padding:12px 16px;
    border:2px solid #031D34;
    border-radius:8px;
    background:#ffffff;
    color:#031D34;
    cursor:pointer;
    font-size:14px;
    font-weight:600;
    transition:.2s;
}

.boton-instalar:hover{
    background:#eaf2ff;
}

.texto-instalar{
    flex:1;
    text-align:center;
    margin-left:10px;
}

#panel-instalacion{
    margin-top:0px;
}


.instalar-app{
    margin-top:20px;
    padding:20px;
    background:#f8f9fb;
    border:1px solid #d9dee5;
    border-radius:10px;
    text-align:center;
    animation:aparecer .25s ease;
}

.instalar-app h3{
    margin-top:0;
    color:#0d2b45;
}

@keyframes aparecer{
    from{
        opacity:0;
        transform:translateY(-8px);
    }

    to{
        opacity:1;
        transform:translateY(0);

    }

}


.instalar-imagen{
    display:block;
    width:100%;
    max-width:320px;
    margin:15px auto 0;
    border-radius:8px;
  }

.instalada{
    border-left:6px solid #28a745;
}


/* ==========================================
   AVISO LICENCIA
========================================== */

.aviso-licencia{
    max-width:700px;
    margin:8px auto;
    padding:4px 4px;
    background:#fff8db;
    border:1px solid #f2d675;
    border-left:6px solid #f4b400;
    border-radius:8px;
    text-align:center;
    line-height:1.6;
    color:#6b5600;
    font-size:14px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.aviso-licencia strong{
    font-size:18px;
    color:#c27c00;
}

/* ==========================================
   CABECERA
========================================== */

.cabecera{
    position:sticky;
    top:0;
    z-index:1000;
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#ffffff;
    height:64px;
    padding:0 20px;
    box-shadow:0 2px 10px rgba(0,0,0,.10);
}

.cabecera-izquierda{
    display:flex;
    align-items:center;
}

.logo-cabecera{
    display:flex;
    align-items:center;
}

.logo-cabecera img{
    height:50px;
    display:block;
}

.cabecera-derecha{
    display:flex;
    align-items:center;
    gap:20px;
}

.usuario{
    display:flex;
    align-items:center;
    gap:10px;
    color:#0d2340;
    font-size:14px;
    font-weight:600;
}

.icono-usuario{
    width:30px;
    height:30px;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#f2f4f7;
}

.icono-usuario img{
    width:24px;
    height:24px;
}

.cerrar-sesion .icono-usuario{
    transition:all 0.2s ease;
    cursor:pointer;
}

.cerrar-sesion:hover .icono-usuario{
    background:#e2e5e9;
    transform:scale(1.08);
}



/* ==========================================
   TARJETA SUBTEMA
========================================== */



.subtemas{
    display:flex;
    flex-direction:column;
    gap:2px;
    margin:4px 0 6px 20px;

}

.boton-subtema{
    display:block;
width:100%;

box-sizing:border-box;
    background:#fff;
    border:1px solid #dcdcdc;
    border-radius:12px;
    padding:8px;
    margin-bottom:4px;
    text-decoration:none;
    color:#333;
  
}


/* ---------- CABECERA ---------- */

.subtema-cabecera{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    margin-bottom:6px;
}

.subtema-titulo{
    display:flex;
    align-items:center;
    gap:2px;
    flex:1;
}

.titulo-subtema{
    display:flex;
    align-items:baseline;
    gap:10px;
    flex:1;
}

.codigo-subtema{
    color:#1976d2;
    font-size:14px;
    font-weight:700;
    flex-shrink:0;
}

.nombre-subtema{
    font-size:14px;
    font-weight:700;
    color:#222;
    flex:1;
}

.subtema-preguntas{
    font-size:12px;
    color:#777;
    font-weight:400;
}


/* ---------- DATOS ---------- */

.subtema-datos{
    display:grid;

    grid-template-columns:
        16px
        minmax(0, 1fr)
        16px
        28px
        16px
        22px;

    align-items:center;
    column-gap:5px;

    border-top:1px solid #dcdcdc;
    padding-top:4px;

    margin-left:26px;
    width:calc(100% - 26px);
    box-sizing:border-box;
}

.subtema-datos > *{
    min-width:0;
}
.icono-dato-subtema{
    width:16px;
    height:16px;
    object-fit:contain;
    flex-shrink:0;
	transform:translateY(-0px);
}

.subtema-fecha,
.subtema-repeticiones,
.subtema-fallos{
    display:flex;
    align-items:center;
    gap:5px;
}

.titulo-dato{
    font-size:12px;
    color:#777;
    margin-bottom:4px;
}

.valor-dato{
    font-size:16px;
    font-weight:700;
    color:#555;
}

.valor-fallos{
    font-size:16px;
    font-weight:700;
}

/* ---------- BALAS ---------- */


.subtema-balas{
    margin-left:26px;
    padding-top:5px;
    display:flex;
    align-items:center;
    gap:7px;
}

.bala{
    width:7px;
    height:7px;
    border-radius:50%;
    flex-shrink:0;
    box-sizing:border-box;
	
}

.bala-disponible{
    background:#555;
    border:1px solid #555;
}

.bala-gastada{
    background:transparent;
    border:1px solid #555;
}
.texto-balas{
    font-size:10px;
    font-weight:600;
    margin-right:3px;
	transform:translateY(-1px);
}


/* ---------- COLORES ---------- */

.valor-fallos.verde{
    color:#2e7d32;
}

.valor-fallos.amarillo{
    color:#f9a825;
}

.valor-fallos.rojo{
    color:#d32f2f;
}

.valor-fallos.gris{
    color:#9e9e9e;
}

.valor-fecha{
    font-size:14px;
    color:#555;
}

.estado-subtema{
display:inline-block;
    width:14px;
    height:14px;
    border-radius:50%;
    flex-shrink:0;
    margin-right:8px;
 box-sizing:border-box;

vertical-align:middle;
}

/* ==========================================
   ESTADO TEMA
========================================== */

.estado-tema{
    width:20px;
    height:20px;
    border-radius:50%;
    border:2px solid #ffffff;
    box-sizing:border-box;
    flex-shrink:0;
}

.tema-gris{
    background:#d6d6d6;
}

.tema-rojo{
    background:#e53935;
}

.tema-amarillo{
    background:#fbc02d;
}

.tema-verde{
    background:#43a047;
}


.gris{
    background:#d6d6d6;
    border:2px solid #bcbcbc;
}
.rojo{
    background:#e53935;
    border:2px solid #c62828;
}
.amarillo{
    background:#fbc02d;
    border:2px solid #f9a825;
}
.verde{
    background:#43a047;
    border:2px solid #2e7d32;
}
.texto-verde{
    color:#2e7d32;
}

.texto-amarillo{
    color:#f9a825;
}
.texto-rojo{
    color:#d32f2f;
}
.texto-gris{
    color:#9e9e9e;
}
.fondo-rojo{
    background:#ffe3e3;
}
.fondo-amarillo{
    background:#fff6cc;
}
.fondo-verde{
    background:#e3f7e3;
}
.fondo-gris{
    background:#ffffff;
}


main{
    max-width:1000px;
    margin:auto;
    padding:8px;
    
    background:#f2f2f2;
padding-top:0px;
}

.inicio{
    text-align:center;
}

.menu-modos{
    margin-top:40px;
    display:flex;
    flex-direction:column;
    gap:20px;
}

.boton-modo{
    display:block;
    background:#0056d6;
    color:white;
    text-decoration:none;
    padding:20px;
    border-radius:10px;
    font-size:20px;
}

.pantalla-test{
    display:flex;
    gap:20px;
}

.panel-izquierdo{
    width:25%;
}

.panel-derecho{
    width:75%;
min-height:450px;
}

.foto{
position:relative;
    background:white;
    padding:8px;
    border-radius:5px;
    max-width:375px;
    margin:0 auto;
    margin-bottom:25px;
	border-radius: 8px;
}

.foto img{
    width:100%;
    aspect-ratio:4 / 3;
    object-fit:cover;
    display:block;
    border-radius:0px;
}

.foto:has(img.ampliada){
    width:200%;
    max-width:750px;
}

.foto img.ampliada{
    width:100%;
}

.icono-ampliar{
    position:absolute;
    left:15px;
    bottom:15px;
    width:26px;
    height:26px;
    display:flex;
    justify-content:center;
    align-items:center;
    border-radius:50%;
    background:rgba(255,255,255,.50);
    color:#222;
    font-size:18px;
    pointer-events:none;
    box-shadow:0 2px 6px rgba(0,0,0,.25);
}

.icono-ampliar img{
    width:20px;
    height:20px;
    display:block;
}

.explicacion{
    margin-top:15px;
    background:white;
    padding:20px;
    border-radius:10px;
    line-height:1.6;
    font-size:14px;
}

.respuesta{
    width:100%;
    text-align:left;
    background:white;
    padding:20px;
    margin-bottom:15px;
    border-radius:10px;
    border:1px solid #e5e5e5;
    cursor:pointer;
    transition:0s;
    display:flex;
    align-items:center;
    gap:15px;
    font-size:14px;
    color:#000;
}

.respuesta-seleccionada{
    background:#fff8d6 !important;
    border:1px solid #e6c200 !important;
}

.respuesta-correcta{
    background:#d4edda !important;
    border:1px solid #28a745 !important;
}

.respuesta-incorrecta{
    background:#f8d7da !important;
    border:1px solid #dc3545 !important;
}

.respuesta:disabled{
    color:#000;
    opacity:1;
    cursor:default;
}

.respuesta:not(
.respuesta-correcta):not(
.respuesta-incorrecta):disabled:hover{
    background:white !important;
    border:1px solid #dcdcdc !important;
}

.respuesta-correcta:disabled{
    color:#000;
}

.respuesta-incorrecta:disabled{
    color:#000;
}

.respuesta:not(:disabled):hover{
    background:#e8f0ff;
    border-color:#0056d6;
}



/* =========================
   BOTONES TEST
========================= */

.botones-test{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:20px;
    margin-top:30px;
}

.boton-explicacion,
.boton-anterior,
.boton-finalizar{
    width:55px;
    height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:none;
    border-radius:8px;
    color:white;
    cursor:pointer;
    padding:0;
	flex-shrink:0;
}

.boton-finalizar{
    margin-left:12px;
margin-right:30px;
}
.boton-siguiente{
    height:40px;
    min-width:120px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:none;
    border-radius:8px;
    color:white;
    cursor:pointer;
    padding:0 20px;
}

.boton-explicacion{
    background:#0056d6;
}

.boton-anterior{
    background:#0056d6;
}

.boton-siguiente{
    background:#0056d6;
}

.boton-finalizar{
    background:#28a745;
}

.boton-oculto{
    visibility:hidden;
    pointer-events:none;
}

/* =========================
   ICONOS BOTONES TEST
========================= */

.boton-explicacion img,
.boton-anterior img,
.boton-finalizar img{
    width:24px;
    height:24px;
    display:block;
}

.boton-siguiente img{
    width:24px;
    height:24px;
    display:block;
    margin-left:8px;
}

.navegacion-test{
    margin-top:35px;
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:5px;
}

.numero-pregunta{
    width:28px;
    height:28px;
    border:1px solid #B0B0B0;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:bold;
    cursor:pointer;
    appearance:none;
    -webkit-appearance:none;
    background:#e0e0e0;
}

.numero-pregunta.actual{
    width:28px;
    height:28px;
    border:3px solid #0056d6;
}

.numero-pregunta.correcta{
    background:#28a745;
    color:white;
}

.numero-pregunta.incorrecta{
    background:#dc3545;
    color:white;
}

.numero-pregunta.contestada{
    background:#e6c200;
    color:white;
}

.barra-test{
    display:flex;
    align-items:center;
    padding:3px 6px;
    background:white;
    border-bottom:1px solid #ddd;
    margin-bottom:15px;
    margin-top:0;
}

.contador-aciertos,
.contador-fallos,
.contador-pendientes{

    min-width:22px;
padding: 0 4px;
box-sizing: border-box;
    height:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:4px;
    font-size:14px;
    font-weight:700;
    color:#fff;
    flex-shrink:0;
}

.contador-aciertos{
    background:#22c55e;
}

.contador-fallos{
    background:#ef4444;
}

.contador-pendientes{
    background:#6b7280;
}

.estadisticas-test{
    display:flex;
    gap:6px;
    align-items:center;
}

.contador-preguntas{
    flex:1;
    text-align:center;
    font-weight:bold;
}

.cronometro-test{
    width:60px;
    text-align:right;
    font-weight:bold;
}

.progreso-test{
    font-weight:bold;
}

.cabecera-pregunta{
    display:flex;
    align-items:flex-start;
    gap:20px;
    margin-bottom:20px;
font-size:15px;
font-weight: bold;
}

.numero-pregunta-texto{
    font-size:24px;
    font-weight:bold;
    min-width:4px;
}

.enunciado{
    flex:1;
    font-size:16px;
    font-weight:bold;
    margin-bottom:20px;
	margin-top:6px;
}


.icono-respuesta{
    width:30px;
    height:30px;
    flex-shrink:0;
}

.pie{
    text-align:center;
    padding:20px;
    color:#666;
}

.icono-modal{
    text-align:center;
    font-size:24px;
    margin-bottom:15px;
	
display:flex;
align-items:center;
justify-content:center;
	
	
}
.icono-modal img{
    width:32px;
    height:32px;
    display:block;
	
}

.modal-explicacion{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.6);
    z-index:9999;
}

.contenido-modal{
    background:white;
    width:90%;
    max-width:600px;
    margin:80px auto;
    padding:25px;
    border-radius:10px;
    box-sizing:border-box;
}

.cerrar-modal{
    margin-top:25px;
    padding:10px 20px;
    border:none;
    border-radius:8px;
    background:#6c757d;
    color:white;
    cursor:pointer;
    font-size:15px;

display:block;
margin-left:auto;
margin-right:auto;
transition:0.2s;
}

.titulo-modal{
    margin-top:0;
    margin-bottom:20px;
    color:#0056d6;
    font-size:16px;
    text-align:center;
}

.texto-modal{
    font-size:14px;
    line-height:1.6;
    color:#333;
}

.botones-test button{
    font-size:16px;
}

/* ==========================================
   pagina resultado
========================================== */

/* ==========================================
   RESULTADO TEST
========================================== */

.resultado-examen{
    max-width:700px;
    margin:10px auto;
    padding:10px;
}

.caja-resultado{
    background:#fff;
    border-radius:18px;
    padding:18px;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
}

/* ==========================================
   CABECERA
========================================== */

.resultado-cabecera{
    text-align:center;
    margin:8px;
}

.resultado-cabecera h2{
    margin:0;
    font-size:22px;
}

.resultado-info{
    margin-top:10px;
    color:#777;
    font-size:17px;
    text-align:center;
}

/* ==========================================
   APTO / NO APTO
========================================== */

.resultado-apto,
.resultado-no-apto{

    width:180px;
    margin:10px auto;
    text-align:center;
    color:#fff;
    font-size:28px;
    font-weight:bold;
    border-radius:10px;
    padding:6px;

}

.resultado-apto{
    background:#2eb84c;
}

.resultado-no-apto{
    background:#d62828;
}

/* ==========================================
   RESUMEN
========================================== */

.resultado-resumen{
    display:flex;
    gap:6px;
    justify-content:center;
    margin:25px 0;
}

.resumen{
    width:110px;
    height:110px;
    border-radius:10px;
    color:#fff;
    text-align:center;
    padding:6px;
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}

.resumen.gris{
    background:#8a8a8a;
}
.resumen.verde{
    background:#24b14b;
}
.resumen.rojo{
    background:#d83a3a;
}

.resumen-titulo{
    font-size:13px;
    font-weight:bold;
}

.resumen-numero{
    font-size:26px;
    font-weight:bold;
    margin:10px 0;
}

.resumen-pequeno{
    font-size:11px;
    opacity:.95;
}

/* ==========================================
   TIEMPO
========================================== */


.icono-reloj{
    width:28px;
    height:28px;
    margin-right:8px;
	transform:translateY(-2px);
}

.resultado-tiempo{
    display:flex;
    align-items:center;
    justify-content:center;

    font-size:20px;
    font-weight:bold;
    margin:20px 0;
}


/* ==========================================
   PROGRESO
========================================== */

.nombre-alumno-progreso{
    text-align:center;
    font-size:18px;
    font-weight:600;
    color:#555;
    margin-top:-10px;
    margin-bottom:25px;
}

.resultado-progreso{
    display:flex;
    justify-content:center;
    gap:14px;
    margin:20px 0;
}

.progreso-item{
    text-align:center;
}

.progreso-titulo{
    font-size:16px;
    font-weight:bold;
    margin-bottom:8px;
}

.progreso-velocimetro{
    width:90px;
}

/* ==========================================
   BOTONES
========================================== */

.botones-superiores{
    display:flex;
    justify-content:center;
    gap:6px;
    flex-wrap:wrap;
    margin-top:25px;
}

.boton-inferior{
    text-align:center;
    margin-top:20px;
}



.boton-volver{
    height:40px;
    min-width:120px;
    background:#0056d6;
    color:white;
    border:none;
    border-radius:8px;
    cursor:pointer;
    transition:0.2s;
    font-size:16px;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}


.boton-inferior form{
    display:inline-block;
}

.botones-superiores .boton-volver{
    min-width:100px;
}

.boton-inferior{
    text-align:center;
    margin-top:20px;
}

.contenedor-menu{
    max-width:500px;
    margin:auto;
    padding:20px;
}
.contenedor-historial{
    max-width:1000px;
    margin:auto;
    padding:20px;
}

.contenedor-menu h1{
    text-align:center;
    margin-bottom:10px;
}

.selector-modo{
    display:flex;
    justify-content:center;
    gap:10px;
     margin:auto;
max-width:350px;

}

.selector-modo label{
    background:#0056d6;
    color:white;
    padding:12px 20px;
    border-radius:8px;
    cursor:pointer;
}

.modo-btn{
    flex:1;
    max-width:180px;
    padding:10px;
    border:none;
    border-radius:10px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
transition:0.2s;
}

.icono-modo{
    width:22px;
    height:22px;
    display:inline-block;
    background-color:currentColor;
    vertical-align:middle;
    margin-right:6px;
	transform:translateY(-1px);
}


.icono-progreso{
    width:18px;
    height:18px;
    display:inline-block;
    background-color:currentColor;
    vertical-align:middle;
    margin-right:4px;
	transform:translateY(-2px);
}



.icono-historial{
    -webkit-mask:
        url("/imagenes/interfaz/iconos/modohistorial.svg")
        center / contain no-repeat;

    mask:
        url("/imagenes/interfaz/iconos/modohistorial.svg")
        center / contain no-repeat;
}

.icono-estudio{
    -webkit-mask:
        url("/imagenes/interfaz/iconos/modoestudio.svg")
        center / contain no-repeat;

    mask:
        url("/imagenes/interfaz/iconos/modoestudio.svg")
        center / contain no-repeat;
}

.icono-examen{
    -webkit-mask:
        url("/imagenes/interfaz/iconos/modoexamen.svg")
        center / contain no-repeat;

    mask:
        url("/imagenes/interfaz/iconos/modoexamen.svg")
        center / contain no-repeat;
}
.icono-simulacro{
    -webkit-mask:
        url("/imagenes/interfaz/iconos/modosimulacro.svg")
        center / contain no-repeat;

    mask:
        url("/imagenes/interfaz/iconos/modosimulacro.svg")
        center / contain no-repeat;
}

.modo-activo{
    background:#0056d6;
    color:white;
}

.modo-inactivo{
    background:#e9ecef;
    color:#333;
}





.lista-test{
    display:flex;
    flex-direction:column;
    gap:4px;
    max-width:350px;
    margin:auto;
}

.boton-test{
    display:flex;
    align-items:center;
    background:#0056d6;
    color:white;
    text-decoration:none;
    padding:10px;
    border-radius:10px;
    font-size:17px;
    font-weight:600;
    gap:12px;
}

.titulo-tema{
    flex:1;
    text-align:center;
}

.flecha-tema{
	flex:0 0 24px;
    text-align:center;
    font-size:18px;
    transition:transform .2s;
}

.tema-abierto{
    background:#004ab8;
}

/*==========================================
EFECTOS BOTONES
==========================================*/

.boton-test,
.boton-menu,
.modo-btn,
.boton-explicacion,
.boton-anterior,
.boton-siguiente,
.boton-finalizar,
.boton-volver,
.cerrar-modal,
.volver-menu,
.boton-subtema{
    transition:filter .15s;

}

.boton-test:hover,
.boton-menu:hover,
.modo-btn:hover,
.boton-explicacion:hover,
.boton-anterior:hover,
.boton-siguiente:hover,
.boton-finalizar:hover,
.boton-volver:hover,
.cerrar-modal:hover,
.volver-menu:hover,
.boton-subtema:hover,

.boton-test:active,
.boton-menu:active,
.modo-btn:active,
.boton-explicacion:active,
.boton-anterior:active,
.boton-siguiente:active,
.boton-finalizar:active,
.boton-volver:active,
.cerrar-modal:active,
.volver-menu:active,
.boton-subtema:active{
    filter:brightness(80%);

}

.boton-test.apto{
    background:#28a745;
}

.boton-test.no-apto{
    background:#dc3545;
}

.boton-test.pendiente{
    background:#0056d6;
}

.boton-menu{
    display:block;
    width:94%;
    max-width:600px;
    margin:20px auto;
    padding:20px 4px;
    background:#0056d6;
    color:white;
    text-decoration:none;
    text-align:center;
   border-radius:12px;
    font-size:22px;
    font-weight:500;
    box-sizing:border-box;
transition:0.2s;
}

.boton-menu.boton-bloqueado{
    background:#b8bec7;
    color:#ffffff;
    cursor:not-allowed;
    opacity:.75;
}

.boton-menu.boton-bloqueado:hover,
.boton-menu.boton-bloqueado:active{
    filter:none;
}

.boton-errores{
    background:#dc3545;
}

.cabecera-menu{
    margin-bottom:20px;
}

.volver-menu{
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:#0056d6;
    text-decoration:none;
    font-weight:600;
    font-size:18px;
}

.subtitulo-menu,
.texto-modo{
    text-align:center;
    color:#666;
    font-size:18px;
margin-bottom:15px;
}

.texto-modo{
    margin-top:20px;
}


/* ==========================================
   VELOCÍMETRO
========================================== */

.velocimetro{
    text-align:center;
    margin:8px 0 8px;
}

.velocimetro img{
    width:120px;
    height:120px;
}


/* ==========================================
   PANEL DE ADMINISTRACIÓN
========================================== */

.grupo{
    max-width:500px;
    margin:30px auto;
    background:#fff;
    border-radius:12px;
    padding:20px;
    box-shadow:0 2px 8px rgba(0,0,0,.10);
}

.grupo h2{
    margin:0 0 15px;
    padding-bottom:10px;
    border-bottom:1px solid #ddd;
    font-size:22px;
}

.boton{
    display:block;
    text-decoration:none;
    text-align:center;
    background:#0056d6;
    color:#fff;
    padding:10px 14px;
    margin:10px 0;
    border-radius:8px;
    font-size:16px;
    font-weight:600;
    transition:.2s;
}

.boton:hover{
    background:#0045ad;
}

.boton-rojo{
    background:#dc3545;
}

.boton-rojo:hover{
    background:#bb2d3b;
}



.boton-pequeno{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    text-decoration:none;
    background:#0056d6;
    color:#fff;
    padding:10px;
    border-radius:8px;
    font-size:16px;
    font-weight:600;
    transition:.2s;
}

.boton-pequeno:hover{
    background:#0045ad;
}

.boton-generar-pdf:hover{
    background:#0045ad;
}


/* ==========================================
   LICENCIAS
========================================== */

.licencia-verde{
    color:#198754;
    font-weight:bold;
}
.licencia-amarilla{
    color:#d4a000;
    font-weight:bold;
}
.licencia-roja{
    color:#dc3545;
    font-weight:bold;
}
.licencia-azul{
    color:#0d6efd;
    font-weight:bold;
	font-size:22px;
}

/* ==========================================
   MI PROGRESO
========================================== */

/* ==========================================
   VELOCÍMETRO HISTORIAL
========================================== */

.velocimetro-historial{
    text-align:center;
    margin-bottom:20px;
}

.velocimetro-historial img{
    max-width:120px;
}



.titulo-pagina{
    text-align:center;
    margin:10px 0 10px;
	font-size:24px;
}
.subtitulo-progreso{
    text-align:center;
    margin:15px 0 20px;
    color:#0d2340;

}
.pestanas-progreso{
    display:flex;
    justify-content:center;
    gap:10px;
    margin-bottom:15px;
    flex-wrap:wrap;

}

.pestanas-progreso a{
    text-decoration:none;
    background:#f3f5f7;
    color:#0d2340;
    border-radius:8px;
    font-weight:600;
    transition:.2s;
 padding:10px;
}

.pestanas-progreso a:hover{
    background:#e5e9ee;
}

.pestanas-progreso .activa{
    background:#0056d6;
    color:#fff;
}

.tabla-responsive{
    max-width:1400px;
    margin:0 auto 35px;
    padding:0 0px;
    overflow-x:auto;
}

.tabla-progreso{
    width:100%;
    border-collapse:collapse;
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.tabla-progreso th{
    background:#0056d6;
    color:#fff;
    padding:6px 4px;
    text-align:center;
    font-weight:600;
}

.tabla-progreso td{
    text-align:center;
    border-bottom:1px solid #e6e6e6;
	padding: 6px 4px;
}

.tabla-progreso tr:nth-child(even){
    background:#fafafa;
}

.tabla-progreso tr:hover{
    background:#eef5ff;
}

.tabla-progreso tr:last-child td{
    border-bottom:none;
}

.icono-titulo-tabla{
    width:18px;
    height:18px;
    vertical-align:middle;
    margin:0 2px;
}

.numero-fallos{
    color:#d60000;
    
}


/* ==========================================
   RESUMEN DE ACTIVIDAD
========================================== */

.resumen-progreso{
    display:flex;
    gap:10px;
    justify-content:center;
    flex-wrap:nowrap;
    margin:20px auto 30px;
}

.tarjeta-resumen{
    background:#ffffff;
    border-radius:15px;
    padding:8px;
    width:210px;
    box-shadow:0 3px 10px rgba(0,0,0,0.15);
    text-align:center;
}

.tarjeta-resumen h3{
    margin-top:0;
    margin-bottom:15px;
    font-size:18px;
}

.tarjeta-resumen p{
    margin:8px 0;
    font-size:15px;
}

.titulo-tarjeta-resumen{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
}

.titulo-tarjeta-resumen img{
    width:22px;
    height:22px;
    display:block;
	transform:translateY(-1px);
}



/* ==========================================
   DATOS TARJETAS RESUMEN
========================================== */

.dato-resumen{
    display:flex;
    align-items:center;
    gap:8px;
    margin:9px 0;
    text-align:left;
}

.dato-resumen img{
    width:18px;
    height:18px;
    flex:0 0 18px;
}

.dato-resumen span{
    flex:1;
    font-size:14px;
    color:#555;
}

.dato-resumen strong{
    font-size:15px;
    color:#222;
}









.acciones a{
    text-decoration: none;
    margin: 0 4px;
    font-size: 18px;
}


input[readonly]{
    background:#f5f5f5;
    color:#666;
    cursor:default;
}


/* ==========================================
   FORMULARIO ALUMNOS
========================================== */

.formulario-alumno{
    max-width:650px;
    margin:0 auto 30px;
    padding:25px;
    background:#ffffff;
    border-radius:14px;
    box-shadow:0 3px 12px rgba(0,0,0,.08);
    box-sizing:border-box;
}

.formulario-alumno label{
    display:block;
    margin-bottom:6px;
    font-size:14px;
    font-weight:600;
    color:#0d2340;
}

.formulario-alumno input[type="text"],
.formulario-alumno input[type="number"],
.formulario-alumno select{
    width:100%;
    box-sizing:border-box;
    
    height:42px;
    padding:0 12px;
	
    border:1px solid #d7dce2;
    border-radius:8px;
    background:#fff;
    color:#222;
    font-size:15px;
}

.formulario-alumno input:focus,
.formulario-alumno select:focus{
    outline:none;
    border-color:#0056d6;
    box-shadow:0 0 0 3px rgba(0,86,214,.10);
}

.formulario-alumno input[readonly]{
    background:#f2f4f7;
    color:#667085;
}

.formulario-alumno button[type="submit"]{
    display:block;
    min-width:160px;
    margin:25px auto 0;
    padding:12px 20px;
    border:0;
    border-radius:8px;
    background:#0056d6;
    color:#fff;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
}

.formulario-alumno button[type="submit"]:hover{
    filter:brightness(95%);
}

.fila-formulario{
    display:flex;
    gap:18px;
    align-items:flex-start;
}

.campo-formulario{
    flex:1;
    margin-bottom:18px;
}

.grupo-campo{
    display:flex;
    align-items:stretch;
    gap:6px;
    width:180px;
}

.grupo-campo .campo-corto{
    flex:1;
    width:auto;
    min-width:0;
}

select.campo-corto{
    width:95px;
	flex:none;
}

.boton-icono img{
    width:24px;
    height:24px;
    display:block;
}

.boton-icono{
    width:42px;
    height:42px;
	box-sizing:border-box;
    padding:0;
    border:1px solid #d7dce2;
    border-radius:8px;
    background:#f7f8fa;
    cursor:pointer;
    display:flex;
    justify-content:center;
    align-items:center;
	
	flex-shrink:0;
}

.boton-icono:hover{
    background:#eaf2ff;
    border-color:#0056d6;
}

.licencia-infinita{
    margin-top:14px;
}

.fila-permisos{
    display:flex;
    gap:30px;
    flex-wrap:wrap;
    margin-bottom:18px;
}

.fila-permisos label{
    display:flex;
    align-items:center;
    gap:6px;
    margin:0;
    font-weight:600;
}
.texto-ayuda{
    display:block;
    margin-top:6px;
    font-size:12px;
    color:#666;
}


/* ==========================================
   TOAST mensaje emergente
========================================== */

.toast{
    position:fixed;
    top:20px;
    width:calc(100% - 40px);
    max-width:450px;
    box-sizing:border-box;
    text-align:center;
    z-index:9999;
    padding:14px 20px;
    border-radius:10px;
    color:#fff;
    font-weight:600;
    box-shadow:0 8px 20px rgba(0,0,0,.20);
    opacity:0;

    left:50%;
    transform:translateX(-50%) translateY(-20px);
    transition:
        opacity .25s,
        transform .25s;
}

.toast.mostrar{
    opacity:1;
   transform:translateX(-50%) translateY(0);
}

.toast-success{
    background:#16a34a;
}

.toast-info{
    background:#2563eb;
}

.toast-warning{
    background:#d97706;
}

.toast-error{
    background:#dc2626;
}


/* ==========================================
   ELIMINAR ALUMNO
========================================== */

.tarjeta-eliminar{
    max-width:520px;
    margin:30px auto;
    padding:25px;
    background:#fff;
    border-radius:14px;
    box-shadow:0 3px 12px rgba(0,0,0,.08);
}

.aviso-eliminar{
    margin:0 0 25px;
    padding:14px 18px;
text-align: center;
    background:#ffeb3b;
    border:2px solid #f44336;
    color:#000000;
    border-radius:10px;
    font-weight:700;
    font-size:16px;
    line-height:1.5;
}

.pregunta-eliminar{
    text-align:center;
    font-size:20px;
    font-weight:700;
    color:#0d2340;
    margin:10px 0 10px;
}

.dato-eliminar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 0;
    border-bottom:1px solid #ececec;
	font-size:16px;
}

.dato-eliminar:last-child{
    border-bottom:none;
}

.titulo-dato{
    font-weight:600;
    color:#0d2340;
	font-size:16px;
}

.botones-eliminar{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-top:25px;
}

.boton-secundario,
.boton-peligro{
    display:flex;
    justify-content:center;
    align-items:center;
    min-width:150px;
    height:46px;
    padding:0 18px;
    border:none;
    border-radius:8px;
    text-decoration:none;
    font-family:inherit;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    box-sizing:border-box;
	gap:10px;
}

.icono-boton-peligro{
    width:20px;
    height:20px;
    display:block;
}
.contenedor-boton-reset{
    display:flex;
    justify-content:center;
}
.seccion-reset{
    margin-top:30px;
    padding-top:10px;
    border-top:1px solid #ddd;
}
.boton-secundario{
    background:#e5e7eb;
    color:#222;
}

.boton-secundario:hover{
    background:#d5d7dc;
}

.boton-peligro{
    background:#dc2626;
    color:#fff;
}

.boton-peligro:hover{
    background:#b91c1c;
}

/* ==========================================
   LICENCIAS auto
========================================== */
.vista-previa-logo{
    width:220px;
    height:50px;
    border:1px solid #ccc;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:10px;
    background:#f9f9f9;
    overflow:hidden;
}
.vista-previa-logo img{
    height:50px;
    width:auto;
    max-width:100%;
    object-fit:contain;
}
.vista-previa-logo span{
    color:#888;
    font-size:14px;
}



/* ==========================================
   FORMULARIO LICENCIAS
========================================== */

.formulario-licencia{
    max-width:650px;
    margin:0 auto 30px;
    padding:25px;
    background:#ffffff;
    border-radius:14px;
    box-shadow:0 3px 12px rgba(0,0,0,.08);
    box-sizing:border-box;
}

.formulario-licencia label{
    display:block;
    margin-bottom:6px;
    font-size:14px;
    font-weight:600;
    color:#0d2340;
}

.formulario-licencia input[type="text"],
.formulario-licencia input[type="number"]{
    width:100%;
    box-sizing:border-box;
    height:42px;
    padding:0 12px;
    border:1px solid #d7dce2;
    border-radius:8px;
    background:#fff;
    color:#222;
    font-size:15px;
}

.formulario-licencia input[type="file"]{
    width:100%;
    box-sizing:border-box;
    height:auto;
    padding:8px;
    border:1px solid #d7dce2;
    border-radius:8px;
    background:#f7f8fa;
    color:#222;
    font-size:15px;
    cursor:pointer;
}

.formulario-licencia input:focus{
    outline:none;
    border-color:#0056d6;
    box-shadow:0 0 0 3px rgba(0,86,214,.10);
}

.fila-tipo-licencia{
    display:flex;
    gap:30px;
    flex-wrap:wrap;
}

.fila-tipo-licencia label{
    display:flex;
    align-items:center;
    gap:6px;
    margin:0;
    font-weight:600;
}

.fila-tipo-licencia input{
    width:auto;
    height:auto;
}

#campo-dias-prueba{
    max-width:180px;
}

.formulario-licencia .fila-formulario{
    display:flex;
    gap:18px;
    align-items:flex-start;
}

.formulario-licencia .fila-formulario .campo-formulario{
    flex:1;
    min-width:0;
}
.formulario-licencia .campo-formulario{
    margin-bottom:18px;
}
.formulario-licencia .fila-tipo-licencia{
    margin-top:4px;
}

.formulario-licencia button[type="submit"]{
    display:block;
    min-width:160px;
    margin:25px auto 0;
    padding:12px 20px;
    border:0;
    border-radius:8px;
    background:#0056d6;
    color:#fff;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
}

.formulario-licencia button[type="submit"]:hover{
    filter:brightness(95%);
}

.formulario-licencia button[type="submit"]:active{
    filter:brightness(90%);
}








/* =========================
   MODAL CERRAR SESIÓN
========================= */

.modal-cerrar-sesion{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.45);
    z-index:9999;
    align-items:center;
    justify-content:center;
    padding:20px;
    box-sizing:border-box;
}

.modal-cerrar-sesion.activo{
    display:flex;
}

.modal-cerrar-contenido{
    width:100%;
    max-width:380px;
    background:white;
    border-radius:18px;
    padding:35px 30px 30px;
    text-align:center;
    box-sizing:border-box;
    box-shadow:0 10px 35px rgba(0,0,0,.25);
	transform:translateY(-200px);
	
}

.modal-icono-salir{
    width:55px;
    height:55px;
    margin-bottom:15px;
}

.modal-cerrar-contenido h2{
    margin:0 0 30px;
    font-size:18px;
    color:#333;
}

.modal-cerrar-botones{
    display:flex;
    gap:12px;
}

.boton-cancelar-sesion,
.boton-confirmar-sesion{
    flex:1;
    padding:13px 10px;
    border-radius:10px;
    font-size:16px;
    font-weight:bold;
    cursor:pointer;
    text-decoration:none;
    box-sizing:border-box;
}

.boton-cancelar-sesion{
    background:#e5e5e5;
    color:#444;
    border:none;
}

.boton-confirmar-sesion{
    background:#d60000;
    color:white;
    border:none;
}

.boton-cancelar-sesion:hover{
    background:#d5d5d5;
}

.boton-confirmar-sesion:hover{
    filter:brightness(.9);
}












/* ==========================================
   AVISO TABLAS MÓVIL
========================================== */

.aviso-tabla{
    display:none;
}


/* =========================
   CONTROLES MODO PROYECCIÓN
========================= */

.boton-proyeccion,
.boton-ajustar-texto{
    display:none;
}

@media (min-width: 769px){
    /* Contenedor flotante */
    .control-proyeccion{
        position:fixed;
        bottom:15px;
        right:20px;
        display:flex;
        align-items:center;
        gap:8px;
        z-index:1000;
    }

    /* Botón proyección */
    .pagina-test .boton-proyeccion{
        display:flex;
        align-items:center;
        justify-content:center;
        width:42px;
        height:42px;
        padding:8px;
        background:white;
        border:1px solid #ddd;
        border-radius:10px;
        cursor:pointer;
    }

    /* Botones + y - */
    body.modo-proyeccion .boton-ajustar-texto{
        display:flex;
        align-items:center;
        justify-content:center;
        width:42px;
        height:42px;
        padding:0;
        background:white;
        border:1px solid #ddd;
        border-radius:10px;
		color:#2563eb;
        font-size:26px;
        font-weight:bold;
        cursor:pointer;
    }
}


/* =========================
   MODO PROYECCIÓN
========================= */

@media (min-width: 769px){

    body.modo-proyeccion main{

        width:100%;
        max-width:none;

        min-height:100vh;

        padding:20px 30px;

        box-sizing:border-box;

        display:flex;
        flex-direction:column;

    }


    /* La zona principal ocupa el espacio disponible */

    body.modo-proyeccion .pantalla-test{

        flex:1;

        width:100%;

    }


    /* Texto grande para modo proyección */

    body.modo-proyeccion .numero-pregunta-texto{

        font-size:calc(34px * var(--tamano-proyeccion, 1));
        line-height:1.35;

    }


    body.modo-proyeccion .enunciado{

        font-size:calc(34px * var(--tamano-proyeccion, 1));
        line-height:1.35;

        margin-top:0;

    }


    body.modo-proyeccion .respuesta{

        font-size:calc(28px * var(--tamano-proyeccion, 1));
        line-height:1.3;

    }

}






/* ==========================================
   boton volver mas grande en tablas en movi pero sin wiewport
========================================== */
    .ajuste-sin-viewport{
        font-size:1.6em;
    }

    .ajuste-sin-viewport .icono-pequeño{
        width:28px;
        height:28px;
    }




/* =============================================================================
   movil
=============================================================================== */

@media (max-width:768px){




/* ==========================================
   ventana cerrar y finalizar test mas abajo
========================================== */
.modal-cerrar-contenido{
 	transform:translateY(-10px);
	
}




/* ==========================================
   AVISO TABLAS MÓVIL
========================================== */

    .aviso-tabla{
        display:block;
        text-align:center;
        margin:10px 0 15px;
        font-size:14px;
        color:#0d2340;      
    }


/* ==========================================
   FORMULARIO ALUMNOS movil
========================================== */
.fila-formulario{
	flex-direction:column;
    gap:0;
}


.fila-permisos{
    flex-direction:column;
    gap:10px;
}


/* ==========================================
   CABECERA RESPONSIVE
========================================== */

.cabecera{
    height:50px;
    padding:0 12px;
}

.logo-cabecera img{
    height:40px;
}

.usuario strong{
    display:block;
    font-size:12px;
}

.cabecera-derecha{
    gap:12px;
}

.icono-usuario{
    width:28px;
    height:28px;
}

.icono-usuario img{
    width:22px;
    height:22px;
}



 
/* ========================================== */


.login-tarjeta{
    padding:30px 24px;
}

.barra-test{
    margin-bottom:8px;
}

.pantalla-test{
    display:block;
}

.panel-izquierdo,
.panel-derecho{
        width:100%;
}

.panel-derecho{
min-height:0;
}

.navegacion-test{
    gap:8px;
}

.numero-pregunta{
    width:28px;
    height:28px;
}

.numero-pregunta.actual{
    width:28px;
    height:28px;
}

.botones-test{
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    background:#f2f2f2;
    padding:16px;
    z-index:1000;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
}

.boton-explicacion,
.boton-anterior,
.boton-finalizar{
    width:55px;
    height:40px;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
}

.boton-siguiente{
    height:40px;
    min-width:120px;
    display:flex;
    align-items:center;
    justify-content:center;
}


.contenedor-explicacion{
   width:80px;
   min-width:80px;
   display:flex;
   justify-content:center;
}

body.pagina-test{
    padding-bottom:90px;
}

.foto img{
    width:60%;
    display:block;
    margin:auto;
    cursor:pointer;
}

.foto img.ampliada{
    width:100%;
}
.foto:has(img.ampliada){
    width:auto;
    max-width:375px;
}




.boton-finalizar{
    margin-left:12px;
margin-right:46px;
}

.contenido-modal{
    width:95%;
    margin:20px auto;
}

/* ==========================================
   MI PROGRESO RESPONSIVE
========================================== */

.tabla-progreso{
   width:100%;
   table-layout:fixed;
   font-size:11px;
}

.tabla-progreso th,
.tabla-progreso td{
    padding:4px 3px;
    white-space:normal;
    overflow-wrap:anywhere;
}

.pestanas-progreso{
    gap:8px;
}

.pestanas-progreso a{
    flex:1;
    text-align:center;
}

}



@media(min-width:768px){

.menu-modos{
    max-width:500px;
    margin:40px auto;
}

}



@media (min-width:900px){

.instalar-tarjetas{
    flex-direction:row;
    align-items:stretch;
}

.tarjeta-instalar{
    flex:1;
}

}


