/* =========================================================
   Estudos Itaperuna — folha de estilo principal
   Paleta institucional: azul-marinho + dourado
   ========================================================= */

:root {
    --navy: #0f2a4a;
    --navy-2: #173a63;
    --navy-3: #22507f;
    --gold: #c9a227;
    --gold-soft: #f4e7bd;
    --bg: #f4f6fa;
    --surface: #ffffff;
    --border: #e3e8f0;
    --text: #1c2533;
    --muted: #6b778a;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 42, 74, .06), 0 6px 18px rgba(15, 42, 74, .06);

    --c-port: #2f6fdb;
    --c-port-soft: #e6effd;
    --c-mat: #0f9d76;
    --c-mat-soft: #e1f6ef;
    --c-info: #7a4fd6;
    --c-info-soft: #efe8fc;
    --c-esp: #c27a0e;
    --c-esp-soft: #fbf0dc;

    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-primary: var(--navy);
    --bs-primary-rgb: 15, 42, 74;
    --bs-link-color: var(--navy-3);
    --bs-link-color-rgb: 34, 80, 127;
}

[data-bs-theme="dark"] {
    --bg: #0d1420;
    --surface: #141e2d;
    --border: #243246;
    --text: #e4e9f1;
    --muted: #93a0b4;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    --c-port-soft: rgba(47, 111, 219, .18);
    --c-mat-soft: rgba(15, 157, 118, .18);
    --c-info-soft: rgba(122, 79, 214, .2);
    --c-esp-soft: rgba(194, 122, 14, .2);
    --gold-soft: rgba(201, 162, 39, .18);
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-link-color: #8fb7ea;
    --bs-link-color-rgb: 143, 183, 234;
}

body {
    background: var(--bg);
    color: var(--text);
    font-size: .95rem;
}

/* ---------- Layout ---------- */
.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--navy) 0%, #0b2140 100%);
    color: #cfd9e8;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

@media (max-width: 991.98px) {
    .sidebar { position: fixed; height: 100%; z-index: 1045; }
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--gold);
    color: var(--navy);
    display: grid;
    place-items: center;
    font-size: 1.35rem;
}

.brand-title {
    font-family: 'Merriweather', Georgia, serif;
    color: #fff;
    font-size: 1rem;
    line-height: 1.1;
}

.brand-sub {
    font-size: .72rem;
    color: #9fb1ca;
    line-height: 1.25;
    margin-top: .15rem;
}

.sidebar-nav,
.sidebar-foot {
    display: flex;
    flex-direction: column;
    padding: .75rem;
    gap: 2px;
}

.sidebar-nav { flex: 1; overflow-y: auto; }

.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); }

.sidebar a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .85rem;
    border-radius: 10px;
    color: #cfd9e8;
    text-decoration: none;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.sidebar a i { font-size: 1.1rem; width: 1.25rem; text-align: center; }

.sidebar a:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.sidebar a.active {
    background: rgba(201, 162, 39, .16);
    color: var(--gold);
    box-shadow: inset 3px 0 0 var(--gold);
}

.cargo-chip {
    font-size: .78rem;
    background: rgba(255, 255, 255, .06);
    border-radius: 10px;
    padding: .5rem .75rem;
    margin-bottom: .35rem;
    color: #e7d38f;
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.75rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

h1, h2, h3, h4, h5, h6 { color: inherit; }

.content {
    padding: 1.75rem;
    max-width: 1400px;
    width: 100%;
}

@media (max-width: 575.98px) {
    .content { padding: 1rem; }
    .topbar { padding: .75rem 1rem; }
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 0;
}

.btn-icon:hover { background: var(--bg); }

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold);
    font-weight: 700;
    display: inline-grid;
    place-items: center;
}

.countdown-pill {
    align-items: center;
    gap: .4rem;
    background: var(--gold-soft);
    color: #7a5d08;
    border-radius: 999px;
    padding: .35rem .85rem;
    font-size: .85rem;
}

[data-bs-theme="dark"] .countdown-pill { color: #e7cf7d; }

/* ---------- Componentes ---------- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--surface);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body { padding: 1.25rem; }

.section-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .85rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.text-muted-2 { color: var(--muted) !important; }

.btn-primary {
    --bs-btn-bg: var(--navy);
    --bs-btn-border-color: var(--navy);
    --bs-btn-hover-bg: var(--navy-2);
    --bs-btn-hover-border-color: var(--navy-2);
    --bs-btn-active-bg: var(--navy-3);
    --bs-btn-active-border-color: var(--navy-3);
    --bs-btn-disabled-bg: var(--navy);
    --bs-btn-disabled-border-color: var(--navy);
}

[data-bs-theme="dark"] .btn-primary {
    --bs-btn-bg: var(--navy-3);
    --bs-btn-border-color: var(--navy-3);
    --bs-btn-hover-bg: #2b6199;
}

.btn-gold {
    --bs-btn-bg: var(--gold);
    --bs-btn-color: var(--navy);
    --bs-btn-border-color: var(--gold);
    --bs-btn-hover-bg: #b8921d;
    --bs-btn-hover-color: var(--navy);
    --bs-btn-hover-border-color: #b8921d;
    --bs-btn-active-bg: #a8851a;
    --bs-btn-active-color: var(--navy);
    font-weight: 600;
}

.btn-outline-primary {
    --bs-btn-color: var(--navy-3);
    --bs-btn-border-color: var(--navy-3);
    --bs-btn-hover-bg: var(--navy-3);
    --bs-btn-hover-border-color: var(--navy-3);
    --bs-btn-active-bg: var(--navy-3);
}

[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #8fb7ea;
    --bs-btn-border-color: #3b6da3;
}

.form-control,
.form-select { border-radius: 10px; border-color: var(--border); }

.form-control:focus,
.form-select:focus {
    border-color: var(--navy-3);
    box-shadow: 0 0 0 .2rem rgba(34, 80, 127, .15);
}

/* ---------- Painel ---------- */
.hero {
    background: linear-gradient(120deg, var(--navy) 0%, var(--navy-3) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.6rem 1.75rem;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(201, 162, 39, .18);
}

.hero h2 { font-family: 'Merriweather', Georgia, serif; font-size: 1.4rem; color: #fff; }

.hero .big-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--gold);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }

.stat-label { color: var(--muted); font-size: .82rem; }

.bg-port { background: var(--c-port-soft); color: var(--c-port); }
.bg-mat { background: var(--c-mat-soft); color: var(--c-mat); }
.bg-info-d { background: var(--c-info-soft); color: var(--c-info); }
.bg-esp { background: var(--c-esp-soft); color: var(--c-esp); }
.bg-gold-soft { background: var(--gold-soft); color: #8a6a0a; }

.bar-port { background: var(--c-port) !important; }
.bar-mat { background: var(--c-mat) !important; }
.bar-info { background: var(--c-info) !important; }
.bar-esp { background: var(--c-esp) !important; }

.progress { height: 8px; border-radius: 99px; background: var(--bg); }

.disc-row { padding: .65rem 0; border-bottom: 1px dashed var(--border); }
.disc-row:last-child { border-bottom: 0; }

/* ---------- Cronograma ---------- */
.week-nav { display: flex; align-items: center; gap: .5rem; }

.cal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}

@media (min-width: 576px) { .cal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .cal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1700px) { .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

.cal-day {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem;
    min-height: 160px;
}

.cal-day.hoje { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }

.cal-day.passado { opacity: .75; }

.cal-day-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: .5rem;
    font-weight: 600;
}

.cal-day-head small { color: var(--muted); font-weight: 500; }

.sessao {
    border-radius: 10px;
    padding: .5rem .6rem;
    margin-bottom: .45rem;
    font-size: .8rem;
    border-left: 4px solid transparent;
    background: var(--bg);
    display: flex;
    gap: .45rem;
    align-items: flex-start;
}

.sessao .form-check-input { margin-top: .15rem; flex-shrink: 0; cursor: pointer; }

.sessao .sessao-titulo {
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sessao .min-w-0 { min-width: 0; }

.sessao .sessao-meta { color: var(--muted); font-size: .72rem; }

.sessao.feito .sessao-titulo { text-decoration: line-through; opacity: .6; }

.sessao.t-port { border-left-color: var(--c-port); }
.sessao.t-mat { border-left-color: var(--c-mat); }
.sessao.t-info { border-left-color: var(--c-info); }
.sessao.t-esp { border-left-color: var(--c-esp); }
.sessao.t-simulado { border-left-color: var(--gold); background: var(--gold-soft); }
.sessao.t-descanso { border-left-color: #94a3b8; }

.tipo-badge {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
    color: var(--muted);
}

/* ---------- Conteúdo ---------- */
.topico-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.topico-item:hover { background: var(--bg); }

.topico-item:last-child { border-bottom: 0; }

.topico-num {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg);
    display: grid;
    place-items: center;
    font-size: .75rem;
    font-weight: 700;
    color: var(--muted);
    flex-shrink: 0;
}

.disc-tab {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .85rem 1rem;
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: transform .12s, box-shadow .12s;
}

.disc-tab:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.disc-tab.active { border-color: var(--navy-3); box-shadow: 0 0 0 2px rgba(34, 80, 127, .18); }

/* ---------- Questões / Simulado ---------- */
.questao-card .enunciado {
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-line;
}

.alternativa {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .7rem .9rem;
    margin-bottom: .5rem;
    cursor: pointer;
    transition: background .12s, border-color .12s;
    background: var(--surface);
}

.alternativa:hover { border-color: var(--navy-3); }

.alternativa input { display: none; }

.alternativa .letra {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: grid;
    place-items: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: .85rem;
}

.alternativa.selecionada,
.alternativa:has(input:checked) { border-color: var(--navy-3); background: rgba(34, 80, 127, .07); }

.alternativa.selecionada .letra,
.alternativa:has(input:checked) .letra { background: var(--navy-3); border-color: var(--navy-3); color: #fff; }

.alternativa.certa { border-color: #198754; background: rgba(25, 135, 84, .08); }
.alternativa.certa .letra { background: #198754; border-color: #198754; color: #fff; }

.alternativa.errada { border-color: #dc3545; background: rgba(220, 53, 69, .08); }
.alternativa.errada .letra { background: #dc3545; border-color: #dc3545; color: #fff; }

.alternativas-travadas .alternativa { cursor: default; }

.simulado-bar {
    position: sticky;
    top: 70px;
    z-index: 10;
}

.timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.25rem;
}

.timer.alerta { color: #dc3545; }

.mapa-questoes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: .4rem;
}

.mapa-questoes a {
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    background: var(--surface);
}

.mapa-questoes a.respondida { background: var(--navy-3); color: #fff; border-color: var(--navy-3); }
.mapa-questoes a.ok { background: #198754; color: #fff; border-color: #198754; }
.mapa-questoes a.erro { background: #dc3545; color: #fff; border-color: #dc3545; }
.mapa-questoes a.branco { background: var(--bg); color: var(--muted); }

.nota-circulo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto;
    background: conic-gradient(var(--cor, #198754) calc(var(--p) * 1%), var(--bg) 0);
}

.nota-circulo > div {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: var(--surface);
    display: grid;
    place-items: center;
    text-align: center;
}

.nota-circulo strong { font-size: 1.8rem; line-height: 1; display: block; }

/* ---------- IA / Markdown ---------- */
.ia-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 1.25rem 1.5rem;
}

.markdown { line-height: 1.65; }
.markdown h1, .markdown h2, .markdown h3 { font-size: 1.1rem; font-weight: 700; margin-top: 1.1rem; }
.markdown h1:first-child, .markdown h2:first-child, .markdown h3:first-child { margin-top: 0; }
.markdown table { width: 100%; margin: .75rem 0; border-collapse: collapse; font-size: .88rem; }
.markdown th, .markdown td { border: 1px solid var(--border); padding: .4rem .6rem; }
.markdown th { background: var(--bg); }
.markdown blockquote { border-left: 4px solid var(--gold); padding: .25rem 1rem; background: var(--gold-soft); border-radius: 0 8px 8px 0; }
.markdown code { background: var(--bg); padding: .1rem .35rem; border-radius: 4px; color: inherit; }
.markdown p:last-child { margin-bottom: 0; }

.ia-loading {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--muted);
}

/* Chat do tutor */
.chat-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 190px);
    min-height: 420px;
}

.chat-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.msg { max-width: 82%; padding: .8rem 1rem; border-radius: 14px; }
.msg.user { align-self: flex-end; background: var(--navy-3); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); border-bottom-left-radius: 4px; }

.chat-input { border-top: 1px solid var(--border); padding: .9rem; }

.sugestao { border-radius: 999px; font-size: .8rem; }

/* ---------- Vídeos ---------- */
.video-card { cursor: pointer; overflow: hidden; height: 100%; }
.video-card .thumb { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card .thumb .play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 2.5rem;
    opacity: 0;
    background: rgba(0, 0, 0, .35);
    transition: opacity .15s;
}
.video-card:hover .play { opacity: 1; }
.video-card .v-title { font-weight: 600; font-size: .88rem; line-height: 1.3; }

.ratio iframe { border-radius: 10px; }

/* ---------- Auth ---------- */
.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 15% 20%, rgba(201, 162, 39, .18), transparent 40%),
        linear-gradient(135deg, var(--navy) 0%, #0b2140 60%, var(--navy-3) 100%);
}

.auth-card {
    width: 100%;
    max-width: 430px;
    border-radius: 18px;
    padding: 2rem;
    background: var(--surface);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}

.auth-card .brand-mark { margin: 0 auto 1rem; width: 56px; height: 56px; font-size: 1.7rem; }

/* ---------- Utilitários ---------- */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted);
}

.empty-state i { font-size: 2.5rem; display: block; margin-bottom: .5rem; opacity: .6; }

.table > :not(caption) > * > * { background: transparent; }

.table thead th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    font-weight: 600;
    border-bottom-color: var(--border);
}

.badge-soft { font-weight: 600; padding: .35em .65em; border-radius: 6px; }

.cursor-pointer { cursor: pointer; }

@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .content { padding: 0; }
    .card { box-shadow: none; }
}

/* ---------- Cronograma mensal ---------- */
.mes-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .4rem;
}

.mes-cab {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}

.mes-dia {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .45rem .5rem;
    min-height: 92px;
    text-decoration: none;
    color: inherit;
    transition: border-color .12s;
}

.mes-dia:hover { border-color: var(--navy-3); }
.mes-dia.fora { opacity: .45; }
.mes-dia.hoje { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.mes-dia.prova { background: var(--gold-soft); border-color: var(--gold); }
.mes-dia .num { font-weight: 700; }

.mes-dia .pontos { display: flex; flex-wrap: wrap; gap: 3px; }
.mes-dia .pontos span { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.mes-dia .pontos span.ok { opacity: .3; }

.legenda { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); }
.legenda .ponto { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

@media (max-width: 575.98px) {
    .mes-dia { min-height: 64px; padding: .3rem; font-size: .8rem; }
    .mes-dia .pontos span { width: 8px; height: 8px; }
    .mes-dia .small { display: none; }
}

.cargo-opcao { background: var(--surface); }
.cargo-opcao:has(.js-cargo:checked) { border-color: var(--navy-3) !important; background: rgba(34, 80, 127, .06); }

/* ---------- Apostila ---------- */
.apostila {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 3rem;
    max-width: 960px;
    margin: 0 auto;
    line-height: 1.7;
}

@media (max-width: 767.98px) { .apostila { padding: 1.25rem; } }

.apostila-capa { border-bottom: 3px solid var(--gold); padding-bottom: 1.25rem; margin-bottom: 1.5rem; }
.apostila-capa h2 { font-family: 'Merriweather', Georgia, serif; font-size: 1.9rem; margin: .4rem 0; }
.apostila-sumario h3, .apostila-cap > h3 { font-size: 1.25rem; font-weight: 700; }
.apostila-sumario ol { columns: 2; column-gap: 2rem; font-size: .9rem; }
.apostila-sumario a { text-decoration: none; }
@media (max-width: 767.98px) { .apostila-sumario ol { columns: 1; } }

.apostila-cap { padding-top: 1.75rem; margin-top: 1.75rem; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.apostila-cap .cap-num {
    display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
    background: var(--navy); color: var(--gold); font-size: .95rem; margin-right: .35rem; vertical-align: middle;
}
.apostila-notas { background: var(--gold-soft); border-radius: 10px; padding: .85rem 1rem; margin-top: 1rem; font-size: .92rem; }
.apostila-exerc { margin-top: 1.25rem; font-size: .92rem; }
.apostila-exerc .ex-q { break-inside: avoid; }
.apostila-gabarito p { font-size: .88rem; margin-bottom: .5rem; }

@media print {
    body { background: #fff; }
    .apostila { border: 0; padding: 0; max-width: none; }
    .apostila-cap { break-before: page; border-top: 0; }
    .apostila-capa { break-after: page; min-height: 40vh; display: flex; flex-direction: column; justify-content: flex-end; }
    .apostila-sumario { break-after: page; }
    a { color: inherit; text-decoration: none; }
    .alert { display: none; }
}

/* ---------- Capítulos: seções, esquema e sumário ---------- */
.capitulo-barra {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-bottom: 1rem;
    padding-bottom: .9rem;
    border-bottom: 1px dashed var(--border);
}

.capitulo-sumario { display: flex; flex-wrap: wrap; gap: .35rem; }

.chip-secao {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 999px;
    padding: .2rem .7rem;
    font-size: .78rem;
    cursor: pointer;
}

.chip-secao:hover { border-color: var(--navy-3); }
.chip-secao.alerta { border-color: #f1aeb5; background: rgba(220, 53, 69, .07); }

.capitulo-secoes .accordion-item { border-color: var(--border); background: var(--surface); }
.capitulo-secoes .accordion-button { font-weight: 600; gap: .6rem; background: var(--surface); color: var(--text); }
.capitulo-secoes .accordion-button:not(.collapsed) { background: rgba(34, 80, 127, .07); color: var(--text); box-shadow: none; }
.capitulo-secoes .accordion-button:focus { box-shadow: none; }
.secao-num {
    width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
    display: inline-grid; place-items: center; font-size: .78rem;
    background: var(--navy); color: var(--gold);
}
.secao-alerta .secao-num { background: #dc3545; color: #fff; }

.esquema-grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: .75rem;
}

.esquema-no {
    border: 1px solid var(--border);
    border-top: 4px solid var(--navy-3);
    border-radius: 12px;
    padding: .75rem .9rem;
    background: var(--surface);
    break-inside: avoid;
}

.esquema-no.alerta { border-top-color: #dc3545; background: rgba(220, 53, 69, .04); }
.esquema-titulo { font-weight: 700; font-size: .9rem; display: flex; gap: .45rem; align-items: flex-start; margin-bottom: .4rem; }
.esquema-num {
    width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
    display: inline-grid; place-items: center; font-size: .72rem;
    background: var(--gold-soft); color: #7a5d08;
}
.esquema-no ul { margin: 0; padding-left: 1.1rem; font-size: .82rem; }
.esquema-no li { margin-bottom: .2rem; }

.apostila-indice { position: sticky; top: 84px; }
.indice-lista { max-height: calc(100vh - 260px); overflow-y: auto; }
.indice-lista .list-group-item.active { background: rgba(34, 80, 127, .1); color: var(--text); border-color: var(--border); font-weight: 600; }
.indice-num { min-width: 22px; color: var(--muted); font-weight: 700; }
.cap-num-mini {
    width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center;
    background: var(--navy); color: var(--gold); font-size: .8rem; font-weight: 700;
}

.modelo-diag { border-color: var(--gold) !important; }
.diag-cta { background: linear-gradient(90deg, var(--gold-soft), var(--surface) 60%); }

@media print {
    .esquema-cap { break-inside: avoid; }
    .esquema-grade { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Marca ---------- */
.brand-logo { border-radius: 12px; flex-shrink: 0; }
.brand-title { font-family: 'Inter', system-ui, sans-serif; font-weight: 800; letter-spacing: -.01em; font-size: 1.05rem; }

/* ---------- Tela de entrada (login/cadastro) ---------- */
.entrada {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--bg);
}

@media (max-width: 991.98px) { .entrada { grid-template-columns: 1fr; } .entrada-hero { display: none !important; } }

.entrada-hero {
    background:
        radial-gradient(circle at 85% 15%, rgba(201, 162, 39, .28), transparent 35%),
        radial-gradient(circle at 10% 90%, rgba(47, 111, 219, .25), transparent 40%),
        linear-gradient(140deg, #0b2140 0%, var(--navy) 55%, var(--navy-3) 100%);
    color: #e6edf7;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.entrada-hero h1 { font-weight: 800; font-size: 2.3rem; line-height: 1.15; color: #fff; letter-spacing: -.02em; }
.entrada-hero h1 span { color: #f0cf5a; }
.entrada-hero .recurso { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; }
.entrada-hero .recurso i { font-size: 1.3rem; color: #f0cf5a; background: rgba(255, 255, 255, .08); border-radius: 10px; padding: .4rem .55rem; }
.entrada-hero .numeros { display: flex; gap: 2rem; }
.entrada-hero .numeros strong { display: block; font-size: 1.6rem; color: #fff; }

.entrada-form { display: grid; place-items: center; padding: 2rem 1.25rem; }
.entrada-form .caixa { width: 100%; max-width: 400px; }

/* ---------- Menu lateral compacto, agrupado e sem barra de rolagem ---------- */
.sidebar-brand { padding: 1rem 1.1rem .85rem; }
.sidebar-nav { padding: .4rem .7rem; gap: 0; overflow-y: auto; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.sidebar a { padding: .42rem .8rem; font-size: .9rem; border-radius: 9px; }
.sidebar a i { font-size: 1rem; }
.nav-grupo {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #7f93b0;
    font-weight: 700;
    padding: .7rem .8rem .25rem;
}
.nav-grupo:first-child { padding-top: .3rem; }
.sidebar-foot { padding: .6rem .7rem .8rem; }
.sidebar-foot .cargo-chip { margin: 0; display: block; padding: .45rem .7rem; font-size: .76rem; line-height: 1.3; }
.sidebar-foot .cargo-chip:hover { background: rgba(255, 255, 255, .1); color: #f0cf5a; }
button.avatar { cursor: pointer; }
@media (max-height: 760px) {
    .sidebar a { padding: .32rem .8rem; }
    .nav-grupo { padding-top: .45rem; }
    .brand-sub { display: none; }
}

/* ---------- Estudar agora ---------- */
.passos-estudo { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; }
.passo { display: flex; gap: .6rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .65rem .8rem; }
.passo > span { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; font-size: .85rem; }
.passo strong { display: block; font-size: .85rem; line-height: 1.2; }
.passo small { color: var(--muted); font-size: .74rem; }
@media (max-width: 991px) { .passos-estudo { grid-template-columns: repeat(2, 1fr); } }
.aula-destaque { background: linear-gradient(135deg, var(--surface) 60%, var(--gold-soft)); border-left: 5px solid var(--gold); }

/* ---------- Aula: cronômetro, checklist, mapa ---------- */
.timer-aula { display: flex; align-items: center; gap: .4rem; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: .3rem .4rem .3rem .5rem; }
.timer-aula .form-select { width: auto; border-radius: 999px; font-size: .78rem; padding-top: .2rem; padding-bottom: .2rem; }
.timer-aula .btn { border-radius: 50%; width: 32px; height: 32px; padding: 0; }
.timer-visor { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; min-width: 64px; text-align: center; }
.timer-aula.rodando { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.timer-aula.rodando .timer-visor { color: var(--gold); }
.sessao-aviso { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .6rem .9rem; border-radius: 12px; background: var(--c-port-soft); border: 1px solid var(--border); font-size: .9rem; }
.check-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 10px; margin-bottom: .4rem; cursor: pointer; }
.check-item:hover { background: var(--bg); }
.check-item.feito { background: var(--c-mat-soft); border-color: transparent; }
.check-item.feito > span:first-of-type { text-decoration: line-through; opacity: .75; }
.check-item.auto { cursor: default; }
.check-item .form-check-input { margin: 0; flex: 0 0 auto; width: 1.15em; height: 1.15em; }
.mapa-wrap { overflow-x: auto; }
.mapa-svg { display: block; width: 100%; min-width: 900px; height: auto; }
.mapa-raiz { fill: var(--navy); }
.mapa-raiz-txt { fill: #fff; }
.mapa-folha { fill: var(--text); }
.mapa-svg text { font-family: inherit; }
[data-bs-theme="dark"] .mapa-raiz { fill: var(--gold); }
[data-bs-theme="dark"] .mapa-raiz-txt { fill: #0f2a4a; }
.js-mapa:not(.mapa-pronto) { display: none; }

/* ---------- Estatísticas ---------- */
.kpi-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; }
.kpi > i { position: absolute; right: .9rem; top: .8rem; font-size: 1.25rem; color: var(--gold); opacity: .85; }
.kpi-v { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.kpi-r { font-size: .82rem; color: var(--muted); }
.kpi-s { font-size: .76rem; margin-top: .35rem; color: var(--muted); }
.kpi.destaque { background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; border-color: transparent; }
.kpi.destaque .kpi-r, .kpi.destaque .kpi-s { color: rgba(255,255,255,.75); }
.delta { font-weight: 700; white-space: nowrap; }
.delta.up { color: #0f9d76; }
.delta.down { color: #c0504d; }
.dicas-lista .list-group-item { display: flex; gap: .7rem; align-items: flex-start; background: transparent; }
.dicas-lista .bi { color: var(--gold); font-size: 1.1rem; }
.graf-svg { width: 100%; height: auto; display: block; }
.graf-grade { stroke: var(--border); stroke-width: 1; }
.graf-eixo { fill: var(--muted); font-size: 11px; }
.graf-centro { fill: var(--text); font-size: 22px; font-weight: 800; }
.graf-legenda { display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: center; font-size: .78rem; color: var(--muted); margin-top: .5rem; }
.graf-legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.graf-vazio { color: var(--muted); text-align: center; font-size: .88rem; padding: 2.2rem 1rem; border: 1px dashed var(--border); border-radius: 12px; }
.graf-dica { position: fixed; z-index: 2000; pointer-events: none; display: none; background: var(--navy); color: #fff; padding: .45rem .65rem; border-radius: 8px; font-size: .8rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 260px; }
.graf-dica-t { font-weight: 700; margin-bottom: .2rem; }
.graf-bola { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; }
.rosca-wrap { max-width: 220px; margin: 0 auto; }
.graf-rosca { width: 100%; height: auto; }
.graf-rosca path { cursor: pointer; transition: opacity .15s; }
.graf-rosca path:hover { opacity: .8; }
.hbarras { display: grid; gap: .55rem; }
.hb-linha { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: .6rem; align-items: center; font-size: .85rem; }
.hb-rot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-trilho { position: relative; height: 12px; background: var(--bg); border-radius: 999px; }
.hb-barra { height: 100%; border-radius: 999px; transition: width .6s; }
.hb-meta { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #c0504d; }
.hb-val { font-weight: 700; min-width: 48px; text-align: right; white-space: nowrap; }
.hb-val small { font-weight: 400; color: var(--muted); }
.calor-wrap { display: flex; gap: .4rem; overflow-x: auto; }
.calor-dias { display: grid; grid-template-rows: repeat(7, 14px); gap: 3px; font-size: .68rem; color: var(--muted); }
.calor { display: flex; gap: 3px; }
.calor-col { display: grid; grid-template-rows: repeat(7, 14px); gap: 3px; }
.calor-c { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: var(--bg); border: 1px solid var(--border); }
.calor-c.n1 { background: #cfe0f7; border-color: transparent; }
.calor-c.n2 { background: #8fb3ea; border-color: transparent; }
.calor-c.n3 { background: #2f6fdb; border-color: transparent; }
.calor-c.n4 { background: #0f2a4a; border-color: transparent; }
.calor-c.n-1 { visibility: hidden; }
[data-bs-theme="dark"] .calor-c.n4 { background: var(--gold); }
.calor-leg { display: flex; align-items: center; gap: 3px; justify-content: flex-end; margin-top: .6rem; }
@media (max-height: 720px) {
    .sidebar a { padding: .24rem .8rem; font-size: .86rem; }
    .nav-grupo { padding: .35rem .8rem .1rem; }
    .sidebar-brand { padding: .7rem 1.1rem .6rem; }
    .sidebar-foot { padding: .4rem .7rem .5rem; }
}
@media (max-height: 600px) { .nav-grupo { display: none; } }
.mini-barras { display: flex; align-items: flex-end; gap: 3px; height: 44px; }
.mini-barra { flex: 1; height: 100%; display: flex; align-items: flex-end; background: transparent; border: 0; padding: 0; cursor: pointer; }
.mini-barra span { display: block; width: 100%; background: var(--c-port-soft); border-radius: 3px 3px 0 0; }
.mini-barra:hover span { background: #8fb3ea; }
.mini-barra.ativa span { background: var(--gold); }

/* ---------- Caderno de erros compacto ---------- */
.erros-lista { overflow: hidden; }
.erros-cab { padding: .55rem 1rem; border-bottom: 1px solid var(--border); }
.erro-linha { border-bottom: 1px solid var(--border); }
.erro-linha:last-child { border-bottom: 0; }
.erro-linha > summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .5rem 1rem; cursor: pointer; font-size: .88rem; }
.erro-linha > summary::-webkit-details-marker { display: none; }
.erro-linha > summary:hover { background: var(--bg); }
.erro-linha[open] > summary { background: var(--bg); }
.erro-linha[open] > summary .bi-chevron-down { transform: rotate(180deg); }
.erro-disc { flex: 0 0 150px; font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erro-enun { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erro-data { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.erro-corpo { padding: .8rem 1rem 1rem; border-top: 1px dashed var(--border); }
@media (max-width: 767px) { .erro-disc, .erro-data { display: none; } }
.chip-erro { display: inline-flex; gap: .35rem; align-items: center; padding: .2rem .6rem; border-radius: 999px; background: var(--c-esp-soft); color: var(--text); text-decoration: none; }
.chip-erro b { color: #c0504d; }

/* ---------- Simulados por cargo ---------- */
.cargo-tabs .nav-link { font-weight: 600; }
.sim-etapa { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: .9rem; }
.sim-etapa-num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; }
.sim-etapa-tit { font-weight: 700; }
.trilha { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.trilha-item { position: relative; display: flex; flex-direction: column; gap: .7rem; border: 1px solid var(--border); border-radius: 14px; padding: .9rem; background: var(--surface); }
.trilha-item.pendente { background: var(--bg); }
.trilha-item.feito { border-color: rgba(15,157,118,.45); }
.trilha-item.andamento { border-color: var(--navy-3); box-shadow: 0 0 0 3px var(--c-port-soft); }
.trilha-item.proximo { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.trilha-fita { position: absolute; top: -10px; right: 12px; background: var(--gold); color: #1c2533; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .55rem; border-radius: 999px; }
.trilha-topo { display: flex; align-items: center; gap: .65rem; }
.trilha-n { flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1rem; background: var(--navy); color: #fff; }
.trilha-item.pendente .trilha-n { background: var(--surface); color: var(--muted); border: 2px solid var(--border); }
.trilha-item.feito .trilha-n { background: #0f9d76; }
.trilha-item.proximo .trilha-n { background: var(--gold); color: #1c2533; }
.trilha-nome { font-weight: 700; line-height: 1.2; }
.trilha-info { font-size: .76rem; color: var(--muted); }
.trilha-status { min-height: 44px; }
.trilha-nota { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.sim-opcao { border: 1px solid var(--border); border-radius: 12px; padding: .8rem .9rem; background: var(--bg); }
.badge-tipo { min-width: 92px; }

/* ---------- Curso completo ---------- */
.curso-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.curso-aneis { display: flex; gap: 1rem; }
.anel { --p: 0; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; align-content: center; text-align: center;
    background: radial-gradient(closest-side, var(--navy-2) 78%, transparent 80% 100%), conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255,255,255,.15) 0); }
.anel b { font-size: 1.05rem; line-height: 1; }
.anel span { font-size: .66rem; opacity: .8; }
.fluxo { display: flex; align-items: center; gap: .4rem; overflow-x: auto; padding: .3rem .1rem .6rem; }
.fluxo-no { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; min-width: 120px; padding: .8rem .7rem; border-radius: 14px;
    border: 2px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.fluxo-no i { font-size: 1.4rem; color: var(--navy-3); }
.fluxo-no small { color: var(--muted); font-size: .72rem; }
.fluxo-no.ok { border-color: #0f9d76; background: var(--c-mat-soft); }
.fluxo-no.ok i { color: #0f9d76; }
.fluxo-no.atual { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.fluxo-no.prova { background: var(--navy); color: #fff; border-color: var(--navy); }
.fluxo-no.prova i { color: var(--gold); }
.fluxo-no.prova small { color: rgba(255,255,255,.75); }
.fluxo-seta { flex: 0 0 26px; height: 2px; background: var(--border); position: relative; }
.fluxo-seta::after { content: ''; position: absolute; right: -1px; top: -5px; border: 6px solid transparent; border-left-color: var(--border); border-right: 0; }
.fluxo-grupo { flex: 0 0 auto; min-width: 280px; border: 2px dashed var(--border); border-radius: 14px; padding: .6rem; display: grid; gap: .35rem; }
.fluxo-grupo-tit { font-weight: 700; font-size: .85rem; }
.fluxo-grupo-tit small { font-weight: 400; color: var(--muted); }
.fluxo-disc { display: grid; grid-template-columns: 1fr 70px auto; gap: .5rem; align-items: center; padding: .35rem .55rem; border-radius: 9px; background: var(--bg); color: var(--text); text-decoration: none; font-size: .82rem; }
.fluxo-disc:hover { background: var(--c-port-soft); }
.fluxo-disc-nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fluxo-mini { height: 6px; background: var(--border); border-radius: 9px; overflow: hidden; }
.fluxo-mini span { display: block; height: 100%; background: #0f9d76; }
.fluxo-ciclo { color: var(--muted); padding-top: .2rem; }
.material-card { display: block; height: 100%; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.material-card:hover { border-color: var(--gold); }
.curso-linha { display: flex; align-items: center; gap: .7rem; padding: .45rem 1rem; border-top: 1px solid var(--border); font-size: .88rem; }
.curso-linha:hover { background: var(--bg); }
.curso-meta { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.curso-acoes { display: flex; gap: .55rem; }
.curso-acoes a { color: var(--muted); }
.curso-acoes a:hover { color: var(--gold); }
.st-nao_iniciado { color: var(--muted); } .st-estudando { color: #2b8fb3; } .st-revisar { color: #c9a227; } .st-dominado { color: #0f9d76; }

/* ---------- Material para impressão ---------- */
.material { max-width: 920px; margin: 0 auto; }
.mat-capa { text-align: center; padding: 4rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; }
.mat-capa h1 { font-size: 2.2rem; font-weight: 800; margin: .6rem 0; }
.mat-capa-sub { color: var(--muted); text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; margin-top: 1rem; }
.mat-capa-cargo { font-size: 1.3rem; color: var(--navy-3); font-weight: 700; }
.mat-capa-rod { margin-top: 2.5rem; font-size: .8rem; color: var(--muted); }
.mat-sumario, .mat-disc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-bottom: 1rem; }
.mat-sumario ol { columns: 2; font-size: .86rem; margin-bottom: .8rem; }
.mat-sum-disc { font-weight: 700; margin-top: .6rem; }
.mat-disc-tit { font-size: 1.5rem; font-weight: 800; color: var(--navy-3); border-bottom: 3px solid var(--gold); padding-bottom: .4rem; margin-bottom: 1rem; }
.mat-topico { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.mat-topico h3 { font-size: 1.2rem; font-weight: 700; }
.mat-top-cab { font-size: .7rem; text-transform: uppercase; color: var(--gold); font-weight: 700; letter-spacing: .06em; }
.mat-exerc { margin-top: 1rem; padding: .8rem 1rem; background: var(--bg); border-radius: 10px; font-size: .88rem; }
.mat-q { margin-bottom: .7rem; }
.mat-alts { padding-left: 1rem; }
.mat-gab span { margin-right: .4rem; }
.mat-check { width: 100%; border-collapse: collapse; font-size: .85rem; }
.mat-check th, .mat-check td { border: 1px solid var(--border); padding: .35rem .5rem; }
.mat-check th { background: var(--bg); font-size: .75rem; }
.mat-check td.cx { text-align: center; font-size: 1.1rem; width: 62px; }
@media print {
    .material { max-width: none; }
    .mat-capa { border: 0; min-height: 90vh; display: flex; flex-direction: column; justify-content: center; break-after: page; }
    .mat-sumario, .mat-disc { border: 0; padding: 0; break-after: page; }
    .mat-mapa { break-inside: avoid; break-after: page; }
    .mat-topico h3 { break-after: avoid; }
    .mapa-svg { min-width: 0; }
    .mat-check tr { break-inside: avoid; }
}
.curso-hero h2 { color: #fff; }
.fluxo { flex-wrap: wrap; justify-content: center; row-gap: .8rem; overflow: visible; }
.sim-etapa.align-items-start { flex-wrap: nowrap; }
@media (max-width: 767px) { .sim-etapa.align-items-start { flex-wrap: wrap; } }
.nav-grupo-admin { color: var(--gold) !important; border-top: 1px solid rgba(255,255,255,.08); margin-top: .3rem; }
.comum-aviso { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .9rem; border-radius: 12px; background: var(--c-info-soft); border: 1px solid var(--border); font-size: .9rem; }
.comum-aviso > i { font-size: 1.3rem; color: #7a4fd6; }
.badge-comum { background: var(--c-info-soft); color: #6a3fc6; font-weight: 600; font-size: .7rem; border-radius: 999px; padding: .15rem .5rem; white-space: nowrap; }
[data-bs-theme="dark"] .badge-comum { color: #c7b2ff; }
.grupo-edital-tit { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .5rem; }
.grupo-edital-tit i { color: var(--gold); }
.comum-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; }
.comum-col { border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; background: var(--bg); }
.comum-col.comum { background: var(--c-info-soft); border-color: transparent; }
.comum-col .num { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.comum-col ul { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .82rem; }

/* ---------- Administração ---------- */
.admin-cab { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.avatar-mini { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--c-port-soft); color: var(--navy-3); }
.avatar-mini.adm { background: var(--navy); color: var(--gold); }
.chip-cargo { display: inline-block; padding: .1rem .5rem; margin: 0 .25rem .2rem 0; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font-size: .74rem; white-space: nowrap; }
.chip-cargo.principal { border-color: var(--gold); background: var(--gold-soft); }
.badge-premium { background: linear-gradient(135deg, #c9a227, #e7cf7d); color: #1c2533; }
.admin-tabela th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: var(--bg); }
.kpi.alerta { border-color: #e0a100; }
.kpi.alerta > i { color: #e0a100; }
.cargo-opcao:has(.js-cg:checked) { border-color: var(--navy-3) !important; background: rgba(34, 80, 127, .06); }
.sidebar-foot .admin-link { display: flex; align-items: center; gap: .6rem; padding: .4rem .8rem; margin-bottom: .35rem; border-radius: 9px; font-size: .85rem; color: var(--gold); background: rgba(201,162,39,.1); border: 1px solid rgba(201,162,39,.25); text-decoration: none; }
.sidebar-foot .admin-link:hover, .sidebar-foot .admin-link.active { background: rgba(201,162,39,.22); color: #f0cf5a; }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.admin-nav-tit { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); padding: 0 .7rem; border-right: 1px solid var(--border); margin-right: .2rem; }
.admin-nav a { padding: .4rem .8rem; border-radius: 9px; color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 500; }
.admin-nav a:hover { background: var(--bg); }
.admin-nav a.active { background: var(--navy); color: #fff; }
.grupo-edital { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem; }
.grupo-edital .row .disc-tab { height: 100%; }
.js-mais, .js-sem { white-space: nowrap; font-size: .72rem; }

/* ---------- Menu lateral em seções ---------- */
.sidebar-nav { display: flex; flex-direction: column; gap: .35rem; padding: .6rem .7rem; }
.nav-grupo { display: none; }
.nav-inicio { display: grid; gap: 2px; padding-bottom: .55rem; margin-bottom: .2rem; border-bottom: 1px solid rgba(255,255,255,.09); }
.nav-sec { border-radius: 11px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); }
.nav-sec.atual { border-color: rgba(201,162,39,.28); }
.nav-sec-cab { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; background: transparent; border: 0; color: rgba(255,255,255,.82); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border-radius: 11px; }
.nav-sec-cab:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-sec-cab > i:first-child { font-size: .95rem; width: 1.25rem; color: var(--gold); }
.nav-sec-cab span { flex: 1; text-align: left; }
.nav-sec-cab small { font-size: .68rem; font-weight: 600; color: rgba(255,255,255,.45); background: rgba(255,255,255,.07); border-radius: 999px; padding: 0 .45rem; }
.nav-sec-seta { font-size: .75rem; transition: transform .2s; color: rgba(255,255,255,.5); }
.nav-sec.aberta .nav-sec-seta { transform: rotate(180deg); }
.nav-sec-itens { display: none; padding: 0 .3rem .35rem; }
.nav-sec.aberta .nav-sec-itens { display: grid; gap: 1px; }
.nav-sec-itens a { padding-left: 1rem !important; }

/* ---------- Manual: trilha, ciclo, organograma, semana ---------- */
.manual-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; border-radius: var(--radius); padding: 1.4rem 1.6rem; }
.manual-hero h2 { color: #fff; }
.trilha-manual { position: relative; }
.tm-passo { display: grid; grid-template-columns: 56px 1fr; gap: .8rem; position: relative; }
.tm-passo::before { content: ''; position: absolute; left: 27px; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--gold), var(--navy-3)); opacity: .35; }
.tm-passo:first-child::before { top: 28px; }
.tm-passo:last-child::before { bottom: calc(100% - 28px); }
.tm-marco { position: relative; display: flex; justify-content: center; padding-top: .9rem; }
.tm-marco span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--gold); font-weight: 800; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--gold); z-index: 1; }
.tm-card { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1.1rem; margin-bottom: .8rem; }
.tm-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: #8a6a10; font-size: 1.3rem; }
.tm-freq { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .1rem .5rem; border-radius: 999px; background: var(--c-port-soft); color: var(--navy-3); }
.tm-card .flex-grow-1 { min-width: 220px; }
.ciclo { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; padding: 1rem 0 .3rem; }
.ciclo-no { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; width: 140px; padding: 1rem .6rem .8rem; border: 2px solid var(--border); border-radius: 16px; background: var(--surface); }
.ciclo-no:last-child { border-color: #0f9d76; background: var(--c-mat-soft); }
.ciclo-no > i { font-size: 1.6rem; color: var(--navy-3); margin-bottom: .2rem; }
.ciclo-no small { color: var(--muted); font-size: .74rem; }
.ciclo-n { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #1c2533; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.ciclo-seta { color: var(--gold); font-size: 1.3rem; }
.ciclo-volta { text-align: center; font-size: .82rem; color: var(--muted); border-top: 2px dashed var(--border); margin: .8rem 15% 0; padding-top: .5rem; }
.dica-box { display: flex; gap: .7rem; padding: .8rem; border-radius: 12px; background: var(--bg); height: 100%; }
.dica-box > i { font-size: 1.3rem; color: var(--gold); }
/* organograma */
.organo-wrap { overflow-x: auto; }
.organo { min-width: 860px; display: flex; flex-direction: column; align-items: center; }
.organo-raiz { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.2rem; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 800; position: relative; }
.organo-raiz::after { content: ''; position: absolute; left: 50%; bottom: -18px; width: 2px; height: 18px; background: var(--border); }
.organo-ramos { display: flex; gap: .8rem; margin-top: 18px; padding-top: 18px; position: relative; width: 100%; justify-content: center; }
.organo-ramos::before { content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 2px; background: var(--border); }
.organo-ramo { flex: 1; max-width: 200px; display: flex; flex-direction: column; align-items: stretch; position: relative; }
.organo-ramo::before { content: ''; position: absolute; top: -18px; left: 50%; width: 2px; height: 18px; background: var(--border); }
.organo-grupo { text-align: center; padding: .5rem; border-radius: 10px; background: var(--gold-soft); color: #6b5208; font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
[data-bs-theme="dark"] .organo-grupo { color: var(--gold); }
.organo-folhas { display: grid; gap: .4rem; margin-top: .6rem; padding-left: .8rem; border-left: 2px solid var(--border); margin-left: .9rem; }
.organo-folha { position: relative; padding: .45rem .6rem; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); }
.organo-folha::before { content: ''; position: absolute; left: calc(-.8rem - 2px); top: 50%; width: .8rem; height: 2px; background: var(--border); }
.organo-folha strong { display: block; font-size: .83rem; }
.organo-folha small { color: var(--muted); font-size: .72rem; }
/* semana */
.semana-tipica { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.st-dia { display: grid; gap: .35rem; align-content: start; }
.st-nome { font-weight: 800; text-align: center; font-size: .85rem; }
.st-bloco { padding: .5rem .4rem; border-radius: 9px; font-size: .75rem; text-align: center; font-weight: 600; }
.st-estudo, .st-leg.st-estudo { background: var(--c-port-soft); color: var(--navy-3); }
.st-revisao, .st-leg.st-revisao { background: var(--gold-soft); color: #6b5208; }
.st-questoes, .st-leg.st-questoes { background: var(--c-info-soft); color: #6a3fc6; }
.st-simulado, .st-leg.st-simulado { background: var(--c-esp-soft); color: #a65a00; }
.st-descanso, .st-leg.st-descanso { background: var(--bg); color: var(--muted); }
.st-leg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
@media (max-width: 767px) { .semana-tipica { grid-template-columns: repeat(4, 1fr); } }
.organo-edital { min-width: 760px; }
.organo-ramo.largo { flex: 2; max-width: 560px; }
.organo-edital .organo-ramo { max-width: 300px; }
.organo-edital .organo-ramo.largo { max-width: 600px; }
.organo-grupo.comum { background: var(--c-info-soft); color: #5b34b0; }
.organo-grupo span { display: block; font-size: .66rem; font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .8; }
.organo-discs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .5rem; margin-top: .6rem; }
.disc-no { display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.disc-no:hover { border-color: var(--gold); }
.disc-no.active { border-color: var(--navy-3); box-shadow: 0 0 0 3px var(--c-port-soft); }
.disc-no-ic { flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; }
.disc-no-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.disc-no-txt strong { font-size: .82rem; line-height: 1.2; }
.disc-no-txt small { font-size: .68rem; color: var(--muted); }
.disc-no-barra { display: block; height: 4px; border-radius: 4px; background: var(--bg); margin-top: .3rem; overflow: hidden; }
.disc-no-barra span { display: block; height: 100%; }
.disc-no > b { font-size: .8rem; }
.mat-capa.compacta { padding: 1.2rem; display: flex; align-items: center; gap: 1rem; text-align: left; }
.mat-capa.compacta img { width: 44px; height: 44px; }
.mat-capa.compacta h1 { font-size: 1.4rem; margin: 0; }
.mat-capa.compacta .mat-capa-sub, .mat-capa.compacta .mat-capa-rod { margin: 0; }
.mat-capa.compacta .mat-capa-rod { display: none; }
@media print { .mat-capa.compacta { min-height: 0; break-after: auto; } }
.mat-mapa { padding: 1.2rem 0; }
a.organo-grupo { display: block; text-decoration: none; }
a.organo-grupo:hover { filter: brightness(.97); }
.organo-curso { min-width: 760px; }
.organo-curso .organo-ramo { max-width: 320px; }
.organo-curso .organo-ramo.largo { max-width: 640px; }
.comum-detalhe summary { cursor: pointer; padding: .5rem .7rem; border-radius: 10px; background: var(--c-info-soft); }
.fluxo-linha { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; position: relative; }
.fluxo-linha::before { content: ''; position: absolute; left: 8%; right: 8%; top: 30px; height: 3px; background: linear-gradient(90deg, var(--gold), var(--navy-3)); opacity: .35; }
.fl-etapa { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; padding: 0 .3rem; color: var(--text); text-decoration: none; }
.fl-etapa .fl-n { position: absolute; top: -4px; left: calc(50% + 14px); width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: #1c2533; font-size: .62rem; font-weight: 800; display: grid; place-items: center; z-index: 2; }
.fl-etapa > i { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--surface); border: 3px solid var(--border); color: var(--navy-3); z-index: 1; margin-bottom: .3rem; }
.fl-etapa:hover > i { border-color: var(--gold); }
.fl-etapa.ok > i { border-color: #0f9d76; color: #0f9d76; background: var(--c-mat-soft); }
.fl-etapa.atual > i { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.fl-etapa.prova > i { background: var(--navy); border-color: var(--navy); color: var(--gold); }
.fl-etapa strong { font-size: .85rem; }
.fl-etapa small { font-size: .7rem; color: var(--muted); }
@media (max-width: 767px) { .fluxo-linha { grid-template-columns: repeat(3, 1fr); row-gap: 1rem; } .fluxo-linha::before { display: none; } }
.modulo-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; font-weight: 800; font-size: .95rem; margin: .6rem 0 .5rem; padding-left: .7rem; border-left: 4px solid var(--gold); scroll-margin-top: 80px; }
.modulo-cab i { color: var(--gold); }
.modulo-cab span { font-weight: 400; font-size: .8rem; color: var(--muted); }
.curso-linha.coberta { opacity: .72; }
.material-card { display: flex; flex-direction: column; }

/* ---------- Legislação ---------- */
.lei-card { display: flex; flex-direction: column; height: 100%; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.lei-card.outro { opacity: .75; }
.lei-ic { flex: 0 0 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--c-port-soft); color: var(--navy-3); font-size: 1.1rem; }
.quadro-lei td { font-size: .88rem; }
.conflito { border-left: 4px solid var(--border); padding: .4rem .7rem; margin-bottom: .5rem; font-size: .86rem; background: var(--bg); border-radius: 0 8px 8px 0; }
.conflito span { display: block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.conflito.lom { border-left-color: #0f9d76; }
.conflito.ri { border-left-color: #c9a227; }
.lei-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .6rem .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); position: sticky; top: 70px; z-index: 5; box-shadow: var(--shadow); }
.lei-busca { width: 300px; max-width: 100%; }
.lei-sumario { position: sticky; top: 140px; max-height: calc(100vh - 160px); overflow-y: auto; font-size: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem; }
.lei-sumario a { display: block; padding: .2rem .4rem; border-radius: 6px; color: var(--text); text-decoration: none; }
.lei-sumario a:hover { background: var(--bg); }
.lei-sumario .ls-titulo { font-weight: 800; margin-top: .5rem; color: var(--navy-3); }
.lei-sumario .ls-capitulo { padding-left: .8rem; font-weight: 600; }
.lei-sumario .ls-secao { padding-left: 1.5rem; color: var(--muted); }
.lei-sumario .ls-subsecao { padding-left: 2.1rem; color: var(--muted); font-size: .75rem; }
.lei-texto { font-size: .93rem; line-height: 1.6; }
.lei-cab { scroll-margin-top: 140px; margin: 1.4rem 0 .5rem; }
.lei-cab span { font-weight: 800; }
.lei-cab.lc-titulo { font-size: 1.15rem; text-align: center; color: var(--navy-3); border-bottom: 2px solid var(--gold); padding-bottom: .3rem; }
.lei-cab.lc-capitulo { font-size: 1rem; text-align: center; font-weight: 600; }
.lei-cab.lc-secao, .lei-cab.lc-subsecao { font-size: .9rem; color: var(--muted); text-align: center; }
.lei-art { display: grid; grid-template-columns: 78px 1fr; gap: .6rem; padding: .55rem .4rem; border-bottom: 1px dashed var(--border); scroll-margin-top: 140px; border-radius: 8px; }
.lei-art.destaque { background: rgba(201,162,39,.07); }
.lei-art-n { font-weight: 800; font-size: .85rem; color: var(--navy-3); }
.lei-art-n i { color: var(--gold); font-size: .7rem; }
.lei-nota { display: inline-block; font-size: .75rem; color: var(--muted); font-style: italic; }
.lei-art mark { background: var(--gold-soft); padding: 0 .1rem; border-radius: 3px; }
.lei-art.piscar { animation: piscar 1.6s; }
@keyframes piscar { 0%, 60% { background: var(--gold-soft); } 100% { background: transparent; } }
@media (max-width: 575px) { .lei-art { grid-template-columns: 1fr; gap: .1rem; } }

/* ---------- Páginas simples (senha, termos) ---------- */
.pagina-simples { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: radial-gradient(circle at 20% 10%, rgba(201,162,39,.12), transparent 40%), var(--bg); }
.caixa-simples { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 20px 50px rgba(15,42,74,.12); padding: 2rem; }
.doc-legal { max-width: 820px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.doc-legal h1 { font-weight: 800; }
.doc-legal h2 { font-size: 1.1rem; font-weight: 700; margin-top: 1.6rem; }
.premium-pill { align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600; text-decoration: none; background: linear-gradient(135deg, #c9a227, #e7cf7d); color: #1c2533; }
.premium-pill.essencial { background: var(--gold-soft); color: #6b5208; }
.reporte-item { padding: .5rem .7rem; border-radius: 10px; background: var(--bg); margin-bottom: .4rem; }

/* ---------- Página de vendas ---------- */
.vendas { --v-acc: var(--gold); color: var(--bs-body-color); }
.vendas-publico { min-height: 100vh; background: var(--bg); }
.vendas-nav { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: .8rem clamp(1rem, 4vw, 2.5rem); background: rgba(15,42,74,.96); backdrop-filter: blur(8px); }
.vendas-marca { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 800; text-decoration: none; letter-spacing: -.01em; }
.vendas-nav-link { color: rgba(255,255,255,.8); text-decoration: none; font-size: .9rem; margin-right: .6rem; }
.vendas-nav-link:hover { color: #fff; }
.vendas-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(160deg, #0b2140 0%, #123a6b 55%, #1d5596 100%); padding: clamp(3rem, 8vw, 5.5rem) 1.25rem clamp(3rem, 7vw, 5rem); }
.vendas-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,39,.35), transparent 65%); pointer-events: none; }
.vendas-logado .vendas-hero { border-radius: var(--radius); }
.vendas-hero-in { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; text-align: center; }
.vendas-eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; letter-spacing: .03em; padding: .35rem .85rem; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); }
.vendas-hero h1 { font-weight: 800; letter-spacing: -.02em; line-height: 1.12; font-size: clamp(1.75rem, 4.6vw, 3rem); color: #fff; margin: 1.1rem 0 1rem; }
.vendas-hero h1 em { font-style: normal; color: var(--gold); }
.vendas-lead { font-size: clamp(1rem, 1.8vw, 1.15rem); color: rgba(255,255,255,.82); max-width: 680px; margin: 0 auto 1.8rem; }
.vendas-cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.vendas-cta .btn, .vendas-final .btn { padding: .75rem 1.6rem; font-weight: 700; border-radius: 12px; }
.vendas-numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; max-width: 640px; margin: 2.5rem auto 0; }
.vendas-numeros div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: .8rem .4rem; }
.vendas-numeros strong { display: block; font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 800; color: var(--gold); line-height: 1.1; }
.vendas-numeros span { font-size: .78rem; color: rgba(255,255,255,.72); }
.vendas-sec { max-width: 1120px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) 1.25rem 0; }
.vendas-h2 { text-align: center; font-weight: 800; letter-spacing: -.02em; font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .5rem; }
.vendas-sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 2rem; }
.vendas-recursos { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1rem; }
.vrec { display: flex; gap: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.15rem 1.2rem; }
.vrec-ic { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(15,42,74,.08); color: var(--navy-3); font-size: 1.25rem; }
[data-bs-theme=dark] .vrec-ic { background: rgba(255,255,255,.08); color: var(--gold); }
.vrec h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .2rem; }
.vrec p { font-size: .88rem; color: var(--muted); margin: 0; }
.vendas-sec-planos { scroll-margin-top: 70px; }
.vendas-cards { display: grid; gap: 1.25rem; align-items: stretch; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); max-width: 1120px; margin: 0 auto; }
.vendas-cards.n1 { max-width: 420px; } .vendas-cards.n2 { max-width: 820px; }
.vendas-cards-unico { max-width: 380px; }
.vplano { --pc: var(--navy-3); --pc-soft: rgba(34,80,127,.08); position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 1.6rem 1.5rem 1.4rem; box-shadow: 0 10px 30px rgba(15,42,74,.07); transition: transform .2s, box-shadow .2s; }
.vplano:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(15,42,74,.13); }
.vplano.cor-dourado { --pc: #b38b12; --pc-soft: rgba(201,162,39,.12); }
.vplano.cor-verde { --pc: #0f8a68; --pc-soft: rgba(15,138,104,.1); }
.vplano.cor-roxo { --pc: #6b47c2; --pc-soft: rgba(107,71,194,.1); }
.vplano.cor-escuro { --pc: #1c2533; --pc-soft: rgba(28,37,51,.08); }
[data-bs-theme=dark] .vplano.cor-escuro { --pc: #cfd8e6; }
[data-bs-theme=dark] .vplano.cor-azul { --pc: #7fb0ea; }
.vplano.destaque { border: 2px solid var(--pc); box-shadow: 0 22px 50px rgba(15,42,74,.16); }
@media (min-width: 992px) { .vendas-cards:not(.vendas-cards-unico) .vplano.destaque { transform: scale(1.03); } .vendas-cards:not(.vendas-cards-unico) .vplano.destaque:hover { transform: scale(1.03) translateY(-3px); } }
.vplano-selo { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--pc); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: .3rem .9rem; border-radius: 999px; }
.vplano.cor-dourado .vplano-selo { background: linear-gradient(135deg, #c9a227, #e7cf7d); color: #1c2533; }
.vplano-topo { margin-bottom: 1rem; }
.vplano-nome { font-size: 1.25rem; font-weight: 800; color: var(--pc); }
.vplano-sub { font-size: .88rem; color: var(--muted); min-height: 1.3em; margin-top: .2rem; }
.vplano-preco { background: var(--pc-soft); border-radius: 14px; padding: .9rem 1rem; margin-bottom: 1rem; }
.vplano-preco s { display: block; font-size: .85rem; color: var(--muted); }
.vplano-preco .rs { font-size: 1rem; font-weight: 700; vertical-align: top; margin-right: .2rem; position: relative; top: .45rem; }
.vplano-preco strong { font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.vplano-per { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.vplano-atual { font-size: .82rem; text-align: center; color: #0f8a68; font-weight: 600; margin-bottom: .5rem; }
.vplano-btn { background: var(--pc); border: 0; color: #fff; font-weight: 700; padding: .75rem 1rem; border-radius: 12px; }
.vplano-btn:hover, .vplano-btn:focus { background: var(--pc); color: #fff; filter: brightness(1.1); }
.vplano.cor-dourado .vplano-btn { background: linear-gradient(135deg, #c9a227, #e2c25e); color: #1c2533; }
[data-bs-theme=dark] .vplano.cor-azul .vplano-btn, [data-bs-theme=dark] .vplano.cor-escuro .vplano-btn { color: #0d1420; }
.vplano-lista { list-style: none; padding: 0; margin: 1.2rem 0 0; font-size: .9rem; }
.vplano-lista li { display: flex; gap: .55rem; padding: .38rem 0; border-top: 1px dashed var(--border); }
.vplano-lista li:first-child { border-top: 0; }
.vplano-lista li i { color: #0f9d76; flex: 0 0 auto; margin-top: .1rem; }
.vplano-lista li.nao { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.2); }
.vplano-lista li.nao i { color: var(--muted); }
.vendas-selos { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.4rem; margin-top: 1.8rem; font-size: .85rem; color: var(--muted); }
.vendas-selos i { color: #0f9d76; margin-right: .25rem; }
.vendas-passos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.vpasso { text-align: center; padding: 1.2rem; }
.vpasso span { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--gold); font-weight: 800; font-size: 1.1rem; margin-bottom: .7rem; }
.vpasso h3 { font-size: 1.05rem; font-weight: 700; }
.vpasso p { font-size: .9rem; color: var(--muted); margin: 0; }
.vendas-cargos { text-align: center; margin-top: 1.5rem; }
.vcargo { display: inline-block; margin: .25rem; padding: .45rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .88rem; font-weight: 600; }
.vcargo small { font-weight: 400; color: var(--muted); }
.vendas-faq { max-width: 780px; margin: 1.5rem auto 0; }
.vendas-faq .accordion-item { border-radius: 12px !important; overflow: hidden; margin-bottom: .6rem; border: 1px solid var(--border); }
.vendas-faq .accordion-button { font-weight: 600; }
.vendas-final { max-width: 1120px; margin: clamp(2.5rem, 6vw, 4rem) auto 0; padding: 2.6rem 1.25rem; text-align: center; color: #fff; background: linear-gradient(135deg, #0b2140, #1d5596); border-radius: 24px; }
.vendas-publico .vendas-final { margin-left: 1.25rem; margin-right: 1.25rem; }
@media (min-width: 1170px) { .vendas-publico .vendas-final { margin-left: auto; margin-right: auto; } }
.vendas-final h2 { font-weight: 800; color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); }
.vendas-final p { color: rgba(255,255,255,.8); margin-bottom: 1.4rem; }
.vendas-final .btn { margin: .3rem; }
@media (max-width: 575px) { .vendas-numeros { grid-template-columns: repeat(2, 1fr); } .vrec { padding: 1rem; } }
.oferta-bolinha { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--navy-3); vertical-align: middle; }
.oferta-bolinha.cor-dourado { background: #c9a227; } .oferta-bolinha.cor-verde { background: #0f8a68; } .oferta-bolinha.cor-roxo { background: #6b47c2; } .oferta-bolinha.cor-escuro { background: #1c2533; }
.lancar-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .45rem 1.2rem; }
.lancar-linha { display: flex; align-items: center; gap: .25rem; }
.lancar-linha .n { width: 2rem; text-align: right; font-weight: 700; margin-right: .3rem; }
.lancar-b { width: 2rem; padding: .15rem 0; border-radius: 50% !important; }
/* Flashcards */
.flashcard { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.6rem 1.8rem; min-height: 260px; box-shadow: 0 6px 22px rgba(15,42,74,.08); cursor: pointer; transition: border-color .2s; }
.flashcard.fc-virado { border-color: var(--gold); cursor: default; }
.fc-tipo { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .6rem; }
.fc-frente { font-size: 1.08rem; font-weight: 600; line-height: 1.5; }
.fc-alts { margin-top: .8rem; font-size: .95rem; }
.fc-alts div { margin: .25rem 0; }
.fc-verso { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.fc-resp { font-weight: 700; color: #1d7a46; font-size: 1.02rem; }
.fc-com { margin-top: .5rem; font-size: .93rem; }
.fc-fonte { margin-top: .5rem; font-size: .8rem; color: var(--muted); }
.flash-caixas { display: grid; grid-template-columns: repeat(6, 1fr); gap: .3rem; text-align: center; }
.fc-cx { background: rgba(15,42,74,.06); border-radius: 8px; padding: .35rem 0; }
.fc-cx strong { display: block; font-size: 1.05rem; }
.fc-cx span { font-size: .65rem; color: var(--muted); }
[data-bs-theme=dark] .fc-cx { background: rgba(255,255,255,.07); }
[data-bs-theme=dark] .fc-resp { color: #5fd08f; }
.flash-baralhos .list-group-item { padding: .45rem .8rem; }
.bg-gold { background: var(--gold) !important; }
.text-gold { color: var(--gold) !important; }
/* Selos */
.selos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; }
.selo { border: 1px solid var(--border); border-radius: 12px; padding: .9rem .8rem; text-align: center; background: var(--surface); filter: grayscale(1); opacity: .72; }
.selo.ganho { filter: none; opacity: 1; border-color: var(--gold); box-shadow: 0 4px 14px rgba(201,162,39,.18); }
.selo-ic { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto .5rem; display: grid; place-items: center; font-size: 1.5rem; background: var(--gold-soft); color: #8a6a0a; }
.selo.ganho .selo-ic { background: linear-gradient(135deg, var(--gold), #e8c75a); color: var(--navy); }
.selo-nome { font-weight: 700; font-size: .92rem; }
.selo-desc { font-size: .75rem; color: var(--muted); line-height: 1.3; margin-top: .15rem; }
.selo-prog { font-size: .72rem; margin-top: .25rem; color: var(--muted); }
.meta-mini .progress { height: 8px; }
/* Celular: organogramas viram árvore vertical (sem rolagem lateral) e tabelas de texto rolam dentro do próprio bloco */
.markdown table { display: block; max-width: 100%; overflow-x: auto; }
@media (max-width: 767px) {
    .organo, .organo-edital { min-width: 0; align-items: stretch; }
    .organo-raiz { align-self: center; }
    .organo-ramos { flex-direction: column; gap: 1rem; padding-top: 14px; margin-top: 14px; }
    .organo-ramos::before { left: 50%; right: auto; width: 2px; height: 100%; top: 0; }
    .organo-ramo, .organo-ramo.largo, .organo-edital .organo-ramo, .organo-edital .organo-ramo.largo { max-width: none; flex: none; }
    .organo-ramo::before { display: none; }
    .organo-ramo > * { position: relative; z-index: 1; }
    .organo-discs { grid-template-columns: 1fr 1fr; }
    .organo-wrap { overflow-x: visible; }
}
@media (max-width: 400px) { .organo-discs { grid-template-columns: 1fr; } }
