/* =====================================================================
   ÁTOMOS — menores peças da interface; não dependem de outros componentes.
   botão · entrada · selo · variação · amostra · ícone · barra de progresso · código
   ===================================================================== */

/* Botão */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--esp-2); min-height: 38px;
  background: var(--primaria); color: var(--primaria-texto); border: 1px solid transparent; border-radius: var(--raio-sm);
  padding: .45rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(.95); }
.btn-destaque { background: var(--tinta); color: var(--tinta-texto); }
.btn-secundario { background: var(--superficie); color: var(--texto); border-color: var(--borda-forte); }
.btn-link { background: none; border: 0; color: var(--primaria); cursor: pointer; font: inherit; padding: 0; font-weight: 500; }

/* Entrada (input, select, textarea) */
input, select, textarea {
  font: inherit; color: var(--texto); background: var(--superficie); border: 1px solid var(--borda-forte);
  border-radius: var(--raio-sm); padding: .45rem .6rem; min-height: 38px;
}
input[type="checkbox"], input[type="radio"] { min-height: 0; accent-color: var(--primaria); }

/* Selo de estado */
.selo {
  display: inline-flex; align-items: center; gap: .35rem; font-size: var(--fs-xs); font-weight: 600; padding: .12rem .55rem;
  border-radius: var(--raio-pilula); background: var(--superficie-2); color: var(--texto-2); white-space: nowrap;
}
.selo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.selo-aprovado { background: var(--ok-fundo); color: var(--ok); }
.selo-enviado { background: var(--aviso-fundo); color: var(--aviso); }
.selo-erro { background: var(--erro-fundo); color: var(--erro); }

/* Variação ▲▼ */
.delta { display: inline-flex; align-items: center; gap: .2rem; font-weight: 600; font-size: var(--fs-sm); }
.delta svg { width: 10px; height: 10px; }
.delta.sobe { color: var(--ok); }
.delta.desce { color: var(--erro); }
.delta.neutro { color: var(--texto-3); font-weight: 500; }

/* Amostra de cor (legendas) */
.amostra { width: 10px; height: 10px; border-radius: 2px; flex: none; display: inline-block; }
.amostra.ref { width: 14px; height: 0; border-top: 2px dashed var(--texto-2); border-radius: 0; }
.amostra.tique { width: 2px; height: 12px; background: var(--texto-3); border-radius: 1px; }
.amostra.esperado { width: 0; height: 12px; border-left: 2px dotted var(--texto); border-radius: 0; }
.viz-1 { background: var(--viz-1); } .viz-2 { background: var(--viz-2); } .viz-3 { background: var(--viz-3); }
.viz-4 { background: var(--viz-4); } .viz-outros { background: var(--viz-outros); }

/* Ícone (SVG em traço) */
.icone, .icone-svg svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Barra de progresso simples */
.medidor { position: relative; height: 8px; border-radius: var(--raio-pilula); background: color-mix(in srgb, var(--marca-laranja) 16%, var(--superficie)); }
.medidor-valor { height: 100%; width: min(calc(var(--pct) * 1%), 100%); background: var(--marca-laranja); border-radius: var(--raio-pilula); }
.medidor-marca { position: absolute; top: -4px; bottom: -4px; width: 2px; left: min(calc(var(--pct) * 1%), 100%); background: var(--texto); border-radius: 1px; }

/* Código / senha */
code.senha { font-size: 1.05rem; letter-spacing: .06em; background: var(--superficie-2); padding: .15rem .45rem; border-radius: 4px; }

/* Valor em R$ (o modo privacidade oculta) */
.privado .dinheiro { position: relative; color: transparent !important; user-select: none; white-space: nowrap; }
.privado .dinheiro::after { content: "R$ •••••"; position: absolute; left: 0; top: 0; color: var(--texto-3); letter-spacing: .05em; white-space: nowrap; }
.privado .num .dinheiro::after, .privado .dados-lista dd .dinheiro::after { left: auto; right: 0; }

@media (max-width: 899px) {
  .btn { min-height: var(--toque-min); }
  input, select, textarea { min-height: var(--toque-min); font-size: 16px; } /* 16px evita o zoom automático do iPhone */
}
input[type="file"] { max-width: 100%; min-width: 0; padding: .35rem; }
.sem-quebra { white-space: nowrap; }
.positivo { color: var(--ok); }
