:root { --brand: #1d5e46; --ink: #17332a; --surface: #f6f8f6; }
*:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 4000; top: 10px; left: 10px; padding: 10px 14px; background: var(--brand); color: #fff; border-radius: 7px; transform: translateY(-160%); transition: transform .16s ease; }
.skip-link:focus { transform: translateY(0); color: #fff; }
.admin-page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-page-intro h1 { margin: 6px 0; }
.course-quick-actions { border: 1px solid #e1e8f0; border-radius: 16px; box-shadow: 0 8px 22px rgba(35, 57, 87, .06); }
.course-quick-actions-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.course-quick-actions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 18px; }
.course-quick-action { display: flex; flex-direction: column; align-items: flex-start; min-height: 130px; padding: 16px; border: 1px solid #e1e8f0; border-radius: 12px; color: #25342f; background: #fff; text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.course-quick-action > span { display: inline-flex; margin-bottom: 14px; color: var(--brand); }
.course-quick-action strong { font-size: .95rem; }
.course-quick-action small { margin-top: 5px; color: #627368; line-height: 1.35; }
.course-quick-action:hover, .course-quick-action:focus { color: #25342f; border-color: var(--brand); box-shadow: 0 10px 22px rgba(35, 57, 87, .11); transform: translateY(-2px); }
.course-quick-action.is-primary { border-color: var(--brand); color: #fff; background: var(--brand); }
.course-quick-action.is-primary > span, .course-quick-action.is-primary small { color: #fff; }
.course-quick-action.is-primary:hover, .course-quick-action.is-primary:focus { color: #fff; background: #174c39; }
.history-back-link { padding: 0; min-height: auto; line-height: 1.25; }
@media (min-width: 641px) { .history-back-link { display: none !important; } }
.admin-quick-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.admin-quick-stat { display: flex; flex-direction: column; gap: 5px; min-height: 132px; padding: 20px; border: 1px solid #e1e8f0; border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 8px 20px rgba(35, 57, 87, .06); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.admin-quick-stat:hover, .admin-quick-stat:focus { color: var(--ink); border-color: var(--brand); box-shadow: 0 12px 26px rgba(35, 57, 87, .12); transform: translateY(-2px); }
.admin-quick-stat strong { color: var(--brand); font-size: 2.1rem; line-height: 1.1; }
.admin-quick-stat span:last-child { margin-top: auto; color: var(--brand); font-size: .88rem; font-weight: 600; }
.admin-mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-left: 4px; border: 0; border-radius: 8px; color: #25342f; background: transparent; cursor: pointer; }
.admin-mobile-menu-toggle:hover, .admin-mobile-menu-toggle:focus { background: #eef3fa; }
#admin-sidebar-offcanvas .uk-offcanvas-bar { width: min(290px, 86vw); padding: 20px 0; color: #25342f; background: #fff; }
#admin-sidebar-offcanvas .uk-offcanvas-close { top: 14px; right: 14px; color: #25342f; }
#admin-sidebar-offcanvas .admin-sidebar-brand { color: #25342f; }
#admin-sidebar-offcanvas .admin-sidebar-nav li a, #admin-sidebar-offcanvas .admin-sidebar-nav li.active a { color: #25342f; }
#admin-sidebar-offcanvas .admin-sidebar-nav li a:hover, #admin-sidebar-offcanvas .admin-sidebar-nav li.active a { background: #f4f7fb; }
.continue-lesson { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; color: var(--ink); }
.student-app .continue-lesson strong { color: var(--student-brand-dark); font-size: 1.05rem; }
body { background: var(--surface); color: #25342f; }
.brand { color: var(--brand) !important; font-weight: 700; }
.platform-logo { display: block; max-width: 170px; max-height: 38px; object-fit: contain; object-position: left center; }
.app-nav { border-bottom: 1px solid #e1e8e3; background: #fff; }
.lesson-card { border-left: 4px solid #d8e3dc; transition: .2s ease; }
.lesson-card.unlocked { border-left-color: var(--brand); }
.lesson-card.locked { opacity: .62; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #15231d; }
.progress-track { height: 8px; border-radius: 8px; background: #e3ebe6; overflow: hidden; }
.progress-value { height: 100%; background: var(--brand); }
.activity-done { border-left: 4px solid #2f9e62; }
.activity-pending { border-left: 4px solid #e6a33f; }
.admin-card { border-top: 4px solid var(--brand); }
.quiz-step[hidden] { display: none; }
.quiz-timer { font-weight: 700; }
.quiz-option-row .uk-input { flex: 1; }
.quiz-question-block { border-left: 4px solid var(--brand); }
.module-cover { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }

.module-list-card { display: block; overflow: hidden; text-decoration: none; color: inherit; transition: .2s ease; }
.module-list-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-1px); }
.module-list-cover { display: block; width: 100%; aspect-ratio: 4 / 1; object-fit: cover; }
.module-hero-cover { display: block; width: 100%; aspect-ratio: 4 / 1; object-fit: cover; border-radius: 8px; }

.lesson-sidebar-list { list-style: none; margin: 0; padding: 0; }
.lesson-sidebar-list li { margin-bottom: 2px; }
.lesson-sidebar-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; color: inherit; text-decoration: none; font-size: .92rem; line-height: 1.3; }
a.lesson-sidebar-link:hover { background: #eef3f0; }
.lesson-sidebar-list li.current .lesson-sidebar-link { background: var(--surface); font-weight: 700; color: var(--brand); border: 1px solid #d8e3dc; }
.lesson-sidebar-list li.locked .lesson-sidebar-link { cursor: not-allowed; }
.uk-offcanvas-bar .lesson-sidebar { margin-top: 40px; }
.screen-content { min-height: 380px; }
.screen-nav { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 28px; }
.upload-box { padding: 24px; border: 2px dashed #cbd8d0; border-radius: 8px; display: grid; gap: 8px; }
.sortable-item { cursor: grab; border-left: 4px solid var(--brand); }
.sortable-item.dragging { opacity: .4; }
.drag-handle { font-size: 20px; margin-right: 12px; color: #73847b; }
.link-button, .link-danger { appearance: none; border: 0; padding: 0; background: none; color: #1e87f0; cursor: pointer; font: inherit; }
.link-danger { color: #d83b3b; }
.module-remove-action { display: inline-flex; align-items: center; gap: 6px; margin-left: 36px !important; font-weight: 600; }
.flash-toast { position: fixed; z-index: 5000; left: 24px; bottom: 24px; width: min(430px, calc(100vw - 32px)); margin: 0; padding: 18px 52px 18px 20px; border: 0; border-radius: 14px; color: #101510; background: rgba(86, 176, 111, .8); box-shadow: 0 14px 32px rgba(18, 52, 29, .24); backdrop-filter: blur(8px); transition: opacity .2s ease, transform .2s ease; }
.flash-toast.uk-alert-danger { background: rgba(214, 104, 96, .88); }
.flash-toast p { margin: 0; color: inherit; font-weight: 600; line-height: 1.45; }
.flash-toast-close { position: absolute; top: 12px; right: 12px; display: inline-flex; padding: 5px; border: 0; border-radius: 6px; color: #101510; background: transparent; cursor: pointer; }
.flash-toast-close:hover, .flash-toast-close:focus { background: rgba(255, 255, 255, .35); }
.flash-toast.is-leaving { opacity: 0; transform: translateY(12px); pointer-events: none; }
.type-picker a { text-decoration: none; font-weight: 700; border: 2px solid transparent; }
.type-picker a.selected { border-color: var(--brand); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-thumb { border: 0; padding: 0; background: #edf1ee; cursor: zoom-in; aspect-ratio: 4/3; overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(5,15,10,.94); display: flex; align-items: center; justify-content: space-between; }
.gallery-modal[hidden] { display: none; }
.gallery-modal img { max-height: 90vh; max-width: 82vw; object-fit: contain; }
.gallery-modal button { border: 0; background: rgba(255,255,255,.12); color: white; font-size: 44px; padding: 10px 20px; cursor: pointer; }
.gallery-modal [data-gallery-close] { position: absolute; top: 12px; right: 18px; }
.gallery-open { overflow: hidden; }
.gallery-admin { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.gallery-admin img { width: 100%; height: 100px; object-fit: cover; }
.gallery-admin button { width: 100%; border: 0; color: #b52626; cursor: pointer; }
.pdf-shell { background: #222b27; min-height: calc(100vh - 80px); }
.pdf-toolbar { position: sticky; top: 0; z-index: 2; background: #18201d; color: white; padding: 10px 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.pdf-page-input { width: 68px; display: inline-block; }
.pdf-stage { min-height: calc(100vh - 150px); overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 28px; position: relative; }
.pdf-stage canvas { background: white; box-shadow: 0 3px 22px rgba(0,0,0,.4); }
#pdf-loading { color: white; position: absolute; top: 60px; }
.support-materials { overflow: hidden; }
.support-materials > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 1.25rem; font-weight: 700; list-style: none; }
.support-materials > summary::-webkit-details-marker { display: none; }
.support-chevron { transition: transform .2s ease; }
.support-materials[open] .support-chevron { transform: rotate(180deg); }
.support-text-link { display: inline; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.support-text-link:hover { color: #123f30; }
.video-stage { width: 100%; text-align: center; background: #101915; border-radius: 8px; overflow: hidden; }
.video-frame { display: block; margin: 0 auto; }
.video-actions { display: flex; justify-content: center; padding: 12px; background: #101915; }
.video-stage:fullscreen, .video-stage:-webkit-full-screen, .video-stage.video-expanded { position: fixed; inset: 0; z-index: 3000; width: 100vw; height: 100vh; max-width: none; border-radius: 0; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; }
.video-stage:fullscreen .video-frame, .video-stage:-webkit-full-screen .video-frame, .video-stage.video-expanded .video-frame { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.video-stage:fullscreen .video-actions, .video-stage:-webkit-full-screen .video-actions, .video-stage.video-expanded .video-actions { position: absolute; z-index: 2; right: 12px; bottom: 12px; padding: 0; background: transparent; opacity: .65; }
.quiz-wizard { margin-top: 24px; }
.quiz-status, .quiz-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quiz-status { padding-bottom: 12px; border-bottom: 1px solid #dce5df; }
.quiz-step { min-height: 260px; padding: 24px 0; }
.quiz-answer { display: flex; align-items: flex-start; gap: 8px; padding: 13px 14px; margin: 10px 0; border: 1px solid #d7e0da; border-radius: 7px; cursor: pointer; }
.quiz-answer:hover { border-color: var(--brand); background: #f5faf7; }
.quiz-score { color: var(--brand); font-size: 3.25rem; font-weight: 700; line-height: 1; }
.quiz-result { text-align: center; }
.pdf-error { max-width: 620px; padding: 18px; color: #fff !important; background: #a52c2c; border-radius: 6px; }
@media (max-width: 640px) {
  .history-back-link { margin-bottom: 4px; }
  .admin-quick-stats { grid-template-columns: 1fr; gap: 10px; }
  .admin-quick-stat { min-height: 108px; }
  .flash-toast { left: 16px; bottom: 16px; }
  .module-remove-action { display: flex; width: max-content; margin: 20px 0 0 !important; }
  .admin-page-intro { display: block; }
  .admin-page-intro > .uk-button, .admin-page-intro > button { width: 100%; margin-top: 8px; }
  .course-quick-actions { padding: 18px; }
  .course-quick-actions-header > .uk-text-meta { display: none; }
  .course-quick-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
  .course-quick-action { min-height: 118px; padding: 13px; }
  .course-quick-action > span { margin-bottom: 11px; }
  .module-hero-cover { display: none; }
  .screen-content { padding: 20px; min-height: 300px; }
  .screen-nav { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0; }
  .screen-nav .uk-button { padding: 0 18px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-modal img { max-width: 70vw; }
  .gallery-admin { grid-template-columns: repeat(2,1fr); }
  .pdf-toolbar { justify-content: flex-start; }
  .pdf-stage { padding: 12px; justify-content: flex-start; }
  .video-frame { width: 100%; margin-inline: auto; }
  .video-fullscreen { min-width: 180px; }
  .quiz-step { min-height: 300px; padding: 20px 0; }
  .quiz-controls .uk-button { padding-inline: 16px; }
}
@media (max-width: 640px) {
  .video-stage:fullscreen .video-actions, .video-stage:-webkit-full-screen .video-actions, .video-stage.video-expanded .video-actions { right: 8px; bottom: 8px; }
}

/* Experiência do aluno */
.student-app {
  --student-brand: #315d91;
  --student-brand-dark: #1e426d;
  --student-accent: #e89f55;
  --student-ink: #1e2b3d;
  --student-muted: #68758a;
  --student-line: #e5eaf1;
  --student-page: #f4f7fb;
  background:
    radial-gradient(circle at 100% -10%, rgba(101, 147, 203, .18), transparent 30rem),
    var(--student-page);
  color: var(--student-ink);
  min-height: 100vh;
}
.student-app .app-nav {
  background: rgba(255,255,255,.92);
  border: 0;
  box-shadow: 0 2px 18px rgba(36, 62, 95, .08);
  backdrop-filter: blur(12px);
}
.student-app .app-nav .uk-container { max-width: 1280px; }
.student-app .brand {
  color: var(--student-brand) !important;
  font-size: 1.1rem;
  letter-spacing: .08em;
}
.student-app .uk-section { padding-top: 42px; padding-bottom: 50px; }
.student-app .uk-heading-small,
.student-app h1,
.student-app h2,
.student-app h3 { color: var(--student-ink); letter-spacing: -.025em; }
.student-app .uk-text-meta { color: var(--student-brand); font-size: .72rem; font-weight: 700; letter-spacing: .09em; }
.student-app .uk-text-muted { color: var(--student-muted) !important; }
.student-app .uk-card-default {
  border: 1px solid var(--student-line);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 30px rgba(35, 57, 87, .055);
}
.student-app .lesson-card {
  border-left: 0;
  position: relative;
  overflow: hidden;
}
.student-app .lesson-card.unlocked::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--student-brand), #6f9dd0);
}
.student-app .lesson-card.locked {
  opacity: .72;
  filter: saturate(.72);
  box-shadow: none;
}
.student-app .module-list-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.student-app .module-list-card:hover {
  transform: translateY(-3px);
  border-color: #ccd9e8;
  box-shadow: 0 18px 36px rgba(35, 57, 87, .12);
}
.student-app .module-list-card.locked:hover { transform: none; box-shadow: 0 10px 30px rgba(35, 57, 87, .055); }
.student-app .module-list-cover {
  aspect-ratio: 5 / 1;
  opacity: .9;
  filter: saturate(.82) contrast(.95);
}
.student-app .module-hero-cover {
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(35, 57, 87, .13);
}
.student-app .uk-button {
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: none;
}
.student-app .uk-button-primary {
  background: var(--student-brand);
  box-shadow: 0 6px 14px rgba(49, 93, 145, .2);
}
.student-app .uk-button-primary:hover,
.student-app .uk-button-primary:focus { background: var(--student-brand-dark); }
.student-app .uk-button-default {
  border-color: #d5deea;
  color: var(--student-brand-dark);
  background: #fff;
}
.student-app .uk-button-text { color: var(--student-brand); }
.student-app .progress-track {
  height: 10px;
  border-radius: 99px;
  background: #e6edf5;
  box-shadow: inset 0 1px 2px rgba(34, 62, 96, .08);
}
.student-app .progress-value { border-radius: inherit; background: linear-gradient(90deg, var(--student-brand), #73a4d8); }
.student-app .screen-content {
  min-height: 420px;
  padding: clamp(24px, 4vw, 44px);
  border-top: 4px solid #d8e6f6;
}
.student-app .screen-content > h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin-top: 12px; }
.student-app .screen-content > p { max-width: 72ch; color: #4e5d70; line-height: 1.75; }
.student-app .screen-nav {
  padding: 18px 0 4px;
  border-top: 1px solid var(--student-line);
}
.student-app .support-materials { border-radius: 16px; border-color: #dce6f1; box-shadow: none; }
.student-app .support-materials > summary {
  padding: 20px 24px;
  color: var(--student-brand-dark);
  font-size: 1rem;
}
.student-app .support-materials > .uk-card-body { border-top: 1px solid var(--student-line); }
.student-app .support-text-link { color: var(--student-brand); font-weight: 600; }
.student-app .video-stage {
  border: 1px solid #243b57;
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(20, 37, 57, .2);
}
.student-app .video-actions { background: #172536; }
.student-app .quiz-wizard { margin-top: 8px; }
.student-app .quiz-status { padding: 14px 16px; border: 1px solid var(--student-line); border-radius: 12px; background: #f8fbff; }
.student-app .quiz-step { min-height: 300px; padding: 30px 0; }
.student-app .quiz-answer {
  border-color: #dbe4ee;
  border-radius: 12px;
  padding: 16px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.student-app .quiz-answer:hover { border-color: #8eafd3; background: #f2f7fd; transform: translateX(3px); }
.student-app .quiz-answer:has(input:checked) { border-color: var(--student-brand); background: #edf5ff; box-shadow: 0 0 0 3px rgba(49, 93, 145, .1); }
.student-app .quiz-score { color: var(--student-brand); }
.student-app .upload-box { border-color: #aac0d7; border-radius: 14px; background: #f8fbff; }
.student-app footer { color: #8793a4; }

@media (max-width: 640px) {
  .student-app .uk-section { padding-top: 26px; padding-bottom: 34px; }
  .student-app .uk-heading-small { font-size: 2rem; }
  .student-app .uk-card-default { border-radius: 14px; }
  .student-app .module-list-cover { aspect-ratio: 3 / 1; }
  .student-app .screen-content { padding: 22px 18px; min-height: 330px; }
  .student-app .screen-nav {
    background: rgba(244,247,251,.96);
    backdrop-filter: blur(8px);
    margin-inline: -4px;
    padding: 12px 4px 4px;
  }
  .student-app .screen-nav .uk-button { min-height: 42px; }
  .student-app .support-materials > summary { padding: 17px 18px; }
  .student-app .quiz-status { align-items: flex-start; flex-direction: column; gap: 4px; }
  .student-app .quiz-step { min-height: 320px; padding: 24px 0; }
  .student-app .quiz-answer { padding: 14px; }
}.cover-preview { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; border: 1px solid #d7ded9; }
.cover-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-height: 270px; overflow: auto; padding: 2px; }
.cover-choice { padding: 0; overflow: hidden; border: 1px solid #d7ded9; border-radius: 7px; background: #fff; color: #34443b; cursor: pointer; text-align: left; }
.cover-choice img { width: 100%; aspect-ratio: 4 / 2; object-fit: cover; display: block; }
.cover-choice span { display: block; padding: 5px 7px; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-choice.is-selected { outline: 3px solid var(--brand); border-color: var(--brand); }
@media (max-width: 640px) { .cover-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.notification-button { position: relative; min-width: 38px; padding-inline: 8px; }
.notification-badge { position: absolute; top: 1px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #d73838; color: #fff; font-size: .66rem; line-height: 17px; text-align: center; font-weight: 700; }
.notification-dropdown { width: min(390px, calc(100vw - 24px)); padding: 16px; border-radius: 12px; box-shadow: 0 16px 38px rgba(31, 48, 71, .18); }
.notification-dropdown-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.notification-dropdown-header a { font-size: .78rem; font-weight: 700; color: var(--brand, #315d91); }
.notification-dropdown li { padding: 10px 8px; font-size: .82rem; line-height: 1.35; }
.notification-dropdown li strong { display: block; margin-bottom: 3px; color: #253852; }
.notification-dropdown li.is-unread { background: #f2f7fd; }
.notification-dropdown li a, .notification-link { color: inherit; text-decoration: none; display: block; }
.notification-dropdown li a:hover strong, .notification-link:hover h3 { color: var(--brand, #315d91); }
.notification-dropdown .notification-more { display: inline-block; margin-top: 8px; color: var(--brand, #315d91); font-size: .76rem; font-weight: 700; text-decoration: none; }
@media (max-width: 640px) {
  .notification-dropdown.uk-dropdown { position: fixed !important; top: 62px !important; right: 12px !important; left: 12px !important; width: auto !important; max-width: none !important; max-height: calc(100dvh - 78px); overflow-y: auto; }
  .notification-dropdown .uk-list { margin-bottom: 0; }
}
.notification-list { display: grid; gap: 12px; }
.notification-item { border-left: 4px solid transparent; }
.notification-item.is-unread { border-left-color: var(--brand, #315d91); background: #f8fbff; }
.notification-item h3 { margin: 0 0 7px; font-size: 1.05rem; }
.notification-item p { margin: 0; white-space: normal; }
.notification-preview { border-color: #dce6f1; }
.push-permission-prompt { position: fixed; z-index: 1200; right: 20px; bottom: 20px; width: min(360px, calc(100vw - 32px)); box-shadow: 0 18px 48px rgba(31, 48, 71, .22); border-top: 4px solid var(--brand, #315d91); }
.push-permission-prompt p { margin: 8px 0 16px; color: #516074; }
.media-library-modal { width: min(960px, calc(100vw - 28px)); }
.media-library-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; max-height: min(55vh, 520px); overflow-y: auto; padding: 4px; }
.media-library-item { border: 1px solid #d8e1ea; border-radius: 9px; overflow: hidden; padding: 0; background: #fff; color: #2f4158; text-align: left; cursor: pointer; }
.media-library-item:hover, .media-library-item:focus { border-color: var(--brand, #315d91); box-shadow: 0 0 0 3px rgba(49,93,145,.15); outline: 0; }
.media-library-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eef2f6; }
.media-library-item span, .media-library-item small { display: block; padding: 5px 7px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-library-item small { padding: 0 7px 7px; color: #728095; }
.media-library-item .media-library-select { display: block; margin: 0 7px 8px; padding: 6px; border-radius: 6px; background: var(--brand, #315d91); color: #fff; font-size: .72rem; text-align: center; }
@media (max-width: 700px) { .media-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }

/* Player de vídeo: área segura em tela cheia e navegação utilizável no celular. */
html.video-fullscreen-active,
body.video-fullscreen-active { overflow: hidden; }
.video-stage.video-expanded {
  position: fixed;
  inset: 0;
  z-index: 3000;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: #000;
  overflow: hidden;
}
.video-stage.video-expanded .video-frame {
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 0;
}
.video-stage.video-expanded .video-actions {
  position: absolute;
  z-index: 2;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  padding: 0;
  background: transparent;
  opacity: .85;
}
@media (max-width: 640px) {
  .screen-nav,
  .student-app .screen-nav {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-top: 22px;
    padding: 12px 0 4px;
    background: transparent;
    backdrop-filter: none;
  }
  .screen-nav > div { min-width: 0; }
  .screen-nav .uk-button {
    width: 100%;
    min-height: 44px;
    padding-inline: 10px;
    white-space: normal;
    line-height: 1.2;
  }
}
