/* ============================================================
   BASE — reset, tipografia e estrutura geral
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--cor-fundo);
  color: var(--cor-texto);
  font-family: var(--fonte-texto);
  font-size: var(--texto-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--fonte-titulo);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

h1 { font-size: var(--texto-titulo); }
h2 { font-size: var(--texto-grande); }
h3 { font-size: var(--texto-medio); }
h4 { font-size: var(--texto-base); }

p { margin: 0 0 var(--espaco-3); }
p:last-child { margin-bottom: 0; }

a { color: var(--cor-primaria); font-weight: 600; text-decoration: none; }

img { max-width: 100%; display: block; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--cor-secundaria);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Estrutura ---------------------------------------------- */

#aplicativo {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

.conteudo {
  flex: 1;
  padding: var(--espaco-4) var(--espaco-4) calc(var(--altura-barra-inferior) + var(--espaco-7));
  width: 100%;
  max-width: var(--largura-conteudo);
  margin: 0 auto;
  outline: none;
}

/* Texto utilitário --------------------------------------- */

.rotulo {
  font-family: var(--fonte-titulo);
  font-size: var(--texto-mini);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cor-texto-claro);
}

.valor {
  font-family: var(--fonte-dados);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.texto-suave { color: var(--cor-texto-suave); }
.texto-pequeno { font-size: var(--texto-pequeno); }
.texto-positivo { color: var(--cor-sucesso); }
.texto-negativo { color: var(--cor-erro); }
.texto-atencao { color: var(--cor-alerta); }

.apenas-leitores {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
