
.form-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--gray);
    box-shadow: 0 4px 20px rgba(26, 45, 90, 0.08);
    padding: 2rem;
    max-width: 560px;
    margin: 0 auto;
}

.ev-pill strong {
    font-size: 0.78rem;
    line-height: 1.4;
}

.grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0 1rem;
}

@media (max-width: 560px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }
}

.field-msg {
    font-size: 0.72rem;
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    opacity: 0;
    transition: opacity .2s;
}

.field-msg.visible {
    opacity: 1;
}

.field-msg.error {
    color: #c0392b;
}

.field-msg.ok {
    color: #1a7a4a;
}

.iw input.invalid,
.iw select.invalid {
    border-color: #c0392b !important;
}

.iw input.valid,
.iw select.valid {
    border-color: #1a7a4a !important;
}

body { display: flex; flex-direction: column; min-height: 100vh; }
.page { flex: 1; width: 100%; }

.anios-wrap {
    max-width: 1600px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.anios-titulo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.13rem;
    font-weight: 800;
    color: #1a56db;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.anios-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.anio-card {
    flex: 1 1 200px;
    max-width: 280px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(26,45,90,.07);
    padding: 2.2rem 1.2rem 1.8rem;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    position: relative;
    overflow: hidden;
    transition: transform .18s, box-shadow .18s;
}

.anio-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, #1a56db, #40a4ff);
}

.anio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(26,45,90,.15);
}

.anio-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: #1a56db;
    line-height: 1;
}

.anio-total {
    font-size: .91rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.anio-badge {
    background: #e8ecf5;
    color: #1a56db;
    font-family: 'Montserrat', sans-serif;
    font-size: .81rem;
    font-weight: 700;
    padding: .28rem .75rem;
    border-radius: 20px;
    margin-top: .2rem;
}

/* ── Página de eventos por año ── */
.ev-header {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
}

.ev-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border: 1.5px solid #1a56db;
    border-radius: 8px;
    color: #1a56db;
    font-family: 'Montserrat', sans-serif;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    margin-top: .15rem;
    transition: background .15s, color .15s;
}
.ev-back:hover { background: #1a56db; color: #fff; }

.ev-subtitle {
    font-size: .93rem;
    color: #64748b;
    margin: 0;
}

.ev-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #94a3b8;
}
.ev-empty i { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.ev-empty p { font-size: 1.03rem; }

.ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

.ev-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(26,45,90,.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s, box-shadow .18s;
}
.ev-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26,45,90,.13);
}

.ev-img { height: 160px; overflow: hidden; background: #e8ecf5; }
.ev-img img { width: 100%; height: 100%; object-fit: cover; }
.ev-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #94a3b8;
}

.ev-body {
    padding: 1.1rem 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    flex: 1;
}

.ev-codigo {
    font-family: 'Montserrat', sans-serif;
    font-size: .76rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ev-titulo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.01rem;
    font-weight: 800;
    color: #1a56db;
    margin: 0;
    line-height: 1.3;
}

.ev-meta {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: .89rem;
    color: #64748b;
}
.ev-meta i { margin-right: .3rem; color: #94a3b8; }

.ev-estado {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: .76rem;
    font-weight: 700;
    padding: .22rem .6rem;
    border-radius: 20px;
    width: fit-content;
    margin-top: auto;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ev-estado-activo    { background: #dcfce7; color: #15803d; }
.ev-estado-finalizado { background: #f1f5f9; color: #475569; }
.ev-estado-inactivo  { background: #fee2e2; color: #dc2626; }

/* ── Detalle de evento ── */
.det-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(26,45,90,.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.det-img {
    width: 300px;
    flex-shrink: 0;
    overflow: hidden;
    min-height: 260px;
}
.det-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.det-body { padding: 1.8rem 2rem; flex: 1; min-width: 0; }

.det-top {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.det-info { flex: 1; min-width: 0; }

.det-codigo {
    font-family: 'Montserrat', sans-serif;
    font-size: .81rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .08em;
    display: block;
    margin-bottom: .4rem;
}

.det-titulo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.48rem;
    font-weight: 900;
    color: #1a56db;
    margin: 0 0 1.2rem;
    line-height: 1.3;
}

.det-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .9rem;
}

.det-meta-item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    color: #64748b;
    font-size: .95rem;
}
.det-meta-item > i {
    color: #1a56db;
    margin-top: .15rem;
    font-size: .98rem;
    flex-shrink: 0;
}
.det-meta-item > div { display: flex; flex-direction: column; gap: .05rem; }
.det-meta-label { font-size: .81rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.det-meta-val   { font-weight: 600; color: #1e293b; }

.det-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 180px;
    max-width: 240px;
}

.det-links { display: flex; flex-direction: column; gap: .4rem; }
.det-links-title {
    font-family: 'Montserrat', sans-serif;
    font-size: .81rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 .2rem;
}
.det-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #1a56db;
    font-size: .91rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.det-link:hover { background: #f0f4ff; border-color: #1a56db; }
.det-link i { color: #94a3b8; font-size: .91rem; }

/* ── Tabla de participantes ── */
.det-tabla-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(26,45,90,.06);
    overflow-x: auto;
    margin-bottom: 2rem;
}

.det-tabla-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.det-tabla-titulo {
    font-family: 'Montserrat', sans-serif;
    font-size: .91rem;
    font-weight: 800;
    color: #1a56db;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.det-tabla-sub { font-size: .87rem; color: #94a3b8; margin: .2rem 0 0; }

.det-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}
.det-tabla thead th {
    background: #f8faff;
    color: #1a56db;
    font-family: 'Montserrat', sans-serif;
    font-size: .81rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .6rem 1rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}
.det-tabla tbody tr { border-bottom: 1px solid #f1f5f9; }
.det-tabla tbody tr:last-child { border-bottom: none; }
.det-tabla tbody tr:hover { background: #f8faff; }
.det-tabla td { padding: .65rem 1rem; color: #334155; vertical-align: middle; }

.td-num  { color: #94a3b8; width: 40px; text-align: center; }
.td-nota { text-align: center; font-family: 'Montserrat', sans-serif; font-weight: 700; color: #1a56db; }
.td-email { font-size: .89rem; color: #64748b; min-width: 180px; }
.td-nombre { display: flex; align-items: center; gap: .7rem; min-width: 220px; }
.det-tabla td:nth-child(4) { min-width: 180px; } /* Facultad */
.det-tabla td:nth-child(5) { min-width: 160px; } /* Departamento */
.det-tabla td:nth-child(6) { min-width: 80px; text-align: center; } /* Grupo */
.det-tabla td:nth-child(7), .det-tabla th:nth-child(7) { min-width: 120px; text-align: center; } /* Estado */

.p-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: #e8ecf5; color: #1a56db;
    font-family: 'Montserrat', sans-serif; font-size: .85rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.p-nombre   { font-weight: 600; color: #1e293b; font-size: .95rem; }
.p-email-sm { font-size: .85rem; color: #94a3b8; }

.p-badge {
    font-family: 'Montserrat', sans-serif;
    font-size: .76rem; font-weight: 700;
    padding: .2rem .55rem; border-radius: 20px;
    text-transform: uppercase; letter-spacing: .03em;
}
.p-badge-aprobado  { background: #dcfce7; color: #15803d; }
.p-badge-desaprobado { background: #fee2e2; color: #dc2626; }
.p-badge-inscrito  { background: #dbeafe; color: #1d4ed8; }
.p-badge-retirado  { background: #fef3c7; color: #92400e; }

/* ── Buscador ── */
.det-buscar-form { display: flex; align-items: center; }
.det-buscar-wrap {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #f8faff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: .45rem .9rem;
    transition: border-color .15s;
}
.det-buscar-wrap:focus-within { border-color: #1a56db; background: #fff; }
.det-buscar-wrap > i { color: #94a3b8; font-size: .93rem; flex-shrink: 0; }
.det-buscar-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: .95rem;
    color: #1e293b;
    width: 220px;
}
.det-buscar-input::placeholder { color: #94a3b8; }
.det-buscar-clear {
    color: #94a3b8;
    font-size: .93rem;
    text-decoration: none;
    flex-shrink: 0;
    transition: color .15s;
}
.det-buscar-clear:hover { color: #dc2626; }

/* ── Paginación ── */
.det-pag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    gap: 1rem;
    flex-wrap: wrap;
}
.det-pag-info { font-size: .88rem; color: #94a3b8; }
.det-pag-btns { display: flex; gap: .3rem; align-items: center; }
.det-pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 .4rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: .91rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #1a56db;
    text-decoration: none;
    background: #fff;
    transition: background .15s, border-color .15s;
}
.det-pag-btn:hover  { background: #f0f4ff; border-color: #1a56db; }
.det-pag-act { background: #1a56db !important; color: #fff !important; border-color: #1a56db !important; }
.det-pag-dis { color: #cbd5e1; pointer-events: none; }

/* ── Contenido del evento ── */
.det-contenido-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(26,45,90,.06);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.det-contenido-head {
    padding: .9rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8faff;
}
.det-contenido-body {
    padding: 1.2rem 1.5rem;
    font-size: 1.01rem;
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .det-card { flex-direction: column; }
    .det-img  { width: 100%; min-height: 200px; max-height: 240px; }
}

@media (max-width: 640px) {
    .det-body { padding: 1.2rem 1rem; }

    .det-top {
        flex-direction: column;
        gap: 1.2rem;
    }

    .det-side {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    .det-links {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .det-link {
        flex: 1 1 auto;
        min-width: 140px;
    }

    .det-titulo { font-size: 1.23rem; }

    .det-tabla-head {
        flex-direction: column;
        align-items: flex-start;
        gap: .7rem;
    }

    .det-buscar-form { width: 100%; }
    .det-buscar-wrap { width: 100%; }
    .det-buscar-input { width: 100%; }
}
