
/* =========================================
   SISTEMA DE ASISTENCIA QR
   DISEÑO GLASSMORPHISM CLARO
========================================= */

:root {
    --primary: #078b96;
    --primary-dark: #066b75;
    --background: #eaf3f8;
    --text: #243447;
    --secondary: #75869a;
    --glass: rgba(255, 255, 255, 0.48);
    --glass-border: rgba(255, 255, 255, 0.75);
    --shadow: 0 12px 35px rgba(49, 86, 115, 0.10);
    --radius: 18px;
}

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


body {
    min-height: 100vh;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text);

    background:
        radial-gradient(
            ellipse at 15% 20%,
            rgba(0, 188, 212, 0.30),
            transparent 40%
        ),
        radial-gradient(
            ellipse at 85% 25%,
            rgba(59, 130, 246, 0.25),
            transparent 40%
        ),
        radial-gradient(
            ellipse at 75% 85%,
            rgba(16, 185, 129, 0.22),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            #cbdde9,
            #e7f1f7,
            #d2e5ee
        );

    background-attachment: fixed;
    padding: 25px;
}

/* CONTENEDOR */

.contenedor {
    width: 100%;
    max-width: 1150px;
    margin: auto;
}

/* GLASS GENERAL */


.login-card,
.dashboard,
.modulo {
    background: rgba(255, 255, 255, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.75);

    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);

    box-shadow:
        0 8px 32px rgba(31, 58, 80, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);

    border-radius: var(--radius);
}


/* LOGIN */

.login-card {
    max-width: 420px;
    margin: 7vh auto;
    padding: 40px;
}

.logo {
    width: 65px;
    height: 65px;
    margin: 0 auto 22px;
    border-radius: 19px;
    background: linear-gradient(135deg, #079ba5, #39bac0);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 23px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(7, 139, 150, 0.20);
}

h1 {
    text-align: center;
    font-size: 25px;
    margin-bottom: 10px;
}

.subtitulo {
    text-align: center;
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

/* FORMULARIOS */

.campo {
    margin-bottom: 20px;
}

.campo label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.campo input {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.55);
    outline: none;
    font-size: 14px;
    color: var(--text);
    transition: 0.2s;
}

.campo input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(7, 139, 150, 0.10);
}

/* BOTONES */

button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 11px;
    background: linear-gradient(135deg, #078b96, #20aeb4);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 6px 16px rgba(7, 139, 150, 0.15);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 20px rgba(7, 139, 150, 0.23);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secundario {
    width: auto;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.55);
    color: var(--text);
    border: 1px solid var(--glass-border);
    box-shadow: none;
}

.btn-secundario:hover {
    background: rgba(255, 255, 255, 0.85);
}

/* MENSAJES */

.mensaje {
    min-height: 20px;
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    color: #d04444;
}

/* DASHBOARD */

.dashboard {
    padding: 35px;
}

.oculto {
    display: none;
}

.encabezado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.encabezado h1 {
    text-align: left;
    margin-top: 8px;
}

.encabezado p {
    color: var(--secondary);
}

.etiqueta {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

/* BIENVENIDA */

.bienvenida {
    margin: 35px 0 25px;
    padding: 25px;
    border-radius: 15px;
    background: rgba(220, 245, 242, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.bienvenida h2 {
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.bienvenida p {
    color: var(--secondary);
}

/* MODULOS */

.modulos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.modulo {
    padding: 25px;
    transition: 0.25s;
}

.modulo:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 15px 30px rgba(49, 86, 115, 0.13);
}

.icono {
    font-size: 28px;
}

.modulo h3 {
    margin: 15px 0 8px;
}

.modulo p {
    color: var(--secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* PIE */

.pie {
    margin-top: 30px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}
/* =====================================
   PORTAL DEL PARTICIPANTE
===================================== */

.modulo-seleccionado {
    cursor: pointer;
}

.modulo-seleccionado:hover {
    border-color: rgba(7, 139, 150, 0.4);
}

.modulo-enlace {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}

/* =====================================
   LISTADO DE ACTIVIDADES
===================================== */

.lista-actividades {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 25px;
}

.tarjeta-actividad {
    padding: 22px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 22px rgba(49, 86, 115, 0.08);
}

.actividad-encabezado {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.actividad-encabezado h3 {
    font-size: 18px;
    color: var(--text);
}

.estado-programada {
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.12);
    color: #07845f;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.actividad-descripcion {
    color: var(--secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
}

.actividad-detalles {
    padding-top: 15px;
    border-top: 1px solid rgba(117, 134, 154, 0.18);
}

.actividad-detalles p {
    color: var(--text);
    font-size: 13px;
    margin-bottom: 10px;
}

.estado-actividades {
    grid-column: 1 / -1;
    padding: 25px;
    text-align: center;
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.45);
    border-radius: 12px;
}
/* Botón para seleccionar actividad */

.btn-seleccionar-actividad {
    width: 100%;
    margin-top: 18px;
    padding: 12px;
    font-size: 14px;
}

/* Apartado Mi asistencia */

.asistencia-contenedor {
    margin-top: 25px;
    padding: 25px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.asistencia-contenedor > h2 {
    margin-bottom: 10px;
}

.texto-ayuda {
    color: var(--secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
}

.opciones-asistencia {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 20px;
}

.opcion-asistencia {
    padding: 22px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 14px;
}

.opcion-asistencia h3 {
    margin: 12px 0 8px;
}

.opcion-asistencia p {
    color: var(--secondary);
    font-size: 13px;
    margin-bottom: 18px;
}

.icono-asistencia {
    font-size: 32px;
}

.separador-asistencia {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-weight: 700;
}

.lector-qr {
    width: 100%;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 12px;
}

.resultado-asistencia {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
}

/* Resultado del registro de asistencia */

.resultado-exito {
    background: rgba(16, 185, 129, 0.13);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #08784f;
}

.resultado-error {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.30);
    color: #b42323;
}

#lectorQR video {
    border-radius: 12px;
    max-width: 100%;
}

#lectorQR {
    overflow: hidden;
}


/* LISTA DE ASISTENCIAS DEL PARTICIPANTE */

.tarjeta-asistencia {
    padding: 22px;
    margin-bottom: 16px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.60);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 22px rgba(49, 86, 115, 0.08);
}

.tarjeta-asistencia h3 {
    color: var(--primary-dark);
    margin-bottom: 14px;
    font-size: 17px;
}

.tarjeta-asistencia p {
    color: var(--secondary);
    font-size: 13px;
    margin-bottom: 9px;
}

.btn-cancelar-asistencia {
    width: auto;
    margin-top: 12px;
    padding: 11px 18px;
    background: rgba(220, 53, 69, 0.10);
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: #b42332;
    box-shadow: none;
    font-size: 13px;
}

.btn-cancelar-asistencia:hover {
    background: rgba(220, 53, 69, 0.17);
    box-shadow: none;
}

.texto-historico {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 12px;
    border-radius: 20px;
    background: rgba(117, 134, 154, 0.12);
    color: var(--secondary);
    font-weight: 600;
}

/* BOTÓN PARA QUITAR ACTIVIDAD SELECCIONADA */

.btn-quitar-actividad {
    width: auto;
    margin-top: 15px;
    padding: 10px 17px;
    background: rgba(220, 53, 69, 0.10);
    color: #b42332;
    border: 1px solid rgba(220, 53, 69, 0.25);
    box-shadow: none;
    font-size: 13px;
}

.btn-quitar-actividad:hover {
    background: rgba(220, 53, 69, 0.17);
    box-shadow: none;
}

.btn-deseleccionar-actividad {
    background: rgba(220, 53, 69, 0.10);
    color: #b42332;
    border: 1px solid rgba(220, 53, 69, 0.25);
    box-shadow: none;
}

.btn-deseleccionar-actividad:hover {
    background: rgba(220, 53, 69, 0.17);
    box-shadow: none;
}

/* ==========================================
   MI PERFIL
========================================== */

.tarjeta-perfil {
    padding: 30px;
    margin-top: 25px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 22px rgba(49, 86, 115, 0.08);
}

.encabezado-perfil {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding-bottom: 25px;
}

.avatar-perfil {
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 50%;
    background: linear-gradient(135deg, #078b96, #39bac0);
    color: white;
    font-size: 25px;
    font-weight: 700;
}

.encabezado-perfil h2 {
    margin-bottom: 7px;
    color: var(--text);
}

.rol-perfil {
    color: var(--secondary);
    font-size: 14px;
}

.separador-perfil {
    height: 1px;
    background: rgba(117, 134, 154, 0.20);
    margin-bottom: 25px;
}

.datos-perfil {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.dato-perfil {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

.etiqueta-dato {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 600;
}

.valor-dato {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.estado-cuenta-perfil {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 22px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
}

.estado-cuenta-perfil span {
    color: var(--secondary);
    font-size: 13px;
    font-weight: 600;
}

.estado-activo {
    color: #07845f;
    font-size: 13px;
}

.estado-inactivo {
    color: #b42332;
    font-size: 13px;
}
/* ==========================================
   SELECTOR DE ACTIVIDAD - ADMINISTRADOR
========================================== */

#adminAsistenciaSection .bienvenida {
    padding: 28px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

#adminAsistenciaSection .bienvenida .campo {
    max-width: 650px;
    margin-top: 22px;
    margin-bottom: 5px;
}

#adminAsistenciaSection .campo label {
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 700;
}

#actividadAdminSeleccionada {
    width: 100%;
    min-height: 54px;
    padding: 14px 45px 14px 17px;

    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    background-color: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(7, 139, 150, 0.25);
    border-radius: 13px;

    outline: none;
    cursor: pointer;

    box-shadow: 0 5px 15px rgba(49, 86, 115, 0.05);
    transition: all 0.25s ease;
}

#actividadAdminSeleccionada:hover {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(7, 139, 150, 0.55);
}

#actividadAdminSeleccionada:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(7, 139, 150, 0.12);
}

#actividadAdminSeleccionada option {
    color: var(--text);
    background: white;
    padding: 12px;
}

#actividadAdminSeleccionada:disabled {
    opacity: 0.65;
    cursor: wait;
}

/* Mensaje de actividad seleccionada */

#mensajeActividadEscaneo {
    margin-top: 15px;
    text-align: left;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 600;
}
/* ==========================================
   MÓDULO DE REPORTES
   DISEÑO GLASS CLARO
========================================== */

#reportesAdminSection .bienvenida {
    margin-bottom: 25px;
}

#reportesAdminSection .asistencia-contenedor {
    margin-bottom: 25px;
}

/* ENCABEZADOS */

#reportesAdminSection h2 {
    color: var(--text);
}

#reportesAdminSection .texto-ayuda {
    color: var(--secondary);
    line-height: 1.6;
}

/* CAMPOS Y SELECTORES */

#reportesAdminSection .datos-formulario-participante {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

#reportesAdminSection .campo {
    margin-bottom: 15px;
}

#reportesAdminSection .campo label {
    display: block;
    margin-bottom: 9px;
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 700;
}

#reportesAdminSection .campo input,
#reportesAdminSection .campo select {
    width: 100%;
    min-height: 48px;
    padding: 12px 15px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(7, 139, 150, 0.22);
    border-radius: 12px;
    outline: none;
    transition: all 0.25s ease;
}

#reportesAdminSection .campo input:focus,
#reportesAdminSection .campo select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(7, 139, 150, 0.10);
}

/* BOTONES DE FILTROS */

#reportesAdminSection .acciones-formulario {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

#reportesAdminSection .acciones-formulario button {
    min-width: 160px;
}

/* RESUMEN DE REPORTES */

.resumen-reportes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.resumen-reporte-item {
    padding: 22px 18px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 15px;
    box-shadow: 0 7px 20px rgba(49, 86, 115, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resumen-reporte-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(49, 86, 115, 0.10);
}

.resumen-reporte-item p {
    margin: 0 0 12px;
    color: var(--secondary);
    font-size: 13px;
    font-weight: 600;
}

.resumen-reporte-item h3 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 27px;
    font-weight: 750;
}

/* ENCABEZADO DEL DETALLE */

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

.encabezado-reportes h2 {
    margin-bottom: 7px;
}

.encabezado-reportes .texto-ayuda {
    margin-bottom: 0;
}

#btnExportarReportes {
    min-width: 175px;
}

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

/* TABLA DE REPORTES */

.tabla-reportes-contenedor {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(7, 139, 150, 0.13);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
}

.tabla-reportes {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.tabla-reportes thead {
    background: rgba(7, 139, 150, 0.10);
}

.tabla-reportes th {
    padding: 16px 14px;
    color: var(--primary-dark);
    font-weight: 750;
    white-space: nowrap;
    border-bottom: 1px solid rgba(7, 139, 150, 0.18);
}

.tabla-reportes td {
    padding: 14px;
    color: var(--text);
    border-bottom: 1px solid rgba(7, 139, 150, 0.10);
    white-space: nowrap;
}

.tabla-reportes tbody tr {
    transition: background 0.2s ease;
}

.tabla-reportes tbody tr:hover {
    background: rgba(255, 255, 255, 0.65);
}

.tabla-reportes tbody tr:last-child td {
    border-bottom: none;
}

/* ESTADOS DE ASISTENCIA */

.tabla-reportes .reporte-presente {
    color: #087c55;
    font-weight: 750;
}

.tabla-reportes .reporte-ausente {
    color: #d34d61;
    font-weight: 750;
}

/* MENSAJES */

#mensajeReportes {
    margin-top: 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
}
/* RESPONSIVE */

@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    .login-card {
        padding: 28px 22px;
    }

    .dashboard {
        padding: 22px;
    }

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

    .encabezado {
        align-items: stretch;
    }

    .encabezado h1 {
        font-size: 22px;
    }

    .btn-secundario {
        width: 100%;
        margin-top: 20px;
    }
     .lista-actividades {
        grid-template-columns: 1fr;
    }

    .actividad-encabezado {
        flex-wrap: wrap;
    }
     .tarjeta-perfil {
        padding: 20px;
    }

    .datos-perfil {
        grid-template-columns: 1fr;
    }
    #adminAsistenciaSection .bienvenida {
        padding: 20px;
    }

    #actividadAdminSeleccionada {
        min-height: 50px;
        font-size: 14px;
    }
}
@media(max-width: 700px) {
    .opciones-asistencia {
        grid-template-columns: 1fr;
    }

    .separador-asistencia {
        padding: 5px;
    }
}
@media (max-width: 850px) {
    #reportesAdminSection .datos-formulario-participante {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resumen-reportes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 550px) {
    #reportesAdminSection .datos-formulario-participante {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .resumen-reportes-grid {
        grid-template-columns: 1fr;
    }

    .encabezado-reportes {
        align-items: stretch;
    }

    #btnExportarReportes {
        width: 100%;
    }

    #reportesAdminSection .acciones-formulario {
        flex-direction: column;
    }

    #reportesAdminSection .acciones-formulario button {
        width: 100%;
    }
}

/* ==========================================
   TABLA DE REPORTES RESPONSIVE
========================================== */

@media (max-width: 650px) {
    .tabla-reportes-contenedor {
        overflow: visible;
        border: none;
        background: transparent;
    }

    .tabla-reportes {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 14px;
    }

    .tabla-reportes thead {
        display: none;
    }

    .tabla-reportes tbody {
        display: block;
        width: 100%;
    }

    .tabla-reportes tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 16px;
        padding: 10px 15px;
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(7, 139, 150, 0.17);
        border-radius: 15px;
        box-shadow: 0 7px 20px rgba(49, 86, 115, 0.07);
    }

    .tabla-reportes tbody td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 11px 0;
        white-space: normal;
        text-align: right;
        overflow-wrap: anywhere;
        border-bottom: 1px solid rgba(7, 139, 150, 0.10);
    }

    .tabla-reportes tbody td:last-child {
        border-bottom: none;
    }

    .tabla-reportes tbody td::before {
        content: attr(data-label);
        flex: 0 0 42%;
        color: var(--primary-dark);
        font-size: 12px;
        font-weight: 700;
        text-align: left;
    }

    .tabla-reportes tbody td.reporte-presente,
    .tabla-reportes tbody td.reporte-ausente {
        font-weight: 750;
    }
}

