/* =========================================================
   الخطوط (محلية — تعمل بدون إنترنت)
   - العربي العادي (حتى وزن 519): Almarai
   - كل وجوه AppAr بنطاقين فقط: 100–519 و 520–1000
   - العربي العريض (من وزن 520): Cairo — العناوين والأزرار والروابط
   - اللاتيني والأرقام: Work Sans (الأقرب لخط النظام في الصور)
   ========================================================= */
@font-face {
  font-family: "AppAr";
  src: url("../fonts/almarai-400.woff2") format("woff2");
  ascent-override: 110.5%; descent-override: 41.1%; line-gap-override: 0%; /* مقاييس أصح كي لا تُقص الحروف السفلية في الحقول */
  font-weight: 100 519;
  font-display: block;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "AppAr";
  src: url("../fonts/cairo-arabic.woff2") format("woff2");
  font-weight: 520 1000;
  font-display: block;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFC;
}
/* المسافة بين الكلمات من نفس الخط */
@font-face {
  font-family: "AppAr";
  src: url("../fonts/almarai-400-latin.woff2") format("woff2");
  ascent-override: 110.5%; descent-override: 41.1%; line-gap-override: 0%; /* مقاييس أصح كي لا تُقص الحروف السفلية في الحقول */
  font-weight: 100 519;
  font-display: block;
  unicode-range: U+0020, U+00A0;
}
@font-face {
  font-family: "AppAr";
  src: url("../fonts/cairo-latin.woff2") format("woff2");
  font-weight: 520 1000;
  font-display: block;
  unicode-range: U+0020, U+00A0;
}
/* الأرقام العربية (٠١٢٣…) بالشكل الكوفي كما في الصور
   ملاحظة: يجب أن يطابق نطاق الوزن نطاقات الوجوه الأخرى تماماً، وإلا تجاهلها المتصفح */
@font-face {
  font-family: "AppAr";
  src: url("../fonts/readex-digits.woff2") format("woff2");
  font-weight: 100 519;
  font-display: block;
  unicode-range: U+0660-0669, U+06F0-06F9;
}
@font-face {
  font-family: "AppAr";
  src: url("../fonts/readex-digits.woff2") format("woff2");
  font-weight: 520 1000;
  font-display: block;
  unicode-range: U+0660-0669, U+06F0-06F9;
}
/* اللاتيني داخل النصوص العربية والحقول (مكبّر ليطابق حجم خط النظام في الصور) */
@font-face {
  font-family: "AppLat";
  src: url("../fonts/worksans-370.woff2") format("woff2");
  font-weight: 100 500;
  font-display: block;
  size-adjust: 113%;
}
@font-face {
  font-family: "AppLat";
  src: url("../fonts/worksans-latin.woff2") format("woff2");
  font-weight: 501 900;
  font-display: block;
  size-adjust: 113%;
}
@font-face {
  font-family: "AppLatin";
  src: url("../fonts/worksans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: block;
}

/* =========================================================
   الألوان (مأخوذة من الصور المرجعية)
   ========================================================= */
:root {
  --bg: #1c1f2e;            /* hsl(230, 24%, 15%) */
  --field: #2f3243;
  --field-error: #703030;
  --value: #dedfe6;
  --hint: rgba(255, 255, 255, 0.72);
  --icon: #c4c4c7;
  --title: #e6e7ee;
  --text: #c7c9d0;
  --top-text: #dee0e6;
  --primary: #617ecc;
  --link: #6982c8;
  --error: #bd4b4c;
  --powered: #a2a3a8;
  --version: #c4c5cd;

  --dp-bg: #171f2c;
  --dp-text: #c8cad5;
  --dp-muted: #989ca9;
  --dp-line: #444854;
  --scrim: rgba(0, 0, 0, 0.54);

  --gutter: 12.65px;        /* هامش الحقول من الجانبين */
  --field-h: 50.9px;
  --radius: 13px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: "AppAr", "AppLat", sans-serif;
  color: var(--value);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
[hidden] { display: none !important; }
svg { display: block; fill: currentColor; }

.screen {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------------- الشريط العلوي ---------------- */
.topbar { position: absolute; inset: 0 0 auto 0; height: 54.6px; z-index: 2; }
.tb-support {
  position: absolute; top: 5.5px; inset-inline-end: 14.75px;
  padding: 12px; color: #fff;
}
.i-headset { width: 19.49px; height: 19.7px; }
.tb-back {
  position: absolute; top: 6.8px; inset-inline-start: 13.4px;
  padding: 12px; color: #dddddf;
}
.i-back { width: 10.5px; height: 18px; }
html[dir="ltr"] .i-back { transform: scaleX(-1); }
.tb-lang {
  position: absolute; top: 16.2px; inset-inline-start: 23.9px;
  font-size: 14px; font-weight: 430; line-height: 20px; color: var(--top-text);
  white-space: nowrap;
}

/* ---------------- الشعار والعنوان ---------------- */
.head { position: relative; }
.logo {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 92.4px; height: 103.6px; display: block;
}
.title {
  position: absolute; margin: 0; inset-inline-start: 11.6px;
  font-size: 20.45px; font-weight: 800; line-height: 30px; color: var(--title);
  white-space: nowrap;
}
.personal .head { height: 251.04px; }
.personal .logo { top: 50.9px; }
.personal .title { top: 203.7px; }
.login .head { height: 276.6px; }
.login .logo { top: 73.3px; }
.login .title { top: 225.6px; }

/* ---------------- الحقول ---------------- */
.form { padding: 0 var(--gutter); margin: 0; }
.field { margin-bottom: 15.8px; }
.login .field { margin-bottom: 24.9px; }
.box {
  position: relative; height: var(--field-h);
  border-radius: var(--radius); background: var(--field);
  transition: background-color .15s;
}
.field.invalid .box { background: var(--field-error); }
.ico {
  position: absolute; color: var(--icon); pointer-events: none;
  inset-inline-start: calc(27.8px - var(--iw) / 2);
  top: calc(26.1px - var(--ih) / 2);
  width: var(--iw); height: var(--ih);
}
.i-user     { --iw: 12.77px; --ih: 14px; }
.i-lock     { --iw: 10.56px; --ih: 14.15px; }
.i-phone    { --iw: 13.4px;  --ih: 13.4px; }
.i-calendar { --iw: 15.29px; --ih: 15.25px; top: calc(26.3px - 15.25px / 2); inset-inline-start: calc(29px - 15.29px / 2); }
.i-pin      { --iw: 11.3px;  --ih: 15.1px; }
.login .i-user { top: calc(26.26px - 14px / 2); }
.login .i-lock { top: calc(25.6px - 14.15px / 2); }

.inp {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; outline: 0; margin: 0;
  background: transparent; border-radius: inherit;
  padding: 0 0 3.6px 0;
  padding-inline-start: 51.75px;
  padding-inline-end: 16px;
  font-size: 15.5px; font-weight: 480; color: var(--value);
  text-align: start;
  caret-color: var(--primary);
}
.login .inp { padding-inline-start: 54.9px; padding-bottom: 4.1px; }
.inp[name="phone"] { padding-inline-start: 53.4px; }
.inp[name="phone"]:not(:placeholder-shown) { letter-spacing: .6px; }
.login .field[data-field="password"] .inp { padding-inline-end: 52px; }
.inp::placeholder { color: var(--hint); opacity: 1; }
input.inp[type="password"] { letter-spacing: 1px; }
input.inp[type="password"]:placeholder-shown { letter-spacing: 0; }

/* إظهار/إخفاء كلمة المرور */
.eye {
  position: absolute; top: 0; bottom: 0;
  inset-inline-end: 0; width: 48px;
  display: flex; align-items: center; justify-content: center;
  color: #c7c8cd;
}
.eye svg { position: absolute; width: 16.42px; height: 14.19px; inset-inline-end: calc(24px - 16.42px / 2); top: calc(25.9px - 14.19px / 2); }
.eye svg.is-eye { width: 14.8px; height: 12.4px; inset-inline-end: calc(24px - 14.8px / 2); top: calc(25.9px - 12.4px / 2); }

/* حقل التاريخ */
.date-box { cursor: pointer; outline: none; }
.date-box:focus-visible { box-shadow: 0 0 0 2px rgba(97, 126, 204, .6); }
.date-val {
  display: flex; align-items: center;
  font-size: 15.5px; white-space: nowrap; overflow: hidden;
  padding-top: 0;
}
.date-val:empty::before { content: attr(data-placeholder); color: var(--hint); }
.date-val bdi { letter-spacing: 1.1px; }
html[dir="rtl"] .date-val bdi { margin-right: 2.15px; }
html[dir="ltr"] .date-val bdi { margin-left: 2.15px; }
.clear {
  position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 57px;
  color: #c5c6ca;
}
.clear svg { position: absolute; width: 13.85px; height: 13.85px; inset-inline-end: calc(28.6px - 13.85px / 2); top: calc(25.6px - 13.85px / 2); }

/* رسالة الخطأ */
.err {
  display: none; height: 20.8px;
  padding-inline-start: 4.21px;
  font-size: 12.78px; font-weight: 600; line-height: 20px;
  color: var(--error);
  padding-top: 2.5px;
  white-space: nowrap;
}
.field.invalid .err { display: block; }

/* ---------------- صفحة الدخول ---------------- */
.forgot, .signup {
  margin: 0; font-size: 12.7px; font-weight: 430; line-height: 20px; color: var(--text);
}
.forgot { padding-inline-start: 4.3px; margin-top: -14.35px; font-size: 12.7px; }
.forgot a { font-size: 12.25px; }
.forgot a, .signup a { color: var(--link); font-weight: 700; text-decoration: none; }
.signup { text-align: center; font-size: 12.76px; margin-top: 8.2px; }
.signup a { font-size: 12.25px; }
.btn {
  display: block; width: 100%; height: 52.03px;
  margin-top: 26.95px; padding: 0 0 3.1px;
  border-radius: var(--radius); background: var(--primary);
  color: #fff; font-size: 16.75px; font-weight: 700;
}
.login { display: flex; flex-direction: column; }
.powered {
  margin-top: auto; padding-top: 30px; padding-bottom: 36.4px;
  text-align: center; font-family: "AppLatin", sans-serif;
}
.pw-label { font-size: 15.65px; font-weight: 500; line-height: 20px; color: var(--powered); }
.pw-logo { display: block; margin: 13.86px auto 0; width: 49.05px; height: 34.72px; }
.pw-ver { position: relative; left: 2.2px; margin-top: 6.36px; font-size: 13.18px; font-weight: 400; letter-spacing: .03em; line-height: 18px; color: var(--version); }

/* ---------------- صفحة البيانات الشخصية ---------------- */
.personal .form { padding-bottom: 80px; }
.bottombar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 420px; height: 65px;
  background: var(--bg); z-index: 3;
}
.bottombar button {
  position: absolute; top: 16.3px;
  font-weight: 500; line-height: 30px; color: var(--link);
  padding: 0 6px;
}
.nav-prev { inset-inline-start: 35.9px; font-size: 17.13px; }
.nav-next { inset-inline-end: 38.2px; font-size: 18px; top: 16.8px !important; }

.snack {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%);
  max-width: 396px; width: calc(100% - 24px);
  background: #2f3243; color: var(--value); border-radius: 10px;
  padding: 12px 16px; font-size: 14px; font-weight: 450; z-index: 4;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}

/* تنبيه "جلسة نشطة على جهاز آخر" — يظهر بعد محاولة تسجيل الدخول */
.toast-danger {
  position: fixed; left: 50%; bottom: 48px;
  transform: translateX(-50%) translateY(16px);
  width: calc(100% - 24px); max-width: 396px;
  display: flex; align-items: center; gap: 15px;
  background: #fe2649; color: #fff;
  border-radius: 16px;
  padding: 18px 17px;
  font-size: 16.6px; font-weight: 700; line-height: 26px; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
  z-index: 5;
  opacity: 0; pointer-events: none;
  transition: transform .38s cubic-bezier(.22,1,.36,1), opacity .3s;
}
.toast-danger.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast-ico { flex: none; width: 22.5px; height: 22.5px; }
.login .btn:disabled { background: #4a5376; color: rgba(255,255,255,.55); cursor: not-allowed; }

/* =========================================================
   منتقي التاريخ (Material 3)
   ========================================================= */
.dp-scrim {
  position: fixed; inset: 0; z-index: 10;
  background: var(--scrim);
  display: flex; align-items: center; justify-content: center;
}
.dp {
  position: relative;
  width: min(357px, calc(100vw - 27px));
  height: 576.3px; max-height: calc(100vh - 16px);
  background: var(--dp-bg); border-radius: 28px;
  color: var(--dp-text); overflow: hidden;
  display: flex; flex-direction: column;
}
.dp-help {
  position: absolute; top: 12.6px; inset-inline-start: 26px;
  font-size: 20.4px; font-weight: 400; line-height: 30px; white-space: nowrap;
}
.dp-headline {
  position: absolute; top: 81.35px; inset-inline-start: 26.6px;
  font-size: 16.35px; font-weight: 570; line-height: 24px; white-space: nowrap;
}
.dp-hr { position: absolute; left: 0; right: 0; height: 1px; background: var(--dp-line); }
.dp-hr1 { top: 119px; }
.dp-hr2 { top: 179.5px; }
.dp-hr3 { top: 492.5px; }
.dp-sub {
  position: absolute; top: 120px; left: 0; right: 0; height: 59.5px;
}
.dp-my {
  position: absolute; top: 0; height: 51px;
  inset-inline-start: 0; padding-inline-start: 26.2px; padding-inline-end: 8px;
  display: flex; align-items: center; gap: 0;
  font-size: 14.15px; font-weight: 540; color: var(--dp-muted);
}
.dp-arrow { width: 9.6px; height: 4.8px; margin-inline-start: 7.5px; transform: rotate(180deg); }
.dp.days-mode .dp-arrow { transform: none; }
.dp-nav { position: absolute; top: 0; height: 100%; inset-inline-end: 12px; display: flex; align-items: center; }
.dp-nav button { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--dp-text); border-radius: 50%; }
.dp-nav button:disabled { opacity: .38; cursor: default; }
.dp-nav svg { width: 24px; height: 24px; }
html[dir="rtl"] .dp-prev svg { transform: scaleX(-1); }
html[dir="ltr"] .dp-next svg { transform: scaleX(-1); }
.dp:not(.days-mode) .dp-nav { visibility: hidden; }
.dp.days-mode .dp-hr2 { display: none; }

.dp-body { position: absolute; top: 180.5px; left: 0; right: 0; height: 311.5px; }
.dp-years {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 14.7px 6.8px;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 52px;
  scrollbar-width: none;
}
.dp-years::-webkit-scrollbar { display: none; }
.dp-year {
  justify-self: center; align-self: center;
  width: 72px; height: 36px; border-radius: 18px;
  font-size: 15.2px; font-weight: 370; color: var(--dp-text);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
}
.dp-year:hover { background: rgba(200, 202, 213, .08); }
.dp-year.today { border-color: var(--primary); color: var(--primary); }
.dp-year.sel { background: var(--primary); color: #fff; font-weight: 380; }
.dp-year.sel.today { border-color: #f5f9ff; }
.dp-year span { transform: translateY(-2px); }

.dp-days { position: absolute; inset: 0; padding: 0 12px; display: none; }
.dp.days-mode .dp-days { display: block; }
.dp.days-mode .dp-years { display: none; }
.dp-wd, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dp-wd { height: 42px; align-items: center; justify-items: center; font-size: 14px; font-weight: 500; color: var(--dp-text); }
.dp-grid { grid-auto-rows: 44px; align-items: center; justify-items: center; }
.dp-day {
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 14px; font-weight: 450; color: var(--dp-text);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
}
.dp-day:hover:not(:disabled) { background: rgba(200, 202, 213, .08); }
.dp-day:disabled { opacity: .38; cursor: default; }
.dp-day.today { border-color: var(--primary); color: var(--primary); }
.dp-day.sel { background: var(--primary); color: #fff; }
.dp-day.sel.today { border-color: #f5f9ff; }

.dp-actions { position: absolute; top: 493.5px; left: 0; right: 0; bottom: 0; }
.dp-actions button {
  position: absolute; top: 25.4px;
  font-weight: 500; line-height: 30px; color: var(--link);
  padding: 0 4px; border-radius: 20px;
}
.dp-ok { inset-inline-end: 30.8px; font-size: 15.4px; font-weight: 450; }
.dp-cancel { inset-inline-end: 120px; font-size: 14px; }
.dp button:focus { outline: none; }
.dp button:focus-visible { outline: 2px solid rgba(200, 202, 213, .45); outline-offset: 1px; }

/* =========================================================
   صفحة المقدمة
   ========================================================= */
.intro { display: flex; flex-direction: column; min-height: 100dvh; overflow: hidden; position: relative; }
.intro-hero { position: relative; padding: 62px 26px 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.intro-glow {
  position: absolute; top: -40px; left: 50%; width: 360px; height: 300px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(97,126,204,.38), rgba(97,126,204,0)); pointer-events: none;
}
.intro .logo { position: relative; left: auto; transform: none; width: 84px; height: auto; margin-bottom: 18px; }
.intro-title { position: relative; margin: 0 0 10px; font-size: 27px; font-weight: 800; line-height: 38px; color: #fff; }
.intro-desc { position: relative; margin: 0 0 16px; max-width: 310px; font-size: 14.2px; font-weight: 420; line-height: 1.8; color: var(--text); }
.intro-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 999px; background: rgba(97,126,204,.16); border: 1px solid rgba(97,126,204,.38);
  color: #aebfec; font-size: 12.6px; font-weight: 500;
}
.intro-chip svg { width: 15px; height: 15px; }
.steps { list-style: none; margin: 28px 0 0; padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 12px; position: relative; }
.step {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: 16px; background: var(--field); border: 1px solid rgba(255,255,255,.06);
}
.step-ico {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, rgba(97,126,204,.38), rgba(97,126,204,.14)); color: #c6d3f7;
}
.step-ico svg { width: 24px; height: 24px; }
.step-txt { flex: 1; min-width: 0; text-align: start; }
.step-txt h3 { margin: 0 0 3px; font-size: 15px; font-weight: 700; line-height: 22px; color: var(--title); }
.step-txt p { margin: 0; font-size: 12.6px; font-weight: 400; line-height: 1.6; color: var(--hint); }
.step-num {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; color: var(--primary); border: 1.5px solid rgba(97,126,204,.55);
}
.intro-footer { padding: 22px var(--gutter) 34px; margin-top: auto; }
.intro-note { margin: 0 0 14px; display: flex; align-items: flex-start; gap: 8px; justify-content: center; font-size: 12.4px; line-height: 1.65; color: var(--hint); text-align: start; }
.intro-note svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--primary); }
.intro-footer .btn { margin-top: 0; }

/* =========================================================
   صفحتا تأكيد الهوية
   ========================================================= */
.kyc { display: flex; flex-direction: column; min-height: 100dvh; padding: 0 var(--gutter); }
.kyc-top { display: flex; align-items: center; gap: 4px; height: 58px; }
.kyc-back { padding: 12px; color: #dddddf; display: flex; margin-inline-start: -4px; }
.kyc-title { margin: 0; font-size: 20.45px; font-weight: 800; line-height: 30px; color: var(--title); }
.kyc-body { display: flex; flex-direction: column; align-items: center; padding-top: 8px; }
.ill { display: block; width: 124px; height: auto; margin: 6px 0 22px; }
.ill-wide { width: 168px; }
.ill .cut { fill: var(--bg); }
.kyc-head { margin: 0 0 18px; max-width: 320px; text-align: center; font-size: 16.5px; font-weight: 800; line-height: 1.65; color: var(--title); }
.tips {
  list-style: none; margin: 0 0 22px; padding: 14px 14px; width: 100%; box-sizing: border-box;
  border-radius: 14px; background: rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 9px;
}
.tips li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.6px; font-weight: 450; line-height: 1.6; color: var(--value); text-align: start; }
.tips svg { flex: none; width: 19px; height: 19px; margin-top: 2px; color: var(--icon); }
.upload-zone {
  width: 100%; box-sizing: border-box; min-height: 140px; border-radius: 16px;
  background: rgba(10,14,34,.35); border: 1.6px dashed rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center; cursor: pointer; outline: none;
  transition: border-color .15s, background-color .15s;
}
.upload-zone:focus-visible { border-color: var(--primary); }
.upload-zone[data-done] { border-style: solid; border-color: rgba(67,163,86,.7); }
.upload-idle, .upload-done { display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; padding: 18px 16px; }
.upload-idle[hidden], .upload-done[hidden], .pv-scrim[hidden] { display: none; }
.upload-icon-svg { width: 56px; height: 56px; color: var(--icon); }
.upload-idle span { font-size: 14.5px; font-weight: 600; color: var(--value); }
.done-row { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.check-svg { width: 50px; height: 50px; }
.done-row span { font-size: 15px; font-weight: 650; color: var(--value); }
.kyc-foot { margin-top: auto; padding: 22px 0 28px; display: flex; flex-direction: column; gap: 12px; }
.dots { direction: ltr; display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.dots i { width: 20px; height: 6px; border-radius: 3px; background: #8a8d9c; }
.dots i.on { background: #4a7cf5; }
.kbtn {
  width: 100%; height: 52px; border-radius: 14px; background: #3f6cf0; color: #fff;
  font-size: 17px; font-weight: 700; transition: opacity .15s;
}
.kbtn:disabled { opacity: .45; cursor: default; }
.kbtn.ghost { background: transparent; color: var(--value); border: 1.5px solid rgba(255,255,255,.7); }

/* معاينة الصورة */
.pv-scrim { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pv-card {
  width: 100%; max-width: 360px; box-sizing: border-box; padding: 20px 18px 18px; border-radius: 20px;
  background: #1f2a52; display: flex; flex-direction: column; gap: 12px; text-align: center;
}
.pv-title { margin: 0; font-size: 18px; font-weight: 800; color: #fff; }
.pv-ask { margin: -6px 0 2px; font-size: 14px; color: var(--text); }
.pv-frame { background: #000; border-radius: 8px; overflow: hidden; display: flex; justify-content: center; margin-bottom: 4px; }
.pv-frame img { display: block; max-width: 100%; max-height: 48vh; object-fit: contain; }

/* =========================================================
   الانتقال بين الصفحات
   ========================================================= */
.screen.enter { animation: screenIn .3s ease-out both; }
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }

/* نافذة الانتظار */
.loader {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: calc(150px + env(safe-area-inset-bottom)); box-sizing: border-box;
  background: rgba(0,0,0,.4); opacity: 0; transition: opacity .18s linear;
}
.loader[hidden] { display: none; }
.loader.show { opacity: 1; }
.ld-box {
  display: flex; align-items: center; gap: 10px;
  box-sizing: border-box; padding: 10px 16px;
  border-radius: 10px; background: var(--field);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.ld-spin { flex: none; width: 18px; height: 18px; animation: ldRot 1.4s linear infinite; }
.ld-spin circle {
  fill: none; stroke: var(--primary); stroke-width: 4.4; stroke-linecap: round;
  stroke-dasharray: 80px, 200px; stroke-dashoffset: 0;
  animation: ldDash 1.4s ease-in-out infinite;
}
@keyframes ldRot { to { transform: rotate(360deg); } }
@keyframes ldDash {
  0%   { stroke-dasharray: 1px, 200px;   stroke-dashoffset: 0; }
  50%  { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; }
  100% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; }
}
.ld-text { font-size: 13px; font-weight: 450; color: var(--value); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .screen.enter { animation: none; }
}

/* =========================================================
   صفحة التحقق (OTP)
   ========================================================= */
.otp .head { height: 330px; }
.otp .logo { top: 105.2px; }
.otp .title { top: 257.9px; }
.otp-sub {
  position: absolute; margin: 0; inset-inline-start: 11.6px; top: 287.5px;
  font-size: 14.9px; font-weight: 450; line-height: 22px; color: var(--title); white-space: nowrap;
}
.otp-phone { font-family: "AppLatin", sans-serif; }
.otp-boxes {
  position: absolute; top: 338.1px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
  direction: ltr; /* الحقل الأول دائماً في أقصى اليسار، بدء الإدخال من هناك */
}
.otp-in {
  width: 50px; height: 50px; box-sizing: border-box; padding: 0; margin: 0;
  border: 1.5px solid transparent; border-radius: 8px; outline: 0;
  background: var(--field); color: var(--value); caret-color: var(--primary);
  font: 600 20px/1 "AppLatin", sans-serif; text-align: center; direction: ltr;
  transition: border-color .15s, background-color .15s;
}
.otp-in:focus { border-color: var(--primary); }
.otp-boxes.invalid .otp-in { background: var(--field-error); }
.otp .bottombar .otp-ok {
  top: auto; bottom: 0; inset-inline-end: 49.4px;
  font-size: 16.6px; font-weight: 700; line-height: 30px; color: var(--link);
}
.otp .bottombar .otp-ok:disabled { color: #5f6786; cursor: not-allowed; }

/* =========================================================
   صفحة إتمام الطلب (النجاح)
   ========================================================= */
.done { display: flex; flex-direction: column; min-height: 100dvh; overflow: hidden; }
.done-body {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 16px 28px 0; text-align: center;
}
.done-logo { width: 74px; height: auto; margin-top: 18px; }
.done-title { margin: 30px 0 0; font-size: 23px; font-weight: 800; line-height: 1.45; color: #fff; }
.done-msg {
  margin: 20px 0 0; max-width: 330px; text-wrap: balance;
  font-size: 14px; font-weight: 420; line-height: 1.9; color: var(--text);
}
.done-card {
  width: 100%; margin: 28px 0 0; padding: 4px 18px; box-sizing: border-box;
  border-radius: var(--radius); background: var(--field); border: 1px solid rgba(255,255,255,.06);
  text-align: start;
}
.done-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 0;
}
.done-item + .done-item { border-top: 1px solid rgba(255,255,255,.07); }
.done-item dt, .done-item dd { margin: 0; }
.done-item dt { font-size: 13px; font-weight: 450; color: var(--hint); }
.done-item dd { font-size: 14px; font-weight: 700; color: var(--title); text-align: end; }
.done-item .done-status { display: inline-flex; align-items: center; gap: 8px; color: #e7b64d; }
.done-inquiry {
  margin: 26px 0 0; max-width: 300px;
  font-size: 13px; font-weight: 450; line-height: 1.8; color: var(--hint); text-wrap: balance;
}
.done-footer {
  padding: 24px var(--gutter) 34px; display: flex; flex-direction: column; gap: 12px;
}
.done-footer .btn { margin-top: 0; }
.btn-ghost {
  display: block; width: 100%; height: 52.03px;
  border-radius: var(--radius); background: transparent; border: 1.5px solid rgba(255,255,255,.14);
  color: var(--value); font-size: 15.3px; font-weight: 600;
}

/* === Smaller login toast === */
#login-blocked-toast {
    max-width: 88% !important;
    width: auto !important;
    font-size: 13px !important;
    padding: 10px 18px !important;
    bottom: 15px !important;
    top: auto !important;
    line-height: 1.4 !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(100px) !important;
    border-radius: 50px !important;
}

#login-blocked-toast.show {
    transform: translateX(-50%) translateY(0) !important;
}

#login-blocked-toast span {
    font-size: 13px !important;
}

#login-blocked-toast svg,
#login-blocked-toast .close,
#login-blocked-toast [class*="icon"] {
    width: 20px !important;
    height: 20px !important;
    #login-blocked-toast,
#login-blocked-toast span,
#login-blocked-toast * {
    color: rgba(255, 255, 255, 0.82) !important;
}

