:root {
  --brand: #2f7eea;
  --brand-dark: #1556af;
  --ink: #102033;
  --muted: #65758b;
  --line: rgba(15, 23, 42, 0.12);
  --panel: rgba(249, 251, 255, 0.96);
  --panel-strong: #ffffff;
  --ok: #1fa46b;
  --warn: #d98912;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.wizard-body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background: #050b18;
}

body.wizard-body .xp-home-hero {
  min-height: 100vh;
  padding: 0;
}

.wizard-container {
  position: relative;
  z-index: 4;
  width: min(1350px, calc(100% - 48px));
  margin: 0 auto;
  padding: 8px 0 72px;
}

.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 13px 18px;
  border: 1px solid rgba(121, 166, 255, 0.22);
  border-radius: 8px;
  background: rgba(6, 14, 32, 0.84);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(145%);
}

.wizard-brand,
.wizard-nav,
.wizard-nav a {
  color: rgba(245, 250, 255, 0.94);
  text-decoration: none;
}

.wizard-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.wizard-brand img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(58, 135, 255, 0.32);
}

.wizard-nav {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.wizard-nav a:hover {
  color: #ffffff;
}

.wizard-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 365px);
  gap: 20px;
  align-items: start;
}

.wizard-panel,
.order-panel,
.plan,
.payment-card,
.invoice-card,
.verify-panel,
.provision-box {
  border-radius: 8px;
}

.wizard-panel,
.order-panel {
  border: 1px solid rgba(255, 255, 255, 0.52);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 244, 251, 0.96)),
    var(--panel);
  box-shadow: var(--shadow);
}

.wizard-panel {
  min-width: 0;
  padding: 26px;
}

.progress-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0 0 28px;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 46px;
  right: -4px;
  height: 2px;
  background: rgba(47, 126, 234, 0.16);
}

.step-circle {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #dfe9ff;
  color: #2855c4;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.step-label {
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #233750;
}

.step.active .step-circle {
  color: #ffffff;
  background: var(--brand);
}

.step.done .step-circle {
  color: #ffffff;
  background: var(--ok);
}

.pane[hidden],
.btn[hidden],
#roleOther[hidden],
#otpDualOverlay[hidden],
.payment-receipt[hidden],
.step-errors[hidden] {
  display: none !important;
}

.pane-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.pane-heading h1 {
  margin: 0;
  color: #0c2138;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.65rem, 2vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 7px;
  color: #2f6fba;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.period-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-height: 36px;
  color: #4d6078;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #cfdbef;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
  transition: left 0.18s ease, background 0.18s ease;
}

.switch input:checked + .knob {
  left: 23px;
  background: #dff5ec;
}

.pill,
.payment-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
}

.pill {
  color: #216547;
  background: #e0f6ec;
  border: 1px solid #b9e7d2;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.plan {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.11);
  background:
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 18px 35px rgba(15, 30, 55, 0.12);
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, outline-color 0.16s ease;
}

.plan:hover,
.plan:focus-within {
  transform: translateY(-2px);
  border-color: rgba(47, 126, 234, 0.38);
  box-shadow: 0 24px 48px rgba(15, 30, 55, 0.16);
}

.plan.selected {
  border-color: rgba(47, 126, 234, 0.78);
  outline-color: rgba(47, 126, 234, 0.28);
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.plan-top span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #6d4b00;
  background: #fff0c2;
  font-size: 0.72rem;
  font-weight: 800;
}

.plan p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.price {
  color: #071a30;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.plan ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 19px;
  color: #213852;
}

.plan .btn {
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 28px rgba(47, 126, 234, 0.28);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(47, 126, 234, 0.34);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.btn.secondary {
  color: #16477e;
  background: #e7f0ff;
  box-shadow: none;
}

.btn.ghost {
  color: #294d73;
  background: transparent;
  box-shadow: none;
}

.assistive-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  min-width: 0;
}

.field label,
.preview-field label {
  display: block;
  margin: 0 0 7px;
  color: #3d5572;
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  padding: 11px 13px;
  color: #0d2035;
  background: #ffffff;
  font: inherit;
  letter-spacing: 0;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(47, 126, 234, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 126, 234, 0.12);
}

.has-error input,
.has-error select,
.has-error textarea,
input.has-error,
select.has-error,
textarea.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.11);
}

#roleOther {
  margin-top: 9px;
}

.step-errors {
  margin-top: 16px;
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  color: #8a1d15;
  background: #fff1ef;
  font-size: 0.9rem;
}

.step-errors ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.payment-card {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 196, 57, 0.22), rgba(255, 255, 255, 0.96) 38%),
    #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.payment-copy h2 {
  margin: 10px 0 6px;
  color: #102033;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.payment-copy p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
}

.payment-badge {
  color: #06387d;
  background: #ffc439;
}

.paypal-buttons {
  width: min(760px, 100%);
  min-height: 54px;
}

.payment-status {
  min-height: 22px;
  color: #506277;
  font-size: 0.9rem;
}

.payment-receipt {
  border: 1px solid rgba(31, 164, 107, 0.28);
  border-radius: 8px;
  padding: 12px 14px;
  color: #145c41;
  background: #ecfbf4;
}

.payment-receipt div {
  margin-top: 5px;
  color: #2f624e;
  font-size: 0.9rem;
}

.invoice-card {
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.invoice-head,
.invoice-brand,
.invoice-meta,
.invoice-total {
  display: flex;
}

.invoice-head {
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.invoice-brand {
  align-items: center;
  gap: 12px;
}

.invoice-brand img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.invoice-brand strong,
.invoice-number strong {
  display: block;
  color: #102033;
  font-weight: 900;
}

.invoice-brand span,
.invoice-number span,
.invoice-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.invoice-number {
  text-align: right;
}

.invoice-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.invoice-meta div {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.invoice-meta strong {
  display: block;
  overflow-wrap: anywhere;
  color: #172c46;
  margin-top: 4px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-table th,
.invoice-table td {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.invoice-table th:last-child,
.invoice-table td:last-child {
  text-align: right;
}

.invoice-total {
  justify-content: flex-end;
  gap: 24px;
  padding-top: 16px;
  color: #102033;
  font-size: 1.1rem;
  font-weight: 900;
}

.domain-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.domain-field:focus-within {
  border-color: rgba(47, 126, 234, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 126, 234, 0.12);
}

.domain-field input {
  border: 0;
  box-shadow: none;
}

.domain-field span {
  padding-right: 13px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.preview-field img {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  padding: 8px;
  background: #ffffff;
}

.menu-color-field {
  align-self: start;
}

.menu-color-swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fbff;
}

.menu-color-swatch {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 7px;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.menu-color-swatch:hover {
  transform: translateY(-1px);
}

.menu-color-swatch.is-active,
.menu-color-swatch[aria-pressed="true"] {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch) 32%, transparent), 0 10px 20px rgba(15, 23, 42, 0.16);
}

.toggle-group {
  display: grid;
  gap: 10px;
  align-content: start;
}

.toggle-group label,
.confirmation-box label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #20364f;
  background: #f8fbff;
  font-weight: 800;
}

.confirmation-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.confirmation-box label {
  justify-content: flex-start;
}

.confirmation-box input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.order-panel {
  position: sticky;
  top: 20px;
  padding: 24px;
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  color: #102033;
  font-size: 1.05rem;
  font-weight: 900;
}

.summary-head strong {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  color: #176247;
  background: #e1f8ee;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.summary-line {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.18);
}

.summary-line span,
.summary-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-line span:first-child {
  color: #506277;
  font-weight: 700;
}

.summary-line span:last-child,
.summary-line strong {
  color: #15283f;
  text-align: right;
  font-weight: 800;
}

.order-panel p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.order-panel a {
  color: #185baa;
  font-weight: 800;
  text-decoration: none;
}

.provision,
.dual-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(8px);
}

.provision {
  display: none;
}

.provision-box,
.verify-panel {
  width: min(560px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.provision-box {
  padding: 24px;
}

.provision-box h2,
.verify-panel h2 {
  margin: 0 0 14px;
  color: #102033;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ecf8;
}

.progress .bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--ok), var(--warn));
  transition: width 0.24s ease;
}

#provList {
  display: grid;
  gap: 7px;
  margin: 16px 0 0;
  padding-left: 18px;
  color: #314860;
}

.dual-wrap {
  width: min(540px, 100%);
}

.verify-panel {
  padding: 24px;
}

.verify-panel p {
  margin: 0 0 16px;
  color: var(--muted);
}

.otp-row,
.otp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.otp-row input {
  width: min(240px, 100%);
}

.otp-actions {
  margin-top: 12px;
}

.otp-actions span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.inline-error {
  margin-top: 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10070;
  display: none;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  background: #102033;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
  font-weight: 800;
}

.toast.show {
  display: block;
}

@media (max-width: 1100px) {
  .wizard-shell {
    grid-template-columns: 1fr;
  }

  .order-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .wizard-container {
    width: min(100%, calc(100% - 28px));
    padding-bottom: 46px;
  }

  .wizard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .wizard-nav {
    justify-content: flex-start;
  }

  .progress-rail {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .step:not(:last-child)::after {
    top: 34px;
    bottom: -12px;
    left: 15px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .plan-grid,
  .form-grid,
  .invoice-meta {
    grid-template-columns: 1fr;
  }

  .pane-heading {
    flex-direction: column;
  }

  .period-toggle {
    justify-content: flex-start;
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .wizard-panel,
  .order-panel,
  .payment-card,
  .invoice-card {
    padding: 18px;
  }

  .wizard-panel {
    padding: 18px;
  }

  .plan {
    min-height: 0;
  }

  .invoice-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-number {
    text-align: left;
  }

  .summary-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .summary-line span:last-child,
  .summary-line strong {
    text-align: left;
  }

  .footer-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}
