/* =========================================================
   COORDIKIDS
   ESTILOS GENERALES
   ========================================================= */


/* =========================================================
   CONFIGURACIÓN GENERAL
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f4f7fa;
    color: #333;
}


/* =========================================================
   PÁGINA DE INICIO / LOGIN
   ========================================================= */

.pagina-inicio {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background-color: #f4f7fa;
}


.contenedor-inicio {
    width: 100%;
    max-width: 480px;
    text-align: center;
}


.logo-inicio {
    margin-bottom: 15px;
}


.logo-inicio img {
    width: 110px;
    height: 110px;
    object-fit: contain;
}


.contenedor-inicio h1 {
    color: #2f5d7c;
    font-size: 34px;
    margin-bottom: 5px;
}


.subtitulo-inicio {
    color: #777;
    font-size: 16px;
    margin-bottom: 30px;
}


/* =========================================================
   LOGIN
   ========================================================= */

.formulario-login {
    background-color: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.10);
    text-align: left;
}


.formulario-login h2 {
    text-align: center;
    color: #2f5d7c;
    margin-bottom: 10px;
}


.texto-login {
    text-align: center;
    color: #777;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}


/* =========================================================
   FORMULARIOS
   ========================================================= */

.grupo-formulario {
    margin-bottom: 18px;
}


.grupo-formulario label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
    color: #444;
    font-size: 14px;
}


.grupo-formulario input,
.grupo-formulario select,
.grupo-formulario textarea {
    width: 100%;
    border: 1px solid #d5dce2;
    border-radius: 8px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    background-color: white;
    color: #333;
    outline: none;
}


.grupo-formulario input:focus,
.grupo-formulario select:focus,
.grupo-formulario textarea:focus {
    border-color: #3f7cac;
    box-shadow: 0 0 0 2px rgba(63, 124, 172, 0.10);
}


.grupo-formulario textarea {
    resize: vertical;
    min-height: 100px;
}


/* =========================================================
   BOTÓN PRINCIPAL
   ========================================================= */

.boton-principal {
    border: none;
    background-color: #3f7cac;
    color: white;
    padding: 11px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}


.boton-principal:hover {
    background-color: #315f83;
}


/* =========================================================
   BOTÓN INICIAR (login, registro y «Preparar sesión»)
   ========================================================= */

.boton-iniciar {
    width: 100%;
    border: none;
    background-color: #3f7cac;
    color: white;
    padding: 13px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}


.boton-iniciar:hover {
    background-color: #315f83;
}


/* =========================================================
   BOTÓN REGISTRO
   ========================================================= */

.boton-registro {
    width: 100%;
    border: 1px solid #3f7cac;
    background-color: white;
    color: #3f7cac;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}


.boton-registro:hover {
    background-color: #eef5fa;
}


/* =========================================================
   SEPARADOR LOGIN
   ========================================================= */

.separador-login {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: #999;
}


.separador-login::before,
.separador-login::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #ddd;
}


.separador-login span {
    font-size: 13px;
}


/* =========================================================
   TEXTO REGISTRO
   ========================================================= */

.registro-texto {
    text-align: center;
    color: #777;
    font-size: 14px;
    margin-bottom: 10px;
}


/* =========================================================
   BOTÓN CANCELAR
   ========================================================= */

.boton-cancelar {
    border: 1px solid #ccc;
    background-color: white;
    color: #555;
    padding: 11px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}


.boton-cancelar:hover {
    background-color: #f1f1f1;
}


.boton-volver-login {
    width: 100%;
    margin-top: 10px;
}


/* =========================================================
   BARRA SUPERIOR
   ========================================================= */

.barra-superior {
    height: 65px;
    background-color: #2f5d7c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
}


.logo-titulo {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
}


.rol-usuario {
    font-size: 15px;
    opacity: 0.95;
}


/* =========================================================
   ESTRUCTURA DEL PANEL
   ========================================================= */

.contenedor-panel {
    display: flex;
    min-height: calc(100vh - 65px);
}


/* =========================================================
   MENÚ LATERAL
   ========================================================= */

.menu-lateral {
    width: 230px;
    background-color: white;
    border-right: 1px solid #e0e5e9;
    padding: 20px 12px;
}


.menu-item {
    width: 100%;
    border: none;
    background-color: transparent;
    color: #555;
    text-align: left;
    padding: 13px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}


.menu-item:hover {
    background-color: #eef5fa;
    color: #2f5d7c;
}


.menu-item.activo {
    background-color: #e5f0f7;
    color: #2f5d7c;
    font-weight: bold;
}


/* =========================================================
   CONTENIDO
   ========================================================= */

.contenido-panel {
    flex: 1;
    padding: 30px;
    overflow-x: auto;
}


.seccion {
    display: none;
}


.seccion.activa {
    display: block;
}


.seccion h1 {
    color: #2f5d7c;
    margin-bottom: 8px;
}


.seccion h2 {
    color: #444;
    margin-bottom: 20px;
}


.descripcion-seccion {
    color: #777;
    margin-bottom: 25px;
    line-height: 1.5;
}


/* =========================================================
   ENCABEZADO DE SECCIÓN
   ========================================================= */

.encabezado-seccion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}


/* =========================================================
   TARJETAS
   ========================================================= */

.tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    margin-top: 20px;
}


.tarjeta {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}


.tarjeta h3 {
    color: #555;
    font-size: 15px;
    margin-bottom: 15px;
}


.numero {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #3f7cac;
}


/* =========================================================
   CONTENEDOR DE FORMULARIOS
   ========================================================= */

.formulario-contenedor {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}


.formulario-contenedor p {
    color: #666;
    line-height: 1.6;
}


/* =========================================================
   BOTONES DE FORMULARIO
   ========================================================= */

.botones-formulario {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}


/* =========================================================
   TABLAS
   ========================================================= */

.tabla-contenedor {
    width: 100%;
    overflow-x: auto;
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}


table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}


thead {
    background-color: #eef5fa;
}


th {
    color: #2f5d7c;
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid #dfe6eb;
}


td {
    padding: 13px 12px;
    border-bottom: 1px solid #edf0f2;
    color: #555;
    font-size: 14px;
}


tbody tr:hover {
    background-color: #fafcfd;
}


/* =========================================================
   BOTONES PEQUEÑOS
   ========================================================= */

.boton-pequeno {
    border: none;
    background-color: #3f7cac;
    color: white;
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    margin-right: 5px;
}


.boton-pequeno:hover {
    background-color: #315f83;
}


/* =========================================================
   BOTÓN ELIMINAR
   ========================================================= */

.boton-eliminar {
    border: none;
    background-color: #c94c4c;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}


.boton-eliminar:hover {
    background-color: #aa3d3d;
}


/* =========================================================
   INFORMACIÓN DE ACTIVIDAD
   ========================================================= */

.informacion-actividad {
    background-color: #eef5fa;
    border-left: 4px solid #3f7cac;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
}


/* =========================================================
   MODALES
   ========================================================= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}


.modal.mostrar {
    display: flex;
}


.modal-contenido {
    position: relative;
    width: 420px;
    max-width: 90%;
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.20);
    text-align: center;
    animation: aparecerModal 0.2s ease;
}


@keyframes aparecerModal {

    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }

}


.modal-contenido h2 {
    margin-top: 5px;
    margin-bottom: 20px;
    font-size: 22px;
    color: #2f5d7c;
}


.modal-contenido > div {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
}


#modalMensaje,
#adminModalMensaje,
#tecnicoModalMensaje,
#loginModalMensaje {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
}


.modal-cerrar {
    position: absolute;
    top: 10px;
    right: 15px;
    border: none;
    background: transparent;
    font-size: 28px;
    color: #777;
    cursor: pointer;
}


.modal-cerrar:hover {
    color: #333;
}


.modal-boton {
    border: none;
    background-color: #3f7cac;
    color: white;
    padding: 11px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}


.modal-boton:hover {
    background-color: #315f83;
}


/* =========================================================
   ESTADOS
   ========================================================= */

.estado-pendiente {
    color: #b57a00;
    font-weight: bold;
}


.estado-resuelto {
    color: #3d8b57;
    font-weight: bold;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    .menu-lateral {
        width: 190px;
    }

    .contenido-panel {
        padding: 20px;
    }

    .encabezado-seccion {
        flex-direction: column;
        align-items: flex-start;
    }

}


@media (max-width: 600px) {

    .pagina-inicio {
        padding: 15px;
    }


    .contenedor-inicio h1 {
        font-size: 28px;
    }


    .formulario-login {
        padding: 22px;
    }


    .contenedor-panel {
        flex-direction: column;
    }


    .menu-lateral {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e5e9;
        display: flex;
        overflow-x: auto;
        padding: 10px;
    }


    .menu-item {
        min-width: 140px;
        margin-right: 5px;
        margin-bottom: 0;
    }


    .barra-superior {
        padding: 0 15px;
    }


    .contenido-panel {
        padding: 15px;
    }


    .tarjetas {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   PANEL DEL FAMILIAR
   ========================================================= */

.buscador {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}


.buscador input {
    flex: 1;
    min-width: 200px;
    border: 1px solid #d5dce2;
    border-radius: 8px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}


.buscador input:focus {
    border-color: #3f7cac;
    box-shadow: 0 0 0 2px rgba(63, 124, 172, 0.10);
}


.ficha-paciente {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}


.ficha-paciente h2,
.tabla-contenedor h2 {
    color: #2f5d7c;
    font-size: 18px;
    margin-bottom: 18px;
}


.datos-paciente {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 15px;
}


.dato {
    background-color: #f4f9fc;
    border-radius: 10px;
    padding: 14px 16px;
}


.dato small {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 6px;
}


.dato strong {
    color: #2f5d7c;
    font-size: 16px;
}


.nota-resultados {
    margin-top: 18px;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}


.mensaje-vacio {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    color: #777;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}


/* =========================================================
   ROLES MÚLTIPLES Y SELECTOR DE PANEL
   ========================================================= */

.checks-roles {
    text-align: left;
}


.checks-roles label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    font-weight: normal;
    font-size: 14px;
    color: #444;
    cursor: pointer;
}


.checks-roles input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
    cursor: pointer;
}


.selector-panel {
    margin-left: 12px;
    padding: 5px 8px;
    border: none;
    border-radius: 6px;
    background-color: white;
    color: #2f5d7c;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}


.detalle-paciente {
    margin-top: 25px;
}


td .boton-eliminar {
    padding: 7px 12px;
    font-size: 12px;
}


/* =========================================================
   SOLICITUDES DE ROL
   ========================================================= */

.estado-rechazado {
    color: #c94c4c;
    font-weight: bold;
}


.boton-barra {
    margin-left: 12px;
    padding: 5px 12px;
    border: 1px solid white;
    border-radius: 6px;
    background-color: transparent;
    color: white;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}


.boton-barra:hover {
    background-color: rgba(255, 255, 255, 0.15);
}


.modal-contenido .botones-formulario {
    justify-content: center;
}


.mensaje-ok,
.mensaje-error {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}


.mensaje-ok {
    background-color: #e8f5ec;
    color: #3d8b57;
}


.mensaje-error {
    background-color: #fbeaea;
    color: #c94c4c;
}


.lista-solicitudes {
    margin-top: 22px;
    padding-top: 15px;
    border-top: 1px solid #e3e8ec;
    text-align: left;
    font-size: 14px;
    color: #555;
}


.item-solicitud {
    padding: 6px 0;
}


/* =========================================================
   PACIENTES: FORMULARIO AMPLIADO, FICHA, ASISTENTE
   ========================================================= */

.fila-formulario {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    column-gap: 18px;
}


.subtitulo-formulario {
    color: #2f5d7c;
    font-size: 16px;
    margin: 22px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e3e8ec;
}


.ayuda-formulario {
    color: #777;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 15px;
}


.dato-ancho {
    grid-column: 1 / -1;
}


.dato-ancho strong {
    display: block;
    font-weight: normal;
    font-size: 14px;
    line-height: 1.5;
    color: #444;
    white-space: pre-wrap;
}


.caja-credenciales {
    background-color: #eef5fa;
    border-left: 4px solid #3f7cac;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 15px;
    text-align: left;
    line-height: 1.7;
    font-size: 14px;
}


.nueva-nota {
    margin-bottom: 20px;
}


.nueva-nota textarea {
    width: 100%;
    border: 1px solid #d5dce2;
    border-radius: 8px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
    outline: none;
}


.nueva-nota textarea:focus {
    border-color: #3f7cac;
    box-shadow: 0 0 0 2px rgba(63, 124, 172, 0.10);
}


.nota-item {
    padding: 12px 14px;
    margin-bottom: 10px;
    background-color: #f7fafc;
    border-left: 3px solid #3f7cac;
    border-radius: 6px;
}


.nota-cabecera {
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
}


.nota-texto {
    color: #444;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}


.pasos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}


.paso {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #eef1f4;
    color: #888;
    font-size: 13px;
    font-weight: bold;
}


.paso.activo {
    background-color: #3f7cac;
    color: white;
}


.paso.hecho {
    background-color: #e5f0f7;
    color: #2f5d7c;
}


.titulo-paciente {
    color: #2f5d7c;
    font-size: 20px;
    margin: 10px 0 15px;
}


/* =========================================================
   SESIONES: ESTADOS, RESULTADOS Y GRÁFICO DE EVOLUCIÓN
   ========================================================= */

.estado-curso {
    color: #3f7cac;
    font-weight: bold;
}


.grafico-evolucion {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
    margin: 5px auto 0;
}


.filtro-evolucion {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #555;
}


.selector-evolucion {
    padding: 8px 10px;
    border: 1px solid #d5dce2;
    border-radius: 8px;
    background-color: white;
    color: #333;
    font-family: inherit;
    font-size: 14px;
}


.modal-ancho {
    width: 580px;
}


.alineado-izquierda,
.modal-contenido .alineado-izquierda {
    text-align: left;
}


.aviso-password {
    background-color: #fff6e0;
    border-left: 4px solid #e0a100;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 22px;
    color: #6b5200;
    font-size: 14px;
    line-height: 1.6;
}


.aviso-password .boton-principal {
    margin-left: 12px;
    padding: 7px 14px;
    font-size: 13px;
}


/* =========================================================
   TARJETA: CONEXIÓN CON LA META QUEST 3 (panel del operador)
   ========================================================= */

.estado-quest {
    display: block;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}


.estado-quest-conectado {
    color: #3d8b57;
}


.estado-quest-desconectado {
    color: #c94c4c;
}


.estado-quest-espera {
    color: #b57a00;
}


.quest-ultima {
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   INICIO: DETALLE DE LA CONEXIÓN META QUEST 3
   ========================================================= */

.quest-detalle {
    list-style: none;
    margin: 10px 0 8px;
    padding: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.8;
}


.quest-detalle strong {
    color: #2f5d7c;
}


.quest-nota {
    color: #888;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 12px;
}


/* =========================================================
   ACTIVIDADES: PESTAÑAS (ejecutar con las gafas / catálogo)
   ========================================================= */

.act-pestanas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 22px;
    border-bottom: 2px solid #e3e8ec;
}


.act-pestana {
    border: none;
    background: transparent;
    padding: 11px 18px;
    font-size: 15px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: 0.2s;
}


.act-pestana:hover {
    color: #3f7cac;
}


.act-pestana.activa {
    color: #2f5d7c;
    border-bottom-color: #3f7cac;
}


.act-panel {
    display: none;
}


.act-panel.activo {
    display: block;
}


/* =========================================================
   ACTIVIDADES: EJECUTAR CON LAS GAFAS
   ========================================================= */

.ejec-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}


.ejec-chip {
    background-color: white;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #c8d2da;
}


.ejec-chip span {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 3px;
}


.ejec-chip strong {
    font-size: 14px;
    color: #2f5d7c;
}


.ejec-chip-ok {
    border-left-color: #3d8b57;
}

.ejec-chip-ok strong {
    color: #3d8b57;
}


.ejec-chip-warn {
    border-left-color: #b57a00;
}

.ejec-chip-warn strong {
    color: #b57a00;
}


.ejec-chip-off {
    border-left-color: #c94c4c;
}

.ejec-chip-off strong {
    color: #c94c4c;
}


.ejec-paso-cabecera {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}


.ejec-paso-cabecera h2 {
    margin: 0;
}


.ejec-paso-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #3f7cac;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}


.formulario-contenedor p.ejec-ayuda {
    font-size: 13px;
    color: #777;
    margin-top: 8px;
}


/* Tarjetas seleccionables (actividad y dificultad) */

.act-opciones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}


.act-opcion {
    display: block;
    position: relative;
    cursor: pointer;
}


.act-opcion input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}


.act-cuerpo {
    display: block;
    box-sizing: border-box;
    height: 100%;
    padding: 16px;
    border: 2px solid #dbe3e9;
    border-radius: 12px;
    background-color: white;
    transition: 0.2s;
}


.act-cuerpo strong {
    display: block;
    color: #2f5d7c;
    font-size: 16px;
    margin-bottom: 6px;
}


.act-cuerpo small {
    display: block;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}


.dif-puntos {
    float: right;
    color: #3f7cac;
    font-size: 13px;
    letter-spacing: 2px;
}


.act-opcion:hover .act-cuerpo {
    border-color: #3f7cac;
}


.act-opcion input:checked + .act-cuerpo {
    border-color: #3f7cac;
    background-color: #eef5fb;
    box-shadow: 0 0 0 3px rgba(63, 124, 172, 0.18);
}


.act-opcion input:focus-visible + .act-cuerpo {
    outline: 3px solid #3f7cac;
    outline-offset: 2px;
}


/* Envío y estado */

.ejec-envio {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
}


.formulario-contenedor p.ejec-resumen-envio {
    flex: 1 1 260px;
    margin: 0;
    color: #555;
    font-size: 14px;
}


.control-actividad-mensaje {
    margin-top: 14px;
}


.control-actividad-mensaje:empty {
    display: none;
}


#botonEnviarSeleccion:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


.ejec-estado-lista div {
    margin: 6px 0;
    font-size: 14px;
    color: #555;
}


.ejec-estado-lista strong {
    color: #2f5d7c;
}


/* =========================================================
   ACTIVIDADES: CONSULTA, SUPERVISIÓN EN TIEMPO REAL Y OBSERVACIONES
   ========================================================= */

.consulta-info {
    margin: 14px 0 4px;
    padding: 12px 14px;
    background-color: #eef5fb;
    border-left: 4px solid #3f7cac;
    border-radius: 8px;
    color: #2f5d7c;
    font-size: 14px;
    font-weight: bold;
}


.ejec-aviso {
    margin-bottom: 16px;
    padding: 12px 14px;
    background-color: #fff6e0;
    border-left: 4px solid #b57a00;
    border-radius: 8px;
    color: #6b4a00;
    font-size: 14px;
    line-height: 1.5;
}


.sup-cabecera {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}


.sup-estado {
    padding: 10px 18px;
    border-radius: 999px;
    background-color: #e3e8ec;
    color: #555;
    font-weight: bold;
    font-size: 15px;
}


.sup-estado-ok {
    background-color: #dff3e6;
    color: #2d7a47;
}


.sup-estado-warn {
    background-color: #fff1cc;
    color: #8a5d00;
}


.sup-estado-off {
    background-color: #fbe0e0;
    color: #b03a3a;
}


.sup-tiempo {
    text-align: right;
}


.sup-tiempo span {
    display: block;
    font-size: 12px;
    color: #888;
}


.sup-tiempo strong {
    font-size: 34px;
    color: #2f5d7c;
    font-variant-numeric: tabular-nums;
}


.sup-progreso {
    margin-bottom: 18px;
}


.sup-progreso-fondo {
    height: 14px;
    background-color: #e3e8ec;
    border-radius: 999px;
    overflow: hidden;
}


.sup-progreso-barra {
    height: 100%;
    width: 0;
    background-color: #3f7cac;
    border-radius: 999px;
    transition: width 0.4s;
}


.sup-progreso span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #555;
}


.sup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}


.sup-dato {
    background-color: #f5f8fb;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}


.sup-dato span {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}


.sup-dato strong {
    font-size: 24px;
    color: #2f5d7c;
}


.sup-eventos {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    font-size: 13px;
}


.sup-eventos li {
    padding: 6px 10px;
    border-bottom: 1px solid #edf1f4;
    color: #555;
}


.sup-eventos li.sup-evento-bien {
    color: #2d7a47;
}


.sup-eventos li.sup-evento-mal {
    color: #b03a3a;
}


.obs-lista {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}


.obs-lista li {
    padding: 10px 12px;
    margin-bottom: 8px;
    background-color: #f5f8fb;
    border-left: 4px solid #3f7cac;
    border-radius: 8px;
    font-size: 14px;
    color: #444;
}


.obs-lista li strong {
    color: #2f5d7c;
    font-size: 12px;
}


.obs-lista li.obs-vacio {
    background: none;
    border-left: none;
    color: #888;
    padding-left: 0;
}


/* =========================================================
   ACTIVIDADES: INICIAR CONSULTA PRIMERO
   ========================================================= */

.ejec-oculto {
    display: none !important;
}


.tarjeta-consulta {
    border-left: 5px solid #3f7cac;
}


.boton-grande {
    font-size: 17px;
    padding: 14px 30px;
}


.ejec-conexion {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
}


.formulario-contenedor p.ejec-conexion-ok {
    background-color: #dff3e6;
    color: #2d7a47;
}


.formulario-contenedor p.ejec-conexion-warn {
    background-color: #fff1cc;
    color: #8a5d00;
}


.formulario-contenedor p.ejec-conexion-off {
    background-color: #fbe0e0;
    color: #b03a3a;
}


/* =========================================================
   CIERRE, REVISIÓN Y CONSULTAS GUARDADAS
   ========================================================= */

.rev-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}


.rev-info div {
    background-color: #f5f8fb;
    border-radius: 10px;
    padding: 10px 12px;
}


.rev-info span {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 3px;
}


.rev-info strong {
    color: #2f5d7c;
    font-size: 15px;
}


.rev-titulo {
    margin: 18px 0 8px;
    color: #2f5d7c;
    font-size: 16px;
}


.rev-incompleto {
    color: #8a5d00;
    font-weight: bold;
}


.rev-completo {
    color: #2d7a47;
    font-weight: bold;
}


.rev-sindatos {
    color: #888;
}


.rev-final {
    margin-top: 14px;
    padding: 12px 14px;
    background-color: #eef5fb;
    border-left: 4px solid #3f7cac;
    border-radius: 8px;
    color: #2f5d7c;
    white-space: pre-wrap;
}


.detalle-guardada {
    margin-top: 24px;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}


.detalle-guardada-cabecera {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}


/* Opción que todavía no existe en Unity (por ejemplo un nivel de la Actividad 3) */

.act-opcion.act-no-disponible {
    cursor: not-allowed;
}


.act-opcion.act-no-disponible .act-cuerpo {
    opacity: 0.5;
    border-style: dashed;
}


.act-opcion.act-no-disponible:hover .act-cuerpo {
    border-color: #dbe3e9;
}


/* =========================================================
   ACTIVIDAD 2 (FRUTAS): SUPERVISIÓN Y RONDAS
   ========================================================= */

.sup-frutas-ronda {
    margin: 0 0 10px;
    font-weight: bold;
    color: #2f5d7c;
}


.formulario-contenedor p.sup-frutas-ronda {
    color: #2f5d7c;
}


#supFrutas .tabla-contenedor {
    padding: 10px;
    margin-bottom: 14px;
    box-shadow: none;
}


#supFrutas table {
    min-width: 420px;
}


.fruta-completo {
    color: #2d7a47;
    font-weight: bold;
}


.fruta-exceso {
    color: #b03a3a;
    font-weight: bold;
}


.fruta-pendiente {
    color: #8a5d00;
}


.rondas-tabla {
    margin-top: 6px;
}


/* =========================================================
   ACTIVIDADES SIN TERMINAR Y RESULTADO FINAL
   ========================================================= */

#panelPendientes {
    border-left: 5px solid #b57a00;
}


.sup-final {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.6;
}


.sup-final strong {
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
}


.sup-final-ok {
    background-color: #dff3e6;
    border-left: 5px solid #3d8b57;
    color: #2d7a47;
}


.sup-final-incompleta {
    background-color: #fff1cc;
    border-left: 5px solid #b57a00;
    color: #6b4a00;
}


.sup-final-cancelada {
    background-color: #fbe0e0;
    border-left: 5px solid #c94c4c;
    color: #b03a3a;
}


.estado-cancelada {
    color: #b03a3a;
    font-weight: bold;
}


.estado-incompleta {
    color: #8a5d00;
    font-weight: bold;
}


/* =========================================================
   CONTROL DE LA ACTIVIDAD EN LAS GAFAS (órdenes a Unity)
   ========================================================= */

.ctl-estado {
    padding: 10px 14px;
    border-radius: 8px;
    background-color: #f5f8fb;
    color: #2f5d7c;
    font-weight: bold;
}


.formulario-contenedor p.ctl-estado {
    color: #2f5d7c;
}


#panelControlUnity.ctl-decision {
    border-left: 5px solid #3d8b57;
    box-shadow: 0 0 0 3px rgba(61, 139, 87, 0.15), 0 4px 15px rgba(0, 0, 0, 0.06);
}


#panelControlUnity.ctl-decision .ctl-estado {
    background-color: #dff3e6;
}


.formulario-contenedor #panelControlUnity.ctl-decision p.ctl-estado,
#panelControlUnity.ctl-decision p.ctl-estado {
    color: #2d7a47;
}


.ctl-grupo {
    margin-top: 16px;
}


.ctl-grupo .botones-formulario {
    margin-top: 8px;
}


.ctl-fila {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}


#panelControlUnity button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* =========================================================
   HISTORIAL DE CONSULTAS DEL PACIENTE (ficha y Resultados)
   ========================================================= */

.consulta-hist {
    margin-bottom: 10px;
    border: 1px solid #e3e8ec;
    border-radius: 10px;
    background-color: #fafcfd;
}


.consulta-hist summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    list-style-position: inside;
}


.consulta-hist summary strong {
    color: #2f5d7c;
}


.consulta-hist[open] summary {
    border-bottom: 1px solid #e3e8ec;
}


.consulta-hist-cuerpo {
    padding: 4px 14px 14px;
}


.consulta-hist-cuerpo .tabla-contenedor {
    padding: 10px;
    box-shadow: none;
}


.hist-subtitulo {
    margin: 16px 0 6px;
    color: #2f5d7c;
    font-size: 14px;
}


/* =========================================================
   ACTIVIDADES: TRES OPCIONES PRINCIPALES (tarjetas)
   ========================================================= */

.act-hub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 18px 0 24px;
}

.act-hub-tarjeta.act-pestana {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    background-color: white;
    border: 2px solid #e3e8ec;
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0;
    color: #333;
    font-weight: normal;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.act-hub-tarjeta.act-pestana:hover {
    border-color: #9fc0da;
    color: #333;
    transform: translateY(-2px);
}

.act-hub-tarjeta.act-pestana.activa {
    border-color: #3f7cac;
    box-shadow: 0 0 0 3px rgba(63, 124, 172, 0.15), 0 4px 14px rgba(0, 0, 0, 0.06);
}

.act-hub-icono {
    font-size: 26px;
    line-height: 1;
}

.act-hub-texto strong {
    display: block;
    font-size: 16px;
    color: #2f5d7c;
    margin-bottom: 4px;
}

.act-hub-texto small {
    display: block;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.act-hub-estado {
    margin-top: auto;
    font-size: 12px;
    font-weight: bold;
    color: #3f7cac;
    background-color: #eef4f9;
    border-radius: 999px;
    padding: 3px 10px;
}


/* =========================================================
   CATÁLOGO: FICHAS DE LAS ACTIVIDADES
   ========================================================= */

.catalogo-fichas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.ficha-actividad {
    background-color: white;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    border-top: 4px solid #3f7cac;
    line-height: 1.5;
}

.ficha-actividad header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.ficha-icono {
    font-size: 30px;
}

.ficha-actividad h3 {
    color: #2f5d7c;
    font-size: 18px;
}

.ficha-actividad header small {
    color: #888;
}

.ficha-actividad h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3f7cac;
    margin: 12px 0 4px;
}

.ficha-actividad p,
.ficha-actividad li {
    font-size: 14px;
    color: #444;
}

.ficha-actividad ul {
    padding-left: 18px;
}

.ficha-actividad ul.ficha-niveles {
    list-style: none;
    padding-left: 0;
}

.ficha-niveles li {
    margin: 3px 0;
}

.ficha-niveles span {
    display: inline-block;
    min-width: 64px;
    font-size: 12px;
    font-weight: bold;
    color: #2f5d7c;
    background-color: #eef4f9;
    border-radius: 6px;
    padding: 1px 8px;
    margin-right: 6px;
    text-align: center;
}

.ficha-nota {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.catalogo-extra {
    margin-top: 22px;
    background-color: white;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.catalogo-extra summary {
    cursor: pointer;
    font-weight: bold;
    color: #2f5d7c;
}

.catalogo-extra[open] summary {
    margin-bottom: 12px;
}


/* =========================================================
   CONSULTAS GUARDADAS: UNA TARJETA POR CONSULTA
   ========================================================= */

.guardadas-filtro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px;
}

.guardadas-filtro label {
    font-weight: bold;
    color: #2f5d7c;
}

.guardadas-filtro input {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
    padding: 9px 12px;
    border: 1px solid #ccd6de;
    border-radius: 8px;
    font-size: 14px;
}

.guardadas-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guardada-tarjeta {
    background-color: white;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #c8d2da;
}

.guardada-tarjeta.guardada-completa {
    border-left-color: #3d8b57;
}

.guardada-tarjeta.guardada-incompleta {
    border-left-color: #b57a00;
}

.guardada-cabecera {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.guardada-cabecera h3 {
    font-size: 16px;
    color: #2f5d7c;
}

.guardada-cabecera small {
    display: block;
    color: #888;
    font-size: 13px;
    margin-top: 2px;
}

.etiqueta-estado {
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    border-radius: 999px;
    padding: 3px 10px;
    background-color: #eef1f4;
    color: #666;
    white-space: nowrap;
}

.etiqueta-estado.etiqueta-ok {
    background-color: #dff3e6;
    color: #2d7a47;
}

.etiqueta-estado.etiqueta-aviso {
    background-color: #fdf1d8;
    color: #8a5d00;
}

.etiqueta-estado.etiqueta-mal {
    background-color: #fbe3e3;
    color: #a83a3a;
}

.guardada-actividades {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.guardada-actividad {
    font-size: 13px;
    background-color: #f5f8fb;
    border: 1px solid #e3e8ec;
    border-radius: 8px;
    padding: 4px 9px;
}

.guardada-actividad em {
    font-style: normal;
    color: #888;
}

.guardada-pie {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #666;
}


/* =========================================================
   CONFIGURACIÓN ACTIVA (pasos contraídos)
   ========================================================= */

.config-activa {
    border-left: 5px solid #3d8b57;
}

.config-activa-cabecera {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.config-activa-cabecera h2 {
    margin: 0;
}

.config-activa-datos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

.config-activa-datos div {
    background-color: #f5f8fb;
    border-radius: 8px;
    padding: 8px 12px;
}

.config-activa-datos span {
    display: block;
    font-size: 12px;
    color: #888;
}

.config-activa-datos strong {
    font-size: 14px;
    color: #2f5d7c;
}


/* =========================================================
   CONTROL EN LAS GAFAS: QUÉ PASA AHORA Y GRUPOS DE ACCIONES
   ========================================================= */

.ctl-ahora {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.ctl-ahora-dato {
    background-color: #f5f8fb;
    border-radius: 8px;
    padding: 8px 12px;
}

.ctl-ahora-dato span {
    display: block;
    font-size: 12px;
    color: #888;
}

.ctl-ahora-dato strong {
    font-size: 15px;
    color: #2f5d7c;
}

.ctl-insignia {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 13px !important;
    background-color: #eef1f4;
    color: #666 !important;
}

.ctl-insignia.ctl-insignia-curso {
    background-color: #e3eef8;
    color: #2f5d7c !important;
}

.ctl-insignia.ctl-insignia-pausa {
    background-color: #fdf1d8;
    color: #8a5d00 !important;
}

.ctl-insignia.ctl-insignia-ok {
    background-color: #dff3e6;
    color: #2d7a47 !important;
}

.ctl-insignia.ctl-insignia-off {
    background-color: #fbe3e3;
    color: #a83a3a !important;
}

.ctl-grupos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ctl-grupos .ctl-grupo {
    flex: 1 1 240px;
    margin-top: 0;
    border: 1px solid #e3e8ec;
    border-radius: 10px;
    padding: 12px 14px;
}

.ctl-grupos .ctl-grupo h3.rev-titulo {
    margin-top: 0;
}

.ctl-grupos .ctl-grupo-siguiente {
    flex-basis: 100%;
    border-color: #b9d3e7;
    background-color: #fafcfe;
}

#panelControlUnity.ctl-decision .ctl-grupo-siguiente {
    border-color: #3d8b57;
    background-color: #f3faf5;
}

.ctl-campo {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    color: #666;
}

.ctl-nota-cierre {
    margin-top: 12px;
}