/*
 * CodeLab — Folha de estilos principal (tema escuro estilo VS Code)
 */
:root {
  --bg-0: #181818;
  --bg-1: #1e1e1e;
  --bg-2: #252526;
  --bg-3: #2d2d30;
  --bg-4: #37373d;
  --borda: #333337;
  --txt: #e4e4e7;
  --txt-suave: #9ca3af;
  --azul: #007acc;
  --azul-claro: #38bdf8;
  --verde: #16a34a;
  --verde-claro: #4ade80;
  --amarelo: #eab308;
  --vermelho: #ef4444;
  --roxo: #8b5cf6;
  --fonte-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fonte-mono: Consolas, "JetBrains Mono", "Fira Code", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--bg-1);
  color: var(--txt);
  font-family: var(--fonte-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--azul-claro);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.oculto { display: none !important; }
.suave { color: var(--txt-suave); }
.P { font-size: 12px; }

/* Bloqueio de seleção e cópia fora do CodeMirror */
body.bloqueio-copia,
body.bloqueio-copia *:not(.CodeMirror):not(.CodeMirror *) {
  -webkit-user-select: none !important;
  user-select: none !important;
}
body.bloqueio-copia .CodeMirror,
body.bloqueio-copia .CodeMirror * {
  -webkit-user-select: text !important;
  user-select: text !important;
}

/* Botões e controles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-3);
  color: var(--txt);
  border: 1px solid var(--borda);
  border-radius: 6px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
.btn:hover { background: var(--bg-4); }
.btn:active { transform: translateY(1px); }
.btn.P { padding: 4px 10px; font-size: 12px; border-radius: 5px; }
.btn.grande { padding: 11px 18px; font-size: 14px; width: 100%; }
.btn.primario { background: var(--azul); border-color: #0e639c; color: #fff; }
.btn.primario:hover { background: #1177bb; }
.btn.verde { background: var(--verde); border-color: #15803d; color: #fff; }
.btn.verde:hover { background: #15803d; }
.btn.perigo { background: #991b1b; border-color: #b91c1c; color: #fff; }
.btn.perigo:hover { background: #b91c1c; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-3);
  border: 1px solid var(--borda);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.alerta {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  border: 1px solid var(--borda);
  background: var(--bg-2);
}
.alerta.erro { background: rgba(239, 68, 68, 0.15); border-color: #ef4444; color: #fca5a5; }
.alerta.ok   { background: rgba(22, 163, 74, 0.18); border-color: #22c55e; color: #86efac; }

.campo {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.campo span { font-weight: 600; font-size: 13px; }
.campo small { color: var(--txt-suave); font-size: 12px; }
.campo input, .campo select, .input-padrao {
  background: var(--bg-0);
  color: var(--txt);
  border: 1px solid var(--borda);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
}
.campo input:focus, .campo select:focus, .input-padrao:focus {
  border-color: var(--azul);
}

.logo-marca {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-weight: 800;
  font-family: var(--fonte-mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.logo-marca.P { width: 28px; height: 28px; font-size: 12px; border-radius: 6px; }

/* ==================== TELA DE LOGIN ==================== */
.tela-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 70%);
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.login-topo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.login-topo h1 { font-size: 22px; }
.login-topo p { color: var(--txt-suave); font-size: 13px; }
.abas-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-0);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.abas-login button {
  background: transparent;
  color: var(--txt-suave);
  border: 0;
  padding: 8px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}
.abas-login button.ativa {
  background: var(--bg-3);
  color: #fff;
}
.login-rodape {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--borda);
  text-align: center;
  font-size: 12px;
}

/* ==================== PAINEL DO ALUNO ==================== */
.topo {
  height: 52px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--borda);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topo-esq, .topo-dir { display: flex; align-items: center; gap: 10px; }
.sep { color: #555; }

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.hero-progresso {
  background: linear-gradient(135deg, #1e293b, #1e1e2e);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.rotulo {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--azul-claro);
  font-weight: 700;
  margin-bottom: 4px;
}
.hero-progresso h1 { font-size: 28px; margin-bottom: 8px; }
.hero-progresso h1 small { font-size: 15px; font-weight: 400; color: var(--txt-suave); }
.barra {
  width: 100%;
  max-width: 440px;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.barra > div {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
  transition: width 0.3s;
}
.cta-continuar {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 260px;
}
.cta-titulo { font-weight: 700; margin-bottom: 10px; font-size: 15px; }

.atalhos-modulos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.pill {
  background: var(--bg-2);
  border: 1px solid var(--borda);
  color: var(--txt);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
}
.pill:hover { border-color: var(--azul); }
.pill.completo { border-color: #16a34a; background: rgba(22, 163, 74, 0.12); }
.pill small { color: var(--txt-suave); margin-left: 4px; }

.bloco-modulo {
  background: var(--bg-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.modulo-cab {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--borda);
}
.modulo-cab h2 { font-size: 18px; margin-bottom: 3px; }
.modulo-cab p { color: var(--txt-suave); font-size: 13px; }
.modulo-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.tags-arq { display: inline-flex; gap: 4px; }
.tag-arq {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--fonte-mono);
}
.tag-arq.html { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.tag-arq.css  { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.tag-arq.js   { background: rgba(234, 179, 8, 0.2);  color: #facc15; }

.grade-exercicios {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.card-ex {
  background: var(--bg-1);
  border: 1px solid var(--borda);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--txt);
  text-decoration: none !important;
  transition: transform 0.1s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.card-ex:hover {
  border-color: var(--azul-claro);
  transform: translateY(-1px);
}
.card-ex.ok { border-left: 3px solid #22c55e; }
.card-ex.andamento { border-left: 3px solid #eab308; }
.card-ex.proximo { border-color: #38bdf8; box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3); }
.card-ex-topo { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.card-ex .num { font-family: var(--fonte-mono); color: var(--txt-suave); font-weight: 700; }
.card-ex .st { color: var(--txt-suave); }
.card-ex .st.ok { color: #4ade80; font-weight: 700; }
.card-ex .st.and { color: #facc15; font-weight: 600; }
.card-ex .st.prox { color: #38bdf8; font-weight: 700; }
.card-ex-titulo { font-weight: 600; font-size: 13px; line-height: 1.35; }

/* ==================== EDITOR ESTILO VS CODE ==================== */
.tela-editor {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.vscode-titlebar {
  height: 44px;
  background: #181818;
  border-bottom: 1px solid var(--borda);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.tb-esq, .tb-centro, .tb-dir {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mod-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--txt-suave);
}
.seletor-ex {
  background: var(--bg-2);
  color: var(--txt);
  border: 1px solid var(--borda);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
  max-width: 290px;
}
.pill-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--txt-suave);
  font-weight: 600;
}
.pill-status.ok {
  background: rgba(22, 163, 74, 0.2);
  color: #4ade80;
  border: 1px solid #16a34a;
}

.vscode-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 370px minmax(360px, 1.15fr) minmax(320px, 1fr);
  min-height: 0;
}

/* Coluna 1: Guia */
.painel-guia {
  background: var(--bg-2);
  border-right: 1px solid var(--borda);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.abas-guia {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--borda);
  background: var(--bg-0);
  flex-shrink: 0;
}
.abas-guia button {
  background: transparent;
  color: var(--txt-suave);
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.abas-guia button.ativa {
  color: #fff;
  background: var(--bg-2);
  border-bottom-color: var(--azul);
}
.mini-badge {
  background: var(--bg-4);
  color: var(--txt);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
}
.mini-badge.tudo-ok {
  background: #16a34a;
  color: #fff;
}

.conteudo-guia {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.guia-cab { margin-bottom: 12px; }
.num-ex {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--azul-claro);
  font-weight: 700;
}
.guia-cab h2 { font-size: 18px; line-height: 1.3; margin-top: 2px; }
.tag-herdado {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Prosa / Markdown */
.prosa p { margin-bottom: 10px; color: #d4d4d8; }
.prosa h4 { margin: 14px 0 6px; font-size: 14px; color: #fff; }
.prosa ul, .prosa ol { margin: 8px 0 12px 20px; }
.prosa li { margin-bottom: 5px; }
.prosa code {
  font-family: var(--fonte-mono);
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.08);
  color: #f9a8d4;
  padding: 1px 5px;
  border-radius: 4px;
}
.prosa pre.codigo, .caixa-exemplo pre.codigo {
  position: relative;
  background: #141416;
  border: 1px solid var(--borda);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 8px 0 12px;
  overflow-x: auto;
}
.prosa pre.codigo code, .caixa-exemplo pre.codigo code {
  background: none;
  color: #e4e4e7;
  padding: 0;
  font-size: 12px;
  white-space: pre;
}
.prosa pre.codigo .lang {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 10px;
  color: var(--txt-suave);
  font-family: var(--fonte-mono);
}
.callout {
  background: rgba(56, 189, 248, 0.1);
  border-left: 3px solid var(--azul-claro);
  padding: 9px 12px;
  border-radius: 0 6px 6px 0;
  margin: 10px 0;
  font-size: 13px;
}

.caixa-exemplo {
  background: var(--bg-1);
  border: 1px solid var(--borda);
  border-radius: 8px;
  padding: 12px;
  margin-top: 14px;
}
.caixa-exemplo-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.abas-mini details {
  margin-top: 6px;
}
.abas-mini summary {
  cursor: pointer;
  font-family: var(--fonte-mono);
  font-size: 12px;
  color: var(--txt-suave);
  padding: 3px 0;
}
.rodape-aprender { margin-top: 16px; }

/* Checklist */
.bloco-checklist {
  background: var(--bg-1);
  border: 1px solid var(--borda);
  border-radius: 8px;
  padding: 12px;
  margin-top: 14px;
}
.checklist-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.lista-testes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lista-testes li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--borda);
  font-size: 13px;
}
.lista-testes li .icone-teste {
  font-weight: 800;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: var(--txt-suave);
}
.lista-testes li.ok {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(22, 163, 74, 0.12);
}
.lista-testes li.ok .icone-teste { color: #4ade80; }
.lista-testes li.falha {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
}
.lista-testes li.falha .icone-teste { color: #f87171; }

.bloco-dica { margin-top: 14px; }
.caixa-dica {
  margin-top: 8px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
}

/* Coluna 2: Editor de código */
.painel-codigo {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg-1);
  border-right: 1px solid var(--borda);
}
.barra-editor {
  height: 36px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--borda);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 0;
  flex-shrink: 0;
}
.explorador-inline {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.rotulo-exp {
  font-size: 10px;
  font-weight: 700;
  color: var(--txt-suave);
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.06em;
}
.aba-arq {
  background: #2d2d2d;
  color: var(--txt-suave);
  border: 0;
  border-right: 1px solid var(--borda);
  border-top: 2px solid transparent;
  padding: 0 14px;
  font-family: var(--fonte-mono);
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.aba-arq.ativa {
  background: var(--bg-1);
  color: #fff;
  border-top-color: var(--azul);
}
.atalhos-dica kbd {
  background: var(--bg-3);
  border: 1px solid var(--borda);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 10px;
  font-family: var(--fonte-mono);
}

.aviso-ligacao {
  background: rgba(234, 179, 8, 0.16);
  border-bottom: 1px solid rgba(234, 179, 8, 0.4);
  color: #fde047;
  padding: 6px 12px;
  font-size: 12px;
}

.area-codemirror {
  flex: 1;
  min-height: 0;
  position: relative;
}
.CodeMirror {
  position: absolute;
  inset: 0;
  height: 100% !important;
  font-family: var(--fonte-mono);
  font-size: 13.5px;
  line-height: 1.55;
  background: #1e1e1e;
  color: #d4d4d4;
}
.CodeMirror-gutters {
  background: #1e1e1e;
  border-right: 1px solid #2b2b2b;
}
.CodeMirror-linenumber { color: #6e7681; }
.CodeMirror-cursor { border-left: 2px solid #aeafad; }
.CodeMirror-selected { background: #264f78 !important; }
.CodeMirror-focused .CodeMirror-selected { background: #264f78 !important; }
.CodeMirror-activeline-background { background: rgba(255, 255, 255, 0.04); }
.CodeMirror-matchingtag { background: rgba(14, 99, 156, 0.35); }
.cm-s-default .cm-tag { color: #569cd6; }
.cm-s-default .cm-attribute { color: #9cdcfe; }
.cm-s-default .cm-string { color: #ce9178; }
.cm-s-default .cm-keyword { color: #c586c0; }
.cm-s-default .cm-def { color: #dcdcaa; }
.cm-s-default .cm-variable { color: #9cdcfe; }
.cm-s-default .cm-variable-2 { color: #9cdcfe; }
.cm-s-default .cm-property { color: #9cdcfe; }
.cm-s-default .cm-number { color: #b5cea8; }
.cm-s-default .cm-atom { color: #569cd6; }
.cm-s-default .cm-comment { color: #6a9955; }
.cm-s-default .cm-qualifier { color: #d7ba7d; }
.cm-s-default .cm-builtin { color: #d7ba7d; }

/* Console */
.painel-console {
  border-top: 1px solid var(--borda);
  background: #181818;
  flex-shrink: 0;
}
.console-topo {
  height: 30px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-2);
}
.console-toggle, .btn-limpar-console {
  background: none;
  border: 0;
  color: var(--txt-suave);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.console-saida {
  display: none;
  height: 135px;
  overflow-y: auto;
  padding: 6px 10px;
  font-family: var(--fonte-mono);
  font-size: 12px;
}
.painel-console.aberto .console-saida { display: block; }
.console-vazio { color: #6b7280; font-style: italic; }
.linha-console {
  padding: 3px 6px;
  border-bottom: 1px solid #262626;
  white-space: pre-wrap;
  word-break: break-word;
}
.linha-console.info { color: #7dd3fc; }
.linha-console.warn { color: #fde047; background: rgba(234, 179, 8, 0.08); }
.linha-console.erro, .linha-console.error { color: #fca5a5; background: rgba(239, 68, 68, 0.12); }

/* Coluna 3: Preview (Live Server) */
.painel-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg-2);
}
.barra-navegador {
  height: 36px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--borda);
  flex-shrink: 0;
}
.bolinhas { display: inline-flex; gap: 5px; }
.bolinhas i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #ef4444; }
.bolinhas i:nth-child(2) { background: #eab308; }
.bolinhas i:nth-child(3) { background: #22c55e; }
.url-falsa {
  flex: 1;
  background: var(--bg-0);
  border: 1px solid var(--borda);
  border-radius: 5px;
  padding: 3px 9px;
  font-family: var(--fonte-mono);
  font-size: 11.5px;
  color: var(--txt-suave);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  flex-shrink: 0;
}
.moldura-iframe {
  flex: 1;
  background: #ffffff;
  min-height: 0;
}
#iframe-preview {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}
.vscode-statusbar {
  height: 24px;
  background: var(--azul);
  color: #fff;
  padding: 0 10px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

/* Modal */
.modal-fundo {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-card {
  background: var(--bg-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 26px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.modal-icone { font-size: 42px; margin-bottom: 8px; }
.modal-card h2 { font-size: 20px; margin-bottom: 8px; }
.modal-card p { color: var(--txt-suave); margin-bottom: 18px; }
.modal-acoes { display: flex; gap: 10px; justify-content: center; }

/* ==================== PORTAL DO PROFESSOR ==================== */
.painel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 16px;
}
.stat-card .valor { font-size: 26px; font-weight: 800; margin-top: 4px; }

.tabela-wrap {
  background: var(--bg-2);
  border: 1px solid var(--borda);
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 20px;
}
table.tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.tabela th, table.tabela td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--borda);
  text-align: left;
}
table.tabela th {
  background: var(--bg-0);
  color: var(--txt-suave);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
table.tabela tr:hover td { background: rgba(255, 255, 255, 0.02); }

.barra-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  background: var(--bg-2);
  border: 1px solid var(--borda);
  padding: 12px 14px;
  border-radius: 10px;
}

.celula-ex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--fonte-mono);
  background: var(--bg-1);
  border: 1px solid var(--borda);
  color: var(--txt-suave);
  text-decoration: none !important;
}
.celula-ex.ok { background: rgba(22, 163, 74, 0.28); border-color: #16a34a; color: #86efac; font-weight: 700; }
.celula-ex.and { background: rgba(234, 179, 8, 0.25); border-color: #ca8a04; color: #fde047; }

.grade-comparacao {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 1024px) {
  .vscode-workspace { grid-template-columns: 1fr; overflow-y: auto; }
  .tela-editor { height: auto; overflow: auto; }
  .area-codemirror { height: 380px; }
  .moldura-iframe { height: 380px; }
  .grade-comparacao { grid-template-columns: 1fr; }
}

