/* ============================================================
   Área administrativa — SENATI · INNOVATEC
   Estilos del panel: consistente, limpio y profesional.
   ============================================================ */

.body-admin {
    background: linear-gradient(180deg, #f6f8fc 0%, #eef1f7 100%);
    min-height: 100vh;
}

.contenedor-angosto { max-width: 420px; }
.contenedor-ancho   { max-width: 1180px; }

/* ---------- Login ---------- */
.tarjeta-login {
    text-align: center;
    margin-top: 4vh;
    padding: 2rem;
    box-shadow: 0 12px 34px rgba(8, 39, 166, .10), var(--sombra);
}
.tarjeta-login h1 { margin-bottom: .25rem; font-size: 1.3rem; color: var(--azul-osc); }
.tarjeta-login form { text-align: left; }
.tarjeta-login .btn { width: 100%; }
.volver { margin-top: 1rem; }
.volver a { color: var(--gris); }

.login-marca {
    display: flex;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1.4rem;
    box-shadow: var(--sombra);
}
.login-marca img { display: block; height: 64px; width: auto; }

/* ---------- Barra superior del panel ---------- */
.encabezado-admin {
    position: sticky;
    top: 0;
    z-index: 50;
    overflow: visible;
    padding: .55rem 0 .65rem;
    margin-bottom: 1.6rem;
    box-shadow: 0 6px 22px rgba(4, 12, 24, .18);
}
.encabezado-admin::after { display: none; }
.encabezado-admin .marca img { height: 40px; }
.encabezado-admin .encabezado-evento { font-size: clamp(1.05rem, 2.4vw, 1.3rem); }
.encabezado-admin .encabezado-eyebrow { font-size: .68rem; }
@media (max-width: 520px) { .encabezado-admin .encabezado-evento { font-size: 1rem; } }

.admin-barra { display: flex; align-items: center; gap: 1rem; }
.encabezado-admin .encabezado-identidad {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    text-align: center;
    white-space: nowrap;
}
@media (max-width: 560px) { .encabezado-admin .encabezado-identidad { display: none; } }

.encabezado-admin .marca:hover { opacity: .92; transform: translateY(-1px); }
.encabezado-admin h1 { font-size: 1.1rem; color: #0f172a; }
.encabezado-admin .admin-barra-evento { font-size: .8rem; color: var(--gris); margin-top: .1rem; }

.btn-chico { padding: .35rem .8rem; font-size: .85rem; }

.admin-usuario { position: relative; margin-left: auto; flex: 0 0 auto; }

.admin-usuario-boton {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--borde);
    color: var(--azul-osc);
    border-radius: 999px;
    padding: .3rem .85rem .3rem .35rem;
    cursor: pointer;
    font: inherit;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(2, 10, 30, .14);
    transition: background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.admin-usuario-boton:hover { background: #fff; border-color: #c9d7f5; box-shadow: 0 4px 12px rgba(10, 57, 228, .16); }
.admin-usuario-boton:active { transform: scale(.97); }
.admin-usuario-boton:focus-visible { outline: 3px solid rgba(10, 57, 228, .35); }

.admin-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--azul), #4d7cff);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
}
.admin-nombre { font-weight: 600; font-size: .9rem; }

.admin-flecha { font-size: .7rem; opacity: .8; transition: transform .15s ease; }
.admin-usuario-boton[aria-expanded="true"] .admin-flecha { transform: rotate(180deg); }

.admin-menu {
    position: absolute;
    right: 0;
    top: calc(100% + .45rem);
    min-width: 210px;
    background: #fff;
    color: #212529;
    border: 1px solid var(--borde);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(10, 20, 40, .20);
    padding: .35rem;
    animation: admin-menu-in .12s ease;
}
@keyframes admin-menu-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.admin-menu a {
    display: block;
    padding: .55rem .75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--azul-osc);
    font-weight: 600;
    font-size: .9rem;
    transition: background .12s ease, color .12s ease;
}
.admin-menu a:hover { background: #eaf2ff; }
.admin-menu a:focus-visible { outline: 2px solid var(--azul); outline-offset: -2px; }
.admin-menu a.admin-menu-salir { color: var(--rojo); }
.admin-menu a.admin-menu-salir:hover { background: #fde8ea; }

@media (max-width: 720px) {
    .encabezado-admin .marca img { height: 36px; }
    .admin-nombre { display: none; }
    .encabezado-admin h1 { font-size: .95rem; }
    .admin-barra-evento { display: none; }
}

/* ---------- Pestañas de sección (control segmentado) ---------- */
.pestanas {
    display: flex;
    gap: .3rem;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 14px;
    padding: .35rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    box-shadow: var(--sombra);
}
.pestana {
    flex: 1 1 auto;
    text-align: center;
    padding: .5rem .9rem;
    border-radius: 9px;
    text-decoration: none;
    color: var(--gris);
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
    transition: background .14s ease, color .14s ease;
}
.pestana:hover { color: var(--azul); background: #f0f5ff; }
.pestana.activa {
    background: linear-gradient(135deg, var(--azul), #2448f5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(10, 57, 228, .30);
}

/* ---------- Resumen (KPI) ---------- */
.resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .8rem;
    margin-bottom: 1.3rem;
}

.resumen-item {
    position: relative;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 14px;
    padding: .9rem 1.05rem .95rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 14px rgba(8, 39, 166, .05);
    display: flex;
    flex-direction: column;
    gap: .15rem;
    overflow: hidden;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.resumen-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--azul), #4d7cff);
    opacity: .85;
}
.resumen-item:nth-child(2)::before { background: linear-gradient(90deg, #f9c74f, #ffd54a); }
.resumen-item:nth-child(3)::before { background: linear-gradient(90deg, #2fb36e, #7ed9a7); }
.resumen-item:nth-child(4)::before { background: linear-gradient(90deg, #e4545f, #f59aa1); }
.resumen-item:nth-child(5)::before { background: linear-gradient(90deg, #6b4fc0, #a993e0); }

.resumen-item strong { font-size: 1.5rem; color: var(--azul-osc); letter-spacing: -.01em; }
.resumen-item span { font-size: .83rem; color: var(--gris); font-weight: 600; }
.resumen-item:hover {
    transform: translateY(-2px);
    border-color: #c9d7f5;
    box-shadow: 0 10px 24px rgba(10, 57, 228, .12);
}

/* ---------- Filtro ---------- */
.tarjeta-titulo .filtro {
    flex: 1 1 100%;
    order: 5;
}
.filtro {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .8rem 1.1rem;
    background: #f7f9fc;
    border: 1px solid #e3e9f2;
    border-radius: 12px;
    padding: .85rem 1rem .95rem;
}
.filtro-itemo {
    display: flex;
    flex-direction: column;
    gap: .28rem;
    min-width: 0;
    max-width: 100%;
}
.filtro-itemo--buscar { flex: 1 1 300px; }
.filtro-rotulo {
    color: var(--gris);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}
.filtro select,
.filtro input[type="search"] {
    width: 100%;
    padding: .48rem .68rem;
    border: 1px solid #cfd6e2;
    border-radius: 9px;
    background: #fff;
    font: inherit;
    color: #1f2a44;
    transition: border-color .13s ease, box-shadow .13s ease;
}
.filtro select { width: auto; min-width: 148px; }
.filtro select:focus,
.filtro input[type="search"]:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(10, 57, 228, .14);
}

/* ---------- Bloque ---------- */
.bloque {
    display: inline-block;
    font-size: .78rem;
    letter-spacing: .02em;
    background: #eef2f7;
    border: 1px solid #d6dfe9;
    color: #1d3557;
    border-radius: 7px;
    padding: .18rem .5rem;
    font-weight: 700;
}

/* ---------- Tablas ---------- */
.tabla-envoltura {
    overflow-x: auto;
    border: 1px solid var(--borde);
    border-radius: 12px;
    background: #fff;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.tabla th, .tabla td {
    text-align: left;
    padding: .68rem .8rem;
    border-bottom: 1px solid var(--borde);
    vertical-align: middle;
}

.tabla thead th {
    position: sticky;
    top: 0;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #5a6b85;
    background: #f6f8fc;
    border-bottom: 1px solid #dfe6f0;
    font-weight: 700;
    white-space: nowrap;
}

.tabla tbody tr { transition: background .1s ease; }
.tabla tbody tr:hover { background: #f7faff; }
.tabla tbody tr:last-child td { border-bottom: 0; }

.tabla td strong { display: block; font-weight: 700; color: #17233b; }
.celda-sub { display: block; color: var(--gris); font-size: .78rem; margin-top: .12rem; }

.tabla .estado { margin: 0; font-size: .78rem; }
.ahora { white-space: nowrap; font-variant-numeric: tabular-nums; }

.tabla td .accion { margin: 0; display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.tabla .accion select {
    padding: .32rem .42rem;
    border: 1px solid #cfd6e2;
    border-radius: 7px;
    background: #fff;
    font: inherit;
    font-size: .8rem;
}
.tabla .accion select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(10, 57, 228, .12); }
.tabla .accion .motivo-rechazo {
    padding: .32rem .5rem;
    border: 1px solid #cfd6e2;
    border-radius: 7px;
    font-size: .8rem;
    min-width: 180px;
}

/* ---------- Exportar (selector CSV / Excel) ---------- */
.exportar-etiqueta {
    font-size: .82rem;
    font-weight: 700;
    color: var(--gris);
    white-space: nowrap;
}

.exportar-select {
    max-width: 260px;
    padding: .48rem 2rem .48rem .75rem;
    border: 1px solid #c9d4e8;
    border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c757d' d='M6 8 0 0h12z'/%3E%3C/svg%3E") no-repeat right .7rem center;
    background-color: #fff;
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    color: var(--azul-osc);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .13s ease, box-shadow .13s ease;
}
.exportar-select:hover { border-color: var(--azul); }
.exportar-select:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(10, 57, 228, .14);
}

/* ---------- Intro / leyenda / estado vacío ---------- */
.intro {
    color: var(--gris);
    font-size: .93rem;
    margin: 0 0 1.1rem;
    max-width: 760px;
    line-height: 1.55;
}
.intro a { color: var(--azul); font-weight: 600; }

.leyenda {
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 12px;
    padding: .7rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .84rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-wrap: wrap;
    box-shadow: var(--sombra);
}
.leyenda > strong { color: var(--azul-osc); white-space: nowrap; }
.leyenda ul { list-style: none; display: flex; gap: .7rem 1.1rem; flex-wrap: wrap; margin: 0; padding: 0; }
.leyenda li { display: flex; align-items: center; gap: .4rem; color: var(--gris); }
.leyenda .estado { margin: 0; }

.vacio {
    background: #fafbfd;
    border: 1px dashed #c9d4e8;
    border-radius: 12px;
    padding: 1.75rem;
    text-align: center;
    color: var(--gris);
    font-size: .95rem;
}
.vacio strong { display: block; color: var(--azul-osc); font-size: 1.05rem; margin-bottom: .35rem; }
.vacio p { margin: 0 auto .75rem; max-width: 560px; }
.vacio a { color: var(--azul); font-weight: 600; }
.vacio code { background: #eef2f7; border-radius: 4px; padding: .1rem .3rem; font-size: .85rem; }

/* ---------- Paginación ---------- */
.paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.1rem;
    font-size: .9rem;
    color: var(--gris);
}
.paginacion a {
    color: var(--azul);
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #c9d4e8;
    border-radius: 8px;
    padding: .35rem .75rem;
    background: #fff;
    transition: background .13s ease, border-color .13s ease;
}
.paginacion a:hover { background: #eaf2ff; border-color: var(--azul); }

.tabla-estudiantes td { vertical-align: middle; }

@media (max-width: 720px) {
    .tabla th:nth-child(4), .tabla td:nth-child(4) { display: none; }
}

/* ---------- Utilidades del panel ---------- */
.nota { color: var(--gris); font-size: .9rem; }

.filtro-reporte .btn { font-size: .9rem; padding: .48rem .9rem; }