* { box-sizing: border-box; }
:root {
    --azul: #3157f6;
    --azul-escuro: #102a52;
    --texto: #0f2344;
    --fraco: #52627a;
    --borda: #dbe2ee;
    --fundo: #f0f4fa;
    --branco: #fff;
    /* === Tokens semânticos de texto (Phase 9) === */
    --texto-primario:    #0f2344;
    --texto-secundario:  #334766;
    --texto-apoio:       #52627a;
    --texto-desativado:  #8394a8;
    /* === Tokens de superfície (Phase 9) === */
    --superficie:        #ffffff;
    --superficie-elevada:#f8fafc;
    --superficie-app:    #f0f4fa;
    /* === Focus ring WCAG 2.4.7 (Phase 9) === */
    --foco-anel: 0 0 0 3px rgba(49, 87, 246, 0.35);
    /* === Status semântico (Phase 9) === */
    --cor-sucesso: #15803d;  --fundo-sucesso: #dcfce7;
    --cor-atencao: #92400e;  --fundo-atencao: #fef3c7;
    --cor-erro:    #991b1b;  --fundo-erro:    #fef2f2;
    --cor-info:    #1d4ed8;  --fundo-info:    #dbeafe;
    /* === Acentos das ações rápidas (Phase 9) === */
    --acento-turma:      #3157f6;
    --acento-trilha:     #7c3aed;
    --acento-atividade:  #0891b2;
    /* === DASH-02 active card background (Phase 10) === */
    --fundo-cartao-ativo: #eef4ff;
}
@media (prefers-color-scheme: light) {
    :root {
        --texto-primario:   #0f2344;
        --texto-secundario: #334766;
        --texto-apoio:      #52627a;
        --superficie:       #ffffff;
        --superficie-app:   #f0f4fa;
    }
}
body.tema-escuro {
    --texto: #eaf0ff;
    --fraco: #aab6cb;
    --borda: #2b3850;
    --fundo: #101827;
    --branco: #172033;
    /* === Overrides semânticos dark (Phase 9) === */
    --texto-primario:    #eaf0ff;
    --texto-secundario:  #c8d4e8;
    --texto-apoio:       #aab6cb;
    --texto-desativado:  #637080;
    --superficie:        #172033;
    --superficie-elevada:#22304a;
    --superficie-app:    #101827;
    --fundo-cartao-ativo: #1a2d50;
}
body {
    margin: 0;
    background: var(--fundo);
    color: var(--texto);
    font-family: Arial, Helvetica, sans-serif;
}
.fundo-formulario {
    min-height: 100vh;
    background: #edf4ff url("../img/fundo-acesso.png") center / cover no-repeat fixed;
}
.fundo-login {
    min-height: 100vh;
    background: #020816 url("../img/fundo-login.png") center / cover no-repeat fixed;
}
a { color: inherit; text-decoration: none; }
p { color: var(--fraco); line-height: 1.55; }
h1, h2, h3, p { margin-top: 0; }
main { width: min(100% - 46px, 1296px); margin: 0 auto; }
.topo {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 8px;
    padding: 6px 14px;
    border-radius: 0 0 10px 10px;
    background: var(--branco);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}
.marca, .menu, .menu-conta, .acoes {
    display: flex;
    align-items: center;
    gap: 14px;
}
.marca strong { color: var(--azul); font-size: 1.1rem; }
.marca strong:first-letter { color: var(--texto); }
.logo {
    width: 58px;
    height: 46px;
    object-fit: contain;
    border-radius: 8px;
}
.menu { flex: 1; font-size: .82rem; font-weight: 700; }
.menu-conta { margin-left: auto; }
.item-menu { position: relative; padding: 14px 0; }
.submenu {
    position: absolute;
    top: 44px;
    left: 0;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    min-width: 520px;
    border: 1px solid var(--borda);
    border-radius: 14px;
    padding: 18px 22px;
    background: var(--branco);
    box-shadow: 0 18px 40px rgba(15, 35, 68, .16);
}
.item-menu:hover .submenu, .item-menu:focus-within .submenu { display: grid; }
.submenu div + div { border-left: 1px solid var(--borda); padding-left: 26px; }
.submenu span {
    display: block;
    margin-bottom: 14px;
    color: #607089;
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}
.submenu a { display: block; padding: 9px 0; font-size: 1rem; }
.submenu-menor { min-width: 560px; }
.menu-conta { font-size: .88rem; font-weight: 800; }
.botao {
    display: inline-block;
    border: 1px solid var(--azul);
    border-radius: 999px;
    padding: 12px 20px;
    background: var(--azul);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(49, 87, 246, .22);
}
.botao-claro { background: var(--branco); color: var(--azul); box-shadow: none; }
.botao-branco { background: var(--branco); color: var(--texto); border-color: var(--branco); box-shadow: none; }
.botao-pequeno { padding: 9px 15px; }
body.tema-escuro .botao-claro { background: transparent; color: #8ea2ff; }
.botao-tema {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid #dbe2ee;
    border-radius: 50%;
    background: var(--branco);
    color: var(--azul);
    font: inherit;
    font-weight: 900;
}
.hero {
    min-height: calc(100vh - 40px);
    display: grid;
    align-content: center;
    padding: 32px 0;
    text-align: center;
}
body.tema-escuro .hero { min-height: calc(100vh - 8px); }
.hero span { font-size: 1.05rem; }
.hero h1 {
    max-width: 760px;
    margin: 12px auto 18px;
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    line-height: 1.05;
}
.hero p { max-width: 650px; margin: 0 auto 24px; font-size: 1.12rem; }
.hero .acoes { justify-content: center; }
.frase-apoio { display: block; margin-top: 16px; color: var(--fraco); font-weight: 800; }
.cards-coloridos, .grade-simples {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
body.tema-escuro .cards-coloridos { margin-top: 28px; }
.card, .grade-simples article {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    border: 1px solid rgba(15, 35, 68, .12);
    border-radius: 14px;
    padding: 22px;
}
.card h2 { margin-bottom: 12px; font-size: 2rem; }
.card p { color: #334766; font-weight: 700; }
.card strong {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    border-radius: 999px;
    padding: 9px 12px;
    background: rgba(255,255,255,.7);
}
.azul { background: #bfeeff; }
.roxo { background: linear-gradient(140deg, #7868ff, #c8c1ff); }
.amarelo { background: #ffe675; }
.rosa { background: #ffd0ca; }
body.tema-escuro .card { border-color: rgba(255,255,255,.16); }
body.tema-escuro .card h2,
body.tema-escuro .card p,
body.tema-escuro .card strong,
body.tema-escuro .abas span,
body.tema-escuro .pilha span,
body.tema-escuro .medidor span,
body.tema-escuro .medidor b { color: #0f2344; }
body.tema-escuro .fluxo span,
body.tema-escuro .grade-simples article,
body.tema-escuro footer { border-color: #2b3850; }
.abas, .pilha, .medidor {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-radius: 12px;
    padding: 12px;
    background: rgba(255,255,255,.55);
}
.abas span, .pilha span, .medidor span {
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    font-weight: 800;
    font-size: .84rem;
}
.pilha { flex-direction: column; }
.medidor { align-items: center; justify-content: space-between; }
.medidor b { display: grid; place-items: center; width: 58px; height: 58px; border: 9px solid #35cfa5; border-radius: 50%; }
.barra { height: 10px; overflow: hidden; border-radius: 999px; background: #e5eaf2; }
.barra span { display: block; height: 100%; border-radius: inherit; background: #22c55e; }
.fluxo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 22px 0 8px;
}
.fluxo span {
    border: 1px solid rgba(15, 35, 68, .1);
    border-radius: 12px;
    padding: 16px;
    background: var(--branco);
    color: var(--texto);
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 35, 68, .05);
}
.inicio { padding: 42px 0 24px; }
.linha-titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}
.linha-titulo h2 { margin: 0; font-size: 1.6rem; }
.linha-titulo a { color: #ff563d; font-weight: 800; }
.grade-simples { grid-template-columns: repeat(3, 1fr); }
.grade-simples article {
    min-height: auto;
    border-left: 4px solid #25aeea;
    background: var(--branco);
    box-shadow: 0 10px 20px rgba(15, 35, 68, .05);
}
.chamada-final {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 24px 0;
    border-radius: 16px;
    padding: 28px 34px;
    background: linear-gradient(120deg, #123762, #215d98);
    color: var(--branco);
}
.chamada-final h2 { max-width: 620px; margin-bottom: 8px; font-size: 2.4rem; line-height: 1.1; }
.chamada-final p { margin-bottom: 0; color: #e9f1ff; }
body.tema-escuro .chamada-final,
body.tema-escuro .chamada-final h2,
body.tema-escuro .chamada-final span,
body.tema-escuro .chamada-final p { color: #fff; }
footer { margin: 24px auto; width: min(100% - 48px, 1260px); border: 1px solid var(--borda); padding: 28px; text-align: center; }
footer p { margin: 0; }
.pagina-formulario, .acesso { display: grid; place-items: center; min-height: 100vh; padding: 12px 0; }
.card-acesso {
    width: min(100%, 410px);
    position: relative;
    border: 1px solid #dbe2ee;
    border-radius: 18px;
    padding: 24px 32px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 60px rgba(15, 35, 68, .16);
}
.marca-central { justify-content: center; margin-bottom: 14px; }
.card-acesso h1 { margin-bottom: 8px; text-align: center; font-size: 1.85rem; }
.card-acesso > p { margin: 0 auto 14px; text-align: center; }
.formulario { display: grid; gap: 10px; }
.campo { display: grid; gap: 6px; }
.campo label { font-weight: 700; }
.campo input, .campo select, .campo textarea { width: 100%; border: 1px solid #dbe2ee; border-radius: 10px; padding: 10px 12px; color: var(--texto); font: inherit; background: #f8fafc; }
.campo input:focus-visible,
.campo select:focus-visible,
.campo textarea:focus-visible {
    outline: 0;
    border-color: var(--azul);
    background: var(--branco);
    box-shadow: var(--foco-anel);
}
.botao:focus-visible {
    outline: 0;
    box-shadow: var(--foco-anel);
}
.icone-topo:focus-visible {
    outline: 0;
    box-shadow: var(--foco-anel);
}
.campo small, .troca-formulario { color: var(--fraco); }
.card-acesso .botao { padding: 11px 18px; box-shadow: 0 8px 18px rgba(49, 87, 246, .18); }
.voltar-inicio { display: block; text-align: center; }
.link-acesso { display: block; margin-top: 14px; text-align: center; color: var(--azul); font-weight: 900; }
.troca-formulario { margin: 12px 0 0; text-align: center; }
.troca-formulario a { color: var(--azul); font-weight: 900; }
.voltar-inicio { margin-top: 8px; color: var(--azul); font-size: 1rem; font-weight: 900; }
.area-aluno { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: #e4ecf7; }
body.tema-escuro.area-aluno { background: #101827; }
body.tema-escuro .barra-aluno,
body.tema-escuro .cartao-painel,
body.tema-escuro .menu-config,
body.tema-escuro .painel-lateral,
body.tema-escuro .icone-topo,
body.tema-escuro .cartao-linha { border-color: #2b3850; }
body.tema-escuro .item-config,
body.tema-escuro .titulo-config,
body.tema-escuro .perfil-resumo,
body.tema-escuro .lista-trilhas p { border-color: #2b3850; }
body.tema-escuro .menu-config .ativo,
body.tema-escuro .menu-config a:hover,
body.tema-escuro .icone-topo:first-child,
body.tema-escuro .icone-topo.ativo,
body.tema-escuro .valor-config:hover { background: #22304a; }
body.tema-escuro .menu-perfil,
body.tema-escuro .lista-notificacoes article {
    border-color: #2b3850;
    background: #1b263a;
}
body.tema-escuro .lista-notificacoes strong,
body.tema-escuro .lista-notificacoes span,
body.tema-escuro .menu-perfil a,
body.tema-escuro .perfil-resumo strong,
body.tema-escuro .cartao-linha strong { color: var(--texto); }
body.tema-escuro .lista-notificacoes p,
body.tema-escuro .perfil-resumo small,
body.tema-escuro .cartao-linha p { color: var(--fraco); }
body.tema-escuro .aviso-config { background: #eef4ff; color: #0f2344; }
body.tema-escuro .janela-foto { background: #172033; border-color: #2b3850; }
body.tema-escuro .area-upload { background: #22304a; border-color: #5273ff; }
body.tema-escuro .area-corte { background: #101827; }
body.tema-escuro .cartao-linha { background: #172033; }
body.tema-escuro .campo-ia,
body.tema-escuro .membro { border-color: #2b3850; background: #172033; }
body.tema-escuro .destaque-aluno { background: linear-gradient(135deg, #173f7a, #3157f6); }
body.tema-escuro .campo input,
body.tema-escuro .campo select,
body.tema-escuro .campo textarea {
    border-color: #34445f;
    background: #101827;
    color: #eaf0ff;
}
body.tema-escuro .campo input::placeholder,
body.tema-escuro .campo textarea::placeholder { color: #8b9ab0; }
body.tema-escuro .campo input:focus-visible,
body.tema-escuro .campo select:focus-visible,
body.tema-escuro .campo textarea:focus-visible { background: #141f31; }
.barra-aluno { display: grid; align-content: start; gap: 28px; padding: 24px; background: var(--branco); border-right: 1px solid #dbe2ee; }
.barra-aluno nav { display: grid; gap: 8px; }
.barra-aluno nav a { border-radius: 10px; padding: 12px; color: var(--fraco); font-weight: 900; }
.barra-aluno nav .ativo, .barra-aluno nav a:hover { background: #eef4ff; color: var(--azul); }
.painel-aluno { width: min(100% - 40px, 1080px); padding: 28px 0; }
.cabecalho-aluno, .continuidade, .caminho-trilha, .painel-baixo, .grade-dashboard { margin-bottom: 22px; }
.cabecalho-aluno, .continuidade, .indicadores-aluno { display: grid; gap: 16px; }
.cabecalho-aluno { grid-template-columns: 1fr auto; align-items: center; }
.cabecalho-aluno span, .cartao-painel > span { color: var(--fraco); font-weight: 900; }
.cabecalho-aluno h1 { margin-bottom: 0; font-size: 2.35rem; }
.acoes-aluno { display: flex; align-items: center; gap: 12px; }
.icone-topo, .avatar-aluno { display: grid; place-items: center; border: 1px solid #dbe2ee; font: inherit; font-weight: 900; }
.icone-topo { width: 44px; height: 44px; border-radius: 12px; background: var(--branco); color: var(--fraco); }
.icone-topo:first-child, .icone-topo.ativo { background: #eef4ff; color: var(--azul); font-size: 1.2rem; }
.notificacao { position: relative; }
.notificacao::after { content: ""; position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; }
.perfil-menu { position: relative; }
.avatar-aluno {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--azul);
    color: var(--branco);
    font-size: 1.2rem;
}
.avatar-aluno span { position: absolute; right: -3px; bottom: 3px; width: 14px; height: 14px; border: 2px solid var(--branco); border-radius: 50%; background: #22c55e; }
.menu-perfil {
    position: absolute;
    top: 54px;
    right: 0;
    z-index: 4;
    display: none;
    width: max-content;
    min-width: 310px;
    max-width: min(480px, calc(100vw - 28px));
    border: 1px solid #dbe2ee;
    border-radius: 14px;
    padding: 18px;
    background: var(--branco);
    box-shadow: 0 18px 40px rgba(15, 35, 68, .16);
}
.menu-perfil.aberto { display: grid; gap: 10px; }
.perfil-resumo { position: relative; display: grid; grid-template-columns: 58px minmax(210px, max-content); align-items: center; gap: 14px; border-bottom: 1px solid #edf1f7; padding-bottom: 14px; }
.perfil-resumo > div { min-width: 0; }
.perfil-resumo strong { display: block; max-width: min(360px, calc(100vw - 150px)); overflow-wrap: anywhere; line-height: 1.15; text-transform: uppercase; }
.perfil-resumo small { display: block; margin-top: 4px; color: var(--azul); font-weight: 900; }
.status-atual {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 0;
    margin-top: 4px;
    padding: 0;
    background: transparent;
    color: var(--fraco);
    font: inherit;
    font-weight: 700;
}
.status-atual em { font-style: normal; }
.status-atual span, .status-menu span { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; }
.status-menu {
    position: absolute;
    top: 86px;
    left: 90px;
    z-index: 5;
    display: none;
    gap: 4px;
    width: 190px;
    border: 1px solid #edf1f7;
    border-radius: 12px;
    padding: 10px;
    background: var(--branco);
    box-shadow: 0 14px 30px rgba(15, 35, 68, .18);
}
.status-menu.aberto { display: grid; }
.status-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    padding: 8px;
    background: transparent;
    color: var(--texto);
    font: inherit;
    font-weight: 800;
    text-align: left;
}
.status-menu button:hover { background: #eef4ff; }
.status-menu .ausente { background: #fb923c; }
.status-menu .ocupado { background: #ef4444; }
.status-menu .offline { background: #94a3b8; }
body.tema-escuro .status-menu { border-color: #2b3850; background: #1b263a; }
body.tema-escuro .status-menu button:hover { background: #22304a; }
.avatar-mini { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--azul); color: var(--branco); font: inherit; font-weight: 900; cursor: pointer; }
.perfil-resumo .avatar-mini { width: 58px; height: 58px; font-size: 1.2rem; }
.avatar-mini, .avatar-aluno { background-size: cover; background-position: center; }
.avatar-mini.com-foto, .avatar-aluno.com-foto { color: transparent; }
.menu-perfil a { color: var(--texto); font-weight: 800; }
.menu-perfil a:hover { color: var(--azul); }
.fundo-painel { position: fixed; inset: 0; z-index: 20; display: none; background: rgba(15, 35, 68, .18); }
.fundo-painel.aberto { display: block; }
.painel-lateral {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 21;
    display: grid;
    align-content: start;
    gap: 12px;
    width: min(100%, 420px);
    height: 100vh;
    padding: 20px 22px;
    overflow-y: auto;
    background: var(--branco);
    box-shadow: -18px 0 45px rgba(15, 35, 68, .18);
    transform: translateX(105%);
    transition: transform .2s ease;
}
.painel-lateral.aberto { transform: translateX(0); }
.painel-lateral header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.painel-lateral header h2 { margin: 0 0 4px; font-size: 1.36rem; }
.painel-lateral header span { color: var(--fraco); font-size: .9rem; font-weight: 900; line-height: 1.2; }
.painel-lateral header button { border: 0; background: transparent; color: var(--fraco); font-size: 1.8rem; }
.painel-lateral section { border: 1px solid #edf1f7; border-radius: 14px; padding: 16px; background: #f8fafc; }
.painel-lateral h3 { margin-bottom: 12px; color: var(--fraco); font-size: .86rem; text-transform: uppercase; }
.painel-lateral section p { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.painel-lateral section p:last-child { margin-bottom: 0; }
.painel-lateral section span { color: var(--fraco); text-align: right; }
.toggle { position: relative; width: 38px; height: 22px; border: 0; border-radius: 999px; background: #dbe2ee; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--branco); }
.toggle.ligado { background: var(--azul); }
.toggle.ligado::after { left: 19px; }
.lista-notificacoes { display: grid; gap: 12px; border: 0 !important; padding: 0 !important; background: transparent !important; }
.lista-notificacoes article { border: 1px solid #edf1f7; border-left: 4px solid var(--azul); border-radius: 12px; padding: 14px; background: #f8fafc; }
.lista-notificacoes article.info { border-left-color: var(--azul); }
.lista-notificacoes article.sucesso { border-left-color: #22c55e; background: #ecfdf5; }
.lista-notificacoes article.atencao { border-left-color: #f59e0b; background: #fffbeb; }
.lista-notificacoes p { display: block !important; margin: 6px 0 !important; }
.lista-notificacoes span { color: var(--fraco); font-size: .9rem; font-weight: 900; }
.continuidade { grid-template-columns: 1.5fr .9fr; }
.indicadores-aluno { grid-template-columns: 1fr; }
.cartao-painel { border: 1px solid #dbe2ee; border-radius: 16px; padding: 22px; background: var(--branco); box-shadow: 0 12px 28px rgba(15, 35, 68, .06); }
.cartao-painel h2 { margin-bottom: 8px; }
.formulario-painel {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}
.formulario-painel .campo,
.formulario-painel .campo-form {
    display: grid;
    gap: 7px;
}
.formulario-painel label,
.campo-form label {
    color: var(--texto-primario);
    font-size: .92rem;
    font-weight: 800;
}
.formulario-painel input,
.formulario-painel select,
.formulario-painel textarea,
.campo-form input,
.campo-form select,
.campo-form textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--borda);
    border-radius: 12px;
    padding: 11px 13px;
    background: #f8fafc;
    color: var(--texto);
    font: inherit;
    line-height: 1.35;
}
.formulario-painel textarea,
.campo-form textarea {
    min-height: 90px;
    resize: vertical;
}
.formulario-painel input::placeholder,
.formulario-painel textarea::placeholder,
.campo-form input::placeholder,
.campo-form textarea::placeholder { color: #7d8da3; }
.formulario-painel input:focus-visible,
.formulario-painel select:focus-visible,
.formulario-painel textarea:focus-visible,
.campo-form input:focus-visible,
.campo-form select:focus-visible,
.campo-form textarea:focus-visible {
    outline: 0;
    border-color: var(--azul);
    background: var(--branco);
    box-shadow: var(--foco-anel);
}
.formulario-painel .botao {
    justify-self: start;
    margin-top: 2px;
}
.grupo-opcoes {
    border: 1px solid var(--borda);
    border-radius: 14px;
    padding: 14px;
    background: var(--superficie-elevada);
}
.grupo-opcoes input + input,
.grupo-opcoes input + label,
.grupo-opcoes select { margin-top: 8px; }
.ajuste-ia-box {
    display: grid;
    gap: 12px;
    margin: 18px 0;
    border: 1px solid var(--borda);
    border-radius: 14px;
    padding: 16px;
    background: var(--superficie-elevada);
}
.ajuste-ia-box .botao {
    justify-self: start;
}
.lista-etapas-ia {
    display: grid;
    gap: 14px;
}
.etapa-ia-card {
    display: grid;
    gap: 12px;
    border: 1px solid var(--borda);
    border-radius: 14px;
    padding: 16px;
    background: var(--superficie-elevada);
}
.etapa-ia-card > .linha-titulo {
    align-items: end;
    margin-bottom: 0;
}
.etapa-ia-card > .linha-titulo strong {
    color: var(--texto-primario);
    font-size: 1rem;
}
.tipo-etapa-ia {
    min-width: 150px;
}
.indicadores-aluno .cartao-painel { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.indicadores-aluno strong { font-size: 1.45rem; color: var(--texto); }
.destaque-aluno { background: linear-gradient(135deg, #173f7a, #3157f6); color: var(--branco); }
.destaque-aluno h2 { color: #fff; }
.destaque-aluno p, .destaque-aluno > span { color: #e8efff; }
.destaque-aluno .barra { margin: 18px 0; background: rgba(255,255,255,.25); }
.destaque-aluno .botao { background: #fff; color: var(--azul); border-color: #fff; box-shadow: none; }
.abas-turma {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.abas-turma a {
    border-radius: 999px;
    padding: 9px 12px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-weight: 900;
}
.abas-turma a:hover { background: rgba(255,255,255,.24); }
.etapas-trilha { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.etapas-trilha span { border-radius: 999px; padding: 12px; background: #eef2f7; color: var(--fraco); text-align: center; font-weight: 900; }
.etapas-trilha .feito { background: #dcfce7; color: #15803d; }
.etapas-trilha .ativo { background: var(--azul); color: var(--branco); }
.lista-trilhas { display: grid; gap: 12px; }
.lista-trilhas p { display: flex; justify-content: space-between; gap: 12px; margin: 0; border-bottom: 1px solid #edf1f7; padding-bottom: 12px; }
.ia-aluno div { border-left: 4px solid var(--azul); padding-left: 14px; }
.ia-aluno span { display: block; margin-top: 4px; color: var(--fraco); }
.grade-dashboard { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grade-dashboard > .cartao-painel[data-blocos-dependentes] { min-height: 240px; }
.lista-acoes { display: grid; gap: 12px; }
.lista-acoes p { display: flex; justify-content: space-between; gap: 14px; margin: 0; border-bottom: 1px solid #edf1f7; padding-bottom: 12px; }
.lista-acoes p:last-child { border-bottom: 0; padding-bottom: 0; }
.lista-acoes span { color: var(--fraco); text-align: right; }
.chips-ia { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; border-left: 0 !important; padding-left: 0 !important; }
.chips-ia button { border: 1px solid #dbe2ee; border-radius: 999px; padding: 10px 12px; background: #eef4ff; color: var(--azul); font: inherit; font-weight: 900; }
body.tema-escuro .lista-acoes p { border-color: #2b3850; }
body.tema-escuro .chips-ia button { border-color: #2b3850; background: #22304a; }
.grade-ia {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 18px;
}
.chat-ia-wrapper {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 0;
    border-radius: 16px;
    border: 1px solid var(--borda);
    background: var(--superficie);
    overflow: hidden;
    min-height: 480px;
    max-height: 520px;
}
.chat-ia-mensagens {
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}
.chat-ia-mensagens:empty::before {
    content: "Escreva uma dúvida ou use um atalho. A IA vai orientar seu raciocínio sem entregar a resposta.";
    color: var(--fraco);
    font-size: .9rem;
    font-style: italic;
    align-self: center;
    text-align: center;
    margin: auto;
    padding: 24px;
}
.bolha-usuario,
.bolha-ia {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: .92rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
.bolha-usuario {
    align-self: flex-end;
    background: var(--azul);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.bolha-ia {
    align-self: flex-start;
    background: #f1f5f9;
    color: var(--texto);
    border-bottom-left-radius: 4px;
}
.bolha-ia.digitando {
    opacity: .6;
    font-style: italic;
}
body.tema-escuro .bolha-ia {
    background: #1e2d45;
    color: var(--texto);
}
body.tema-escuro .chat-ia-wrapper {
    border-color: #2b3850;
    background: #141f31;
}
.chat-ia-input {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--borda);
    background: var(--superficie);
}
body.tema-escuro .chat-ia-input {
    background: #141f31;
    border-color: #2b3850;
}
.chat-ia-input textarea {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    resize: none;
    border: 1px solid var(--borda);
    border-radius: 10px;
    padding: 10px 14px;
    background: var(--branco);
    color: var(--texto);
    font: inherit;
    font-size: .92rem;
    line-height: 1.4;
    overflow-y: auto;
    transition: border-color .15s;
}
.chat-ia-input textarea:focus {
    outline: none;
    border-color: var(--azul);
}
body.tema-escuro .chat-ia-input textarea {
    background: #1e2d45;
    border-color: #2b3850;
    color: var(--texto);
}
.chat-ia-input .botao {
    flex-shrink: 0;
    height: 44px;
    padding: 0 18px;
    align-self: flex-end;
}
.chips-ia {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 0;
}
.chips-ia button {
    border: 1px solid var(--borda);
    border-radius: 999px;
    padding: 6px 14px;
    background: var(--superficie);
    color: var(--fraco);
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.chips-ia button:hover {
    border-color: var(--azul);
    color: var(--azul);
    background: #eef4ff;
}
body.tema-escuro .chips-ia button {
    background: #1e2d45;
    border-color: #2b3850;
}
body.tema-escuro .chips-ia button:hover {
    background: #22304a;
    border-color: var(--azul);
    color: var(--azul);
}
.historico-ia-lateral {
    display: grid;
    gap: 10px;
}
.painel-ia, .resposta-ia { display: grid; gap: 14px; }
.painel-ia .botao { justify-self: start; }
.resposta-ia {
    align-content: start;
    border-left: 4px solid var(--azul);
}
.resposta-ia p {
    border-radius: 14px;
    padding: 16px;
    background: #f8fafc;
    color: var(--texto);
}
body.tema-escuro .resposta-ia p { background: #22304a; color: var(--texto); }
.cartao-linha {
    display: grid;
    gap: 6px;
    border: 1px solid #dbe2ee;
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}
.cartao-linha strong { color: var(--texto); }
.cartao-linha p { margin: 0; }
.cartao-linha[role="button"] { cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.cartao-linha[role="button"]:hover,
.cartao-linha[role="button"]:focus-visible {
    border-color: var(--azul);
    box-shadow: 0 8px 24px rgba(49, 87, 246, .12);
    transform: translateY(-1px);
}
.cartao-linha.ativo {
    border-color: var(--azul);
    background: var(--fundo-cartao-ativo);
    box-shadow: 0 10px 28px rgba(49, 87, 246, .16);
}
.cartao-linha.ativo strong { color: var(--azul); }
.texto-apoio-turma,
.turma-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .82rem;
    font-weight: 900;
}
.texto-apoio-turma {
    background: #f8fafc;
    color: var(--fraco);
}
.turma-status {
    background: #dbeafe;
    color: var(--azul);
}
.linha-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.etiqueta {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 10px;
    background: #eef4ff;
    color: var(--azul);
    font-size: .85rem;
    font-weight: 900;
}
.grade-pagina { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grade-pagina + .grade-pagina { margin-top: 18px; }
.lista-pagina,
#lista-trilhas-professor,
#lista-trilhas-aluno,
#modal-etapas-lista,
#lista-questoes-adicionadas { display: grid; gap: 12px; }
.turma-ativa {
    display: grid;
    gap: 6px;
    min-width: 220px;
    color: var(--fraco);
    font-size: .88rem;
    font-weight: 900;
}
.turma-ativa select {
    width: 100%;
    border: 1px solid #dbe2ee;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    color: var(--texto);
    font: inherit;
    font-weight: 800;
}
.estado-inline {
    margin: 0;
    border: 1px dashed #dbe2ee;
    border-radius: 14px;
    padding: 28px 18px;
    background: #f8fafc;
    color: var(--fraco);
    text-align: center;
}
.estado-inline a { margin-top: 10px; }
.erro-inline {
    border-style: solid;
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}
.bloco-oculto { display: none !important; }
.resumo-turma-ativa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fraco);
    font-size: .92rem;
    font-weight: 800;
}
.resumo-turma-ativa::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--azul);
}
.professor-lista {
    display: grid;
    gap: 12px;
}
.painel-professor .destaque-aluno {
    position: relative;
    overflow: hidden;
}
.painel-professor .destaque-aluno::after {
    content: "";
    position: absolute;
    inset: auto -60px -60px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
}
.painel-professor .grade-dashboard {
    grid-template-columns: minmax(280px, .95fr) minmax(0, 1.05fr);
    align-items: start;
}
.painel-professor .linha-titulo {
    align-items: center;
}
.painel-professor .professor-lista .item-atividade {
    align-items: start;
}
.painel-professor .linha-titulo > div > span {
    color: var(--fraco);
    font-size: .88rem;
    font-weight: 800;
}
.cartao-destaque-pequeno {
    display: grid;
    gap: 10px;
    border-radius: 16px;
    padding: 22px;
    background: linear-gradient(135deg, #173f7a, #3157f6);
    color: #fff;
}
.cartao-destaque-pequeno p { color: #e8efff; }
.cartao-destaque-pequeno .botao { justify-self: start; background: #fff; color: var(--azul); border-color: #fff; box-shadow: none; }
.cartao-trilha-aluno {
    gap: 16px;
}
.cartao-trilha-aluno .linha-titulo {
    margin-bottom: 0;
}
.cartao-trilha-aluno h2 {
    margin: 4px 0 0;
    color: var(--texto-primario);
    font-size: 1.25rem;
    line-height: 1.2;
}
.cartao-trilha-aluno .linha-titulo span:first-child {
    color: var(--fraco);
    font-size: .86rem;
    font-weight: 900;
}
.etiqueta-progresso {
    min-width: 52px;
    justify-content: center;
}
.resumo-progresso-trilha {
    display: grid;
    gap: 8px;
}
.resumo-progresso-trilha p {
    margin: 0;
    color: var(--fraco);
    font-size: .9rem;
    font-weight: 800;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(15, 35, 68, .46);
}
.modal-conteudo {
    width: min(100%, 940px);
    max-height: min(86vh, 820px);
    overflow-y: auto;
    border: 1px solid var(--borda);
    border-radius: 18px;
    padding: 24px;
    background: var(--branco);
    color: var(--texto);
    box-shadow: 0 28px 70px rgba(15, 35, 68, .24);
}
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--borda);
    padding-bottom: 16px;
}
.modal-header h2 {
    margin: 0;
    color: var(--texto-primario);
    font-size: 1.45rem;
    line-height: 1.2;
}
.modal-header button {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--borda);
    border-radius: 12px;
    background: var(--superficie-elevada);
    color: var(--fraco);
    font: inherit;
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
}
.modal-header button:hover {
    border-color: var(--azul);
    color: var(--azul);
}
.lista-etapas-aluno {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.etapa-item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--borda);
    border-radius: 14px;
    padding: 16px;
    background: rgba(248, 250, 252, .72);
}
.lista-etapas-aluno .etapa-item {
    border: 0;
    border-radius: 18px;
    padding: 0;
    background: transparent;
}
.etapa-item-aluno .etapa-corpo {
    position: relative;
    gap: 14px;
    border: 1px solid var(--borda);
    border-radius: 18px;
    padding: 18px;
    background: var(--superficie-elevada);
}
.etapa-topo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.check-etapa {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
}
.check-etapa input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.check-etapa span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 2px solid #9aa9bf;
    border-radius: 8px;
    background: var(--branco);
}
.check-etapa input:checked + span {
    border-color: #22c55e;
    background: #22c55e;
}
.check-etapa input:checked + span::after {
    content: "";
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.etapa-item-aluno h3 {
    margin: 0;
    color: var(--texto-primario);
    font-size: 1.12rem;
    line-height: 1.3;
}
.etapa-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 3px;
    accent-color: var(--azul);
}
.etapa-corpo,
.etapa-item label {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.etapa-item label {
    cursor: pointer;
}
.etapa-cabecalho {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.etapa-item-aluno .etapa-cabecalho {
    flex: 1;
}
.etapa-cabecalho small {
    color: var(--fraco);
    font-weight: 900;
    text-transform: uppercase;
}
.etapa-item strong {
    color: var(--texto-primario);
    font-size: 1.05rem;
    line-height: 1.25;
}
.conteudo-etapa {
    margin: 0;
    color: var(--texto-secundario);
    overflow-wrap: anywhere;
}
.texto-etapa {
    border-radius: 12px;
    padding: 14px;
    background: var(--branco);
    white-space: pre-wrap;
}
.midia-etapa {
    margin-top: 4px;
}
.video-etapa {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--borda);
    border-radius: 14px;
    background: #020816;
    aspect-ratio: 16 / 9;
    box-shadow: 0 16px 36px rgba(15, 35, 68, .14);
}
.video-etapa iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-sugestao-etapa {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(239, 68, 68, .35);
    border-radius: 14px;
    padding: 16px;
    background: linear-gradient(135deg, #fff1f2, #ffffff);
    color: var(--texto);
}
.icone-video-etapa {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #ef4444;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
}
.video-sugestao-etapa strong,
.video-sugestao-etapa em {
    display: block;
}
.video-sugestao-etapa strong {
    color: var(--texto-primario);
    font-size: 1rem;
}
.video-sugestao-etapa em {
    margin-top: 4px;
    color: var(--texto-secundario);
    font-style: normal;
    line-height: 1.45;
}
.video-sugestao-etapa:hover {
    box-shadow: 0 12px 26px rgba(49, 87, 246, .16);
}
.link-etapa {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--borda);
    border-radius: 14px;
    padding: 14px;
    background: var(--branco);
    color: var(--texto);
}
.link-etapa::after {
    content: "Abrir";
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--azul);
    color: #fff;
    font-size: .82rem;
    font-weight: 900;
}
.link-etapa span {
    color: var(--azul);
    font-size: .86rem;
    font-weight: 900;
}
.link-etapa strong {
    color: var(--texto-primario);
    font-size: .94rem;
    overflow-wrap: anywhere;
}
.link-etapa:hover {
    border-color: var(--azul);
    box-shadow: 0 10px 24px rgba(49, 87, 246, .12);
}
.etapa-item.concluida {
    border-color: #86efac;
    background: #f0fdf4;
}
.lista-etapas-aluno .etapa-item.concluida .etapa-corpo {
    border-color: rgba(34, 197, 94, .45);
    background: #f0fdf4;
}
.etapa-item.concluida strong {
    color: #166534;
}
.etapa-item-professor .linha-meta {
    align-items: flex-start;
}
.etapa-item-professor .texto-etapa {
    margin-top: 10px;
}
.editor-etapa-form {
    grid-column: 1 / -1;
    margin-top: 0;
    width: 100%;
}
.editor-etapa-acoes {
    flex-wrap: wrap;
}
.campo-ia {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border: 1px solid #dbe2ee;
    border-radius: 12px;
    padding: 12px;
    background: var(--branco);
    color: var(--texto);
    font: inherit;
}
.membros-turma { display: flex; flex-wrap: wrap; gap: 10px; }
.membro {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dbe2ee;
    border-radius: 999px;
    padding: 8px 10px;
    background: var(--branco);
    font-weight: 900;
}
.membro span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--azul);
    color: #fff;
    font-size: .82rem;
}
.filtros-atividades {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filtros-atividades button {
    border: 1px solid #dbe2ee;
    border-radius: 999px;
    padding: 9px 12px;
    background: var(--branco);
    color: var(--fraco);
    font: inherit;
    font-weight: 900;
}
.filtros-atividades .ativo {
    border-color: var(--azul);
    background: var(--azul);
    color: #fff;
}
.lista-atividades { display: grid; gap: 2px; }
.item-atividade {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--borda);
    background: transparent;
    transition: background .12s;
}
.item-atividade:last-child { border-bottom: 0; }
.item-atividade:hover { background: var(--superficie-elevada); }
.professor-lista .item-atividade { box-shadow: none; }
.item-atividade p { margin: 8px 0; }
.meta-atividade {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--fraco);
    font-size: .9rem;
    font-weight: 800;
}
.status-entregue { background: #dcfce7; color: #15803d; }
body.tema-escuro .formulario-painel input,
body.tema-escuro .formulario-painel select,
body.tema-escuro .formulario-painel textarea,
body.tema-escuro .campo-form input,
body.tema-escuro .campo-form select,
body.tema-escuro .campo-form textarea {
    border-color: #34445f;
    background: #101827;
    color: #eaf0ff;
}
body.tema-escuro .formulario-painel input::placeholder,
body.tema-escuro .formulario-painel textarea::placeholder,
body.tema-escuro .campo-form input::placeholder,
body.tema-escuro .campo-form textarea::placeholder { color: #8b9ab0; }
body.tema-escuro .formulario-painel input:focus-visible,
body.tema-escuro .formulario-painel select:focus-visible,
body.tema-escuro .formulario-painel textarea:focus-visible,
body.tema-escuro .campo-form input:focus-visible,
body.tema-escuro .campo-form select:focus-visible,
body.tema-escuro .campo-form textarea:focus-visible { background: #141f31; }
body.tema-escuro .grupo-opcoes,
body.tema-escuro .ajuste-ia-box,
body.tema-escuro .etapa-ia-card,
body.tema-escuro .estado-inline {
    border-color: #34445f;
    background: #101827;
}
body.tema-escuro .modal-overlay {
    background: rgba(2, 8, 23, .72);
}
body.tema-escuro .modal-conteudo {
    border-color: #2b3850;
    background: #172033;
}
body.tema-escuro .modal-header {
    border-color: #2b3850;
}
body.tema-escuro .modal-header button {
    border-color: #34445f;
    background: #101827;
    color: #aab6cb;
}
body.tema-escuro .modal-header button:hover {
    border-color: var(--azul);
    color: #b8c7ff;
}
body.tema-escuro .etapa-item {
    border-color: #34445f;
    background: #101827;
}
body.tema-escuro .etapa-item-aluno .etapa-corpo {
    border-color: #34445f;
    background: #101827;
}
body.tema-escuro .check-etapa span {
    border-color: #637080;
    background: #172033;
}
body.tema-escuro .etapa-item.concluida {
    border-color: #166534;
    background: #10291f;
}
body.tema-escuro .lista-etapas-aluno .etapa-item.concluida .etapa-corpo {
    border-color: #166534;
    background: #10291f;
}
body.tema-escuro .etapa-item.concluida strong {
    color: #bbf7d0;
}
body.tema-escuro .conteudo-etapa {
    color: #c8d4e8;
}
body.tema-escuro .texto-etapa,
body.tema-escuro .link-etapa {
    border-color: #34445f;
    background: #172033;
}
body.tema-escuro .video-etapa {
    border-color: #34445f;
}
body.tema-escuro .video-sugestao-etapa {
    border-color: rgba(239, 68, 68, .38);
    background: linear-gradient(135deg, #2a1116, #101827);
}
body.tema-escuro .video-sugestao-etapa em {
    color: #c8d4e8;
}
body.tema-escuro .link-etapa strong {
    color: #eaf0ff;
}
body.tema-escuro .etiqueta {
    background: #1a2d50;
    color: #b8c7ff;
}
body.tema-escuro .etiqueta-vencida { background: #451a1a; color: #fecaca; }
body.tema-escuro .etiqueta-proxima { background: #422006; color: #fde68a; }
body.tema-escuro .etiqueta-pendente { background: #22304a; color: #c8d4e8; }
body.tema-escuro .status-entregue { background: #153827; color: #bbf7d0; }
body.tema-escuro .filtros-atividades button { border-color: #2b3850; background: #172033; color: var(--fraco); }
body.tema-escuro .item-atividade { border-color: var(--borda); background: transparent; }
body.tema-escuro .item-atividade:hover { background: #1e2d45; }
body.tema-escuro .filtros-atividades .ativo {
    border-color: var(--azul);
    background: var(--azul);
    color: #fff;
}
.tela-estudo {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 18px;
    align-items: start;
}
.progresso-estudo {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.progresso-estudo span {
    border-radius: 999px;
    padding: 11px;
    background: #eef2f7;
    color: var(--fraco);
    text-align: center;
    font-weight: 900;
}
.progresso-estudo .feito { background: #dcfce7; color: #15803d; }
.progresso-estudo .ativo { background: var(--azul); color: #fff; }
.aula p { font-size: 1.05rem; }
.exemplo-aula {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}
.exemplo-aula span,
.exemplo-aula strong,
.opcoes-estudo button {
    border-radius: 12px;
    padding: 12px;
    background: #eef4ff;
}
.exemplo-aula strong { color: var(--azul); text-align: right; }
.exercicio-aula { display: grid; gap: 14px; }
.opcoes-estudo { display: flex; flex-wrap: wrap; gap: 10px; }
.opcoes-estudo button {
    border: 1px solid #dbe2ee;
    color: var(--texto);
    font: inherit;
    font-weight: 900;
}
.opcoes-estudo button:hover { border-color: var(--azul); color: var(--azul); }
.opcoes-estudo .selecionado { border-color: var(--azul); background: var(--azul); color: #fff; }
.orientacao-ia {
    border-left: 4px solid var(--azul);
    border-radius: 12px;
    padding: 14px;
    background: #f8fafc;
}
.orientacao-ia p { margin: 6px 0 0; }
.feedback-estudo {
    border-radius: 12px;
    padding: 14px;
    background: #ecfdf5;
    color: #14532d;
}
.feedback-estudo p { margin: 6px 0 0; color: inherit; }
.feedback-estudo.atencao { background: #fff7ed; color: #9a3412; }
.feedback-estudo[hidden] { display: none; }
.proximo-estudo {
    border-radius: 12px;
    padding: 14px;
    background: #eef4ff;
}
.proximo-estudo p { margin: 6px 0 0; }
body.tema-escuro .exemplo-aula span,
body.tema-escuro .exemplo-aula strong,
body.tema-escuro .opcoes-estudo button,
body.tema-escuro .orientacao-ia,
body.tema-escuro .proximo-estudo {
    border-color: #2b3850;
    background: #22304a;
}
body.tema-escuro .feedback-estudo { background: #153827; color: #bbf7d0; }
body.tema-escuro .feedback-estudo.atencao { background: #3b2a18; color: #fed7aa; }
body.tema-escuro .progresso-estudo span { background: #22304a; }
body.tema-escuro .progresso-estudo .feito { background: #153827; color: #86efac; }
body.tema-escuro .progresso-estudo .ativo { background: var(--azul); color: #fff; }
body.tema-escuro .opcoes-estudo .selecionado { border-color: var(--azul); background: var(--azul); color: #fff; }
.config-layout { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.menu-config {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 8px;
    border: 1px solid #dbe2ee;
    border-radius: 16px;
    padding: 12px;
    background: var(--branco);
}
.menu-config a { border-radius: 10px; padding: 11px 12px; color: var(--fraco); font-weight: 900; }
.menu-config .ativo, .menu-config a:hover { background: #eef4ff; color: var(--azul); }
.lista-config { display: grid; gap: 18px; }
.bloco-config { padding: 0; overflow: hidden; }
.titulo-config { padding: 22px 24px 14px; border-bottom: 1px solid var(--borda); }
.titulo-config span { color: var(--fraco); font-weight: 900; text-transform: uppercase; }
.titulo-config h2 { margin: 4px 0 0; color: var(--texto-primario); }
.item-config {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--borda);
}
.item-config:last-child { border-bottom: 0; }
.item-foto { cursor: pointer; }
.item-config p { margin: 5px 0 0; }
.item-config em, .valor-config { color: var(--fraco); font-style: normal; font-weight: 800; text-align: right; }
.valor-config {
    border: 0;
    border-radius: 10px;
    padding: 9px 10px;
    background: transparent;
    font: inherit;
}
.valor-config:hover { background: #eef4ff; color: var(--azul); }

/* Dark mode — configurações */
body.tema-escuro .menu-config {
    background: var(--superficie);
    border-color: #2b3850;
}
body.tema-escuro .menu-config a { color: var(--fraco); }
body.tema-escuro .menu-config .ativo,
body.tema-escuro .menu-config a:hover { background: #1e2d45; color: var(--azul); }
body.tema-escuro .bloco-config { background: var(--superficie); border-color: #2b3850; }
body.tema-escuro .titulo-config { border-color: #2b3850; }
body.tema-escuro .titulo-config h2 { color: #eaf0ff; }
body.tema-escuro .item-config { border-color: #2b3850; }
body.tema-escuro .item-config strong { color: #eaf0ff; }
body.tema-escuro .item-config p { color: var(--fraco); }
body.tema-escuro .valor-config { color: var(--fraco); }
body.tema-escuro .valor-config:hover { background: #1e2d45; color: var(--azul); }
body.tema-escuro .editor-config { background: #1e2d45; border-color: #2b3850; color: var(--texto); }
.editor-config {
    width: min(100%, 260px);
    border: 1px solid #dbe2ee;
    border-radius: 10px;
    padding: 9px 10px;
    background: var(--branco);
    color: var(--texto);
    font: inherit;
    font-weight: 800;
    text-align: right;
}
.editor-config:focus { outline: 0; border-color: var(--azul); }
.input-foto { display: none; }
.aviso-config {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 30;
    border-radius: 12px;
    padding: 12px 16px;
    background: var(--texto);
    color: var(--branco);
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(15, 35, 68, .22);
}
/* Toast variants (Phase 5) */
.aviso-config.sucesso { background: #166534; color: #f0fdf4; }
.aviso-config.erro    { background: #991b1b; color: #fef2f2; }

/* Erro inline em listas */
.erro-inline { color: #991b1b; font-weight: 700; font-size: 0.88rem; }
body.tema-escuro .erro-inline { color: #fca5a5; }

/* Spinner global */
.carregando-global {
    position: fixed; inset: 0; z-index: 50;
    display: none; flex-direction: column;
    align-items: center; justify-content: center; gap: 16px;
    background: rgba(15, 35, 68, 0.35);
}
.carregando-global.ativo { display: flex; }
.spinner-anel {
    width: 40px; height: 40px;
    border: 4px solid rgba(49, 87, 246, 0.2);
    border-top-color: var(--azul);
    border-radius: 50%;
    animation: girar 0.75s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }
.carregando-global span {
    color: #fff; font-weight: 700;
    font-size: 0.88rem; letter-spacing: 0.01em;
}
.modal-foto {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(15, 35, 68, .35);
}
.modal-foto.aberto { display: grid; }
.janela-foto {
    width: min(100%, 560px);
    border: 1px solid #dbe2ee;
    border-radius: 18px;
    padding: 24px;
    background: var(--branco);
    box-shadow: 0 26px 70px rgba(15, 35, 68, .22);
}
.janela-foto header, .janela-foto footer, .acoes-foto { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.janela-foto h2 { margin: 0; font-size: 1.55rem; }
.janela-foto header button, .janela-foto footer button, .acoes-foto button {
    border: 0;
    background: transparent;
    color: var(--fraco);
    font: inherit;
    font-weight: 900;
}
.janela-foto header button { font-size: 2rem; }
.janela-foto > p { margin: 22px 0; font-size: 1.05rem; }
.area-upload {
    display: grid;
    place-items: center;
    gap: 18px;
    min-height: 240px;
    border: 2px dashed var(--azul);
    border-radius: 18px;
    padding: 28px;
    background: #dce6ff;
    text-align: center;
}
.area-upload.arrastando { background: #cbd9ff; }
.area-upload strong { color: var(--azul); font-size: 1.25rem; }
.area-upload span { color: var(--azul); font-weight: 900; }
.area-upload .botao, .janela-foto footer .botao:not(:disabled) { color: #fff; }
.area-corte { display: none; border-radius: 18px; padding: 18px; background: #eef2f7; }
.modal-foto.com-preview .area-upload { display: none; }
.modal-foto.com-preview .area-corte { display: block; }
.preview-foto {
    position: relative;
    display: grid;
    place-items: center;
    height: 260px;
    overflow: hidden;
    border-radius: 14px;
    background: #808080;
}
.preview-foto img { width: 230px; height: 230px; border-radius: 50%; object-fit: cover; outline: 3px solid var(--azul); }
.preview-foto span {
    position: absolute;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: linear-gradient(transparent 32%, rgba(255,255,255,.35) 33%, transparent 34%, transparent 65%, rgba(255,255,255,.35) 66%, transparent 67%),
                linear-gradient(90deg, transparent 32%, rgba(255,255,255,.35) 33%, transparent 34%, transparent 65%, rgba(255,255,255,.35) 66%, transparent 67%);
    pointer-events: none;
}
.acoes-foto { justify-content: flex-start; margin-top: 16px; }
.janela-foto footer { width: auto; margin: 22px 0 0; border: 0; padding: 0; justify-content: flex-end; text-align: left; }
.janela-foto footer button.botao { border: 1px solid var(--azul); background: var(--azul); color: #fff; }
.janela-foto footer button.botao:disabled { border-color: #dbe2ee; background: #eef2f7; color: #64748b; box-shadow: none; cursor: not-allowed; opacity: 1; }
body.tema-escuro .janela-foto footer button.botao:disabled { border-color: #2b3850; background: #243149; color: #aab6cb; }
@media (max-width: 850px) {
    main, footer { width: min(100% - 28px, 1260px); }
    .topo, .menu, .menu-conta, .acoes, .linha-titulo, .chamada-final { flex-wrap: wrap; }
    .menu { order: 3; flex-basis: 100%; }
    .submenu { left: -8px; min-width: min(92vw, 520px); }
    .cards-coloridos, .grade-simples, .fluxo { grid-template-columns: 1fr; }
    .card-acesso { padding: 26px; }
    .hero { padding: 48px 0 34px; }
    .hero h1 { font-size: 2.55rem; }
    .chamada-final h2 { font-size: 2rem; }
    .area-aluno { grid-template-columns: 1fr; }
    .barra-aluno { border-right: 0; border-bottom: 1px solid #dbe2ee; }
    .barra-aluno nav { grid-template-columns: repeat(2, 1fr); }
    .painel-aluno { width: min(100% - 28px, 1080px); }
    .continuidade, .cabecalho-aluno, .etapas-trilha, .config-layout, .item-config, .grade-dashboard, .tela-estudo, .progresso-estudo, .item-atividade, .grade-ia { grid-template-columns: 1fr; }
    .grade-pagina { grid-template-columns: 1fr; }
    .menu-config { position: static; }
    .item-config em, .valor-config { text-align: left; }
    .modal-overlay { padding: 12px; }
    .modal-conteudo { padding: 18px; }
    .etapa-item { grid-template-columns: 1fr; }
    .etapa-item input[type="checkbox"] { margin-top: 0; }
    .video-sugestao-etapa { grid-template-columns: 1fr; }
}

/* ── Phase 8: badges de prazo e status ─────────────────────────────── */
.etiqueta-vencida { background: #fef2f2; color: #b91c1c; }
.etiqueta-proxima { background: #fffbeb; color: #92400e; }
.etiqueta-pendente { background: #f1f5f9; color: #475569; }

/* ── Phase 8: modal de entregas ─────────────────────────────────────── */
.modal-entregas {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    background: rgba(15, 35, 68, .35);
}
.modal-entregas.aberto { display: grid; }
.janela-entregas {
    width: min(100%, 720px);
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--borda);
    border-radius: 18px;
    padding: 24px;
    background: var(--branco);
    box-shadow: 0 26px 70px rgba(15, 35, 68, .22);
}
.janela-entregas header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}
.janela-entregas header h2 { margin: 0; font-size: 1.45rem; }
.janela-entregas header button {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--fraco);
    font: inherit;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}
.tabela-entregas {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.tabela-entregas th,
.tabela-entregas td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #edf1f7;
}
.tabela-entregas th {
    color: var(--fraco);
    font-size: .82rem;
    text-transform: uppercase;
    font-weight: 900;
}
.tabela-entregas tr:last-child td { border-bottom: 0; }
body.tema-escuro .janela-entregas { background: #172033; border-color: #2b3850; }
body.tema-escuro .tabela-entregas th,
body.tema-escuro .tabela-entregas td { border-color: #2b3850; }

/* ── Phase 9: Quick Actions ────────────────────────────────────────── */
.grade-acoes-rapidas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.acao-rapida {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--borda);
    border-radius: 14px;
    padding: 20px;
    background: var(--superficie);
    color: var(--texto);
    font: inherit;
    font-weight: 400;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.acao-rapida:hover {
    border-color: var(--azul);
    box-shadow: 0 6px 20px rgba(49, 87, 246, .12);
    transform: translateY(-2px);
}
.acao-rapida:hover span { font-weight: 700; }
.acao-rapida:focus-visible {
    outline: 0;
    box-shadow: var(--foco-anel);
}

.acao-rapida .icone-acao {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

/* ── Modificadores de cor (light mode) ─────────────────────────────── */
.acao-rapida--turma     .icone-acao { background: #ede9fe; color: var(--acento-turma); }
.acao-rapida--atividade .icone-acao { background: #e0f2fe; color: var(--acento-atividade); }
.acao-rapida--trilha    .icone-acao { background: #f3e8ff; color: var(--acento-trilha); }

/* ── Overrides dark mode ────────────────────────────────────────────── */
body.tema-escuro .acao-rapida--turma     .icone-acao { background: #1e1b4b; }
body.tema-escuro .acao-rapida--atividade .icone-acao { background: #082f49; }
body.tema-escuro .acao-rapida--trilha    .icone-acao { background: #2e1065; }

/* ── Responsivo ─────────────────────────────────────────────────────── */
@media (max-width: 850px) {
    .grade-acoes-rapidas { grid-template-columns: 1fr 1fr; }
    .strip-resumo-turma  { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
    .grade-acoes-rapidas { grid-template-columns: 1fr; }
    .strip-resumo-turma  { grid-template-columns: 1fr; }
}

/* ── DASH-04 Strip de Resumo (Phase 10) ─────────────────────────────── */
.strip-resumo-turma {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.cartao-resumo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: 12px;
}
.cartao-resumo em {
    font-size: .78rem;
    color: var(--fraco);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cartao-resumo strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--texto-primario);
    line-height: 1;
}
body.tema-escuro .cartao-resumo {
    border-color: #2b3850;
    background: var(--superficie);
    box-shadow: none;
}

/* ── DASH-05 Estado sem turmas (Phase 10) ───────────────────────────── */
.estado-sem-turmas {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    padding: 48px 24px;
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: 16px;
}
.estado-sem-turmas .icone-estado {
    color: var(--azul);
    opacity: .7;
}
.estado-sem-turmas h2 {
    font-size: 1.15rem;
    color: var(--texto-primario);
    margin: 0;
}
.estado-sem-turmas p {
    max-width: 400px;
    font-size: .9rem;
    color: var(--fraco);
    margin: 0;
}
.estado-sem-turmas .botao { margin-top: 8px; }

/* ── Phase 11 prep (tokens presentes, não usados ainda) ────────────── */
.rotulo-prioridade {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 999px; padding: 4px 10px;
    background: #eff6ff; color: var(--azul);
    font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
    margin-bottom: 8px;
}
.ancora-onboarding { position: relative; }
.ancora-onboarding::after {
    content: ""; position: absolute; top: -4px; right: -4px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--azul); border: 2px solid var(--superficie);
    animation: pulsar-onboarding 1.6s ease infinite;
}
@keyframes pulsar-onboarding {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.3); opacity: .6; }
}
@media (prefers-reduced-motion: reduce) {
    .ancora-onboarding::after { animation: none; }
}

/* ── Phase 11: Onboarding (OB-01..05) ──────────────────────────────── */

/* Checklist card modifier */
.cartao-onboarding {
    background: var(--fundo-cartao-ativo);
    border-color: var(--azul);
    border-left-width: 4px;
    margin-bottom: 22px;
}
body.tema-escuro .cartao-onboarding {
    background: var(--fundo-cartao-ativo); /* #1a2d50 no dark */
    border-color: var(--azul);
}

/* Checklist ordered list */
.lista-checklist-onboarding {
    list-style: none;
    padding: 0;
    margin: 8px 0;
    display: grid;
    gap: 8px;
}
.lista-checklist-onboarding li a {
    font-weight: 700;
    color: var(--azul);
    text-decoration: none;
}
.lista-checklist-onboarding li a:hover {
    text-decoration: underline;
}
/* dark: var(--azul) token já funciona em ambos os temas */

/* Dismiss button spacing */
#btn-dispensar-onboarding {
    margin-top: 8px;
}

/* "?" sidebar button — completa o stub da Phase 9 */
.ancora-onboarding {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--borda);
    background: var(--superficie-elevada);
    color: var(--fraco);
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: auto;
    transition: background .15s, color .15s;
}
.ancora-onboarding:hover {
    background: #eef4ff;
    color: var(--azul);
}
.ancora-onboarding:focus-visible {
    outline: none;
    box-shadow: var(--foco-anel);
}
body.tema-escuro .ancora-onboarding {
    background: var(--superficie-elevada); /* #22304a */
    border-color: var(--borda);            /* #2b3850 */
    color: var(--fraco);                   /* #aab6cb */
}
body.tema-escuro .ancora-onboarding:hover {
    background: #22304a;
    color: var(--azul);
}

/* Hides pulsing dot once onboarding has been seen */
.ancora-onboarding--vista::after {
    animation: none;
    opacity: 0;
}

/* ── driver.js 1.4.0 theme overrides ───────────────────────────────── */
/* Todas as sobreposições aqui — nunca modificar assets/vendor/driver.css */
.driver-popover {
    background: var(--superficie);
    border: 1px solid #dbe2ee;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 35, 68, .12);
    padding: 20px 24px;
}
body.tema-escuro .driver-popover {
    border-color: #2b3850;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .4);
}
.driver-popover-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--texto-primario);
    margin-bottom: 6px;
}
body.tema-escuro .driver-popover-title {
    color: #eaf0ff;
}
.driver-popover-description {
    font-size: .88rem;
    line-height: 1.5;
    color: var(--fraco);
}
body.tema-escuro .driver-popover-description {
    color: #aab6cb;
}
.driver-popover-progress-text {
    font-size: .88rem;
    font-weight: 700;
    color: var(--texto-desativado);
}
body.tema-escuro .driver-popover-progress-text {
    color: #637080;
}
.driver-popover-prev-btn {
    background: transparent;
    color: var(--fraco);
    border: 1px solid var(--borda);
    border-radius: 999px;
    padding: 8px 24px;
}
body.tema-escuro .driver-popover-prev-btn {
    color: #aab6cb;
    border-color: #2b3850;
}
.driver-popover-next-btn,
.driver-popover-done-btn {
    background: var(--azul);
    color: #fff;
    border-radius: 999px;
    padding: 8px 24px;
    border: none;
}
.driver-popover-close-btn {
    color: var(--fraco);
}
body.tema-escuro .driver-popover-close-btn {
    color: #637080;
}

/* ── Experiência de estudo: atividades e trilhas ───────────────────── */
.atividade-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .75fr);
    gap: 18px;
    margin-bottom: 22px;
}
.atividade-hero-principal {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    padding: 26px;
    background:
        radial-gradient(circle at 92% 12%, rgba(255,255,255,.16), transparent 28%),
        linear-gradient(135deg, #183d77, #3157f6 58%, #0891b2);
    color: #fff;
    box-shadow: 0 22px 44px rgba(49, 87, 246, .22);
}
.atividade-hero-principal span,
.atividade-hero-principal p { color: #e8efff; }
.atividade-hero-principal h2 {
    max-width: 720px;
    margin: 8px 0;
    color: #fff;
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    line-height: 1.05;
}
.atividade-hero-principal .botao {
    margin-top: 10px;
    border-color: #fff;
    background: #fff;
    color: var(--azul);
    box-shadow: none;
}
.atividade-metricas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.atividade-metricas article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--borda);
    border-radius: 16px;
    padding: 18px;
    background: var(--superficie);
    box-shadow: 0 12px 28px rgba(15, 35, 68, .06);
}
.atividade-metricas span,
.atividade-lista-card > .linha-titulo span,
.atividade-responder-card > .linha-titulo span {
    color: var(--fraco);
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}
.atividade-metricas strong {
    color: var(--texto-primario);
    font-size: 1.75rem;
    line-height: 1;
}
.atividade-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}
.atividade-lista-card,
.atividade-responder-card {
    border-radius: 18px;
}
.atividade-lista-card .linha-titulo,
.atividade-responder-card .linha-titulo {
    align-items: flex-start;
}
.atividade-lista-card .linha-titulo h2,
.atividade-responder-card .linha-titulo h2 {
    margin-top: 3px;
}
.lista-atividades {
    display: grid;
    gap: 12px;
}
.card-atividade-aluno {
    display: grid;
    gap: 14px;
    border: 1px solid var(--borda);
    border-radius: 16px;
    padding: 16px;
    background: var(--superficie-elevada);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card-atividade-aluno:hover {
    border-color: rgba(49, 87, 246, .45);
    box-shadow: 0 14px 28px rgba(15, 35, 68, .08);
    transform: translateY(-1px);
}
.atividade-card-topo,
.atividade-card-corpo,
.atividade-card-rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.atividade-card-topo > span:last-child,
.atividade-card-rodape > span {
    color: var(--fraco);
    font-size: .88rem;
    font-weight: 800;
}
.atividade-card-corpo h3 {
    margin: 0 0 5px;
    color: var(--texto-primario);
    font-size: 1.18rem;
    line-height: 1.25;
}
.atividade-card-corpo p {
    margin: 0;
}
.atividade-card-corpo .botao {
    flex: 0 0 auto;
}
.mini-progresso {
    flex: 1;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbe5f2;
}
.mini-progresso span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #0891b2);
}
.estado-estudo {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 220px;
    border: 1px dashed var(--borda);
    border-radius: 16px;
    padding: 28px;
    background: var(--superficie-elevada);
    text-align: center;
}
.estado-estudo strong {
    color: var(--texto-primario);
    font-size: 1.15rem;
}
.estado-estudo p {
    max-width: 430px;
    margin: 0;
}
.formulario-resposta {
    margin-top: 0;
}
#area-questoes-resposta {
    display: grid;
    gap: 16px;
}
.resumo-resposta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--borda);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--superficie-elevada);
}
.resumo-resposta span,
.resumo-resposta em {
    color: var(--fraco);
    font-style: normal;
    font-weight: 800;
}
.resumo-resposta strong {
    color: var(--texto-primario);
}
.questao-resposta-card {
    display: grid;
    gap: 14px;
    border: 1px solid var(--borda);
    border-radius: 18px;
    padding: 18px;
    background: var(--superficie-elevada);
}
.questao-resposta-card legend {
    display: grid;
    gap: 7px;
    width: 100%;
    margin-bottom: 4px;
}
.questao-resposta-card legend span,
.questao-resposta-card legend em {
    color: var(--fraco);
    font-size: .82rem;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}
.questao-resposta-card legend strong {
    color: var(--texto-primario);
    font-size: 1.08rem;
    line-height: 1.4;
}
.alternativas-resposta {
    display: grid;
    gap: 10px;
}
.alternativas-resposta label {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--borda);
    border-radius: 14px;
    padding: 12px;
    background: var(--superficie);
    cursor: pointer;
}
.alternativas-resposta label:has(input:checked) {
    border-color: var(--azul);
    background: #eef4ff;
    box-shadow: var(--foco-anel);
}
.alternativas-resposta input {
    accent-color: var(--azul);
}
.alternativas-resposta label span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #075985;
    font-size: .86rem;
    font-weight: 900;
}
.alternativas-resposta label strong {
    color: var(--texto-primario);
    font-size: .96rem;
    line-height: 1.4;
}
.feedback-resposta-card {
    display: grid;
    gap: 12px;
    border: 1px solid var(--borda);
    border-radius: 18px;
    padding: 18px;
    background: var(--superficie-elevada);
}
.feedback-resposta-card h3 {
    margin: 0;
    color: var(--texto-primario);
}
.feedback-resposta-card p {
    display: grid;
    gap: 5px;
    margin: 0;
    border-bottom: 1px solid var(--borda);
    padding-bottom: 12px;
}
.feedback-resposta-card p:last-of-type {
    border-bottom: 0;
}
.feedback-resposta-card span {
    justify-self: start;
    border-radius: 999px;
    padding: 5px 9px;
    background: var(--fundo-atencao);
    color: var(--cor-atencao);
    font-size: .78rem;
    font-weight: 900;
}
.feedback-resposta-card span.ok {
    background: var(--fundo-sucesso);
    color: var(--cor-sucesso);
}
.feedback-resposta-card span.erro {
    background: var(--fundo-erro);
    color: var(--cor-erro);
}
.descricao-trilha-card {
    margin: 0;
    color: var(--fraco);
}
.trilha-modal-resumo {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    border: 1px solid var(--borda);
    border-radius: 18px;
    padding: 18px;
    background: var(--superficie-elevada);
}
.trilha-modal-resumo span {
    color: var(--fraco);
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}
.trilha-modal-resumo strong {
    display: block;
    margin-top: 4px;
    color: var(--texto-primario);
    font-size: 1.6rem;
}
.trilha-modal-resumo p {
    max-width: 720px;
    margin: 6px 0 0;
}
.lista-etapas-aluno {
    position: relative;
}
.lista-etapas-aluno .etapa-item-aluno {
    position: relative;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 16px;
}
.linha-tempo-etapa {
    position: relative;
    display: block;
    width: 14px;
    min-height: 100%;
    margin: 24px auto 0;
}
.linha-tempo-etapa::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: -34px;
    width: 2px;
    transform: translateX(-50%);
    background: var(--borda);
}
.linha-tempo-etapa::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 14px;
    height: 14px;
    border: 3px solid var(--azul);
    border-radius: 50%;
    background: var(--superficie);
    transform: translateX(-50%);
}
.lista-etapas-aluno .etapa-item-aluno:last-child .linha-tempo-etapa::before {
    display: none;
}
.lista-etapas-aluno .etapa-item-aluno.concluida .linha-tempo-etapa::after {
    border-color: #22c55e;
    background: #22c55e;
}
body.tema-escuro .atividade-hero-principal {
    border-color: #34445f;
    background:
        radial-gradient(circle at 92% 12%, rgba(255,255,255,.10), transparent 28%),
        linear-gradient(135deg, #102a52, #234ad8 58%, #075985);
}
body.tema-escuro .atividade-metricas article,
body.tema-escuro .card-atividade-aluno,
body.tema-escuro .estado-estudo,
body.tema-escuro .resumo-resposta,
body.tema-escuro .questao-resposta-card,
body.tema-escuro .feedback-resposta-card,
body.tema-escuro .trilha-modal-resumo {
    border-color: #34445f;
    background: #101827;
}
body.tema-escuro .mini-progresso {
    background: #22304a;
}
body.tema-escuro .alternativas-resposta label {
    border-color: #34445f;
    background: #172033;
}
body.tema-escuro .alternativas-resposta label:has(input:checked) {
    border-color: #5b73ff;
    background: #1a2d50;
}
body.tema-escuro .alternativas-resposta label span {
    background: #082f49;
    color: #bae6fd;
}
body.tema-escuro .linha-tempo-etapa::before {
    background: #34445f;
}
body.tema-escuro .linha-tempo-etapa::after {
    background: #172033;
}
@media (max-width: 850px) {
    .atividade-hero,
    .atividade-layout {
        grid-template-columns: 1fr;
    }
    .atividade-card-corpo,
    .atividade-card-rodape {
        align-items: flex-start;
        flex-direction: column;
    }
    .atividade-card-corpo .botao {
        width: 100%;
        text-align: center;
    }
    .mini-progresso {
        width: 100%;
        flex: 0 0 auto;
    }
    .alternativas-resposta label {
        grid-template-columns: auto 1fr;
    }
    .alternativas-resposta input {
        grid-row: 1;
    }
    .alternativas-resposta label span {
        grid-row: 1;
    }
    .alternativas-resposta label strong {
        grid-column: 1 / -1;
    }
}
@media (max-width: 560px) {
    .atividade-hero-principal,
    .atividade-metricas article,
    .card-atividade-aluno,
    .questao-resposta-card {
        border-radius: 14px;
        padding: 16px;
    }
    .filtros-atividades {
        width: 100%;
    }
    .filtros-atividades button {
        flex: 1;
    }
    .lista-etapas-aluno .etapa-item-aluno {
        grid-template-columns: 1fr;
    }
    .linha-tempo-etapa {
        display: none;
    }
}
