/* Modo tela cheia do chat do tutor (pedido do Gabriel, 2026-10-03): o card do chat sai do fluxo
   normal e cobre a janela inteira, acima de tudo (inclusive a barra de abas do celular), sem
   tocar na lógica de mensagens/envio/anexo, só contêiner e altura do histórico mudam. */
#chat-card.chat-full { position: fixed; inset: 0; z-index: 500; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); max-width: none; height: 100vh; animation: focoEntra .42s var(--spring) both; }
#chat-card.chat-full .tutor { flex: 1; min-height: 0; max-height: none; }
#chat-card.chat-full .ask { margin-top: 10px; }
#chat-expand-btn svg.ico-collapse { display: none; }
#chat-card.chat-full #chat-expand-btn svg.ico-expand { display: none; }
#chat-card.chat-full #chat-expand-btn svg.ico-collapse { display: inline; }
/* Animação de entrada/saída do Modo Foco (pedido do Gabriel, 2026-10-03): o corte seco de antes
   agora vira um fade + leve escala/slide, mesmo padrão de easing/duração do "subir" (sheetIn) já
   usado no resto do app. Na saída, uma classe transitória (chat-full-saindo) toca a animação
   reversa ANTES do JS desfazer o reanexo ao <body>, sem isso dava pra transicionar "position"
   (não é animável) e o fechamento continuaria em corte seco mesmo com o keyframe de entrada. */
@keyframes focoEntra { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
#chat-card.chat-full.chat-full-saindo { animation: focoSai .3s var(--ease) both; }
@keyframes focoSai { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.97) translateY(8px); } }
.modo-foco-tag { position: absolute; top: 10px; left: 50%; transform: translate(-50%, -8px); z-index: 10; background: var(--accent); color: var(--accent-contrast, #1a1400); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 7px 16px; border-radius: 99px; box-shadow: var(--shadow-lg); pointer-events: none; opacity: 0; animation: modoFocoTag 1.9s var(--ease) both; }
@keyframes modoFocoTag { 0% { opacity: 0; transform: translate(-50%, -10px); } 14% { opacity: 1; transform: translate(-50%, 0); } 72% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }
@media (prefers-reduced-motion: reduce) { #chat-card.chat-full, #chat-card.chat-full.chat-full-saindo, .modo-foco-tag { animation: none !important; } }
.typing { display: inline-flex; gap: 5px; padding: 15px 18px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); animation: pulso 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pulso { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.ov { position: fixed; inset: 0; z-index: 60; background: rgba(20,15,0,.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade .3s var(--ease) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(40px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet { background: var(--surface); width: min(760px, 100%); max-height: 92%; border-radius: 28px 28px 0 0; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: sheetIn .55s var(--spring) both; }
.sh-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 22px 12px; }
.sh-head h2 { font-size: 1.3rem; letter-spacing: -.02em; }
.sh-body { padding: 4px 22px 16px; overflow-y: auto; flex: 1; }
.sh-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 22px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--surface); border-radius: 0 0 28px 28px; }
.sh-foot #sh-cnt { font-weight: 600; font-size: .9rem; }
.sh-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld label { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.fld select, .fld input, .add-row input { width: 100%; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; }
.fld select:disabled { opacity: .7; }
.grp { margin-top: 20px; }
.grp-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 6px; }
.grp-h h3 { font-size: .86rem; font-weight: 700; } .grp-h small { color: var(--text-dim); font-weight: 500; }
.grp-h button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-size: .78rem; font-weight: 700; color: var(--accent-text); padding: 6px 12px; border-radius: 99px; background: var(--accent-soft); }
.opt { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; transition: background .2s; }
.opt:hover { background: var(--surface-2); }
.opt-lbl { display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center; cursor: pointer; min-width: 0; flex: 1; }
.opt-lbl .chk { margin-top: 0; }
.opt .c { font-family: var(--mono); font-size: .8rem; font-weight: 600; min-width: 52px; }
.opt .n { font-size: .92rem; min-width: 0; }
.opt .cr { font-size: .76rem; color: var(--text-dim); white-space: nowrap; }
.opt:has(input:checked) { background: var(--accent-soft); }
.feita-tg { flex: none; font-size: .72rem; font-weight: 700; padding: 6px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-dim); white-space: nowrap; }

/* selo do plano pago */
.pro-tag { display: inline-flex; align-items: center; gap: 3px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; padding: 3px 8px; border-radius: 99px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); text-transform: uppercase; }
.upsell { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin-top: 8px; }
.upsell p { font-size: .82rem; margin: 0; flex: 1; color: var(--accent-text); font-weight: 600; }

/* card de status do plano (Configurações) */
.presente-chip { display: inline-block; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); font-size: .76rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; margin-bottom: 12px; }
.plano-feats { display: flex; flex-direction: column; gap: 2px; }
.plano-feat { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; padding: 10px 4px; border-radius: 12px; }
.plano-feat + .plano-feat { border-top: 1px solid var(--border); }
.plano-feat i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); flex-shrink: 0; }
.plano-feat i svg { width: 16px; height: 16px; }
.plano-feat div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.plano-feat b { font-size: .86rem; font-weight: 700; }
.plano-feat span { font-size: .76rem; color: var(--text-dim); }
.plano-feat-marca { font-weight: 800; color: var(--ok); font-size: .9rem; }
.plano-feat.parcial i { background: var(--warn-soft); color: var(--warn); }
.plano-feat.parcial .plano-feat-marca { color: var(--warn); }
.plano-feat.locked { opacity: .6; }
.plano-feat.locked i { background: var(--surface-2); color: var(--text-dim); }
.plano-feat.locked .plano-feat-marca { color: var(--text-dim); font-size: 1rem; }
.plano-cta { background: var(--accent-soft); border-radius: 16px; padding: 14px 16px; margin-top: 14px; }
.plano-cta p { font-size: .84rem; color: var(--accent-text); font-weight: 600; margin: 0; }

/* Simulado */
.sim-q { padding: 14px 0; border-top: 1px solid var(--border); min-width: 0; }
.sim-q:first-child { border-top: none; padding-top: 0; }
.sim-q p.enun { font-weight: 600; font-size: .92rem; margin-bottom: 10px; overflow-wrap: anywhere; }
.sim-alt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer; font-size: .88rem; overflow-wrap: anywhere; min-width: 0; }
.sim-alt:hover { background: var(--surface-2); }
.sim-alt input { margin-top: 3px; accent-color: var(--accent); }
.sim-alt.certa { background: var(--ok-soft); }
.sim-alt.errada { background: var(--crit-soft); }
.sim-res { white-space: pre-line; line-height: 1.5; }
.sim-onde { font-size: .82rem; margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: rgba(220,60,60,.10); border: 1px solid rgba(220,60,60,.35); color: var(--text); overflow-wrap: anywhere; }
.sim-exp { font-size: .8rem; color: var(--text-dim); margin-top: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; overflow-wrap: anywhere; }
.sim-score { text-align: center; padding: 18px 0 10px; }
.sim-score b { font-size: 2.2rem; display: block; font-family: var(--mono); }
.sim-alt.ignorada { background: var(--surface-2); color: var(--text-dim); font-style: italic; }
.sim-opcoes-passo { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sim-alt-pick { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; box-sizing: border-box; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--border); cursor: pointer; font-size: .9rem; background: var(--surface-2); }
.sim-alt-pick input { margin-top: 3px; accent-color: var(--accent); }
.sim-alt-pick.sel { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }
.modal-card.sim-modal-lg { width: min(560px, 100%); max-height: 85vh; overflow-y: auto; }
.modal-card.sim-modal-run { width: min(920px, 96vw); max-height: 88vh; overflow-y: auto; text-align: left; }
.sim-run { display: grid; grid-template-columns: 150px 1fr; gap: 28px; }
.sim-run-side { border-right: 1px solid var(--border); padding-right: 20px; }
.sim-clock { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .92rem; font-weight: 700; color: var(--accent-text); }
.sim-nav-dots { display: flex; flex-wrap: wrap; gap: 8px; }
.sim-nav-dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--text-dim); cursor: pointer; }
.sim-nav-dot.feita { background: var(--ok-soft); color: var(--ok); }
.sim-nav-dot.atual { outline: 2px solid var(--accent); color: var(--text); }
@media (max-width: 640px) { .sim-run { grid-template-columns: 1fr; } .sim-run-side { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 14px; } }
.hist-sim { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; font: inherit; color: var(--text); cursor: pointer; margin-top: 6px; }
.hist-sim:hover { border-color: var(--border); }
.hist-sim-info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hist-sim-info b { font-weight: 600; font-size: .86rem; font-family: var(--font); }
.hist-sim-score { font-family: var(--mono); font-weight: 700; flex: none; }
.hist-sim-anel { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.hist-sim-anel b { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: .6rem; font-family: var(--mono); font-weight: 700; }

/* Foto do caderno vira resumo */
.apostila-sec { border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin-top: 10px; }
.apostila-sec h3 { font-size: .9rem; margin: 0 0 6px; }
.apostila-sec p { font-size: .86rem; color: var(--text-dim); margin: 0; white-space: pre-wrap; }
.apostila-sec ul { margin: 8px 0 0; padding-left: 18px; font-size: .84rem; }
.apostila-sec li { margin-bottom: 4px; }

/* Caderno de erros */
.cart { border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin-top: 10px; cursor: pointer; min-width: 0; }
.cart .pergunta { font-weight: 600; font-size: .88rem; overflow-wrap: anywhere; }
.cart .resposta { font-size: .84rem; color: var(--text-dim); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); overflow-wrap: anywhere; }
.cart-acoes { display: flex; gap: 8px; margin-top: 10px; }
.cart-acoes button { flex: 1; min-height: 44px; padding: 8px; border-radius: 10px; font-size: .8rem; font-weight: 700; }
.cart-acoes .ok { background: var(--ok-soft); color: var(--ok); }
.cart-acoes .no { background: var(--crit-soft); color: var(--crit); }
.msg-a-corpo { min-width: 0; max-width: 100%; }
.msg-errei { font-size: .72rem; font-weight: 700; color: var(--text-dim); background: var(--surface-2); padding: 4px 10px; border-radius: 99px; margin-top: 8px; display: inline-flex; align-items: center; cursor: pointer; position: relative; }
.msg-errei::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }

/* Modo SOS */
.sos-card { border: 2px solid var(--crit); border-radius: 18px; padding: 16px; background: var(--crit-soft); }
.sos-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 7px 0; font-size: .86rem; border-bottom: 1px solid var(--border); min-width: 0; }
.sos-item span { min-width: 0; overflow-wrap: anywhere; }
.sos-item b { white-space: nowrap; }
.sos-item:last-child { border-bottom: none; }
.sos-locked { text-align: center; padding: 28px 16px; }
.sos-locked-i { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--crit-soft); color: var(--crit); }
.sos-locked-i.ok { background: var(--ok-soft); color: var(--ok); }
.sos-locked-i svg { width: 28px; height: 28px; }
.sos-locked h2 { font-size: 1.05rem; margin-bottom: 8px; }
.sos-locked .sub { max-width: 420px; margin-left: auto; margin-right: auto; }
/* Estado vazio/bloqueado "rico": mesmo padrão do .sos-locked (ícone + título + texto), mas com
   hierarquia mais forte e um preview desabilitado do que vai aparecer quando tiver dado, usado no
   dia 1 (Simulado sem histórico/matéria, Caderno de erros sem cartão, SOS bloqueado/sem prova) pra
   parecer produto completo em vez de esqueleto vazio. Puramente visual, nenhuma lógica nova. */
.vazio-rico { text-align: center; padding: 30px 16px 26px; }
.vazio-rico-i { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.vazio-rico-i.crit { background: var(--crit-soft); color: var(--crit); }
.vazio-rico-i.ok { background: var(--ok-soft); color: var(--ok); }
.vazio-rico-i svg { width: 30px; height: 30px; }
.vazio-rico h2 { font-size: 1.08rem; margin: 0 0 8px; }
.vazio-rico .sub { max-width: 440px; margin: 0 auto; font-size: .86rem; }
.vazio-rico .btn { margin-top: 18px; }
.vazio-rico-preview { margin: 22px auto 0; max-width: 440px; text-align: left; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 16px; padding: 14px 16px; }
.vazio-rico-preview-mock { opacity: .55; filter: grayscale(.35); pointer-events: none; user-select: none; }
.vazio-rico-preview-tag { display: flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin-top: 12px; }
.vazio-rico-preview-tag svg { width: 13px; height: 13px; flex-shrink: 0; }
.opt.feita .feita-tg { background: var(--ok-soft); color: var(--ok); }
.opt.feita .n, .opt.feita .c { opacity: .6; }
.add { margin-top: 24px; padding: 16px; border-radius: 18px; background: var(--surface-2); }
.add h3 { font-size: .92rem; }
.add-row { display: grid; grid-template-columns: 90px 1fr 76px auto; gap: 8px; }
.add-row input { background: var(--surface); }
.vazio { color: var(--text-dim); font-size: .86rem; padding: 12px 0; margin: 0; }
@media (max-width: 560px) {
  .sh-row { grid-template-columns: 1fr; }
  .add-row { grid-template-columns: 1fr 76px; }
  .add-row #ad-n { grid-column: 1 / -1; grid-row: 2; }
  .add-row #ad-b { grid-column: 1 / -1; }
  .sheet { max-height: 94%; }
  .top { grid-template-columns: 1fr auto; } .top em { display: none; }
}
@media (min-width: 861px) { .ov { align-items: center; } .sheet { border-radius: 28px; max-height: 88%; } }
/* Chat do tutor em tela cheia (modo foco) num tablet/notebook: sem isso o texto esticava de ponta
   a ponta numa tela larga, difícil de ler. Centraliza o histórico e a barra de pergunta numa
   largura de leitura confortável; o fundo do card continua cobrindo a janela inteira. */
@media (min-width: 861px) {
  #chat-card.chat-full .card-head,
  #chat-card.chat-full .ia-caps,
  #chat-card.chat-full #retomar,
  #chat-card.chat-full .tutor,
  #chat-card.chat-full .ask { width: 100%; max-width: 820px; margin-left: auto; margin-right: auto; }
}

.pl-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pl-lista { margin: 10px 0 14px; padding-left: 18px; font-size: .84rem; color: var(--text-dim); } .pl-lista li { margin: 3px 0; }
.pl-h, .pl-row { display: grid; grid-template-columns: 62px minmax(120px,1fr) 62px 44px; gap: 8px; align-items: center; }
.pl-nota { display: flex; gap: 20px; flex-wrap: wrap; background: var(--surface-2); border-radius: 14px; padding: 12px 16px; margin: 4px 0 12px; }
.pl-nota-n { display: flex; flex-direction: column; gap: 2px; }
.pl-nota-n b { font-size: 1.5rem; }
.pl-nota-n span { font-size: .72rem; color: var(--text-dim); }
.pl-view-row { display: grid; grid-template-columns: 1fr auto 70px 80px; gap: 10px; align-items: center; padding: 9px 0; font-size: .86rem; }
.pl-view-row.rend-3col { grid-template-columns: 1fr 70px 90px; }
.pl-view-row.rend-4col { grid-template-columns: 1fr 90px 90px 120px; }
@media (max-width: 560px) { .pl-view-row.rend-4col { grid-template-columns: 1fr 70px 70px 90px; font-size: .82rem; } }
.pl-view-row.rend-3col { grid-template-columns: 1fr 90px 120px; }
@media (max-width: 560px) { .pl-view-row.rend-3col { grid-template-columns: 1fr 70px 90px; font-size: .82rem; } }
.pl-view-row + .pl-view-row { border-top: 1px solid var(--border); }
.pl-view-row .n em { font-style: normal; color: var(--text-dim); font-size: .78rem; }
.pl-view-row .d, .pl-view-row .p { color: var(--text-dim); font-size: .8rem; white-space: nowrap; }
.pl-view-row .pl-nt { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pl-view-row .pl-nt.pend { color: var(--text-dim); font-weight: 500; }
.pl-view-legenda { padding-bottom: 6px; }
.pl-view-legenda .d, .pl-view-legenda .pl-nt { color: var(--text-dim); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.cred-edit-btn { position: relative; width: 44px; height: 44px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim); cursor: pointer; font-size: .9rem; flex: none; }
.cred-edit-btn::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.cred-edit-btn:hover { background: var(--border); color: var(--text); }
.cred-input { width: 56px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--accent); background: var(--surface-2); color: var(--text); font: inherit; font-size: .82rem; text-align: center; }
@media (max-width: 560px) { .pl-view-row { grid-template-columns: 1fr auto; row-gap: 2px; } .pl-view-row .d { grid-column: 1; } .pl-view-row .p { grid-column: 2; text-align: right; } }
.pl-h { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); padding: 6px 0; }
.pl-row { padding: 8px 0; } .pl-row + .pl-row, .pl-h + .pl-row { border-top: 1px solid var(--border); } .pl-row [data-f=n] { grid-column: 1 / 4; grid-row: 1; font-weight: 600; } .pl-row .pl-x { grid-column: 4; grid-row: 1; justify-self: center; }
.pl-row input[type=text], .pl-row input[type=number], .pl-row input[type=date], .pl-camp input { width: 100%; min-width: 0; padding: 9px 8px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: .84rem; }
.pl-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); justify-self: center; }
.pl-x { position: relative; width: 28px; height: 28px; border-radius: 9px; color: var(--text-dim); font-size: 1.1rem; line-height: 1; } .pl-x:hover { background: var(--crit-soft); color: var(--crit); }
.pl-x::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.pl-camp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; } .pl-camp .fld { min-width: 0; }
.pl-camp .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .pl-camp { grid-template-columns: 1fr; } }
.avisos { display: grid; gap: 10px; margin-top: 16px; }
.nt-h { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.nt-h b { font-size: .95rem; }
.nt-h .p { font-style: normal; font-weight: 800; font-family: var(--mono); font-size: .76rem; padding: 2px 9px; border-radius: 99px; margin-left: 6px; }
.p { font-style: normal; font-weight: 800; font-family: var(--mono); font-size: .76rem; padding: 2px 9px; border-radius: 99px; }
.p.red { background: var(--crit); color: #fff; } .p.yel { background: var(--accent); color: var(--accent-ink); }
.nt { display: flex; align-items: center; gap: 14px; border-radius: 18px; padding: 12px 16px; border: 1px solid var(--border); animation: subir .6s var(--spring) both; }
.nt.red { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 45%, transparent); }
.nt.yellow { background: var(--accent-soft); }
.nt-i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.nt.red .nt-i { background: var(--crit); color: #fff; animation: pulsoVermelho 2.2s ease-out infinite; }
.nt.yellow .nt-i { background: var(--accent); color: var(--accent-ink); }
@keyframes pulsoVermelho { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--crit) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 12px transparent; } }
.nt > div:nth-child(2) { flex: 1; min-width: 0; } .nt b { font-size: .92rem; } .nt p { font-size: .8rem; color: var(--text-dim); }
.nt-a { display: flex; align-items: center; gap: 4px; } .nt.red .link { color: var(--crit); }
.nt-x { position: relative; width: 28px; height: 28px; border-radius: 9px; color: var(--text-dim); font-size: 1.1rem; } .nt-x:hover { background: var(--surface-2); }
.nt-x::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.nav button.alerta::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--crit); margin-left: auto; }
.tabbar button { position: relative; }
.tabbar button.alerta::after { content: ""; position: absolute; top: 6px; right: calc(50% - 22px); width: 9px; height: 9px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 2px var(--surface); }
.cfg-r { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
button.badge { cursor: pointer; }
.avisos { margin-top: 0; }
.nt-g { display: grid; gap: 10px; margin-bottom: 26px; }
.nt-g h2 { font-size: 1rem; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.nav button[data-n]::after { content: attr(data-n); margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; font: 800 .72rem var(--mono); background: var(--accent); color: var(--accent-ink); }
.nav button[data-cor="red"]::after, .tabbar button[data-cor="red"]::after { background: var(--crit); color: #fff; }
.nav button[data-n="0"]::after, .tabbar button[data-n="0"]::after { display: none; }
.tabbar button[data-n]::after { content: attr(data-n); position: absolute; top: 2px; right: calc(50% - 28px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; font: 800 .64rem var(--mono); background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 2px var(--surface); }
.nt { cursor: pointer; transition: transform .3s var(--spring), box-shadow .3s; }
.nt:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.set-row.flash { border-radius: 14px; animation: flash 2s ease-out; }
@keyframes flash { 0%, 55% { background: var(--crit-soft); box-shadow: 0 0 0 8px var(--crit-soft); } 100% { background: transparent; box-shadow: 0 0 0 8px transparent; } }
.gate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; overflow-y: auto; background: radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 55%), var(--bg); }
.gate-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 32px 28px; box-shadow: var(--shadow-lg); animation: subir .7s var(--spring) both; }
.gate-card h1 { font-size: 1.7rem; margin-top: 18px; } .gate-card .sub { margin-top: 8px; }
/* Guia de primeiro acesso — tour "spotlight": #guia-spot recorta um buraco no overlay escuro
   sobre o elemento real (truque de box-shadow gigante, sem clip-path), #guia-balloon flutua perto
   dele. Body ganha .guia-ativo enquanto o tour está aberto, só pra desligar a animação de entrada
   dos cards (.view.on > *): sem isso, o retângulo medido via getBoundingClientRect ficaria errado
   enquanto o card ainda está animando (translateY/scale). */
body.guia-ativo .view.on > * { animation: none !important; }
#guia { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.guia-spot { position: fixed; z-index: 301; border-radius: 14px; pointer-events: none; transition: top .32s var(--ease), left .32s var(--ease), width .32s var(--ease), height .32s var(--ease), box-shadow .32s var(--ease); }
.guia-balloon { position: fixed; z-index: 302; pointer-events: auto; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 22px 22px 18px; box-shadow: var(--shadow-lg); text-align: center; transition: top .32s var(--ease), left .32s var(--ease); }
.guia-balloon.guia-sem-anim { transition: none; }
.guia-top { display: flex; align-items: center; justify-content: space-between; }
.guia-ico { width: 60px; height: 60px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin: 14px auto 16px; }
.guia-ico svg { width: 28px; height: 28px; }
.guia-balloon h1 { font-size: 1.2rem; margin-top: 0; }
.guia-balloon .sub { margin-top: 8px; }
.guia-dots { display: flex; gap: 6px; justify-content: center; margin: 18px 0 4px; }
.guia-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--border); transition: background .2s, transform .2s; }
.guia-dot.on { background: var(--accent); transform: scale(1.3); }
.guia-foot { display: flex; gap: 10px; margin-top: 16px; }
.guia-foot .btn { flex: 1; }
.gate-btn { width: 100%; justify-content: center; padding: 14px 18px; font-size: 1rem; }
.gate-aceite { display: flex; align-items: flex-start; gap: 10px; font-size: .8rem; color: var(--text-dim); margin: 16px 0 12px; padding: 4px 0; cursor: pointer; text-align: left; }
.gate-aceite a { color: var(--accent-text); font-weight: 600; }
.chk { display: inline-block; width: 20px; height: 20px; border-radius: 7px; border: 1.5px solid var(--border); background: var(--surface-2); flex: none; margin-top: 1px; position: relative; transition: background .2s, border-color .2s; }
.chk::after { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translateY(-1px); opacity: 0; transition: opacity .15s; }
.chk[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.chk[aria-checked="true"]::after { opacity: 1; }
.gate-btn:disabled { opacity: .5; cursor: not-allowed; }
.gate-google { width: 100%; display: flex; justify-content: center; }
.gate-google[data-bloqueado="1"] { opacity: .45; pointer-events: none; filter: grayscale(.4); }
.fld-static { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); font-size: .95rem; }
.anos { display: flex; flex-wrap: wrap; gap: 8px; }
.anos button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 16px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font: 600 .88rem var(--mono); transition: all .3s var(--spring); }
.anos button:hover { background: var(--accent-soft); }
.anos button[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.06); }
.conn { border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; margin-top: 12px; text-align: left; }
.conn-t { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.conn-t h3 { font-size: .98rem; } .conn-t p { font-size: .78rem; color: var(--text-dim); }
.conn input[type=text], .conn input[type=password] { width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: .86rem; }
select { appearance: none; -webkit-appearance: none; width: 100%; padding: 11px 36px 11px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%236c6448" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 12px center / 16px; background-color: var(--surface-2); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.conn-m { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 12px; }
.chipm { font-family: var(--mono); font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); }
.cmd-box { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 9px 8px 9px 12px; }
.cmd-box code { flex: 1; min-width: 0; font-family: var(--mono); font-size: .82rem; color: var(--text); background: none; white-space: pre-wrap; word-break: break-all; }
.cmd-copy { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 700 .74rem var(--mono); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.cmd-copy:hover { background: var(--accent-soft); }
.cmd-copy.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.conn.flash { animation: flashc 2s ease-out; }
@keyframes flashc { 0%, 55% { box-shadow: 0 0 0 6px var(--crit-soft); background: var(--crit-soft); } 100% { box-shadow: 0 0 0 6px transparent; background: transparent; } }
.cnx-card { width: min(520px, 100%); }
.ap-in { width: 140px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: .88rem; }
.dados { margin: 14px 0; display: grid; gap: 10px; }
.dados div { background: var(--surface-2); border-radius: 14px; padding: 10px 14px; }
.dados dt { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.dados dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.mk-l { stroke: var(--text); } .mk-s { fill: var(--text); } .mk-w { fill: var(--surface); } .mk-f { fill: var(--accent); stroke: var(--text); }
.ia-tag { display: flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
.ia-caps { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 14px; }
.ia-caps span { font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-dim); }
.msg-a { display: flex; align-items: flex-end; gap: 8px; align-self: flex-start; max-width: 96%; }
.msg-a .msg.a { max-width: none; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.anx { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; background: rgba(31, 23, 0, .13); padding: 4px 10px; border-radius: 99px; overflow-wrap: anywhere; }
ol.qs { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.qacoes { display: grid; gap: 6px; margin: 10px 0; }
.qpick { display: flex; align-items: center; min-height: 44px; box-sizing: border-box; text-align: left; width: 100%; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: .86rem; line-height: 1.35; transition: background .2s, transform .3s var(--spring); }
.qpick:hover { background: var(--accent-soft); transform: translateX(3px); }
.outra { font-style: normal; font-family: var(--mono); font-size: .68rem; font-weight: 700; background: var(--accent-soft); color: var(--accent-text); padding: 1px 7px; border-radius: 99px; margin-left: 6px; }
.ask .icon-btn { flex: none; }
body.real .pill-demo { display: none; }
body.real .gcal, body.real #cfg-material, body.real .card:has(#mat-l) { display: none; }
.pill-piloto { display: inline-block; background: var(--accent-soft); color: var(--accent-text); padding: 3px 10px; border-radius: 99px; font-weight: 700; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.msg.a p { margin: 0 0 8px; } .msg.a p:last-child { margin: 0; }
.tabbar { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 99px; font-weight: 600; font-size: .86rem; opacity: 0; pointer-events: none; transition: all .45s var(--spring); z-index: 40; max-width: calc(100% - 32px); text-align: center; }
.pwa-aviso { position: fixed; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 50; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 14px 44px 14px 16px; display: flex; align-items: center; gap: 10px; }
.apo-provas { margin-top: 18px; } .apo-provas-lista { display: grid; gap: 6px; max-height: 420px; overflow: auto; margin-top: 10px; } .apo-prova { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; font: inherit; cursor: pointer; } .apo-prova b { font-size: .9rem; } .apo-prova span { grid-row: 2; font-size: .78rem; color: var(--text-dim); } .apo-prova i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: .78rem; font-weight: 700; color: var(--accent-text); } .apo-prova.bloq { opacity: .8; } .apo-provas-cta { background: var(--accent-soft); border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .apo-provas-cta p { margin: 0; flex: 1 1 200px; font-size: .86rem; } .apo-prova-int { border-color: var(--accent, #f5b700); background: var(--accent-soft); } .apo-prova-int strong { color: var(--text); } .apo-provas-int { max-height: none; margin-bottom: 4px; } .apo-provas-fonte { margin-top: 10px; font-size: .76rem; } .apo-provas-fonte a { color: var(--accent-text); font-weight: 600; }
.prox-prova .pp-acoes { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-width: 420px; } .prox-prova .pp-acoes .btn, .prox-prova .pp-acoes .cta { width: 100%; justify-content: center; margin-top: 0; } .prox-prova .pp-classroom { margin-top: 12px; font-size: .86rem; color: var(--accent-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pwa-aviso-t { flex: 1; min-width: 0; } .pwa-aviso-t b { font-size: .88rem; } .pwa-aviso-t p { font-size: .74rem; color: var(--text-dim); margin: 1px 0 0; }
.pwa-aviso .btn { flex: none; min-height: 44px; padding: 10px 18px; font-size: .82rem; display: inline-flex; align-items: center; justify-content: center; }
.pwa-x { position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--text-dim); line-height: 1; }
@media (min-width: 861px) { .pwa-aviso { display: none !important; } }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding-top: 22px; padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); position: fixed; left: 8px; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--glass); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); border: 1px solid var(--border); border-radius: 24px; padding: 6px 2px; box-shadow: var(--shadow-lg); z-index: 30; }
  .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 48px; padding: 7px 1px; border-radius: 18px; font-size: .6rem; font-weight: 700; color: var(--text-dim); transition: all .35s var(--spring); white-space: nowrap; }
  .tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .tabbar svg { width: 19px; height: 19px; flex: none; }
  .tabbar button[aria-current="page"] { background: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
  .two { grid-template-columns: 1fr; }
  /* Decisão revertida por pedido explícito do Gabriel em 2026-10-03: antes, a conversa ficava
     DEPOIS dos outros recursos no celular de propósito ("empilha antes do resto" os cards de
     Simulado/Pavio queima/caderno de erros), pra não esconder esses recursos atrás de uma
     conversa longa. Agora o Chat é a função central do app e precisa aparecer em destaque, no
     topo, por isso a ordem natural do DOM (chat primeiro, grid de recursos depois) é mantida
     também no celular, sem inverter mais nada aqui. Regra deixada comentada (não apagada) só
     como contexto histórico do motivo original. */
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .count { justify-self: start; display: flex; align-items: baseline; gap: 10px; padding: 12px 20px; }
  .count b { font-size: 2.4rem; }
  .sim { padding-left: 4px; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi:first-child { grid-column: 1 / -1; }
  .mat { grid-template-columns: auto 1fr; }
  .mat .badge { grid-column: 2; justify-self: start; }
  .card { padding: 18px; border-radius: 20px; }
  #card-calendario-mes { padding: 18px 5px; }
  .dow, .days { gap: 3px; }
  .gcal .btn { flex: 1 1 100%; justify-content: center; }
  .tabbar button { font-size: .56rem; padding: 7px 0; }
  .day { padding: 4px 5px; border-radius: 11px; aspect-ratio: 1 / 1; }
  .msg { max-width: 96%; }
  /* A tabela do plano de disciplina (peso/data/nota/prova) tinha colunas fixas largas demais
     e forçava scroll horizontal na aba Estudos inteira em telas pequenas. */
  .pl-h, .pl-row { grid-template-columns: 44px minmax(64px,1fr) 40px 32px; gap: 5px; font-size: .78rem; }
  .pl-row input { padding: 8px 6px; font-size: .78rem; }
}
/* Tablet landscape / notebook em diante (auditoria de responsividade pedida pelo Gabriel,
   2026-10-03): com a barra lateral fixa de 248px, o conteúdo já tem espaço de sobra a partir
   daqui. Cards que antes ficavam travados numa largura de celular/tablet retrato (520-640px)
   dentro de um .wrap de até 1080px passam a usar esse espaço, em grade de 2 colunas quando são
   vários cards relacionados em sequência, ou com mais respiro quando são um card isolado. Nada
   aqui mexe no comportamento abaixo de 1024px (mobile já auditado em sessão anterior). */
@media (min-width: 1024px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .card-solo-640 { max-width: 760px; }
  .card-solo-520 { max-width: 640px; }
  .cardstack-cap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .cardstack-cap > .card { max-width: none; }
  /* Matérias: testamos virar a lista lateral (Pavio queima, revisões, simulado, SOS, caderno de
     erros, apostila, material, provas antigas) em 2 colunas, mas a coluna da direita (1fr de um
     1.55fr/1fr) é estreita demais pra isso, o texto quebrava feio e os botões cortavam. Em vez
     disso, o chat (que tinha um teto fixo de altura bem menor que essa lista inteira, sobrando
     bastante vazio embaixo dele) ganha mais altura em telas largas, pra ficar mais parelho com a
     lista ao lado sem espremer os cards. */
  /* O chat trava na altura da coluna lateral (contain: size tira a altura própria dele do cálculo da linha):
     ele não cresce com a conversa, as mensagens rolam dentro dele. */
  #v-estudos .two { align-items: stretch; min-height: 560px; }
  #v-estudos #chat-card:not(.chat-full) { contain: size; display: flex; flex-direction: column; }
  #v-estudos #chat-card:not(.chat-full) .tutor { flex: 1; min-height: 0; max-height: none; }
  #v-estudos #chat-card:not(.chat-full) .ask { margin-top: auto; }
}
/* Onda 1 (23_PLANO, 20/11/2026): barra de 5 itens, atalhos no topo do celular, tablet com barra lateral em ícones,
   alvos de toque >= 44 px. Texto >= 14 px no celular/tablet: garantirFonteMin() no script. */
.topo-mob { display: none; }
.tabbar button[data-n="0"]::after, .nav button[data-n="0"]::after, .topo-mob button[data-n="0"]::after { display: none !important; }
.nav-sep { display: block; height: 1px; background: var(--border); margin: 8px 12px; }
.sp-lista { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: sp; }
.sp-lista li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); counter-increment: sp; }
.sp-lista li::before { content: counter(sp); font: 800 .9rem var(--mono); color: var(--accent-text); min-width: 18px; }
.sp-lista li > div { flex: 1; min-width: 0; } .sp-lista li b { display: block; font-size: .92rem; } .sp-lista li span { font-size: .8rem; color: var(--text-dim); }
.sp-lista li.trancado { opacity: .6; } .sp-lista li .btn { flex: none; }
.demo-secoes { margin: 0 0 12px; padding-left: 20px; line-height: 1.6; }
.demo-trecho { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; line-height: 1.6; margin: 0 0 10px; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
@media (max-width: 1024px) {
  .main button, .main .btn, .main a.btn, .main select, .main input:not([type=checkbox]):not([type=radio]):not([type=range]), .modal-card .btn, .modal-card button, .sheet button, .chip, .chips button { min-height: 44px; }
  .main .icon-btn, .pwa-x { min-width: 44px; min-height: 44px; }
  .main button.link, .main a.link { display: inline-flex; align-items: center; }
  .missao-chk, .nt-x, .pl-x, .cred-edit-btn, .semana-bloco button { min-width: 44px !important; min-height: 44px !important; }
  #v-config .grid, #v-config .two > * { min-width: 0; } #cfg-mats p { overflow-wrap: anywhere; }
}
@media (max-width: 767px) {
  .tabbar { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; left: 4px !important; right: 4px !important; padding: 6px 1px !important; }
  .tabbar button, .tabbar button span { font-size: 14px !important; letter-spacing: -.035em; }
  .tabbar button { padding: 6px 0 !important; min-height: 54px; border-radius: 16px !important; }
  .topo-mob { display: flex; justify-content: flex-end; gap: 8px; margin: -8px 0 6px; }
  .topo-mob button { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 700; color: var(--text-dim); }
  .topo-mob button[aria-current="page"] { color: var(--text); border-color: var(--accent); }
  .topo-mob svg { width: 18px; height: 18px; }
  .topo-mob button[data-n]::after { content: attr(data-n); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; font: 800 12px var(--mono); background: var(--accent); color: var(--accent-ink); }
  .topo-mob button[data-cor="red"]::after { background: var(--crit); color: #fff; }
  .topo-mob button[data-n="0"]::after { display: none; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .app { grid-template-columns: 76px 1fr !important; }
  .side { display: flex !important; padding: 18px 10px; gap: 16px; overflow-y: auto; }
  .side .brand > div:not(:first-child), .side .brand b, .side .brand span, #side-plano, #side-pago, .side-foot { display: none !important; }
  .side .brand { justify-content: center; padding: 0; }
  .nav button { justify-content: center; padding: 0; min-height: 52px; position: relative; }
  .nav button span { display: none; }
  .nav button svg { width: 24px; height: 24px; }
  .nav button[data-n]::after { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 12px; }
  .nav-sep { margin: 6px 8px; }
  .tabbar { display: none !important; }
  .main { padding-bottom: 32px !important; }
  .kpis { grid-template-columns: repeat(4, 1fr) !important; }
  .kpis .kpi:first-child { grid-column: auto !important; }
  .pavio-pergunta, .sec-lado, .apo-lado { bottom: 20px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.splash { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: grid; place-items: center; }
.splash .logo { width: 64px; height: 64px; border-radius: 20px; animation: pulsa 1.3s ease-in-out infinite; }
@keyframes pulsa { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.92); } }
