/* Aula Virtual — página de acceso (estudiantes + personal) */
.av-page {
    --av-primary: #0047AB;
    --av-primary-dark: #002966;
    --av-accent: #C8102E;
    --av-text: #0f172a;
    --av-muted: #64748b;
    --av-border: #e2e8f0;
    --av-radius: 16px;
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    background: #f1f5f9;
    color: var(--av-text);
}

.av-page * { box-sizing: border-box; }

.av-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--av-border);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.av-topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--av-text);
    font-weight: 800;
    font-size: 0.92rem;
}

.av-topbar__brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.av-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.av-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--av-muted);
    transition: 0.2s;
}

.av-link:hover { color: var(--av-primary); background: #f1f5f9; }

.av-link--primary {
    background: var(--av-primary);
    color: #fff;
}

.av-link--primary:hover {
    background: var(--av-primary-dark);
    color: #fff;
}

.av-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.35rem 1rem 5rem;
    display: grid;
    grid-template-columns: minmax(300px, 400px) 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .av-main {
        grid-template-columns: 1fr;
        padding: 1rem 0.85rem 5rem;
    }

    .av-card--login {
        order: -1;
    }
}

/* Login card — sticky */
.av-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--av-border);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.av-card--login {
    position: sticky;
    top: 0.85rem;
}

.av-card__head {
    padding: 1.15rem 1.35rem 0.95rem;
    background: linear-gradient(135deg, var(--av-primary) 0%, var(--av-primary-dark) 100%);
    color: #fff;
    text-align: center;
}

.av-card__head--docente { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.av-card__head--admin { background: linear-gradient(135deg, #C8102E, #9b0d18); }

.av-card__icon {
    width: 2.85rem;
    height: 2.85rem;
    margin: 0 auto 0.55rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.av-card__head h2 {
    margin: 0 0 0.15rem;
    font-size: 1.08rem;
    font-weight: 800;
}

.av-card__head p {
    margin: 0;
    font-size: 0.76rem;
    opacity: 0.88;
}

.av-card__body { padding: 1.15rem 1.35rem 1.35rem; }

.av-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    padding: 0.28rem;
    background: #f1f5f9;
    border-radius: 11px;
    margin-bottom: 1rem;
}

.av-tab {
    border: none;
    background: transparent;
    padding: 0.5rem 0.45rem;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--av-muted);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.av-tab.is-active {
    background: #fff;
    color: var(--av-primary);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.av-tab--staff.is-active { color: #7c3aed; }

.av-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1.45;
    margin-bottom: 0.9rem;
}

.av-alert--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.av-alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.av-alert--warn { background: #f5eed6; color: #7a5c00; border: 1px solid #e8dcc0; }
.av-alert--ok { background: #eff6ff; color: #0047AB; border: 1px solid #bfdbfe; }

.av-alert strong { display: block; margin-bottom: 0.2rem; }

.av-field { margin-bottom: 0.9rem; }

.av-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    margin-bottom: 0.32rem;
}

.av-input-wrap { position: relative; }

.av-input-wrap i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}

.av-input-wrap input {
    width: 100%;
    padding: 0.72rem 0.85rem 0.72rem 2.35rem;
    border: 1.5px solid var(--av-border);
    border-radius: 11px;
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.av-input-wrap input:focus {
    outline: none;
    border-color: var(--av-primary);
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.12);
}

.av-input-wrap--dni input {
    padding-right: 3rem;
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
}

.av-dni-counter {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
}

.av-dni-counter.is-ok { color: #16a34a; }

.av-eye-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.35rem;
}

.av-hint {
    margin: 0.35rem 0 0;
    font-size: 0.74rem;
    color: var(--av-muted);
    line-height: 1.4;
}

.av-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.82rem 1rem;
    border: none;
    border-radius: 11px;
    font-size: 0.92rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}

.av-btn--primary {
    background: linear-gradient(135deg, var(--av-primary), var(--av-primary-dark));
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 71, 171, 0.28);
}

.av-btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 71, 171, 0.32);
}

.av-btn--primary:disabled { opacity: 0.75; cursor: wait; }

.av-cta-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    color: var(--av-primary);
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
}

.av-cta-inline:hover { text-decoration: underline; }

.av-matricula-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    min-height: 4.25rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.av-oficial-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    min-height: 4.25rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
}

.av-oficial-box--hero {
    padding: 1rem 1.15rem;
    min-height: 4.75rem;
    box-shadow: 0 8px 24px rgba(0, 71, 171, 0.08);
}

.av-oficial-box__text,
.av-matricula-box__text {
    flex: 1;
    min-width: 0;
}

.av-oficial-box p,
.av-matricula-box p {
    margin: 0 0 0.18rem;
    font-size: 0.82rem;
    font-weight: 800;
    color: #1e3a8a;
    line-height: 1.25;
}

.av-matricula-box p { color: #334155; }

.av-oficial-box p i,
.av-matricula-box p i {
    margin-right: 0.25rem;
    color: var(--av-primary);
}

.av-oficial-box small,
.av-matricula-box small {
    display: block;
    font-size: 0.7rem;
    color: var(--av-muted);
    line-height: 1.35;
}

.av-oficial-box__btn,
.av-matricula-box__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.52rem 0.85rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.76rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.18s ease, transform 0.18s ease;
}

.av-oficial-box__btn {
    background: #0047AB;
    color: #fff !important;
}

.av-oficial-box__btn:hover {
    background: #003580;
    color: #fff !important;
    transform: translateY(-1px);
}

.av-matricula-box__btn {
    background: #fff;
    color: var(--av-primary) !important;
    border: 1px solid #bfdbfe;
}

.av-matricula-box__btn:hover {
    background: #eff6ff;
    color: var(--av-primary) !important;
    transform: translateY(-1px);
}

.av-staff-panel { display: none; }
.av-staff-panel.is-visible { display: block; }
.av-student-panel.is-hidden { display: none; }

.av-toggle-pwd {
    margin-top: 0.4rem;
    background: none;
    border: none;
    color: var(--av-primary);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.av-toggle-pwd:hover { text-decoration: underline; }
.av-field--pwd.is-collapsed { display: none; }

.av-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.85rem;
    justify-content: center;
}

.av-trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    color: #64748b;
    background: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
}

.av-trust i { color: var(--av-primary); font-size: 0.65rem; }

/* Hero panel derecho */
.av-hero {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.av-hero__panel {
    background: linear-gradient(145deg, #002966 0%, #0047AB 55%, #0369a1 100%);
    color: #f8fafc;
    border-radius: 18px;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 12px 32px rgba(0, 41, 102, 0.2);
    border-bottom: 3px solid #C8102E;
}

.av-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.av-hero h1 {
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 0.55rem;
    letter-spacing: -0.02em;
}

.av-hero h1 span { color: #C9A227; }

.av-hero__lead {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #cbd5e1;
    margin: 0 0 1rem;
    max-width: 32rem;
}

.av-steps {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.av-steps--inline {
    flex-direction: row;
    gap: 0.5rem;
}

.av-step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    flex: 1;
}

.av-steps--inline .av-step {
    flex-direction: column;
    text-align: center;
    padding: 0.5rem 0.4rem;
    gap: 0.25rem;
}

.av-steps--inline .av-step strong {
    font-size: 0.72rem;
}

.av-step__num {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #C9A227;
    color: #002966;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.av-step strong {
    display: block;
    font-size: 0.82rem;
}

.av-step span {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.4;
}

.av-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

@media (max-width: 520px) {
    .av-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .av-steps--inline { flex-wrap: wrap; }
    .av-steps--inline .av-step { min-width: calc(33% - 0.35rem); }
}

.av-feat {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.74rem;
    color: #e2e8f0;
}

.av-feat i {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.12);
    color: #C9A227;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    flex-shrink: 0;
}

.av-help {
    background: #fff;
    border: 1px solid var(--av-border);
    border-radius: 14px;
    padding: 1rem 1.15rem;
}

.av-help h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.av-help p {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    color: var(--av-muted);
    line-height: 1.45;
}

.av-help__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: #128C7E;
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
}

.av-help__btn:hover {
    background: #0d7268;
    color: #fff;
}

.av-link--oficial {
    color: #0047AB;
    font-weight: 700;
}

.av-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.78rem;
    color: var(--av-muted);
    border-top: 1px solid var(--av-border);
    background: #fff;
}

.av-footer a {
    color: #128C7E;
    font-weight: 600;
    text-decoration: none;
}

.av-footer a:hover { text-decoration: underline; }

/* Conversion bar en página login */
.av-page .conversion-bar {
    z-index: 9995;
}

@media (max-width: 600px) {
    .av-topbar__brand span { display: none; }
    .av-card--login { position: static; }
    .av-oficial-box,
    .av-matricula-box {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        min-height: auto;
    }
    .av-oficial-box__btn,
    .av-matricula-box__btn {
        width: 100%;
        justify-content: center;
    }
}
