/* Portal de Recibos StopGain · identidade da marca (_contexto/marca/design-guide.md): branco, azul #27599C, DM Sans */
:root {
  --azul: #27599c;
  --azul-escuro: #2d486a;
  --azul-claro: #eef3f4;
  --azul-borda: #d4dfe0;
  --texto: #191919;
  --texto-2: #585858;
  --texto-3: #8a8c8f;
  --fundo: #ffffff;
  --fundo-2: #f6f8f9;
  --verde: #1f7a4d;
  --verde-fundo: #e7f4ec;
  --vermelho: #b42318;
  --vermelho-fundo: #fdecea;
  --amarelo: #8a5a00;
  --amarelo-fundo: #fff4dc;
  --raio: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fundo-2); color: var(--texto); font-family: "DM Sans", system-ui, sans-serif; font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
h1 { font-size: 22px; font-weight: 500; margin: 0 0 4px; }
h2 { font-size: 18px; font-weight: 500; margin: 0 0 12px; }
h3 { font-size: 16px; font-weight: 500; margin: 0 0 8px; }
p { margin: 0 0 8px; }
.muted { color: var(--texto-2); font-size: 14px; }
.pequeno { font-size: 13px; color: var(--texto-2); }

.tela { max-width: 520px; margin: 0 auto; padding: 16px 16px 96px; }
.tela-larga { max-width: 1100px; margin: 0 auto; padding: 16px 16px 48px; }
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 16px; }
.logo { height: 32px; width: auto; display: block; }
.cartao { background: var(--fundo); border: 1px solid var(--azul-borda); border-radius: var(--raio); padding: 16px; margin-bottom: 12px; }

label, .rotulo { display: block; font-size: 14px; color: var(--texto-2); margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--texto); background: var(--fundo);
  border: 1px solid var(--azul-borda); border-radius: 10px; padding: 11px 12px; min-height: 46px; outline: none;
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(39, 89, 156, 0.15); }
input.ok { border-color: var(--verde); }
input.erro { border-color: var(--vermelho); }
.dica { font-size: 13px; margin-top: 4px; min-height: 18px; color: var(--texto-2); }
.dica.ok { color: var(--verde); }
.dica.erro { color: var(--vermelho); }
.duas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--texto); margin: 14px 0 0; }
.check input { width: 20px; min-height: 20px; height: 20px; margin-top: 2px; flex: none; }

button { font: inherit; cursor: pointer; }
.botao { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--azul); background: var(--azul); color: #fff; font-size: 16px; font-weight: 500; }
.botao:active { transform: scale(0.98); }
.botao.cheio { width: 100%; }
.botao.claro { background: var(--fundo); color: var(--azul); }
.botao.perigo { background: var(--fundo); color: var(--vermelho); border-color: var(--vermelho); }
.botao.pequeno { min-height: 36px; padding: 0 14px; font-size: 14px; }
.botao[disabled] { opacity: 0.6; cursor: wait; }
.link { background: none; border: 0; color: var(--azul); padding: 4px 0; font-size: 14px; text-decoration: underline; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--azul-borda); background: var(--fundo); color: var(--texto); font-size: 15px; }
.chip.on { background: var(--azul); border-color: var(--azul); color: #fff; }

.aviso { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 12px 0; }
.aviso.info { background: var(--azul-claro); color: var(--azul-escuro); }
.aviso.ok { background: var(--verde-fundo); color: var(--verde); }
.aviso.erro { background: var(--vermelho-fundo); color: var(--vermelho); }
.aviso.atencao { background: var(--amarelo-fundo); color: var(--amarelo); }

.linha { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 8px 0; border-top: 1px solid var(--azul-borda); }
.linha:first-child { border-top: 0; }
.selo { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.selo.pendente { background: var(--azul-claro); color: var(--azul-escuro); }
.selo.emitido { background: var(--verde-fundo); color: var(--verde); }
.selo.cancelado { background: var(--vermelho-fundo); color: var(--vermelho); }
.selo.sem-recibo { background: var(--fundo-2); color: var(--texto-2); border: 1px solid var(--azul-borda); }

.metricas { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.metrica { background: var(--fundo); border: 1px solid var(--azul-borda); border-radius: var(--raio); padding: 12px 14px; }
.metrica .n { font-size: 20px; font-weight: 500; }

.mes-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mes-nav button { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--azul-borda); background: var(--fundo); font-size: 20px; color: var(--azul); }
.mes-nav strong { font-weight: 500; font-size: 17px; display: inline-block; }
.mes-nav strong::first-letter { text-transform: uppercase; }

.lanc-topo { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.lanc-valor { font-weight: 500; font-size: 17px; white-space: nowrap; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cancelado-card { opacity: 0.65; }

.nav-baixo { position: fixed; left: 0; right: 0; bottom: 0; background: var(--fundo); border-top: 1px solid var(--azul-borda); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.nav-baixo div { display: flex; max-width: 520px; width: 100%; }
.nav-baixo button { flex: 1; background: none; border: 0; padding: 10px 4px 12px; font-size: 13px; color: var(--texto-3); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.nav-baixo button .ic { font-size: 20px; line-height: 1; }
.nav-baixo button.on { color: var(--azul); font-weight: 500; }

.passos { display: flex; gap: 6px; margin: 4px 0 16px; }
.passos span { flex: 1; height: 4px; border-radius: 4px; background: var(--azul-borda); }
.passos span.on { background: var(--azul); }

.sugestoes { border: 1px solid var(--azul-borda); border-radius: 10px; margin-top: 4px; overflow: hidden; }
.sugestoes button { display: block; width: 100%; min-height: 48px; text-align: left; background: var(--fundo); border: 0; border-top: 1px solid var(--azul-borda); padding: 12px; font-size: 15px; color: var(--texto); touch-action: manipulation; }
.sugestoes button:active { background: var(--azul-claro); }
.sugestoes button:first-child { border-top: 0; }

dialog { border: 0; border-radius: 16px; padding: 20px; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
dialog::backdrop { background: rgba(25, 25, 25, 0.45); }
.copia { font-family: ui-monospace, monospace; background: var(--fundo-2); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 8px 0; white-space: pre-line; }

.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--texto); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 20; max-width: calc(100vw - 32px); }
.faixa-demo { background: var(--amarelo-fundo); color: var(--amarelo); font-size: 13px; padding: 8px 16px; text-align: center; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--texto-2); padding: 8px; border-bottom: 1px solid var(--azul-borda); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--azul-borda); vertical-align: top; }
.rolagem { overflow-x: auto; }
.num { text-align: right; white-space: nowrap; }
