/* ===== Superintensivão UEMS/UFMS — Colégio Refferencial =====
   Cores da marca: azul-escuro (fundo) + laranja da logo (destaques).
   --brand  = azul de foco/seleção   --accent = laranja da logo
   --grad   = botões principais       --grad-hero = faixas de destaque */
:root {
  --brand: #2f7bff;
  --brand-2: #6aa6ff;
  --brand-rgb: 47 123 255;
  --accent: #ff6b0f;
  --accent-rgb: 255 107 15;
  --grad: linear-gradient(135deg, #ff9a2e 0%, #ff6b0f 100%);
  --grad-hero: linear-gradient(135deg, #0a2a6b 0%, #1247b8 55%, #1d63e6 100%);

  --bg: #060d1f;
  --bg-2: #0a1429;
  --surface: #0f1b36;
  --surface-2: #162648;
  --border: rgba(160, 190, 255, .09);
  --border-2: rgba(160, 190, 255, .16);
  --text: #eef3ff;
  --muted: #9fb0d4;
  --faint: #6a7ca3;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --radius: 16px;
  --radius-sm: 10px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --brand: #1556d6;
  --brand-2: #1556d6;
  --brand-rgb: 21 86 214;
  --bg: #f3f6fc;
  --bg-2: #e9eef8;
  --surface: #ffffff;
  --surface-2: #f1f5fd;
  --border: rgba(10, 30, 80, .08);
  --border-2: rgba(10, 30, 80, .16);
  --text: #0b1a3a;
  --muted: #4f6288;
  --faint: #8494b5;
  --shadow: 0 10px 30px rgba(10, 40, 110, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
img { max-width: 100%; display: block; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- boot / loaders ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--border-2); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 80px 0; display: grid; place-items: center; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- botões / formulários ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border-2);
  background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: 14px;
  transition: transform .12s, background .2s, border-color .2s, opacity .2s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 6px 20px rgb(var(--accent-rgb) / .35); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); background: rgba(239, 68, 68, .08); }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn-icon { padding: 8px; border-radius: 10px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border-2);
  background: var(--bg-2); outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / .2); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.hint { font-size: 12px; color: var(--faint); }

.seg { display: inline-flex; padding: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 0 var(--border-2) inset; }

.dropzone {
  display: block;
  border: 2px dashed var(--border-2); border-radius: var(--radius); padding: 22px; text-align: center;
  cursor: pointer; transition: border-color .2s, background .2s; color: var(--muted);
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: rgb(var(--brand-rgb) / .06); }
.dropzone strong { color: var(--text); display: block; margin-bottom: 4px; }
.dropzone .ic { width: 28px; height: 28px; margin: 0 auto 8px; display: block; color: var(--brand-2); }

.progress { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s; }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
  position: relative; overflow: hidden; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background: radial-gradient(1200px 600px at -10% -10%, rgb(var(--brand-rgb) / .55), transparent 60%),
              radial-gradient(900px 600px at 110% 110%, rgb(var(--accent-rgb) / .38), transparent 60%), #050b1a;
  color: #fff;
}
.auth-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .25;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 70%);
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero h1 { font-size: clamp(34px, 4.2vw, 58px); font-weight: 800; letter-spacing: -.03em; margin: 18px 0 16px; }
.auth-hero .lead { font-size: 18px; color: rgba(255,255,255,.75); max-width: 520px; }
.auth-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 620px; }
.auth-feat { padding: 16px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px); }
.auth-feat .ic { width: 22px; height: 22px; color: #ffb27a; margin-bottom: 8px; }
.auth-feat b { display: block; font-size: 14px; }
.auth-feat span { font-size: 12px; color: rgba(255,255,255,.65); }
.auth-side { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.auth-card .seg { width: 100%; margin: 24px 0 22px; }
.auth-card .seg button { flex: 1; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; border: 1px solid; }
.alert-err { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3); color: #fca5a5; }
.alert-info { background: rgb(var(--brand-rgb) / .08); border-color: rgb(var(--brand-rgb) / .3); color: var(--text); }
:root[data-theme="light"] .alert-err { color: #b91c1c; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 44px; height: 44px; border-radius: 13px; background: #fff; padding: 4px; display: grid; place-items: center; box-shadow: 0 6px 20px rgb(var(--accent-rgb) / .28); flex-shrink: 0; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-logo { width: 210px; max-width: 60%; filter: drop-shadow(0 0 22px rgba(255, 255, 255, .18)) drop-shadow(0 10px 30px rgba(0, 0, 0, .45)); }
.brand-name { font-weight: 800; font-size: 15px; line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; font-size: 12px; opacity: .65; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 22px;
  background: var(--bg-2); border-right: 1px solid var(--border); overflow-y: auto;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted);
  font-weight: 600; font-size: 14px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav a.on .ic { color: var(--accent); }
.side-foot { margin-top: auto; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.me-info { min-width: 0; flex: 1; }
.me-info b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-info span { font-size: 12px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; background: var(--grad); }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 32px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.search { position: relative; flex: 1; max-width: 460px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 38px; background: var(--surface); }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.view { padding: 28px 32px 60px; max-width: 1400px; width: 100%; margin: 0 auto; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section { margin-top: 34px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.section-head h2 { font-size: 18px; font-weight: 700; }
.section-head a { font-size: 13px; color: var(--brand-2); font-weight: 600; }

/* ---------- hero do painel ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 32px; color: #fff;
  background: radial-gradient(520px 280px at 100% 100%, rgb(var(--accent-rgb) / .42), transparent 65%),
              radial-gradient(700px 300px at 0% 0%, rgba(255,255,255,.14), transparent 60%), var(--grad-hero);
  box-shadow: 0 20px 50px rgba(5, 25, 80, .45);
}
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255,255,255,.1); }
.hero h1 { font-size: 30px; font-weight: 800; }
.hero p { opacity: .85; margin-top: 6px; max-width: 560px; }
.hero .hero-progress { margin-top: 22px; max-width: 420px; }
.hero .progress { background: rgba(255,255,255,.25); height: 8px; }
.hero .progress > i { background: #fff; }
.hero-meta { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; opacity: .9; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; }
.stat { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; gap: 14px; align-items: center; }
.stat-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--brand-rgb) / .14); color: var(--brand-2); flex-shrink: 0; }
.stat-ic .ic { width: 22px; height: 22px; }
.stat b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- cards de aula ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 20px; }
.lesson { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, border-color .2s, box-shadow .2s; cursor: pointer; }
.lesson:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-art { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.thumb-art .big { font-size: 64px; font-weight: 800; color: rgba(255,255,255,.22); letter-spacing: -.04em; position: absolute; right: 14px; bottom: -6px; }
.thumb-play {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
  display: grid; place-items: center; color: #fff; transition: transform .2s, background .2s; z-index: 1;
}
.thumb-play .ic { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }
.lesson:hover .thumb-play { transform: scale(1.1); background: rgba(255,255,255,.3); }
.thumb .badge-tl { position: absolute; top: 10px; left: 10px; z-index: 2; }
.thumb .badge-br { position: absolute; bottom: 10px; right: 10px; z-index: 2; }
.thumb .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.35); z-index: 2; }
.thumb .bar > i { display: block; height: 100%; background: var(--accent); }
.lesson-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lesson-body h3 { font-size: 15px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lesson-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; margin-top: auto; flex-wrap: wrap; }
.lesson-meta span { display: inline-flex; align-items: center; gap: 4px; }
.lesson-meta .ic { width: 14px; height: 14px; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.tag .dot { width: 8px; height: 8px; border-radius: 50%; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; backdrop-filter: blur(4px); }
.pill .ic { width: 12px; height: 12px; }
.pill-ok { background: var(--ok); }
.pill-warn { background: var(--warn); color: #1a1200; }
.badge { display: inline-flex; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.b-aluno { background: rgba(14,165,233,.14); color: #38bdf8; }
.b-professor { background: rgba(255,122,26,.14); color: #fb923c; }
.b-gestor { background: rgb(var(--brand-rgb) / .16); color: var(--brand-2); }
.b-ok { background: rgba(34,197,94,.14); color: #4ade80; }
.b-warn { background: rgba(245,158,11,.14); color: #fbbf24; }
.b-off { background: rgba(239,68,68,.12); color: #f87171; }
:root[data-theme="light"] .b-aluno { color: #0369a1; }
:root[data-theme="light"] .b-professor { color: #c2410c; }
:root[data-theme="light"] .b-ok { color: #15803d; }
:root[data-theme="light"] .b-warn { color: #b45309; }
:root[data-theme="light"] .b-off { color: #b91c1c; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: thin; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border-2);
  background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; color: var(--muted); transition: all .15s;
}
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip small { opacity: .6; font-weight: 700; }

.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 18px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.row-scroll > * { scroll-snap-align: start; }

/* ---------- player ---------- */
.watch { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.player { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.player video, .player iframe { width: 100%; height: 100%; display: block; border: 0; background: #000; }
.watermark {
  position: absolute; pointer-events: none; user-select: none; color: rgba(255,255,255,.22); font-size: 13px; font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.4); transition: top 2s ease, left 2s ease; white-space: nowrap; z-index: 2;
}
.watch-info { margin-top: 18px; }
.watch-info h1 { font-size: 24px; font-weight: 800; margin: 10px 0 8px; }
.watch-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--border); }
.prof { display: flex; align-items: center; gap: 10px; }
.prof b { display: block; font-size: 14px; }
.prof span { font-size: 12px; color: var(--muted); }
.desc { white-space: pre-wrap; color: var(--muted); margin-top: 16px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: 26px 0 18px; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; }
.tabs button.on { color: var(--text); border-bottom-color: var(--brand); }
.tabs .count { font-size: 11px; background: var(--surface-2); padding: 1px 7px; border-radius: 99px; }

.playlist { position: sticky; top: 86px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; overflow: hidden; }
.playlist-head { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.playlist-head b { display: block; }
.playlist-list { overflow-y: auto; padding: 8px; }
.pl-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.pl-item:hover { background: var(--surface-2); }
.pl-item.on { background: rgb(var(--brand-rgb) / .14); }
.pl-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); flex-shrink: 0; color: var(--muted); }
.pl-item.done .pl-num { background: var(--ok); color: #fff; }
.pl-item.on .pl-num { background: var(--brand); color: #fff; }
.pl-item b { font-size: 13px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-item span { font-size: 12px; color: var(--faint); }

/* ---------- listas ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.file { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: border-color .15s; }
.file:hover { border-color: var(--border-2); }
.file-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0; letter-spacing: .02em; }
.file-main { flex: 1; min-width: 0; }
.file-main b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-main span { font-size: 12px; color: var(--muted); }
.file-actions { display: flex; gap: 6px; flex-shrink: 0; }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); border: 1px dashed var(--border-2); border-radius: var(--radius); }
.empty .ic { width: 40px; height: 40px; margin: 0 auto 12px; display: block; color: var(--faint); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ---------- comentários ---------- */
.composer { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 22px; }
.composer form { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 70px; }
.comment { display: flex; gap: 12px; padding: 14px 0; }
.comment + .comment { border-top: 1px solid var(--border); }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.comment-head b { font-size: 14px; }
.comment-text { margin-top: 4px; white-space: pre-wrap; word-wrap: break-word; }
.comment-actions { display: flex; gap: 12px; margin-top: 6px; }
.comment-actions button { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 12px; font-weight: 700; padding: 0; }
.comment-actions button:hover { color: var(--text); }
.replies { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--border); }
.replies .comment { padding: 10px 0; }
.staff-reply { background: rgb(var(--brand-rgb) / .07); border-radius: 12px; padding: 10px 12px !important; margin-top: 6px; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-2); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.td-user { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.td-user b { display: block; font-size: 14px; }
.td-user span { font-size: 12px; color: var(--muted); }
.td-actions { display: flex; gap: 4px; justify-content: flex-end; }
.mini-thumb { width: 72px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; position: relative; flex-shrink: 0; background: var(--surface-2); }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
code.code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; background: var(--bg-2); border: 1px solid var(--border-2); padding: 3px 8px; border-radius: 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { max-width: 320px; }

/* ---------- progresso por disciplina ---------- */
.disc-prog { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.disc-prog .card { padding: 14px 16px; cursor: pointer; transition: border-color .15s; }
.disc-prog .card:hover { border-color: var(--border-2); }
.disc-prog .top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 10px; gap: 8px; }
.disc-prog .top b { font-size: 14px; }

.aviso { padding: 18px 20px; }
.aviso + .aviso { margin-top: 12px; }
.aviso h3 { font-size: 16px; margin-bottom: 6px; }
.aviso p { white-space: pre-wrap; color: var(--muted); }
.aviso-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 12px; color: var(--faint); gap: 8px; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 6, 14, .66); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fadein .2s; }
@keyframes fadein { from { opacity: 0; } }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border-2); border-radius: 20px; box-shadow: var(--shadow); animation: pop .22s ease; }
.modal.lg { max-width: 720px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 0; }
.modal-head h3 { font-size: 19px; font-weight: 800; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 22px; }
.cred { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 14px; padding: 16px; font-size: 14px; }
.cred div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; }
.cred div + div { border-top: 1px solid var(--border); }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; animation: pop .2s; max-width: 380px; }
.toast.ok .ic { color: var(--ok); }
.toast.err .ic { color: var(--danger); }

.backdrop { display: none; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .watch { grid-template-columns: 1fr; }
  .playlist { position: static; max-height: 420px; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 24px 32px; min-height: auto; gap: 26px; }
  .auth-logo { width: 150px; }
  .auth-hero h1 { font-size: 34px; }
  .auth-feats { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .view { padding: 20px 16px 50px; }
  .hero { padding: 24px; }
  .hero h1 { font-size: 24px; }
  .page-head h1 { font-size: 23px; }
  .row { flex-direction: column; gap: 0; }
  .hide-sm { display: none; }
}

/* ===================== VÁRIOS CURSOS ===================== */
.curso-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 25%, transparent); }

/* seletor de curso no menu lateral */
.curso-atual {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border-2); transition: border-color .15s, background .15s;
}
.curso-atual:hover { border-color: var(--c, var(--brand)); background: var(--surface-2); }
.curso-txt { min-width: 0; flex: 1; }
.curso-txt small { display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.curso-txt b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.curso-trocar { font-size: 11px; font-weight: 700; color: var(--accent); }

/* etiqueta do curso no topo do painel */
.hero-curso {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
  padding: 5px 12px; border-radius: 99px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  font-size: 13px; font-weight: 700; color: #fff;
}
.hero-curso small { opacity: .7; font-weight: 600; }
.hero-curso:hover { background: rgba(255,255,255,.22); }
.hero h1, .hero p, .hero > div { position: relative; z-index: 1; }

/* tela "Meus cursos" */
.cursos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.curso-card {
  position: relative; overflow: hidden; border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.curso-card:hover, .curso-card:focus-visible { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 18px 40px rgba(0,0,0,.3); outline: none; }
.curso-card.atual { border-color: var(--c); }
.curso-capa {
  position: relative; height: 130px; overflow: hidden;
  background: radial-gradient(260px 160px at 85% 120%, rgba(255,255,255,.22), transparent 60%),
              linear-gradient(135deg, var(--c) 0%, color-mix(in srgb, var(--c) 55%, #060d1f) 100%);
}
.curso-capa::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 28px solid rgba(255,255,255,.12); }
.curso-sigla { position: absolute; left: 20px; bottom: 6px; font-size: 44px; font-weight: 800; letter-spacing: -.04em; color: rgba(255,255,255,.9); text-shadow: 0 4px 18px rgba(0,0,0,.25); max-width: calc(100% - 30px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.curso-badge { position: absolute; top: 12px; left: 12px; z-index: 1; }
.curso-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.curso-body h3 { font-size: 19px; font-weight: 800; }
.curso-body .btn { margin-top: auto; }

/* login: lista dos cursos */
.auth-cursos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.auth-curso { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: 13px; font-weight: 700; }
.auth-curso i { width: 9px; height: 9px; border-radius: 50%; }

/* matrícula: caixas de curso */
.check-cursos { display: flex; flex-wrap: wrap; gap: 8px; }
.check-curso { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--bg-2); cursor: pointer; font-size: 14px; font-weight: 600; transition: border-color .15s, background .15s; }
.check-curso input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.check-curso:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--bg-2)); }
.mini-cursos { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; }
.mini-cursos .tag { font-size: 11px; padding: 2px 8px; }
