:root {
  --azul: #0066b3;
  --azul-escuro: #004e8a;
  --cinza: #6b7280;
  --cinza-claro: #e5e7eb;
  --erro: #dc2626;
  --sucesso: #16a34a;
  --raio: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(135deg, #eef4fb, #dceaf7);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: #1f2937;
}

.card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--raio);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  padding: 28px 24px 24px;
}

/* Barra de progresso */
.progress {
  height: 8px;
  background: var(--cinza-claro);
  border-radius: 999px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--azul), var(--azul-escuro));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress__label {
  margin: 8px 0 20px;
  font-size: 13px;
  color: var(--cinza);
}

/* Etapas */
.step-container { min-height: 180px; }

.step h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
.step p.hint {
  margin: 0 0 18px;
  color: var(--cinza);
  font-size: 14px;
}

label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cinza-claro);
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, select:focus { border-color: var(--azul); }

input[type="file"] {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--cinza-claro);
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
}

.file-preview {
  margin-top: 10px;
  font-size: 13px;
  color: var(--sucesso);
}

/* Opções de dia de vencimento */
.options { display: flex; gap: 12px; }
.option {
  flex: 1;
  border: 2px solid var(--cinza-claro);
  border-radius: 10px;
  padding: 18px 0;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.option:hover { border-color: var(--azul); }
.option.selected {
  border-color: var(--azul);
  background: var(--azul);
  color: #fff;
}

/* Cartão de dependente */
.dependente {
  border: 1px solid var(--cinza-claro);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.dependente h3 { margin: 0 0 12px; font-size: 15px; color: var(--azul-escuro); }
.dependente .field { margin-bottom: 12px; }
.dependente .field:last-child { margin-bottom: 0; }

/* Ações */
.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.btn {
  padding: 12px 22px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--azul);
  color: #fff;
  transition: background 0.2s, opacity 0.2s;
}
.btn:hover { background: var(--azul-escuro); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--cinza); }
.btn--ghost:hover { background: #f3f4f6; }
.btn--primary { background: var(--sucesso); }
.btn--primary:hover { background: #15803d; }

.error {
  color: var(--erro);
  font-size: 14px;
  min-height: 18px;
  margin: 12px 0 0;
}

/* Sucesso */
.success { text-align: center; padding: 30px 10px; }
.success__icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--sucesso);
  color: #fff;
  font-size: 34px;
  display: flex; align-items: center; justify-content: center;
}
.success h2 { margin: 0 0 8px; }
.success p { color: var(--cinza); }

.field { margin-bottom: 16px; }

/* ---- Upload de documento (foto ou arquivo) ---- */
.upload__buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.btn-upload {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 10px;
  border: 2px dashed var(--cinza-claro);
  border-radius: 10px;
  background: #fafafa;
  font-size: 14px;
  font-weight: 600;
  color: var(--azul-escuro);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-upload:hover { border-color: var(--azul); background: #f0f7ff; }
.btn-upload__ico { font-size: 26px; }

.upload__empty {
  margin: 0;
  font-size: 13px;
  color: var(--cinza);
  text-align: center;
}
.upload__file {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--cinza-claro);
  border-radius: 10px;
  background: #f9fafb;
}
.upload__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.upload__fileicon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: #eef2f7;
  border-radius: 8px;
  flex-shrink: 0;
}
.upload__info { display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.upload__name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload__ok { font-size: 13px; color: var(--sucesso); }

/* ---- Modal da câmera ao vivo ---- */
.cam-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}
.cam-box {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cam-video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  max-height: 70vh;
}
.cam-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.cam-actions .btn { flex: 1; }
.cam-actions .btn--ghost { color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); }
.cam-actions .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }
