/* Concursos — tema claro fixo, tipografia grande. Todas as cores aqui. */
:root {
  --bg: #F4F6F8; --surface: #FFFFFF; --neutral: #ECEFF3; --neutral-2: #E1E6EC; --border: #DDE3EA; --field: #7C8794;
  --text: #1B2430; --text-2: #556070; --primary: #1E4FB8; --primary-hover: #183F94; --on-primary: #FFFFFF;
  --primary-soft: #E6EEFC; --primary-ink: #173E8F; --side: #16202C; --on-side: #FFFFFF; --on-side-2: #B8C2CF;
  --ok: #1F7A3F; --ok-soft: #E3F3E8; --warn: #7A5A00; --warn-soft: #FFF4CC; --err: #B42318; --err-soft: #FDE7E5;
  --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 1px 3px rgba(20, 30, 45, .08);
  --radius: 12px;
}
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.5; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; line-height: 1.25; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
.text-2 { color: var(--text-2); }
.small { font-size: .88rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- estrutura ---------- */
.layout { display: flex; min-height: 100vh; }
.lateral { display: none; }
.conteudo { flex: 1; min-width: 0; }
.topo { position: sticky; top: 0; z-index: 10; background: var(--side); color: var(--on-side); display: flex;
  align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
.marca { display: flex; align-items: center; gap: 10px; color: var(--on-side); text-decoration: none; font-weight: 700; }
.marca:hover { color: var(--on-side); }
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--primary);
  color: #fff; font-weight: 800; }
.topo .sp { flex: 1; }
.main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; }
.barra-baixo { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.barra-baixo a { flex: 1; text-align: center; text-decoration: none; color: var(--text-2); font-size: .78rem; padding: 4px; border-radius: 10px; }
.barra-baixo a .ic { display: block; font-size: 1.35rem; line-height: 1.2; }
.barra-baixo a.ativo { color: var(--primary); font-weight: 700; }
@media (min-width: 992px) {
  .lateral { display: flex; flex-direction: column; width: 250px; flex-shrink: 0; background: var(--side); color: var(--on-side);
    position: sticky; top: 0; height: 100vh; padding: 18px 12px; gap: 4px; }
  .lateral .marca { margin: 0 8px 18px; font-size: 1.1rem; }
  .lateral nav a { display: flex; gap: 10px; align-items: center; color: var(--on-side-2); text-decoration: none; padding: 10px 12px;
    border-radius: 10px; font-size: 1rem; }
  .lateral nav a:hover { background: #22303F; color: var(--on-side); }
  .lateral nav a.ativo { background: #22303F; color: var(--on-side); font-weight: 700; }
  .lateral .rodape { margin-top: auto; color: var(--on-side-2); font-size: .85rem; padding: 8px 12px; word-break: break-all; }
  .topo, .barra-baixo { display: none; }
  .main { padding: 28px 32px 48px; }
}

/* ---------- componentes ---------- */
.cartao { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px; }
.cartao h2:first-child, .cartao h3:first-child { margin-top: 0; }
.grade { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grade.g2 { grid-template-columns: 1fr 1fr; } .grade.g3 { grid-template-columns: repeat(3, 1fr); } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 18px;
  border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--neutral); color: var(--text); }
.btn:hover { background: var(--neutral-2); color: var(--text); }
.btn.prim { background: var(--primary); color: var(--on-primary); }
.btn.prim:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.peq { min-height: 36px; padding: 4px 12px; font-size: .9rem; }
.btn.link { background: none; color: var(--primary); padding: 0 4px; min-height: 0; }
.acoes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.aviso { border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; border: 1px solid; }
.aviso.ok { background: var(--ok-soft); color: var(--ok); border-color: #BFE3CB; }
.aviso.erro { background: var(--err-soft); color: var(--err); border-color: #F4C2BD; }
.aviso.atencao { background: var(--warn-soft); color: var(--warn); border-color: #F1DE8E; }
.etiqueta { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--neutral); color: var(--text-2); white-space: nowrap; }
.etiqueta.prim { background: var(--primary-soft); color: var(--primary-ink); }
.etiqueta.ok { background: var(--ok-soft); color: var(--ok); }
.etiqueta.warn { background: var(--warn-soft); color: var(--warn); }
a.pag { font-size: .78rem; font-weight: 600; color: var(--primary-ink); background: var(--primary-soft); padding: 1px 7px;
  border-radius: 999px; text-decoration: none; white-space: nowrap; }
a.pag:hover { background: #D3E1FA; }
dl.dados { display: grid; grid-template-columns: 1fr; gap: 2px 16px; margin: 0; }
dl.dados dt { color: var(--text-2); font-size: .88rem; margin-top: 8px; }
dl.dados dd { margin: 0; font-weight: 600; }
@media (min-width: 720px) { dl.dados { grid-template-columns: 220px 1fr; } dl.dados dt { margin-top: 0; } }

/* formulário */
label { display: block; font-weight: 600; margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=date], input[type=number], textarea, select {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--field); border-radius: 10px; background: #fff; color: var(--text); }
textarea { min-height: 90px; }
textarea.alto { min-height: 280px; font-size: .95rem; }
input[type=file] { font: inherit; }
.campo-ref { display: flex; gap: 8px; align-items: center; }
.campo-ref input { flex: 1; }

/* tabelas (PC) */
.tabela-wrap { overflow-x: auto; }
table.tab { width: 100%; border-collapse: collapse; background: var(--surface); }
table.tab th, table.tab td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.tab th { font-size: .85rem; color: var(--text-2); font-weight: 600; background: #F8FAFC; position: sticky; top: 0; }
table.tab tr:hover td { background: #FAFBFD; }
table.tab input { min-width: 70px; padding: 6px 8px; }
/* cartões no celular, tabela no PC */
.so-pc { display: none; }
@media (min-width: 900px) { .so-pc { display: block; } .so-cel { display: none; } }

/* tópicos */
.grupo { border-left: 5px solid var(--primary); }
.grupo.g1 { border-left-color: #8A94A3; }
.grupo.g2 { border-left-color: #B08A00; }
.tema { margin-top: 12px; }
.tema h4 { margin: 0 0 4px; font-size: .95rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
ul.topicos { list-style: none; margin: 0; padding: 0; }
ul.topicos li { padding: 7px 0; border-bottom: 1px dashed var(--border); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
ul.topicos li:last-child { border-bottom: 0; }
ul.topicos .t { flex: 1 1 260px; }
.contador { font-size: 2rem; font-weight: 800; line-height: 1; }
.resumo-grupos { display: flex; flex-wrap: wrap; gap: 10px; }
.resumo-grupos a { flex: 1 1 150px; text-decoration: none; color: var(--text); }
.check-cargo { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 8px; background: #fff; font-weight: 400; cursor: pointer; }
.check-cargo input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; }
details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.entrar { max-width: 440px; margin: 10vh auto; text-align: center; }
/* utilitários (CSP proíbe style= inline) */
.nowrap { white-space: nowrap; } .normal { font-weight: 400 !important; } .mt0 { margin-top: 0; } .mt1 { margin-top: 8px; }
.mt2 { margin-top: 14px; } .my1 { margin: .4rem 0; } .mb1 { margin-bottom: 6px; } .m0 { margin: 0; } .p0 { padding: 0; }
.esq { text-align: left; } .chk { width: 20px; height: 20px; } .w240 { min-width: 240px; } .f2 { flex: 2; } .f1 { flex: 1; }
.w-max240 { max-width: 240px; } .limpo { border: 0; padding: 0; margin: 0; min-width: 0; } .lateral .btn.sair { color: var(--on-side-2); }
.bloco-link { display: block; text-decoration: none; color: inherit; } .bloco-link:hover { color: inherit; border-color: var(--primary); }
.logo.grande { width: 56px; height: 56px; font-size: 1.6rem; margin: 0 auto 10px; } .largo { width: 100%; }
.sessao .topo-sessao { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.sessao.feita { opacity: .65; } .sessao.revisao { border-left: 5px solid #B08A00; } .sessao.simulado { border-left: 5px solid var(--err); }
.sessao .tit { display: block; margin-top: 4px; }
h3.dia { margin: 18px 0 6px; color: var(--text-2); font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; }
.texto { line-height: 1.65; } .texto h2 { margin-top: 1.4rem; } .texto code { background: var(--neutral); padding: 1px 5px; border-radius: 5px; }
.texto pre { background: #16202C; color: #E6EDF5; padding: 12px; border-radius: 10px; overflow-x: auto; font-size: .88rem; }
.texto pre code { background: none; padding: 0; } .texto table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.texto th, .texto td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; } .texto th { background: #F8FAFC; }
.texto details { background: var(--neutral); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
progress.barra { width: 100%; height: 14px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; background: var(--neutral-2); }
progress.barra::-webkit-progress-bar { background: var(--neutral-2); border-radius: 999px; }
progress.barra::-webkit-progress-value { background: var(--ok); border-radius: 999px; }
progress.barra::-moz-progress-bar { background: var(--ok); border-radius: 999px; }
.grade-resp { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; margin-top: 8px; }
label.resp { display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 0; }
label.resp select { padding: 6px 4px; }
details.cartao > summary { font-weight: 600; }
