:root {
  color-scheme: light;
  --tam-navy: #082e68;
  --tam-orange: #ff5a00;
  --tam-orange-light: #ff8700;
  --tam-ink: #172438;
  --tam-muted: #718096;
  --tam-line: #dce4ee;
  --tam-bg: #f4f7fa;
  --tam-accent: #ff5a00;
  --tam-accent-soft: #fff1e8;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--tam-ink);
  background: var(--tam-bg);
  font-family: Tajawal, Arial, sans-serif;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }

.site-header {
  position: relative;
  z-index: 2;
  height: 78px;
  padding: 0 max(24px, calc((100vw - 1360px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid rgba(220, 228, 238, .85);
}

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--tam-navy); font-size: 20px; font-weight: 900; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.sign-in { color: #39475b; font-weight: 700; }
.sign-in:hover { color: var(--tam-orange); }

.signup-layout {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(360px, .87fr);
  direction: ltr;
}

.wizard-pane {
  width: min(100%, 800px);
  min-height: calc(100vh - 78px);
  margin-inline: auto;
  padding: clamp(42px, 7vh, 88px) clamp(28px, 7vw, 112px) 56px;
  direction: rtl;
  background: #fff;
}

.step-heading { max-width: 620px; margin: 0 auto; }
.step-kicker { margin: 0 0 17px; color: var(--tam-orange); font-size: 14px; font-weight: 800; }
h1 { margin: 0; color: var(--tam-navy); font-size: clamp(30px, 4vw, 40px); line-height: 1.28; }
.intro { margin: 9px 0 0; color: var(--tam-muted); font-size: 17px; }

.selected-plan {
  max-width: 620px;
  margin: 28px auto 26px;
  padding: 11px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff7f1;
  border: 1px solid #ffe2cf;
  border-radius: 12px;
}
.selected-plan span { color: #74685f; font-size: 14px; }
.selected-plan strong { color: var(--tam-navy); font-size: 15px; }

#signup-form, .complete-state { max-width: 620px; margin-inline: auto; }
.wizard-step { animation: appear .2s ease-out; }
@keyframes appear { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.field-label { display: block; margin-bottom: 9px; color: #40516a; font-size: 14px; font-weight: 700; }
.phone-control { width: 100%; direction: ltr; }
.phone-control .iti { width: 100%; direction: ltr; }
.phone-control .iti input[type="tel"] {
  width: 100%;
  height: 58px;
  padding-top: 13px;
  padding-bottom: 13px;
  color: var(--tam-ink);
  background: #fff;
  border: 1px solid #cfd8e4;
  border-radius: 12px;
  font: 600 17px/1.4 Arial, sans-serif;
  direction: ltr;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.phone-control .iti input[type="tel"]:focus { border-color: var(--tam-orange); box-shadow: 0 0 0 3px rgba(255, 90, 0, .12); outline: 0; }
.phone-control .iti input[type="tel"]::placeholder { color: #8491a3; opacity: 1; }
.phone-control .iti__selected-country { border-radius: 11px 0 0 11px; }
.phone-control .iti__selected-country:hover, .phone-control .iti__selected-country:focus { background: #f6f8fb; }
.iti--container { z-index: 99999 !important; }
.iti__dropdown-content { z-index: 99999 !important; direction: rtl; text-align: right; }
.iti__country-list { max-height: min(300px, 55vh); }
.iti__search-input { direction: rtl; text-align: right; }

.field-hint, .field-error, .field-status { margin: 8px 0 0; font-size: 14px; }
.field-hint { color: var(--tam-muted); }
.field-error { color: #c33131; font-weight: 700; }
.field-status { color: var(--tam-navy); font-weight: 700; }
.field-status.is-error { color: #c33131; }

.verification-step { margin-top: 25px; }
.otp-preview {
  margin: 0 0 23px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff8f3;
  border: 1px solid #ffe2cf;
  border-radius: 14px;
}
.otp-icon { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; color: #fff; background: var(--tam-orange); border-radius: 10px; font-size: 19px; }
.otp-preview strong { color: var(--tam-ink); font-size: 14px; }
.otp-preview p { margin: 2px 0 0; color: var(--tam-muted); font-size: 13px; }
.otp-preview b { font-family: Arial, sans-serif; font-weight: 700; }
.otp-inputs { display: flex; gap: 9px; }
.otp-digit {
  width: 58px;
  height: 62px;
  color: var(--tam-navy);
  background: #fff;
  border: 1px solid #cfd8e4;
  border-radius: 11px;
  font: 700 24px Arial, sans-serif;
  text-align: center;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.otp-digit:focus { border-color: var(--tam-orange); box-shadow: 0 0 0 3px rgba(255, 90, 0, .12); outline: 0; }
.text-button { margin-top: 13px; padding: 0; color: var(--tam-navy); background: transparent; border: 0; font-weight: 700; cursor: pointer; }
.text-button:disabled { color: #9aa5b4; cursor: default; }

.section-intro { margin: 0 0 20px; color: var(--tam-muted); }
.choice-card {
  min-height: 86px;
  margin: 12px 0;
  padding: 17px 19px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--tam-line);
  border-radius: 15px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.choice-card:hover { border-color: #adc7be; }
.choice-card:has(input:checked) { border: 2px solid var(--tam-orange); padding: 16px 18px; background: var(--tam-accent-soft); box-shadow: 0 5px 18px rgba(255, 90, 0, .08); }
.choice-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-radio { width: 20px; height: 20px; flex: 0 0 20px; border: 2px solid #b9c4d1; border-radius: 50%; }
.choice-card:has(input:checked) .choice-radio { border-color: var(--tam-orange); box-shadow: inset 0 0 0 4px #fff; background: var(--tam-orange); }
.choice-copy { display: grid; gap: 3px; }
.choice-copy strong { color: var(--tam-ink); font-size: 15px; }
.choice-copy small { color: var(--tam-muted); font-size: 13px; }

.meta-panel { margin: 0 0 21px; padding: 19px; display: flex; gap: 14px; background: #f6f8fb; border: 1px solid var(--tam-line); border-radius: 15px; }
.meta-mark { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; color: #fff; background: #1877f2; border-radius: 50%; font: 700 28px/1 Arial, sans-serif; }
.meta-panel strong { color: var(--tam-ink); }
.meta-panel p { margin: 5px 0 0; color: var(--tam-muted); font-size: 14px; }
.meta-button, .secondary-button, .back-button {
  width: 100%;
  min-height: 52px;
  margin-top: 11px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 800;
  cursor: pointer;
}
.meta-button { color: #fff; background: #1877f2; }
.meta-button:hover { background: #1268d8; }
.meta-button:disabled { opacity: .55; cursor: not-allowed; }
.secondary-button, .back-button { color: var(--tam-ink); background: #fff; border-color: var(--tam-line); }
.secondary-button:hover, .back-button:hover { border-color: #aab8c8; background: #fafbfc; }

.account-type { margin: 0 0 23px; padding: 4px; display: flex; background: #f0f3f6; border-radius: 999px; }
.account-type label { flex: 1; cursor: pointer; }
.account-type input { position: absolute; opacity: 0; }
.account-type span { display: block; padding: 9px 14px; color: #677487; border-radius: 999px; text-align: center; font-weight: 700; }
.account-type input:checked + span { color: var(--tam-navy); background: #fff; box-shadow: 0 2px 8px rgba(14, 34, 57, .1); }
.form-field { margin: 18px 0; }
.text-input {
  width: 100%;
  height: 56px;
  padding: 12px 15px;
  color: var(--tam-ink);
  background: #fff;
  border: 1px solid #cfd8e4;
  border-radius: 12px;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.text-input:focus { border-color: var(--tam-orange); box-shadow: 0 0 0 3px rgba(255, 90, 0, .12); }
.text-input::placeholder { color: #99a3b1; }
.optional { color: var(--tam-muted); font-weight: 400; }

.wizard-actions { margin-top: 26px; display: flex; align-items: center; gap: 12px; }
.continue-button {
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--tam-orange), var(--tam-orange-light));
  border: 0;
  border-radius: 13px;
  box-shadow: 0 10px 25px rgba(255, 90, 0, .2);
  font: 800 16px Tajawal, Arial, sans-serif;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.continue-button:hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(255, 90, 0, .27); }
.continue-button:focus-visible, .back-button:focus-visible, .meta-button:focus-visible, .secondary-button:focus-visible { outline: 3px solid rgba(255, 90, 0, .34); outline-offset: 3px; }
.continue-button:disabled { opacity: .65; cursor: wait; transform: none; }
.back-button { width: auto; min-width: 105px; margin: 0; }

.complete-state { padding: 28px 24px; border: 1px solid #ffe2cf; border-radius: 17px; background: #fff8f3; text-align: center; }
.complete-icon { width: 54px; height: 54px; margin: 0 auto 10px; display: grid; place-items: center; color: #fff; background: var(--tam-orange); border-radius: 50%; font-size: 28px; font-weight: 800; }
.complete-state h2 { margin: 8px 0; color: var(--tam-navy); }
.complete-state p { margin: 0 0 19px; color: var(--tam-muted); }
.complete-link { margin-top: 4px; }

.signup-aside {
  min-height: calc(100vh - 78px);
  padding: clamp(38px, 7vh, 82px) clamp(28px, 5vw, 82px) 32px;
  display: flex;
  flex-direction: column;
  direction: rtl;
  color: #f7fffc;
  background: radial-gradient(ellipse at 100% 0, #123e7e 0, #082e68 57%, #062451 100%);
}
.aside-brand { display: flex; align-items: center; gap: 12px; }
.aside-brand img { width: 54px; height: 54px; object-fit: contain; }
.aside-brand div { display: grid; }
.aside-brand strong { font-size: 19px; }
.aside-brand span { color: #ff9a60; font-size: 13px; font-weight: 800; }
.signup-aside h2 { margin: 32px 0 8px; font-size: clamp(23px, 2.3vw, 31px); line-height: 1.4; }
.aside-copy { max-width: 480px; margin: 0; color: #d4deef; font-size: 15px; }
.trust-pill { width: fit-content; margin-top: 24px; padding: 8px 13px; display: flex; align-items: center; gap: 8px; color: #e1e9f5; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 999px; font-size: 13px; }
.trust-pill span { width: 19px; height: 19px; display: grid; place-items: center; color: #fff; background: var(--tam-orange); border-radius: 50%; font-size: 12px; font-weight: 900; }
.progress-heading { margin: 38px 0 10px; color: #d4deef; font-size: 13px; font-weight: 700; }
.progress-list { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.progress-list li { min-height: 52px; padding: 9px 13px; display: flex; align-items: center; gap: 12px; color: #d5dfef; border: 1px solid transparent; border-radius: 12px; transition: background .18s ease, border-color .18s ease; }
.progress-number { width: 27px; height: 27px; display: grid; place-items: center; color: #d5dfef; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 50%; font-size: 13px; }
.progress-list li.is-current { color: #fff; background: rgba(255, 90, 0, .16); border-color: rgba(255, 150, 94, .3); font-weight: 800; }
.progress-list li.is-current .progress-number, .progress-list li.is-complete .progress-number { color: #fff; background: var(--tam-orange); border-color: var(--tam-orange); }
.progress-list li.is-complete .progress-number { font-size: 0; }
.progress-list li.is-complete .progress-number::after { content: "✓"; font-size: 14px; font-weight: 900; }
.aside-footer { margin-top: auto; padding-top: 25px; display: flex; justify-content: space-between; align-items: center; color: #d4deef; border-top: 1px solid rgba(255,255,255,.16); font-size: 13px; }
.language-chip { padding: 4px 14px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; }

@media (max-width: 950px) {
  .signup-layout { grid-template-columns: minmax(0, 1fr) minmax(290px, .72fr); }
  .wizard-pane { padding-inline: clamp(25px, 5vw, 58px); }
  .signup-aside { padding-inline: 28px; }
}

@media (max-width: 720px) {
  .site-header { height: 68px; padding: 0 16px; }
  .brand { font-size: 18px; }
  .brand img { width: 42px; height: 42px; }
  .signup-layout { min-height: calc(100vh - 68px); display: flex; flex-direction: column; }
  .signup-aside { order: -1; min-height: 0; padding: 20px 21px; }
  .aside-brand img { width: 40px; height: 40px; }
  .aside-brand strong { font-size: 16px; }
  .signup-aside h2, .aside-copy, .trust-pill, .progress-heading, .aside-footer { display: none; }
  .progress-list { margin-top: 14px; display: flex; gap: 6px; overflow-x: auto; }
  .progress-list li { min-width: 39px; min-height: 39px; padding: 5px; justify-content: center; gap: 0; border-radius: 999px; }
  .progress-list li > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .progress-number { width: 27px; height: 27px; }
  .wizard-pane { width: 100%; min-height: auto; padding: 32px 21px 46px; }
  .selected-plan { margin-top: 23px; }
  .otp-inputs { gap: 6px; }
  .otp-digit { width: min(15vw, 55px); height: 57px; }
}
