.materiales-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: calc(100vh - 120px);
}

/* PANEL IZQUIERDO (ÁRBOL) */
.materiales-arbol-panel {
    border-right: 1px solid #ddd;
    background: #fafafa;
    overflow-y: auto;
}

/* LISTA PRINCIPAL */
.materiales-arbol-ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.materiales-arbol-ul > li,
.materiales-arbol-ul li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* SUBLISTAS — línea vertical alineada bajo la flecha */
.materiales-arbol-ul ul {
    list-style: none;
    margin: 0;
    padding-left: 18px; /* flecha (14) + gap (4) */
    border-left: 1px solid #e0e0e0;
    margin-left: 14px; /* desplaza la línea bajo la flecha */
}

/* Ocultar sublistas vacías */
.materiales-arbol-ul ul:empty {
    display: none;
}

/* NODOS */
.materiales-nodo {
    padding: 0;
    cursor: pointer;
    user-select: none;
}

/* Línea interna del nodo */
.nodo-linea {
    display: flex;
    align-items: center;
    gap: 4px; /* más compacto */
    padding: 6px 10px;
    pointer-events: none;
}

/* Flecha fuera de la sangría */
.nodo-linea .toggle {
    width: 14px; /* más compacto */
    text-align: center;
    cursor: pointer;
    pointer-events: auto;
}

/* Sangría real aplicada solo al texto */
.nodo-linea .nombre {
    display: inline-block;
    padding-left: var(--indent); /* ahora será más pequeña */
    pointer-events: auto;
}

/* Hover */
.nodo-linea:hover {
    background: #f0f0f0;
}

/* Activo */
.materiales-nodo.activo > .nodo-linea {
    background: rgb(0,127,162);
    color: white;
}

/* Borde completo para PRINCIPAL siempre */
.materiales-nodo[data-id="0"] > .nodo-linea {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
}

/* PRINCIPAL activo */
.materiales-nodo[data-id="0"].activo > .nodo-linea {
    background: rgb(0,127,162);
    color: white;
    border: 1px solid #e0e0e0;
}

/* PANEL DERECHO (CONTENIDO) */
.materiales-contenido {
    padding: 20px;
    overflow-y: auto;
    background: white;
    min-height: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* CABECERA DEL PANEL DERECHO */
.materiales-contenido-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* BOTÓN NUEVO ELEMENTO */
.materiales-nuevo {
    position: relative;
}

.materiales-nuevo button {
    cursor: pointer;
}

/* MENÚ DESPLEGABLE */
.materiales-nuevo-menu {
    position: absolute;
    top: 35px;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 50;
    width: 180px;
}

.materiales-nuevo-menu div {
    padding: 8px 12px;
    cursor: pointer;
}

.materiales-nuevo-menu div:hover {
    background: #f0f0f0;
}

.oculto {
    display: none;
}

/* MÓVIL */
@media (max-width: 768px) {
    .materiales-layout {
        grid-template-columns: 1fr;
    }

    .materiales-arbol-panel {
        position: fixed;
        left: -260px;
        top: 0;
        width: 260px;
        height: 100%;
        background: white;
        transition: left 0.25s;
        z-index: 20;
    }

    .materiales-arbol-panel.abierto {
        left: 0;
    }
}

/* MODAL PARA SUBIR ARCHIVO, DIAPOSITIVA, ETC */

/* Fondo del modal */
.bazan-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* por encima del footer y todo */
}

/* Oculto */
.bazan-modal.oculto {
    display: none;
}

/* Contenedor interno */
.bazan-modal-contenido {
    background: #fff;
    width: 600px;
    max-width: 90%;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Tabs */
.bazan-modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.bazan-modal-tabs button {
    padding: 8px 14px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 4px;
}

.bazan-modal-tabs button.activo {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Cuerpo */
.bazan-modal-body .tab {
    display: none;
}

/* Footer del modal */
.bazan-modal-acciones {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================================
   ITEM DE MATERIAL
============================================================ */

.material-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.material-item:hover {
    background: #f7f7f7;
}

.material-item-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   BOTÓN DE OPCIONES (⋮)
============================================================ */

.material-item-opciones-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    color: rgb(0,127,162);
    transition: color 0.15s ease;
}

.material-item-opciones-btn:hover {
    color: rgb(0,100,130);
}

/* ============================================================
   MENÚ DE OPCIONES — BARRA HORIZONTAL
============================================================ */

.material-item-opciones-menu {
    position: absolute;
    top: 50%;
    right: 40px; /* aparece a la izquierda del botón ⋮ */
    transform: translateY(-50%) translateX(20px); /* empieza desplazado a la derecha */
    
    background: #fff;
    border: 1px solid rgba(0,127,162,0.3);
    border-radius: 6px;
    padding: 4px 8px;

    display: flex;
    flex-direction: row; /* HORIZONTAL */
    gap: 6px;

    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 999;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.material-item-opciones-menu:not(.oculto) {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0); /* se desplaza hacia la izquierda */
}

.material-item-opciones-menu.oculto {
    opacity: 0;
    pointer-events: none;
}

/* Iconos */
.material-item-opciones-menu div {
    padding: 4px;
    cursor: pointer;
    font-size: 18px;
    color: rgb(0,127,162);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.material-item-opciones-menu div:hover {
    background: rgba(0,127,162,0.1);
    border-radius: 4px;
    color: rgb(0,100,130);
}

/* Tooltip */
.material-item-opciones-menu div::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -26px;
    background: rgb(0,127,162);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-50%);
    left: 50%;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.material-item-opciones-menu div:hover::after {
    opacity: 1;
}

/* ============================================================
   CIERRE DEL MENÚ AL HACER CLICK FUERA
============================================================ */

body {
    position: relative;
}


/* ============================================================
   BREADCRUMB — Caja superior completa
============================================================ */

.materiales-breadcrumb {
    width: 100%;
    background: #f5f5f5;          /* Color suave para diferenciar */
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;          /* Separación con el título */
    font-size: 14px;
    color: #555;
    box-sizing: border-box;
}

/* Texto del breadcrumb */
.materiales-breadcrumb span {
    cursor: pointer;
    color: #0073aa;
}

.materiales-breadcrumb span:hover {
    text-decoration: underline;
}

.materiales-breadcrumb .sep {
    margin: 0 6px;
    color: #999;
}

/* ============================================================
   TÍTULO — Asegurar que queda a la izquierda
============================================================ */

.materiales-contenido-header h2 {
    margin: 0;
    padding: 0;
    text-align: left !important;
    font-weight: 700;
}

/* ============================================================
   CONTENEDOR DEL HEADER — Mantener botón a la derecha
============================================================ */

.materiales-contenido-header {
    display: flex;
    flex-direction: column;        /* Breadcrumb arriba, título debajo */
    align-items: flex-start;       /* Todo alineado a la izquierda */
    gap: 8px;                      /* Separación vertical */
}

/* El bloque del botón debe alinearse a la derecha */
.materiales-nuevo {
    align-self: flex-end;
}

/* ============================================================
   VISTA TEST ALUMNO — PREGUNTAS Y OPCIONES
============================================================ */

#materiales-lista.modo-test {
    width: 100%;
    max-width: 100%;
}

.test-pregunta {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-size: 18px;
    line-height: 1.5;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.test-numero {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.test-enunciado {
    margin-bottom: 20px;
}

.test-opciones label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    background: #fafafa;
}

.test-opciones input {
    margin-top: 4px;
}

/* ============================================================
   ACCIONES BAJO CADA PREGUNTA (Borrar + Destacar)
============================================================ */

.test-acciones-respuesta {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.test-acciones-respuesta .follow-switch {
    padding-left: 20px !important;
}

.destacar-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
}

/* Navegación del modo pregunta a pregunta */
.test-navegacion {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* ============================================================
   MODO OSCURO — PANEL COMPLETO
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro {
    background: #121212 !important;   /* fondo general */
    color: #f0f0f0 !important;
}

/* Fondo detrás de las tarjetas (contenedor interno) */
#bazan-test-alumno-contenedor.modo-oscuro #bazan-test-alumno-contenido {
    background: #121212 !important;
}

/* ============================================================
   MODO OSCURO — CABECERA (incluye "Realizando test")
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro .bazan-test-alumno-header h2 {
    color: #ffffff !important;        /* título claro */
}

#bazan-test-alumno-contenedor.modo-oscuro .bazan-test-alumno-header button {
    color: #f0f0f0 !important;
}

/* ============================================================
   MODO OSCURO — TARJETAS DE PREGUNTA
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro .test-pregunta {
    background: #1e1e1e !important;
    border-color: #333 !important;
    color: #f0f0f0 !important;
}

/* Número de pregunta */
#bazan-test-alumno-contenedor.modo-oscuro .test-numero {
    color: #e0e0e0 !important;
}

/* Enunciado */
#bazan-test-alumno-contenedor.modo-oscuro .test-enunciado {
    color: #ffffff !important;
}

/* ============================================================
   MODO OSCURO — OPCIONES
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro .test-opciones label {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .test-opciones label span {
    color: #e0e0e0 !important;
}

/* ============================================================
   MODO OSCURO — ACCIONES BAJO LA PREGUNTA
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro .test-acciones-respuesta {
    border-color: #333 !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .destacar-label span {
    color: #e0e0e0 !important;
}

/* ============================================================
   MODO OSCURO — BOTONES
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro button {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
    color: #f0f0f0 !important;
}

#bazan-test-alumno-contenedor.modo-oscuro button:hover {
    background-color: #3a3a3a !important;
}

/* ============================================================
   MODO OSCURO — TODAS LAS PREGUNTAS (tarjetas separadas)
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro .test-todas .test-pregunta {
    background: #1e1e1e !important;
    border-color: #333 !important;
    box-shadow: 0 1px 3px rgba(255,255,255,0.05);
}


/* ============================================================
   CABECERA DEL PANEL (Título + botones)
============================================================ */

.bazan-test-alumno-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.bazan-test-alumno-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    color: #1a1a1a;
}

.bazan-test-alumno-header button {
    background: transparent !important;
    border: none !important;
    padding: 6px 10px;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
}

.bazan-test-alumno-header button:hover {
    opacity: 0.7;
}

/* ============================================================
   BOTONES DEL PLUGIN (solo los que usan clases bazan-btn)
   Color corporativo: #007FA2
============================================================ */

.bazan-btn,
.bazan-btn-primario,
.bazan-btn-secundario {
    background-color: #007FA2;
    border: 1px solid #006A87;
    color: #ffffff;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color .15s ease, transform .1s ease;
}

.bazan-btn:hover,
.bazan-btn-primario:hover,
.bazan-btn-secundario:hover {
    background-color: #0095C0;
    transform: translateY(-1px);
}

/* ============================================================
   PANEL COMPLETO DEL TEST DEL ALUMNO (VERSIÓN SEGURA)
============================================================ */

/* Estado por defecto: completamente oculto y sin ocupar espacio */
#bazan-test-alumno-contenedor {
    display: none !important;
    visibility: hidden;
    opacity: 0;
}

/* Estado visible: solo cuando el JS lo active */
#bazan-test-alumno-contenedor.visible {
    display: block !important;
    visibility: visible;
    opacity: 1;

    position: fixed;
    inset: 0;
    background: #f3f3f3; /* Blanco rebajado */
    color: #000000;
    z-index: 99999;
    overflow-y: auto;
    padding: 20px;
    transition: opacity .2s ease;
}

/* Contenido centrado dentro del panel */
#bazan-test-alumno-contenido {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0; /* 20px arriba/abajo — 0px izquierda/derecha */
}

/* Separación entre preguntas en modo "todas" */
.test-todas .test-pregunta {
    margin-bottom: 20px;        /* espacio entre tarjetas */
    background: #ffffff;        /* aseguro fondo blanco */
    border-radius: 8px;         /* bordes redondeados */
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Última pregunta sin margen extra */
.test-todas .test-pregunta:last-child {
    margin-bottom: 0;
}


/*Botón activo de las opciones del editor de test: preguntas, opciones, tiempo, etc */

.bazan-test-editor-tabs button.active {
    background-color: transparent !important;
    color: #000 !important; /* o #fff si prefieres */
    border-bottom: 3px solid rgb(0, 127, 162) !important;
}

/* ============================================================
   CONTENEDOR DEL MODAL DEL TEST (panel del alumno)
   Ocupa toda la pantalla y hace scroll interno.
============================================================ */

#bazan-test-alumno-contenedor {
    position: fixed;
    inset: 0;                 /* top:0; right:0; bottom:0; left:0 */
    background: #fff;
    overflow-y: auto;         /* El scroll lo hace el modal */
    display: flex;
    flex-direction: column;
    z-index: 99999;
}


/* ============================================================
   BARRA SUPERIOR FIJA DENTRO DEL MODAL
============================================================ */

.bazan-test-topbar {
    position: sticky;
    top: 0;
    z-index: 10;

    background: #fff;
    border-bottom: 1px solid #ddd;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    padding: 10px 15px;

    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;

    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Título */
.bazan-test-topbar .left h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Centro (temporizador, estado, etc.) */
.bazan-test-topbar .center {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    padding: 0 12px;
}

/* Botones derecha */
.bazan-test-topbar .right {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.bazan-test-topbar .right button {
    padding: 6px 10px;
    font-size: 14px;
}

@media (max-width: 480px) {

    .bazan-test-topbar {
        grid-template-columns: 1fr auto;   /* título + botones */
        grid-template-rows: auto auto;     /* segunda fila para el temporizador */
        row-gap: 6px;
    }

    /* Título: siempre arriba, ocupando la columna izquierda */
    .bazan-test-topbar .left {
        grid-column: 1 / 2;
        grid-row: 1;
        text-align: left;
    }

    /* Botones: siempre arriba a la derecha */
    .bazan-test-topbar .right {
        grid-column: 2 / 3;
        grid-row: 1;
        justify-content: flex-end;
    }

    /* Temporizador: baja a la segunda fila */
    .bazan-test-topbar .center {
        grid-column: 1 / 3;   /* ocupa todo el ancho */
        grid-row: 2;          /* segunda fila */
        text-align: center;
        padding: 0;
    }
}


/* ============================================================
CORTINILLA SUPERIOR PARA OCULTAR CONTENIDO QUE SUBE 
============================================================ */

/* CORTINILLA SUPERIOR FIJA AL NAVEGADOR */
#bazan-test-alumno-cortinilla {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 22px; /* altura ajustada para no solaparse con la barra */
    background: #f2f2f2; /* color exacto del fondo */
    z-index: 999999; /* por encima de la barra */

    pointer-events: none; /* no bloquea clics */
}

/* MODO OSCURO */
#bazan-test-alumno-contenedor.modo-oscuro #bazan-test-alumno-cortinilla {
    background: #111111; /* o el gris oscuro que uses */
}

/* ============================================================
   MODO OSCURO PARA LA BARRA SUPERIOR
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro .bazan-test-topbar {
    background: #1e1e1e;
    border-bottom: 1px solid #444;
    color: #f0f0f0;

    /* Sombra más suave y oscura */
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Título en modo oscuro */
#bazan-test-alumno-contenedor.modo-oscuro .bazan-test-topbar .left h2 {
    color: #f0f0f0;
}

/* Centro (temporizador, etc.) */
#bazan-test-alumno-contenedor.modo-oscuro .bazan-test-topbar .center {
    color: #f0f0f0;
}

/* Botones en modo oscuro */
#bazan-test-alumno-contenedor.modo-oscuro .bazan-test-topbar .right button {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

#bazan-test-alumno-contenedor.modo-oscuro .bazan-test-topbar .right button:hover {
    background: #444;
}

/* ============================================================
   INFORME FINAL — CONTENEDOR PRINCIPAL (NUEVO DISEÑO)
============================================================ */

.bazan-informe-final {
    max-width: 700px;
    margin: 0 auto;
    padding: 25px 35px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    font-family: inherit;
}

/* ============================================================
   TARJETA DE RESULTADO — NUEVO DISEÑO
============================================================ */

.bazan-informe-resultado {
    margin-bottom: 40px;
    padding: 25px 30px;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
}

.bazan-informe-resultado h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 26px;
    text-align: center;
    color: #2a2f4f;
}

.bazan-informe-resultado .resultado-flex {
    display: flex;
    gap: 25px;
    align-items: center;
    justify-content: center;
}

.bazan-informe-resultado .resultado-datos {
    font-size: 18px;
    line-height: 1.6;
}

.bazan-informe-resultado .resultado-datos div {
    margin-bottom: 4px;
}

.bazan-informe-resultado .detalle-box,
.bazan-informe-resultado .aprobado-box {
    margin-top: 25px;
    padding: 15px 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.bazan-informe-resultado .detalle-box h3,
.bazan-informe-resultado .aprobado-box h3 {
    margin-top: 0;
    font-size: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
}

.bazan-informe-resultado .detalle-line {
    font-size: 16px;
    margin: 4px 0;
}

.bazan-informe-resultado .total-line {
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

.result-ok {
    color: #2e7d32;
    font-weight: bold;
}

.result-bad {
    color: #c62828;
    font-weight: bold;
}

/* ============================================================
   GRÁFICO CIRCULAR RESULTADO DEL TEST — ESTILOS
============================================================ */

.bazan-informe-resultado svg {
    display: block;
    margin: auto;
}

.bazan-informe-resultado .grafico-leyenda {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

/* ============================================================
   PREGUNTAS COMO TARJETAS
============================================================ */

.test-pregunta {
    margin-bottom: 35px;
    padding: 22px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.test-numero {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2a2f4f;
}

.test-enunciado {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

/* ============================================================
   OPCIONES
============================================================ */

.test-opciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opcion-test {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fafafa;
    cursor: default;
}

/* Radios bloqueados */
.opcion-test input[type="radio"] {
    pointer-events: none;
    cursor: default;
}

/* Texto de la opción */
.opcion-test span {
    display: block;
    line-height: 1.4;
}

/* ============================================================
   COLORES DE RESULTADO (OPCIONES)
============================================================ */

.opcion-test.correcta,
.opcion-test.acierto {
    background: #e6f7e6 !important;
    border-color: #4caf50 !important;
}

.opcion-test.fallo {
    background: #fdeaea !important;
    border-color: #d9534f !important;
}

/* ============================================================
   BLOQUE DE CORRECCIÓN (BASE)
============================================================ */

.bazan-correccion {
    margin-top: 20px;
    padding: 18px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.bazan-correccion strong {
    color: #1a1d2e;
}

.bazan-correccion .ok {
    color: #2e7d32;
    font-weight: bold;
}

.bazan-correccion .ko {
    color: #c62828;
    font-weight: bold;
}

.bazan-correccion .blanco {
    color: #616161;
    font-style: italic;
}

/* ============================================================
   ACLARACIÓN (ARTÍCULOS Y NORMAS)
============================================================ */

.bazan-correccion .aclaracion {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    font-size: 0.9rem;
    color: #444;
}

/* ============================================================
   BLOQUE DE CORRECCIÓN (ACIERTO / FALLO)
============================================================ */

.bazan-correccion-acierto {
    background: #e6f7e6;
    border: 1px solid #4caf50;
}

.bazan-correccion-fallo {
    background: #fdeaea;
    border: 1px solid #d9534f;
}

.bazan-correccion-blanco {
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

/* ============================================================
   MODO OSCURO — BLOQUE DE CORRECCIÓN
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro .bazan-correccion {
    color: #f0f0f0 !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .bazan-correccion strong {
    color: #ffffff !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .bazan-correccion .aclaracion {
    color: #f0f0f0 !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .bazan-correccion-acierto {
    background: #1f3a1f !important;
    border-color: #7dff7d !important;
    color: #d6ffd6 !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .bazan-correccion-fallo {
    background: #3a1f1f !important;
    border-color: #ff6b6b !important;
    color: #ffdede !important;
}

/* ============================================================
   MODO OSCURO — OPCIONES
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro .opcion-test.acierto {
    background: #1f3a1f !important;
    border-color: #7dff7d !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .opcion-test.fallo {
    background: #3a1f1f !important;
    border-color: #ff6b6b !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .bazan-correccion-blanco {
    background: #2b2b2b !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}


/* ============================================================
   NOTA DENTRO DEL GRAFICO CIRCULAR EN EL INFORME FINAL DE CADA TEST
============================================================ */

.grafico-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    display: inline-block;
}

.grafico-centro-nota {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: bold;
    pointer-events: none;
}

.nota-verde { color: #4caf50; }
.nota-roja  { color: #d9534f; }

/* ============================================================
   INTERRUPTOR PARA MARCAR PARA SEGUIMIENTO DE PREGUNTAS
============================================================ */

.follow-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
}

.follow-switch input.real-check {
    display: none; /* ocultamos el checkbox real */
}

.follow-switch .slider {
    width: 46px;
    height: 24px;
    background: #ccc; /* gris apagado */
    border-radius: 24px;
    position: relative;
    transition: background 0.25s ease;
    min-width: 46px;   /* ⭐ evita que el óvalo se encoja horizontalmente */
    min-height: 24px;  /* ⭐ evita que se aplaste verticalmente */
    flex-shrink: 0;    /* ⭐ impide que el flex lo comprima */
}

.follow-switch .slider::before {
    content: "";
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.follow-switch input.real-check:checked + .slider {
    background: #f0a500; /* naranja activo */
}

.follow-switch input.real-check:checked + .slider::before {
    transform: translateX(22px);
}


/* ============================================================
   PREGUNTA DESTACADA EN LA CORRECCIÓN DEL TEST
============================================================ */

/* SOLO borde lateral naranja */
.test-pregunta.pregunta-seguimiento {
    border-left: 5px solid #f0a500;
    padding-left: 14px; /* compensa el borde */
    background: #fff;
}

/* Aviso de seguimiento */
.bazan-pregunta-destacada {
    margin: 0 0 10px 0;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d48806; /* naranja suave */
    font-weight: 600;
    font-size: 15px;
}

/* Ojo más grande */
.bazan-pregunta-destacada .icono-ojo {
    font-size: 20px; /* antes 15px aprox */
    line-height: 1;
}


/* ============================================================
   Icono de estadísticas y nota junto al test una vez realizado
============================================================ */

/* Contenedor principal de cada material: alineación perfecta */
.material-item {
    display: flex;
    align-items: center;        /* Alineación vertical perfecta */
    justify-content: space-between;
    width: 100%;
    padding-right: 6px;         /* Aire al borde derecho */
}

/* Bloque izquierdo: icono + nombre del material */
.material-item-info {
    flex-grow: 1;               /* Ocupa todo el espacio disponible a la izquierda */
    display: flex;
    align-items: center;
    gap: 6px;                   /* Espacio entre icono y nombre */
}

/* Bloque central: nota + icono de estadísticas */
.material-item-acciones {
    display: flex;
    align-items: center;
    gap: 10px;                  /* Separación entre nota y 📊 */
    margin-left: auto;          /* Empuja este bloque hacia la derecha */
}

/* Nota del test: ancho fijo para evitar saltos */
.nota-test {
    display: inline-block;
    width: 60px;                /* Ancho fijo para estabilizar la alineación */
    text-align: right;          /* Alinea los números a la derecha */
    font-weight: bold;
    color: inherit;             /* Evita herencias indeseadas */
}

/* === COLORES DE LA NOTA SEGÚN APROBADO / SUSPENSO === */

/* Aprobado */
.nota-verde {
    color: #4caf50;
    font-weight: bold;
}

/* Suspenso */
.nota-roja {
    color: #d9534f;
    font-weight: bold;
}

/* Sin intentos */
.nota-gris {
    color: #999;
    font-weight: bold;          /* Coherencia visual */
}

/* Icono de estadísticas */
.icono-estadisticas {
    font-size: 18px;
    opacity: 0.4;               /* Estado gris por defecto */
}

.icono-estadisticas.activo {
    opacity: 1;                 /* Activo cuando hay intentos */
    cursor: pointer;
}

/* Botón ⋮ del admin */
.material-item-opciones-btn {
    margin-left: 10px;          /* Separación respecto a nuestros iconos */
}

/* ============================
   Estilos del informe final
============================ */

.bazan-informe-final input[type="radio"] {
    pointer-events: none; /* Bloqueo total: el alumno no puede marcar nada */
    opacity: 0.5;         /* Apariencia apagada para indicar que no es interactivo */
}

.bazan-informe-final .opcion {
    cursor: default;      /* El cursor no sugiere que sea clicable */
    opacity: 0.7;         /* Ligero apagado visual del bloque de opción */
}

.bazan-informe-final .opcion.correcta {
    opacity: 1;           /* La opción correcta se mantiene clara y visible */
}

.bazan-informe-final .opcion.incorrecta {
    opacity: 0.7;         /* Las incorrectas se muestran atenuadas */
}

/* ====================================
   Estilos informe al iniciar el test
==================================== */

/* ===== CONTENEDOR GENERAL ===== */
.test-detalle {
    font-family: inherit;
    color: #333;
    line-height: 1.5;
}

/* ===== TÍTULOS ===== */
.titulo-principal {
    margin-top: 0;
    color: rgb(0,127,162);
    font-size: 1.4em;
    margin-bottom: 16px;
}

.titulo-bloque {
    margin-top: 28px;
    color: rgb(0,127,162);
    font-size: 1.2em;
    margin-bottom: 12px;
}

/* ====================================
   BLOQUE PRINCIPAL EN DOS COLUMNAS
==================================== */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    margin-bottom: 20px;
}

.info-item {
    background: #eef4f6;
    padding: 12px 14px;
    border-left: 4px solid rgb(0,127,162);
    border-radius: 4px;
}

/* ====================================
   SISTEMA DE PUNTUACIÓN (3 columnas)
==================================== */
.test-puntuacion {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.test-p-item {
    flex: 1;
    padding: 14px;
    border-radius: 4px;
    text-align: center;
    font-size: 0.95em;
}

/* Valor numérico */
.test-p-item span {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 4px;
}

/* ===== COLORES PERSONALIZADOS ===== */

/* ACIERTOS */
.test-p-aciertos {
    border-left: 4px solid #008a3e;
    background: #e6f4ec;
}
.test-p-aciertos span {
    color: #008a3e;
}

/* FALLOS */
.test-p-fallos {
    border-left: 4px solid #c62828;
    background: #fdecea;
}
.test-p-fallos span {
    color: #c62828;
}

/* BLANCAS */
.test-p-blancas {
    border-left: 4px solid #000;
    background: #f2f2f2;
}
.test-p-blancas span {
    color: #000;
}

/* ====================================
   BLOQUE DE CONFIGURACIÓN
==================================== */
.test-info {
    background: #f7f9fa;
    border-left: 4px solid rgb(0,127,162);
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 18px;
}

/* ====================================
   ACLARACIÓN (si la usas en otros sitios)
==================================== */
.test-aclaracion {
    background: #fff7e6;
    border-left: 4px solid #ff9800;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* ====================================
   BOTÓN
==================================== */
.bazan-btn-primario {
    background: rgb(0,127,162);
    color: white;
    padding: 10px 18px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.bazan-btn-primario:hover {
    background: rgb(0,110,140);
}

/* ====================================
   MODAL PARA LOS INFORMES FINALES QUE SE ABREN DESDE LAS ESTADÍSTICAS DE CADA TEST
==================================== */

.bazan-modal-informe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999; /* por encima de todo */
    display: none;  /* se activa por JS */
    font-family: inherit;
}

.bazan-modal-informe-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
}

.bazan-modal-informe-contenido {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90%;
    margin: 40px auto;
    background: #fff;
    border-radius: 10px;
    padding: 25px 30px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    animation: bazanInformeFadeIn 0.25s ease-out;
}

/* Animación suave */
@keyframes bazanInformeFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Botón cerrar — versión corporativa */
.bazan-modal-informe-cerrar {
    position: absolute;
    top: 12px;
    right: 12px;

    background: rgb(0,127,162);   /* color corporativo */
    color: #fff;

    border: none;
    width: 32px;
    height: 32px;

    border-radius: 50%;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background 0.2s ease, transform 0.15s ease;
}

.bazan-modal-informe-cerrar:hover {
    background: rgb(0,100,130);
    transform: scale(1.07);
}

.bazan-modal-informe-cerrar svg {
    pointer-events: none;
}

/* Scroll interno */
#bazan-modal-informe-html {
    margin-top: 20px;
}

/* Ajuste para informes largos */
.bazan-modal-informe-contenido::-webkit-scrollbar {
    width: 10px;
}

.bazan-modal-informe-contenido::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}

.bazan-modal-informe-contenido::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* ============================================================
   MODAL DE INFORME — OPTIMIZACIÓN PARA MÓVIL
============================================================ */

@media (max-width: 767px) {

    .bazan-modal-informe-contenido {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .bazan-informe-final {
        padding: 10px !important;
    }

}


/* ============================================
   ESTILO DEL MENSAJE PEDAGÓGICO EN EL MODAL
============================================ */
.bazan-aviso-pedagogico {
    background: #f7f9fa;                 /* fondo suave */
    border-left: 5px solid rgb(0,127,162); /* acento corporativo */
    padding: 18px 20px;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.55;
    color: #333;
    margin-top: 10px;
}

.bazan-aviso-pedagogico strong {
    color: rgb(0,127,162);
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.bazan-aviso-pedagogico p {
    margin: 10px 0;
}


/* ====================================
   GRÁFICO DE BARRAS PARA EL HISTÓRICO DE INTENTOS DE UN TEST CONCRETO
==================================== */

.mini-barra {
    display: flex;
    width: 100%;
    height: 10px;
    border-radius: 6px;
    overflow: hidden;
    background: #e5e5e5;
}

.mini-barra span {
    height: 100%;
    transition: width 0.4s ease;
}

.mini-barra .aciertos {
    background: #4caf50;
}

.mini-barra .fallos {
    background: #d9534f;
}

.mini-barra .blancas {
    background: #ffca28;
}

/* Leyenda */
.mini-leyenda {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.9;
    flex-wrap: wrap;
}

.mini-leyenda span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mini-leyenda .punto {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.mini-leyenda .aciertos {
    background: #4caf50;
}

.mini-leyenda .fallos {
    background: #d9534f;
}

.mini-leyenda .blancas {
    background: #ffca28;
}


/*============================================================
   REPASO FOCALIZADO
============================================================*/

.bazan-repaso-pre {
    padding: 20px;
}

.bazan-repaso-opciones {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bazan-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.bazan-repaso-contador {
    margin: 15px 0;
    font-weight: bold;
    font-size: 14px;
}

.bazan-repaso-iniciar {
    width: 100%;
    margin-top: 10px;
}

.bazan-repaso-panel {
    padding: 20px;
}


/*============================================================
   DRAG & DROP
============================================================*/

    /* ============================================================
    EFECTO VISUAL AL ARRASTRAR
    El elemento se vuelve invisible pero mantiene su espacio,
    y la ghost image del navegador es lo que "llevas en la mano".
    ============================================================ */
    .material-item.dragging {
        background-color: rgba(255, 80, 80, 0.25); /* rojo suave */
        border: 1px solid rgba(255, 80, 80, 0.4);
        transform: scale(1.02);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    }

    /* ============================================================
    ANIMACIÓN SUAVE PARA TODOS LOS ITEMS
    Hace que el reordenamiento sea fluido cuando los elementos
    se recolocan alrededor del placeholder.
    ============================================================ */
    .material-item {
        transition: transform 0.15s ease;
    }

    /* ============================================================
    PLACEHOLDER VISUAL
    Indica claramente dónde va a caer el elemento arrastrado.
    Es un bloque del mismo tamaño que un item, con borde punteado.
    ============================================================ */
    .material-placeholder {
        height: 48px; /* Ajusta según la altura real de tus items */
        border: 2px dashed #4a90e2;
        border-radius: 6px;
        margin: 6px 0;
        background: rgba(74, 144, 226, 0.05);
    }

    /* ============================================================
    HOVER DE DROP EN EL ÁRBOL (carpetas)
    ============================================================ */

    #materiales-arbol .nodo-linea.drop-hover {
        background: rgba(0, 120, 255, 0.15);   /* Azul suave */
        border-left: 3px solid #0078ff;        /* Indicador claro de destino */
        padding-left: 4px;                     /* Evita que el borde tape el texto */
        transition: background 0.15s ease, border-left 0.15s ease;
    }

    /* Evitar que el texto se mueva al aparecer el borde */
    #materiales-arbol .nodo-linea {
        box-sizing: border-box;
    }

    .material-item.dragging {
        opacity: 0.4;
    }

    #materiales-arbol .nodo-linea {
        min-height: 28px;
        display: flex;
        align-items: center;
        cursor: pointer;
    }


/* ============================================================
   MODAL DE COPIAR (usa el mismo estilo que bazan-modal)
============================================================ */

.bazan-modal-copiar {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.bazan-modal-copiar .bazan-modal-contenido {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    width: 350px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.bazan-modal-copiar .bazan-btn {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    background: #0073aa;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    border: none;
}

.bazan-modal-copiar .bazan-btn:hover {
    background: #005f8d;
}

.bazan-modal-copiar .bazan-btn-cerrar {
    margin-top: 15px;
    background: #ccc;
    color: #333;
}

/* ============================================================
   MODAL DE FECHAS (usa el mismo estilo que bazan-modal)
============================================================ */

#bazan-materiales-fechas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none; /* se activa desde JS */
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

#bazan-materiales-fechas-modal {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    width: 420px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#bazan-materiales-fechas-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
}

.bazan-fechas-intervalo {
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fafafa;
}

.bazan-fechas-intervalo h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 600;
}

.bazan-fechas-intervalo label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.bazan-fechas-intervalo input[type="date"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Botones del modal */
.bazan-materiales-fechas-botones {
    margin-top: 20px;
    text-align: center;
}

#bazan-materiales-fechas-guardar,
#bazan-materiales-fechas-cerrar {
    display: inline-block;
    margin: 5px;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

#bazan-materiales-fechas-guardar {
    background: #0073aa;
    color: white;
}

#bazan-materiales-fechas-guardar:hover {
    background: #005f8d;
}

#bazan-materiales-fechas-cerrar {
    background: #ccc;
    color: #333;
}

#bazan-materiales-fechas-cerrar:hover {
    background: #b5b5b5;
}

/* ============================================================
   COLORES FECHAS DESDE Y HASTA — VERSIÓN MEJORADA
============================================================ */

/* Contenedor del intervalo */
.material-intervalo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-left: 8px;   /* separación respecto al nombre */
}

/* Activo (negro) */
.intervalo-activo {
    color: #000000;
}

/* Próximo (rojo vivo) */
.intervalo-proximo {
    color: #ff1a1a;           /* rojo más vivo */
}

/* Finalizado (azul vivo) */
.intervalo-finalizado {
    color: #1a66ff;           /* azul más vivo */
}

/* Iconos según estado (solo CSS, sin tocar HTML) */
.intervalo-activo::before,
.intervalo-proximo::before,
.intervalo-finalizado::before {
    content: "📅";
    font-size: 11px;
    line-height: 1;
}

/* Colores de los iconos */
.intervalo-activo::before {
    color: #000000;
}

.intervalo-proximo::before {
    color: #ff1a1a;
}

.intervalo-finalizado::before {
    color: #1a66ff;
}

.material-item-info {
    display: flex;
    flex-direction: row;     /* todo en una fila */
    align-items: center;     /* icono, nombre e intervalo alineados */
    gap: 6px;                /* separación natural */
    flex-wrap: wrap;         /* por si el nombre es largo */
}

/* ============================================================
   MODAL DE ACCESO (idéntico al de FECHAS, pero más ancho)
============================================================ */

#bazan-materiales-acceso-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none; /* se activa desde JS */
    align-items: center;
    justify-content: center;
    padding: 40px 0; /* evita que el modal toque arriba/abajo */
    z-index: 99999;
}

#bazan-materiales-acceso-modal {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    width: 700px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);

    /* 🔥 IMPORTANTE: quitamos scroll del modal */
    max-height: none;
    overflow: visible;
}

#bazan-materiales-acceso-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
}

/* ============================================================
   PESTAÑAS
============================================================ */

.bazan-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.bazan-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    font-size: 15px;
    background: #f5f5f5;
    border-right: 1px solid #ddd;
    user-select: none;
}

.bazan-tab:last-child {
    border-right: none;
}

.bazan-tab-activo {
    background: #fff;
    font-weight: 600;
    border-bottom: 2px solid #0073aa;
}

/* ============================================================
   CONTENIDO DE LAS PESTAÑAS
============================================================ */

.bazan-tab-contenido {
    padding: 5px 0;
}

/* Lista de alumnos (pestaña ACCESO) */
.bazan-lista {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.bazan-item {
    display: flex;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.bazan-item:last-child {
    border-bottom: none;
}

.bazan-item input[type="checkbox"] {
    margin-right: 10px;
}

#bazan-acceso-lista {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 6px; /* para que no tape el scroll */
}

/* ============================================================
   BOTONES DEL MODAL
============================================================ */

.bazan-materiales-acceso-botones {
    margin-top: 20px;
    text-align: center;
}

#bazan-materiales-acceso-guardar,
#bazan-materiales-acceso-cerrar {
    display: inline-block;
    margin: 5px;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

#bazan-materiales-acceso-guardar {
    background: #0073aa;
    color: white;
}

#bazan-materiales-acceso-guardar:hover {
    background: #005f8d;
}

#bazan-materiales-acceso-cerrar {
    background: #ccc;
    color: #333;
}

#bazan-materiales-acceso-cerrar:hover {
    background: #b5b5b5;
}

/* ============================================================
   🔥 NUEVO: ESTILOS PARA EL ÁRBOL DE PRERREQUISITOS
============================================================ */

/* Scroll interno para que el modal no se desborde */
#bazan-tab-prerrequisitos {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 6px;
}

/* Lista del árbol */
.prerreq-arbol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Nodo */
.prerreq-nodo {
    margin: 4px 0;
}

/* Línea del nodo */
.prerreq-linea {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: var(--indent);
}

/* Icono */
.prerreq-icono {
    width: 20px;
    display: inline-block;
}

/* Subcarpetas ocultas */
.prerreq-subcarpetas.oculto {
    display: none;
}

/* Toggle (▸ / ▾) */
.toggle-prerreq {
    cursor: pointer;
    width: 16px;
    display: inline-block;
    user-select: none;
}


/*=================================
CHECK VERDE CUANDO EL ALUMNO HA ABIERTO UN MATERIAL
============================================================ */

.material-visto svg {
    color: #2ecc71; /* verde elegante */
    vertical-align: middle;
    margin-left: 6px;
}


/*============================================================
CENTRAR BOTONES DEL MODAL PARA ELEGIR MODO EXAMEN O MODO ESTUDIO
============================================================*/
/* Tarjeta visual para cada modo */
.modo-explicacion {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px 25px;
    margin: 25px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

/* Título dentro de la tarjeta */
.modo-explicacion h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #1e293b;
}

/* Texto explicativo */
.modo-explicacion p {
    margin-bottom: 20px;
    color: #475569;
    line-height: 1.5;
}

/* ⭐ Centrar SOLO los botones en móvil */
@media (max-width: 768px) {
    .modo-explicacion button {
        display: flex;
        justify-content: center;
        margin: 20px auto 0 auto;
    }
}

/* En escritorio, el botón queda alineado a la izquierda como ahora */


/*============================================================
BOTÓN GUARDADO EXITOSO
============================================================*/

/* Estado visual cuando el progreso se ha guardado */
.bazan-guardado {
    background-color: #d4f7d4 !important;   /* verde clarito */
    border-color: #4caf50 !important;       /* borde verde */
    color: #2e7d32 !important;              /* texto verde oscuro */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.bazan-guardado {
    animation: bazanGuardadoPulse 0.4s ease;
}

@keyframes bazanGuardadoPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

/* ============================================================
   MODO OSCURO — INFORME FINAL COMPLETO
============================================================ */

.bazan-informe-final.modo-oscuro {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
    box-shadow: 0 4px 18px rgba(0,0,0,0.45) !important;
}

/* Tarjeta de resultado */
.bazan-informe-final.modo-oscuro .bazan-informe-resultado {
    background: #2b2b2b !important;
    border-color: #555 !important;
}

.bazan-informe-final.modo-oscuro .bazan-informe-resultado h2 {
    color: #ffffff !important;
}

.bazan-informe-final.modo-oscuro .resultado-datos div {
    color: #e0e0e0 !important;
}

/* Cajas detalle y aprobado */
.bazan-informe-final.modo-oscuro .detalle-box,
.bazan-informe-final.modo-oscuro .aprobado-box {
    background: #2b2b2b !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

.bazan-informe-final.modo-oscuro .detalle-box h3,
.bazan-informe-final.modo-oscuro .aprobado-box h3 {
    border-bottom-color: #666 !important;
    color: #ffffff !important;
}

/* Resultado APROBADO / SUSPENDIDO */
.bazan-informe-final.modo-oscuro .result-ok {
    color: #7dff7d !important;
}

.bazan-informe-final.modo-oscuro .result-bad {
    color: #ff6b6b !important;
}

/* Tarjetas de preguntas */
.bazan-informe-final.modo-oscuro .test-pregunta {
    background: #2b2b2b !important;
    border-color: #555 !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35) !important;
}

.bazan-informe-final.modo-oscuro .test-numero {
    color: #ffffff !important;
}

.bazan-informe-final.modo-oscuro .test-enunciado {
    color: #e0e0e0 !important;
}

/* Opciones base */
.bazan-informe-final.modo-oscuro .opcion-test {
    background: #1e1e1e !important;
    border-color: #555 !important;
}

/* Puntos del resumen */
.punto-aciertos { color: #4caf50; }
.punto-fallos   { color: #d9534f; }
.punto-blancas  { color: #ff9800; }

.bazan-informe-final.modo-oscuro .punto-aciertos {
    color: #7dff7d !important;
}

.bazan-informe-final.modo-oscuro .punto-fallos {
    color: #ff6b6b !important;
}

.bazan-informe-final.modo-oscuro .punto-blancas {
    color: #ffcc80 !important;
}

/* Aviso de configuración */
.bazan-informe-final.modo-oscuro .bazan-informe-config-aviso {
    background: #2b2b2b !important;
    border-left-color: #666 !important;
    color: #e0e0e0 !important;
}

.bazan-informe-final.modo-oscuro .bazan-informe-config-aviso-rojo {
    color: #ff6b6b !important;
}

/* ============================================================
   MODO OSCURO — ELECCIÓN DE MODO
============================================================ */

#bazan-test-alumno-contenedor.modo-oscuro .test-elegir-modo {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-radius: 12px;
    padding: 25px 30px;
}

#bazan-test-alumno-contenedor.modo-oscuro .test-elegir-modo h2 {
    color: #ffffff !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .modo-explicacion {
    background: #2b2b2b !important;
    border: 1px solid #555 !important;
    padding: 20px;
    border-radius: 10px;
}

#bazan-test-alumno-contenedor.modo-oscuro .modo-explicacion h3 {
    color: #ffffff !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .modo-explicacion p {
    color: #e0e0e0 !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .test-elegir-modo hr {
    border-color: #444 !important;
}

/* Botones */
#bazan-test-alumno-contenedor.modo-oscuro .bazan-btn-primario {
    background: #3a3a3a !important;
    color: #ffffff !important;
    border: 1px solid #666 !important;
}

#bazan-test-alumno-contenedor.modo-oscuro .bazan-btn-primario:hover {
    background: #4a4a4a !important;
}

/* ============================================================
   MODO OSCURO — TITULO "Revisión de preguntas"
============================================================ */

.bazan-informe-final.modo-oscuro .bazan-informe-preguntas h2 {
    color: #ffffff !important;
}

/* ===========================================================
    AVISO DE DESLIZA EN LA TABLA DE INTENTOS DE LOS TESTS
    ===========================================================*/
.bazan-tabla-intentos-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.bazan-tabla-intentos {
    width: max-content;   /* ⭐ evita compresión */
    min-width: 100%;      /* ⭐ ocupa todo si cabe */
    border-collapse: collapse;
}

.bazan-tabla-intentos th,
.bazan-tabla-intentos td {
    white-space: nowrap;  /* ⭐ evita que se rompa el contenido */
    padding: 8px 12px;
}

/* AVISO */
.bazan-tabla-scroll-aviso {
    display: none;
}

@media (max-width: 767px) {
    .bazan-tabla-intentos-wrapper .bazan-tabla-scroll-aviso {
        display: block;
        position: absolute;
        right: 10px;
        top: 0px;
        font-size: 12px;
        color: #888;
        background: rgba(255,255,255,0.8);
        padding: 2px 6px;
        border-radius: 4px;
        pointer-events: none;
        animation: bazanScrollHint 1.8s ease-in-out infinite;
    }
}

@keyframes bazanScrollHint {
    0%   { opacity: 0; transform: translateX(0); }
    20%  { opacity: 1; transform: translateX(-4px); }
    40%  { opacity: 1; transform: translateX(4px); }
    60%  { opacity: 1; transform: translateX(-4px); }
    80%  { opacity: 1; transform: translateX(4px); }
    100% { opacity: 0; transform: translateX(0); }
}

/* ============================================================
   BOTÓN OPOSITADATOS
   Color corporativo: #007FA2
============================================================ */

.btn-opositadatos {
    background-color: #007FA2;
    border: 0px;
    color: #ffffff !important;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none !important;
    display: inline-block;
    transition: background-color .15s ease, transform .1s ease;
}

.btn-opositadatos:hover {
    background-color: #f97316;
    transform: translateY(-1px);
}

/* ============================================================
   MAPAS MENTALES (jsMind)
============================================================ */

/* Contenedores principales del mapa */
#jsmind_container,
#mm-fullscreen-container {
    overflow: hidden !important;      /* Evita scroll vertical absurdo */
    position: relative;
    background: #fff;
}

/* Contenedor que envuelve el mapa dentro del panel */
.mapa-detalle {
    overflow: hidden !important;      /* Evita scroll vertical del panel */
}

/* ============================
   Barra de controles
============================ */

.visor-controles {
    display: flex;
    flex-wrap: wrap;               /* Permite varias filas */
    gap: 8px;                      /* Espacio entre botones */
    margin-bottom: 10px;
}

.visor-controles button {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #f7f7f7;
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;           /* Evita cortes raros de texto */
}

.visor-controles button:hover {
    background: #eaeaea;
}

/* Controles fullscreen */
.visor-controles-fullscreen {
    margin-bottom: 12px;
    background: #fafafa;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* ============================
   Modal fullscreen
============================ */

#mm-modal {
    overflow: hidden !important;      /* El mapa controla pan/zoom */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: white;
    z-index: 99999;
    padding: 10px;
}

/* Evitar scroll de la página cuando está abierto el modal */
body.mm-fullscreen-abierto {
    overflow: hidden !important;
}

/* ============================
   Estilos de nodos jsMind
============================ */

jmnode {
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
    transition: all .2s ease !important;

    /* 🔥 La única regla necesaria para mostrar texto completo */
    max-width: none !important;
}

jmnode:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.20) !important;
}

/* Líneas */
jmline {
    stroke-width: 2px !important;
    stroke: #b8c0cc !important;
}

/* Expander (+) */
.jmexpander {
    width: 14px !important;
    height: 14px !important;
    background: #333 !important;
    border-radius: 50% !important;
}

/* ============================
   Colores por nivel
============================ */

jmnode.nivel-1 {
    background-color: rgb(0,127,162) !important;
    color: #fff !important;
}

jmnode.nivel-2 {
    background-color: #A8E6CF !important;
    color: #000 !important;
}

jmnode.nivel-3 {
    background-color: #FFD3B6 !important;
    color: #000 !important;
}

jmnode.nivel-4 {
    background-color: #FFAAA5 !important;
    color: #000 !important;
}

jmnode.nivel-5 {
    background-color: #D4C1EC !important;
    color: #000 !important;
}

jmnode.nivel-6 {
    background-color: #CCE5FF !important;
    color: #000 !important;
}

/* Selección: debe prevalecer sobre cualquier nivel */
jmnode.selected {
    background-color: #11f !important;
    color: #fff !important;
}
