/* ================================================================
   SmartHub IT Store — Register & Login Styles (register.css)
   Primary Theme: Royal Blue (#1a56db) & Deep Navy (#1e3a8a)
   Glassmorphism Accent: Blur & Soft Blue Backdrops (#eff6ff, #dbeafe)
   ================================================================ */

/* ── Page Shell with Soft Ambient Blur Gradients ─────────────────── */
.reg-page {
  min-height: calc(100vh - 120px);
  background: radial-gradient(circle at 15% 15%, rgba(26, 86, 219, 0.15) 0%, transparent 45%),
              radial-gradient(circle at 85% 85%, rgba(37, 99, 235, 0.12) 0%, transparent 45%),
              linear-gradient(135deg, #eff6ff 0%, #f8fafc 60%, #e0e7ff 100%);
  padding: 40px 16px 60px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.reg-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(30, 58, 138, 0.14), 0 2px 12px rgba(30, 58, 138, 0.08);
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.8);
}

/* ── Top Brand Strip ──────────────────────────────────────────────── */
.reg-brand-strip {
  background: linear-gradient(135deg, #1e3a8a 0%, #1a56db 100%);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.reg-brand-logo-wrap {
  background: #ffffff;
  padding: 5px 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  flex-shrink: 0;
}
.reg-brand-logo-wrap img {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}
.reg-brand-strip__text h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: .01em;
}
.reg-brand-strip__text p {
  font-size: .8rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 2px 0 0;
}

/* ── Main Top Tabs (Login | Register) ────────────────────────────── */
.reg-top-tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}
.reg-top-tab {
  flex: 1;
  padding: 16px 12px;
  font-size: .94rem;
  font-weight: 600;
  color: #475569;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .01em;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.reg-top-tab:focus-visible {
  outline: none;
}
.reg-top-tab.is-active {
  color: #1a56db;
  border-bottom-color: #1a56db;
  background: #fff;
  font-weight: 700;
}
.reg-top-tab:hover:not(.is-active) {
  background: #eff6ff;
  color: #1a56db;
}

/* ── Sub-tabs (Dealer | Customer) ────────────────────────────────── */
.reg-sub-tabs {
  display: flex;
  gap: 14px;
  padding: 24px 32px 0;
}
.reg-sub-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 12px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  font-size: .9rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  outline: none;
  transition: all .2s ease;
}
.reg-sub-tab.is-active {
  border-color: #1a56db;
  background: #eff6ff;
  color: #1a56db;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(26, 86, 219, 0.12);
}
.reg-sub-tab:hover:not(.is-active) {
  border-color: #93c5fd;
  color: #1a56db;
  background: #f0f7ff;
}
.reg-sub-tab svg { width: 18px; height: 18px; }

/* ── Form Body ────────────────────────────────────────────────────── */
.reg-body { padding: 24px 32px 36px; }

.reg-form { display: none; }
.reg-form.is-active { display: block; }

/* ── Draft Restore Banner ─────────────────────────────────────────── */
.draft-restore-banner {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border: 1.5px solid #93c5fd;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.draft-restore-banner p { font-size: .84rem; color: #1e3a8a; font-weight: 600; margin: 0; }
.draft-restore-actions { display: flex; gap: 8px; flex-shrink: 0; }
.draft-restore-actions button {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #2563eb;
  transition: all .18s;
}
.draft-btn-yes { background: #1a56db; color: #fff; border-color: #1a56db; }
.draft-btn-yes:hover { background: #1e3a8a; }
.draft-btn-no { background: #fff; color: #1a56db; }
.draft-btn-no:hover { background: #eff6ff; }

/* ── Section Headers ──────────────────────────────────────────────── */
.reg-section {
  margin-bottom: 28px;
}
.reg-section-title {
  font-size: .75rem;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: .12em;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.reg-section-title svg { width: 16px; height: 16px; color: #2563eb; }

/* ── Form Grid ────────────────────────────────────────────────────── */
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.reg-grid .span-2 { grid-column: 1 / -1; }

/* ── Form Groups ──────────────────────────────────────────────────── */
.reg-group { display: flex; flex-direction: column; gap: 5px; }
.reg-label {
  font-size: .82rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 5px;
}
.reg-label .req { color: #dc2626; margin-left: 1px; }
.reg-helper { font-size: .75rem; color: #64748b; margin-top: 3px; }

/* ── Inputs ───────────────────────────────────────────────────────── */
.reg-input-wrap { position: relative; }
.reg-input-wrap .reg-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #3b82f6;
  pointer-events: none;
  width: 16px;
  height: 16px;
}
.reg-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  font-size: .875rem;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color .18s, box-shadow .18s, background-color .18s;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.reg-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: #fff;
}
.reg-input.is-error { border-color: #dc2626; background: #fef2f2; }
.reg-input.is-verified { border-color: #16a34a; background: #f0fdf4; }
.reg-input--no-icon { padding-left: 12px; }
.reg-input--textarea { padding: 10px 12px 10px 36px; resize: vertical; min-height: 80px; }

/* Select inputs */
.reg-select {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  font-size: .875rem;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color .18s, box-shadow .18s;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  box-sizing: border-box;
}
.reg-select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); background-color: #fff; }

/* Phone prefix wrapper */
.reg-phone-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.reg-phone-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: #fff;
}
.reg-phone-wrap.is-error { border-color: #dc2626; background: #fef2f2; }
.reg-phone-wrap.is-verified { border-color: #16a34a; background: #f0fdf4; }
.reg-phone-prefix {
  padding: 10px 10px 10px 12px;
  font-size: .82rem;
  color: #1e3a8a;
  font-weight: 700;
  white-space: nowrap;
  border-right: 1.5px solid #cbd5e1;
  background: #eff6ff;
  flex-shrink: 0;
}
.reg-phone-input {
  flex: 1;
  padding: 10px 8px;
  border: none;
  outline: none;
  font-size: .875rem;
  background: transparent;
  color: #0f172a;
  font-family: inherit;
}
.reg-phone-otp-btn {
  padding: 8px 14px;
  background: #1a56db;
  color: #fff;
  border: none;
  outline: none;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s;
  letter-spacing: .01em;
  flex-shrink: 0;
}
.reg-phone-otp-btn:hover { background: #1e3a8a; }
.reg-phone-otp-btn:disabled { background: #94a3b8; cursor: not-allowed; }
.reg-phone-verified-badge {
  padding: 8px 10px;
  color: #16a34a;
  display: none;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.reg-phone-verified-badge svg { width: 15px; height: 15px; }
.reg-phone-verified-badge.is-visible { display: flex; }

/* Email OTP row (full-width) */
.reg-email-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.reg-email-wrap .reg-input { flex: 1; }
.reg-otp-send-btn {
  padding: 10px 14px;
  background: #1a56db;
  color: #fff;
  border: none;
  outline: none;
  border-radius: 9px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s;
  flex-shrink: 0;
}
.reg-otp-send-btn:hover { background: #1e3a8a; }
.reg-otp-send-btn:disabled { background: #94a3b8; cursor: not-allowed; }

/* OTP verify row */
.reg-otp-row {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.reg-otp-row.is-visible { display: flex; }
.reg-otp-verify-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.reg-otp-input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #93c5fd;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-align: center;
  outline: none;
  font-family: monospace;
  background: #eff6ff;
  color: #1e3a8a;
}
.reg-otp-input:focus { border-color: #2563eb; background: #fff; }
.reg-otp-verify-btn {
  padding: 9px 16px;
  background: #16a34a;
  color: #fff;
  border: none;
  outline: none;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s;
  white-space: nowrap;
}
.reg-otp-verify-btn:hover { background: #15803d; }
.reg-otp-resend { font-size: .75rem; color: #64748b; display: flex; gap: 6px; align-items: center; }
.reg-otp-resend button {
  font-size: .75rem; color: #2563eb; background: none; border: none; outline: none; cursor: pointer; font-weight: 600; padding: 0;
}
.reg-otp-resend button:disabled { color: #94a3b8; cursor: not-allowed; }
.reg-otp-timer { color: #1a56db; font-weight: 600; }

/* Verified badge inside label */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .7rem;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  border-radius: 20px;
  padding: 2px 7px;
  margin-left: 4px;
}
.verified-badge svg { width: 11px; height: 11px; }

/* Error messages */
.reg-error {
  font-size: .75rem;
  color: #dc2626;
  display: none;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.reg-error.is-visible { display: flex; }
.reg-error svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Checkbox row */
.reg-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.reg-check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1a56db;
  cursor: pointer;
  flex-shrink: 0;
}
.reg-check-row label {
  font-size: .8rem;
  color: #475569;
  cursor: pointer;
  line-height: 1.4;
}

/* ── Map Section ──────────────────────────────────────────────────── */
.reg-map-search-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.reg-map-search-wrap .reg-input { flex: 1; }
.reg-map-search-btn {
  padding: 10px 16px;
  background: #1a56db;
  color: #fff;
  border: none;
  outline: none;
  border-radius: 9px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.reg-map-search-btn svg { width: 15px; height: 15px; }
.reg-map-search-btn:hover { background: #1e3a8a; }

.reg-map-container {
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #cbd5e1;
  position: relative;
  margin-bottom: 14px;
}
.reg-map-locate-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  background: #fff;
  border: 2px solid #bfdbfe;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: all .18s;
  color: #1a56db;
}
.reg-map-locate-btn:hover { background: #eff6ff; border-color: #2563eb; }
.reg-map-locate-btn svg { width: 18px; height: 18px; }

.reg-latlng-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 6px;
}
.reg-latlng-helper {
  grid-column: 1 / -1;
  font-size: .75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}
.reg-latlng-helper svg { width: 13px; height: 13px; color: #2563eb; }

/* ── Document Upload Boxes ────────────────────────────────────────── */
.reg-upload-box {
  border: 2px dashed #93c5fd;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #f8fafc;
  position: relative;
}
.reg-upload-box:hover, .reg-upload-box.drag-over {
  border-color: #2563eb;
  background: #eff6ff;
}
.reg-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.reg-upload-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  background: #dbeafe;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a56db;
}
.reg-upload-icon svg { width: 22px; height: 22px; }
.reg-upload-title {
  font-size: .85rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 4px;
}
.reg-upload-sub {
  font-size: .75rem;
  color: #64748b;
}
.reg-upload-box.has-file {
  border-style: solid;
  border-color: #16a34a;
  background: #f0fdf4;
}
.reg-upload-file-info {
  display: none;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: .82rem;
  font-weight: 600;
  color: #16a34a;
  margin-top: 6px;
}
.reg-upload-box.has-file .reg-upload-file-info { display: flex; }
.reg-upload-box.has-file .reg-upload-placeholder { display: none; }
.reg-upload-file-info svg { width: 16px; height: 16px; }
.reg-upload-remove {
  font-size: .72rem;
  color: #dc2626;
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 600;
  padding: 2px 4px;
}

/* ID Type Select */
.reg-upload-with-type {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reg-id-type-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.reg-id-type-wrap label { font-size: .78rem; color: #64748b; font-weight: 600; white-space: nowrap; }
.reg-id-type-wrap select {
  flex: 1;
  padding: 7px 10px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: .82rem;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  cursor: pointer;
}

/* ── Terms Row ────────────────────────────────────────────────────── */
.reg-terms-row {
  margin: 22px 0 24px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.reg-terms-row input { margin-top: 3px; accent-color: #1a56db; }
.reg-terms-row label { font-size: .84rem; color: #475569; line-height: 1.5; }
.reg-terms-row a { color: #2563eb; font-weight: 600; text-decoration: none; }
.reg-terms-row a:hover { text-decoration: underline; }

/* ── Action Buttons ───────────────────────────────────────────────── */
.reg-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.reg-btn-draft {
  padding: 12px 22px;
  border: 2px solid #2563eb;
  border-radius: 10px;
  background: #fff;
  color: #1a56db;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: all .18s;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
}
.reg-btn-draft:hover { background: #eff6ff; border-color: #1e3a8a; color: #1e3a8a; }
.reg-btn-draft svg { width: 16px; height: 16px; }
.reg-btn-submit {
  flex: 1;
  padding: 13px 22px;
  background: linear-gradient(135deg, #1e3a8a 0%, #1a56db 100%);
  color: #fff;
  border: none;
  outline: none;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(26, 86, 219, 0.28);
}
.reg-btn-submit:hover {
  background: linear-gradient(135deg, #172554 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 86, 219, 0.38);
}
.reg-btn-submit svg { width: 17px; height: 17px; }
.reg-footer-link {
  margin-top: 20px;
  text-align: center;
  font-size: .84rem;
  color: #64748b;
}
.reg-footer-link a { color: #2563eb; font-weight: 600; text-decoration: none; }
.reg-footer-link a:hover { text-decoration: underline; }

/* ── Success State & Account Creation Animations ────────────────── */
.reg-success {
  display: none;
  text-align: center;
  padding: 44px 28px 48px;
  position: relative;
  overflow: hidden;
}
.reg-success.is-visible {
  display: block;
  animation: regSuccessPop 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes regSuccessPop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(18px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.reg-success-animation-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 24px;
  width: 120px;
  height: 120px;
}

.reg-success__icon-box {
  position: relative;
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid #a7f3d0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px -6px rgba(16, 185, 129, 0.32), 0 0 0 6px rgba(16, 185, 129, 0.08);
  animation: iconBoxBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes iconBoxBounce {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  80% { transform: scale(0.96); }
  100% { transform: scale(1); opacity: 1; }
}

.reg-success__pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.5);
  animation: successPulseRing 2.4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}
.reg-success__pulse-ring.ring-2 {
  animation-delay: 0.8s;
  border-color: rgba(37, 99, 235, 0.4);
}

@keyframes successPulseRing {
  0% {
    width: 88px;
    height: 88px;
    opacity: 0.8;
  }
  70% {
    opacity: 0.3;
  }
  100% {
    width: 150px;
    height: 150px;
    opacity: 0;
  }
}

/* SVG Animated Checkmark */
.reg-checkmark {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: block;
  stroke-width: 3.5;
  stroke: #10b981;
  stroke-miterlimit: 10;
}

.reg-checkmark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3.5;
  stroke: #10b981;
  fill: none;
  animation: checkmarkStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.2s forwards;
}

.reg-checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 4;
  stroke: #059669;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: checkmarkStroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes checkmarkStroke {
  100% {
    stroke-dashoffset: 0;
  }
}

/* Floating Sparkle Icons */
.reg-sparkle {
  position: absolute;
  font-size: 1.25rem;
  pointer-events: none;
  opacity: 0;
  animation: sparklePop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.reg-sparkle.s-1 { top: -4px; left: 6px; animation-delay: 0.4s; font-size: 1.2rem; }
.reg-sparkle.s-2 { top: -6px; right: 8px; animation-delay: 0.6s; font-size: 1.4rem; }
.reg-sparkle.s-3 { bottom: 2px; left: 4px; animation-delay: 0.75s; font-size: 1.1rem; }
.reg-sparkle.s-4 { bottom: -2px; right: 6px; animation-delay: 0.5s; font-size: 1.3rem; }

@keyframes sparklePop {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(15deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
}

/* Celebration Pill Badge */
.reg-success-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 14px;
  animation: fadeInUp 0.5s ease 0.4s both;
}

.reg-success h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 8px;
  letter-spacing: -.01em;
  animation: fadeInUp 0.5s ease 0.3s both;
}
.reg-success p {
  font-size: .92rem;
  color: #475569;
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 20px;
  animation: fadeInUp 0.5s ease 0.45s both;
}
.reg-success .reg-btn-submit {
  max-width: 250px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease 0.6s both;
}
.reg-success .reg-btn-submit::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(25deg);
  animation: btnShimmer 3s ease-in-out infinite;
}

@keyframes btnShimmer {
  0% { left: -60%; }
  30%, 100% { left: 140%; }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Confetti Canvas Container */
#reg-confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* ── Customer Form Specifics ──────────────────────────────────────── */
.reg-cust-header {
  text-align: center;
  padding: 16px 0 24px;
}
.reg-cust-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 6px;
}
.reg-cust-header p { font-size: .86rem; color: #64748b; }

/* ── Leaflet Overrides ────────────────────────────────────────────── */
.leaflet-container { font-family: 'Inter', sans-serif; }
.leaflet-control-attribution { font-size: .66rem !important; }

/* ── Login Panel (Inside register.php) ───────────────────────────── */
.reg-login-panel { padding: 0 0 8px; }
.reg-login-panel .reg-group { margin-bottom: 16px; }

/* ── Password Input & Toggle Eye ─────────────────────────────────── */
.reg-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.reg-password-wrap .reg-input {
  padding-right: 44px;
}
.reg-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
  z-index: 2;
  border-radius: 4px;
}
.reg-password-toggle:hover {
  color: #1e3a8a;
}
.reg-password-toggle svg {
  width: 18px;
  height: 18px;
}

/* ── In-Card Dedicated OTP Page View ────────────────────────────── */
.reg-otp-panel {
  padding: 36px 24px 48px;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  animation: fadeInUp .35s ease;
}

.reg-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 5px 14px;
  border-radius: 9999px;
  margin-bottom: 20px;
}
.reg-step-badge svg {
  width: 14px;
  height: 14px;
}

.reg-otp-shield-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border: 2px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #1a56db;
  box-shadow: 0 4px 16px rgba(26, 86, 219, 0.15);
}
.reg-otp-shield-icon svg {
  width: 34px;
  height: 34px;
}

.reg-otp-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #64748b;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all .15s ease;
  margin-top: 12px;
}
.reg-otp-back-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* ── Email OTP Modal & Celebration Styles ────────────────────────── */
.reg-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.reg-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.reg-modal {
  background: #ffffff;
  border-radius: 20px;
  max-width: 460px;
  width: 100%;
  padding: 32px 28px;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.25);
  border: 1px solid #e2e8f0;
  position: relative;
  text-align: center;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reg-modal-backdrop.is-open .reg-modal {
  transform: scale(1) translateY(0);
}

.reg-modal__icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border: 2px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #2563eb;
}
.reg-modal__icon-wrap svg {
  width: 30px;
  height: 30px;
}

.reg-modal__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.reg-modal__desc {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 24px;
}
.reg-modal__email-pill {
  display: inline-block;
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 9999px;
  font-weight: 700;
  color: #1e293b;
  font-family: monospace;
}

/* 6 OTP Digit Inputs */
.otp-digits-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.otp-digit-input {
  width: 48px;
  height: 54px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  transition: all 0.15s ease;
  font-family: inherit;
}
.otp-digit-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.reg-modal__resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 22px;
}
.reg-modal__resend-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: 0.82rem;
  text-decoration: underline;
}
.reg-modal__resend-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  text-decoration: none;
}

.reg-modal__error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

.reg-modal__submit {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.reg-modal__submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.reg-modal__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.reg-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s ease;
}
.reg-modal__close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Celebration Modal Specifics */
.celebration-icon-pulse {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 3px solid #86efac;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #15803d;
  animation: pulseScale 1.8s infinite ease-in-out;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
}
@keyframes pulseScale {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 16px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .reg-page { padding: 0 0 40px; }
  .reg-card { border-radius: 0; }
  .reg-brand-strip { padding: 16px 20px; }
  .reg-body { padding: 20px 16px 28px; }
  .reg-sub-tabs { padding: 16px 16px 0; gap: 8px; }
  .reg-sub-tab { font-size: .8rem; padding: 10px 4px; }
  .reg-grid { grid-template-columns: 1fr; }
  .reg-grid .span-2 { grid-column: 1; }
  .reg-latlng-row { grid-template-columns: 1fr; }
  .reg-actions { flex-direction: column; }
  .reg-btn-draft, .reg-btn-submit { width: 100%; justify-content: center; }
  .reg-map-container { height: 240px; }
  .otp-digit-input { width: 40px; height: 46px; font-size: 1.2rem; }
}

/* ── Forgot Password Styles ───────────────────────────────────────── */
.login-forgot-link {
  transition: all 0.18s ease;
}
.login-forgot-link:hover {
  text-decoration: underline !important;
  color: #1e3a8a !important;
}
.forgot-back-to-login:hover {
  color: #1e293b !important;
  text-decoration: underline !important;
}
#forgot-otp-input:focus {
  border-color: #1a56db;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

