/* ============================================================
   Campus Formula — Onboarding CSS (Dark Theme)
   assets/css/onboarding.css
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@700;800&family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  --gold: #fabf2c;
  --gold-dim: #c9930e;
  --gold-light: #ffd05a;
  --dark: #0d0f14;
  --dark-2: #13161e;
  --dark-3: #1c2030;
  --dark-4: #252a3a;
  --light: #f5f4ef;
  --muted: #7a8099;
  --white: #ffffff;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --radius: 14px;
  --radius-lg: 22px;
  --step-size: 40px;
  --font-head: 'Poppins', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--light);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.brand-name,
.ob-card-title,
.plan-name,
.plan-price,
.step-title,
.review-subdomain-preview {
  font-family: var(--font-head);
}

/* ── Page wrapper & ambient glow ─────────────────────────── */
.onboarding-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--dark);
}

.onboarding-wrapper::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(250, 191, 44, .05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.ob-main,
.ob-topnav,
.ob-footer {
  position: relative;
  z-index: 1;
}

/* ── Main content ───────────────────────────────────────── */
.ob-main {
  flex: 1;
  padding: 2.5rem 1rem 4rem;
}

.ob-container {
  max-width: 820px;
  margin: 0 auto;
}

.ob-main h1 {
  color: var(--white);
}

.text-muted {
  color: var(--muted) !important;
}

/* ── Stepper ──────────────────────────────────────────────── */
.ob-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
  position: relative;
}

.ob-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 180px;
  position: relative;
  z-index: 1;
}

.ob-step-circle {
  width: var(--step-size);
  height: var(--step-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2.5px solid rgba(255, 255, 255, 0.15);
  background: var(--dark-3);
  color: var(--muted);
  transition: all 0.3s ease;
  font-family: var(--font-head);
}

.ob-step.active .ob-step-circle {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
  box-shadow: 0 0 0 5px rgba(250, 191, 44, 0.15);
}

.ob-step.completed .ob-step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.ob-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.ob-step.active .ob-step-label {
  color: var(--gold);
}

.ob-step.completed .ob-step-label {
  color: var(--success);
}

/* Connector line between steps */
.ob-step-connector {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: calc(var(--step-size) / 2);
  transition: background 0.3s ease;
  max-width: 100px;
}

.ob-step-connector.done {
  background: var(--success);
}

/* ── Form card ───────────────────────────────────────────── */
.ob-card {
  background: var(--dark-2);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 2.25rem 2.5rem;
  margin-bottom: 1.5rem;
}

.ob-card-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
  color: var(--white);
}

.ob-card-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

/* ── Form labels & inputs ────────────────────────────────── */
.form-label {
  font-weight: 600;
  font-size: 0.84rem;
  color: rgba(245, 244, 239, .85);
  margin-bottom: 0.35rem;
}

.required-star {
  color: var(--danger);
  margin-left: 2px;
}

.form-control,
.form-select {
  background: var(--dark-3);
  border-radius: 10px;
  border: 1.5px solid var(--border);
  padding: 0.6rem 0.85rem;
  font-size: 0.92rem;
  color: var(--light);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
  background: var(--dark-3);
  border-color: var(--gold);
  color: var(--light);
  box-shadow: 0 0 0 3px rgba(250, 191, 44, 0.12);
}

.form-control::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--success) !important;
  background-image: none !important;
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--danger) !important;
  background-image: none !important;
}

.form-text {
  font-size: 0.77rem;
  color: var(--muted);
}

.invalid-feedback {
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

/* ── Input groups ───────────────────────────────────────── */
.input-group-text {
  background: var(--dark-4);
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.input-group:focus-within .input-group-text {
  border-color: var(--gold);
  color: var(--light);
}

/* ── Subdomain input group ──────────────────────────────── */
.subdomain-prefix {
  background: var(--dark-4);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.subdomain-prefix+.form-control {
  border-radius: 0 10px 10px 0;
  border-left: none;
}

.subdomain-status {
  font-size: 0.8rem;
  margin-top: 4px;
  min-height: 1.1em;
}

.subdomain-status .available {
  color: var(--success);
}

.subdomain-status .unavailable {
  color: var(--danger);
}

.subdomain-status .checking {
  color: var(--muted);
}

/* ── Logo Upload ─────────────────────────────────────────── */
.logo-upload-wrap {
  position: relative;
}

.logo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--dark-3);
}

.logo-upload-area:hover {
  border-color: var(--gold);
  background: rgba(250, 191, 44, 0.03);
}

.logo-upload-area.drag-over {
  border-color: var(--gold);
  background: rgba(250, 191, 44, 0.08);
  transform: scale(1.01);
}

.logo-upload-icon {
  font-size: 2.5rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.logo-upload-area:hover .logo-upload-icon {
  color: var(--gold);
}

.logo-upload-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 0.3rem;
}

.logo-upload-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.logo-preview-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}

.logo-preview-wrap img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--dark-4);
  padding: 4px;
}

.logo-preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.logo-preview-info span {
  font-size: 0.85rem;
  color: var(--light);
  font-weight: 500;
}

.logo-preview-info .btn-link {
  font-size: 0.8rem;
  padding: 0;
  text-decoration: none;
}

.logo-preview-info .btn-link:hover {
  text-decoration: underline;
}

/* ── Colour picker preview ──────────────────────────────── */
.colour-picker-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.colour-picker-wrap input[type="color"] {
  width: 50px;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  cursor: pointer;
  background: var(--dark-3);
}

.colour-preview-box {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  border: 2px solid var(--border);
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}

/* ── Char counter ───────────────────────────────────────── */
.char-counter {
  font-size: 0.77rem;
  text-align: right;
  color: var(--muted);
  transition: color 0.2s;
}

.char-counter.warn {
  color: var(--warning);
}

.char-counter.over {
  color: var(--danger);
}

/* ── Password strength ───────────────────────────────────── */
.password-strength-wrap {
  margin-top: 6px;
}

.password-strength-bar {
  height: 5px;
  border-radius: 4px;
  transition: width 0.3s ease, background-color 0.3s ease;
  width: 0%;
}

.password-strength-label {
  font-size: 0.75rem;
  margin-top: 3px;
  color: var(--muted);
}

/* Password toggle buttons */
#toggle-pw,
#toggle-cpw {
  border-color: var(--border);
  color: var(--muted);
  background: var(--dark-4);
}

#toggle-pw:hover,
#toggle-cpw:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--dark-3);
}

/* ── Plan cards ─────────────────────────────────────────── */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.plan-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
  background: var(--dark-2);
}

.plan-card:hover {
  border-color: var(--gold);
  box-shadow: 0 6px 20px rgba(250, 191, 44, 0.1);
  transform: translateY(-2px);
}

.plan-card.selected {
  border-color: var(--gold);
  background: rgba(250, 191, 44, 0.06);
  box-shadow: 0 0 0 4px rgba(250, 191, 44, 0.12);
}

.plan-card.plan-free.selected {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.06);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.plan-card.plan-enterprise {
  cursor: default;
  opacity: 0.85;
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--dark);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  font-family: var(--font-head);
}

.plan-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  color: var(--white);
}

.plan-price {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.plan-price .plan-price-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.plan-cap {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 4px 0 10px;
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  flex: 1;
}

.plan-features-list li {
  font-size: 0.8rem;
  color: rgba(245, 244, 239, .8);
  padding: 3px 0;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.plan-features-list li .fa-check {
  color: var(--success);
  margin-top: 1px;
}

.plan-features-list li .feat-highlight {
  font-weight: 700;
  color: var(--white);
}

.plan-select-btn {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.45rem 1rem;
}

/* Override Bootstrap outline buttons inside plan cards for dark theme */
.plan-card .btn-outline-primary {
  color: rgba(255, 255, 255, .75);
  border-color: rgba(255, 255, 255, .15);
  background: transparent;
}

.plan-card .btn-outline-primary:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}

.plan-card .btn-outline-secondary {
  color: var(--muted);
  border-color: var(--border);
  background: transparent;
}

.plan-card .btn-outline-secondary:hover {
  color: var(--light);
  border-color: rgba(255, 255, 255, .3);
}

/* ── Trial Notice ──────────────────────────────────────── */
.trial-notice {
  background: rgba(250, 191, 44, 0.08);
  border: 1px solid rgba(250, 191, 44, 0.2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: rgba(245, 244, 239, .85);
}

.trial-notice i {
  color: var(--gold);
}

.trial-notice strong {
  color: var(--gold);
}

/* ── Skeleton loaders ──────────────────────────────────── */
.skeleton-card {
  border-radius: var(--radius);
  border: 2px solid var(--border);
  padding: 1.35rem 1.25rem;
  background: var(--dark-2);
}

.skeleton-line {
  background: linear-gradient(90deg, var(--dark-4) 25%, var(--dark-3) 50%, var(--dark-4) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 6px;
  margin-bottom: 10px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ── Review summary card ───────────────────────────────── */
.review-card {
  background: rgba(250, 191, 44, 0.06);
  border: 1.5px solid rgba(250, 191, 44, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.review-subdomain-preview {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  word-break: break-all;
}

.review-subdomain-preview a {
  color: inherit;
  text-decoration: none;
}

.review-subdomain-preview a:hover {
  text-decoration: underline;
}

.review-item {
  display: flex;
  gap: 8px;
  font-size: 0.86rem;
  color: rgba(245, 244, 239, .8);
  margin-top: 6px;
}

.review-item .ri-label {
  font-weight: 600;
  color: var(--muted);
  min-width: 90px;
}

/* ── Trial checkbox ─────────────────────────────────────── */
.trial-badge {
  display: inline-block;
  background: rgba(250, 191, 44, 0.15);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  font-family: var(--font-head);
}

/* ── Navigation buttons ─────────────────────────────────── */
.ob-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  gap: 12px;
}

.btn-cf-primary {
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 10px;
  padding: 0.65rem 2rem;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-head);
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-cf-primary:hover {
  background: var(--gold-light);
  color: var(--dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(250, 191, 44, 0.35);
}

.btn-cf-primary:active {
  transform: scale(0.98);
}

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

.btn-cf-back {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
}

.btn-cf-back:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Footer ─────────────────────────────────────────────── */
.ob-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--dark-2);
}

.ob-footer a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

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

/* ── Email check feedback ───────────────────────────────── */
.email-status {
  font-size: 0.78rem;
  margin-top: 4px;
  min-height: 1em;
  color: var(--muted);
}

/* ── Form check override for dark theme ─────────────────── */
.form-check-input {
  background-color: var(--dark-3);
  border-color: var(--border);
}

.form-check-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.25rem rgba(250, 191, 44, .15);
}

.form-check-input:checked {
  background-color: var(--gold);
  border-color: var(--gold);
}

.form-check-label {
  color: var(--muted);
}

.form-check-label a {
  color: var(--gold);
}

/* ── SweetAlert2 dark theme tweaks ──────────────────────── */
.swal2-popup {
  background: var(--dark-2) !important;
  color: var(--light) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

.swal2-title {
  color: var(--white) !important;
  font-family: var(--font-head) !important;
}

.swal2-html-container {
  color: var(--muted) !important;
}

.swal2-confirm {
  background: var(--gold) !important;
  color: var(--dark) !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
}

.swal2-confirm:focus {
  box-shadow: 0 0 0 3px rgba(250, 191, 44, .3) !important;
}

.swal2-cancel {
  background: var(--dark-3) !important;
  color: var(--light) !important;
  border: 1px solid var(--border) !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: var(--success) !important;
}

.swal2-icon.swal2-success [class^=swal2-success-line] {
  background-color: var(--success) !important;
}

.swal2-timer-progress-bar {
  background: var(--gold) !important;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .ob-card {
    padding: 1.5rem 1.1rem;
  }

  .ob-card-title {
    font-size: 1.2rem;
  }

  .ob-step-label {
    font-size: 0.6rem;
  }

  .plan-grid {
    grid-template-columns: 1fr 1fr;
  }

  .subdomain-prefix {
    font-size: 0.72rem;
    padding: 0.55rem 0.5rem;
  }

  .ob-stepper {
    gap: 0;
  }

  .ob-step-connector {
    max-width: 40px;
  }

  .logo-upload-area {
    padding: 1.5rem 1rem;
  }

  .logo-upload-text {
    font-size: 0.85rem;
  }
}

@media (max-width: 420px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .ob-step-label {
    display: none;
  }
}