.portal {
  color-scheme: dark;
  --canvas: #090d1c;
  --rail: #080b18;
  --side: #101528;
  --panel: #11182b;
  --panel-raised: #151f35;
  --border: #242e46;
  --white: #f0f3fd;
  --dim: #a3aec6;
  --aqua: #5ce6d5;
  --blue: #b2bcff;
  --font: "DM Sans", system-ui, sans-serif;
  background: var(--canvas);
  color: var(--white);
  font: 14px/1.5 var(--font);
}
.portal h1, .portal h2, .portal h3 { font-family: var(--font); font-weight: 750; line-height: 1.16; letter-spacing: -.025em; }
.portal h1 { font-size: clamp(30px, 4vw, 48px); }
.portal h2 { font-size: 19px; }
.portal h3 { font-size: 15px; }
.portal :focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }
.portal .skip-link { color: var(--rail); background: var(--aqua); }
.portal button, .portal input, .portal textarea, .portal select { font: inherit; }
.portal button, .portal a, .portal strong { overflow-wrap: anywhere; }
.portal button { color: inherit; }
.portal .glyph { font-family: "DejaVu Sans", "Segoe UI Symbol", sans-serif; display: inline-grid; place-items: center; width: 20px; flex: 0 0 20px; font-size: 17px; line-height: 1; }
.portal .muted { color: var(--dim); }
.loading { margin: 36px; color: var(--dim); }
.control {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px;
  border-radius: 8px; border: 1px solid transparent; padding: 9px 14px; font-weight: 750 !important; line-height: 1.25;
}
.portal .primary { color: #092623; background: var(--aqua); }
.primary:hover { background: #8aeee3; }
.subtle { border-color: #39465f; background: #10162e75; color: var(--white); }
.subtle:hover { background: #26334c; }
.control:disabled { cursor: default; background: #1b2337; border-color: #2b354c; color: #9ba6bf; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; background: transparent; border-radius: 7px; }
.icon-button:hover { background: var(--panel-raised); }
.link-button { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 4px 0; background: transparent; font-weight: 670 !important; color: var(--aqua) !important; }
.link-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.feedback { color: #ffb7c2; font-size: 13px; }
.eyebrow, .nav-label { color: var(--dim); font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.logo { display: grid; place-items: center; flex: 0 0 41px; width: 41px; height: 41px; border: 1px solid #445c7b; border-radius: 13px; background: #142743; color: #8cf6e9; font: 23px/1 "Instrument Serif", Georgia, serif; letter-spacing: -.09em; padding-right: 2px; }
.logo:hover { border-color: var(--aqua); }
.dot { display: inline-block; width: 7px; height: 7px; background: var(--aqua); border-radius: 50%; }

.access { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; }
.access-intro { display: flex; flex-direction: column; justify-content: space-between; gap: 65px; padding: clamp(32px, 7vw, 110px); background: radial-gradient(ellipse at 10% 65%, #22334d, transparent 78%), #11162f; }
.wordmark { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 740; }
.access-intro h1 { margin: 12px 0 16px; font-size: clamp(38px, 6vw, 76px); }
.access-intro h1 span { color: var(--aqua); }
.access-intro p:last-child { max-width: 340px; color: var(--dim); font-size: 16px; }
.access-side { display: grid; align-items: center; padding: 30px; }
.access-form { width: min(100%, 400px); margin-inline: auto; padding: 30px; border: 1px solid var(--border); border-radius: 13px; background: var(--panel); }
.access-form h2 { font-size: 24px; }
.access-form > p:not(.feedback) { margin: 8px 0 18px; color: var(--dim); }
.access-form .control { display: flex; width: 100%; margin-top: 14px; }
.portal label:not(.checkbox) { display: block; margin: 12px 0 5px; font-weight: 700; }
.portal input:not([type=checkbox]), .portal select, .portal textarea {
  display: block; width: 100%; min-height: 42px; color: var(--white); background: var(--canvas);
  border: 1px solid #3a4762; border-radius: 7px; padding: 8px 11px;
}
.portal textarea { min-height: 94px; resize: vertical; }
.portal input[type=file] { padding: 8px; }
.portal .checkbox { display: flex; align-items: center; gap: 8px; margin: 12px 0; }

.workspace { display: grid; grid-template-columns: 66px 225px minmax(0, 1fr); min-height: 100svh; }
.rail { min-width: 0; background: var(--rail); border-right: 1px solid #20283c; padding: 16px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rail-divider { width: 25px; height: 1px; background: var(--border); }
.rail-button { width: 38px; height: 38px; border: 1px solid transparent; border-radius: 11px; background: var(--panel); }
.rail-button[aria-current] { border-color: #336d71; color: var(--aqua); }
.sidebar { position: sticky; top: 0; align-self: start; height: 100svh; display: flex; flex-direction: column; background: var(--side); border-right: 1px solid var(--border); }
.sidebar-title { min-height: 68px; padding: 14px 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.sidebar-title strong { display: block; font-size: 15px; }
.sidebar-title small { display: block; margin-top: 2px; color: var(--dim); letter-spacing: .09em; font-size: 9px; }
.mobile-logo { display: none; }
.navigation { overflow-y: auto; flex: 1; padding: 19px 12px; }
.nav-label { margin: 0 8px 10px; }
.nav-button, .room-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; margin: 2px 0; border: 1px solid transparent; border-radius: 8px; text-align: left; background: transparent; color: var(--dim) !important; font-size: 13px !important; }
.nav-button:hover, .room-button:hover { background: #1b253c; color: var(--white) !important; }
.nav-button[aria-current], .room-button[aria-current] { border-color: #244955; background: #152e3c; color: #93f3e7 !important; }
.rooms { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }
.room-symbol { display: grid; place-items: center; flex: 0 0 27px; height: 27px; color: var(--blue); border-radius: 6px; background: #263255; font-weight: 800; font-size: 11px; }
.sidebar-bottom { padding: 10px; background: #0c1123; border-top: 1px solid var(--border); }
.demo-toggle { display: block; width: 100%; text-align: left; padding: 7px; background: #151c34; border: 1px solid #303a59; border-radius: 7px; margin-bottom: 9px; color: var(--blue) !important; font-size: 12px !important; }
.demo-toggle:hover { background: #202b49; }
.profile-row, .profile-button { display: flex; align-items: center; min-width: 0; gap: 7px; }
.profile-row { justify-content: space-between; }
.profile-button { flex: 1; border: 0; border-radius: 7px; padding: 5px; text-align: left; background: transparent; }
.profile-button:hover { background: #202941; }
.avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; overflow: hidden; border: 1px solid #536697; border-radius: 10px; color: #d9dcff; background: #303b65; font-size: 11px; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-label { min-width: 0; flex: 1; }
.profile-label strong, .profile-label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-label small { color: var(--dim); }

.work-area { min-width: 0; }
.workspace-header { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 26px; border-bottom: 1px solid var(--border); background: #0c1122; }
.breadcrumb { display: flex; align-items: center; min-width: 0; gap: 9px; color: var(--dim); }
.breadcrumb strong { color: var(--white); }
.slash { color: #69738f; }
.back-link { margin-left: auto; white-space: nowrap; color: var(--dim); font-size: 12px; }
.back-link:hover { color: var(--aqua); }
.demo-badge { color: #c5cafd; padding: 3px 8px; border: 1px solid #434d73; border-radius: 30px; white-space: nowrap; font-size: 11px; }
.desk { display: grid; grid-template-columns: minmax(0, 1fr) 250px; min-height: calc(100svh - 68px); }
.desk-main { width: 100%; max-width: 1080px; min-width: 0; margin-inline: auto; padding: 0 clamp(20px, 3vw, 40px) 36px; }
.room-tabs { display: flex; gap: 19px; margin-bottom: 23px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.room-tabs button { flex-shrink: 0; min-height: 54px; padding: 8px 1px; border: 0; border-bottom: 2px solid transparent; color: var(--dim); background: transparent; font-weight: 700; font-size: 13px; }
.room-tabs button[aria-current] { border-bottom-color: var(--aqua); color: var(--aqua); }
.room-tabs button:hover { color: var(--white); }
.room-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(20px, 4vw, 38px); border: 1px solid #344063; border-radius: 13px; background: linear-gradient(104deg, #171c37 17%, #192743 57%, #192e47); }
.room-hero-content { position: relative; max-width: 83%; }
.room-hero .eyebrow { display: flex; align-items: center; gap: 7px; color: #94eadd; }
.room-hero h1 { margin: 12px 0 7px; overflow-wrap: anywhere; }
.room-hero p:not(.eyebrow) { color: #c5cfe5; font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
.room-art { pointer-events: none; position: absolute; right: -8%; top: 50%; z-index: -1; width: 55%; max-width: 350px; aspect-ratio: 1; transform: translateY(-50%); }
.room-art i { position: absolute; inset: 6%; border: 1px solid #87bee940; border-radius: 50%; transform: rotate(-30deg) scaleY(.64); }
.room-art i:nth-child(2) { inset: 14%; transform: rotate(-30deg) scaleY(.64); }
.room-art i:nth-child(3) { inset: 22%; transform: rotate(-30deg) scaleY(.64); }
.room-art span { position: absolute; top: 20%; left: 16%; color: #88ebde; font-size: 24px; }
.overview-section { margin-top: 25px; }
.section-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.page-heading { margin: 6px 0 20px; }
.page-heading h1 { font-size: clamp(26px, 3vw, 36px); }
.page-heading p { margin-top: 6px; color: var(--dim); }
.card, .material-row, .lesson-row { border: 1px solid var(--border); border-radius: 9px; background: var(--panel); }
.items { display: grid; gap: 9px; }
.material-row { display: flex; align-items: center; gap: 12px; padding: 12px; }
.material-row .item-label { flex: 1; min-width: 0; }
.material-row p, .lesson-row p, .person p { color: var(--dim); font-size: 12px; }
.portal .item-icon { display: grid; place-items: center; flex: 0 0 39px; width: 39px; height: 39px; border-radius: 8px; background: #212c4f; color: var(--blue); }
.material-open { padding: 7px 10px; min-height: 35px; font-size: 12px !important; }
.lesson-row { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; padding: 14px; }
.date-badge { display: grid; place-items: center; flex: 0 0 54px; height: 54px; padding: 4px; color: #9df7ea; background: #173844; border: 1px solid #295361; border-radius: 8px; line-height: 1; font-size: 10px; }
.date-badge strong { font-size: 21px; }
.lesson-info { flex: 1; min-width: min(155px, 100%); }
.lesson-info p { margin-top: 3px; }
.lesson-actions { display: flex; flex-direction: column; gap: 4px; }
.lesson-actions small { color: var(--dim); font-size: 11px; }
.lesson-actions .control { min-height: 35px; font-size: 12px; }
.empty { padding: 17px; border: 1px dashed #34415d; border-radius: 8px; color: var(--dim); }
.roster { min-width: 0; padding: 22px 18px; background: #0d1326; border-left: 1px solid var(--border); }
.roster-header { display: flex; align-items: center; gap: 8px; margin-bottom: 21px; }
.roster-header h2 { font-size: 16px; }
.roster-icon { color: var(--aqua); }
.roster-label { margin: 16px 0 8px; }
.person { display: flex; min-width: 0; align-items: center; gap: 9px; margin-bottom: 6px; padding: 7px 3px; }
.person strong { display: block; font-size: 13px; }
.person.teacher { padding: 10px; border: 1px solid #254552; border-radius: 8px; background: #112936; }
.person.teacher .avatar { background: #184351; border-color: #37747b; color: #a0f4e8; }
.person .avatar { border-radius: 50%; }
.roster .link-button { margin-top: 10px; font-size: 13px; }
.full-members { max-width: 610px; }
.full-members .person:not(.teacher) { padding: 9px; border: 1px solid var(--border); background: var(--panel); border-radius: 7px; }
.management { display: flex; flex-wrap: wrap; gap: 7px; }

.portal dialog { width: min(530px, calc(100vw - 24px)); color: var(--white); padding: 24px; background: var(--panel); border: 1px solid #394762; border-radius: 12px; }
.portal dialog::backdrop { background: #050815c5; }
.portal dialog .dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.portal dialog h2 { padding: 0; font-size: 22px; }
.portal dialog p { margin: 8px 0; }
.portal dialog .control { margin-top: 15px; }
#material-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 5; right: 17px; bottom: 17px; padding: 9px 14px; max-width: calc(100vw - 34px); background: #153b43; color: #b1fbef; border: 1px solid #346d73; border-radius: 8px; }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: 57px 186px minmax(0, 1fr); }
  .desk { grid-template-columns: minmax(0, 1fr) 205px; }
  .roster { padding-inline: 12px; }
}
@media (max-width: 930px) {
  .workspace { grid-template-columns: 185px minmax(0, 1fr); }
  .rail { display: none; }
  .desk { grid-template-columns: minmax(0, 1fr); }
  .roster { border-left: 0; border-top: 1px solid var(--border); padding: 20px 24px; }
}
@media (max-width: 630px) {
  .access { grid-template-columns: 1fr; }
  .access-intro { gap: 23px; padding: 24px; }
  .access-intro h1 br { display: none; }
  .access-side { padding: 18px; }
  .workspace { display: block; }
  .sidebar { position: static; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; border-right: 0; }
  .sidebar-title { border: 0; padding: 9px 12px; min-height: 54px; }
  .sidebar-title small { display: none; }
  .mobile-logo { display: grid; width: 31px; height: 31px; flex-basis: 31px; font-size: 19px; border-radius: 8px; }
  .navigation { grid-row: 2; grid-column: 1 / -1; padding: 0 12px 7px; overflow: visible; }
  .navigation > .nav-label, .nav-button { display: none; }
  .rooms { margin: 0; padding: 0; border: 0; }
  .rooms .nav-label { display: none; }
  #room-buttons { display: flex; flex-wrap: wrap; gap: 4px; }
  #room-buttons .room-button { width: auto; margin: 1px 0; padding: 3px 6px; }
  .room-symbol { flex-basis: 20px; height: 20px; }
  .sidebar-bottom { grid-row: 1; grid-column: 2; padding: 5px 8px 5px 0; border: 0; background: transparent; }
  .demo-toggle { font-size: 10px !important; margin-bottom: 1px; padding: 3px 5px; }
  .profile-button { max-width: 130px; }
  .profile-label small { display: none; }
  .profile-label strong { font-size: 11px; }
  .profile-row .icon-button { width: 28px; }
  .profile-row .avatar { flex-basis: 27px; width: 27px; height: 27px; }
  .workspace-header { min-height: 40px; padding: 5px 12px; gap: 6px; }
  .breadcrumb { font-size: 11px; }
  .breadcrumb > span { display: none; }
  .back-link { font-size: 10px; }
  .demo-badge { font-size: 9px; }
  .desk-main { padding-inline: 12px; }
  .room-tabs { gap: 13px; margin-bottom: 15px; }
  .room-tabs button { min-height: 42px; font-size: 12px; }
  .room-hero-content { max-width: 100%; }
  .room-art { opacity: .65; }
  .roster { padding-inline: 13px; }
}
#view-espera { margin-top: 28px; }
#refresh-room { margin-top: 16px; }

.view h1[tabindex="-1"]:focus { outline: none; }
.item-label, .lesson-info, .breadcrumb, .portal dialog h2 { overflow-wrap: anywhere; }
.group-icon { display: inline-block; position: relative; width: 20px; height: 18px; flex: 0 0 20px; }
.group-icon::before, .group-icon::after { content: ""; position: absolute; }
.group-icon::before {
  top: 2px; left: 4px; width: 5px; height: 5px; background: currentColor; border-radius: 50%;
  box-shadow: 7px 1px 0 -.5px currentColor;
}
.group-icon::after {
  bottom: 2px; left: 1px; width: 11px; height: 6px; border: 1px solid currentColor; border-bottom: 0;
  border-radius: 6px 6px 0 0; box-shadow: 5px 1px 0 -1px currentColor;
}

.portal :is(.control, .icon-button, .nav-button, .room-button, .room-tabs button,
  .questoes-opcao, .questoes-lista, .questao-alternativa, .profile-button, .link-button) {
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease,
    box-shadow 150ms ease, transform 150ms ease;
}

.portal :is(.control, .questoes-opcao, .questoes-lista):not(:disabled):active {
  transform: translateY(2px);
}

.portal .view[data-active],
.portal dialog[open],
.portal .questao-explicacao:not([hidden]) {
  animation: portal-enter 170ms ease-out;
}

.portal dialog[open]::backdrop { animation: portal-backdrop 170ms ease-out; }

@keyframes portal-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes portal-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .portal *, .portal *::before, .portal *::after, .portal dialog::backdrop {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}

#class-call { width: min(760px, calc(100vw - 24px)); }
#call-participants { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(175px, 100%), 1fr)); gap: 10px; }
#call-participants figure { margin: 0; background: var(--canvas); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
#call-participants video { width: 100%; display: block; max-height: 240px; }
#call-participants figcaption { padding: 6px 10px; }
