/* ════════════════════════════════════════════════════
   MailAI — Register Page Styles
   Fonts: Sora (display) + DM Sans (body)
   Replace: /style/registerstyle.css
════════════════════════════════════════════════════ */

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

/* ── Page Layout ──────────────────────────────────── */
.rg-page {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
  background: #f8fafc;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(41,121,217,.06) 0%, transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(124,58,237,.04) 0%, transparent 55%);
  font-family: 'DM Sans', sans-serif;
}

/* ── Card ─────────────────────────────────────────── */
.rg-card {
  width: 100%; max-width: 480px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 0 0 1px #e2e8f0, 0 4px 24px rgba(0,0,0,.08);
  overflow: hidden;
}

/* ── Hero ─────────────────────────────────────────── */
.rg-hero {
  background: linear-gradient(135deg, #0a1628 0%, #163060 55%, #2979d9 100%);
  padding: 16px 20px 14px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.rg-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 90% 15%, rgba(255,255,255,.06) 0%, transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,.04) 0%, transparent 35%);
  pointer-events: none;
}
.rg-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-size: 11px; font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 11px;
  border: 1px solid rgba(255,255,255,.15);
  letter-spacing: .2px;
  font-family: 'Sora', sans-serif;
}
.rg-hero h1 {
  font-family: 'Sora', sans-serif;
  font-size: 17px; font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
  letter-spacing: -.2px;
}
.rg-hero p {
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,.85); margin: 0;
}
.rg-hero-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
  justify-content: center;
}
.rg-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.88);
  font-size: 10px; font-weight: 600;
  padding: 4px 8px;
  border-radius: 100px;
}
.rg-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.rg-dot.wa  { background: #25d366; }
.rg-dot.tg  { background: #64bbec; }
.rg-dot.tr  { background: #fcd34d; }

/* ── Step Bar ─────────────────────────────────────── */
.rg-steps-wrap { padding-top: 12px; }
.rg-steps {
  display: flex; align-items: center; justify-content: center;
}
.rg-step-node {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  flex-shrink: 0;
}
.rg-step-line {
  width: 36px; flex: none;
  height: 2px; background: #e2e8f0;
  margin: 0 10px 15px 10px;
  transition: background .22s ease;
}
.rg-step-line.done { background: #16a34a; }

.sd {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 12px; font-weight: 700;
  border: 2px solid #e2e8f0;
  background: #fff; color: #94a3b8;
  transition: all .22s ease;
}
.sd.active {
  background: #2979d9; border-color: #2979d9; color: #fff;
  box-shadow: 0 0 0 4px rgba(41,121,217,.15);
}
.sd.done {
  background: #16a34a; border-color: #16a34a; color: #fff;
}
.rg-step-lbl {
  font-size: 10px; font-weight: 700;
  color: #94a3b8; white-space: nowrap;
  letter-spacing: .2px;
  font-family: 'Sora', sans-serif;
  transition: color .22s ease;
}
.rg-step-lbl.active { color: #2979d9; }
.rg-step-lbl.done   { color: #16a34a; }

/* ── Body ─────────────────────────────────────────── */
.rg-body { padding: 14px 24px 18px; }

/* ── Alert ────────────────────────────────────────── */
.alert {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px; font-weight: 500;
  margin-bottom: 16px;
  display: none;
  line-height: 1.5;
  animation: rgSlideDown .18s ease;
}
.alert.show { display: block; }
.alert-err  { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-ok   { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
@keyframes rgSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Panels ───────────────────────────────────────── */
.panel { display: none; }
.panel.active { display: block; animation: rgFadeUp .22s ease; }
@keyframes rgFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rg-panel-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 800;
  color: #0f172a;
  letter-spacing: -.2px;
  margin-bottom: 2px;
}
.rg-panel-sub {
  font-size: 12px; color: #64748b;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ── Google Wrap ──────────────────────────────────── */
.rg-google-wrap { margin-bottom: 14px; }

/* ── OR Divider ───────────────────────────────────── */
.rg-or {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.rg-or-line  { flex: 1; height: 1px; background: #e2e8f0; }
.rg-or-text  { font-size: 12px; font-weight: 600; color: #94a3b8; white-space: nowrap; }

/* ── Form Fields ──────────────────────────────────── */
.fg { margin-bottom: 15px; }
.fg label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: .2px;
  text-transform: uppercase;
  font-family: 'Sora', sans-serif;
}
.fg label .opt {
  font-weight: 500; color: #94a3b8;
  text-transform: none; letter-spacing: 0; font-size: 11px;
}
.fg input, .fg select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px; color: #0f172a;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  -webkit-appearance: none;
}
.fg input:hover, .fg select:hover { border-color: #cbd5e1; }
.fg input:focus, .fg select:focus {
  border-color: #2979d9;
  box-shadow: 0 0 0 3px rgba(41,121,217,.12);
}
.fg .hint { font-size: 12px; color: #64748b; margin-top: 5px; line-height: 1.4; }
.fg .hint.g { color: #15803d; font-weight: 700; }

.rg-ref-input {
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  font-weight: 700 !important;
}

/* ── Phone Row ────────────────────────────────────── */
.ph-row { display: flex; gap: 8px; }
.ph-row select {
  width: 118px; flex-shrink: 0;
  padding-left: 9px; font-size: 13px; font-weight: 600;
}
.ph-row input { flex: 1; }

/* ── Password ─────────────────────────────────────── */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 54px; }
.pw-eye {
  position: absolute; right: 13px; top: 50%;
  transform: translateY(-50%);
  cursor: pointer; color: #94a3b8;
  font-size: 11px; font-weight: 700;
  font-family: 'Sora', sans-serif;
  user-select: none;
  transition: color .15s;
}
.pw-eye:hover { color: #2979d9; }

.pw-bar {
  height: 3px; border-radius: 3px; margin-top: 6px;
  background: #e2e8f0; transition: all .28s;
}
.pw-bar.w { background: #ef4444; width: 33%; }
.pw-bar.m { background: #f59e0b; width: 66%; }
.pw-bar.s { background: #16a34a; width: 100%; }

/* ── OTP ──────────────────────────────────────────── */
.otp-big {
  letter-spacing: 10px !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  font-family: 'Sora', sans-serif !important;
  text-align: center !important;
  padding: 14px !important;
}
.otp-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 7px; min-height: 20px;
}
.otp-timer { font-size: 12px; color: #94a3b8; }
.btn-resend {
  background: none; border: none;
  color: #2979d9; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: 'Sora', sans-serif;
  padding: 0; display: none;
  transition: color .15s;
}
.btn-resend:hover { color: #163060; }

/* ── Verified Badge ───────────────────────────────── */
.verified-badge {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px; font-weight: 700;
  color: #15803d;
  margin-bottom: 12px;
  display: none;
  animation: rgSlideDown .2s ease;
}

/* ── Plan Cards UI Improvements ───────────────────── */
.ch-cards {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 12px;
}
.ch-card {
  display: block;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: #fff;
  overflow: hidden;
  opacity: 0.7;
}
.ch-card:hover {
  border-color: #cbd5e1;
  opacity: 1;
}
.ch-card input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }

.ch-card.sel-wa, .ch-card.sel-tg, .ch-card.sel-inbox {
  opacity: 1;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  transform: translateY(-1px);
}
.ch-card.sel-wa    { border-color: #128c7e; background: linear-gradient(135deg, #ffffff, #f0fdf4); }
.ch-card.sel-tg    { border-color: #229ed9; background: linear-gradient(135deg, #ffffff, #f0f9ff); }
.ch-card.sel-inbox { border-color: #7c3aed; background: linear-gradient(135deg, #ffffff, #faf5ff); }

.ch-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
}
.ch-icon  {
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  background: #f1f5f9; border: 1.5px solid #e2e8f0;
  transition: all .2s;
}
.sel-wa    .ch-icon { background: #dcfce7; border-color: #86efac; }
.sel-tg    .ch-icon { background: #dbeafe; border-color: #93c5fd; }
.sel-inbox .ch-icon { background: #ede9fe; border-color: #c4b5fd; }

.ch-info  { flex: 1; min-width: 0; }
.ch-name  {
  font-family: 'Sora', sans-serif;
  font-size: 13px; font-weight: 800; color: #0f172a; 
  margin-bottom: 0;
}
.ch-tag   { font-size: 11px; font-weight: 500; color: #64748b; }

.ch-check {
  width: 18px; height: 18px; border-radius: 50%;
  background: #f8fafc; border: 2px solid #cbd5e1;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: transparent;
  flex-shrink: 0; transition: all .2s;
}
.sel-wa    .ch-check { background: #128c7e; border-color: #128c7e; color: #fff; }
.sel-tg    .ch-check { background: #229ed9; border-color: #229ed9; color: #fff; }
.sel-inbox .ch-check { background: #7c3aed; border-color: #7c3aed; color: #fff; }

/* ── Phone section ────────────────────────────────── */
.phone-section { display: none; animation: rgFadeUp .2s ease; }
.phone-section.show { display: block; }

.phone-hint {
  font-size: 12px; margin-top: 6px;
  padding: 8px 11px; border-radius: 8px; line-height: 1.5;
}
.phone-hint.wa    { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.phone-hint.tg    { background: #eff9ff; color: #0369a1; border: 1px solid #bae6fd; }
.phone-hint.inbox { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; }

/* ── Phone display in step 4 ──────────────────────── */
.ch-phone-display {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px; font-weight: 700;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.ch-phone-display.wa {
  background: #f0fdf8; border: 1px solid #bbf7d0; color: #075e54;
}

/* ── Telegram connect box ─────────────────────────── */
.tg-connect-box {
  background: #f8fafc;
  border: 1.5px dashed #e2e8f0;
  border-radius: 12px;
  padding: 20px; text-align: center;
  margin-bottom: 14px;
}
.tg-connect-box p {
  font-size: 13px; color: #64748b; margin-bottom: 14px; line-height: 1.5;
}

/* ── SMS/Firebase notice ──────────────────────────── */
.rg-sms-notice {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 12px; color: #5b21b6;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── Buttons ──────────────────────────────────────── */
.btn-main {
  width: 100%; padding: 13px;
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 700;
  font-family: 'Sora', sans-serif;
  cursor: pointer;
  background: linear-gradient(135deg, #1e57b0, #2979d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(41,121,217,.35);
  transition: all .2s;
  letter-spacing: -.1px;
  margin-top: 4px;
}
.btn-main:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(41,121,217,.42);
  opacity: .95;
}
.btn-main:active:not(:disabled) { transform: translateY(0); }
.btn-main:disabled {
  opacity: .45; cursor: not-allowed;
  transform: none; box-shadow: none;
}
.btn-back {
  width: 100%; padding: 11px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  font-family: 'Sora', sans-serif;
  cursor: pointer; background: #fff; color: #64748b;
  margin-top: 8px;
  transition: all .15s;
}
.btn-back:hover { border-color: #2979d9; color: #2979d9; background: #eff6ff; }

/* ── Card footer ──────────────────────────────────── */
.rg-foot {
  text-align: center;
  padding: 0 30px 22px;
  font-size: 13px; color: #94a3b8;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
}
.rg-foot a, .rg-foot-note a {
  color: #2979d9; font-weight: 700; text-decoration: none;
  transition: color .15s;
}
.rg-foot a:hover, .rg-foot-note a:hover { color: #163060; }
.rg-foot-note {
  text-align: center; font-size: 13px; color: #94a3b8;
}

/* ── Trust bar ────────────────────────────────────── */
.rg-trust {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 6px 4px;
  margin-top: 18px;
}
.rg-trust-item {
  font-size: 11px; font-weight: 600; color: #94a3b8;
}
.rg-trust-sep {
  font-size: 11px; color: #cbd5e1;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 500px) {
  .rg-hero, .rg-body { padding-left: 20px; padding-right: 20px; }
  .rg-steps-wrap { padding-left: 20px; padding-right: 20px; }
  .rg-card { border-radius: 18px; }
  .rg-foot { padding-left: 20px; padding-right: 20px; }
}