* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: #1a1a1a;
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.oculto {
  display: none !important;
}

/* Cabecalho fixo: voltar (esquerda) e paciente/sair (direita) */
.cabecalho-topo {
  position: sticky;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 20px;
}

.cabecalho-topo button {
  background: none;
  border: none;
  font-size: 14px;
  padding: 6px 0;
  cursor: pointer;
  color: #1a1a1a;
}

#btn-paciente {
  color: #555;
}

#btn-paciente::after {
  content: " · sair";
  color: #999;
}

/* Cada passo ocupa a tela toda (efeito "uma pergunta por vez") */
.step {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  scroll-margin-top: var(--header-height, 45px);
}

h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

h2 {
  font-size: 18px;
  margin: 0 0 16px;
}

.passo-contexto {
  color: #666;
  font-size: 13px;
  margin: -8px 0 16px;
}

/* Lista de botoes de opcao (unidade, especialidade, dias) */
.botoes-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.botao-opcao {
  width: 100%;
  padding: 16px 18px;
  font-size: 16px;
  text-align: left;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.botao-opcao:active {
  background: #eee;
}

.botao-opcao.selecionado {
  border-color: #1a1a1a;
  background: #1a1a1a;
  color: #fff;
}

.botao-opcao-contagem {
  font-size: 12px;
  color: #888;
}

.botao-opcao.selecionado .botao-opcao-contagem {
  color: #cccccc;
}

/* Formulario de CPF */
.acesso-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acesso-form label {
  font-size: 13px;
  color: #555;
}

.acesso-form input {
  padding: 14px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 18px;
}

.acesso-form button {
  margin-top: 8px;
  padding: 14px 12px;
  border: none;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.acesso-form button:disabled {
  background: #999;
  cursor: default;
}

.acesso-mensagem {
  min-height: 18px;
  font-size: 13px;
  margin: 4px 0 0;
}

.acesso-mensagem.error {
  color: #b00020;
}

.loading, .empty, .error {
  color: #888;
  font-style: italic;
  font-size: 14px;
}

.error {
  color: #b00020;
}

/* Spinner de carregamento */
.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 0;
}

.spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid #ddd;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: girar 0.7s linear infinite;
}

.spinner-pequeno {
  width: 14px;
  height: 14px;
  border-width: 2px;
  border-color: #ffffff55;
  border-top-color: #ffffff;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 8px;
}

@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}

.loading-espera {
  color: #aaa;
  font-size: 12px;
  font-style: normal;
  margin: -4px 0 0 28px;
}
