/* === BILLETÍN — REGISTRO PAGE STYLES === */

.registro-body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar del registro */
.reg-navbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.reg-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.reg-back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}
.reg-back-link:hover { color: var(--text); }

/* Layout principal */
.reg-main { flex: 1; padding: 40px 0 60px; }
.reg-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── SIDEBAR ── */
.reg-sidebar {
  position: sticky;
  top: 90px;
}
.sidebar-inner {
  background: white;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.sidebar-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; }
.sidebar-sub { font-size: 0.83rem; color: var(--muted); margin-bottom: 28px; line-height: 1.5; }

/* Steps progress */
.reg-steps { display: flex; flex-direction: column; }
.reg-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  opacity: 0.4;
  transition: opacity var(--transition);
}
.reg-step.active { opacity: 1; }
.reg-step.done { opacity: 0.85; }

.step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: white;
  font-weight: 700; font-size: 0.85rem; color: var(--muted);
  transition: all var(--transition);
  position: relative;
}
.reg-step.active .step-dot {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.reg-step.done .step-dot {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}
.step-icon-done { display: none; }
.step-num { display: block; }
.reg-step.done .step-icon-done { display: flex; color: var(--primary-dark); }
.reg-step.done .step-num { display: none; }
.reg-step.active .step-num { color: white; }

.step-info { flex: 1; }
.step-name { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.step-desc { font-size: 0.77rem; color: var(--muted); margin-top: 2px; }

.step-connector {
  width: 2px; height: 20px;
  background: var(--border);
  margin-left: 17px;
  border-radius: 4px;
  transition: background var(--transition);
}
.step-connector.done { background: var(--primary-light); }

.sidebar-secure {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}
.sidebar-secure svg { color: var(--primary); flex-shrink: 0; }

/* ── Mobile progress bar ── */
.mobile-progress {
  display: none;
  margin-bottom: 24px;
  background: white;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  border: 1.5px solid var(--border);
}
.mobile-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}
.mobile-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #4ade80);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  width: 25%;
}
.mobile-progress-label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

/* ── PANELS ── */
.reg-content { min-width: 0; }
.reg-panel {
  display: none;
  background: white;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  animation: panel-in 0.35s cubic-bezier(0.4,0,0.2,1);
}
.reg-panel.active { display: block; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.panel-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.panel-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.panel-icon.green  { background: var(--primary-light); color: var(--primary-dark); }
.panel-icon.blue   { background: var(--blue-light);    color: var(--blue); }
.panel-icon.orange { background: var(--orange-light);  color: var(--orange); }
.panel-icon.purple { background: var(--purple-light);  color: var(--purple); }

.panel-header h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 6px; }
.panel-header p  { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }

/* ── FORM FIELDS ── */
.field-group { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field-group label {
  display: block;
  font-size: 0.83rem; font-weight: 600;
  margin-bottom: 7px; color: var(--text-2);
}
.field-group input,
.field-group select,
.field-group textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font); font-size: 0.92rem; color: var(--text);
  background: var(--surface-2); outline: none;
  transition: all var(--transition);
  appearance: none;
}
.field-group input:focus,
.field-group select:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.field-group input.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }
.field-group input.valid { border-color: var(--primary); }

.input-icon-wrap { position: relative; }
.input-icon-wrap svg:first-child {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.input-icon-wrap input { padding-left: 40px; }
.password-wrap input { padding-right: 44px; }

.toggle-pass {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 4px;
  transition: color var(--transition);
}
.toggle-pass:hover { color: var(--text); }

.password-strength {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.strength-bar {
  flex: 1; height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.strength-fill {
  height: 100%; border-radius: var(--radius-full);
  transition: all 0.3s ease;
  width: 0;
}
#strength-label { font-size: 0.73rem; font-weight: 600; white-space: nowrap; }

.field-error {
  display: block; font-size: 0.77rem; color: #ef4444;
  margin-top: 5px; min-height: 18px;
}

/* Checkbox */
.checkbox-group { margin-top: 4px; }
.checkbox-label {
  display: flex; align-items: flex-start; gap: 11px;
  cursor: pointer; font-size: 0.875rem; color: var(--text-2); line-height: 1.5;
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkbox-custom {
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px solid var(--border-2);
  background: white; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  margin-top: 2px;
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--primary); border-color: var(--primary);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  width: 9px; height: 6px;
  border-left: 2px solid white; border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
  display: block;
}
.link-inline { color: var(--primary-dark); font-weight: 600; text-decoration: underline; }

/* Panel actions */
.panel-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 28px; padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 12px;
}

/* ── KYC UPLOAD ── */
.kyc-info-box {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--blue-light); border-radius: var(--radius-md);
  padding: 16px; margin-bottom: 28px;
  color: #1e3a8a; font-size: 0.85rem;
}
.kyc-info-box svg { color: #3b82f6; flex-shrink: 0; margin-top: 2px; }
.kyc-info-box strong { display: block; font-weight: 700; margin-bottom: 4px; }
.kyc-info-box p { margin: 0; opacity: 0.85; }

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.upload-selfie { grid-column: 1 / -1; }

.upload-card { position: relative; }
.file-input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.upload-label {
  display: block; cursor: pointer;
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  background: var(--surface-2);
}
.upload-label:hover {
  border-color: var(--primary);
  background: #f0fdf4;
}
.upload-label.has-file {
  border-color: var(--primary);
  border-style: solid;
}

.upload-preview {
  min-height: 140px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.upload-selfie .upload-preview { min-height: 100px; }
.upload-preview img {
  width: 100%; height: 100%;
  object-fit: cover; display: none;
  border-radius: calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px) 0 0;
}
.upload-preview.has-img img { display: block; }
.upload-preview.has-img .upload-placeholder { display: none; }

.upload-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px; text-align: center;
  color: var(--muted);
}
.upload-placeholder svg { color: var(--border-2); }
.upload-placeholder span { font-size: 0.88rem; font-weight: 600; }
.upload-placeholder small { font-size: 0.75rem; }
.selfie-placeholder { flex-direction: row; gap: 14px; text-align: left; }

.upload-footer {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  font-size: 0.75rem; color: var(--muted);
  border-top: 1px solid var(--border);
  background: white;
}

.upload-done-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--primary); color: white;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 700; display: none;
}
.upload-label.has-file .upload-done-badge { display: block; }

.kyc-tips {
  display: flex; flex-direction: column; gap: 10px;
  background: #fffbeb; border-radius: var(--radius-md);
  padding: 16px; margin-bottom: 8px;
}
.tip-item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.83rem; color: #78350f; }
.tip-icon { flex-shrink: 0; }

/* ── GEOLOCATION STATES ── */
.geo-state {
  padding: 20px 0;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 14px;
}
.geo-state.hidden { display: none !important; }

.geo-illustration {
  position: relative; width: 100px; height: 100px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.geo-pulse-ring {
  position: absolute; border-radius: 50%;
  border: 2px solid rgba(249, 115, 22, 0.3);
  animation: geo-pulse 2.5s ease-in-out infinite;
}
.geo-pulse-ring:nth-child(1) { width: 100%; height: 100%; }
.geo-pulse-ring:nth-child(2) { width: 70%; height: 70%; animation-delay: 0.5s; }
.geo-pulse-ring:nth-child(3) { width: 45%; height: 45%; animation-delay: 1s; }
@keyframes geo-pulse {
  0%, 100% { opacity: 0.2; transform: scale(0.95); }
  50% { opacity: 0.6; transform: scale(1.05); }
}
.geo-icon-center {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--orange-light); color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}

.geo-state h3 { font-size: 1.2rem; font-weight: 700; }
.geo-state > p { font-size: 0.88rem; color: var(--muted); max-width: 400px; line-height: 1.6; }

.geo-privacy {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.77rem !important; color: var(--muted) !important;
}
.geo-privacy svg { color: var(--primary); }

/* Loading spinner */
.geo-spinner { width: 64px; height: 64px; margin-bottom: 8px; }
.spinner-ring {
  width: 100%; height: 100%; border-radius: 50%;
  border: 4px solid var(--border);
  border-top-color: var(--orange);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success state */
.geo-success-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
  animation: pop-in 0.5s cubic-bezier(0.17,0.67,0.38,1.35);
}
@keyframes pop-in {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.geo-result-card {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px; width: 100%; max-width: 420px;
  text-align: left;
}
.geo-result-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.geo-result-row:last-child { border-bottom: none; }
.geo-result-row svg { color: var(--primary); flex-shrink: 0; margin-top: 3px; }
.geo-result-label { font-size: 0.74rem; color: var(--muted); margin-bottom: 2px; }
.geo-result-value { font-size: 0.9rem; font-weight: 600; }
.geo-coords-row {
  display: flex; align-items: center; gap: 7px;
  padding-top: 12px; margin-top: 4px;
  font-size: 0.73rem; color: var(--muted);
  font-family: monospace;
}
.geo-coords-row svg { color: var(--muted); }

.geo-warning {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fef3c7; border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 14px 16px; text-align: left;
  font-size: 0.84rem; color: #92400e;
  max-width: 420px; width: 100%;
}
.geo-warning.hidden { display: none; }
.geo-warning svg { color: #f59e0b; flex-shrink: 0; margin-top: 2px; }

.btn-sm { padding: 8px 18px; font-size: 0.82rem; }

/* Error state */
.geo-error-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: #fee2e2; color: #b91c1c;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.geo-manual-option {
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  text-align: left; width: 100%; max-width: 460px;
  font-size: 0.85rem; color: var(--text-2);
}
.geo-manual-option p { margin-bottom: 14px; }
.geo-manual-option strong { color: var(--text); }
.geo-manual-option .field-group { margin-bottom: 14px; }
.geo-manual-option .field-row { margin-bottom: 0; }

/* ── STEP 4 SUMMARY ── */
.summary-section { display: flex; flex-direction: column; gap: 16px; margin-bottom: 8px; }
.summary-block {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
}
.summary-block-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 700; color: var(--text-2);
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.summary-block-title svg { color: var(--primary); }
.summary-rows { display: flex; flex-direction: column; gap: 8px; }
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem;
}
.summary-row-label { color: var(--muted); }
.summary-row-value { font-weight: 600; color: var(--text); }
.summary-doc-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-2);
}
.doc-check { color: var(--primary); }
.summary-edit {
  position: absolute; top: 18px; right: 20px;
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px 12px; font-size: 0.77rem; font-weight: 600;
  cursor: pointer; color: var(--muted);
  font-family: var(--font);
  transition: all var(--transition);
}
.summary-edit:hover { border-color: var(--primary); color: var(--primary-dark); }

/* ── SUCCESS SCREEN ── */
.success-screen {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 20px 0 10px; gap: 16px;
  position: relative;
}
.success-confetti { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; height: 200px; }
.success-icon-wrap { position: relative; width: 100px; height: 100px; }
.success-ring {
  position: absolute; border-radius: 50%; top: 0; left: 0; right: 0; bottom: 0;
  animation: success-ring 1.5s ease-out forwards;
}
.success-ring-1 { border: 3px solid var(--primary-light); animation-delay: 0s; }
.success-ring-2 { border: 2px solid rgba(34,197,94,0.2); animation-delay: 0.3s; }
@keyframes success-ring {
  from { transform: scale(0.8); opacity: 1; }
  to   { transform: scale(1.5); opacity: 0; }
}
.success-icon {
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: white; box-shadow: 0 8px 24px rgba(34,197,94,0.4);
}
.success-screen h2 { font-size: 1.6rem; font-weight: 900; }
.success-screen > p { color: var(--muted); font-size: 0.92rem; }
.success-sub { max-width: 380px; line-height: 1.6; }

.success-next-steps {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface-2); border-radius: var(--radius-lg);
  border: 1.5px solid var(--border); padding: 20px;
  text-align: left; width: 100%; max-width: 380px;
}
.next-step-item { display: flex; align-items: center; gap: 14px; font-size: 0.88rem; color: var(--text-2); }
.next-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.8rem; flex-shrink: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .reg-container { grid-template-columns: 1fr; }
  .reg-sidebar { position: static; }
  .sidebar-inner { display: none; }
  .mobile-progress { display: block; }
}

@media (max-width: 600px) {
  .reg-panel { padding: 24px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .upload-grid { grid-template-columns: 1fr; }
  .upload-selfie { grid-column: 1; }
}

/* -- OTP Verification Panel -- */
.otp-inputs { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px 0 20px; }
.otp-digit { width: 46px; height: 54px; border: 2px solid var(--border); border-radius: var(--radius-md); font-size: 1.5rem; font-weight: 700; text-align: center; color: var(--text); background: var(--bg); transition: border-color 0.2s, box-shadow 0.2s; }
.otp-digit:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.otp-digit.filled { border-color: var(--primary-dark); background: var(--primary-light); }
.otp-sep { font-size: 1.2rem; color: var(--muted); margin: 0 2px; }
.otp-error-box { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; border-radius: var(--radius-md); padding: 12px 14px; font-size: 0.85rem; margin-bottom: 12px; }
.otp-success-box { background: #dcfce7; border: 1px solid #86efac; color: #166534; border-radius: var(--radius-md); padding: 12px 14px; font-size: 0.85rem; margin-bottom: 12px; text-align:center; font-weight: 600; }
.otp-resend-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font-size: 0.85rem; color: var(--muted); }
.btn-link { background: none; border: none; padding: 0; cursor: pointer; color: var(--primary-dark); font-size: 0.85rem; font-weight: 600; font-family: inherit; text-decoration: underline; }
.otp-help-note { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 16px; }
.panel-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.panel-icon { width: 42px; height: 42px; background: var(--primary-light); color: var(--primary-dark); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.panel-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 4px; }
.panel-sub { font-size: 0.88rem; color: var(--muted); }
