:root {
  --bg-body: #020617;
  --bg-card: #ffffff;
  --accent: #ff7a1a;
  --accent-dark: #ea580c;
  --accent-soft: rgba(255, 122, 26, 0.12);
  --text-main: #0f172a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --input-bg: #f9fafb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-body);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--text-main);
}

/* Utilidades */
.hidden {
  display: none !important;
}

/* ---------- TELA INTRO ---------- */

.intro-wrapper {
  width: 100%;
  max-width: 540px;
}

.intro-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 28px 26px 26px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.6);
  text-align: center;
}

.intro-logo {
  text-align: center;
  margin-bottom: 22px;
}

/* Aumenta o tamanho da logo da saudação */
.intro-logo img {
  max-width: 140px;
  height: auto;
  display: inline-block;
}

.intro-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.intro-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.intro-text-small {
  font-size: 0.85rem;
}

.intro-text a {
  color: var(--accent-dark);
  text-decoration: underline;
}

.intro-consent {
  margin: 14px 0 4px;
  text-align: left;
}

.intro-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-main);
}

.intro-checkbox input {
  margin-top: 3px;
}

.intro-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

/* ---------- CARD PRINCIPAL ---------- */

.signup-wrapper {
  width: 100%;
  max-width: 980px;
}

.signup-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 26px 32px 26px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.6);
}

/* Cabeçalho com logo + título */
.signup-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.signup-logo img {
  height: 42px;
  width: auto;
}

.signup-heading-text {
  display: flex;
  flex-direction: column;
}

.signup-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.signup-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- STEPPER ---------- */

.stepper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  margin: 20px 0 28px;
  padding: 0 10px;
  list-style: none;
}

.stepper::before {
  content: "";
  position: absolute;
  top: 33px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.step {
  position: relative;
  text-align: center;
  z-index: 1;
  flex: 1;
}

.step-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.step-circle {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: #ffffff;
  color: #111827;
  margin: 0 auto;
}

.step.active .step-label {
  color: var(--accent-dark);
}

.step.active .step-circle {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.step.completed .step-circle {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.step.completed .step-label {
  color: var(--accent-dark);
}

.stepper .step-line-active {
  position: absolute;
  top: 33px;
  left: 12%;
  height: 2px;
  background: var(--accent);
  z-index: 0;
  transition: width 0.3s ease;
}

/* ---------- FORM STEPS ---------- */

.form-step {
  display: none;
  animation: fadeIn 0.24s ease;
}

.form-step.active {
  display: block;
}

.form-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.form-control,
.form-select,
.form-textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 0.9rem;
  background: var(--input-bg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 122, 26, 0.25);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
}

.form-inline {
  display: flex;
  gap: 10px;
}

.form-inline .form-group {
  flex: 1;
  margin-bottom: 0;
}

.help-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.qtd-veiculos-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
}

.qtd-veiculos-input {
  text-align: center;
}

/* remove setinhas nativas de alguns navegadores */
.qtd-veiculos-input::-webkit-outer-spin-button,
.qtd-veiculos-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qtd-veiculos-input[type="number"] {
  -moz-appearance: textfield;
}

.qtd-btn {
  border: none;
  border-radius: 999px;
  padding: 0 14px;
  height: 40px;
  min-width: 40px;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #ff7a00;     /* segue a paleta do botão laranja */
  color: #fff;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.qtd-btn:active {
  transform: scale(0.96);
  box-shadow: none;
}

.qtd-btn:focus-visible {
  outline: 2px solid #ff7a00;
  outline-offset: 2px;
}

.qtd-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Mostrar/Ocultar senha ===== */
.has-pw-toggle input {
  padding-right: 46px; /* espaço pro botão */
}

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 43%; /* se seu input tiver label acima, isso alinha bem */
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}

.pw-toggle:hover {
  background: rgba(249, 250, 251, 1);
  border-color: rgba(17, 24, 39, 0.18);
}

.pw-toggle:active {
  transform: scale(0.98);
}

.pw-toggle svg {
  fill: rgba(17, 24, 39, 0.65);
}

.pw-toggle.is-on svg {
  fill: rgba(249, 115, 22, 0.95); /* laranja discreto quando está mostrando */
}

.pw-toggle.is-hidden {
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
}


/* Ajuste fino para layouts diferentes:
   Se o botão ficar alto/baixo, altere o "top" acima.
*/


/* Alerta de dados de login (Passo Acesso) */
.login-alert{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:14px 16px;
  border-radius:14px;
  background: #fff7ed;
  border: 1px solid rgba(249,115,22,.35);
  box-shadow: 0 10px 28px rgba(249,115,22,.08);
  margin: 10px 0 18px 0;
}

.login-alert-icon{
  width:38px;
  height:38px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(249,115,22,.14);
  font-size:18px;
  flex: 0 0 38px;
}

.login-alert-content{
  font-size: 0.95rem;
  color:#111827;
  line-height:1.35;
}

.login-alert-sub{
  margin-top:6px;
  font-size: 0.85rem;
  color:#6b7280;
}

.login-alert-check{
  margin-top:10px;
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:0.88rem;
  color:#111827;
}

.login-alert-check input{
  margin-top:3px;
  transform: scale(1.05);
}



/* ---------- UPLOAD ---------- */

/* grid dos dois cards (selfie / documento) */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }
}

.upload-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f5;
}

.upload-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.upload-help {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}

/* QUADRO DA PRÉ-VISUALIZAÇÃO */
.upload-preview {
  min-height: 160px;
  border-radius: 12px;
  border: 1px dashed #d1d5db;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  margin-bottom: 16px;
  color: #9ca3af;
  font-size: 13px;
  overflow: hidden;          /* <<< IMPORTANTE: corta qualquer excesso da imagem */
}

/* imagem “normal” dentro do preview */
.upload-preview img {
  max-width: 100%;
  max-height: 150px;
  border-radius: 8px;
  object-fit: cover;
}

/* classe usada pelo JS quando faz o preview */
.upload-image {
  max-width: 100%;
  max-height: 150px;
  border-radius: 8px;
  object-fit: cover;
}

/* preview quando é PDF */
.pdf-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}

.pdf-icon {
  font-size: 20px;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Esconde o input nativo */
.upload-input-hidden {
  display: none;
}

/* Botão estilizado */
.btn-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: #f97316;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  box-shadow: 0 6px 15px rgba(249, 115, 22, 0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.btn-upload:hover {
  background: #ea580c;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.45);
  transform: translateY(-1px);
}

.btn-upload:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.upload-filename {
  font-size: 12px;
  color: #6b7280;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-placeholder {
  max-width: 70%;
  max-height: 70%;
  opacity: 0.7;
}

/* ---------- RADIO (USO DO VEÍCULO) ---------- */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.85rem;
}

.radio-item input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.radio-item span {
  flex: 1;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

.uso-aluguel-extra {
  margin-top: 10px;
}

@media (max-width: 480px) {
  .radio-item {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
}

/* ---------- VEÍCULOS ---------- */

.veiculo-card {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: #f9fafb;
  margin-bottom: 10px;
}

.veiculo-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ---------- CONTRATO ---------- */

.contract-box {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: #f9fafb;
  margin-top: 6px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.45;
}

.contract-accept {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.83rem;
}

.contract-accept input {
  margin-top: 3px;
}

.contract-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.contract-tag.accepted {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

/* ---------- BOTÕES ---------- */

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(255, 122, 26, 0.45);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-secondary:hover {
  background: #d1d5db;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- LGPD FOOTNOTE ---------- */

.lgpd-note {
  margin-top: 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

.plan-info {
  margin-top: 6px;
  font-size: 0.85rem;
  line-height: 1.4;
  background: #fff7ec;
  border: 1px solid #ffb66a;
  border-radius: 8px;
  padding: 8px 10px;
  color: #444;
  display: none;
}

.plan-info.active {
  display: block;
}

/* AVISO E-MAIL JÁ CADASTRADO */

.step2-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.step2-loading-overlay.visible {
  display: flex;
}

.step2-loading-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 28px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  font-family: inherit;
}

.step2-loading-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #f0f0f0;
  border-top-color: #ff6b35;
  margin: 0 auto 12px;
  animation: step2-spin 0.8s linear infinite;
}

.step2-loading-text {
  font-size: 14px;
  color: #333;
}

.step2-toast-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.step2-toast-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.step2-toast-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.step2-toast-text {
  margin: 0 0 16px;
  font-size: 14px;
  color: #444;
}

.step2-toast-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

@keyframes step2-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Detalhes do endereço: wrapper que começa escondido */
.endereco-detalhes.hidden {
  display: none;
}

/* ===== Modal dica selfie ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-overlay.is-visible {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 22px 18px;
  max-width: 360px;
  width: 92%;
  box-shadow: 0 18px 45px rgba(0,0,0,0.22);
  position: relative;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-text {
  font-size: 14px;
  color: #555;
  margin-bottom: 12px;
}

.modal-image-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.modal-image {
  max-width: 200px;
  width: 100%;
  height: auto;
}

/* ---------- ANIMAÇÃO ---------- */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- RESPONSIVO ---------- */

@media (max-width: 600px) {
  .signup-card {
    padding: 24px 16px 20px;
  }

  .signup-title {
    font-size: 1.6rem;
  }

  .stepper {
    padding: 0;
  }

  .step-label {
    display: none;
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .form-inline {
    flex-direction: column;
  }
}
