/* Telas da plataforma: mesma identidade do curso (marinho, cobalto e âmbar), tema claro por padrão. */
:root {
  --bg: #F4F6FB; --surface: #FFFFFF; --sunk: #E9EDF5; --ink: #141A2B; --muted: #55607A; --line: #D6DCE8;
  --accent: #2343D9; --accent-hover: #1B36B5; --accent-soft: #E7ECFF; --on-accent: #FFFFFF;
  --ok: #0B7A4B; --ok-soft: #DFF5EA; --warn: #8A5700; --warn-soft: #FFF1D6; --bad: #B3261E; --bad-soft: #FCE4E2;
  --navy: #10152A; --amber: #F2BD55;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --raio: 12px; --sombra: 0 10px 30px rgba(16, 21, 42, .08);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0E1220; --surface: #161B2E; --sunk: #0A0E1A; --ink: #E6EAF5; --muted: #9AA5C0; --line: #2A3250;
  --accent: #8EA2FF; --accent-hover: #A9B8FF; --accent-soft: #232C4F; --on-accent: #0E1220;
  --ok: #5FD3A0; --ok-soft: #12352A; --warn: #F2BD55; --warn-soft: #3A2F17; --bad: #FF9C94; --bad-soft: #43201F;
  --sombra: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-body); min-height: 100vh; }
a { color: var(--accent); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
.sub { color: var(--muted); margin: 0 0 20px; }
code { font-family: var(--font-mono); font-size: .92em; background: var(--sunk); padding: 1px 6px; border-radius: 5px; }

/* Botões */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, transform .05s;
}
.botao:hover { background: var(--accent-hover); }
.botao:active { transform: translateY(1px); }
.botao[disabled] { opacity: .55; cursor: not-allowed; }
.botao.contorno { background: transparent; color: var(--accent); border-color: var(--accent); }
.botao.contorno:hover { background: var(--accent-soft); }
.botao.neutro { background: var(--surface); color: var(--ink); border-color: var(--line); }
.botao.neutro:hover { background: var(--sunk); }
.botao.perigo { background: var(--bad); color: #fff; }
.botao.perigo:hover { background: #941F18; }
.botao.ok { background: var(--ok); color: #fff; }
.botao.pequeno { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.botao.largo { width: 100%; }
.link-botao { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Formulários */
.campo { display: grid; gap: 6px; margin: 0 0 16px; }
.campo label { font-weight: 600; font-size: 15px; }
.campo small, .ajuda { color: var(--muted); font-size: 13.5px; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); font-size: 16px;
}
.campo textarea { min-height: 96px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.campo input[readonly] { background: var(--sunk); color: var(--muted); }
.campo-senha { position: relative; }
.campo-senha input { padding-right: 84px; }
.campo-senha button { position: absolute; right: 6px; top: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--sunk); font-size: 13px; font-weight: 600; cursor: pointer; }
.marcar { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: 14.5px; }
.marcar input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.erro-form { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-weight: 500; }
.ok-form { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-weight: 500; }

/* Telas de acesso: arte de um lado, formulário do outro. */
.acesso { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.acesso-arte {
  position: relative; overflow: hidden; background: var(--navy) var(--arte, none) center 70% / cover no-repeat;
  color: #fff; display: flex; flex-direction: column; justify-content: flex-start; padding: 48px;
}
.acesso-arte::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,21,42,.92) 0%, rgba(16,21,42,.55) 45%, rgba(16,21,42,.1) 100%); }
.acesso-arte > * { position: relative; z-index: 1; }
.marca { display: inline-flex; gap: 10px; align-items: center; font: 700 15px var(--font-display); color: inherit; text-decoration: none; letter-spacing: .01em; }
.marca i { font-style: normal; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--amber); color: var(--navy); font-weight: 800; }
.acesso-arte h1 { margin-top: 48px; font-size: clamp(30px, 4.2vw, 48px); max-width: 14ch; }
.acesso-arte h1 em { font-style: normal; color: var(--amber); }
.acesso-arte p { max-width: 42ch; color: #D5DBEC; font-size: 17px; }
.acesso-lista { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; color: #E6EAF5; }
.acesso-lista li { display: flex; gap: 10px; align-items: baseline; }
.acesso-lista li::before { content: "●"; color: var(--amber); font-size: 12px; }
.acesso-form { display: grid; place-items: center; padding: 40px 24px; }
.cartao { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--sombra); }
.cartao.largo { max-width: 640px; }
.rodape-form { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 15px; }
.rodape-form a { font-weight: 600; }
@media (max-width: 860px) {
  .acesso { grid-template-columns: 1fr; }
  .acesso-arte { min-height: 260px; padding: 28px 20px; }
  .acesso-arte h1 { margin-top: 24px; }
  .acesso-lista { display: none; }
  .acesso-form { padding: 24px 16px 40px; place-items: start center; }
  .cartao { padding: 24px 20px; }
}

/* Página simples, centralizada */
.simples { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; }
.topo-simples { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: var(--navy); color: #fff; }
.topo-simples nav { display: flex; gap: 8px; flex-wrap: wrap; }
.topo-simples .botao.neutro { background: transparent; color: #fff; border-color: #39425F; }
.topo-simples .botao.neutro:hover { background: #1B2240; }

.estado { text-align: center; }
.estado-icone { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; font-size: 32px; background: var(--warn-soft); color: var(--warn); }
.estado-icone.ok { background: var(--ok-soft); color: var(--ok); }
.estado-icone.erro { background: var(--bad-soft); color: var(--bad); }
.estado .acoes { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.contato { background: var(--sunk); border-radius: 10px; padding: 12px 14px; margin: 16px 0 0; white-space: pre-line; text-align: left; }

/* Modal próprio e avisos rápidos */
.modal-fundo { position: fixed; inset: 0; z-index: 100; background: rgba(10, 14, 26, .55); display: grid; place-items: center; padding: 16px; animation: aparecer .12s ease-out; }
.modal { width: 100%; max-width: 460px; background: var(--surface); color: var(--ink); border-radius: 16px; padding: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.modal h2 { font-size: 21px; margin-bottom: 8px; }
.modal p { margin: 0 0 12px; color: var(--muted); }
.modal .campo { margin-top: 12px; }
.modal-acoes { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.modal-copiar { display: flex; gap: 8px; margin-top: 12px; }
.modal-copiar input { flex: 1; min-width: 0; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); font: 13px var(--font-mono); }
.avisos { position: fixed; z-index: 110; right: 16px; bottom: 16px; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.aviso { background: var(--navy); color: #fff; border-radius: 12px; padding: 12px 16px; box-shadow: var(--sombra); font-weight: 500; border-left: 5px solid var(--amber); animation: aparecer .15s ease-out; }
.aviso.ok { border-left-color: #5FD3A0; }
.aviso.erro { border-left-color: #FF9C94; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Painel do mantenedor */
.painel { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.painel-menu { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: grid; align-content: start; gap: 4px; }
.painel-menu button { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font-weight: 600; cursor: pointer; }
.painel-menu button:hover { background: var(--sunk); }
.painel-menu button[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.contador { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--bad); color: #fff; font-size: 12.5px; display: inline-grid; place-items: center; }
.contador.neutro { background: var(--sunk); color: var(--muted); }
.painel-corpo { padding: 28px clamp(16px, 3vw, 36px) 64px; min-width: 0; }
.painel-cabeca { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.painel-cabeca h1 { margin: 0; font-size: 28px; }
.numeros { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.numero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 14px 16px; }
.numero b { display: block; font: 800 28px var(--font-display); }
.numero span { color: var(--muted); font-size: 14px; }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filtros input, .filtros select { min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.filtros input { flex: 1; min-width: 200px; }
.lista { display: grid; gap: 10px; }
.item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 14px 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center;
}
.item.pendente { border-left: 5px solid var(--warn); }
.item h3 { margin: 0; font-size: 17px; }
.item .meta { color: var(--muted); font-size: 14px; display: flex; gap: 4px 14px; flex-wrap: wrap; }
.item .acoes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.etiqueta { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--sunk); color: var(--muted); }
.etiqueta.pendente { background: var(--warn-soft); color: var(--warn); }
.etiqueta.aprovado { background: var(--ok-soft); color: var(--ok); }
.etiqueta.recusado, .etiqueta.bloqueado { background: var(--bad-soft); color: var(--bad); }
.barra { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; min-width: 120px; }
.barra i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.vazio { text-align: center; color: var(--muted); padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--raio); }
.grupo-videos { margin: 0 0 24px; }
.grupo-videos > h2 { font-size: 17px; color: var(--muted); font-family: var(--font-body); font-weight: 600; margin: 0 0 8px; }
.video-item { grid-template-columns: minmax(0, 1fr); }
.video-item details { font-size: 14.5px; color: var(--muted); }
.video-item details summary { cursor: pointer; font-weight: 600; }
.video-item details ul { margin: 6px 0 0; padding-left: 20px; }
.video-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.video-form input[type="url"] { flex: 1; min-width: 220px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.progresso-envio { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; flex-basis: 100%; }
.progresso-envio i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .2s; }
.grade-config { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 20px; }
.secao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 20px; margin-bottom: 20px; }
.tabela { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabela th, .tabela td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) {
  .painel { grid-template-columns: 1fr; }
  .painel-menu { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .item { grid-template-columns: 1fr; }
  .item .acoes { justify-content: flex-start; }
}

/* Verificação pública */
.verificar dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 20px 0 0; }
.verificar dt { color: var(--muted); }
.verificar dd { margin: 0; font-weight: 600; }
.selo { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.selo.ok { background: var(--ok-soft); color: var(--ok); }
.selo.erro { background: var(--bad-soft); color: var(--bad); }

/* Vitrine curta na tela de entrada */
.acesso-arte { background: radial-gradient(120% 80% at 100% 100%, #1C2A6B 0%, var(--navy) 60%); }
.acesso-arte::after { display: none; }
.vitrine-mini { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; max-width: 440px; }
.vitrine-mini li { display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 8px; }
.vitrine-mini img, .vitrine-mini .sem-capa { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.vitrine-mini .sem-capa { display: grid; place-items: center; background: var(--amber); color: var(--navy); font-weight: 800; }
.vitrine-mini b { display: block; line-height: 1.3; }
.vitrine-mini small { color: #C9D1E6; }
@media (max-width: 860px) { .vitrine-mini { display: none; } }
.sem-borda { border: 0; padding: 0; margin: 0; min-width: 0; }
.escolha-cursos { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 4px; }
.escolha-cursos legend { font-weight: 600; font-size: 15px; padding: 0 4px; }
.escolha-cursos .marcar { margin: 6px 0 10px; }

/* Meus cursos */
.vitrine { max-width: 1040px; margin: 0 auto; padding: 32px 16px 64px; }
.vitrine section { margin-top: 28px; }
.cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cartao-curso { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sombra); scroll-margin: 80px; }
.cartao-curso.destaque { outline: 3px solid var(--amber); }
.cartao-curso .capa, .curso-topo .capa { background: var(--navy); display: grid; place-items: center; color: var(--amber); font: 800 40px var(--font-display); }
.cartao-curso .capa { aspect-ratio: 16 / 7; position: relative; overflow: hidden; }
.cartao-curso .capa img { position: absolute; inset: 0; }
.cartao-curso .capa img, .curso-topo .capa img { width: 100%; height: 100%; object-fit: cover; object-position: center 70%; display: block; }
.cartao-curso .corpo { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cartao-curso h3 { margin: 0; font-size: 20px; }
.cartao-curso p { margin: 0; }
.cartao-curso .corpo > .acoes { margin-top: auto; padding-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.meta-curso { color: var(--muted); font-size: 14px; }
.nota-curso { color: var(--muted); font-size: 14.5px; white-space: pre-line; margin-top: 6px !important; }
.andamento { margin-top: 12px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.andamento b { color: var(--ink); }
.vitrine .contato { max-width: 520px; margin-top: 28px; }

/* Painel: cursos e alunos */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip-curso { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--sunk); color: var(--muted); }
.chip-curso.aprovado { background: var(--accent-soft); color: var(--accent); }
.chip-curso.pendente { background: var(--warn-soft); color: var(--warn); }
.chip-curso.recusado, .chip-curso.bloqueado { background: var(--bad-soft); color: var(--bad); }
.item.bloqueado { opacity: .75; }
.curso-pedido { font-weight: 600; color: var(--ink); }
.grade-cursos { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; margin-top: 8px; }
.grade-cursos select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.modal h3 { font-size: 16px; margin: 16px 0 6px; }
.modal .tabela { font-size: 14px; }
.modal { max-height: calc(100vh - 32px); overflow-y: auto; }
.curso-topo { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.curso-topo .capa { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; flex: none; }
.curso-topo h2 { margin-bottom: 4px; }
.curso-topo p { margin: 2px 0; }
.secao.problema { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
@media (max-width: 600px) { .curso-topo .capa { width: 64px; height: 64px; } .cartoes { grid-template-columns: 1fr; } }
