:root {
  --bg: #F7F9F7;
  --card: #ffffff;
  --text: #172B24;
  --muted: #4F6F66;
  --brand: #176448;
  --brand-2: #144E3E;
  --brand-light: #176448;
  --brand-soft: #EAF4EE;
  --blue: var(--brand);
  --blue-2: var(--brand-2);
  --shadow: 0 6px 18px rgba(23, 100, 72, 0.10);
  --radius: 16px;
  --side-pad: clamp(20px, 5vw, 24px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  margin: 0;
  background: var(--bg);
  font-family:
    "IBM Plex Sans Arabic",
    Cairo,
    "Noto Sans Arabic",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  overflow-x: hidden;
}

.nt-body {
  font-size: 16px;
}

.nt-app button,
.nt-app input,
.nt-app select,
.nt-app textarea,
.nt-app a {
  touch-action: manipulation;
}

.device {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  min-height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  container-type: inline-size;
  container-name: phone;
}

.header {
  width: 100%;
  padding: 10px 0 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.screen-name {
  width: 100%;
  text-align: right;
  font-size: 26px;
  font-weight: 900;
  /* لون أفتح من لون الشعار */
  color: var(--text);
  margin-top: 8px;
  margin-bottom: 0;
}

.nt-app .stepper,
.nt-app [data-flow-stepper] {
  display: block;
  grid-template-columns: none;
  align-self: stretch;
  width: 100%;
  margin: 0 0 16px;
  padding: 0 var(--side-pad);
  box-sizing: border-box;
  list-style: none;
}

.nt-app .stepper__row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nt-app .stepper__item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nt-app .stepper__circle {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
}

.nt-app .stepper__connector {
  flex: 1 1 auto;
  height: 3px;
  min-width: 18px;
  background: var(--brand-soft);
  border-radius: 999px;
  margin: 0 6px;
}

.stepper__label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  max-width: 92px;
  line-height: 1.15;
  text-align: center;
}

.stepper__count {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: flex-start; /* في RTL = يمين */
  gap: 6px;
  direction: rtl;
  margin: 0 0 8px;
}

.stepper__count-kicker {
  font-size: 13px;
  font-weight: 900;
  color: var(--muted);
}

.stepper__count-num {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  display: none;
}

.stepper[data-active="1"] .stepper__count-num[data-num="1"],
.stepper[data-active="2"] .stepper__count-num[data-num="2"],
.stepper[data-active="3"] .stepper__count-num[data-num="3"] {
  display: inline;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 var(--side-pad);
  box-sizing: border-box;
}

/* Simplified 2-screen auth UI (matches provided screenshot). */
.device.nt-app .header [data-flow-menu],
.device.nt-app .header [data-flow-stepper],
.device.nt-app .header .screen-title-group {
  display: none !important;
}

.header-top .menu-row {
  padding: 0;
  margin: 0;
}

.logo-wrap--small {
  width: min(220px, 72%);
  height: auto;
  margin: 8px auto 2px;
}

.logo-wrap--small::before {
  display: none;
}

.screen-title-group {
  padding: 0 var(--side-pad);
  box-sizing: border-box;
  direction: rtl;
  text-align: right;
}

.screen-lead {
  display: none;
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  line-height: 1.7;
}

/* إظهار وصف الخطوة فقط لشاشة “بيانات مقدم الطلب” */
.stepper[data-active="1"] ~ .screen-title-group .screen-lead {
  display: block;
}

.nt-app .stepper[data-active="1"] .stepper__item[data-step="1"] .stepper__circle,
.nt-app .stepper[data-active="2"] .stepper__item[data-step="1"] .stepper__circle,
.nt-app .stepper[data-active="2"] .stepper__item[data-step="2"] .stepper__circle,
.nt-app .stepper[data-active="3"] .stepper__item[data-step="1"] .stepper__circle,
.nt-app .stepper[data-active="3"] .stepper__item[data-step="2"] .stepper__circle,
.nt-app .stepper[data-active="3"] .stepper__item[data-step="3"] .stepper__circle {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.nt-app .stepper[data-active="2"] .stepper__connector--12,
.nt-app .stepper[data-active="3"] .stepper__connector--12,
.nt-app .stepper[data-active="3"] .stepper__connector--23 {
  background: var(--brand);
}

.logo-wrap {
  --logo-box: clamp(105px, 26vw, 135px);
  width: var(--logo-box);
  height: var(--logo-box);
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-wrap::before {
  /* circles / target-like design مطابق للفكرة بالصورة المرفقة */
  content: "";
  position: absolute;
  inset: -34px;
  border-radius: 999px;
  background: radial-gradient(
    circle at center,
    /* القرص الداخلي — نفس لون خلفية الشاشة */
    var(--bg) 0%,
    var(--bg) 46%,

    /* فراغ بسيط يمنع أي تداخل مع الشعار */
    transparent 46%,
    transparent 49%,

    /* الحلقة الأولى (فاتحة) */
    rgba(255, 255, 255, 0.55) 49%,
    rgba(255, 255, 255, 0.55) 51%,
    transparent 51%,
    transparent 56%,

    /* حلقة 2 */
    rgba(210, 220, 230, 0.34) 56%,
    rgba(210, 220, 230, 0.34) 58%,
    transparent 58%,
    transparent 64%,

    /* حلقة 3 */
    rgba(210, 220, 230, 0.22) 64%,
    rgba(210, 220, 230, 0.22) 66%,
    transparent 66%,
    transparent 74%,

    /* حلقة 4 (أبعد/أخف) */
    rgba(210, 220, 230, 0.16) 74%,
    rgba(210, 220, 230, 0.16) 76%,
    transparent 76%,
    transparent 84%,

    /* حلقة 5 (الأبعد/الأخف) */
    rgba(210, 220, 230, 0.10) 84%,
    rgba(210, 220, 230, 0.10) 86%,
    transparent 86%
  );
  /* override: نمط خفيف بدون حلقات متعددة */
  background: radial-gradient(
    circle at center,
    rgba(234, 244, 238, 0.95) 0%,
    rgba(234, 244, 238, 0) 65%
  );
  z-index: 0;
  pointer-events: none;
}

.logo {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  /* الشعار الجديد ملون (أخضر)، ما نعمل له انعكاس */
  filter: none;
}

.header-top .logo-wrap.logo-wrap--small {
  width: min(240px, 78%);
  height: auto;
  margin: 10px auto 4px;
}

.header-top .logo-wrap.logo-wrap--small::before {
  display: none;
}

.screens {
  flex: 1 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.screen {
  display: none;
  flex: 1 0 auto;
  flex-direction: column;
  width: 100%;
  opacity: 0;
  transform: translateY(6px);
}

.screen[hidden] {
  display: none !important;
}

.screen.active,
.screen:not([hidden]) {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  animation: screen-in 180ms ease;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen-body {
  flex: 1;
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  box-sizing: border-box;
}

.menu-row {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  direction: ltr;
  padding: 0 var(--side-pad);
  position: static;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.menu-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.menu-btn span {
  width: 18px;
  height: 2px;
  border-radius: 3px;
  background: var(--text);
}

.field-stack {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.card-field {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: ltr;
}

.card-field svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-field svg,
.card-field svg * {
  stroke: var(--muted);
  fill: none;
}

.field__leftIcon {
  color: var(--muted);
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.field__rightIcon {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.field__label {
  flex: 1 1 auto;
  margin: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  direction: rtl;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field__input {
  flex: 1 1 auto;
  margin: 0 12px;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  direction: rtl;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.field__input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.date-label {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 650;
  direction: rtl;
  text-align: right;
}

.card-number-block .date-label {
  margin-top: 0;
}

.card-number-slots {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  direction: ltr;
}

.card-number-slot {
  flex: 1 1 0;
  height: 42px;
  border: none;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
  padding: 0 4px;
  text-align: center;
  outline: none;
  appearance: none;
  letter-spacing: 0.08em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.card-number-slot::placeholder {
  color: var(--muted);
  opacity: 0.7;
  letter-spacing: 0.18em;
}

.card-number-slots.is-invalid .card-number-slot {
  box-shadow: 0 0 0 2px #d64550, var(--shadow);
}

.segments {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  direction: ltr;
}

.segment {
  flex: 1 1 0;
  height: 42px;
  border: none;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  min-width: 0;
}

.segment-input {
  padding: 0;
  text-align: center;
  outline: none;
  appearance: none;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.segment-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.segment:disabled {
  opacity: 1;
  cursor: default;
}

.remember {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  direction: ltr;
  justify-content: flex-start;
}

.remember input {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--muted);
  background: #fff;
  appearance: none;
}

.remember input:checked {
  background: var(--brand);
  border-color: var(--brand);
  position: relative;
}

.remember input:checked::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: #fff;
  border-radius: 3px;
}

.remember span {
  font-size: 14px;
  color: var(--text);
  font-weight: 900;
  direction: rtl;
}

.primary-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(23, 100, 72, 0.14);
  margin-top: 14px;
}

.primary-btn--submit {
  height: 54px;
  margin-top: 0;
}

.primary-btn--submit:active {
  transform: translateY(1px);
}

/* --- Screen 1 (info) redesign --- */
.screen-body[data-flow-form="info"] .info-form__stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 100px; /* مساحة إضافية حتى لا يغطّي زر المحادثة زر المتابعة */
}

/* Hide legacy fields (birthdate + remember) for the phone-login design. */
.screen-body[data-flow-form="info"] .birth-block,
.screen-body[data-flow-form="info"] .remember {
  display: none;
}

.field-block {
  display: flex;
  flex-direction: column;
}

.field-label {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
  direction: rtl;
}

.field-control {
  height: 54px;
  border-radius: 14px;
  border: 1px solid #d7e8dc;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 14px;
  box-sizing: border-box;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.field-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  text-align: left;
}

.field-control:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 100, 72, 0.14);
}

.field-control:has(.field-input:not(:placeholder-shown)) {
  background: var(--brand-soft);
  border-color: rgba(23, 100, 72, 0.25);
}

.field-error {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 900;
  color: #b43a45;
  line-height: 1.35;
}

.field-error[hidden] {
  display: none !important;
}

.field-error--group {
  grid-column: 1 / -1;
}

.birth-block .field-error--group {
  margin-top: 8px;
}

.field-block:has(.field-input[aria-invalid="true"]) .field-control {
  border-color: #d64550;
  box-shadow: 0 0 0 3px rgba(214, 69, 80, 0.12);
}

.birth-block {
  display: flex;
  flex-direction: column;
}

.birth-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
  direction: rtl;
}

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

.birth-segment {
  display: flex;
  flex-direction: column;
}

.birth-label {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
  direction: rtl;
}

.birth-segment .segment {
  --birth-field-h: 54px;
  height: var(--birth-field-h);
  min-height: 44px;
  max-height: 56px;
  border-radius: 14px;
  border: 1px solid #d7e8dc;
  box-shadow: none;
  background: #fff;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 800;
  text-align: left;
  box-sizing: border-box;
}

@supports (height: 1cqi) {
  .birth-segment .segment {
    --birth-field-h: clamp(44px, 13.85cqi, 54px);
    padding-inline: clamp(8px, 3cqi, 12px);
    font-size: clamp(14px, 4.1cqi, 16px);
  }
}

.birth-segment:focus-within .segment {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 100, 72, 0.14);
}

.birth-segment .segment:not(:placeholder-shown) {
  background: var(--brand-soft);
  border-color: rgba(23, 100, 72, 0.25);
}

.birth-segment .segment[aria-invalid="true"] {
  border-color: #d64550;
  box-shadow: 0 0 0 3px rgba(214, 69, 80, 0.12);
}

/* أزرار وطبقات الدردشة: نسخة صغيرة داخل صفحة pay فقط */
body[data-page="pay"] .mobile-app-shell__overlays .sw-chat-button {
  padding: 10px 12px;
  border-radius: 16px;
  gap: 8px;
  background: var(--brand);
  font-size: 13px;
  box-shadow: none;
}

body[data-page="pay"] .mobile-app-shell__overlays .sw-chat-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
}

.mobile-app-shell__overlays .sw-chat-toasts {
  padding: 0;
}

/* Screen 2 bottom nav */
.bottom-nav {
  height: 78px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  margin: 0;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.nav-item {
  flex: 1 1 0;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.nav-item svg {
  width: 26px;
  height: 26px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item svg,
.nav-item svg * {
  stroke: currentColor;
  fill: none;
}

.nav-item.is-active {
  color: var(--brand);
}

.loading-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 4px solid var(--brand-soft);
  border-top-color: var(--brand);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-title {
  font-size: 15px;
  color: var(--brand-2);
  font-weight: 800;
  line-height: 1.5;
}

.loading-text {
  max-width: 22em;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.8;
}

/* Screen 3 */
.verify-title {
  margin-top: 78px;
  text-align: center;
  font-size: 15px;
  color: var(--brand-2);
  font-weight: 900;
}

.otp-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0;
  text-align: center;
}

.otp-copy {
  margin: 4px 0 18px;
  max-width: 22em;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.85;
  text-align: center;
}

.otp-copy [data-otp-phone-tail] {
  font-weight: 900;
  letter-spacing: 0.04em;
  unicode-bidi: isolate;
}

.otp-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 10px;
}

.otp-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.otp-icon svg,
.otp-icon svg * {
  stroke: currentColor;
  fill: none;
}

.otp-title {
  margin: 0;
  font-size: 15px;
  color: var(--brand-2);
  font-weight: 800;
}

.otp-lead {
  margin: 8px 0 0;
  max-width: 22em;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.8;
}

.otp-phone {
  margin: 4px 0 0;
  min-height: 1.4em;
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-2);
  letter-spacing: 0.08em;
}

.otp-phone:empty {
  display: none;
}

.otp-label {
  margin-top: 22px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
}

.otp-slots {
  position: relative;
  width: 100%;
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 8px;
  direction: ltr;
}

.otp-slots span {
  width: 32px;
  height: 42px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.otp-slots.is-invalid span {
  box-shadow: 0 0 0 2px #d64550, var(--shadow);
}

.otp-entry {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
}

.otp-note {
  margin: 16px 0 0;
  max-width: 24em;
  font-size: 9px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 600;
}

.otp-body .primary-btn {
  margin-top: 16px;
}

.otp-body .resend-link {
  margin-top: 14px;
}

.otp-body .resend-link:disabled {
  color: var(--muted);
  cursor: default;
}

.lock-badge {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px auto 10px;
  color: var(--brand);
}

.lock-badge svg {
  width: 30px;
  height: 30px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lock-badge svg,
.lock-badge svg * {
  stroke: currentColor;
  fill: none;
}

.verify-text {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  font-weight: 600;
}

.screen[data-pay-panel="pay-confirm"] .verify-text {
  /* شاشة التهنئة: تكبير النص + بوكس واضح */
  font-size: 20px;
  color: var(--text);
  background: #fff;
  border-radius: 18px;
  padding: 20px 16px;
  box-shadow: var(--shadow);
  max-width: min(460px, 100%);
  margin: 18px auto 0;
}

.code-box {
  width: 100%;
  margin-top: 16px;
  background: #fff;
  height: 44px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: none;
  outline: none;
  display: block;
  text-align: center;
  padding: 0 10px;
  color: var(--text);
  font-size: 21px;
  letter-spacing: 8px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

.code-box::placeholder {
  color: var(--muted);
  opacity: 1;
}

.resend-link {
  margin-top: 16px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
  text-align: center;
}

.resend-link:active {
  transform: translateY(1px);
}

/* Register success screen (temporary 3s) */
.register-success-body {
  /* نوسّع الهامش العلوي شوي لأن الهيدر يبقى موجود */
  padding: 44px var(--side-pad) 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 12px;
}

.reg-success-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.reg-success-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(32, 48, 64, 0.18);
}

.reg-success-pill svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reg-success-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--brand);
}

.reg-success-sub {
  margin: 0;
  max-width: 22em;
  color: var(--muted);
  font-weight: 700;
  font-size: 10px;
  line-height: 1.8;
}

.reg-success-sub strong {
  color: var(--text);
}

.reg-success-progress {
  width: min(360px, 100%);
  margin-top: 4px;
}

.reg-success-progress__track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e6eef3;
  overflow: hidden;
  direction: ltr; /* عشان التقدّم يمشي من اليسار لليمين */
}

.reg-success-progress__fill {
  height: 100%;
  width: 100%;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
}

.reg-success-note {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
  font-size: 9px;
}

/* Persistent privacy footer (shown on all flow screens) */
.flow-privacy-footer {
  width: 100%;
  padding: 4px var(--side-pad) max(72px, calc(env(safe-area-inset-bottom) + 64px));
  box-sizing: border-box;
}

.secure-panel {
  width: min(420px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #d7e8dc;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(23, 100, 72, 0.05);
  padding: 10px 12px 8px;
}

.secure-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: right;
  direction: rtl;
}

.secure-panel__seal {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(23, 100, 72, 0.18);
}

.secure-panel__seal svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.secure-panel__copy {
  min-width: 0;
  flex: 1 1 auto;
}

.secure-panel__copy strong {
  display: block;
  color: var(--brand-2);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.secure-panel__copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.65;
}

.secure-badges {
  list-style: none;
  margin: 10px 0 0;
  padding: 8px 4px 2px;
  border-top: 1px solid #e3eee7;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.secure-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.secure-badge__icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #eef7f1;
  color: var(--brand);
  display: grid;
  place-items: center;
}

.secure-badge__icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.secure-badge__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.secure-badge__text b {
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
}

.secure-badge__text small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
}

/* Loading screen layout spacing */
#screen-loading .primary-btn {
  margin-top: 0;
}

.nt-body {
  margin: 0;
  background: var(--bg);
  overflow-x: hidden;
}

.nt-body .demo-badge,
.nt-body .skip-link:not(:focus) {
  display: none;
}

.nt-body main#main-content {
  padding: 0;
  max-width: none;
}

.nt-app .screen:not([hidden]) {
  display: flex;
}

.card-field:has([aria-invalid="true"]),
.segment-input[aria-invalid="true"],
.code-input[aria-invalid="true"] {
  box-shadow: 0 0 0 2px #d64550, var(--shadow);
}

.nt-body .sw-chat-badge { font-size: 8px; }
.nt-body .sw-chat-modal__title { font-size: 11px; }
.nt-body .sw-chat-message__badge,
.nt-body .sw-chat-message__from { font-size: 8px; }
.nt-body .sw-chat-bubble { font-size: 10px; }
.nt-body .sw-chat-toast { font-size: 10px; }
.nt-body .sw-chat-toast__kicker { font-size: 8px; }
.nt-body .sw-chat-toast__title { font-size: 11px; }
.nt-body .sw-chat-toast__close { font-size: 15px; }

.flow-error {
  margin: 12px 0 0;
  color: #b43a45;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  direction: rtl;
}

.flow-error[hidden] {
  display: none !important;
}

.primary-btn:disabled {
  opacity: 0.65;
}

.nt-body .sw-chat-button {
  background: var(--brand);
  box-shadow: 0 16px 40px rgba(32, 48, 64, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
    border-top-color: var(--brand);
    opacity: 0.85;
  }
  .screen,
  .screen.active,
  .screen:not([hidden]) {
    animation: none;
    transition: none;
  }
}


