/* Cartão, botão, campo, segmentos, selo, sheet, avisos e estados. */
.card {
  background: var(--s1); border: 1px solid var(--linha); border-radius: var(--raio);
  padding: var(--e4);
}
.card-rotulo { font-size: var(--t-s); font-weight: 600; color: var(--mut); margin-bottom: var(--e2); }
.card-topo { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); }
.card-topo .card-rotulo { margin: 0; }
@media (min-width: 900px) { .card { padding: 20px; } }

.pagina-topo { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--e4); padding-top: var(--e2); }
.pagina-titulo { min-width: 0; }
.sub { font-size: var(--t-s); color: var(--mut); margin-top: var(--e1); }
.pagina-acoes { display: flex; gap: var(--e2); flex-shrink: 0; }
.voltar {
  display: inline-flex; align-items: center; gap: var(--e1); align-self: flex-start;
  min-height: 44px; margin-left: -4px; color: var(--mut); font-weight: 600; text-decoration: none;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e2);
  min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px;
  background: none; color: var(--txt); font-size: var(--t-m); font-weight: 700;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn-primario { background: var(--acc); color: var(--acc-tinta); }
.btn-primario:hover:not(:disabled) { filter: brightness(1.06); }
.btn-sec { background: var(--s3); border-color: var(--linha); }
.btn-sec:hover { border-color: var(--mut); }
.btn-perigo { border-color: var(--perigo-borda); color: var(--perigo); }
.btn-texto { min-height: 44px; padding: 0 var(--e3); color: var(--mut); font-weight: 600; }
.btn-texto:hover { color: var(--txt); }
.btn-bloco { width: 100%; }
.btn-icone { width: 44px; min-height: 44px; padding: 0; color: var(--mut); font-size: var(--t-l); font-weight: 400; }
.btn-apagar { margin-right: calc(var(--e3) * -1); }
.btn-sair { margin-top: var(--e2); }

input, select, textarea {
  width: 100%; min-height: 48px; padding: 0 14px;
  background: var(--s2); color: var(--txt); border: 1px solid var(--linha); border-radius: 10px;
  font: inherit; font-size: var(--t-m); font-variant-numeric: tabular-nums;
}
textarea { padding: var(--e3) 14px; resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: var(--mut); opacity: .55; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--txt); }
select {
  appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A0A7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo-rotulo { font-size: var(--t-s); font-weight: 600; color: var(--mut); }
.campo-dica { font-size: var(--t-s); color: var(--mut); }
.duas-colunas { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e3); }
.erro-form { font-size: var(--t-s); font-weight: 600; color: var(--perigo); }

.segmentos { display: flex; gap: var(--e1); padding: var(--e1); background: var(--s1); border: 1px solid var(--linha); border-radius: 12px; }
.segmento {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px;
  border: 0; border-radius: 9px; background: none; color: var(--mut);
  font-weight: 600; text-decoration: none; cursor: pointer;
}
.segmento.ativo { background: var(--s3); color: var(--txt); }

.selo {
  font-size: var(--t-s); font-weight: 700; color: var(--ambar);
  border: 1px solid var(--ambar-borda); border-radius: 8px; padding: var(--e1) var(--e2); white-space: nowrap;
}

.sheet-fundo {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .62);
}
.sheet {
  width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto;
  background: var(--s1); border: 1px solid var(--linha); border-bottom: 0; border-radius: 20px 20px 0 0;
  padding: var(--e2) var(--e4) calc(var(--e4) + var(--seguro));
}
.sheet-topo { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.sheet-topo h2 { font-size: var(--t-l); font-weight: 700; }
.sheet-topo .btn { margin-right: calc(var(--e3) * -1); }
.form-sheet, .sheet-botoes { display: flex; flex-direction: column; gap: var(--e3); }
.texto-sheet { color: var(--mut); margin-bottom: var(--e4); }
.pergunta { font-size: var(--t-l); font-weight: 700; line-height: 1.25; margin-bottom: var(--e2); }
.sheet .meta { margin-bottom: var(--e4); }
@media (min-width: 900px) {
  .sheet-fundo { align-items: center; }
  .sheet { border-bottom: 1px solid var(--linha); border-radius: 20px; padding-bottom: var(--e4); }
}

.aviso {
  position: fixed; left: var(--e4); right: var(--e4); bottom: calc(var(--aba) + var(--seguro) + var(--e4));
  z-index: 60; max-width: 420px; margin: 0 auto; padding: var(--e3) var(--e4); border-radius: 12px;
  background: var(--txt); color: var(--bg); font-weight: 600; text-align: center;
}
@media (min-width: 900px) { .aviso { bottom: var(--e5); } }

.carregando { display: flex; flex-direction: column; gap: var(--e3); padding-top: var(--e4); }
.esqueleto { height: 72px; border-radius: var(--raio); background: var(--s1); animation: pulso 1.2s ease-in-out infinite; }
.esqueleto.largo { height: 120px; }
.esqueleto.curto { height: 48px; width: 60%; }
@keyframes pulso { 50% { opacity: .5; } }

.vazio { display: flex; flex-direction: column; align-items: flex-start; gap: var(--e2); }
.vazio-titulo { font-weight: 700; }
.vazio-texto { color: var(--mut); margin-bottom: var(--e2); }
.vazio.erro { padding: var(--e4) 0; }
