/* ============================================================
   CONFIANZA JURÍDICA — Modal de Registro / Afiliación
   Premium 3-Step Registration Flow
   ============================================================ */

/* ===== MODAL OVERLAY ===== */
.reg-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 22, 40, 0.70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 16px;
}

.reg-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== MODAL CONTAINER ===== */
.reg-modal {
  background: var(--white);
  border-radius: 28px;
  max-width: 520px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
  transform: scale(0.92) translateY(30px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  font-size: 118%; /* ↗ escala uniforme de todo el modal */
}

.reg-overlay.active .reg-modal {
  transform: scale(1) translateY(0);
}

/* ===== MODAL HEADER ===== */
.reg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--gray-light);
}

/* ── Mode Tabs ── */
.reg-mode-tabs {
  display: flex;
  gap: 6px;
  background: var(--gray-light);
  border-radius: 12px;
  padding: 4px;
}

.reg-mode-tab {
  flex: 1;
  padding: 9px 22px;
  border: none;
  border-radius: 9px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.reg-mode-tab.active {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  color: #fff;
  box-shadow: 0 4px 14px rgba(13,43,142,.25);
}

.reg-mode-tab:not(.active):hover {
  color: var(--text-primary);
  background: rgba(0,0,0,.04);
}

.reg-close {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.reg-close:hover {
  background: var(--gray-light);
  color: var(--text-primary);
}

.reg-close svg {
  width: 20px;
  height: 20px;
}

/* ===== PROGRESS BAR ===== */
.reg-progress {
  padding: 16px 28px 0;
  flex-shrink: 0;
}

.reg-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 8px;
}

.reg-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid var(--gray-light);
  color: var(--gray-mid);
  background: var(--white);
  transition: all 0.4s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.reg-step-dot.active {
  border-color: var(--blue-mid);
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  box-shadow: 0 4px 16px rgba(30, 86, 214, 0.35);
}

.reg-step-dot.completed {
  border-color: #2d8f4e;
  color: var(--white);
  background: linear-gradient(135deg, #2d8f4e, #4ade80);
  box-shadow: 0 4px 16px rgba(45, 143, 78, 0.30);
}

.reg-step-line {
  width: 60px;
  height: 3px;
  background: var(--gray-light);
  border-radius: 3px;
  transition: background 0.4s ease;
  flex-shrink: 0;
}

.reg-step-line.completed {
  background: linear-gradient(90deg, #2d8f4e, #4ade80);
}

.reg-steps-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.reg-step-label {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-mid);
  text-align: center;
  transition: color 0.3s ease;
  letter-spacing: 0.02em;
}

.reg-step-label.active { color: var(--blue-mid); font-weight: 700; }
.reg-step-label.completed { color: #2d8f4e; }

/* ===== MODAL BODY (scrollable) ===== */
.reg-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 28px 28px;
  position: relative;
}

.reg-body::-webkit-scrollbar { width: 4px; }
.reg-body::-webkit-scrollbar-thumb {
  background: var(--gray-light);
  border-radius: 4px;
}

/* ===== STEP PANELS ===== */
.reg-step-panel {
  display: none;
  animation: stepFadeIn 0.45s ease forwards;
}

.reg-step-panel.active {
  display: block;
}

/* Login panel — managed separately via inline display style */
.reg-login-panel {
  animation: stepFadeIn 0.45s ease;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===== STEP HEADER ===== */
.reg-step-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.2;
}

.reg-step-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* ===== FORM ELEMENTS ===== */
.reg-field {
  margin-bottom: 20px;
}

.reg-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.reg-input-wrapper {
  position: relative;
}

.reg-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--off-white);
  border: 2px solid var(--gray-light);
  border-radius: 14px;
  outline: none;
  transition: all 0.3s ease;
}

.reg-input:focus {
  border-color: var(--blue-mid);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(30, 86, 214, 0.10);
}

.reg-input::placeholder {
  color: var(--gray-mid);
}

.reg-input.error {
  border-color: #e53e3e;
  background: #fff5f5;
}

.reg-error-msg {
  font-size: 0.78rem;
  color: #e53e3e;
  margin-top: 6px;
  display: none;
  font-weight: 500;
}

.reg-input.error + .reg-error-msg,
.reg-field.has-error .reg-error-msg {
  display: block;
}

/* Password wrapper — needed for absolute-positioned toggle */
.reg-pass-wrapper {
  position: relative;
}

.reg-pass-wrapper .reg-input {
  padding-right: 48px;
}

/* Password toggle */
.reg-pass-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-mid);
  padding: 4px;
  transition: color 0.25s ease;
}

.reg-pass-toggle:hover { color: var(--blue-mid); }
.reg-pass-toggle svg { width: 20px; height: 20px; }

/* ===== UPLOAD ZONES ===== */
.reg-upload-zone {
  border: 2px dashed var(--gray-light);
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s ease;
  background: var(--off-white);
  position: relative;
  margin-bottom: 20px;
}

.reg-upload-zone:hover,
.reg-upload-zone.drag-over {
  border-color: var(--blue-mid);
  background: rgba(30, 86, 214, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 86, 214, 0.10);
}

.reg-upload-zone.drag-over {
  border-style: solid;
  background: rgba(30, 86, 214, 0.08);
}

.reg-upload-zone.uploaded {
  border-color: #2d8f4e;
  border-style: solid;
  background: rgba(45, 143, 78, 0.04);
}

.reg-upload-zone.uploading {
  border-color: var(--blue-mid);
  border-style: solid;
  pointer-events: none;
}

.reg-upload-zone.upload-error {
  border-color: #e53e3e;
  border-style: solid;
  background: rgba(229, 62, 62, 0.04);
}

.reg-upload-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

.reg-upload-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.reg-upload-desc {
  font-size: 0.82rem;
  color: #3b82f6;
  line-height: 1.5;
  margin-bottom: 14px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.20);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Upload buttons row */
.reg-upload-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.reg-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 100px;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.reg-upload-btn:hover {
  border-color: var(--blue-mid);
  color: var(--blue-mid);
  background: rgba(30, 86, 214, 0.04);
  transform: translateY(-1px);
}

.reg-upload-btn svg {
  width: 16px;
  height: 16px;
}

.reg-upload-formats {
  font-size: 0.72rem;
  color: var(--gray-mid);
  margin-top: 12px;
  letter-spacing: 0.02em;
}

/* Upload progress bar */
.reg-upload-progress {
  display: none;
  margin-top: 14px;
}

.reg-upload-progress.active { display: block; }

.reg-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--gray-light);
  border-radius: 6px;
  overflow: hidden;
}

.reg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-mid), var(--blue-light));
  border-radius: 6px;
  width: 0%;
  transition: width 0.3s ease;
}

.reg-upload-progress .reg-progress-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 6px;
  text-align: center;
  font-weight: 500;
}

/* Upload success state */
.reg-upload-result {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(45, 143, 78, 0.06);
  border-radius: 14px;
  margin-top: 12px;
}

.reg-upload-result.active { display: flex; }

.reg-upload-result-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2d8f4e, #4ade80);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.reg-upload-result-info {
  flex: 1;
}

.reg-upload-result-name {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.reg-upload-result-detail {
  font-size: 0.75rem;
  color: #2d8f4e;
  font-weight: 600;
}

.reg-upload-result-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-mid);
  padding: 4px;
  transition: color 0.25s ease;
}

.reg-upload-result-remove:hover { color: #e53e3e; }
.reg-upload-result-remove svg { width: 18px; height: 18px; }

/* Upload error state */
.reg-upload-error-msg {
  display: none;
  padding: 12px 16px;
  background: rgba(229, 62, 62, 0.06);
  border-radius: 12px;
  margin-top: 10px;
  font-size: 0.82rem;
  color: #e53e3e;
  font-weight: 500;
  line-height: 1.5;
}

.reg-upload-error-msg.active { display: block; }

/* ===== PIN INPUT ===== */
.reg-pin-wrapper {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 8px 0 6px;
  flex-wrap: wrap;
}

.reg-pin-input {
  width: 38px;
  height: 46px;
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--off-white);
  border: 2px solid var(--gray-light);
  border-radius: 10px;
  outline: none;
  transition: all 0.3s ease;
}

.reg-pin-input:focus {
  border-color: var(--blue-mid);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(30, 86, 214, 0.10);
}

.reg-pin-error {
  display: block;
  text-align: center;
}

.reg-pin-hint {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 4px;
}

/* ===== CTA BUTTON ===== */
.reg-cta {
  width: 100%;
  padding: 16px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-deep);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border: none;
  border-radius: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.35s var(--ease-smooth);
  box-shadow: 0 8px 28px rgba(201, 168, 76, 0.35);
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.reg-cta:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(201, 168, 76, 0.50);
}

.reg-cta:active:not(:disabled) {
  transform: translateY(0);
}

.reg-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.reg-cta svg {
  width: 18px;
  height: 18px;
}

/* ===== SECURITY BADGE ===== */
.reg-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--gray-mid);
  font-weight: 500;
}

.reg-security svg {
  width: 14px;
  height: 14px;
}

/* ===== IDENTITY MISMATCH POPUP ===== */
.reg-mismatch-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 200;
  background: rgba(10, 22, 40, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  animation: mismatchFadeIn 0.3s ease;
  border-radius: 20px;
}

.reg-mismatch-overlay.active {
  display: flex;
}

@keyframes mismatchFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mismatchSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.reg-mismatch-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px 28px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: mismatchSlideUp 0.35s ease;
}

.reg-mismatch-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  line-height: 1;
}

.reg-mismatch-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a2a44;
  margin-bottom: 10px;
}

.reg-mismatch-msg {
  font-size: 0.88rem;
  color: #5a6a7a;
  line-height: 1.55;
  margin-bottom: 22px;
}

.reg-mismatch-msg strong {
  color: #1a2a44;
}

.reg-mismatch-btn {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #c9a84c 0%, #d4b862 100%);
  color: #1a2a44;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
}

.reg-mismatch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
}

/* ===== LOGIN LINK ===== */
.reg-login-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.reg-login-link a {
  color: var(--blue-mid);
  font-weight: 600;
  transition: color 0.25s ease;
}

.reg-login-link a:hover { color: var(--blue-deep); }

/* ── Forgot password link ── */
.reg-forgot-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-mid);
  text-decoration: none;
  transition: color .15s;
  white-space: nowrap;
}
.reg-forgot-link:hover { color: var(--blue-deep); text-decoration: underline; }

/* ── Forgot password back button ── */
.reg-forgot-back {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-family: var(--font-head);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: color .15s;
  margin-bottom: 4px;
}
.reg-forgot-back:hover { color: var(--blue-mid); }

/* ── Forgot password success message ── */
.reg-forgot-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 14px;
  line-height: 1.5;
}

.reg-login-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* ===== STEP 3: SUBSCRIPTION CARD ===== */
.reg-sub-card {
  background: var(--off-white);
  border: 1.5px solid var(--gray-light);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
}

.reg-sub-badge {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  color: var(--white);
  padding: 10px 16px;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.reg-sub-details {
  padding: 16px;
}

.reg-sub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
}

.reg-sub-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.reg-sub-value {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  max-width: 60%;
}

.reg-sub-divider {
  height: 1px;
  background: var(--gray-light);
  margin: 6px 0;
}

.reg-sub-row-price {
  padding: 10px 0;
}

.reg-sub-price {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--blue-deep);
}

.reg-sub-price small {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.reg-sub-includes {
  background: rgba(45, 143, 78, 0.05);
  border-top: 1px solid rgba(45, 143, 78, 0.15);
  padding: 14px 16px;
}

.reg-sub-includes-title {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  color: #2d8f4e;
  margin-bottom: 8px;
}

.reg-sub-includes ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reg-sub-includes li {
  font-size: 0.78rem;
  color: var(--text-primary);
  padding: 3px 0;
  padding-left: 18px;
  position: relative;
}

.reg-sub-includes li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2d8f4e;
  font-weight: 700;
  font-size: 0.72rem;
}

.reg-sub-more-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--blue-mid);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 0 2px;
  transition: color 0.2s ease;
}

.reg-sub-more-btn:hover { color: var(--blue-deep); }

.reg-sub-more-btn svg {
  transition: transform 0.3s ease;
}

.reg-sub-more-btn.expanded svg {
  transform: rotate(180deg);
}

.reg-sub-more-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  animation: fadeInList 0.3s ease;
}

@keyframes fadeInList {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.reg-sub-more-list li {
  font-size: 0.78rem;
  color: var(--text-primary);
  padding: 3px 0;
  padding-left: 18px;
  position: relative;
}

.reg-sub-more-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2d8f4e;
  font-weight: 700;
  font-size: 0.72rem;
}

/* ===== COLLAPSIBLE TERMS PANEL ===== */
.reg-terms-panel {
  margin-bottom: 16px;
  border: 1.5px solid var(--gray-light);
  border-radius: 16px;
  overflow: hidden;
  animation: termsSlideIn 0.3s ease;
}

@keyframes termsSlideIn {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 2000px; }
}

.reg-terms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--off-white);
  border-bottom: 1px solid var(--gray-light);
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.reg-terms-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.reg-terms-close-btn:hover {
  border-color: #e53e3e;
  color: #e53e3e;
}

/* ===== STEP 3: CONTRACT ===== */
.reg-contract-viewer {
  max-height: 320px;
  overflow-y: auto;
  padding: 24px;
  background: var(--off-white);
  border: 1px solid var(--gray-light);
  border-radius: 16px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-primary);
}

.reg-contract-viewer::-webkit-scrollbar { width: 4px; }
.reg-contract-viewer::-webkit-scrollbar-thumb {
  background: var(--blue-mid);
  border-radius: 4px;
}

.reg-contract-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--blue-deep);
  text-align: center;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reg-contract-field {
  display: inline;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), rgba(240, 208, 128, 0.15));
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: var(--blue-deep);
  font-family: var(--font-head);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.reg-contract-scroll-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-mid);
  margin-bottom: 16px;
  font-weight: 500;
}

/* Checkboxes */
.reg-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.reg-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.reg-checkbox-label input[type="checkbox"] {
  display: none;
}

.reg-checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid var(--gray-light);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  margin-top: 1px;
}

.reg-checkbox-label input:checked + .reg-checkbox-custom {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  border-color: var(--blue-mid);
}

.reg-checkbox-custom svg {
  width: 14px;
  height: 14px;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.reg-checkbox-label input:checked + .reg-checkbox-custom svg {
  opacity: 1;
}

.reg-checkbox-text a {
  color: var(--blue-mid);
  font-weight: 600;
  text-decoration: underline;
}

/* ===== SUCCESS SCREEN ===== */
.reg-success {
  text-align: center;
  padding: 20px 0;
}

.reg-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2d8f4e, #4ade80);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 12px 36px rgba(45, 143, 78, 0.30);
  animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.reg-success-icon svg {
  width: 40px;
  height: 40px;
  color: var(--white);
}

.reg-success-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.reg-success-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.reg-success-id {
  display: inline-block;
  padding: 12px 24px;
  background: var(--off-white);
  border: 1px solid var(--gray-light);
  border-radius: 14px;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--blue-deep);
  letter-spacing: 0.05em;
  margin-bottom: 28px;
}

.reg-success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reg-success-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.35);
  transition: all 0.3s ease;
}

.reg-success-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(37, 211, 102, 0.50);
}

.reg-success-close {
  padding: 12px 24px;
  background: transparent;
  border: 2px solid var(--gray-light);
  border-radius: 100px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.reg-success-close:hover {
  border-color: var(--blue-mid);
  color: var(--blue-mid);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 580px) {
  .reg-modal {
    max-height: 100vh;
    border-radius: 0;
    max-width: 100%;
    height: 100%;
  }

  .reg-overlay {
    padding: 0;
  }

  .reg-body {
    padding: 20px 20px 28px;
  }

  .reg-header {
    padding: 16px 20px 0;
  }

  .reg-progress {
    padding: 12px 20px 0;
  }

  .reg-contract-viewer {
    max-height: 260px;
    padding: 16px;
  }

  .reg-pin-input {
    width: 42px;
    height: 50px;
    font-size: 1.1rem;
  }
}

/* ===== QR POPUP (Desktop → Mobile Camera) ===== */
.reg-qr-popup {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  z-index: 10;
  align-items: center;
  justify-content: center;
  animation: qrFadeIn 0.35s ease;
}

.reg-qr-popup.active {
  display: flex;
}

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

.reg-qr-content {
  text-align: center;
  padding: 20px;
  position: relative;
}

.reg-qr-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
  z-index: 5;
}

.reg-qr-close svg {
  width: 16px;
  height: 16px;
  color: var(--gray-mid);
  transition: color 0.25s ease;
}

.reg-qr-close:hover {
  border-color: #e53e3e;
  background: rgba(229, 62, 62, 0.06);
}

.reg-qr-close:hover svg {
  color: #e53e3e;
}

.reg-qr-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.reg-qr-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.reg-qr-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.reg-qr-code {
  width: 180px;
  height: 180px;
  margin: 0 auto 14px;
  background: var(--white);
  border: 2px solid var(--gray-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.reg-qr-code canvas,
.reg-qr-code img {
  width: 160px !important;
  height: 160px !important;
  border-radius: 8px;
}

/* Animated scanning border */
.reg-qr-code::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid transparent;
  border-top-color: var(--blue-mid);
  border-radius: 16px;
  animation: qrSpin 2s linear infinite;
}

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

.reg-qr-session {
  font-size: 0.75rem;
  color: var(--blue-mid);
  font-weight: 600;
  margin-bottom: 12px;
  animation: qrPulse 1.5s ease-in-out infinite;
}

@keyframes qrPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.reg-qr-cancel {
  padding: 8px 24px;
  background: transparent;
  border: 1.5px solid var(--gray-light);
  border-radius: 100px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.reg-qr-cancel:hover {
  border-color: #e53e3e;
  color: #e53e3e;
}
