:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f4f7;
  --text: #111111;
  --muted: #555555;
  --border: #e2dfe7;
  --accent: #6b2fa3;
  --accent-text: #ffffff;
  --accent-soft: #f2eafa;
  --focus: #6b2fa3;
  --verde: #2e7d4f;
  --verde-soft: #e2f1e7;
  --amarelo: #a86b00;
  --amarelo-soft: #fbf0d9;
  --vermelho: #b3261e;
  --vermelho-soft: #f9e1df;
  --escala-1: #c0504a;
  --escala-2: #e0956b;
  --escala-3: #cfc6b4;
  --escala-4: #9dc8a9;
  --escala-5: #2e7d4f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.04);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a { color: var(--accent); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(64px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.container.largo { max-width: 1100px; }

.topo { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 3px solid var(--accent); }
.topo .logo { display: block; height: 40px; width: auto; margin: 0 0 16px; }
.topo .rotulo { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 4px; }
.topo h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; }
.topo p { margin: 0; color: var(--muted); }

.cartao {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.aviso {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  margin-bottom: 24px;
}

.identificacao { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.identificacao .campo { color: var(--text); font-weight: 600; font-size: 15px; }
.ajuda-campo { margin: 0; font-size: 13px; color: var(--muted); }

label.campo { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }

select, input[type="date"], input[type="text"], textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 44px;
}

.bloco-titulo { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 32px 0 12px; }

fieldset.pergunta {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 0 12px;
  padding: 18px 18px 16px;
  min-width: 0;
}
fieldset.pergunta.erro { border-color: var(--vermelho); box-shadow: 0 0 0 1px var(--vermelho); }
fieldset.pergunta legend { padding: 0; float: left; width: 100%; }
fieldset.pergunta legend + * { clear: both; }
.pergunta .num { color: var(--accent); font-size: 13px; font-weight: 600; display: block; margin-bottom: 2px; }
.pergunta .enunciado { font-weight: 600; display: block; margin-bottom: 14px; }
.pergunta .ajuda { color: var(--muted); font-size: 14px; margin: -8px 0 12px; }

.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
/* As caixinhas reais ficam invisíveis dentro do próprio botão. O "position: relative" no pai é
   essencial: sem ele, elas seriam posicionadas em relação à janela de edição e, ao receber foco,
   fariam o navegador rolar a janela inteira (o conteúdo sumia para cima). */
.likert > div, .na, .opcao { position: relative; }
.likert input, .na input, .opcao input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.likert label {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface-2);
  transition: background 0.12s, border-color 0.12s;
}
.likert label { touch-action: manipulation; user-select: none; }
@media (hover: hover) { .likert label:hover { border-color: var(--accent); } }
.likert input:checked + label { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.likert input:focus-visible + label, .na input:focus-visible + label, .opcao input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.likert-pontas { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 1.3; color: var(--muted); margin-top: 6px; }
.likert-pontas span:last-child { text-align: right; }

.na { margin-top: 10px; }
.na label, .opcao label {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface-2);
}
.na input:checked + label { background: var(--accent-soft); border-color: var(--accent); }

.opcoes { display: flex; flex-direction: column; gap: 8px; }
.opcao label { width: 100%; }
.opcao label::before {
  content: ""; flex: none;
  width: 18px; height: 18px;
  border: 2px solid var(--muted);
  border-radius: 4px;
}
.opcao input:checked + label { background: var(--accent-soft); border-color: var(--accent); }
.opcao input:checked + label::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--surface); }
.opcao input:disabled + label { opacity: 0.45; cursor: not-allowed; }

textarea { width: 100%; min-height: 110px; resize: vertical; }
.contador { text-align: right; font-size: 13px; color: var(--muted); margin-top: 4px; }

.msg-erro { color: var(--vermelho); font-size: 14px; margin: 10px 0 0; }

.acoes { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.erros-envio { background: var(--vermelho-soft); color: var(--vermelho); border-radius: 8px; padding: 12px 16px; }
.erros-envio ul { margin: 6px 0 0; padding-left: 20px; }

button, .botao {
  font: inherit; font-weight: 600;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.botao-enviar { width: 100%; min-height: 54px; font-size: 17px; }
button:disabled { opacity: 0.6; cursor: progress; }
.botao.secundario, button.secundario { background: transparent; color: var(--accent); }

.obrigado { text-align: center; padding: 40px 20px; }
.obrigado h2 { margin: 0 0 8px; }
.obrigado-icone {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700;
}
.obrigado p { color: var(--muted); margin: 0 0 20px; }

.estado { color: var(--muted); padding: 24px 0; }

/* Barra de progresso fixa no topo enquanto a pessoa rola o formulário */
.progresso {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  margin: 0 -16px 16px; padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums;
}
.progresso-trilho { flex: 1; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progresso-preenchida { width: 0; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.2s; }

.pendentes { background: var(--amarelo-soft); border-left: 4px solid var(--amarelo); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }

/* ---------- Resultados ---------- */

.filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 24px; }
.filtros .campo { flex: 1 1 140px; }
.filtros .botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.filtros button, .filtros .botao { min-height: 42px; padding: 8px 16px; }

.alerta { border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; background: var(--amarelo-soft); color: var(--text); border-left: 4px solid var(--amarelo); }

.kpis { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; margin-bottom: 28px; }
.kpis-indices { display: grid; gap: 12px; }

/* Termômetro geral: caixa grande à esquerda com o termômetro desenhado */
.kpi.kpi-geral { display: flex; align-items: center; justify-content: space-evenly; gap: 16px; padding: 28px; position: relative; overflow: hidden; }
.kpi-geral-texto, .termometro { position: relative; z-index: 1; }
.termo-area { position: relative; flex: none; display: flex; align-items: center; justify-content: center; }
.kpi-geral-fundo {
  position: absolute; z-index: 0;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  font: 400 340px/1 Georgia, "Times New Roman", serif;
  color: var(--accent); opacity: 0.1;
  pointer-events: none; user-select: none;
}
.kpi.kpi-geral .nome { font-size: 20px; color: var(--text); font-weight: 600; }
.kpi.kpi-geral .valor { font-size: 72px; }
.kpi.kpi-geral .valor small { font-size: 24px; }
.kpi.kpi-geral .selo { font-size: 15px; padding: 4px 12px; }
.kpi.kpi-geral .detalhe { font-size: 14px; margin-top: 12px; }
.termometro { width: 170px; height: auto; flex: none; overflow: visible; }
.termo-tubo, .termo-bulbo-fundo { fill: #f3f1f6; stroke: var(--border); stroke-width: 2; }
.termo-bulbo { fill: #c62828; }
.termo-mercurio { transform-box: fill-box; transform-origin: 50% 100%; animation: termo-sobe 1s ease-out; }
@keyframes termo-sobe { from { transform: scaleY(0.12); } }
@media (prefers-reduced-motion: reduce) { .termo-mercurio { animation: none; } }
.termo-marca { stroke: var(--muted); stroke-width: 1.5; }
.termo-numero { fill: var(--muted); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.termo-faixa-vermelho { fill: #c62828; }
.termo-faixa-amarelo { fill: #f2b705; }
.termo-faixa-verde { fill: #2e7d4f; }
.termo-ponteiro path { fill: var(--text); }
.termo-cor-vermelho { stop-color: #c62828; }
.termo-cor-laranja { stop-color: #e8701a; }
.termo-cor-amarelo { stop-color: #f2b705; }
.termo-cor-verde-claro { stop-color: #7cb342; }
.termo-cor-verde { stop-color: #2e7d4f; }
.kpi { border-top: 4px solid var(--border); }
.kpi.verde { border-top-color: var(--verde); }
.kpi.amarelo { border-top-color: var(--amarelo); }
.kpi.vermelho { border-top-color: var(--vermelho); }
.kpi .nome { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.kpi .valor { font-size: 34px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .valor small { font-size: 16px; color: var(--muted); font-weight: 500; }
.kpi .detalhe { font-size: 13px; color: var(--muted); margin-top: 6px; }

.selo { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.4; padding: 2px 8px; border-radius: 6px; margin-top: 8px; }
.selo.verde { background: var(--verde-soft); color: var(--verde); }
.selo.amarelo { background: var(--amarelo-soft); color: var(--amarelo); }
.selo.vermelho { background: var(--vermelho-soft); color: var(--vermelho); }
.selo.vazio { background: var(--surface-2); color: var(--muted); }

.secao { margin-bottom: 28px; }
.secao h2 { font-size: 18px; margin: 0 0 4px; padding-left: 10px; border-left: 4px solid var(--accent); }
.secao .sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.legenda { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.linha-pergunta { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.linha-pergunta:last-child { border-bottom: 0; }
.linha-pergunta .titulo { font-size: 14px; }
.linha-pergunta .titulo b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.linha-pergunta .med { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.linha-pergunta .med.verde { color: var(--verde); }
.linha-pergunta .med.amarelo { color: var(--amarelo); }
.linha-pergunta .med.vermelho { color: var(--vermelho); }
.linha-pergunta .extra { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

.barra-empilhada { grid-column: 1 / -1; display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.barra-empilhada div { height: 100%; }

.barra-h { display: grid; grid-template-columns: minmax(0, 1fr) 2fr 56px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.barra-h .trilho { height: 12px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.barra-h .preenchida { height: 100%; background: var(--accent); border-radius: 4px; }
.barra-h .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }


.comentarios { list-style: none; margin: 0; padding: 0; }
.comentarios li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comentarios li:last-child { border-bottom: 0; }
.comentarios .meta { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.comentarios p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.tabela-niveis { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela-niveis td { padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tabela-niveis tr:last-child td { border-bottom: 0; }

/* ---------- Abas do painel ---------- */

.abas { display: flex; gap: 4px; margin: -8px 0 20px; border-bottom: 1px solid var(--border); }
.abas a {
  padding: 10px 16px; min-height: 44px;
  display: inline-flex; align-items: center;
  color: var(--muted); font-weight: 600; text-decoration: none;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.abas a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.acoes-painel { display: flex; justify-content: flex-end; margin: -8px 0 16px; }
.acoes-painel .botao { min-height: 42px; padding: 8px 16px; }

/* ---------- Gerenciar respostas ---------- */

.campo-busca { flex-basis: 220px; }
input[type="search"] {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; min-height: 44px; width: 100%;
}

.resumo-lista { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.registros { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.registro { display: flex; flex-direction: column; gap: 12px; }
.registro-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.etiqueta { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.etiqueta.nome { background: var(--text); color: #fff; }
.etiqueta.editado { background: var(--accent-soft); color: var(--accent); }

.notas { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.nota {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 46px; border-radius: 8px;
  font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--surface-2);
}
.nota small { font-size: 11px; font-weight: 600; opacity: 0.8; }
.nota-1 { background: var(--vermelho-soft); color: var(--vermelho); }
.nota-2 { background: #fbe7da; color: #9a4a1c; }
.nota-3 { background: var(--surface-2); color: var(--text); }
.nota-4 { background: #e6f2e9; color: #2e6b45; }
.nota-5 { background: var(--verde-soft); color: var(--verde); }
.nota-na { color: var(--muted); font-size: 13px; }

.registro-linha { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.registro-linha b { color: var(--muted); font-weight: 600; }
.registro-linha.sugestao { white-space: pre-wrap; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }

.registro-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 12px; }
.registro-acoes button { min-height: 42px; padding: 8px 16px; }
.confirmacao { flex: 1 1 100%; margin: 0; font-size: 14px; color: var(--vermelho); font-weight: 600; }
button.perigo { background: transparent; color: var(--vermelho); border-color: var(--vermelho); }
button.perigo-forte { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }

/* Seleção em lote */
.lista-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; }
.lista-topo .resumo-lista { margin: 0; }
.seletor { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; cursor: pointer; }
.seletor input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.seletor-rotulo { gap: 8px; font-size: 14px; font-weight: 600; padding: 4px 12px 4px 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.aviso-selecao { flex: 1 1 100%; margin: 0; padding: 10px 14px; border-radius: 8px; background: var(--accent-soft); font-size: 14px; }
button.link { min-height: 0; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 700; text-decoration: underline; cursor: pointer; }
.registro.selecionado { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: #fbf8fe; }

.barra-selecao {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); border-top: 2px solid var(--accent);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  padding: 12px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.barra-selecao-conteudo { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.barra-selecao-total { font-weight: 700; color: var(--accent); }
.barra-selecao-botoes { display: flex; gap: 8px; }
.barra-selecao-botoes button { min-height: 44px; padding: 8px 16px; }
.barra-selecao .confirmacao { flex: 1 1 320px; }
body.com-selecao .container { padding-bottom: 140px; }
body.com-selecao .notificacao { bottom: 110px; }

.paginacao { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.paginacao button { min-height: 44px; padding: 8px 14px; }
.paginacao button:disabled { opacity: 0.4; cursor: default; }

.notificacao {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 100; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 10px;
  background: var(--text); color: #fff; font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.notificacao.erro { background: var(--vermelho); }

/* Janela de edição: centralizada no computador, tela cheia no celular */
.editor {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  padding: 0; border: 0; border-radius: var(--radius);
  background: var(--bg); color: var(--text);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.editor[open] { display: flex; flex-direction: column; overflow: clip; }
.editor::backdrop { background: rgba(17, 17, 17, 0.5); }
.editor-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.editor-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.editor-topo h2 { margin: 0; font-size: 20px; }
.editor-topo p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.editor-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 20px 20px; -webkit-overflow-scrolling: touch; }
.editor-corpo .identificacao { margin-top: 16px; }
.editor-rodape { padding: 12px 20px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.editor-botoes { display: flex; gap: 8px; justify-content: flex-end; }
button.fechar { min-height: 44px; min-width: 44px; padding: 0; font-size: 26px; line-height: 1; background: transparent; color: var(--muted); border-color: transparent; }

@media (max-width: 600px) {
  .notas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .registro-acoes button { flex: 1; }
  .barra-selecao-botoes { flex: 1 1 100%; }
  .barra-selecao-botoes button { flex: 1; }
  .confirmacao + button, .confirmacao ~ button { flex: 1; }
  .editor { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .editor-corpo { flex: 1; padding: 4px 14px 16px; }
  .editor-topo, .editor-rodape { padding-left: 14px; padding-right: 14px; }
  .editor-botoes > * { flex: 1; }
  .filtros .campo-busca, .filtros .campo-identificacao { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .grade-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .topo { margin-bottom: 16px; padding-bottom: 12px; }
  .topo h1 { font-size: 23px; }
  .aviso { font-size: 14px; padding: 12px 14px; margin-bottom: 16px; }
  .bloco-titulo { margin: 24px 0 10px; }
  .cartao { padding: 16px; }
  fieldset.pergunta { padding: 14px 14px 12px; margin-bottom: 10px; }
  .likert { gap: 5px; }
  .likert label { min-height: 52px; font-size: 18px; }
  .na label { width: 100%; }
  .opcao label { padding: 10px 12px; }

  .filtros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .filtros .botoes { grid-column: 1 / -1; }
  .filtros .botoes > * { flex: 1; }
  .filtros input[type="date"] { padding: 8px 6px; font-size: 15px; }
  .kpis { grid-template-columns: 1fr; gap: 8px; margin-bottom: 20px; }
  .kpis-indices { gap: 8px; }
  .kpi.kpi-geral { padding: 18px; justify-content: space-between; }
  .kpi.kpi-geral .valor { font-size: 52px; }
  .kpi.kpi-geral .nome { font-size: 17px; }
  .kpi-geral-fundo { font-size: 230px; }
  .termometro { width: 112px; }
  .kpi { padding: 12px; }
  .kpi .nome { font-size: 13px; }
  .kpi .valor { font-size: 26px; }
  .kpi .detalhe { font-size: 12px; }
  .secao h2 { font-size: 17px; }
  .tabela-niveis td { display: block; padding: 4px 0; border-bottom: 0; }
  .tabela-niveis tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .tabela-niveis tr:last-child { border-bottom: 0; }
  .barra-h { grid-template-columns: 1fr 48px; gap: 4px 10px; }
  .barra-h .trilho { grid-column: 1 / -1; grid-row: 2; }
}
