/* Aula Virtual — estilos propios (usa los tokens de /css/app.css). */

.aula-top {
  position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 18px; padding: 0 24px; height: 60px;
}
.aula-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.aula-brand img { width: 38px; height: 38px; border-radius: 8px; background: #fff; padding: 2px; object-fit: contain; }
.aula-brand small { display: block; color: var(--accent); font-size: .68rem; letter-spacing: .14em; }
.aula-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.aula-nav a { color: #cfd7e3; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .93rem; white-space: nowrap; }
.aula-nav a:hover { background: rgb(255 255 255 / .08); color: #fff; }
.aula-nav a.active { background: rgb(255 255 255 / .12); color: #fff; }
.aula .user-menu summary:hover { background: rgb(255 255 255 / .1); }
.aula .user-menu .user-name { color: #fff; }
.aula .avatar { background: var(--accent); color: var(--ink); }
.aula-main { max-width: 1180px; margin: 0 auto; padding: 24px; outline: none; }

.hero-band { background: linear-gradient(135deg, var(--ink) 0%, #17385c 100%); color: #fff; border-radius: 16px; padding: 24px; margin-bottom: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero-band h1 { color: #fff; }
.hero-band p { color: #d6dde8; margin-top: 6px; }
.banner { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.banner-warn { background: var(--warn-soft); color: var(--warn); }
.banner-bad { background: var(--danger-soft); color: var(--danger); }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.course-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.course-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.course-card:hover { border-color: var(--primary); }
.course-card h3 { font-size: 1.05rem; }
.course-meta { color: var(--text-3); font-size: .84rem; }
.progress { height: 8px; background: var(--muted-soft); border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.progress-label { font-size: .8rem; color: var(--text-2); font-weight: 600; }

.session-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.session { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); flex-wrap: wrap; }
.session.live { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 6px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.session-when { font-size: .85rem; color: var(--text-2); }

.ann { border-left: 3px solid var(--primary); padding: 8px 12px; background: var(--surface-2); border-radius: 0 8px 8px 0; }
.ann + .ann { margin-top: 10px; }
.ann h3 { font-size: .95rem; }
.ann p { white-space: pre-wrap; font-size: .9rem; margin-top: 4px; }
.ann small { color: var(--text-3); }

/* Curso: temario + reproductor */
.course-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.outline { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; padding: 14px; }
.outline h2 { font-size: .95rem; margin-bottom: 10px; }
.outline-sec + .outline-sec { margin-top: 14px; }
.outline-sec > p { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; margin-bottom: 6px; }
.outline ul { list-style: none; margin: 0; padding: 0; }
.outline li a { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .9rem; }
.outline li a:hover { background: var(--muted-soft); }
.outline li a.current { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.lesson-icon { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: .7rem; margin-top: 1px; }
.lesson-icon.done { background: var(--good); border-color: var(--good); color: #fff; }
.draft-tag { font-size: .7rem; color: var(--warn); font-weight: 700; }

.player { padding: 22px; }
.player-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; flex-wrap: wrap; }
.video-frame { position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.doc-frame { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rich { line-height: 1.7; font-size: 1rem; }
.rich p + p, .rich ul, .rich h3 { margin-top: 12px; }
.rich h3 { font-size: 1.1rem; }
.rich ul { padding-left: 22px; }
.rich img { border-radius: 10px; }
.player-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* Quiz */
.quiz-q { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 12px; }
.quiz-q legend { font-weight: 650; padding: 0 4px; }
.quiz-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.quiz-opt:hover { background: var(--muted-soft); }
.quiz-opt.right { background: var(--good-soft); }
.quiz-opt.wrong { background: var(--danger-soft); }
.quiz-explain { font-size: .88rem; color: var(--text-2); margin-top: 6px; }
.score-box { text-align: center; padding: 18px; border-radius: 12px; margin-bottom: 16px; }
.score-box strong { display: block; font-size: 2.2rem; }
.score-ok { background: var(--good-soft); color: var(--good); }
.score-bad { background: var(--warn-soft); color: var(--warn); }

/* Editor */
.editor-sec { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); }
.editor-sec + .editor-sec { margin-top: 12px; }
.editor-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.editor-lessons { list-style: none; margin: 0; padding: 0; }
.editor-lessons li { display: flex; align-items: center; gap: 8px; padding: 8px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.editor-lessons li:first-child { border-top: 0; }
.editor-lessons .grow { flex: 1; min-width: 160px; }
.type-badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); background: var(--muted-soft); padding: 2px 7px; border-radius: 6px; }
.q-edit { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; display: grid; gap: 8px; }
.q-opt-row { display: flex; gap: 8px; align-items: center; }
.q-opt-row .input { flex: 1; }
.upload-box { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.upload-bar { height: 8px; background: var(--muted-soft); border-radius: 4px; overflow: hidden; }
.upload-bar > span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }

.job { display: grid; gap: 6px; }
.job + .job { margin-top: 12px; }

@media (max-width: 900px) {
  .course-layout { grid-template-columns: 1fr; }
  .outline { position: static; max-height: none; }
  .aula-top { padding: 0 12px; gap: 10px; }
  .aula-brand span { display: none; }
  .aula-main { padding: 16px; }
}
@media print { .aula-top { display: none !important; } .aula-main { padding: 0; max-width: none; } }
.section-title { margin: 26px 0 12px; font-size: 1.15rem; }
.spaced { margin-top: 16px; }
.grow { flex: 1; }
@media (max-width: 900px) { .course-layout .player { order: -1; } }
