:root {
  --orange:      #FF9900;
  --orange-dk:   #e08700;
  --orange-lt:   #FFF7EB;
  --text:        #1A1A1A;
  --sub:         #6B7280;
  --border:      #E5E7EB;
  --bg:          #FFFFFF;
  --white:       #FFFFFF;
  --error:       #DC2626;
  --ok:          #16A34A;
  --radius:      10px;
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── MAIN AREA ────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 32px;
}

/* ── LOGO (encima de la card) ─────────────── */
.logo-area {
  margin-bottom: 28px;
  text-align: center;
}

.logo-tagline {
  margin-top: 6px;
  font-size: 12px;
  color: var(--sub);
  letter-spacing: .3px;
}

/* ── CARD ─────────────────────────────────── */
.card {
  background: var(--white);
  width: 100%;
  max-width: 640px;
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.07);
  overflow: hidden;
}

/* ── STEPPER (barra + indicadores) ───────── */
.progress-track {
  height: 3px;
  background: var(--border);
  position: relative;
}

.progress-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  background: var(--orange);
  transition: width .4s ease;
}

.step-indicators {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px 0;
}

.si-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: #C0C0C0;
  transition: color .3s;
}

.si-item.active { color: var(--orange); }
.si-item.done   { color: var(--sub); }

.si-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  transition: all .3s;
  flex-shrink: 0;
}

.si-item.active .si-num {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.si-item.done .si-num {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
  font-size: 12px;
}

.si-connector {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 8px 0;
}

/* ── CARD BODY ────────────────────────────── */
.card-body {
  padding: 28px 32px 36px;
}

/* Wizard steps */
.step { display: none; }
.step.active {
  display: block;
  animation: up .28s ease both;
}

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

/* ── STEP HEADING ─────────────────────────── */
.sh {
  margin-bottom: 22px;
}

.sh h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.sh p {
  font-size: 13px;
  color: var(--sub);
  margin-top: 3px;
  line-height: 1.5;
}

/* ── ALERT ────────────────────────────────── */
.alert {
  display: none;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--error);
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
}

.alert-danger {
  display: block;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--error);
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
}

/* ── TERMS ────────────────────────────────── */
.terms-box {
  background: var(--orange-lt);
  border: 1px solid #FFD580;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 22px;
}

.terms-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.terms-row input[type="checkbox"] {
  width: 16px; height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.terms-row label {
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
  cursor: pointer;
}

.terms-row a {
  color: var(--orange-dk);
  font-weight: 600;
  text-decoration: none;
}

.terms-row a:hover { text-decoration: underline; }

.doc-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.doc-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--orange-dk);
  background: rgba(255,153,0,.1);
  border: 1px solid #FFD580;
  border-radius: 6px;
  padding: 5px 11px;
  text-decoration: none;
  transition: background .2s;
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  cursor: pointer;
}

.doc-btn:hover { background: rgba(255,153,0,.2); }

/* ── FORM FIELDS ──────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 4px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.field label .req { color: var(--orange); }

.inp {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #FAFAFA;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
}

.inp::placeholder { color: #B0B5BD; }

.inp:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(255,153,0,.12);
}

.inp.err, .is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(220,38,38,.08);
}

.invalid-feedback {
  color: var(--error);
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
}

/* ── PRICE + BANK ─────────────────────────── */
.price-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--orange-lt);
  border: 1px solid #FFD580;
  border-radius: var(--radius);
  margin-bottom: 18px;
}

.price-strip .ps-label {
  font-size: 13px;
  color: var(--sub);
  font-weight: 500;
}

.price-strip .ps-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--orange-dk);
  letter-spacing: -.5px;
}

/* Tabla banco */
.bank-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  font-size: 13px;
}

.bank-table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--sub);
  background: #F9FAFB;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}

.bank-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.bank-table tr:last-child td { border-bottom: none; }

.bank-table td:first-child {
  color: var(--sub);
  font-weight: 500;
  width: 42%;
}

.bank-table td:last-child { font-weight: 600; }

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--orange);
  font-family: inherit;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
  transition: background .2s;
}

.copy-btn:hover { background: var(--orange-lt); }

/* Upload */
.upload-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.upload-label .req { color: var(--orange); }

.upload-zone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .25s, background .25s;
  position: relative;
  background: #FAFAFA;
}

.upload-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}

.upload-zone:hover {
  border-color: var(--orange);
  background: var(--orange-lt);
}

.upload-zone.filled {
  border-color: var(--ok);
  background: #F0FDF4;
}

.uz-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.uz-hint {
  font-size: 12px;
  color: var(--sub);
}

.uz-file {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ok);
  margin-top: 5px;
}

/* ── BOTONES ──────────────────────────────── */
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.actions.right { justify-content: flex-end; }

.btn {
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 11px 24px;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  width: 100%;
  justify-content: center;
}

.btn-primary:hover:not(:disabled) {
  background: var(--orange-dk);
}

.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--sub);
  border: 1.5px solid var(--border);
  width: auto;
}

.btn-secondary:hover:not(:disabled) {
  border-color: #C0C0C0;
  color: var(--text);
}

/* Cuando hay botón atrás + finalizar */
.actions-split {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.actions-split .btn-primary { flex: 1; }

/* Spinner */
.spin {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rot .7s linear infinite;
}

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

/* ── ÉXITO ────────────────────────────────── */
.success {
  text-align: center;
  padding: 14px 0 6px;
}

.ok-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #DCFCE7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: pop .45s cubic-bezier(.175,.885,.32,1.275) both;
}

@keyframes pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.ok-circle svg { width: 30px; height: 30px; }

.success h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.success p {
  font-size: 13.5px;
  color: var(--sub);
  line-height: 1.7;
  max-width: 340px;
  margin: 0 auto 20px;
}

.ok-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ok-chip {
  background: #F3F4F6;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sub);
}

/* ── FOOTER ───────────────────────────────── */
footer {
  background: #E8E8E8;
  border-top: 1px solid #D5D5D5;
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: #888;
}

footer .f-brand { font-weight: 600; color: #555; }

footer .f-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

footer .f-links a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
}

footer .f-links a:hover { text-decoration: underline; }

/* ── WHATSAPP BUTTON ──────────────────────── */
.wa-help {
  margin-top: 20px;
  text-align: center;
}

.wa-help p {
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 10px;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(37,211,102,.3);
}

.btn-wa:hover {
  background: #1ebe5d;
  box-shadow: 0 4px 14px rgba(37,211,102,.4);
}

.wa-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
}

/* ── RESPONSIVE ──────────────────────────── */

@media (max-width: 700px) {
  .card { max-width: 100%; }
  .logo-area img { max-width: 320px !important; }
}

@media (max-width: 560px) {
  .main { padding: 20px 12px 28px; }
  .card { border-radius: 12px; }
  .card-body { padding: 22px 20px 28px; }
  .step-indicators { padding: 16px 16px 0; }
  .si-item { font-size: 11px; gap: 5px; }
  .row-2 { grid-template-columns: 1fr; }
  .price-strip { flex-direction: column; align-items: flex-start; gap: 4px; }
  .ps-val { font-size: 18px; }
  .actions-split { flex-wrap: wrap; }
  .actions-split .btn-secondary { order: 2; width: 100%; justify-content: center; }
  .actions-split .btn-primary { order: 1; }
  footer { flex-direction: column; text-align: center; gap: 10px; }
  footer .f-links { justify-content: center; }
}

@media (max-width: 380px) {
  body { font-size: 14px; }
  .card { border-radius: 0; box-shadow: none; }
  .main { padding: 16px 0 24px; }
  .card-body { padding: 20px 16px 24px; }
  .sh h2 { font-size: 16px; }
  .btn { font-size: 13px; padding: 10px 16px; }
  .bank-table td, .bank-table th { padding: 8px 10px; font-size: 12px; }
}
