﻿/* Account navigation and academic screens share the laboratory palette. */
.academic-icon {
    display: inline-block;
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    vertical-align: middle;
}

/* Cloudflare Pages: aula-cloudflare.js alterna estos elementos con el atributo hidden. */
[data-cuenta-estatica] [hidden],
[data-aula-pagina] [hidden],
[data-aula-pagina][hidden],
[data-slide-over-content] [hidden] { display: none !important; }

/* The account control belongs to the institutional header. */
.academic-account-nav {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
    font-family: 'Poppins', system-ui, sans-serif;
}
.academic-account-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid #dce7e2;
    border-radius: 50%;
    background: #f2f7f4;
    color: #006948;
    cursor: pointer;
    list-style: none;
    text-decoration: none;
    transition: background .18s, border-color .18s, box-shadow .18s;
}
.academic-account-trigger::-webkit-details-marker { display: none; }
.academic-account-trigger::marker { content: ''; }
.academic-account-trigger .academic-icon { width: 23px; height: 23px; }
.academic-account-trigger:hover,
.academic-account-menu[open] > .academic-account-trigger {
    background: #e5f2eb;
    border-color: #9dc5b1;
    box-shadow: 0 0 0 4px #00694808;
}
.academic-account-status {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22a45d;
}
.academic-account-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    z-index: 50;
    width: min(320px, calc(100vw - 32px));
    padding: 10px;
    border: 1px solid #e0e9e4;
    border-radius: 18px;
    background: #fff;
    color: #17283d;
    box-shadow: 0 16px 48px #16244c24, 0 3px 8px #16244c08;
    animation: academic-enter .16s ease both;
}
.academic-account-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px 16px;
    margin-bottom: 6px;
    border-bottom: 1px solid #edf1ee;
}
.academic-account-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #eaf4ee;
    color: #006948;
}
.academic-account-profile > div { min-width: 0; }
.academic-account-profile strong { display: block; font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; }
.academic-account-profile small { display: block; margin: 2px 0 5px; font-size: .72rem; color: #64748b; overflow-wrap: anywhere; }
.academic-account-role { font-size: .65rem; font-weight: 600; color: #006948; }
.academic-account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #304456;
    font: 500 .8rem/1.5 'Poppins', system-ui, sans-serif;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.academic-account-item:hover { background: #f0f6f2; color: #006948; }
.academic-account-logout { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid #edf1ee; }
.academic-account-logout .academic-account-item { color: #a43d3d; }
.academic-account-logout .academic-account-item:hover { background: #fff1f0; color: #8f2626; }
.academic-account-trigger:focus-visible,
.academic-account-item:focus-visible,
.academic-button:focus-visible,
.academic-link-button:focus-visible,
.academic-text-link:focus-visible {
    outline: 3px solid #5c9be6;
    outline-offset: 3px;
}

/* Login, enrollment and password change. */
.login-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #17283d;
    font-family: Inter, system-ui, sans-serif;
}
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 64px 24px; }
.login-card {
    width: 100%;
    max-width: 460px;
    padding: 40px 44px;
    border: 1px solid #ffffff;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px #16244c0c, 0 2px 10px #16244c04;
    text-align: center;
    animation: academic-enter .25s ease both;
}
.login-card-wide { max-width: 640px; }
.login-logo { display: block; width: 130px; height: auto; margin: 0 auto 28px; }
.login-title { margin: 0 0 14px; color: #16244c; font-size: clamp(1.4rem, 4vw, 1.85rem); font-weight: 800; letter-spacing: .035em; line-height: 1.3; }
.login-rainbow { display: flex; justify-content: center; margin: 0 0 24px; }
.login-rainbow span { width: 42px; height: 3px; }
.login-rainbow span:nth-child(1) { background: #34a853; }
.login-rainbow span:nth-child(2) { background: #4285f4; }
.login-rainbow span:nth-child(3) { background: #ea4335; }
.login-rainbow span:nth-child(4) { background: #9334e6; }
.login-description { margin: 18px 0 24px; color: #657487; font-size: .84rem; line-height: 1.75; }
.login-form, .academic-form { display: flex; flex-direction: column; gap: 22px; text-align: left; }
.login-btn {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: #006948;
    color: #fff;
    box-shadow: 0 4px 12px #00694818;
    font: 700 .84rem/1.5 Inter, system-ui, sans-serif;
    letter-spacing: .025em;
    cursor: pointer;
    transition: background .18s, box-shadow .18s;
}
.login-btn:hover { background: #00543a; box-shadow: 0 6px 18px #00694824; }
.login-btn:focus-visible { outline: 3px solid #5c9be6; outline-offset: 3px; }
.academic-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: #304456; font-size: .84rem; font-weight: 600; line-height: 1.5; text-align: left; }
.academic-field input, .academic-field textarea, .academic-field select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d7e1dc;
    border-radius: 10px;
    background: #fbfdfc;
    color: #17283d;
    font: 400 1rem/1.5 Inter, system-ui, sans-serif;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.academic-field input::placeholder, .academic-field textarea::placeholder { color: #88958e; }
.academic-field input:hover, .academic-field textarea:hover, .academic-field select:hover { border-color: #b3c9bc; }
.academic-field textarea { resize: vertical; min-height: 120px; }
.academic-field input:focus, .academic-field textarea:focus, .academic-field select:focus { outline: 0; border-color: #368869; background: #fff; box-shadow: 0 0 0 3px #00694812; }
.academic-field input[readonly] { background: #f2f6f3; color: #52685d; font-size: .85rem; }
.academic-field small { color: #758478; font-size: .75rem; font-weight: 400; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 82px; }
.password-field button { position: absolute; right: 6px; top: 6px; bottom: 6px; padding: 0 10px; border: 0; border-radius: 7px; background: #edf3ef; color: #456152; font: 600 .72rem Inter, system-ui, sans-serif; cursor: pointer; }
.password-field button:hover { background: #e0ece4; }
.academic-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #f3f7f4; color: #4f6257; font-size: .82rem; font-weight: 400; line-height: 1.6; text-align: left; }
.academic-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #006948; flex: 0 0 auto; }
.academic-check > span { flex: 1; min-width: 0; }
.academic-check small { font-size: inherit; }
.academic-choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.academic-choice-group legend { padding: 0; margin-bottom: 8px; color: #304456; font-size: .84rem; font-weight: 600; line-height: 1.5; }
.academic-choice-group legend small { display: block; color: #758478; font-size: .75rem; font-weight: 400; }
.academic-choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 8px; }
.academic-choice-list .academic-check { border: 1px solid transparent; cursor: pointer; }
.academic-choice-list .academic-check:has(input:checked) { border-color: #9cc9ad; background: #e8f4ec; color: #1f4f37; }
.enrollment-course { margin-bottom: 24px; padding: 18px 20px; border: 1px solid #dbe9e0; border-radius: 14px; background: #f2f8f4; text-align: left; overflow-wrap: anywhere; }
.enrollment-course strong, .enrollment-course span { display: block; }
.enrollment-course strong { font-size: 1rem; color: #164b34; }
.enrollment-course span { margin-top: 6px; color: #65786c; font-size: .8rem; }
.enrollment-course p { margin-bottom: 0; font-size: .84rem; line-height: 1.6; }

/* Courses and assignments. */
/* Sin fondo propio: se ve el fondo general de institucional-ubo.css. */
.site-page:has(> .academic-page) {
    min-height: 65vh;
    display: flow-root;
}
.academic-page { width: min(1280px, calc(100% - 64px)); margin: 40px auto 64px; color: #17283d; font-family: 'Poppins', system-ui, sans-serif; }
.academic-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid #dee9e2; }
.academic-heading > div { flex: 1; min-width: min(100%, 240px); }
.academic-back-link { display: flex; align-items: center; gap: 6px; width: fit-content; min-height: 32px; margin-bottom: 8px; color: #52685d; font-size: .78rem; font-weight: 600; text-decoration: none; }
.academic-back-link:hover { color: #006948; text-decoration: underline; text-underline-offset: 3px; }
.academic-back-link:focus-visible { outline: 3px solid #5c9be6; outline-offset: 3px; border-radius: 4px; }
.academic-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #39745b; font-size: .67rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
.academic-heading .academic-eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #22a45d; }
.academic-page h1 { margin: 8px 0 0; color: #162e25; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.25; overflow-wrap: anywhere; }
.academic-page h2 { margin: 0 0 16px; color: #223e30; font-size: 1.12rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.4; }
.academic-page h3 { margin: 16px 0 10px; color: #223e30; font-size: 1.05rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.academic-page p { color: #65786c; font-size: .85rem; line-height: 1.8; overflow-wrap: anywhere; }
.academic-page small { line-height: 1.5; }
.academic-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.academic-actions form { margin: 0; }
.academic-heading > .academic-actions { gap: 6px; padding: 5px; border: 1px solid #dfe8e2; border-radius: 13px; background: #ffffffb3; }
.academic-heading > .academic-actions .academic-button { min-height: 40px; padding: 9px 12px; border-color: transparent; background: transparent; color: #65786c; font-size: .75rem; }
.academic-heading > .academic-actions .academic-button:hover { background: #eef5f0; color: #006948; }
.academic-heading > .academic-actions .academic-button[aria-current] { background: #e9f3ed; color: #006948; }
.academic-heading > .academic-actions .academic-icon { width: 18px; height: 18px; }
.academic-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; max-width: 100%; min-height: 44px; padding: 11px 17px; border: 1px solid transparent; border-radius: 10px; background: #006948; color: #fff; font: 600 .8rem/1.5 'Poppins', system-ui, sans-serif; text-align: center; text-decoration: none; cursor: pointer; transition: background .18s, border-color .18s, box-shadow .18s; }
.academic-button:hover { background: #00543a; color: #fff; box-shadow: 0 4px 12px #00694814; }
.academic-button.secondary { background: #fff; border-color: #dce6df; color: #37624b; }
.academic-button.secondary:hover { background: #f0f7f2; border-color: #b9d2c3; color: #006948; }
.academic-button .academic-icon { width: 18px; height: 18px; }
.academic-link-button { padding: 10px 0; border: 0; background: transparent; color: #39745b; font: inherit; font-size: .78rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.academic-link-button.danger { color: #a43d3d; }
.academic-text-link { color: #006948; font-size: .8rem; text-underline-offset: 3px; }
.academic-text-link:hover { color: #004f37; }
.academic-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; align-items: stretch; }
.academic-card { min-width: 0; padding: 26px; border: 1px solid #e0e9e3; border-radius: 18px; background: #fff; box-shadow: 0 4px 20px #203e2b04; }
.academic-course-card { display: flex; flex-direction: column; transition: border-color .18s, box-shadow .18s; }
.academic-template-card, .academic-task-card { display: flex; flex-direction: column; align-items: flex-start; }
.academic-template-card > .academic-actions, .academic-task-card > .academic-button { margin-top: auto; }
.academic-task-card > .academic-card-top { align-self: stretch; }
.academic-task-card > .academic-button { width: 100%; }
.academic-badge.is-pending { background: #fff8ec; border-color: #f0e1c3; color: #896222; }
.academic-badge.is-complete { background: #eaf5ee; border-color: #cce4d5; color: #23734b; }
.academic-course-card:hover { border-color: #b7d3c1; box-shadow: 0 10px 30px #203e2b08; }
.academic-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.academic-card-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid #daeadf; border-radius: 12px; background: #eef6f0; color: #23754f; }
.academic-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: auto; padding-top: 18px; border-top: 1px solid #edf2ee; }
.academic-course-card > p { margin: 0 0 16px; }
.academic-course-card h3 a { color: inherit; text-decoration: none; }
.academic-course-card h3 a:hover { color: #006948; text-decoration: underline; text-underline-offset: 3px; }
.academic-course-card h3 a:focus-visible, .academic-row h3 a:focus-visible { outline: 3px solid #5c9be6; outline-offset: 3px; border-radius: 4px; }
.academic-meta { display: inline-flex; align-items: center; gap: 6px; color: #758478; font-size: .73rem; }
.academic-meta .academic-icon { width: 16px; height: 16px; }
.academic-badge { display: inline-block; max-width: 100%; padding: 6px 10px; border: 1px solid #e0ebe3; border-radius: 7px; background: #f4f8f5; color: #4b745b; font-size: .68rem; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.academic-empty { grid-column: 1 / -1; padding: 32px; border-style: dashed; background: #ffffff80; text-align: center; }
.academic-empty p { max-width: 540px; margin-inline: auto; }
.academic-section { margin-top: 36px; }
.academic-section > p { max-width: 750px; margin: -6px 0 22px; }
.academic-spaced { margin-bottom: 32px; }
.academic-form-card { max-width: 900px; padding: 32px; }
.academic-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.academic-form > .academic-button { align-self: flex-start; margin-top: 4px; }
.academic-form > p { margin: 0; padding: 14px 16px; border-left: 3px solid #b8d6c3; border-radius: 0 8px 8px 0; background: #f5f9f6; font-size: .8rem; }
.academic-qr { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 28px; align-items: start; }
.academic-qr-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.academic-qr-renew { padding-top: 14px; border-top: 1px solid #edf2ee; }
.academic-qr-renew form { margin: 0; }
.academic-qr-renew small { display: block; color: #758478; font-size: .73rem; }
.academic-qr-preview { display: block; width: 100%; overflow: hidden; border: 1px solid #dce8e0; border-radius: 12px; background: #fff; color: #006948; text-decoration: none; }
.academic-qr-preview > img { display: block; width: 100%; height: auto; }
.academic-qr-expand { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 10px; border-top: 1px solid #e3ede7; background: #f2f8f4; font-size: .79rem; font-weight: 600; }
.academic-qr-preview:hover { border-color: #9cc4ac; }
.academic-qr-preview:hover .academic-qr-expand { background: #e5f2e9; }
.academic-qr-preview:focus-visible { outline: 3px solid #5c9be6; outline-offset: 4px; }
.academic-qr .academic-actions { gap: 8px; }
.academic-table-scroll { overflow-x: auto; }
.academic-table { width: 100%; margin: 0 0 18px; border-collapse: collapse; text-align: left; font-size: .8rem; }
.academic-table th, .academic-table td { padding: 15px 12px; border-bottom: 1px solid #edf2ee; vertical-align: top; }
.academic-table th { background: #f4f8f5; color: #758478; font-size: .68rem; font-weight: 600; letter-spacing: .015em; }
.academic-table th:first-child { border-radius: 8px 0 0 8px; }
.academic-table th:last-child { border-radius: 0 8px 8px 0; }
.academic-table td { color: #4f6257; overflow-wrap: anywhere; }
.academic-table tbody tr:hover { background: #fbfdfb; }
.academic-table tbody tr:last-child td { border-bottom: 0; }
.academic-notice, .academic-errors { margin: 0 0 24px; padding: 16px 18px; border: 1px solid #c8e1d0; border-radius: 12px; background: #eff8f2; color: #246043; text-align: left; font-size: .82rem; line-height: 1.7; }
.academic-errors { border-color: #efd0cd; background: #fff4f2; color: #963d35; }
.academic-errors ul { margin: 8px 0 0; padding-left: 18px; }
.academic-preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.academic-muted { color: #758478; }
.academic-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.academic-task-banner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; width: min(1280px, calc(100% - 64px)); margin: 28px auto 0; padding: 22px 26px; border: 1px solid #c9dfd1; border-left: 4px solid #006948; border-radius: 14px; background: #f2f9f4; color: #163c2a; font-family: 'Poppins', system-ui, sans-serif; }
.academic-task-banner > div { flex: 1; min-width: 0; }
.academic-task-banner h2 { margin: 8px 0; font-size: 1.1rem; font-weight: 600; }
.academic-task-banner p { font-size: .84rem; line-height: 1.75; }
.academic-task-banner small { color: #65786c; font-size: .75rem; }
.interaction-student { padding: 14px 16px; border-left: 3px solid #8bbaa0; border-radius: 0 8px 8px 0; background: #f1f7f3; color: #345441; font-size: .84rem; line-height: 1.8; }
.interaction-student strong { font-weight: 600; }

@keyframes academic-enter {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
@media (min-width: 1181px) {
    .header-bar:has(.academic-account-nav) { gap: 24px; }
    .header-bar:has(.academic-account-nav) .header-platform { flex: 1; min-width: 0; white-space: normal; }
    .header-bar:has(.academic-account-nav) .header-tag { max-width: 420px; padding-left: 24px; }
    .header-bar:has(.academic-account-nav) .ht-sub { white-space: normal; }
}
@media (max-width: 1180px) {
    .academic-account-nav { order: 2; margin-left: 0; }
    .header-bar:has(.academic-account-nav) .header-tag { flex: 1; margin-left: auto; }
    .academic-heading > .academic-actions { width: 100%; }
}
@media (max-width: 760px) {
    .academic-page { width: calc(100% - 32px); margin: 28px auto 40px; }
    .academic-heading { gap: 20px; padding-bottom: 22px; margin-bottom: 24px; }
    .academic-heading > .academic-actions { flex-wrap: nowrap; }
    .academic-heading > .academic-actions .academic-button { flex: 1; min-height: 44px; padding: 9px 8px; font-size: .69rem; }
    .academic-heading > .academic-actions .academic-icon { display: none; }
    .academic-card, .academic-form-card { padding: 22px; }
    .academic-task-banner { width: calc(100% - 32px); padding: 20px; flex-direction: column; gap: 16px; }
    .academic-account-trigger { width: 44px; height: 44px; }
    .header-bar:has(.academic-account-nav) { gap: 16px; }
    .header-bar:has(.academic-account-nav) .header-tag { padding-left: 16px; }
    .academic-table th, .academic-table td { padding: 12px 8px; }
}
@media (max-width: 560px) {
    .academic-account-nav { margin-left: auto; }
    .academic-account-panel { top: calc(100% + 10px); }
    .login-main { padding: 32px 16px; }
    .login-card { padding: 30px 24px; border-radius: 20px; }
    .login-logo { width: 120px; }
    .academic-form-grid { grid-template-columns: 1fr; gap: 20px; }
    .academic-card-bottom { align-items: stretch; flex-direction: column; gap: 12px; }
    .academic-card-bottom .academic-button { width: 100%; }
    .academic-form > .academic-button { align-self: stretch; }
    .academic-empty { padding: 26px 22px; }
    .academic-actions > .academic-button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .login-card, .academic-account-panel { animation: none; }
    .academic-account-trigger, .academic-account-item, .academic-button, .academic-field input, .academic-field textarea, .academic-field select, .academic-course-card, .login-btn { transition: none; }
}

/* Course and assignment forms open in a modal panel from the right. */
body.academic-slide-over-open { overflow: hidden; }
.academic-slide-over {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(620px, 100%);
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: 100%;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-left: 1px solid #dbe7df;
    background: #fff;
    color: #17283d;
    box-shadow: -16px 0 60px #16244c1c;
    font-family: 'Poppins', system-ui, sans-serif;
}
.academic-slide-over[open] { display: flex; flex-direction: column; animation: academic-slide-in .24s cubic-bezier(.2, .7, .25, 1) both; }
.academic-slide-over::backdrop { background: #142b2580; backdrop-filter: blur(3px); }
.academic-slide-over[open].is-closing { animation: academic-slide-out .18s ease both; }
.academic-slide-over-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex: 0 0 auto; padding: 28px 32px 24px; border-bottom: 1px solid #e3ebe6; background: #f7faf8; }
.academic-slide-over-header h2 { margin: 8px 0 0; color: #163c2a; font-size: clamp(1.25rem, 3vw, 1.55rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.4; }
.academic-slide-over-close { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; margin-top: 2px; padding: 0; border: 1px solid #dce6df; border-radius: 11px; background: #fff; color: #52685d; cursor: pointer; }
.academic-slide-over-close:hover { background: #edf5f0; color: #006948; }
.academic-slide-over-close:focus-visible { outline: 3px solid #5c9be6; outline-offset: 3px; }
.academic-slide-over-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 28px 32px 32px; }
.academic-slide-over-body > .academic-card { max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.academic-slide-over-body p { color: #65786c; font-size: .85rem; line-height: 1.8; }
.academic-slide-over-body .academic-form { gap: 24px; }
.academic-slide-over-body .academic-errors { margin-bottom: 0; }
.academic-slide-over-body .academic-errors:focus { outline: 2px solid #cc756e; outline-offset: 3px; }
.academic-slide-over-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex: 0 0 auto; padding: 20px 32px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid #e3ebe6; background: #fff; }
.academic-slide-over-footer > [data-slide-over-submit] { display: contents; }
.academic-slide-over-footer .academic-button { min-width: 110px; }
.academic-slide-over button:disabled { opacity: .6; cursor: wait; }
.academic-slide-over-loading { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.academic-slide-over-loading::before { content: ''; flex: 0 0 auto; width: 18px; height: 18px; border: 2px solid #dce9e1; border-top-color: #006948; border-radius: 50%; animation: academic-loading .75s linear infinite; }
.academic-field input[aria-invalid="true"], .academic-field textarea[aria-invalid="true"], .academic-field select[aria-invalid="true"] { border-color: #c16b62; background: #fffafa; }
@keyframes academic-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes academic-slide-out { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes academic-loading { to { transform: rotate(360deg); } }
@media (max-width: 560px) {
    .academic-slide-over { border-left: 0; }
    .academic-slide-over-header { padding: 22px 20px; }
    .academic-slide-over-body { padding: 24px 20px; }
    .academic-slide-over-footer { padding: 16px 20px max(16px, env(safe-area-inset-bottom)); }
    .academic-slide-over-footer .academic-button { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .academic-slide-over[open], .academic-slide-over[open].is-closing, .academic-slide-over-loading::before { animation: none; }
}

/* Feedback belongs to each submitted response. */
.academic-grading-check { border: 1px solid #cce2d4; background: #eff8f2; }
.academic-grading-check strong { display: block; color: #246043; font-size: .84rem; font-weight: 600; }
.academic-grading-check small { display: block; margin-top: 4px; color: #65786c; font-size: .75rem; line-height: 1.7; }
.academic-assignment-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.academic-submission-list { display: flex; flex-direction: column; gap: 22px; margin-bottom: 24px; }
.academic-submission { scroll-margin-top: 24px; }
.academic-submission-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid #e7eee9; }
.academic-submission-heading h3 { margin: 0 0 6px; }
.academic-submission-heading .academic-meta { flex-wrap: wrap; }
.academic-submission-heading .academic-assignment-badges { margin: 0; }
.academic-review-badge { display: inline-block; padding: 7px 12px; border: 1px solid #dfe7e2; border-radius: 8px; background: #f4f7f5; color: #65786c; font-size: .73rem; font-weight: 500; }
.academic-review-badge.is-logrado, .academic-review-badge.is-reviewed { border-color: #c7e2d0; background: #eaf6ee; color: #21683f; }
.academic-review-badge.is-por_lograr { border-color: #eddfbe; background: #fff8e9; color: #865d1f; }
.academic-review-badge.is-no_logrado { border-color: #efd0cd; background: #fff1ef; color: #963d35; }
.academic-review-badge.is-preview { border-style: dashed; background: #fff; color: #758478; }
.academic-grade { padding: 6px 11px; border-radius: 8px; background: #edf3fa; color: #234d73; font-size: 1rem; font-weight: 600; }
.academic-grade small { font-size: .7rem; font-weight: 400; }
.academic-submission-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.academic-submission-grid > section { min-width: 0; }
.academic-submission-grid h4 { margin: 0 0 16px; color: #304b3b; font-size: .86rem; font-weight: 600; }
.academic-submission-answer > p { padding: 18px; margin: 0 0 18px; border: 1px solid #e5ece7; border-radius: 12px; background: #f8faf9; }
.academic-submission-review { padding-left: 28px; border-left: 1px solid #e7eee9; }
.academic-review-form { gap: 18px; }
.academic-review-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 14px; }
.academic-review-form .academic-field small { font-size: .73rem; }
.academic-review-form textarea { min-height: 100px; }
.academic-review-form .academic-errors { margin: 0; }
.academic-page .academic-review-date { margin: 18px 0 0; color: #758478; font-size: .7rem; line-height: 1.7; }
@media (max-width: 760px) {
    .academic-submission-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .academic-submission-review { padding: 22px 0 0; border-left: 0; border-top: 1px solid #e7eee9; }
    .academic-submission-heading { gap: 14px; }
    .academic-review-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Large enrollment QR for classroom projection and scanning. */
body.academic-qr-open { overflow: hidden; }
.academic-qr-dialog { width: min(880px, calc(100% - 40px)); max-width: none; max-height: calc(100% - 40px); max-height: calc(100dvh - 40px); margin: auto; padding: 26px; overflow-y: auto; border: 1px solid #dce8e0; border-radius: 22px; background: #fff; color: #17283d; box-shadow: 0 24px 90px #132e2850; font-family: 'Poppins', system-ui, sans-serif; }
.academic-qr-dialog[open] { display: flex; flex-direction: column; gap: 18px; }
.academic-qr-dialog::backdrop { background: #142b25ad; backdrop-filter: blur(3px); }
.academic-qr-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex: 0 0 auto; }
.academic-qr-dialog-heading > div { min-width: 0; }
.academic-qr-dialog-heading h2 { margin: 7px 0; color: #163c2a; font-size: clamp(1.1rem, 2.5vw, 1.5rem); line-height: 1.4; overflow-wrap: anywhere; }
.academic-qr-dialog-heading p { margin: 0; color: #65786c; font-size: .83rem; line-height: 1.7; }
.academic-qr-large { display: block; flex: 0 0 auto; width: min(100%, max(120px, calc(100dvh - 250px)), 680px); height: auto; aspect-ratio: 1; margin: 0 auto; object-fit: contain; background: #fff; }
.academic-qr-dialog-actions { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; flex-wrap: wrap; gap: 12px; padding-top: 14px; border-top: 1px solid #e5ece7; }
.academic-qr-dialog-actions .academic-button { min-width: 120px; }
@media (max-width: 560px) {
    .academic-qr-dialog { width: 100%; max-width: 100%; height: 100%; height: 100dvh; max-height: 100%; max-height: 100dvh; padding: 24px 16px max(24px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; }
    .academic-qr-large { margin-block: auto; }
    .academic-qr-dialog-actions .academic-button { flex: 1; min-width: 0; }
}

/* Espacio docente: resumen, pestañas del curso, filas de tareas, progreso y desplegables. */
.academic-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.academic-page .academic-lead { max-width: 820px; margin: -8px 0 24px; font-size: .9rem; }
.academic-page .academic-hint { margin: 12px 0 0; color: #758478; font-size: .75rem; line-height: 1.6; }
.academic-field-help { display: block; margin-top: -6px; }
.academic-notice.is-warning { border-color: #f0e1c3; background: #fff8ec; color: #7a5519; }

.academic-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; }
.academic-stat { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px; border: 1px solid #e0e9e3; border-radius: 14px; background: #fff; }
.academic-stat-icon { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; background: #eef6f0; color: #23754f; }
.academic-stat strong { display: block; color: #162e25; font-size: 1.5rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.academic-stat span { color: #65786c; font-size: .74rem; line-height: 1.4; }
.academic-stat.is-attention { border-color: #f0e1c3; background: #fffaf0; }
.academic-stat.is-attention .academic-stat-icon { background: #ffefcf; color: #896222; }

.academic-panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.academic-panel-heading > div:first-child { flex: 1; min-width: min(100%, 260px); }
.academic-panel-heading h2 { margin: 0; }
.academic-panel-heading p { max-width: 640px; margin: 4px 0 0; font-size: .82rem; line-height: 1.6; }
.academic-panel-heading p strong { color: #223e30; font-weight: 600; }

.academic-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.academic-steps li { display: flex; gap: 14px; min-width: 0; padding: 20px; border: 1px dashed #c4d9cb; border-radius: 16px; background: #ffffffb3; }
.academic-step-number { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: #006948; color: #fff; font-size: .85rem; font-weight: 600; }
.academic-steps strong { display: block; color: #223e30; font-size: .9rem; font-weight: 600; line-height: 1.5; }
.academic-steps p { margin: 4px 0 0; font-size: .8rem; line-height: 1.6; }

.academic-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.academic-facts > div { min-width: 0; padding: 10px 12px; border-radius: 10px; background: #f5f9f6; }
.academic-facts dt { color: #758478; font-size: .66rem; line-height: 1.4; }
.academic-facts dd { margin: 2px 0 0; color: #223e30; font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.academic-course-card .academic-card-bottom { padding-top: 0; border-top: 0; }
.academic-course-card .academic-card-bottom .academic-button { flex: 1; }

.academic-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.academic-state { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid transparent; border-radius: 999px; font-size: .68rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.academic-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.academic-state.is-open { border-color: #cce4d5; background: #eaf5ee; color: #1d6a43; }
.academic-state.is-scheduled { border-color: #cfdcec; background: #edf3fa; color: #234d73; }
.academic-state.is-closed { border-color: #dde3df; background: #f1f3f2; color: #56655d; }

.academic-rows { margin: 0; padding: 0; overflow: hidden; border: 1px solid #e0e9e3; border-radius: 18px; background: #fff; list-style: none; box-shadow: 0 4px 20px #203e2b04; }
.academic-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px 24px; padding: 18px 22px; border-top: 1px solid #edf2ee; }
.academic-row:first-child { border-top: 0; }
/* Columnas de ancho estable para que el avance quede alineado entre filas. */
.academic-task-row { grid-template-columns: minmax(0, 1fr) minmax(170px, 260px) 290px; }
.academic-row-main { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.academic-row-main > strong { color: #223e30; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.academic-page .academic-row h3 { margin: 2px 0 0; font-size: 1rem; }
.academic-row h3 a { color: inherit; text-decoration: none; }
.academic-row h3 a:hover { color: #006948; text-decoration: underline; text-underline-offset: 3px; }
.academic-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.academic-progress { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: #65786c; font-size: .74rem; line-height: 1.5; }
.academic-progress strong { color: #223e30; font-weight: 600; font-variant-numeric: tabular-nums; }
.academic-progress progress { display: block; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 999px; background: #e6eee9; appearance: none; -webkit-appearance: none; }
.academic-progress progress::-webkit-progress-bar { background: #e6eee9; }
.academic-progress progress::-webkit-progress-value { border-radius: 999px; background: #22a45d; }
.academic-progress progress::-moz-progress-bar { border-radius: 999px; background: #22a45d; }
.academic-progress.is-compact { min-width: 110px; max-width: 170px; }

.academic-tabs { margin-top: 30px; }
.academic-tablist { display: none; gap: 4px; margin-bottom: 26px; overflow-x: auto; border-bottom: 1px solid #dee9e2; }
.academic-tabs.is-enhanced .academic-tablist { display: flex; }
.academic-tablist [role="tab"] { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 48px; margin-bottom: -1px; padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; background: transparent; color: #65786c; font: 600 .82rem/1.5 'Poppins', system-ui, sans-serif; white-space: nowrap; cursor: pointer; transition: color .18s, background .18s, border-color .18s; }
.academic-tablist [role="tab"]:hover { background: #eef5f0; color: #006948; }
.academic-tablist [role="tab"][aria-selected="true"] { border-bottom-color: #006948; color: #006948; }
.academic-tablist [role="tab"]:focus-visible { outline: 3px solid #5c9be6; outline-offset: -3px; }
.academic-tablist .academic-icon { width: 18px; height: 18px; }
.academic-tab-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #e9f0ec; color: #4f6257; font-size: .7rem; font-variant-numeric: tabular-nums; text-align: center; }
.academic-tablist [aria-selected="true"] .academic-tab-count { background: #dff0e6; color: #006948; }
/* Al llegar con #estudiantes o #inscripcion, las pestañas quedan a la vista sobre el panel. */
.academic-tabpanel { scroll-margin-top: 100px; }
.academic-tabs:not(.is-enhanced) .academic-tabpanel + .academic-tabpanel { margin-top: 36px; }
.academic-tabpanel[hidden] { display: none; }

.academic-search { position: relative; display: flex; align-items: center; width: min(100%, 300px); color: #758478; }
.academic-search .academic-icon { position: absolute; left: 13px; width: 18px; height: 18px; pointer-events: none; }
.academic-search input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 14px 10px 40px; border: 1px solid #d7e1dc; border-radius: 10px; background: #fff; color: #17283d; font: 400 .85rem/1.5 'Poppins', system-ui, sans-serif; }
.academic-search input:focus { outline: 0; border-color: #368869; box-shadow: 0 0 0 3px #00694812; }
.academic-table-card { padding: 10px 14px; }
.academic-table-card .academic-table { margin: 0; }
.academic-table td strong { display: block; color: #223e30; font-weight: 600; }
.academic-table td small { color: #758478; font-size: .72rem; }
.academic-table tr[hidden] { display: none; }

.academic-disclosure { border: 1px solid #d7e1dc; border-radius: 12px; background: #fbfdfc; }
.academic-disclosure > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 14px; border-radius: 12px; color: #304456; font-size: .84rem; line-height: 1.5; list-style: none; cursor: pointer; transition: background .18s; }
.academic-disclosure > summary::-webkit-details-marker { display: none; }
.academic-disclosure > summary:hover { background: #f0f7f2; }
.academic-disclosure > summary:focus-visible { outline: 3px solid #5c9be6; outline-offset: 2px; }
.academic-disclosure > summary > span { flex: 1; min-width: 0; }
.academic-disclosure > summary strong { display: block; font-weight: 600; }
.academic-disclosure > summary small { display: block; color: #758478; font-size: .75rem; font-weight: 400; }
.academic-disclosure > summary > .academic-icon:first-child { color: #23754f; }
.academic-disclosure-arrow { width: 18px; height: 18px; color: #758478; transition: transform .18s; }
.academic-disclosure[open] > summary .academic-disclosure-arrow { transform: rotate(180deg); }
.academic-disclosure-body { margin: 0; padding: 6px 14px 16px; }
.academic-disclosure.is-plain { background: #fff; }
.academic-section > .academic-disclosure { margin-top: 18px; background: #fff; }
.academic-name-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px 20px; list-style: none; }
.academic-name-list li { min-width: 0; color: #304b3b; font-size: .82rem; overflow-wrap: anywhere; }
.academic-name-list small { display: block; color: #758478; font-size: .72rem; }

.academic-task-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 28px; align-items: start; }
.academic-task-brief { min-width: 0; }
.academic-task-brief .academic-tags { margin-bottom: 18px; }
.academic-task-brief .academic-notice { margin: 0; }
.academic-availability { min-width: 0; padding: 20px; border: 1px solid #e0e9e3; border-radius: 14px; background: #f7faf8; }
.academic-availability h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: .95rem; }
.academic-availability h2 .academic-icon { width: 18px; height: 18px; color: #23754f; }
.academic-availability dl { display: grid; gap: 12px; margin: 0; }
.academic-availability dt { color: #758478; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.academic-availability dd { margin: 2px 0 0; color: #223e30; font-size: .88rem; font-weight: 500; }
.academic-availability .academic-disclosure { margin-top: 16px; }
.academic-availability .academic-form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.academic-availability .academic-form { gap: 14px; }
.academic-availability .academic-form > .academic-button { align-self: stretch; }

.academic-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.academic-filter button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid #dce6df; border-radius: 999px; background: #fff; color: #52685d; font: 500 .76rem/1.5 'Poppins', system-ui, sans-serif; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
.academic-filter button:hover { border-color: #b9d2c3; color: #006948; }
.academic-filter button[aria-pressed="true"] { border-color: #006948; background: #006948; color: #fff; }
.academic-filter button:focus-visible { outline: 3px solid #5c9be6; outline-offset: 3px; }
.academic-filter button span { font-variant-numeric: tabular-nums; opacity: .8; }
.academic-submission[hidden] { display: none; }

@media (max-width: 1000px) {
    .academic-task-row { grid-template-columns: minmax(0, 1fr) auto; }
    .academic-task-row .academic-progress { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 900px) {
    .academic-task-summary { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .academic-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    /* Tres cifras (resumen del curso): en una sola fila. */
    .academic-overview:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .academic-stat { flex-direction: column; align-items: flex-start; padding: 12px 14px; gap: 6px; }
    .academic-stat-icon { width: 30px; height: 30px; border-radius: 9px; }
    .academic-stat-icon .academic-icon { width: 17px; height: 17px; }
    .academic-stat strong { font-size: 1.25rem; }
    .academic-stat span { font-size: .7rem; }
    /* Pestañas compactas: las tres caben en el ancho de un teléfono. */
    .academic-tablist { gap: 0; margin-bottom: 20px; }
    .academic-tablist [role="tab"] { gap: 6px; padding: 10px 9px; font-size: .76rem; }
    .academic-tablist [role="tab"] > .academic-icon { display: none; }
    /* Tabla de estudiantes como tarjetas: cada dato con su etiqueta. */
    .academic-table-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
    .academic-table-card .academic-table, .academic-table-card tbody, .academic-table-card tr, .academic-table-card td { display: block; }
    .academic-table-card thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
    .academic-table-card tbody { display: grid; gap: 10px; }
    .academic-table-card tr { padding: 14px 16px; border: 1px solid #e0e9e3; border-radius: 14px; background: #fff; }
    .academic-table-card tr[hidden] { display: none; }
    .academic-table-card td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border: 0; }
    .academic-table-card td:first-child { display: block; padding: 0 0 8px; margin-bottom: 4px; border-bottom: 1px solid #edf2ee; }
    .academic-table-card td[data-label]::before { content: attr(data-label); flex: 0 0 auto; color: #758478; font-size: .7rem; font-weight: 600; }
    .academic-table-card td[colspan] { display: block; text-align: center; }
    .academic-table-card td[data-label="Correo"] { display: grid; justify-content: start; gap: 2px; }
    .academic-table-card .academic-progress.is-compact { align-items: flex-end; width: 130px; }
    .academic-qr { grid-template-columns: minmax(0, 1fr); }
    .academic-qr-preview { max-width: 320px; margin-inline: auto; }
    .academic-row, .academic-task-row { grid-template-columns: minmax(0, 1fr); padding: 18px; }
    .academic-task-row .academic-progress { grid-column: auto; grid-row: auto; }
    .academic-row-actions { justify-content: flex-start; }
    .academic-table-card { padding: 6px 10px; }
}
@media (max-width: 560px) {
    .academic-panel-heading > .academic-actions, .academic-panel-heading > .academic-button, .academic-search { width: 100%; }
    .academic-row-actions .academic-button, .academic-row > .academic-button { flex: 1; }
    .academic-facts > div { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .academic-disclosure-arrow, .academic-disclosure > summary, .academic-tablist [role="tab"], .academic-filter button { transition: none; }
}
