:root {
  --bg-dark: #0e0e10;
  --bg-card: #18181b;
  --bg-hover: #27272a;
  --white: #ffffff;
  --gray-400: #a1a1aa;
  --orange: #FF6B35;
  --orange-hover: #ff8555;
  --orange-glow: rgba(255, 107, 53, 0.2);
}

* {
  margin: 0; padding: 0; box-sizing: border-box;
}

/* Remove as setinhas de incremento/decremento dos inputs numéricos */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Entrada animada segura (ver js/gsap-entrance.js) — opacity:0 direto no
   CSS, carrega antes de qualquer coisa aparecer, sem risco de "flash" */
.gsap-hidden { opacity: 0; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Rede de segurança: se algum passo específico ainda não couber numa
     tela muito baixa, rola a página em vez de cortar o conteúdo — mas o
     objetivo é a caixa já caber sozinha na maioria das telas */
  overflow-y: auto;
  padding: 16px 0;
}

.onb-main {
  width: 100%;
  max-width: 560px;
  padding: 16px;
}

.onb-container {
  background-color: var(--bg-card);
  padding: 26px 28px;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255,255,255,0.05);
  transition: box-shadow 0.3s ease;
}

.onb-container:hover {
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.onb-progress-wrapper {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  margin-bottom: 22px;
  overflow: hidden;
}

.onb-progress-bar {
  height: 100%;
  background: var(--orange);
  transition: width 0.4s ease;
}

.onb-step {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.onb-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.onb-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 6px;
  color: var(--white);
}

.onb-subtitle {
  color: var(--gray-400);
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 18px;
}

/* Options */
.onb-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onb-options.grid-cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.onb-option-btn {
  background: var(--bg-dark);
  border: 2px solid rgba(255,255,255,0.05);
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--white);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.25s ease;
}

.onb-option-btn:hover {
  border-color: rgba(255, 107, 53, 0.5);
  background: rgba(255, 107, 53, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.onb-option-btn.selected {
  border-color: var(--orange);
  background: var(--orange-glow);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.15);
}

.onb-option-btn i {
  font-size: 1.2rem;
  color: var(--orange);
}

.onb-option-btn div strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.onb-option-btn div span {
  font-size: 0.76rem;
  color: var(--gray-400);
}

.onb-option-btn.compact {
  padding: 10px;
  justify-content: center;
  text-align: center;
  font-weight: 500;
  font-size: 0.88rem;
}

/* Form */
.onb-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onb-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.onb-field label {
  font-size: 0.8rem;
  color: var(--gray-400);
}

.onb-field input {
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--white);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
}

.onb-field input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Campos de data (DD/MM/AAAA digitado, não o seletor nativo do celular —
   o type="date" original abria uma roda de rolagem em vez de teclado
   numérico, e deixava digitar mais de 4 números no ano). Ícone de
   calendário bem visível e clicável, focando o campo ao tocar nele. */
.onb-date-wrap {
  position: relative;
}

.onb-date-wrap input {
  width: 100%;
  padding-left: 42px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.onb-date-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--orange);
  font-size: 1.05rem;
  pointer-events: none;
}

/* Actions */
.onb-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.onb-btn-pri, .onb-btn-sec {
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 0.92rem;
  transition: all 0.2s;
}

.onb-btn-pri {
  background: var(--orange);
  color: white;
}

.onb-btn-pri:hover:not(:disabled) {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.3);
}

.onb-btn-pri:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.onb-btn-sec {
  background: transparent;
  color: var(--gray-400);
}
.onb-btn-sec:hover {
  color: var(--white);
}

/* Spinner */
.text-center {
  text-align: center;
}
.onb-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,107,53,0.2);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* Sub-formulários condicionais dentro de um mesmo step (ex: pergunta de
   acompanhamento do objetivo, que muda conforme a categoria escolhida) */
.onb-subform {
  display: none;
}

.onb-subform.active {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

/* Linha de "dia + tempo disponível", usada no step de tempo por treino */
.onb-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.onb-time-row label {
  font-size: 0.95rem;
  color: var(--white);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  min-width: 90px;
}

.onb-time-row input {
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--white);
  font-size: 1rem;
  outline: none;
  width: 110px;
  text-align: right;
}

.onb-time-row input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

@media (max-width: 600px) {
  .onb-container { padding: 20px; }
}

@media (max-width: 480px) {
  /* Menos de 16px faz o Safari no iPhone dar zoom sozinho ao focar o campo */
  .onb-field input,
  .onb-field select {
    font-size: 16px !important;
  }
}
