/* ============================================================
   Click Antecipa — Wizard de Cadastro de Cedente (KYC)
   Identidade oficial: #004BD8 (azul) + #FF6A3D (laranja)
   ============================================================ */

:root {
  --brand-blue: #004BD8;            /* Click Blue oficial (PANTONE 2728 C) */
  --brand-blue-dark: #002A8F;        /* Navy Blue secundário oficial (PANTONE 286 C) */
  --brand-blue-light: #E8EEFF;
  --brand-orange: #FF6A3D;           /* Click Orange — acento pontual (PANTONE 165 C) */
  --brand-navy: #020A1F;             /* Navy Dark — fundo dark mode (PANTONE 2767 C) */

  --ink-900: #1A202C;                /* Preto Texto oficial */
  --ink-700: #2A3553;
  --ink-500: #5C6783;
  --ink-300: #A8B0C4;
  --ink-100: #E6E9F2;
  --bg: #F4F6FB;
  --white: #FFFFFF;

  --green: #00A85A;
  --green-light: #E5F7EE;
  --amber: #E8A100;
  --amber-light: #FFF6E0;
  --red: #D63A3A;
  --red-light: #FCE7E7;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 24px rgba(13, 26, 82, 0.06);
  --shadow-hover: 0 8px 32px rgba(13, 26, 82, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink-900);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

/* ============================================================
   HEADER FIXO
   ============================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--ink-100);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header .logo { height: 28px; }
.header-actions { display: flex; gap: 8px; }
.header-link {
  color: var(--ink-500);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.header-link:hover { background: var(--bg); color: var(--ink-900); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */

.progress-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--ink-100);
  padding: 20px 24px 24px;
}
.progress-meta {
  max-width: 880px;
  margin: 0 auto 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-500);
}
.progress-meta strong { color: var(--brand-blue); font-weight: 600; }

.progress-track {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}
.progress-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--ink-100);
  color: var(--ink-300);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  z-index: 2;
}
.progress-label {
  font-size: 11px;
  color: var(--ink-500);
  white-space: nowrap;
  text-align: center;
}
.progress-step.is-done .progress-dot {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: var(--white);
}
.progress-step.is-active .progress-dot {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(0, 75, 216, 0.18);
}
.progress-step.is-active .progress-label,
.progress-step.is-done .progress-label {
  color: var(--ink-900);
  font-weight: 600;
}
.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--ink-100);
  z-index: 1;
}
.progress-step.is-done:not(:last-child)::after { background: var(--brand-blue); }

/* ============================================================
   STEP CARD (cada passo é uma seção)
   ============================================================ */

.main { padding: 32px 24px 80px; }
.step {
  display: none;
  max-width: 720px;
  margin: 0 auto;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.step.is-visible {
  display: block;
  animation: stepIn 0.22s ease-out;
}

.step-header { margin-bottom: 24px; }
.step-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-orange);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.step h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.step-sub {
  color: var(--ink-500);
  font-size: 15px;
  margin: 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin-bottom: 16px;
}

/* ============================================================
   FORM
   ============================================================ */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .span-2 { grid-column: span 2; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}
.field .hint { font-size: 12px; color: var(--ink-500); }
.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--ink-100);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink-900);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 75, 216, 0.12);
}
.field input[readonly] {
  background: var(--bg);
  color: var(--ink-500);
}
.field .lock-icon {
  position: relative;
}
.field-locked-note {
  font-size: 12px;
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.radio-pill {
  padding: 10px 16px;
  border: 1.5px solid var(--ink-100);
  border-radius: 24px;
  font-size: 14px;
  color: var(--ink-700);
  cursor: pointer;
  background: var(--white);
  transition: all 0.15s;
}
.radio-pill:hover { border-color: var(--brand-blue); }
.radio-pill.is-active {
  background: var(--brand-blue-light);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  font-weight: 600;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-700);
  cursor: pointer;
  padding: 8px 0;
}
.checkbox-row input { margin-top: 3px; accent-color: var(--brand-blue); }

/* ============================================================
   BUTTONS / NAV
   ============================================================ */

.step-nav {
  max-width: 720px;
  margin: 16px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.btn {
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: none;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: var(--brand-blue);
  color: var(--white);
}
.btn-primary:hover { background: var(--brand-blue-dark); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--ink-700);
  border: 1.5px solid var(--ink-100);
}
.btn-secondary:hover { border-color: var(--ink-300); background: var(--white); }
.btn-cta {
  background: var(--brand-orange);
  color: var(--white);
  font-size: 16px;
  padding: 15px 32px;
}
.btn-cta:hover { background: #E65A2D; }

/* ============================================================
   SÓCIOS — LIST + EDITOR
   ============================================================ */

.socios-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.socio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--ink-100);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
}
.socio-item:hover { border-color: var(--brand-blue); }
.socio-item.is-active { background: var(--brand-blue-light); border-color: var(--brand-blue); }
.socio-status { font-size: 12px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.socio-status.ok { background: var(--green-light); color: var(--green); }
.socio-status.pending { background: var(--amber-light); color: var(--amber); }
.socio-name { flex: 1; font-weight: 600; }
.socio-cpf { color: var(--ink-500); font-size: 13px; font-variant-numeric: tabular-nums; }

.btn-add {
  padding: 12px;
  border: 1.5px dashed var(--ink-300);
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--ink-500);
  font-weight: 600;
  width: 100%;
  text-align: center;
}
.btn-add:hover { border-color: var(--brand-blue); color: var(--brand-blue); }

/* ============================================================
   UPLOAD DE DOCUMENTOS
   ============================================================ */

.docs-group {
  margin-bottom: 24px;
}
.docs-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-500);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink-100);
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--ink-100);
  border-radius: var(--radius-sm);
  background: var(--white);
  margin-bottom: 8px;
  transition: all 0.15s;
}
.doc-item:hover { border-color: var(--brand-blue); }
.doc-item.is-uploaded { background: var(--green-light); border-color: var(--green); }
.doc-item.is-warning { background: var(--amber-light); border-color: var(--amber); }

.doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.doc-icon svg { display: block; }
.doc-item.is-uploaded .doc-icon { background: var(--green); color: var(--white); }
.doc-item.is-warning .doc-icon { background: var(--amber); color: var(--white); }

.doc-meta { flex: 1; min-width: 0; }
.doc-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.doc-desc { font-size: 12px; color: var(--ink-500); }
.doc-file {
  font-size: 12px;
  color: var(--ink-700);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-warning {
  font-size: 12px;
  color: var(--amber);
  margin-top: 4px;
  font-weight: 600;
}

.btn-upload {
  padding: 8px 14px;
  background: var(--brand-blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}
.btn-upload:hover { background: var(--brand-blue-dark); }
.btn-remove {
  background: transparent;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
}

.dropzone {
  border: 2px dashed var(--ink-300);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 24px;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--brand-blue);
  background: var(--brand-blue-light);
}
.dropzone-icon { font-size: 32px; margin-bottom: 8px; display: flex; justify-content: center; color: var(--ink-300); }
.dropzone:hover .dropzone-icon, .dropzone.is-drag .dropzone-icon { color: var(--brand-blue); }
.dropzone-text { font-weight: 600; color: var(--ink-700); }
.dropzone-hint { font-size: 12px; color: var(--ink-500); margin-top: 4px; }

/* ============================================================
   FOTOS (galeria de thumbnails)
   ============================================================ */

.fotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.foto-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-blue-light), #D6E0FF);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.foto-thumb .placeholder { font-size: 28px; opacity: 0.4; display: flex; align-items: center; justify-content: center; color: var(--brand-blue); }
.foto-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   REVISÃO FINAL
   ============================================================ */

.review-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-100);
}
.review-row:last-child { border-bottom: none; }
.review-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.review-icon.ok { background: var(--green-light); color: var(--green); }
.review-icon.warn { background: var(--amber-light); color: var(--amber); }
.review-row .review-text { flex: 1; }
.review-row .review-title { font-weight: 600; }
.review-row .review-desc { font-size: 13px; color: var(--ink-500); }
.review-row .review-action {
  background: transparent;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ink-700);
  cursor: pointer;
}

.next-steps {
  background: var(--brand-blue-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}
.next-steps h3 {
  font-size: 14px;
  margin: 0 0 10px;
  color: var(--brand-blue);
  font-weight: 700;
}
.next-steps ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink-700);
}
.next-steps li { margin-bottom: 4px; }

/* ============================================================
   TELA DE ACOMPANHAMENTO (passo 9)
   ============================================================ */

.tracking-header {
  background: linear-gradient(145deg, var(--brand-navy), #0d1a52);
  color: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 20px;
}
.tracking-header h1 { margin: 0 0 6px; font-size: 24px; }
.tracking-header p { margin: 0; opacity: 0.85; font-size: 14px; }
.protocol-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 13px;
  margin-top: 12px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 24px 0;
}
.pipeline-stage {
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1.5px solid var(--ink-100);
  position: relative;
}
.pipeline-stage .stage-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink-100);
  color: var(--ink-300);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  font-size: 14px;
  font-weight: 700;
}
.pipeline-stage.is-done .stage-icon { background: var(--green); color: var(--white); }
.pipeline-stage.is-active .stage-icon {
  background: var(--brand-blue);
  color: var(--white);
  animation: pulse 1.6s infinite;
}
.pipeline-stage.is-reject .stage-icon { background: var(--red); color: var(--white); }
.pipeline-stage .stage-label { font-size: 12px; color: var(--ink-500); font-weight: 600; }
.pipeline-stage.is-active .stage-label,
.pipeline-stage.is-reject .stage-label,
.pipeline-stage.is-done .stage-label { color: var(--ink-900); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 75, 216, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(0, 75, 216, 0); }
}

.analysis-list { margin-top: 20px; }
.analysis-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--white);
  border: 1.5px solid var(--ink-100);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.analysis-row .a-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.analysis-row.is-done .a-icon { background: var(--green-light); color: var(--green); }
.analysis-row.is-running .a-icon {
  background: var(--amber-light);
  color: var(--amber);
  animation: spin 2s linear infinite;
}
.analysis-row.is-pending .a-icon { background: var(--ink-100); color: var(--ink-300); }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.a-meta { flex: 1; }
.a-title { font-weight: 600; font-size: 14px; }
.a-desc { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.a-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
}
.a-badge.ok { background: var(--green-light); color: var(--green); }
.a-badge.running { background: var(--amber-light); color: var(--amber); }
.a-badge.pending { background: var(--ink-100); color: var(--ink-500); }

/* ============================================================
   RESPONSIVO
   ============================================================ */

/* Etapa atual textual: aparece apenas no mobile como complemento da barra */
.progress-current {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-blue);
  margin: 4px 0 8px;
}

@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .step h1 { font-size: 22px; }
  .progress-label { display: none; }
  .progress-current { display: block; }
  .progress-track { gap: 2px; }
  .card { padding: 20px; }
  .pipeline { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .pipeline-stage { padding: 8px 4px; }
  .pipeline-stage .stage-label { font-size: 10px; }
  .header { padding: 12px 16px; }
  .main { padding: 24px 16px 60px; }
  .step-nav { flex-direction: column-reverse; }
  .step-nav .btn { width: 100%; justify-content: center; }
  .save-label { display: none; }
  .radio-group { gap: 8px; }
  .radio-pill { padding: 10px 14px; font-size: 13px; }
  .doc-item { padding: 12px; gap: 10px; }
  .btn-cta { font-size: 15px; padding: 14px 24px; }
}

@media (max-width: 480px) {
  .progress-dot { width: 24px; height: 24px; font-size: 11px; }
  .step h1 { font-size: 20px; }
  .step-eyebrow { font-size: 11px; }
  .pipeline-stage .stage-icon { width: 26px; height: 26px; font-size: 12px; }
  /* inputs em 16px no mobile: evita o zoom automático do iOS Safari ao focar
     (com <16px ele dá zoom e desalinha o wizard). (auditoria 07/07) */
  input, select, textarea,
  .field input, .field select, .field textarea { font-size: 16px; }
}
