/* ============================================================
   shanat-app — app.css  (v2)
   التنسيقات الرئيسية — مطابقة لتصميم hr-y.com/app/?login=true
   + نظام ثيم فاتح/داكن بمتغيرات CSS
   ============================================================ */

/* ---------- خطوط Alexandria (محلية) ---------- */
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-v6-arabic_latin-100.woff2') format('woff2'); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-v6-arabic_latin-200.woff2') format('woff2'); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-v6-arabic_latin-300.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-v6-arabic_latin-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-v5-arabic_latin-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-v5-arabic_latin-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-v5-arabic_latin-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-v5-arabic_latin-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('../fonts/alexandria-v5-arabic_latin-900.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }

/* ============================================================
   متغيرات الثيم
   ============================================================ */
:root {
  /* الألوان الأساسية — دمج مزدوج: أزرق الموقع الحي #008BFF داخل الهيكل الاحترافي */
  --accent:        #008BFF;
  --accent-deep:   #0072D6;
  --accent-soft:   #3b82f6;
  --heading:       #2e7cde;
  --purple-a:      #8E2994;
  --purple-b:      #E018FFBF;

  /* اللون الثانوي — كهرماني هادئ للمسات الدقيقة فقط */
  --gold:          #E8960C;
  --gold-deep:     #C57F06;
  --gold-soft:     rgba(232, 150, 12, 0.10);

  /* الخلفية الحية والزجاج — خافتة جداً (هدوء بصري) */
  --blob-a:        rgba(0, 139, 255, 0.07);
  --blob-b:        rgba(232, 150, 12, 0.05);
  --glass-bg:      rgba(246, 251, 255, 0.75);
  /* شريط الهيدر — دمج مزدوج: كحلي شبه شفاف يكشف خلفية الموقع الحي خلفه (زجاج فاخر) */
  --header-bg:     linear-gradient(160deg, rgba(13, 37, 71, 0.88) 0%, rgba(17, 52, 99, 0.84) 55%, rgba(15, 44, 85, 0.88) 100%);
  --header-line:   rgba(255, 255, 255, 0.08);
  --on-header:     #FFFFFF;
  --on-header-sub: rgba(226, 236, 250, 0.62);

  /* round28: الخلفيات — لوحة ثلجية (أبيض-أزرق جليدي) بدل الرمادي المحايد */
  --bg-body:       #EDF4FC;
  --bg-body-img:   linear-gradient(180deg, rgba(240, 247, 255, 0.50) 0%, rgba(228, 240, 252, 0.58) 100%), url('../img/white-background.webp');
  --bg-card:       rgba(250, 253, 255, 0.94);
  --bg-soft:       #EAF2FB;
  --bg-soft-hover: #DBE9F9;
  --bg-panel:      #FBFDFF;

  /* النصوص — كحلي مائل لأزرق الموقع الحي (#002060) بتباين ممتاز */
  --text-main:     #0C2155;
  --text-sub:      #51617D;
  --text-faint:    #8394AE;
  --text-placeholder: #9AA9C0;

  /* round28: الحقول — خلفية ثلجية زرقاء-بيضاء (كانت #FFF7F7 وردية) */
  --input-bg:        #F3F9FF;
  --input-bg-focus:  #FDFEFF;
  --input-border:    #008BFF;
  --input-border-focus: #175EFF6E;
  --input-text:      #0C2155;
  --input-text-focus:#0C2155;
  --input-glow:      0 1px 4px rgba(12, 33, 85, 0.08); /* round26: كانت هالة بيضاء ضبابية كثيفة 9px/8px */
  --ring:            rgba(0, 139, 255, 0.13);
  --ring-strong:     rgba(0, 139, 255, 0.30);

  /* round28: الحدود والفواصل — درجات جليدية */
  --line:          #E3EDFA;
  --line-soft:     #CFE2F9;
  /* إطار الشريط المتحرك وزر الثيم — أزرق الهوية */
  --border-color:  #008BFD;

  /* الحالات */
  --success:       #00b56a;
  --success-bg:    #f0fff7;
  --danger:        #e02b2b;
  --danger-bg:     #fff2f2;
  --warn:          #e07b00;

  /* الدروب زون (مطابق للموقع الحي) */
  --dz-bg:         #3b82f6;
  --dz-border:     #ffffff;
  --dz-ring:       #008BFF;
  --dz-text:       #ffffff;

  /* الظلال */
  --shadow-card:   0 8px 30px rgba(0, 80, 255, 0.10);
  --shadow-pop:    0 8px 25px rgba(0, 0, 0, 0.25);
  --shadow-panel:  0 15px 50px rgba(0, 0, 0, 0.25);

  /* اللوجو النصي — أبيض فاخر فوق الهيدر الكحلي */
  --brand-grad-a:    #FFFFFF;
  --brand-grad-b:    #BBD8FF;
  --brand-outline:   transparent;
}

:root[data-theme="dark"] {
  /* الألوان الأساسية — أزرق اللوجو الحي للداكن (8ac4f0/5aa0d6) */
  --accent:        #5AA0D6;
  --accent-deep:   #2E7CB8;
  --accent-soft:   #8AC4F0;
  --heading:       #8AC4F0;
  --purple-a:      #8E2994;
  --purple-b:      #E018FFBF;

  /* اللون الثانوي — ذهبي هادئ للداكن */
  --gold:          #E8B45A;
  --gold-deep:     #D19A38;
  --gold-soft:     rgba(232, 180, 90, 0.10);

  /* الخلفية الحية والزجاج */
  --blob-a:        rgba(90, 160, 214, 0.07);
  --blob-b:        rgba(232, 180, 90, 0.05);
  --glass-bg:      rgba(15, 17, 22, 0.72);
  /* شريط الهيدر — كحلي شبه شفاف يكشف الخلفية الداكنة الحية */
  --header-bg:     linear-gradient(160deg, rgba(12, 27, 51, 0.86) 0%, rgba(16, 38, 74, 0.80) 55%, rgba(13, 31, 61, 0.86) 100%);
  --header-line:   rgba(255, 255, 255, 0.06);
  --on-header:     #F2F6FC;
  --on-header-sub: rgba(206, 220, 240, 0.55);

  /* الخلفيات — صورة الموقع الحي الداكنة مع طبقة تعتيم تحفظ التباين */
  --bg-body:       #0F1116;
  --bg-body-img:   linear-gradient(180deg, rgba(15, 17, 22, 0.40) 0%, rgba(10, 12, 16, 0.55) 100%), url('../img/black-background.webp');
  --bg-card:       rgba(23, 26, 33, 0.92);
  --bg-soft:       #1C2029;
  --bg-soft-hover: #232834;
  --bg-panel:      #161920;

  /* النصوص — سلّم محايد هادئ */
  --text-main:     #E9EEF6;
  --text-sub:      #9BA8BC;
  --text-faint:    #6E7B90;
  --text-placeholder: #5F6C81;

  /* الحقول — تنسيقات e/8 الداكنة الحية: توهج أزرق خافت بدل الهالة البيضاء */
  --input-bg:        #191B21;
  --input-bg-focus:  #14161B;
  --input-border:    #2E7CB8;
  --input-border-focus: #8AC4F0;
  --input-text:      #E9EEF6;
  --input-text-focus:#FFFFFF;
  --input-glow:      0 1px 4px rgba(0, 0, 0, 0.25); /* round26: إزالة الهالة الزرقاء الضبابية */
  --ring:            rgba(90, 160, 214, 0.16);
  --ring-strong:     rgba(90, 160, 214, 0.34);

  /* الحدود والفواصل */
  --line:          #242935;
  --line-soft:     #2B3140;
  /* إطار الشريط المتحرك وزر الثيم — نفس أزرق الهوية */
  --border-color:  #008BFD;

  /* الحالات */
  --success:       #2BD48F;
  --success-bg:    #0F231B;
  --danger:        #F27878;
  --danger-bg:     #271518;
  --warn:          #E8B45A;

  /* الدروب زون */
  --dz-bg:         #24405c;
  --dz-border:     #5aa0d6;
  --dz-ring:       #2e7cb8;
  --dz-text:       #cfe6f8;

  /* الظلال — ناعمة منتشرة */
  --shadow-card:   0 1px 2px rgba(0, 0, 0, 0.40), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-pop:    0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-panel:  0 16px 48px rgba(0, 0, 0, 0.55);

  /* اللوجو النصي — بلا إطار في الداكن (التدرج الفاتح واضح بذاته) */
  --brand-grad-a:    #8AC4F0;
  --brand-grad-b:    #5AA0D6;
  --brand-outline:   transparent;
}

/* ============================================================
   أساسيات
   ============================================================ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Alexandria', sans-serif !important;
  direction: rtl;
  background: var(--bg-body-img) center center / cover no-repeat fixed;
  background-color: var(--bg-body);
  min-height: 100vh;
  color: var(--text-main);
  animation: fadeIn 1s ease-in;
  transition: background-color .3s ease, color .3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* الخلفية الحية — فقاعتا غرادينت ضبابيتان تطفوان ببطء خلف المحتوى (CSS خالص) */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
body::before {
  width: 46vmax; height: 46vmax;
  top: -14vmax; right: -12vmax;
  background: radial-gradient(circle at 45% 45%, var(--blob-a), transparent 62%);
  animation: blobDriftA 26s ease-in-out infinite alternate;
}
body::after {
  width: 40vmax; height: 40vmax;
  bottom: -16vmax; left: -10vmax;
  background: radial-gradient(circle at 55% 55%, var(--blob-b), transparent 62%);
  animation: blobDriftB 32s ease-in-out infinite alternate;
}
@keyframes blobDriftA {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-9vmax, 7vmax) scale(1.15); }
}
@keyframes blobDriftB {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8vmax, -8vmax) scale(1.12); }
}

body, button, input, select, textarea { font-family: 'Alexandria', sans-serif !important; }

a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-soft); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

::selection { background: var(--accent); color: #fff; }

/* ============================================================
   الشريط المتحرك العلوي — تصميم الإطار المتوهج المتدرج (ثنائي اللغة AR/EN)
   (إطار pill بتدرج متحرك + نص بتدرج لامع textShine + ظل أزرق)
   ============================================================ */
.marquee-container {
  position: absolute;
  top: 10px;
  left: 0; /* بعرض كامل — الزران انتقلا للأسفل فلا تزاحم */
  width: 100%;
  z-index: 5;
}

.marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  position: relative;
  /* الصفحة RTL — نثبت هندسة الشريط LTR كي يطابق مدى الحركة (-50% → 0)
     نافذة العرض، والنصوص العربية داخل العناصر تظل سليمة الاتجاه */
  direction: ltr;
}

.marquee-content {
  display: flex;
  animation: marquee-ar 50s linear infinite;
}

/* اتجاه الحركة بالعربية (من اليمين لليسار: -50% إلى 0) */
:root:not([data-lang="en"]) .marquee-content { animation-name: marquee-ar; }

/* اتجاه الحركة بالإنجليزية (من اليسار لليمين: 0 إلى -50%) */
:root[data-lang="en"] .marquee-content { animation-name: marquee-en; }

/* تنسيق الإطار الخارجي والظل للنصوص */
.marqueeitem {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: 'Alexandria', sans-serif;
  font-size: 12px;
  font-weight: bolder;
  color: var(--text-main);
  padding: 4px 12px;
  margin: 5px 8px;
  box-shadow: 0px 0px 12px 4px rgba(0, 139, 255, 0.4);
  position: relative;
  border-radius: 9px;
  background: transparent !important; /* ضمان شفافية الداخل تماماً */
  border: 4px solid transparent; /* الحفاظ على المساحة الخاصة بالإطار */
  pointer-events: none;
  transition: 300ms;
}

/* تفعيل/إيقاف النصوص العربية والإنجليزية بناءً على حالة اللغة */
.text-en { display: none; }
.text-ar { display: inline-block; }
:root[data-lang="en"] .text-en { display: inline-block; }
:root[data-lang="en"] .text-ar { display: none; }

/* حركة تدرج الألوان داخل النص متناسقة مع ألوان الشعار */
.marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-weight: bold;
  font-family: 'Alexandria', sans-serif;
  background: linear-gradient(90deg, #00d2ff, #008BFF, #ffffff, #008BFF, #00d2ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 4s linear infinite;
  position: relative;
  line-height: 2;
}

/* تأثير إطار الخط (Text Stroke) لإبراز النص بوضوح */
.marquee-item::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  font-weight: bold;
  color: transparent;
  text-shadow:
      1px 1px 0 rgba(0, 40, 90, 0.8),
      -1px -1px 0 rgba(0, 40, 90, 0.8),
      1px -1px 0 rgba(0, 40, 90, 0.8),
      -1px 1px 0 rgba(0, 40, 90, 0.8);
}

/* تحديث الـ attr عند تفعيل الإنجليزية لتتوافق مع إطار النص */
:root[data-lang="en"] .marquee-item::before { content: attr(data-text-en); }

/* round28b: شرائح الشريط في الفاتح — توهج أخف ونص أزرق جليدي بحدود بيضاء
   (كان النص بتدرج فيه أبيض يختفي على الثلجي + stroke كحلي ثقيل) */
:root:not([data-theme="dark"]) .marqueeitem {
  box-shadow: 0 0 10px 2px rgba(0, 139, 255, 0.16);
}
:root:not([data-theme="dark"]) .marquee-item {
  background: linear-gradient(90deg, #0072D6, #008BFF, #00AEFF, #008BFF, #0072D6);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
:root:not([data-theme="dark"]) .marquee-item::before {
  text-shadow:
      1px 1px 0 rgba(255, 255, 255, 0.9),
      -1px -1px 0 rgba(255, 255, 255, 0.9),
      1px -1px 0 rgba(255, 255, 255, 0.9),
      -1px 1px 0 rgba(255, 255, 255, 0.9);
}

/* طبقة الإطار المتحرك المنفصلة تماماً عن محتوى الصندوق لتجنب تحوله لخلفية */
.marqueeitem::after {
  content: '';
  position: absolute;
  inset: -4px; /* مطابقة مساحة الـ border الخارجي */
  border-radius: 9px; /* تدوير متناسق مع حواف العنصر الأساسي */
  padding: 4px; /* سمك الإطار */

  /* التدرج المتحرك الخاص بالإطار فقط */
  background: linear-gradient(0deg, #014088, #008BFF, #00d2ff, #014088);
  background-size: 200% 200%;
  animation: borderGradientRotate 6s linear infinite;

  /* قص المنطقة الداخلية ليبقى الإطار فقط محيطاً بالصندوق شفاف الداخل */
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  pointer-events: none;
  z-index: 1;
}

/* حركات التمرير للشريط (عربي وإنجليزي) */
@keyframes marquee-ar {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes marquee-en {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* حركة انيميشن تدرج ألوان النص (تشبه لمعان الشعار) */
@keyframes textShine {
  to {
    background-position: 200% center;
  }
}

/* حركة تدرج ألوان الإطار الخارجي بشكل فيزيائي سلس */
@keyframes borderGradientRotate {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
  100% {
    background-position: 0% 0%;
  }
}

/* الشريط وزر اللغة يختفيان بعد تسجيل الدخول وفي شاشة التسجيل (نفس آلية النسخة السابقة) */
body.is-logged .marquee-container { display: none; }
body.reg-open .marquee-container { display: none; }
body.is-logged .lang-toggle { display: none; }
body.reg-open .lang-toggle { display: none; }

/* ============================================================
   الهيدر: اللوجو + زر الثيم
   ============================================================ */
.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  /* الشريط المتحرك أصبح absolute (كما بالموقع الحي) فلا يشغل مساحة بالتدفق —
     نعوّضها بحشوة علوية تعادل ارتفاعه (~70px) كما يفعل الحي بـ margin-top:15% */
  padding: 74px 14px 24px 14px;
  position: relative;
  /* دمج مزدوج — زجاج كحلي شبه شفاف فوق خلفية الموقع الحي (Fintech × هوية hr-y) */
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-line);
  border-radius: 0 0 50px 50px;
  box-shadow: 0 8px 28px rgba(13, 37, 71, 0.18);
  margin-bottom: 6px;
}
:root[data-theme="dark"] .app-header { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.40); }
/* نصوص البراند فوق الكحلي — فاتحة راقية */
.app-header .brand-sub { color: var(--on-header-sub); }
/* زر الثيم واللغة والجرس فوق الكحلي — تحتفظ بالإطار المتحرك والأيقونة تفتح للتباين */
.app-header .theme-toggle,
.app-header .lang-toggle,
.app-header .notif-bell { color: var(--on-header); }
/* الشعار ثابت — هدوء بصري احترافي */
.brand-link svg { transition: transform .25s ease; }
.brand-link:hover svg { transform: translateY(-2px); }
/* مطابق لـ .mylogo_container في الموقع الحي: اللوجو فوق والنص تحته متمركزين */
.brand-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
  text-align: center;
}
.brand-link svg {
  display: block;
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 0 var(--brand-outline))
          drop-shadow(1px 0 0 var(--brand-outline))
          drop-shadow(-1px 0 0 var(--brand-outline))
          drop-shadow(0 1px 0 var(--brand-outline))
          drop-shadow(0 -1px 0 var(--brand-outline));
}
.brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.35;
  text-align: center;
}
/* مطابق لـ .mylogo في الموقع الحي: نص متدرج بإطار أبيض */
.brand-title {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .2px;
  background: linear-gradient(90deg, var(--brand-grad-a), var(--brand-grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}
.brand-title::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-outline);
  z-index: -1;
  font-weight: bold;
  text-shadow:
    1px 1px 0 var(--brand-outline),
    -1px -1px 0 var(--brand-outline),
    1px -1px 0 var(--brand-outline),
    -1px 1px 0 var(--brand-outline),
    0 1px 0 var(--brand-outline),
    0 -1px 0 var(--brand-outline),
    1px 0 0 var(--brand-outline),
    -1px 0 0 var(--brand-outline);
}
/* الشعار الجديد: تدرجات SVG دوارة ذاتية التحريك (rotatingGradient/polyGrad) — لا تجاوزات CSS */
/* مطابق لـ .logistics-text في الموقع الحي */
.brand-sub {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 1.6px;
}

/* زر تبديل الوضع بخلفية زجاجية مع نفس الإطار المتحرك (تصميم المستخدم) */
.theme-toggle {
  position: fixed;
  bottom: 10px;
  left: 15px;
  width: 50px;
  height: 50px;
  color: var(--text-sub);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 0px 12px 4px rgba(0, 139, 255, 0.4);
  z-index: 50;
  border-radius: 9px;
  background: rgb(20 20 20 / 0%) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 4px solid transparent;
  transition: 0.25s;
}
.theme-toggle:hover {
  color: var(--accent);
  transform: scale(1.05);
}
.theme-toggle:active { transform: scale(.94); }

/* زر تبديل اللغة في الاتجاه الآخر (اليمين) */
.lang-toggle {
  position: fixed;
  bottom: 10px;
  right: 15px;
  width: 50px;
  height: 50px;
  color: var(--text-sub);
  font-size: 16px;
  font-weight: bold;
  font-family: 'Alexandria', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 0px 12px 4px rgba(0, 139, 255, 0.4);
  z-index: 50;
  border-radius: 9px;
  background: rgb(20 20 20 / 0%) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 4px solid transparent;
  transition: 0.25s;
}
.lang-toggle:hover { color: var(--accent); transform: scale(1.05); }
.lang-toggle:active { transform: scale(.94); }

/* طبقة الإطار المتحرك لزري theme-toggle و lang-toggle */
.theme-toggle::after,
.lang-toggle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9px;
  padding: 4px;
  background: linear-gradient(0deg, #014088, #008BFF, #00d2ff, #014088);
  background-size: 200% 200%;
  animation: borderGradientRotate 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.theme-toggle i { z-index: 2; }
.lang-toggle span { z-index: 2; }

/* أيقونات المزايا داخل الشريط المتحرك — بنفس لمعان النص المتدرج */
.marquee-icon {
  font-size: 12px;
  margin: 0 8px 0 2px;
  background: linear-gradient(90deg, #00d2ff, #008BFF, #ffffff, #008BFF, #00d2ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 4s linear infinite;
}

/* تبديل نصوص زر اللغة حسب وضع اللغة الحالي */
:root[data-lang="en"] .lang-toggle .lang-ar { display: inline-block; }
:root[data-lang="en"] .lang-toggle .lang-en { display: none; }
:root:not([data-lang="en"]) .lang-toggle .lang-ar { display: none; }
:root:not([data-lang="en"]) .lang-toggle .lang-en { display: inline-block; }

/* تبديل أيقونات الشمس والقمر حسب الوضع الحالي */
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }
:root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: inline-block; }

/* ============================================================
   حاوية النموذج
   ============================================================ */
.app-container {
  max-width: 480px;
  /* البطاقة تطفو فوق الهيدر الكحلي — نمط Hero Overlap الفاخر */
  margin: -26px auto 18px auto;
  padding: 0 14px;
  position: relative;
  z-index: 2;
}
body.is-logged .app-container { margin-top: 0; }
.form-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  /* round27: أزيل blur من الكروت الكبيرة — كان سبب التهنيج فوق الكانفاس المتحرك
     (المرجع الشغال يضع blur على العناصر الصغيرة فقط: هيدر/قوائم/رسائل) */
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(16, 35, 63, 0.05),
    0 10px 30px rgba(16, 35, 63, 0.08),
    0 24px 60px rgba(16, 35, 63, 0.06);
  padding: 22px 20px 26px 20px;
  margin-top: 0;
  transition: background-color .3s ease, border-color .3s ease;
}
:root[data-theme="dark"] .form-card {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.40),
    0 12px 32px rgba(0, 0, 0, 0.45);
}

/* العنوان — مطابق للموقع الحي: لون #2e7cde + خطان جانبيان */
.form-heading {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: .2px;
  margin: 4px 0 14px 0;
}
/* دمج مزدوج: خطّا الموقع الحي فوق وتحت العنوان — لكن بتدرج يذوب عند الأطراف (لمسة راقية) */
.form-heading::before,
.form-heading::after {
  content: "";
  display: block;
  height: 1.5px;
  width: 72%;
  margin: 7px auto;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--heading) 18%, var(--heading) 82%, transparent 100%);
  opacity: .8;
}
.form-subheading {
  text-align: center;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-faint);
  margin: -6px 0 20px 0;
}

/* ============================================================
   التبويبات (هاتف / إيميل)
   ============================================================ */
.auth-tabs {
  position: relative;
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 5px;
}
/* المؤشر المنزلق — Pill يتحرك بين التبويبين */
.auth-tabs::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  right: 5px;
  width: calc(50% - 9px);
  border-radius: 10px;
  background: var(--bg-panel);
  box-shadow: 0 1px 3px rgba(16, 35, 63, 0.08), 0 2px 8px var(--ring);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}
/* بالـ RTL: التبويب الثاني (البريد) على اليسار — المؤشر ينزلق له */
.auth-tabs:has(.auth-tab:last-child.active)::before {
  transform: translateX(calc(-100% - 8px));
}
/* تبويبات طريقة الدخول (كلمة مرور/رمز): لو تبويب التبديل مخفي — أخفِ الشريط كله */
#pw-method-tabs:has(#link-pw-to-otp[style*="display:none"]),
#pw-method-tabs:has(#link-pw-to-otp[style*="display: none"]) { display: none; }
#otp-method-tabs:has(#link-otp-to-pw[style*="display:none"]),
#otp-method-tabs:has(#link-otp-to-pw[style*="display: none"]) { display: none; }
.auth-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-sub);
  border: none;
  background: transparent;
  transition: color .25s ease, transform .15s ease;
}
.auth-tab:active { transform: scale(.96); }
.auth-tab.active { color: var(--accent-deep); }
/* توافق خلفي لو المتصفح لا يدعم :has \u2014 يظهر خلفية للتبويب النشط */
@supports not (selector(:has(*))) {
  .auth-tab.active {
    background: var(--bg-panel);
    box-shadow: 0 2px 8px var(--ring);
  }
}
.auth-tab i { margin-left: 6px; }

/* ============================================================
   الحقول العامة — مطابقة للموقع الحي:
   border 6px #008BFF + خلفية #FFF7F7 + نص #004FFF + توهج أبيض + نص متمركز
   ============================================================ */
.field-group { margin-bottom: 10px; }
/* الاسم الرباعي — يبدو كحقل واحد مقسم لأربعة بفواصل رفيعة */
.names-row {
  display: flex;
  direction: rtl;
  /* تنسيق الحقول الحي من e/8 كما هو: حدود 6px + radius 7px */
  border: 6px solid var(--input-border);
  border-radius: 7px;
  background-color: var(--input-bg);
  box-shadow: var(--input-glow);
  overflow: hidden;
  transition: border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
}
.names-row:focus-within {
  background-color: var(--input-bg-focus);
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 4px var(--ring), var(--input-glow);
}
.names-row .app-input,
.names-row input.app-input {
  flex: 1 1 0;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 10px 4px;
  font-size: 12.5px;
  text-align: center;
}
/* فاصل رفيع بين الحقول */
.names-row .app-input + .app-input { border-inline-start: 1px solid var(--input-border) !important; }
.names-row .app-input::placeholder { font-size: 10.5px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}
.field-label .req { color: var(--danger); margin-right: 3px; }

input.app-input,
textarea.app-input,
select.app-input {
  width: 100%;
  /* تنسيق الحقول الحي من hr-y.com/app/e/8 حرفياً: 6px حدود + radius 7px + padding 10/12 */
  padding: 10px 12px;
  border: 6px solid var(--input-border);
  border-radius: 7px;
  background-color: var(--input-bg);
  color: var(--input-text);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  box-shadow: var(--input-glow);
  transition: border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
  direction: rtl;
  text-align: center;
}
input.app-input::placeholder,
textarea.app-input::placeholder {
  color: var(--text-placeholder);
  font-weight: 400;
  font-size: 13px;
  text-align: center;
}
input.app-input:focus,
textarea.app-input:focus,
select.app-input:focus {
  color: var(--input-text-focus);
  background-color: var(--input-bg-focus);
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 4px var(--ring), var(--input-glow);
}
textarea.app-input { resize: vertical; min-height: 80px; }

input[type="email"].app-input,
input[type="password"].app-input { direction: ltr; }
input[type="tel"].app-input { direction: ltr; text-align: center; }

/* ============================================================
   round26: إصلاح اللون الضبابي داخل الحقول
   لون autofill الباهت الذي يفرضه كروم/سفاري (أزرق/أصفر ضبابي)
   يُستبدل بخلفية الحقل الطبيعية عبر inset box-shadow ضخمة
   + تثبيت لون النص وتأجيل انتقال خلفية المتصفح لأجل غير مسمى
   ============================================================ */
input.app-input:-webkit-autofill,
input.app-input:-webkit-autofill:hover,
textarea.app-input:-webkit-autofill,
select.app-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
  -webkit-text-fill-color: var(--input-text) !important;
  caret-color: var(--input-text);
  transition: background-color 999999s ease-in-out 0s;
}
input.app-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg-focus) inset, 0 0 0 4px var(--ring) !important;
  box-shadow: 0 0 0 1000px var(--input-bg-focus) inset, 0 0 0 4px var(--ring) !important;
  -webkit-text-fill-color: var(--input-text-focus) !important;
}
/* فايرفوكس */
input.app-input:autofill,
textarea.app-input:autofill {
  background-color: var(--input-bg) !important;
  color: var(--input-text) !important;
}


/* ============================================================
   زر الإرسال الرئيسي — مطابق للموقع الحي:
   أزرق #008BFF → hover تدرج بنفسجي (180deg, #8E2994 → #E018FFBF)
   ============================================================ */
.form-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 13px;
  margin-top: 8px;
  border: none;
  border-radius: 12px;
  background-color: var(--accent);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 35, 63, 0.12), 0 6px 16px var(--ring);
  transition: background-color .25s ease, transform .18s ease, box-shadow .25s ease;
  letter-spacing: .3px;
}
/* دمج مزدوج: هوفر الموقع الحي — تدرج بنفسجي (#8E2994 → #E018FFBF) مع رفعة ناعمة */
.form-button:hover:not(:disabled),
.form-button:focus:not(:disabled) {
  background-color: var(--purple-a);
  background-image: linear-gradient(180deg, var(--purple-a) 0%, var(--purple-b) 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 35, 63, 0.14), 0 8px 20px rgba(142, 41, 148, 0.30);
}
.form-button:active:not(:disabled) { transform: translateY(0) scale(.985); }
.form-button:disabled { opacity: .6; cursor: not-allowed; }
.form-button .spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -3px;
  margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-button.secondary {
  background-color: var(--bg-soft);
  background-image: none;
  color: var(--accent-deep);
  box-shadow: none;
}
.form-button.secondary:hover {
  background-color: var(--bg-soft-hover);
  background-image: none;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   checkbox rows — مطابق: مربع بحد 5px أزرق
   ============================================================ */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  font-size: 13px;
  color: var(--text-sub);
}
.check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 2px solid var(--input-border-focus);
  border-radius: 6px;
  background: var(--input-bg);
  margin-top: 1px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: 200ms;
}
.check-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check-row input[type="checkbox"]:checked::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.check-row label { cursor: pointer; line-height: 1.6; }

/* ============================================================
   روابط أسفل النموذج
   ============================================================ */
.form-links { text-align: center; margin-top: 14px; font-size: 13px; }
.form-links a { font-weight: 600; transition: color .2s ease; }
.form-links a:hover { color: var(--gold-deep); }

/* ============================================================
   خانات OTP الست
   ============================================================ */
.otp-inputs {
  display: flex;
  direction: ltr;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
}
.otp-inputs input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--input-text);
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  outline: none;
  box-shadow: var(--input-glow);
  transition: border-color .2s, transform .1s, background .2s;
  caret-color: var(--accent-deep);
}
.otp-inputs input:focus {
  border-color: var(--input-border-focus);
  background: var(--input-bg-focus);
  transform: scale(1.06);
  box-shadow: 0 0 0 4px var(--ring);
}
.otp-inputs input.filled { border-color: var(--success); background: var(--success-bg); }
/* round29b: ظل أنعم لمربعات OTP في الفاتح — متناسق مع الخلفية الثلجية */
:root:not([data-theme="dark"]) .otp-inputs input { box-shadow: 0 2px 7px rgba(13, 37, 71, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9); }
.otp-inputs input.otp-error { border-color: var(--danger); background: var(--danger-bg); animation: shake .3s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.otp-dest { text-align: center; font-size: 14px; color: var(--text-sub); margin-bottom: 4px; }
.otp-dest b { color: var(--accent-deep); direction: ltr; display: inline-block; }
.otp-channels {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px 0;
  font-size: 12px;
  color: var(--text-sub);
}
.otp-channels span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-soft);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.otp-channels span i { color: var(--accent); }

.otp-resend { text-align: center; margin-top: 14px; margin-bottom: 6px; font-size: 13px; color: var(--text-sub); }
.otp-resend button {
  border: none;
  background: none;
  color: var(--accent-deep);
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
}
.otp-resend button:disabled { color: var(--text-faint); cursor: not-allowed; }
.otp-timer { font-weight: 700; color: var(--gold-deep); direction: ltr; display: inline-block; }
:root[data-theme="dark"] .otp-timer { color: var(--gold); }


/* حركة الظهور المشتركة (تستخدمها .reg-step.active و.notif-panel وغيرها) */
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   الخريطة وحقل العنوان — مطابق: حد 6px أزرق + ظل
   ============================================================ */
.map-field-wrap { position: relative; }
.map-field-wrap .app-input { padding-left: 96px; }
.map-field-wrap .clear-icon {
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--danger);
  cursor: pointer;
  display: none;
  font-size: 18px;
  z-index: 5;
}
/* الخريطة ظاهرة مباشرة — تنسيق الموقع الحي: حد 6px أزرق + ظل */
#map {
  width: 100%;
  height: 160px;
  border: 6px solid #3B82F6;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  margin: 10px 0 10px;
  display: block;
  overflow: hidden;
  background: #e5e3df;
}
/* الوضع الداكن — خلفية الخريطة داكنة مثل الموقع الحي (#242f3e) */
:root[data-theme="dark"] #map,
:root[data-theme="dark"] #map .gm-style,
:root[data-theme="dark"] #map .gm-style > div:first-child {
  background: #242f3e !important;
}
#map.visible { display: block; }
/* زر "موقعي" داخل الحقل — مطابق للأصلي (أيقونة فوق النص، يسار الحقل) */
.locate-button {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  /* round28b: شريحة أفقية مدمجة بخلفية وحدود — كان عمودياً أطول من الحقل فيتداخل مع حافته */
  border: 1px solid var(--line-soft);
  background: var(--bg-panel);
  border-radius: 999px;
  color: var(--danger);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  cursor: pointer;
  z-index: 5;
  line-height: 1.4;
  font-family: inherit;
  box-shadow: 0 1px 4px rgba(12, 33, 85, 0.10);
}
.locate-button:hover { opacity: .8; }
.locate-button:disabled { opacity: .45; cursor: wait; }
.locate-button img { height: 21px; width: auto; display: block; margin-bottom: -1px; }
:root[data-theme="dark"] .locate-button img { filter: invert(.8) hue-rotate(180deg); }
/* إخفاء عناصر جوجل الزائدة داخل الخريطة (مطابق للموقع الحي) */
#map a,
#map .gm-style-cc,
#map .gmnoscreen,
#map img[alt="Google"],
#map .gm-style-mtc-bbw,
#map .gm-style-iw-chr,
.gm-style-cc span,
.hdpi.pac-logo:after { display: none !important; }
#map .gm-fullscreen-control,
#map .gmnoprint .gm-control-active {
  background: transparent !important;
  border: 1px solid var(--accent) !important;
  border-radius: 20px !important;
  width: 32px !important;
  height: 32px !important;
  margin: 5.5px !important;
}
#map .gm-fullscreen-control img,
#map .gmnoprint .gm-control-active img {
  filter: brightness(0) saturate(100%) invert(58%) sepia(77%) saturate(5778%) hue-rotate(900deg) brightness(100%) contrast(100%);
}
/* قائمة اقتراحات جوجل (pac-container) — تتبع الثيم الفاتح/الداكن عبر المتغيرات */
.pac-container {
  z-index: 9999999;
  font-family: 'Alexandria', sans-serif !important;
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 8px !important;
  padding: 12px !important;
  /* توسيط القائمة أفقياً — متساوية من اليمين واليسار */
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  width: min(calc(100vw - 32px), 448px) !important;
  box-shadow: var(--shadow-pop) !important;
}
.pac-container, .pac-item-query { color: var(--text-main) !important; }
.pac-item {
  border-top: 1px solid var(--line-soft) !important;
  color: var(--accent) !important;
  cursor: pointer;
  padding: 6px 8px;
  font-family: inherit !important;
}
.pac-item:first-child { border-top: none !important; }
.pac-item:hover, .pac-item-selected {
  background: var(--bg-soft-hover) !important;
  border-radius: 5px !important;
}
.pac-icon {
  filter: brightness(0) saturate(100%) invert(58%) sepia(77%) saturate(5778%) hue-rotate(900deg) brightness(100%) contrast(100%);
}
.pac-container:after { display: none !important; }

/* ============================================================
   الدروب زون — مطابق للموقع الحي:
   خلفية زرقاء #3b82f6 + حد أبيض متقطع + حلقة #008BFF + نص أبيض
   ============================================================ */
.dropzone {
  border: 2px dashed var(--dz-border);
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--dz-ring);
  background: var(--dz-bg);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.dropzone:hover, .dropzone.dragover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px var(--dz-ring), 0 8px 20px rgba(0, 0, 0, 0.2);
  filter: brightness(1.06);
}
.dropzone.dz-full { grid-column: 1 / -1; }
.dropzone .dz-icon img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 12px;
  padding: 2px;
}
.dropzone .dz-icon i { font-size: 42px; color: #fff !important; }
.dropzone .dz-title { font-size: 12px; font-weight: 700; color: var(--dz-text); }
.dropzone .dz-hint { font-size: 10px; color: var(--dz-text); opacity: .75; }
.dropzone input[type="file"] { display: none; }
.dropzone .dz-status { font-size: 11px; font-weight: 700; display: none; color: #fff; }
.dropzone.uploading .dz-status { display: block; }
.dropzone.uploaded {
  border-style: solid;
  border-color: var(--success);
  box-shadow: 0 0 0 2px var(--success);
  background: var(--success);
}
.dropzone.uploaded .dz-status { display: block; }
.dropzone.dz-error { border-color: #ffd0d0; box-shadow: 0 0 0 2px var(--danger); background: var(--danger); }
.dropzone.dz-error .dz-status { display: block; }
.dropzone .dz-remove {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--danger);
  font-size: 11px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.dropzone.uploaded .dz-remove { display: flex; }

/* ============================================================
   رسائل pop (نجاح/خطأ) — بأسلوب dig_popmessage من الموقع الحي
   ============================================================ */
.pop-message {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 99999;
  min-width: 260px;
  max-width: 92vw;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-pop);
  transition: transform .35s cubic-bezier(.2, 1.2, .4, 1), opacity .3s;
  opacity: 0;
  direction: rtl;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pop-message.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.pop-message.success { background: linear-gradient(90deg, #0c8a52, #00db82); }
.pop-message.error { background: linear-gradient(90deg, #c22222, #ff5252); }
.pop-message i { margin-left: 8px; }

/* ============================================================
   شاشة الملف الشخصي
   ============================================================ */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 24px 18px;
  margin-top: 10px;
  /* round27: أزيل blur من كارت البروفايل الكبير */
}
.profile-head {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  display: block;
  margin: 0 auto 10px auto;
  box-shadow: 0 4px 14px rgba(0, 80, 255, 0.2);
}
.profile-name { font-size: 19px; font-weight: 800; color: var(--text-main); margin: 4px 0; }
.profile-username { font-size: 13px; color: var(--text-sub); direction: ltr; }
.profile-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--bg-soft);
  color: var(--accent-deep);
  border: 1px solid var(--line);
}
.profile-badge.provider { background: #f5ecff; color: #7A00FF; border-color: #e8d8ff; }
.profile-badge.admin { background: #fff3e0; color: #e07b00; border-color: #ffe2b8; }
:root[data-theme="dark"] .profile-badge.provider { background: #2c1f42; color: #cfa4ff; border-color: #45306b; }
:root[data-theme="dark"] .profile-badge.admin { background: #382a12; color: #ffb454; border-color: #5c4520; }

.profile-rows { margin-bottom: 16px; }
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 4px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.profile-row .pr-label { color: var(--text-sub); font-size: 13px; flex-shrink: 0; }
.profile-row .pr-label i { color: var(--accent); margin-left: 6px; width: 18px; text-align: center; }
.profile-row .pr-value { color: var(--text-main); font-weight: 600; text-align: left; word-break: break-word; }
.profile-row .pr-value.ltr { direction: ltr; }
.profile-row .pr-value .verified { color: var(--success); font-size: 12px; margin-right: 5px; }
.profile-row .pr-value .not-verified { color: var(--warn); font-size: 12px; margin-right: 5px; }

.profile-actions { display: flex; flex-direction: column; gap: 10px; }

/* --- بطاقة المصادقة الثنائية (2FA) --- */
.pf-twofa-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--bg-soft);
  margin: 14px 0;
}
.pf-twofa-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pf-twofa-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0, 139, 255, .12);
  color: var(--accent);
  font-size: 17px;
}
.pf-twofa-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-twofa-text strong { font-size: 13.5px; color: var(--heading); }
.pf-twofa-text small { font-size: 11.5px; color: var(--text-sub); line-height: 1.5; }
.pf-twofa-toggle {
  flex-shrink: 0;
  position: relative;
  width: 46px;
  height: 26px;
  border: none;
  border-radius: 26px;
  background: var(--bg-soft-hover, #cbd5e1);
  cursor: pointer;
  transition: background .25s ease;
  padding: 0;
}
.pf-twofa-knob {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .25s ease;
}
.pf-twofa-toggle.on { background: var(--accent); }
.pf-twofa-toggle.on .pf-twofa-knob { transform: translateX(-20px); }
:root[data-theme="dark"] .pf-twofa-toggle { background: #3a4956; }
:root[data-theme="dark"] .pf-twofa-toggle.on { background: var(--accent); }
.twofa-modal-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 0 0 14px;
}
.profile-actions .form-button { margin-top: 0; }
.form-button.danger { background-color: var(--danger-bg); background-image: none; color: var(--danger); box-shadow: none; }
.form-button.danger:hover {
  background-color: var(--danger);
  background-image: none;
  color: #fff;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   شاشات (خطوات)
   ============================================================ */
.screen { display: none; }
.screen.active { display: block; animation: screenIn .38s cubic-bezier(.3, .9, .35, 1); }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  margin-bottom: 10px;
  border: none;
  background: none;
  font-weight: 600;
  transition: color .2s;
}
.back-link:hover { color: var(--accent-deep); }

/* ============================================================
   reCAPTCHA + فوتر
   ============================================================ */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note {
  font-size: 10px;
  color: var(--text-faint);
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
}
.recaptcha-note a { color: var(--text-faint); }

/* توازن رأسي للمحتوى (الفوتر الثابت أُزيل — تبقى حشوة سفلية خفيفة للتنفّس) */
main.app-container { padding-bottom: 24px; padding-top: 36px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 420px) {
  .otp-inputs input { width: 42px; height: 50px; font-size: 20px; }
  .form-card, .profile-card { padding: 18px 12px 22px 12px; }
  .auth-tab { font-size: 13px; }
  .brand-title { font-size: 1.2rem; }
  .theme-toggle { width: 44px; height: 44px; font-size: 20px; }
  .lang-toggle { width: 44px; height: 44px; font-size: 14px; }
}
@media (max-width: 340px) {
  .otp-inputs { gap: 5px; }
  .otp-inputs input { width: 38px; height: 46px; font-size: 18px; }
}

/* ============================================================
   متغيرات مكتبة iti-phone (حقل الهاتف) — ربطها بنظام الثيم
   ============================================================ */
:root {
  --accent-blue:        #008BFF;
  --bg-dark-secondary:  #ffffff;
  --bg-hover-dark:      #f0f6ff;
  --bg-input-dark:      #FFF7F7;
  --black-overlay:      rgba(0, 20, 60, 0.5);
  --blue-transparent:   rgba(0, 139, 255, 0.12);
  --border-dark:        #eef2fa;
  --border-light:       #dbe6ff;
  --danger-red:         #e02b2b;
  --gray-placeholder:   #8fa3c8;
  --gray-upload:        #eef4ff;
  --scrollbar-thumb:    #dbe6ff;
  --success-green:      #00b56a;
  --text-primary-light: #002060;
  --text-secondary-gray:#5b6b8c;
  --white:              #ffffff;
}
:root[data-theme="dark"] {
  --accent-blue:        #5aa0d6;
  --bg-dark-secondary:  #1e1f25;
  --bg-hover-dark:      #24262e;
  --bg-input-dark:      #191b21;
  --black-overlay:      rgba(0, 0, 0, 0.65);
  --blue-transparent:   rgba(90, 160, 214, 0.15);
  --border-dark:        #2a2d36;
  --border-light:       #33384a;
  --danger-red:         #ff6b6b;
  --gray-placeholder:   #6d7fa3;
  --gray-upload:        #24262e;
  --scrollbar-thumb:    #33384a;
  --success-green:      #17d68a;
  --text-primary-light: #e8effc;
  --text-secondary-gray:#9fb0d0;
  --white:              #e8effc;
}

/* دمج حاوية iti مع تصميم الحقول — نفس إطار بقية الحقول حرفياً (6px + radius 7px) */
.iti-phone-container {
  border: 6px solid var(--input-border) !important;
  border-radius: 7px !important;
  background: var(--input-bg) !important;
  box-shadow: var(--input-glow);
  transition: border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
}
.iti-phone-container:focus-within {
  border-color: var(--input-border-focus) !important;
  background: var(--input-bg-focus) !important;
  box-shadow: 0 0 0 4px var(--ring), var(--input-glow);
}
.iti-phone-input { color: var(--input-text) !important; font-weight: 600; }
.iti-country-selector-code { color: var(--input-text) !important; }

/* ============================================================
   المودالات العامة (modall-overlay)
   ============================================================ */
.modall-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--black-overlay, rgba(0, 20, 60, 0.55));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modall-overlay.active { display: flex; animation: fadeIn .22s ease; }
.modall-content {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow-panel);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalUp .25s ease;
}
@keyframes modalUp {
  from { transform: translateY(24px) scale(.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.modall-doc { max-width: 620px; }
.modall-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft, rgba(0, 139, 255, .15));
  flex-shrink: 0;
}
.modall-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--heading);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modall-close {
  background: var(--bg-soft);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  flex-shrink: 0;
}
.modall-close:hover { background: #e02424; color: #fff; transform: rotate(90deg); }
.modall-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.modall-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 18px;
  border-top: 1px solid var(--border-soft, rgba(0, 139, 255, .15));
  flex-shrink: 0;
}
.modall-footer .form-button { width: auto; min-width: 110px; margin: 0; padding: 10px 20px; font-size: 14px; }

/* نصوص وثائق السياسة/الشروط */
.doc-body { line-height: 1.9; color: var(--text-main, #333); font-size: 14px; }
.doc-body .doc-sub { font-weight: 700; color: var(--heading); font-size: 15px; margin: 0 0 2px 0; }
.doc-body .doc-updated { color: var(--text-faint); font-size: 12px; margin: 0 0 14px 0; }
.doc-body h3 {
  color: var(--accent);
  font-size: 15.5px;
  font-weight: 800;
  margin: 18px 0 6px 0;
  padding-right: 10px;
  border-right: 4px solid var(--accent);
}
.doc-body p { margin: 6px 0; }
.doc-body ul { margin: 6px 0; padding-right: 20px; }
.doc-body li { margin: 4px 0; }
.doc-body .doc-contact { list-style: none; padding-right: 4px; }
.doc-body .doc-contact li { font-weight: 600; }

/* زر رابط داخل النص (يفتح المودال) */
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: var(--accent-deep); }

/* ============================================================
   الصورة الشخصية أعلى النموذج (crop-widget)
   ============================================================ */
.avatar-crop-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.crop-widget {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.crop-widget .avatar-preview {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: var(--input-glow, 0 0 9px 8px rgba(252, 252, 255, .5));
  transition: border-color .3s ease, transform .3s ease;
  display: block;
  background: #fff;
}
.crop-widget:hover .avatar-preview { border-color: var(--accent-deep); transform: scale(1.03); }
.crop-widget .upload-btn {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: var(--accent);
  color: #fff;
  border: 2px solid #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0, 139, 255, .4);
  transition: all .2s ease;
}
.crop-widget .upload-btn:hover { background: var(--accent-deep); transform: scale(1.12); }
.avatar-crop-label { font-weight: 700; color: var(--heading); font-size: 14px; }
.avatar-crop-hint { font-weight: 400; color: var(--text-faint); font-size: 12px; }
#avatar-status { font-size: 12px; color: var(--accent); min-height: 16px; }

/* ============================================================
   محرر الاقتصاص (داخل المودال)
   ============================================================ */
.crop-modall-content { display: flex; flex-direction: column; gap: 16px; }
.editor-container {
  position: relative;
  width: 100%;
  height: 340px;
  background-color: #1e293b;
  border-radius: 12px;
  overflow: hidden;
  cursor: grab;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
}
.editor-container:active { cursor: grabbing; }
.cropCanvas { display: block; width: 100%; height: 100%; }
.overlay-square {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  border: 2px solid rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .7);
  pointer-events: none;
  border-radius: 0;
  transition: width .2s ease, height .2s ease;
  overflow: hidden; /* لضمان بقاء خطوط الشبكة داخل الإطار */
}
/* خطوط الشبكة (أثلاث) — التنسيق المشترك للخطوط الطولية والعرضية */
.overlay-square::before,
.overlay-square::after {
  content: "";
  position: absolute;
  background-color: rgba(255, 255, 255, 0.3);
}
/* الخطوط الطولية (الرأسية) — الثاني عبر الظل */
.overlay-square::before {
  top: 0;
  bottom: 0;
  left: 33.33%;
  width: 1px;
  box-shadow: 83.33px 0 0 0 rgba(255, 255, 255, 0.3);
}
/* الخطوط العرضية (الأفقية) — الثاني عبر الظل */
.overlay-square::after {
  left: 0;
  right: 0;
  top: 33.33%;
  height: 1px;
  box-shadow: 0 83.33px 0 0 rgba(255, 255, 255, 0.3);
}
/* وضع البطاقة الشخصية: نسبة ISO ID-1 تقريباً (85.6×54) */
.overlay-square.card-aspect { width: 300px; height: 190px; border-radius: 10px; }
/* إزاحات الظل تتبع مقاس البطاقة (300/3=100 أفقياً، 190/3≈63.33 رأسياً) */
.overlay-square.card-aspect::before { box-shadow: 100px 0 0 0 rgba(255, 255, 255, 0.3); }
.overlay-square.card-aspect::after { box-shadow: 0 63.33px 0 0 rgba(255, 255, 255, 0.3); }
.controls-wrapper { display: flex; flex-direction: column; gap: 12px; }
.slider-container {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-soft);
  padding: 12px 16px;
  border-radius: 10px;
  /* اتجاه ثابت LTR: التصغير يسار والتكبير يمين — يمنع انعكاس السلايدر في RTL */
  direction: ltr;
}
.slider-container i { color: var(--text-sub); }
.zoomSlider {
  flex-grow: 1;
  height: 6px;
  background: var(--bg-soft-hover, #cbd5e1);
  border-radius: 5px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  direction: ltr;
  /* إصلاح الجوال: بدونها يلتقط المتصفح اللمسة كتمرير للصفحة فيقفز المؤشر لآخر المدى */
  touch-action: none;
  /* منطقة لمس أكبر للإصبع */
  padding: 12px 0;
  background-clip: content-box;
  cursor: pointer;
}
.zoomSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(0, 139, 255, .2);
}
.zoomSlider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(0, 139, 255, .2);
}

/* ============================================================
   حقول الهوية الثلاثة في سطر واحد
   ============================================================ */
.ids-dropzones-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.ids-dropzones-wrapper .id-dropzone {
  min-height: 112px;
  padding: 8px 6px;
}
.ids-dropzones-wrapper .id-dropzone .dz-icon img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.ids-dropzones-wrapper .id-dropzone .dz-title { font-size: 11.5px; line-height: 1.4; }
.ids-dropzones-wrapper .id-dropzone .dz-status { font-size: 10.5px; }
@media (max-width: 420px) {
  .ids-dropzones-wrapper { gap: 6px; }
  .ids-dropzones-wrapper .id-dropzone { min-height: 116px; padding: 8px 4px; }
  .ids-dropzones-wrapper .id-dropzone .dz-icon img { width: 44px; height: 44px; }
  .ids-dropzones-wrapper .id-dropzone .dz-title { font-size: 10.5px; }
}

/* ============================================================
   مودال الكاميرا
   ============================================================ */
.camera-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
#camera-video {
  display: block;
  width: 100%;
  max-height: 55vh;
  object-fit: cover;
  transform: scaleX(-1); /* مرآة للسيلفي */
}
.camera-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ============================================================
   قسم اتفاقية مزود الخدمة
   ============================================================ */
.agreement-section {
  margin-top: 14px;
  padding: 16px 14px;
  border: 2px dashed var(--accent);
  border-radius: 12px;
  background: var(--bg-soft);
  animation: fadeIn .3s ease;
}
.agreement-label { display: block; text-align: center; margin-bottom: 12px; }
.agreement-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 12px;
}
.agreement-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 9px;
  padding: 9px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s ease;
}
.agreement-btn:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.agreement-dropzone { margin-bottom: 10px; }
.agreement-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-card);
  border-radius: 9px;
  padding: 10px 12px;
}
.agreement-note p { margin: 0; font-size: 12.5px; color: var(--text-sub); line-height: 1.7; }
.agreement-note p i { color: #e0a800; margin-left: 4px; }
.agreement-note-icons { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn {
  background: var(--bg-soft);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  transition: all .2s ease;
}
.icon-btn:hover { background: var(--accent); color: #fff; }

/* وثيقة الاتفاقية داخل المودال */
.agreement-doc {
  background: #fff;
  color: #222;
  border-radius: 8px;
  padding: 22px 20px;
  font-size: 13.5px;
  line-height: 2;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}
.agreement-doc h2 {
  text-align: center;
  color: #014088;
  font-size: 18px;
  margin: 0 0 4px 0;
}
.agreement-doc table.agr-info {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 14px 0;
}
.agreement-doc table.agr-info td {
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
  font-size: 12.5px;
}
.agreement-doc table.agr-info td:first-child {
  background: #f1f6fc;
  font-weight: 700;
  color: #014088;
  width: 36%;
  white-space: nowrap;
}
.agreement-doc h4 { color: #014088; font-size: 14px; margin: 14px 0 4px 0; }
.agreement-doc ol { padding-right: 20px; margin: 6px 0; }
.agreement-doc ol li { margin: 4px 0; }
.agreement-doc .agr-sign-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
}
.agreement-doc .agr-sign-box {
  flex: 1;
  text-align: center;
  border-top: 2px solid #014088;
  padding-top: 8px;
  font-weight: 700;
  font-size: 12.5px;
  color: #014088;
}
.agreement-doc .agr-sign-box small { display: block; font-weight: 400; color: #888; margin-top: 22px; }

/* ============================================================
   لوحة التحقق الذكي من الهوية (AI Verify Panel)
   ============================================================ */
.ai-verify-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ai-verify-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text);
}
.ai-verify-icon { color: var(--accent); width: 18px; text-align: center; flex-shrink: 0; }
.ai-verify-label { flex: 1; }
.ai-verify-state { font-size: 12px; font-weight: 700; white-space: nowrap; }
.ai-verify-state[data-state="idle"]::before    { content: "—"; color: var(--text-faint); }
.ai-verify-state[data-state="loading"]::before { content: "جاري الفحص..."; color: var(--accent); }
.ai-verify-state[data-state="ok"]::before      { content: "✓ ناجح"; color: #0a8a4c; }
.ai-verify-state[data-state="fail"]::before    { content: "✗ فشل"; color: #d33; }
.ai-verify-state[data-state="loading"] { animation: aiPulse 1.1s ease infinite; }
@keyframes aiPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.ai-verify-note {
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.7;
  border-top: 1px dashed var(--input-border);
  padding-top: 8px;
  display: none;
}
.ai-verify-note.show { display: block; }
.ai-verify-note.err { color: #d33; }
.ai-verify-note.ok { color: #0a8a4c; }

/* ============================================================
   دفعة الملف الشخصي العميق + لوحة الأدمن
   ============================================================ */

/* --- رأس الملف: صورة قابلة للتغيير + علامة توثيق --- */
.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.avatar-edit-badge {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid var(--card-bg, #fff);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.profile-name-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.verify-mark { color: #1d9bf0; font-size: 17px; }
.verify-mark-sm { color: #1d9bf0; font-size: 13px; }
.profile-badges-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid transparent;
}
.verify-badge.ok   { background: #e7f7ee; color: #0a8a4c; border-color: #bfe8d0; }
.verify-badge.wait { background: #fff7e6; color: #b07500; border-color: #ffe2b0; }
.verify-badge.bad  { background: #fdecec; color: #c92a2a; border-color: #f5c2c2; }
:root[data-theme="dark"] .verify-badge.ok   { background: #12301f; color: #4cd894; border-color: #1e4a30; }
:root[data-theme="dark"] .verify-badge.wait { background: #332a12; color: #ffc954; border-color: #574618; }
:root[data-theme="dark"] .verify-badge.bad  { background: #391c1c; color: #ff8a8a; border-color: #5c2727; }
.verify-inline { font-weight: 700; }
.verify-inline.ok { color: #0a8a4c; }
.verify-inline.wait { color: #b07500; }
.verify-inline.bad { color: #c92a2a; }
.vdate { color: var(--text-faint); font-weight: 400; }

/* --- تبويبات الملف --- */
.profile-tabs {
  display: flex;
  gap: 4px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 4px;
  margin: 14px 0 16px 0;
}
.profile-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 9px;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.profile-tab i { margin-left: 4px; }
.profile-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,139,255,.3);
}
.profile-pane { display: none; }
.profile-pane.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* --- خريطة الملف الشخصي --- */
.profile-map-block { margin: 14px 0; }
.profile-map-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}
.profile-map-title i { color: var(--accent); margin-left: 6px; }
/* الخرائط الداخلية (بياناتي + التعديل) — نفس تنسيق خريطة التسجيل بالموقع الحي */
#profile-map, #pf-map {
  height: 220px;
  border: 6px solid #3B82F6;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  background: #e5e3df;
  margin-top: 10px;
  overflow: hidden;
}
:root[data-theme="dark"] #profile-map,
:root[data-theme="dark"] #pf-map,
:root[data-theme="dark"] #profile-map .gm-style,
:root[data-theme="dark"] #pf-map .gm-style,
:root[data-theme="dark"] #profile-map .gm-style > div:first-child,
:root[data-theme="dark"] #pf-map .gm-style > div:first-child {
  background: #242f3e !important;
}
/* إخفاء عناصر جوجل الزائدة داخل الخرائط الداخلية (مطابق لخريطة التسجيل) */
#profile-map a, #pf-map a,
#profile-map .gm-style-cc, #pf-map .gm-style-cc,
#profile-map .gmnoscreen, #pf-map .gmnoscreen,
#profile-map img[alt="Google"], #pf-map img[alt="Google"],
#profile-map .gm-style-mtc-bbw, #pf-map .gm-style-mtc-bbw,
#profile-map .gm-style-iw-chr, #pf-map .gm-style-iw-chr { display: none !important; }
#profile-map .gm-fullscreen-control, #pf-map .gm-fullscreen-control,
#profile-map .gmnoprint .gm-control-active, #pf-map .gmnoprint .gm-control-active {
  background: transparent !important;
  border: 1px solid var(--accent) !important;
  border-radius: 20px !important;
  width: 32px !important;
  height: 32px !important;
  margin: 5.5px !important;
}
#profile-map .gm-fullscreen-control img, #pf-map .gm-fullscreen-control img,
#profile-map .gmnoprint .gm-control-active img, #pf-map .gmnoprint .gm-control-active img {
  filter: brightness(0) saturate(100%) invert(58%) sepia(77%) saturate(5778%) hue-rotate(900deg) brightness(100%) contrast(100%);
}
/* وميض إبراز الحقل الناقص عند النقر من مؤشر الاكتمال */
.pf-field-flash {
  animation: pfFieldFlash 1.2s ease 2;
}
@keyframes pfFieldFlash {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 3px rgba(59, 130, 246, .45); border-color: var(--accent); }
}

/* --- تلميح تعديل الاسم --- */
.pf-hint {
  font-size: 11px;
  color: #b07500;
  margin-top: 6px;
}
.pf-hint i { margin-left: 4px; }

/* --- تبويب التوثيق --- */
.vs-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.vs-card > i { font-size: 30px; flex-shrink: 0; }
.vs-card.ok   { background: #e7f7ee; border-color: #bfe8d0; }
.vs-card.ok > i { color: #0a8a4c; }
.vs-card.wait { background: #fff7e6; border-color: #ffe2b0; }
.vs-card.wait > i { color: #b07500; }
.vs-card.bad  { background: #fdecec; border-color: #f5c2c2; }
.vs-card.bad > i { color: #c92a2a; }
:root[data-theme="dark"] .vs-card.ok   { background: #12301f; border-color: #1e4a30; }
:root[data-theme="dark"] .vs-card.wait { background: #332a12; border-color: #574618; }
:root[data-theme="dark"] .vs-card.bad  { background: #391c1c; border-color: #5c2727; }
.vs-title { font-size: 14.5px; font-weight: 800; color: var(--text-main); }
.vs-sub { font-size: 12px; color: var(--text-sub); margin-top: 3px; line-height: 1.6; }
.verify-intro { font-size: 12.5px; color: var(--text-sub); line-height: 1.7; margin-bottom: 12px; }

/* --- شبكة الوثائق --- */
.profile-docs { margin-top: 16px; }
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}
.doc-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 8px;
  background: var(--input-bg);
  transition: border-color .15s;
}
.doc-item:hover { border-color: var(--accent); }
.doc-item img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}
.doc-item > i { font-size: 34px; color: #d33; height: 60px; display: flex; align-items: center; }
.doc-item span { font-size: 10.5px; color: var(--text-sub); text-align: center; }

/* --- لوحة الأدمن: إحصائيات --- */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.stat-card {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
}
.stat-card i { font-size: 15px; color: var(--accent); }
.stat-card.green i { color: #0a8a4c; }
.stat-card.orange i { color: #b07500; }
.stat-card.red i { color: #c92a2a; }
.stat-card.purple i { color: #7A00FF; }
.stat-num { font-size: 17px; font-weight: 800; color: var(--text-main); margin-top: 3px; }
.stat-label { font-size: 10px; color: var(--text-sub); margin-top: 2px; }

/* --- لوحة الأدمن: بحث وفلترة --- */
.admin-filters { margin-bottom: 12px; }
.admin-search-wrap { position: relative; margin-bottom: 8px; }
.admin-search-wrap i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 13px;
}
.admin-search-wrap .app-input { padding-right: 34px; }
.admin-filter-row { display: flex; gap: 6px; }
.admin-select {
  flex: 1;
  font-size: 11.5px !important;
  padding: 8px 6px !important;
  cursor: pointer;
}

/* --- لوحة الأدمن: بطاقات المستخدمين --- */
.adm-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.adm-user-card:hover { border-color: var(--accent); }
.adm-user-card:active { transform: scale(.99); }
.adm-user-card.blocked { opacity: .65; }
.adm-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--input-border);
}
.adm-avatar.big { width: 58px; height: 58px; }
.adm-user-info { flex: 1; min-width: 0; }
.adm-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-user-sub {
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-user-sub.ltr, .act-line .ltr { direction: ltr; text-align: right; }
.adm-user-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.adm-user-tags .profile-badge, .adm-user-tags .verify-badge { font-size: 10px; padding: 2px 8px; }
.adm-arrow { color: var(--text-faint); font-size: 11px; }
.adm-blocked-tag {
  font-size: 10px;
  color: #c92a2a;
  font-weight: 700;
}
.adm-loading, .adm-empty {
  text-align: center;
  padding: 26px 0;
  color: var(--text-sub);
  font-size: 13px;
}
.adm-empty i { display: block; font-size: 26px; margin-bottom: 8px; color: var(--text-faint); }
.adm-empty.error { color: #c92a2a; }
.spinner.dark { border-color: var(--accent); border-top-color: transparent; }

/* --- ترقيم الصفحات --- */
.admin-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.pager-btn {
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.pager-btn:disabled { opacity: .4; cursor: default; }
.pager-info { font-size: 11.5px; color: var(--text-sub); }

/* --- مودال إدارة المستخدم --- */
.admin-user-modal { max-width: 520px; }
.aum-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.aum-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}
.aum-btn {
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 6px;
  border-radius: 9px;
  cursor: pointer;
  color: #fff;
  transition: opacity .15s;
}
.aum-btn:hover { opacity: .88; }
.aum-btn.green  { background: #0a8a4c; }
.aum-btn.orange { background: #d98200; }
.aum-btn.blue   { background: var(--accent); }
.aum-btn.red    { background: #c92a2a; }
.aum-edit-toggle { margin: 10px 0; text-align: center; }

/* --- تقرير AI وسجل النشاط بالمودال --- */
.ai-report-box, .activity-box {
  margin-top: 14px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--input-bg);
}
.ai-rep-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px 0;
  color: var(--text-main);
}
.ai-rep-line.ok i { color: #0a8a4c; }
.ai-rep-line.bad i { color: #c92a2a; }
.ai-rep-line.na i { color: var(--text-faint); }
.act-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--input-border);
  color: var(--text-main);
}
.act-line:last-child { border-bottom: none; }
.act-line small { color: var(--text-faint); font-size: 10px; }

/* --- موبايل --- */
@media (max-width: 420px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-tab { font-size: 11px; }
  .profile-tab i { display: block; margin: 0 auto 3px auto; }
}

/* ============================================================
   وضع "بعد تسجيل الدخول": إخفاء الشعار/التسمية/الشريط المتحرك
   وتوسيع الحاويات لاستغلال الشاشة
   ============================================================ */
body.is-logged .brand-link { display: none !important; }
body.is-logged .app-header { padding: 10px 14px 0 14px; min-height: 0; }
body.is-logged .theme-toggle { position: static; margin-inline-start: auto; }

/* توسيع الحاوية بعد الدخول */
body.is-logged .app-container {
  max-width: 860px;
  padding: 0 16px;
}
body.is-logged .form-card {
  padding: 28px 26px 34px 26px;
}

/* الخرائط أعرض وأعلى قليلاً على الشاشات الواسعة */
@media (min-width: 720px) {
  body.is-logged #profile-map,
  body.is-logged #pf-map { height: 300px; }
  body.is-logged .admin-stats { grid-template-columns: repeat(4, 1fr); }
  body.is-logged .admin-user-modal { max-width: 640px; }
  /* صفوف البيانات: عمودان على الشاشات الواسعة */
  body.is-logged .profile-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 26px;
  }
  body.is-logged .profile-rows > .profile-row.full,
  body.is-logged .profile-rows > .profile-map-block { grid-column: 1 / -1; }
}

/* ============================================================
   الدفعة الثامنة: عين كلمة المرور + مقياس القوة + مودال تغيير
   كلمة المرور + مؤشر اكتمال الملف + بانر التوثيق + آخر دخول
   + سجل نشاطي
   ============================================================ */

/* ---------- 8.1 عين إظهار/إخفاء كلمة المرور ---------- */
.pw-wrap {
  position: relative;
  display: block;
}
.pw-wrap .app-input {
  padding-left: 44px; /* مساحة لزر العين (RTL: الزر على اليسار) */
}
.pw-eye {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 15px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, background .2s;
  padding: 0;
}
.pw-eye:hover {
  color: var(--accent);
  background: var(--bg-soft);
}
:root[data-theme="dark"] .pw-eye:hover { background: rgba(59, 130, 246, .15); }

/* ---------- 8.2 مقياس قوة كلمة المرور ---------- */
.pw-meter {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pw-meter-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
  direction: ltr;
}
:root[data-theme="dark"] .pw-meter-bar { background: #262a38; }
.pw-meter-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width .35s ease, background .35s ease;
}
.pw-meter-bar span.l0 { width: 8%;   background: #e14b4b; }
.pw-meter-bar span.l1 { width: 30%;  background: #f07830; }
.pw-meter-bar span.l2 { width: 55%;  background: #f0b429; }
.pw-meter-bar span.l3 { width: 80%;  background: #7ac142; }
.pw-meter-bar span.l4 { width: 100%; background: #1fa860; }
.pw-meter-label {
  font-size: 11px;
  font-weight: 700;
  min-width: 62px;
  text-align: left;
  color: var(--text-faint);
  white-space: nowrap;
}
.pw-meter-label.l0 { color: #e14b4b; }
.pw-meter-label.l1 { color: #f07830; }
.pw-meter-label.l2 { color: #d99e10; }
.pw-meter-label.l3 { color: #5da32c; }
.pw-meter-label.l4 { color: #1fa860; }

/* ---------- 8.3 مودال تغيير كلمة المرور ---------- */
.pw-change-modal { max-width: 420px; }
.pw-change-modal .pw-wrap { margin-bottom: 12px; }
.pw-change-modal .pw-meter { margin-bottom: 12px; margin-top: -4px; }
.pwc-match-hint {
  font-size: 12px;
  font-weight: 700;
  margin: -4px 0 12px;
  display: none;
}
.pwc-match-hint.ok  { display: block; color: #1fa860; }
.pwc-match-hint.bad { display: block; color: #e14b4b; }

/* ---------- 8.4 بطاقة اكتمال الملف الشخصي ---------- */
.pf-complete-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-light, #dbe6ff);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
:root[data-theme="dark"] .pf-complete-card {
  background: #1d2130;
  border-color: var(--border-light, #33384a);
}
.pf-complete-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.pf-complete-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}
.pf-complete-title i { color: var(--accent); margin-left: 6px; }
.pf-complete-pct {
  font-size: 14px;
  font-weight: 900;
  color: var(--accent);
  direction: ltr;
}
.pf-complete-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 139, 255, .12);
  overflow: hidden;
  direction: ltr;
}
:root[data-theme="dark"] .pf-complete-bar { background: #262a38; }
#pf-complete-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width .5s ease, background .5s ease;
  background: var(--accent);
}
#pf-complete-fill.low { background: #f07830; }
#pf-complete-fill.mid { background: #f0b429; }
#pf-complete-fill.ok  { background: #1fa860; }
.pf-complete-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.pf-miss-chip {
  border: 1px dashed var(--border-light, #dbe6ff);
  background: var(--bg-panel, #fff);
  color: var(--text-sub);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pf-miss-chip i { font-size: 10px; color: var(--accent); }
.pf-miss-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-soft);
  transform: translateY(-1px);
}
:root[data-theme="dark"] .pf-miss-chip { background: #232838; }
:root[data-theme="dark"] .pf-miss-chip:hover { background: #1d2c45; }
.pf-miss-done {
  font-size: 12.5px;
  font-weight: 800;
  color: #1fa860;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- 8.5 بانر التوثيق ---------- */
.pf-verify-banner {
  /* مخفي مبدئياً عبر style="display:none" في HTML — يُظهره JS لغير الموثقين */
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(0, 139, 255, .08), rgba(142, 41, 148, .07));
  border: 1px solid rgba(0, 139, 255, .25);
  border-radius: 14px;
  padding: 12px 15px;
  margin-bottom: 14px;
}
.pf-verify-banner > i {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
}
.pf-verify-banner-text { flex: 1; min-width: 0; }
.pf-verify-banner-text strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 2px;
}
.pf-verify-banner-text small {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.5;
}
.pf-verify-banner-btn {
  flex-shrink: 0;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.pf-verify-banner-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 139, 255, .35);
}
:root[data-theme="dark"] .pf-verify-banner {
  background: linear-gradient(135deg, rgba(0, 139, 255, .12), rgba(142, 41, 148, .1));
  border-color: rgba(59, 130, 246, .3);
}

/* ---------- 8.6 آخر دخول ---------- */
.pf-last-login {
  /* مخفي مبدئياً عبر style="display:none" في HTML — يُظهره JS عند توفر البيانات */
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-faint);
  margin: 4px 0 10px;
}
.pf-last-login i { color: var(--accent); font-size: 11px; }
.pf-last-login .ltr { direction: ltr; }

/* ---------- 8.7 سجل نشاطي (قابل للطي) ---------- */
.pf-my-activity {
  border: 1px solid var(--border-light, #dbe6ff);
  border-radius: 14px;
  margin: 4px 0 14px;
  overflow: hidden;
  background: var(--bg-panel, #fff);
}
:root[data-theme="dark"] .pf-my-activity {
  background: #1d2130;
  border-color: var(--border-light, #33384a);
}
.pf-activity-toggle {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  padding: 12px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: background .2s;
  text-align: right;
}
.pf-activity-toggle:hover { background: var(--bg-soft); }
:root[data-theme="dark"] .pf-activity-toggle:hover { background: #232838; }
.pf-activity-toggle > i:first-child { color: var(--accent); }
.pf-act-chev {
  margin-right: auto;
  font-size: 11px;
  color: var(--text-faint);
  transition: transform .25s;
}
.pf-activity-list {
  /* الفتح/الإغلاق عبر style.display من JS */
  border-top: 1px solid var(--border-light, #dbe6ff);
  padding: 4px 15px 10px;
  max-height: 260px;
  overflow-y: auto;
}
:root[data-theme="dark"] .pf-activity-list { border-top-color: var(--border-light, #33384a); }
.pf-act-loading,
.pf-act-empty {
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  padding: 14px 0;
}
.pf-act-loading i { margin-left: 6px; }

/* ---------- 8.8 موبايل ---------- */
@media (max-width: 480px) {
  .pf-verify-banner { flex-wrap: wrap; }
  .pf-verify-banner-btn { width: 100%; }
  .pf-complete-head { flex-wrap: wrap; gap: 4px; }
  .pw-meter-label { min-width: 54px; font-size: 10px; }
}

/* ============================================================
   الدفعة التاسعة: الأجهزة المتصلة + تحذير CapsLock
   ============================================================ */

/* ---------- 9.1 الأجهزة المتصلة ---------- */
.dev-line {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border-light, #dbe6ff);
}
.dev-line:last-of-type { border-bottom: none; }
:root[data-theme="dark"] .dev-line { border-bottom-color: var(--border-light, #33384a); }
.dev-line.current { background: rgba(0, 139, 255, .05); border-radius: 10px; padding-right: 8px; }
.dev-icon {
  font-size: 19px;
  color: var(--accent);
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}
.dev-info { flex: 1; min-width: 0; }
.dev-info strong {
  display: block;
  font-size: 12.5px;
  color: var(--text-main);
}
.dev-info small {
  display: block;
  font-size: 10.5px;
  color: var(--text-faint);
  direction: ltr;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dev-current-badge {
  display: inline-block;
  background: #e6f7ee;
  color: #1fa860;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 999px;
  margin-right: 5px;
  vertical-align: middle;
}
:root[data-theme="dark"] .dev-current-badge { background: #12301f; color: #4cd894; }
.dev-revoke-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(225, 75, 75, .35);
  background: transparent;
  color: #e14b4b;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all .2s;
}
.dev-revoke-btn:hover { background: #e14b4b; color: #fff; }
.dev-revoke-btn:disabled { opacity: .5; cursor: wait; }
.dev-logout-all {
  width: 100%;
  margin: 10px 0 4px;
  font-size: 12.5px !important;
  padding: 10px !important;
}

/* ---------- 9.2 تحذير CapsLock ---------- */
.caps-warn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #b8860b;
  background: #fff8e1;
  border: 1px solid #f0d47a;
  border-radius: 8px;
  padding: 5px 10px;
  margin-top: 6px;
  animation: capsFadeIn .2s ease;
}
:root[data-theme="dark"] .caps-warn {
  background: #332a12;
  border-color: #574618;
  color: #ffc954;
}
@keyframes capsFadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   الدفعة العاشرة: الإشعارات داخل التطبيق 🔔 + تصدير بياناتي
   ============================================================ */

/* الجرس بجانب زر الثيم */
.notif-wrap {
  position: absolute;
  top: 16px;
  left: 68px; /* بجانب زر الثيم (الثيم على left:16 وعرضه 42) */
  z-index: 60;
}
.notif-bell { position: relative; top: 0; left: 0; }
.notif-bell.has-unread i { animation: bellRing 2.2s ease-in-out infinite; transform-origin: top center; }
@keyframes bellRing {
  0%, 12%, 100% { transform: rotate(0); }
  2% { transform: rotate(14deg); }
  4% { transform: rotate(-12deg); }
  6% { transform: rotate(9deg); }
  8% { transform: rotate(-6deg); }
  10% { transform: rotate(3deg); }
}
.notif-badge {
  position: absolute;
  top: -5px;
  inset-inline-end: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
  pointer-events: none;
}

/* لوحة الإشعارات */
.notif-panel {
  position: absolute;
  top: 50px;
  left: 0;
  width: min(340px, calc(100vw - 32px));
  max-height: 420px;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0, 32, 96, .18);
  overflow: hidden;
  animation: notifPop .18s ease;
}
@keyframes notifPop {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-main);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
}
.notif-panel-head > span i { color: var(--accent); margin-inline-end: 5px; }
.notif-panel-tools { display: flex; gap: 6px; }
.notif-tool {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: var(--bg-panel);
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
  transition: all .18s ease;
}
.notif-tool:hover { color: var(--accent); border-color: var(--accent); }

.notif-list { overflow-y: auto; padding: 6px; }
.notif-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 11px;
  border-radius: 10px;
  cursor: default;
  transition: background .15s ease;
}
.notif-item:hover { background: var(--bg-soft); }
.notif-item.unread { background: var(--bg-soft); cursor: pointer; position: relative; }
.notif-item.unread::before {
  content: '';
  position: absolute;
  inset-inline-start: 3px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.notif-ic {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: var(--bg-soft-hover);
  color: var(--accent);
}
.notif-item.t-success .notif-ic  { color: #17a34a; background: rgba(23, 163, 74, .12); }
.notif-item.t-warning .notif-ic  { color: #d97706; background: rgba(217, 119, 6, .12); }
.notif-item.t-danger .notif-ic   { color: var(--danger); background: rgba(224, 43, 43, .10); }
.notif-item.t-security .notif-ic { color: #7c3aed; background: rgba(124, 58, 237, .12); }
.notif-body { flex: 1; min-width: 0; }
.notif-body strong { display: block; font-size: 13.5px; color: var(--text-main); margin-bottom: 2px; }
.notif-body p { margin: 0 0 3px 0; font-size: 12.5px; line-height: 1.55; color: var(--text-sub); }
.notif-body small { font-size: 11px; color: var(--text-faint); }
.notif-empty {
  padding: 34px 10px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 2;
}
.notif-empty i { font-size: 26px; opacity: .55; }

/* وضع "بعد الدخول": الجرس بجانب زر الثيم في الصف الأفقي */
body.is-logged .notif-wrap { position: static; margin-inline-start: 8px; }
body.is-logged .notif-panel { top: 52px; left: 12px; }
body.is-logged .app-header { flex-direction: row; align-items: center; }

/* الوضع الداكن */
:root[data-theme="dark"] .notif-panel { box-shadow: 0 12px 34px rgba(0, 0, 0, .55); }
:root[data-theme="dark"] .notif-item.t-success .notif-ic  { color: #4ade80; background: rgba(74, 222, 128, .12); }
:root[data-theme="dark"] .notif-item.t-warning .notif-ic  { color: #fbbf24; background: rgba(251, 191, 36, .12); }
:root[data-theme="dark"] .notif-item.t-security .notif-ic { color: #c4b5fd; background: rgba(196, 181, 253, .12); }

/* موبايل: اللوحة بعرض الشاشة تقريباً */
@media (max-width: 480px) {
  .notif-wrap { left: 62px; }
  .notif-panel { position: fixed; top: 64px; left: 16px; right: 16px; width: auto; }
}

/* ============================================================
   مفاتيح المرور (WebAuthn) — الدخول بالبصمة / نقش الشاشة
   ============================================================ */

/* زر البصمة بشاشات الدخول */
.passkey-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 13px 18px;
  border: 2px solid var(--accent, #008BFF);
  border-radius: 12px;
  background: transparent;
  color: var(--accent, #008BFF);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s, transform .12s;
}
.passkey-button i { font-size: 19px; }
.passkey-button:hover { background: var(--accent, #008BFF); color: #fff; }
.passkey-button:active { transform: scale(.97); }
:root[data-theme="dark"] .passkey-button {
  border-color: #3ea6ff;
  color: #3ea6ff;
}
:root[data-theme="dark"] .passkey-button:hover { background: #3ea6ff; color: #0e1621; }

/* بطاقة مفاتيح المرور ببياناتي — تعتمد تنسيق .pf-twofa-card وتضيف زر الإضافة */
.pf-passkey-card .pf-passkey-add {
  width: auto;
  margin: 0;
  padding: 9px 16px;
  font-size: 13.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pf-passkey-icon { color: #7c3aed; }
:root[data-theme="dark"] .pf-passkey-icon { color: #c4b5fd; }

/* قائمة الأجهزة المسجلة */
.pf-passkey-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: -6px;
  margin-bottom: 14px;
}
.pf-passkey-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border-color, #e3e9f2);
  border-radius: 12px;
  background: var(--card-bg, #fff);
}
.pf-passkey-item-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(124, 58, 237, .1);
  color: #7c3aed;
  font-size: 16px;
  flex-shrink: 0;
}
.pf-passkey-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pf-passkey-item-info strong { font-size: 13.5px; }
.pf-passkey-item-info small { font-size: 11px; opacity: .65; }
.pf-passkey-del {
  border: none;
  background: transparent;
  color: #dc2626;
  font-size: 15px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background .2s;
  flex-shrink: 0;
}
.pf-passkey-del:hover { background: rgba(220, 38, 38, .1); }
:root[data-theme="dark"] .pf-passkey-item {
  background: #2a3644;
  border-color: #3a4956;
}
:root[data-theme="dark"] .pf-passkey-item-icon {
  background: rgba(196, 181, 253, .12);
  color: #c4b5fd;
}

/* ============================================================
   معالج التسجيل بخطوات (Wizard) — التالي / السابق
   ============================================================ */
.reg-step { display: none; }
.reg-step.active { display: block; animation: fadeSlide .3s ease; }
.reg-nav { display: flex; gap: 10px; margin-top: 4px; }
.reg-nav .form-button { flex: 1; margin-top: 8px; }
.reg-nav .form-button i { margin: 0 6px; font-size: 13px; }
/* مؤشر الخطوات */
.reg-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 12px 0;
}
.reg-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 54px;
}
.reg-progress-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  transition: all .25s ease;
}
.reg-progress-label { font-size: 11px; color: var(--text-sub); font-weight: 600; }
.reg-progress-step.active .reg-progress-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px var(--ring);
}
.reg-progress-step.active .reg-progress-label { color: var(--accent-deep); }
.reg-progress-step.done .reg-progress-dot {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}
.reg-progress-line {
  flex: 1;
  max-width: 46px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
  margin-bottom: 16px;
}

/* ============================================================
   شاشة التسجيل — ضغط رأسي إضافي كي تدخل كل خطوة
   بلا أي تمرير عمودي (مخصوص لهذه الشاشة فقط)
   ============================================================ */
#screen-register .form-card { padding: 16px 18px 18px 18px; }
#screen-register .form-heading { font-size: 18px; margin: 0 0 8px 0; }
#screen-register input.app-input,
#screen-register select.app-input { padding: 10px 12px; font-size: 14px; }
/* round29b: حقل البحث بالعنوان — مساحة يسار لشريحة «موقعي» حتى لا يدخل الـplaceholder تحتها (يغلب قاعدة الـID أعلاه) */
#screen-register .map-field-wrap input.app-input { padding-left: 96px; }
#screen-register .names-row .app-input,
#screen-register .names-row input.app-input { padding: 9px 4px; }
#screen-register .field-group { margin-bottom: 8px; }
#screen-register .field-label { margin-bottom: 4px; font-size: 12.5px; }
/* الصورة الشخصية في التسجيل — كبيرة ومنسقة (130px من القاعدة العامة — لا تصغير)*/
#screen-register .avatar-crop-row { margin-bottom: 10px; gap: 6px; }
#screen-register .reg-nav .form-button { padding: 11px; font-size: 15px; margin-top: 4px; }

/* ============================================================
   رأس شاشة التسجيل داخل الهيدر — يحل مكان الشريط المتحرك
   وزر الثيم عند فتح التسجيل (رجوع + عنوان + مؤشر تقدم)
   ============================================================ */
.reg-header { display: none; width: 100%; flex-direction: column; align-items: center; gap: 4px; }
body.reg-open .reg-header { display: flex; }
/* إخفاء الشريط المتحرك وزر الثيم في شاشة التسجيل فقط (عرض فقط — الآلية لا تُمس) */
body.reg-open #theme-toggle { display: none; }
/* الهيدر ينضغط لأن الشريط لم يعد يشغل الأعلى */
body.reg-open .app-header { padding: 12px 14px 20px 14px; }
/* زر الرجوع في الجهة الأخرى (يسار) فوق الهيدر الكحلي */
.reg-header .back-link {
  align-self: flex-end; /* RTL: flex-end = يسار */
  margin-bottom: 0;
  color: var(--on-header-sub);
  font-size: 13px;
}
.reg-header .back-link:hover { color: #fff; }
/* العنوان أبيض فوق الكحلي */
.reg-header .form-heading { color: #fff; margin: 0; font-size: 18px; }
.reg-header .form-heading::after { margin-top: 7px; }
/* مؤشر التقدم بالاتجاه الصحيح: ١ يسار ← ٣ يمين */
.reg-header .reg-progress { direction: ltr; margin: 6px 0 0 0; }
.reg-header .reg-progress-dot {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}
.reg-header .reg-progress-label { color: var(--on-header-sub); }
.reg-header .reg-progress-step.active .reg-progress-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}
.reg-header .reg-progress-step.active .reg-progress-label { color: #fff; }
.reg-header .reg-progress-step.done .reg-progress-dot {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}
.reg-header .reg-progress-line { background: rgba(255, 255, 255, 0.25); }

/* ============================================================
   منع ومضة شاشة الدخول عند وجود معرّف محفوظ —
   تُخفى حتى يقرر restoreSavedLogin وجهة الفتح
   ============================================================ */
:root[data-autologin] #screen-login { visibility: hidden; }

/* ============================================================
   جولة الصقل الشامل — تفاصيل دقيقة (عرض فقط، لا آليات)
   ============================================================ */
/* أمان أفقي: الشريط المتحرك absolute بعرض المحتوى — نقص أي فائض دون مساس بحركته */
html, body { overflow-x: hidden; }

/* --- شريط المزايا أسفل بطاقة الدخول: يملأ الفراغ بلمسة راقية --- */
.login-features {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 0 2px;
}
.login-features .feat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex: 1;
  max-width: 116px;
  padding: 13px 8px 11px 8px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 35, 63, 0.05);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sub);
  transition: background-color .3s ease, border-color .3s ease;
}
.login-features .feat i {
  font-size: 16px;
  color: var(--accent);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--ring);
}
:root[data-theme="dark"] .login-features .feat { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
/* نص شرائح المزايا — كما طلب المستخدم */
.login-features .feat span {
  margin-top: 10px;
  text-align: center;
  font-size: 8px;
}

/* --- رأس التسجيل: توسيط حقيقي للعنوان وزر رجوع كبسولة زجاجية --- */
.reg-header { position: relative; gap: 6px; padding-top: 2px; }
.reg-header .back-link {
  position: absolute;
  top: -2px;
  left: 0;              /* الجهة الأخرى — أقصى اليسار */
  align-self: auto;
  margin: 0;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #E8F0FB;
  font-size: 12.5px;
  transition: background-color .2s ease, border-color .2s ease;
}
.reg-header .back-link:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.reg-header .form-heading { font-size: 17px; letter-spacing: .3px; padding-top: 6px; }
.reg-header .reg-progress { margin-top: 8px; }
body.reg-open .app-header { padding: 14px 14px 18px 14px; }

/* --- أزرار معالج التسجيل "التالي/السابق" — تنسيق الموقع الحي hr-y.com/app حرفياً:
   تدرج أزرق 291deg + إطار أبيض 2px + هالة بيضاء متوهجة، وهوفر بنفسجي-سماوي 340deg --- */
.reg-nav .form-button {
  background-color: transparent;
  background-image: linear-gradient(291deg, #2f70b8, #008BFF, #008BFF);
  color: #fff;
  box-shadow: 0px 0px 10px 0px rgba(255, 255, 255, 0.86);
  border: 2px solid #fff;
  border-radius: 6px;
}
.reg-nav .form-button:hover:not(:disabled),
.reg-nav .form-button:focus:not(:disabled) {
  background-color: transparent;
  background-image: linear-gradient(340deg, #838DFF 0%, #28C4FF 52%);
  box-shadow: 0px 0px 10px 0px rgba(255, 255, 255, 0.86);
}
/* "السابق" بنفس لغة الحي لكن أهدأ: نفس الإطار الأبيض بتعبئة شفافة زجاجية */
.reg-nav .form-button.secondary {
  background-image: none;
  background-color: rgba(0, 139, 255, 0.10);
  border: 2px solid #fff;
  border-radius: 6px;
  color: var(--accent-deep);
  box-shadow: 0px 0px 10px 0px rgba(255, 255, 255, 0.65);
}
.reg-nav .form-button.secondary:hover {
  background-image: linear-gradient(340deg, rgba(131, 141, 255, 0.35) 0%, rgba(40, 196, 255, 0.35) 52%);
  border-color: #fff;
  color: #fff;
}
/* بالليل الداكن الإطار الأبيض الساطع يُستبدل بأزرق اللوجو حتى لا يبهر */
:root[data-theme="dark"] .reg-nav .form-button {
  border-color: #5AA0D6;
  box-shadow: 0px 0px 10px 0px rgba(90, 160, 214, 0.45);
}
:root[data-theme="dark"] .reg-nav .form-button.secondary {
  border-color: #2E7CB8;
  color: #8AC4F0;
  box-shadow: 0px 0px 10px 0px rgba(90, 160, 214, 0.30);
}

/* --- توحيد إيقاع بطاقة الدخول --- */
#screen-login .form-subheading { margin-bottom: 14px; }
#screen-login .form-links { margin-top: 12px; }

/* ============================================================
   ⚡ التحول الجذري — Aurora Night Glass ⚡
   قبل تسجيل الدخول: مشهد ليلي غامر بالكامل —
   خلفية ميدنايت بتوهجات أورورا (سماوي/بنفسجي/أزرق) متحركة،
   بطاقة زجاجية داكنة شفافة بضباب خلفي (Dark Glassmorphism)،
   أزرار Pill متدرجة متوهجة، حقول زجاج داكن.
   التنفيذ بقلب التوكنز على body:not(.is-logged) — عرض فقط،
   لا مساس بأي آلية (الشريط/الاختبارات/الودجت كما هي).
   ============================================================ */
body:not(.is-logged) {
  /* قلب التوكنز: دمج مزدوج — زجاج أورورا بأزرق هوية hr-y (8ac4f0/5aa0d6) */
  color-scheme: dark;
  --accent:        #5AA0D6;
  --accent-deep:   #2E7CB8;
  --accent-soft:   #8AC4F0;
  --heading:       #8AC4F0;

  --bg-card:       rgba(13, 20, 40, 0.66);
  --bg-soft:       rgba(255, 255, 255, 0.055);
  --bg-soft-hover: rgba(255, 255, 255, 0.10);
  --bg-panel:      #101830;

  --text-main:     #E9F0FB;
  --text-sub:      #A9B8D4;
  --text-faint:    #7686A6;
  --text-placeholder: #5D6D8E;

  /* حقول e/8 الداكنة الحية: خلفية #191B21 شبه شفافة + حدود #2E7CB8 + توهج أزرق */
  --input-bg:        rgba(25, 27, 33, 0.78);
  --input-bg-focus:  rgba(20, 22, 27, 0.92);
  --input-border:    #2E7CB8;
  --input-border-focus: #8AC4F0;
  --input-text:      #EDF3FC;
  --input-text-focus:#FFFFFF;
  --input-glow:      0 1px 4px rgba(0, 0, 0, 0.25); /* round26: إزالة الهالة الزرقاء الضبابية */
  --ring:            rgba(90, 160, 214, 0.18);
  --ring-strong:     rgba(90, 160, 214, 0.38);

  --line:          rgba(255, 255, 255, 0.11);
  --line-soft:     rgba(255, 255, 255, 0.16);
  --glass-bg:      rgba(13, 20, 40, 0.60);

  /* توهجا الأورورا العائمان — أزرق اللوجو الحي + لمسة بنفسج هوفر hr-y */
  --blob-a:        rgba(90, 160, 214, 0.13);
  --blob-b:        rgba(142, 41, 148, 0.11);

  /* الدروب زون داخل التسجيل — زجاج ليلي بأزرق الهوية */
  --dz-bg:         rgba(90, 160, 214, 0.07);
  --dz-border:     rgba(90, 160, 214, 0.45);
  --dz-ring:       rgba(90, 160, 214, 0.30);
  --dz-text:       #BAD9F2;

  /* دمج مزدوج: صورة الموقع الحي الداكنة تحت توهجات الأورورا */
  background:
    radial-gradient(1000px 620px at 88% -10%, rgba(90, 160, 214, 0.16), transparent 60%),
    radial-gradient(900px 560px at -14% 30%, rgba(142, 41, 148, 0.12), transparent 58%),
    radial-gradient(760px 500px at 55% 112%, rgba(46, 124, 184, 0.18), transparent 62%),
    linear-gradient(175deg, rgba(5, 7, 15, 0.82) 0%, rgba(10, 16, 38, 0.72) 46%, rgba(7, 12, 28, 0.82) 100%),
    url('../img/black-background.webp') center center / cover no-repeat;
  background-attachment: fixed;
}
/* الثيمان يتوحدان قبل الدخول في المشهد الليلي (اختيار تصميمي جريء) */
:root[data-theme="dark"] body:not(.is-logged) {
  background:
    radial-gradient(1000px 620px at 88% -10%, rgba(90, 160, 214, 0.13), transparent 60%),
    radial-gradient(900px 560px at -14% 30%, rgba(142, 41, 148, 0.09), transparent 58%),
    linear-gradient(175deg, rgba(4, 6, 13, 0.84) 0%, rgba(8, 13, 32, 0.76) 46%, rgba(6, 10, 24, 0.84) 100%),
    url('../img/black-background.webp') center center / cover no-repeat;
  background-attachment: fixed;
}

/* الهيدر يذوب في الليل — شفاف بتوهج خافت مع الحفاظ على الانحناء 50px كما طلب المستخدم */
body:not(.is-logged) .app-header {
  background: radial-gradient(420px 240px at 50% 46%, rgba(90, 160, 214, 0.10), transparent 70%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: none;
  border-radius: 0 0 50px 50px;
  box-shadow: none;
  margin-bottom: 0;
}

/* البطاقة — زجاج ليلي عميق بضباب خلفي وحافة مضيئة */
body:not(.is-logged) .form-card {
  /* round27: blur(22px) فوق كانفاس متحرك = تهنيج الهاتف — خلفية أكثف بديلاً تحافظ على الشكل الزجاجي */
  background: rgba(13, 20, 40, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.10) inset,
    0 8px 24px rgba(2, 6, 18, 0.45),
    0 28px 80px rgba(2, 6, 18, 0.60);
}
/* خيط ضوء علوي يعبر البطاقة — لمسة Aurora بأزرق اللوجو الحي */
body:not(.is-logged) .form-card::before {
  content: "";
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(138, 196, 240, 0.70), rgba(90, 160, 214, 0.55), transparent);
  pointer-events: none;
}

/* العنوان — أزرق فاتح بخطي الموقع الحي المتدرجين فوق وتحت */
body:not(.is-logged) .form-heading { color: #A9D2F5; }
body:not(.is-logged) .form-heading::before,
body:not(.is-logged) .form-heading::after {
  background: linear-gradient(90deg, transparent 0%, rgba(138, 196, 240, 0.75) 18%, rgba(138, 196, 240, 0.75) 82%, transparent 100%);
  box-shadow: 0 0 10px rgba(90, 160, 214, 0.35);
}

/* التبويبات — مسار زجاجي والمؤشر النشط تدرج أورورا متوهج */
body:not(.is-logged) .auth-tabs {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
body:not(.is-logged) .auth-tabs::before {
  /* تدرج أزرق الموقع الحي مع ذيل بنفسجي من هوفره */
  background: linear-gradient(135deg, #008BFF 0%, #2E7CB8 55%, #8E2994 100%);
  box-shadow: 0 4px 16px rgba(0, 139, 255, 0.45);
}
body:not(.is-logged) .auth-tab { color: #A9B8D4; }
body:not(.is-logged) .auth-tab.active { color: #fff; }

/* الحقول — زجاج ليلي يستيقظ بتوهج سماوي عند التركيز */
body:not(.is-logged) input.app-input:focus,
body:not(.is-logged) textarea.app-input:focus,
body:not(.is-logged) select.app-input:focus {
  box-shadow: 0 0 0 3px rgba(138, 196, 240, 0.20), 0 0 18px rgba(90, 160, 214, 0.16);
}
/* نفس radius الحقول الحية في e/8 (7px) — لا تدوير زائد يخالف الهوية */
body:not(.is-logged) input.app-input,
body:not(.is-logged) textarea.app-input,
body:not(.is-logged) select.app-input,
body:not(.is-logged) .names-row {
  border-radius: 7px;
}

/* الزر الرئيسي — Pill متدرج أورورا بتوهج نابض */
body:not(.is-logged) .form-button {
  border-radius: 999px;
  /* دمج مزدوج: أزرق hr-y الحي ينزلق لبنفسج هوفره (#8E2994→#E018FF) عند اللمس */
  background-image: linear-gradient(135deg, #008BFF 0%, #2E7CB8 42%, #8E2994 78%, #C215DB 100%);
  background-size: 220% 220%;
  background-position: 0% 50%;
  box-shadow: 0 2px 8px rgba(2, 6, 18, 0.45), 0 12px 32px rgba(0, 139, 255, 0.38);
  letter-spacing: .3px;
  transition: box-shadow .25s ease, transform .15s ease, background-position .45s ease;
}
body:not(.is-logged) .form-button:hover {
  background-position: 100% 50%;
  box-shadow: 0 4px 12px rgba(2, 6, 18, 0.5), 0 16px 42px rgba(142, 41, 148, 0.45);
}
body:not(.is-logged) .form-button:active { transform: scale(.985); }
/* الثانوي — Pill زجاجي مخطط */
body:not(.is-logged) .form-button.secondary {
  background-image: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #DCE7F7;
  box-shadow: none;
}
body:not(.is-logged) .form-button.secondary:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(138, 196, 240, 0.45);
  color: #fff;
}
body:not(.is-logged) .form-button.danger { background-image: none; box-shadow: none; border-radius: 999px; }

/* أزرار التالي/السابق في الويزارد — تنسيق hr-y.com/app الحي يتقدم على pill الأورورا */
body:not(.is-logged) .reg-nav .form-button {
  border-radius: 6px;
  border: 2px solid #fff;
  background-image: linear-gradient(291deg, #2f70b8, #008BFF, #008BFF);
  background-size: 100% 100%;
  background-position: 0 0;
  box-shadow: 0px 0px 10px 0px rgba(255, 255, 255, 0.86);
  transition: background-image .3s ease, box-shadow .25s ease, transform .15s ease;
}
body:not(.is-logged) .reg-nav .form-button:hover {
  background-image: linear-gradient(340deg, #838DFF 0%, #28C4FF 52%);
  background-position: 0 0;
  box-shadow: 0px 0px 12px 2px rgba(255, 255, 255, 0.9);
}
body:not(.is-logged) .reg-nav .form-button.secondary {
  background-image: none;
  background: rgba(0, 139, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  color: #EAF3FE;
  box-shadow: 0px 0px 10px 0px rgba(255, 255, 255, 0.45);
}
body:not(.is-logged) .reg-nav .form-button.secondary:hover {
  background: linear-gradient(340deg, rgba(131, 141, 255, 0.35) 0%, rgba(40, 196, 255, 0.35) 52%);
  border-color: #fff;
  color: #fff;
}

/* الروابط ورجوع — سماوي مضيء */
body:not(.is-logged) .form-links a { color: #8AC4F0; }
body:not(.is-logged) .form-links a:hover { color: #BAD9F2; }
body:not(.is-logged) .back-link { color: #A9B8D4; }
body:not(.is-logged) .back-link:hover { color: #8AC4F0; }

/* شرائح المزايا — كبسولات زجاجية بأيقونات أورورا */
body:not(.is-logged) .login-features .feat {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.10);
  color: rgba(222, 233, 250, 0.82);
  box-shadow: none;
  /* round27: أزيل blur — شرائح متعددة فوق الكانفاس المتحرك */
}
body:not(.is-logged) .login-features .feat i {
  background: linear-gradient(135deg, rgba(90, 160, 214, 0.20), rgba(142, 41, 148, 0.16));
  color: #8AC4F0;
}

/* ملاحظة reCAPTCHA فوق الليل */
body:not(.is-logged) .recaptcha-note { color: rgba(148, 163, 190, 0.7); }

/* رأس التسجيل فوق المشهد الليلي — شفاف متصل */
body.reg-open:not(.is-logged) .app-header {
  background: radial-gradient(420px 200px at 50% 30%, rgba(56, 189, 248, 0.08), transparent 70%);
}
/* في التسجيل: البطاقة لا تطفو فوق تسميات مؤشر التقدم (إلغاء الهامش السالب) */
body.reg-open .app-container { margin-top: 6px; }

/* ============================================================
   ☀️ Aurora Day Glass — الوضع الفاتح (العادي) قبل الدخول
   نفس هوية أورورا لكن بلوحة نهارية: خلفية فاتحة بتوهجات
   سماوية/بنفسجية ناعمة، بطاقة زجاج أبيض، نصوص كحلية.
   الوضع الداكن يبقى على مشهد Aurora Night كما هو.
   ============================================================ */
:root:not([data-theme="dark"]) body:not(.is-logged) {
  color-scheme: light;
  /* دمج مزدوج: أزرق الموقع الحي #008BFF وعنوانه #2e7cde داخل زجاج النهار */
  --accent:        #008BFF;
  --accent-deep:   #0072D6;
  --accent-soft:   #3B82F6;
  --heading:       #2E7CDE;

  /* round28: درجات ثلجية لبطاقات شاشة الدخول الفاتحة */
  --bg-card:       rgba(248, 252, 255, 0.84);
  --bg-soft:       #EAF2FB;
  --bg-soft-hover: #DBE9F9;
  --bg-panel:      #FBFDFF;

  --text-main:     #10233F;
  --text-sub:      #51617D;
  --text-faint:    #8394AE;
  --text-placeholder: #9AA9C0;

  /* round28: حقول ثلجية (كانت #FFF7F7 وردية) */
  --input-bg:        #F3F9FF;
  --input-bg-focus:  #FDFEFF;
  --input-border:    #008BFF;
  --input-border-focus: #175EFF6E;
  --input-text:      #0C2155;
  --input-text-focus:#0C2155;
  --input-glow:      0 1px 4px rgba(12, 33, 85, 0.08); /* round26: كانت هالة بيضاء ضبابية كثيفة 9px/8px */
  --ring:            rgba(0, 139, 255, 0.13);
  --ring-strong:     rgba(0, 139, 255, 0.30);

  --line:          rgba(90, 140, 200, 0.16);
  --line-soft:     rgba(90, 140, 200, 0.24);
  --glass-bg:      rgba(246, 251, 255, 0.75);

  --blob-a:        rgba(0, 139, 255, 0.10);
  --blob-b:        rgba(142, 41, 148, 0.06);

  --dz-bg:         rgba(0, 139, 255, 0.06);
  --dz-border:     rgba(0, 139, 255, 0.45);
  --dz-ring:       rgba(0, 139, 255, 0.25);
  --dz-text:       #0072D6;

  /* نصوص البراند وأدوات الهيدر فوق الخلفية الفاتحة */
  --brand-grad-a:  #0D2547;
  --brand-grad-b:  #008BFF;
  --on-header:     #10233F;
  --on-header-sub: rgba(43, 64, 96, 0.62);

  /* دمج مزدوج: صورة الموقع الحي الفاتحة تحت توهجات الأورورا النهارية */
  background:
    radial-gradient(1000px 620px at 88% -10%, rgba(0, 139, 255, 0.14), transparent 60%),
    radial-gradient(900px 560px at -14% 30%, rgba(142, 41, 148, 0.07), transparent 58%),
    radial-gradient(760px 500px at 55% 112%, rgba(0, 114, 214, 0.10), transparent 62%),
    linear-gradient(175deg, rgba(240, 248, 255, 0.55) 0%, rgba(226, 238, 252, 0.50) 46%, rgba(236, 245, 255, 0.55) 100%),
    url('../img/white-background.webp') center center / cover no-repeat;
  background-attachment: fixed;
}

/* الهيدر — توهج نهاري خافت خلف الشعار */
:root:not([data-theme="dark"]) body:not(.is-logged) .app-header {
  background: radial-gradient(420px 240px at 50% 46%, rgba(0, 139, 255, 0.07), transparent 70%);
}
/* زر الثيم والجرس فوق النهار — إطار أزرق ثابت وأيقونة كحلية */
:root:not([data-theme="dark"]) body:not(.is-logged) .app-header .theme-toggle,
:root:not([data-theme="dark"]) body:not(.is-logged) .app-header .lang-toggle,
:root:not([data-theme="dark"]) body:not(.is-logged) .app-header .notif-bell { color: #33517E; }
:root:not([data-theme="dark"]) body:not(.is-logged) .app-header .theme-toggle:hover {
  border-color: var(--accent);
  color: #008BFF;
}

/* البطاقة — زجاج أبيض نهاري بحافة مضيئة */
:root:not([data-theme="dark"]) body:not(.is-logged) .form-card {
  /* round27: خلفية أكثف بديلاً عن blur المحذوف — round28: درجة ثلجية */
  background: rgba(249, 252, 255, 0.94);
  border: 1px solid rgba(90, 140, 200, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 8px 24px rgba(13, 37, 71, 0.08),
    0 28px 80px rgba(13, 37, 71, 0.10);
}
:root:not([data-theme="dark"]) body:not(.is-logged) .form-card::before {
  background: linear-gradient(90deg, transparent, rgba(0, 139, 255, 0.45), rgba(142, 41, 148, 0.30), transparent);
}

/* العنوان — أزرق الموقع الحي #2e7cde بخطيه فوق وتحت */
:root:not([data-theme="dark"]) body:not(.is-logged) .form-heading { color: #2E7CDE; }
:root:not([data-theme="dark"]) body:not(.is-logged) .form-heading::before,
:root:not([data-theme="dark"]) body:not(.is-logged) .form-heading::after {
  background: linear-gradient(90deg, transparent 0%, rgba(46, 124, 222, 0.75) 18%, rgba(46, 124, 222, 0.75) 82%, transparent 100%);
  box-shadow: none;
}

/* التبويبات — مسار فاتح والمؤشر النشط يبقى تدرج أورورا */
:root:not([data-theme="dark"]) body:not(.is-logged) .auth-tabs {
  background: rgba(16, 35, 63, 0.05);
  border: 1px solid rgba(16, 35, 63, 0.08);
}
:root:not([data-theme="dark"]) body:not(.is-logged) .auth-tab { color: #51617D; }
:root:not([data-theme="dark"]) body:not(.is-logged) .auth-tab.active { color: #fff; }
/* round28b: مؤشر التبويب النشط في الفاتح — أزرق ثلجي نقي بدل وراثة التدرج البنفسجي الليلي */
:root:not([data-theme="dark"]) body:not(.is-logged) .auth-tabs::before {
  background: linear-gradient(135deg, #00AEFF 0%, #008BFF 55%, #0072D6 100%);
  box-shadow: 0 4px 14px rgba(0, 139, 255, 0.32);
}
/* round28b: الزر الرئيسي في الفاتح — تدرج أزرق جليدي نظيف بدل الموحل الرمادي-البنفسجي الموروث */
/* round29b: استثناء danger/secondary حتى لا يصيب التدرج الأزرق زر الخروج والأزرار الثانوية */
:root:not([data-theme="dark"]) body:not(.is-logged) .form-button:not(.danger):not(.secondary) {
  background-image: linear-gradient(135deg, #00B7FF 0%, #008BFF 48%, #0072D6 100%);
  box-shadow: 0 2px 8px rgba(0, 139, 255, 0.18), 0 10px 26px rgba(0, 139, 255, 0.24);
}
:root:not([data-theme="dark"]) body:not(.is-logged) .form-button:not(.danger):not(.secondary):hover {
  box-shadow: 0 4px 12px rgba(0, 139, 255, 0.24), 0 14px 34px rgba(0, 139, 255, 0.30);
}

/* تركيز الحقول — توهج الموقع الحي (هالة فاتحة محيطة كـ input-glow هناك) */
:root:not([data-theme="dark"]) body:not(.is-logged) input.app-input:focus,
:root:not([data-theme="dark"]) body:not(.is-logged) textarea.app-input:focus,
:root:not([data-theme="dark"]) body:not(.is-logged) select.app-input:focus {
  box-shadow: 0 0 0 3px rgba(0, 139, 255, 0.15), 0 0 18px rgba(0, 139, 255, 0.12);
}

/* الزر الثانوي — مخطط فاتح */
:root:not([data-theme="dark"]) body:not(.is-logged) .form-button.secondary {
  background: rgba(16, 35, 63, 0.04);
  border: 1px solid rgba(16, 35, 63, 0.16);
  color: #33517E;
}
:root:not([data-theme="dark"]) body:not(.is-logged) .form-button.secondary:hover {
  background: rgba(0, 139, 255, 0.07);
  border-color: rgba(0, 139, 255, 0.45);
  color: #0072D6;
}
/* التالي/السابق نهاراً — نفس أزرار hr-y.com/app الحية (الإطار الأبيض يبرز على الخلفية الفاتحة) */
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-nav .form-button.secondary {
  background: rgba(0, 139, 255, 0.10);
  border: 2px solid #fff;
  color: #0072D6;
  box-shadow: 0px 0px 10px 0px rgba(255, 255, 255, 0.65);
}
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-nav .form-button.secondary:hover {
  background: linear-gradient(340deg, rgba(131, 141, 255, 0.30) 0%, rgba(40, 196, 255, 0.30) 52%);
  border-color: #fff;
  color: #fff;
}

/* الروابط ورجوع — أزرق الموقع الحي */
:root:not([data-theme="dark"]) body:not(.is-logged) .form-links a { color: #008BFF; }
:root:not([data-theme="dark"]) body:not(.is-logged) .form-links a:hover { color: #0072D6; }
:root:not([data-theme="dark"]) body:not(.is-logged) .back-link { color: #51617D; }
:root:not([data-theme="dark"]) body:not(.is-logged) .back-link:hover { color: #008BFF; }

/* شرائح المزايا — كبسولات بيضاء بأيقونات أورورا */
:root:not([data-theme="dark"]) body:not(.is-logged) .login-features .feat {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(16, 35, 63, 0.08);
  color: #51617D;
}
:root:not([data-theme="dark"]) body:not(.is-logged) .login-features .feat i {
  background: linear-gradient(135deg, rgba(0, 139, 255, 0.12), rgba(142, 41, 148, 0.10));
  color: #008BFF;
}

:root:not([data-theme="dark"]) body:not(.is-logged) .recaptcha-note { color: rgba(81, 97, 125, 0.72); }

/* رأس التسجيل فوق المشهد النهاري */
:root:not([data-theme="dark"]) body.reg-open:not(.is-logged) .app-header {
  background: radial-gradient(420px 200px at 50% 30%, rgba(0, 139, 255, 0.06), transparent 70%);
}
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .back-link {
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(16, 35, 63, 0.14);
  color: #33517E;
}
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .back-link:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 139, 255, 0.5);
  color: #0072D6;
}
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .form-heading { color: #2E7CDE; }
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .reg-progress-dot {
  background: rgba(16, 35, 63, 0.06);
  border-color: rgba(16, 35, 63, 0.25);
  color: #33517E;
}
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .reg-progress-label { color: #6B7C98; }
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .reg-progress-step.active .reg-progress-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 139, 255, 0.14);
}
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .reg-progress-step.active .reg-progress-label { color: #10233F; }
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .reg-progress-step.done .reg-progress-dot {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .reg-progress-line { background: rgba(16, 35, 63, 0.18); }

/* ============================================================
   round11: خطوة نوع الحساب (كروت) + ويزارد خدمات مزود الخدمة
   (أقسام → فروع → اعتماد) — نمط HR-Y الأصلي مكيّف لتوكنز الثيم
   ============================================================ */

/* --- كروت نوع الحساب --- */
.acct-type-title { text-align: center; font-size: 19px; font-weight: 800; color: var(--text-main); margin: 6px 0 4px; }
.acct-type-sub { text-align: center; font-size: 13px; color: var(--text-sub); margin-bottom: 16px; }
.acct-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.acct-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--bg-card);
  cursor: pointer;
  text-align: center;
  transition: all .2s ease;
  font-family: inherit;
}
.acct-card:hover { border-color: var(--input-border-focus); transform: translateY(-2px); }
.acct-card:active { transform: scale(.98); }
.acct-card-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: rgba(0, 139, 255, 0.10);
  color: var(--accent);
  transition: all .2s ease;
}
.acct-card-name { font-size: 16px; font-weight: 800; color: var(--text-main); }
.acct-card-desc { font-size: 12px; color: var(--text-sub); line-height: 1.6; }
.acct-card-check {
  position: absolute;
  top: 10px;
  inset-inline-end: 12px;
  font-size: 20px;
  color: var(--accent);
  opacity: 0;
  transform: scale(.6);
  transition: all .2s ease;
}
.acct-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(64, 108, 249, 0.45);
}
.acct-card.active .acct-card-icon { background: linear-gradient(90deg, #014088, #008BFF); color: #fff; }
.acct-card.active .acct-card-check { opacity: 1; transform: scale(1); }

/* --- العناوين المتدرجة (hgradient — النمط الأصلي) --- */
.hgradient { position: relative; white-space: nowrap; }
.hgradient::before {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  color: var(--brand-outline); z-index: 0;
  text-shadow: 1px 1px 0 var(--brand-outline), -1px -1px 0 var(--brand-outline),
               1px -1px 0 var(--brand-outline), -1px 1px 0 var(--brand-outline),
               0 1px 0 var(--brand-outline), 0 -1px 0 var(--brand-outline),
               1px 0 0 var(--brand-outline), -1px 0 0 var(--brand-outline);
  font-weight: bold;
}
.hgradient span {
  font-weight: bold; position: relative;
  background: linear-gradient(90deg, var(--brand-grad-a), var(--brand-grad-b));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 1;
}
.sp-title { text-align: center; font-size: 17px; margin: 4px 0 6px; display: block; }
.sp-sub.frm_description { text-align: center; font-size: 12.5px; color: var(--text-sub); margin-bottom: 16px; }

/* --- كروت الخيارات (frm_image_option_container — مقلوب row-reverse كالأصل) --- */
.frm_focenterrm { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.frm_focenterrm .frm_checkbox { width: 100%; display: flex; flex-direction: column; align-items: center; }
.frm_focenterrm label { cursor: pointer; display: block; width: 100%; }
.frm_focenterrm input[type="checkbox"] { display: none; }
.frm_focenterrm .frm_image_option_container {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  width: 100%;
  padding: 0 10px;
  border: 2px solid var(--accent);
  border-radius: 7px;
  justify-content: space-between;
  background: var(--bg-card);
  min-height: 46px;
  transition: all .15s ease;
}
.frm_focenterrm .frm_image_option_container:hover,
.frm_focenterrm input[type="checkbox"]:checked + .frm_image_option_container {
  box-shadow: 0 0 10px rgba(64, 108, 249, 1);
  color: rgba(64, 108, 249, 1);
  border: 3px solid;
  transform: scale(1.01);
  font-weight: bold;
}
.frm_focenterrm .frm_image_option_container span { font-size: 12.5px; color: var(--text-main); text-align: right; flex: 1; padding-inline-start: 8px; }
.frm_focenterrm input[type="checkbox"]:checked + .frm_image_option_container span { color: rgba(64, 108, 249, 1); }
.frm_focenterrm .frm_image_option_container img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.frm_focenterrm .frm_image_option_container .sp-other-icon { font-size: 22px; color: var(--accent); flex-shrink: 0; }

/* رأس مجموعة الفروع */
.sp-group-head {
  display: flex; flex-direction: row-reverse; align-items: center; justify-content: center;
  gap: 8px;
  background: rgba(0, 139, 255, 0.08);
  border: 1px solid rgba(0, 139, 255, 0.30);
  color: var(--accent-deep);
  border-radius: 20px;
  padding: 6px 14px;
  width: fit-content;
  margin: 14px auto 6px;
  font-size: 13px;
  font-weight: 700;
}
.sp-group-head img { height: 24px; width: auto; object-fit: contain; }
:root[data-theme="dark"] .sp-group-head { color: #8AC4F0; }

/* حقل "غيرها" المخفي */
.sp-other-input {
  display: none;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 2px dashed var(--accent);
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  background: rgba(0, 139, 255, 0.06);
  color: var(--text-main);
  direction: rtl;
}
.sp-other-input.show { display: block; animation: spFade .3s ease; }
.sp-other-input:focus { outline: none; border-style: solid; box-shadow: 0 0 10px rgba(64, 108, 249, .5); }

/* عداد الفروع المختارة */
#sp-branch-count { text-align: center; font-size: 12.5px; color: #0eab55; font-weight: 700; margin-bottom: 10px; min-height: 16px; }

@keyframes spFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- رسائل الخطأ داخل الويزارد --- */
#sp-error, #sp-error-2 {
  display: none; text-align: center;
  background: rgba(224, 43, 43, 0.08);
  color: #e02b2b;
  border: 1px solid rgba(224, 43, 43, 0.30);
  border-radius: 8px;
  padding: 9px 12px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
}
#sp-error.show, #sp-error-2.show { display: block; animation: spFade .3s ease; }

/* ============================================================
   round19 — إطارات الحقول = إطار الشريط المتحرك (حركة اللون)
   تقنية الخلفية المزدوجة: الحقول عناصر مستبدلة لا تقبل ::after،
   فنرسم طبقتين: خلفية الحقل فوق padding-box + التدرج المتحرك فوق border-box
   بنفس تدرج .marqueeitem::after وبنفس keyframes borderGradientRotate.
   ============================================================ */
input.app-input,
textarea.app-input,
select.app-input,
.names-row {
  border: 6px solid transparent;
  background-color: transparent;
  background-image:
    linear-gradient(var(--input-bg), var(--input-bg)),
    linear-gradient(0deg, #014088, #008BFF, #00d2ff, #014088);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 200% 200%;
  animation: borderGradientRotate 6s linear infinite;
  transition: box-shadow .25s ease;
}
/* التركيز: نبدّل طبقة الخلفية الداخلية فقط ونُبقي التدرج متحركاً */
input.app-input:focus,
textarea.app-input:focus,
select.app-input:focus,
.names-row:focus-within {
  border-color: transparent;
  background-color: transparent;
  background-image:
    linear-gradient(var(--input-bg-focus), var(--input-bg-focus)),
    linear-gradient(0deg, #014088, #008BFF, #00d2ff, #014088);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 200% 200%;
}
/* حاوية حقل الهاتف — قواعدها الأصلية !important فنغلبها هنا بنفس القوة */
.iti-phone-container {
  border: 6px solid transparent !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(var(--input-bg), var(--input-bg)),
    linear-gradient(0deg, #014088, #008BFF, #00d2ff, #014088) !important;
  background-origin: padding-box, border-box !important;
  background-clip: padding-box, border-box !important;
  background-size: 100% 100%, 200% 200% !important;
  animation: borderGradientRotate 6s linear infinite;
}
.iti-phone-container:focus-within {
  border-color: transparent !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(var(--input-bg-focus), var(--input-bg-focus)),
    linear-gradient(0deg, #014088, #008BFF, #00d2ff, #014088) !important;
  background-origin: padding-box, border-box !important;
  background-clip: padding-box, border-box !important;
  background-size: 100% 100%, 200% 200% !important;
}
/* حقول الاسم الرباعي داخل .names-row تبقى شفافة بلا إطار خاص بها */
.names-row .app-input,
.names-row input.app-input {
  background-image: none !important;
  animation: none !important;
}

/* ============================================================
   round20 — مؤشر تقدم minimal + شبكة أقسام مضغوطة + أكورديون فروع
   ============================================================ */

/* 1) مؤشر التقدم: نقط 6px بلا أرقام ولا أسماء (كمؤشرات السلايدر) */
.reg-progress { gap: 7px; margin: 0 0 12px 0; }
.reg-progress-mini {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  transition: all .3s ease;
  flex-shrink: 0;
}
.reg-progress-mini.done { background: var(--accent-deep); }
.reg-progress-mini.active {
  background: var(--accent);
  width: 18px;
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(0, 139, 255, 0.55);
}
/* داخل الهيدر الكحلي قبل الدخول */
.reg-header .reg-progress-mini { background: rgba(255, 255, 255, 0.28); }
.reg-header .reg-progress-mini.done { background: rgba(255, 255, 255, 0.75); }
.reg-header .reg-progress-mini.active { background: var(--accent); }
/* نسخة النهار */
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .reg-progress-mini { background: rgba(16, 35, 63, 0.18); }
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .reg-progress-mini.done { background: rgba(16, 35, 63, 0.45); }
:root:not([data-theme="dark"]) body:not(.is-logged) .reg-header .reg-progress-mini.active { background: var(--accent); }

/* 2) الأقسام: شبكة عمودين مضغوطة */
#sp-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}
#sp-categories .frm_checkbox { width: auto; }
#sp-categories .frm_image_option_container {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 0;
  padding: 8px 6px;
  height: 100%;
  text-align: center;
}
#sp-categories .frm_image_option_container img { width: 28px; height: 28px; }
#sp-categories .frm_image_option_container span {
  font-size: 11px;
  text-align: center;
  padding-inline-start: 0;
  flex: none;
  line-height: 1.35;
}
/* إخفاء ما بعد الثمانية حتى "عرض المزيد" */
#sp-categories .frm_checkbox.sp-extra { display: none; }
#sp-categories.sp-expanded .frm_checkbox.sp-extra { display: flex; animation: spFade .3s ease; }
/* زر عرض المزيد/أقل — يمتد على العمودين */
.sp-more-btn {
  grid-column: 1 / -1;
  border: 1.5px dashed var(--accent);
  background: rgba(0, 139, 255, 0.05);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}
.sp-more-btn:hover { background: rgba(0, 139, 255, 0.12); }
.sp-more-btn i { margin-inline-end: 5px; font-size: 11px; }
:root[data-theme="dark"] .sp-more-btn { color: #8AC4F0; }

/* 3) الفروع: أكورديون قابل للطي لكل قسم */
.sp-acc {
  width: 100%;
  border: 1px solid rgba(0, 139, 255, 0.25);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 139, 255, 0.03);
}
.sp-acc + .sp-acc { margin-top: 8px; }
.sp-acc-head {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: rgba(0, 139, 255, 0.08);
  color: var(--accent-deep);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
:root[data-theme="dark"] .sp-acc-head { color: #8AC4F0; }
.sp-acc-head img { height: 22px; width: auto; object-fit: contain; }
.sp-acc-title { flex: 1; text-align: right; }
.sp-acc-count {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.sp-acc-chev { font-size: 12px; transition: transform .25s ease; }
.sp-acc.open .sp-acc-chev { transform: rotate(180deg); }
.sp-acc-body { display: none; padding: 8px; }
.sp-acc.open .sp-acc-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: spFade .3s ease;
}
/* round22: الفروع صفوف أفقية بعرض كامل (النمط الأساسي row-reverse كما الصورة المرجعية) */
.sp-acc-body .frm_checkbox { width: 100%; }
.sp-acc-body .sp-other-box { width: 100%; }
/* round22: إخفاء الأكورديونات بعد أول 8 حتى "عرض المزيد" */
#sp-branches .sp-acc.sp-extra { display: none; }
#sp-branches.sp-expanded .sp-acc.sp-extra { display: block; animation: spFade .3s ease; }
#sp-branches .sp-more-btn { width: 100%; margin-top: 8px; }

/* ================================================
   round23: خطوة النوع المدمجة + الأنشطة التجارية
   + شبكة تفاصيل العنوان + قفل خريطة الملف
   ================================================ */

/* زرا نوع الحساب (تاجر / مزود خدمة) — صف أفقي بنمط HR-Y */
.account-type-row {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
}
.account-type-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 10px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-sub);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap; /* round30: منع كسر «مزود خدمة» سطرين */
  cursor: pointer;
  transition: all .25s ease;
}
.account-type-btn i { font-size: 16px; }
/* round30: شاشات ضيقة جداً — تصغير طفيف ليتسع الزران دون كسر */
@media (max-width: 360px) {
  .account-type-btn { font-size: 14px; gap: 6px; padding: 13px 6px; }
  .account-type-btn i { font-size: 14px; }
}
.account-type-btn:hover { border-color: var(--accent); color: var(--accent); }
.account-type-btn.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), #2a6fb8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(58, 141, 222, .35);
}
:root[data-theme="dark"] .account-type-btn.active {
  box-shadow: 0 4px 14px rgba(58, 141, 222, .25);
}

/* قائمة الأنشطة التجارية — نفس قواعد قائمة الخدمات (أول 8 + عرض المزيد) */
#act-list .sp-acc.sp-extra { display: none; }
#act-list.sp-expanded .sp-acc.sp-extra { display: block; animation: spFade .3s ease; }
#act-list .sp-more-btn { width: 100%; margin-top: 8px; }
#act-error { display: none; color: var(--danger); font-size: 13px; font-weight: 700; margin: 6px 0; text-align: center; }
#act-error.show { display: block; }
#act-count { color: var(--accent); font-size: 12.5px; font-weight: 700; text-align: center; margin-bottom: 6px; min-height: 16px; }

/* أيقونة النشاط (Font Awesome بدل صور الخدمات) */
.act-row-icon {
  width: 26px;
  min-width: 26px;
  text-align: center;
  font-size: 17px;
  color: var(--accent);
}
.sp-acc-body .frm_image_option_container .act-row-icon { font-size: 15px; color: var(--text-sub); }
.frm_checkbox input:checked + .frm_image_option_container .act-row-icon { color: var(--accent); }

/* زر "موقعي" بأيقونة FA — round28b: أفقي مدمج داخل الحقل */
.locate-button i {
  font-size: 13px;
  display: block;
  margin: 0;
  color: var(--danger);
}

/* شبكة تفاصيل العنوان في الملف الشخصي (الدولة/المحافظة/المديرية/الحي/المجاور) */
.profile-row.pf-addr-row { align-items: flex-start; }
.pf-addr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}
.pf-addr-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}
.pf-addr-cell i { color: var(--accent); font-size: 14px; }
.pf-addr-cell small { color: var(--text-sub); font-size: 10.5px; font-weight: 700; }
.pf-addr-cell b { color: var(--text-main); font-size: 12.5px; font-weight: 800; word-break: break-word; }

/* قفل خريطة تبويب التعديل — النقر لا يغيّر الموقع إلا بعد زر تحرير */
.pf-map-wrap { position: relative; }
.pf-map-lock {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px;
  background: transparent;
  cursor: not-allowed;
  border-radius: inherit;
}
.pf-map-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .25);
  transition: all .2s ease;
}
.pf-map-edit-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ============================================================
   round24: القوائم المنسدلة الذكية (SmartSelect) + الخلفية المتحركة
   ============================================================ */

/* الكانفاس خلف كل المحتوى (فوق خلفية body وتحت العناصر) */
/* round27: مطابق حرفياً لتنسيق #hry-bg في النسخة المرجعية الشغالة */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  pointer-events: none;
}

.ss-wrap { margin: 10px 0; text-align: right; }
.ss-field { position: relative; }

.ss-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
  text-align: right;
  box-shadow: var(--input-glow);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.ss-control:hover { background: var(--input-bg-focus); }
.ss-field.open .ss-control {
  border-color: var(--accent);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 3px var(--input-border-focus);
  border-radius: 14px 14px 10px 10px;
}
.ss-control-icon { color: var(--accent); font-size: 16px; flex-shrink: 0; }
.ss-value { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.ss-placeholder { color: var(--text-placeholder); font-size: 13.5px; }

/* شرائح الاختيارات داخل الحقل — round28: تدرج ثلجي خفيف + ظل ناعم */
.ss-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-soft));
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  color: var(--text-main);
  max-width: 170px;
  box-shadow: 0 1px 3px rgba(12, 33, 85, 0.06);
}
.ss-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-chip img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.ss-chip i { color: var(--accent); font-size: 11px; }
.ss-chip-x { cursor: pointer; color: var(--text-faint) !important; padding: 2px; }
.ss-chip-x:hover { color: #e5484d !important; }
.ss-chip-more { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }

.ss-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}
.ss-chev { color: var(--text-faint); transition: transform .25s; flex-shrink: 0; }
.ss-field.open .ss-chev { transform: rotate(180deg); }

/* لوحة الخيارات المنسدلة
   round24-fix: اللوحة تفتح داخل تدفق الصفحة (تدفع المحتوى لأسفل)
   بدل position:absolute — كانت تُقَصّ وتختفي بسبب overflow:hidden
   على الكروت الحاوية (.form-card وغيرها) */
.ss-panel {
  display: none;
  margin-top: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-top: 2px solid var(--accent);
  border-radius: 14px;
  box-shadow: var(--shadow-panel), 0 10px 30px rgba(0, 90, 200, 0.08);
  overflow: hidden;
}
.ss-field.open .ss-panel { display: block; animation: ssPanelIn .22s ease; }
@keyframes ssPanelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

.ss-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--bg-soft), var(--bg-panel));
}
.ss-search i { color: var(--accent); font-size: 13px; }
.ss-search:focus-within i { color: var(--accent-deep); }
.ss-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-main);
}
.ss-search input::placeholder { color: var(--text-placeholder); }

.ss-options { max-height: 290px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ss-group-head {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg-soft-hover));
  color: var(--accent-deep);
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  letter-spacing: .2px;
}
.ss-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-main);
  transition: background .15s;
}
.ss-option { border-bottom: 1px solid var(--line); }
.ss-option:last-child { border-bottom: none; }
.ss-option:hover { background: var(--bg-soft-hover); padding-right: 17px; }
.ss-option img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.ss-option > i:first-child { width: 30px; text-align: center; color: var(--accent); font-size: 17px; flex-shrink: 0; }
.ss-option > span { flex: 1; }
.ss-check { opacity: 0; color: var(--accent); transform: scale(.5); transition: opacity .15s, transform .15s; }
.ss-option.selected { background: rgba(0, 139, 255, 0.09); box-shadow: inset 3px 0 0 var(--accent); }
.ss-option.selected .ss-check { opacity: 1; transform: none; }
:root[data-theme="dark"] .ss-option.selected { background: rgba(0, 139, 255, 0.16); }
.ss-opt-other { border-top: 1px dashed var(--border-color); }
.ss-opt-other > i:first-child { color: var(--gold); }
.ss-empty { padding: 18px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* القائمة الثانية المتتالية — تنزلق للظهور */
.ss-l2 { animation: ssIn .3s ease; }
@keyframes ssIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ss-step-hint { font-size: 12.5px; color: var(--text-sub); margin: 4px 4px 2px; }
.ss-step-hint i { color: var(--accent); margin-left: 4px; }

/* حقول "غيرها" أسفل القوائم */
.ss-other-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.ss-other-row > i { color: var(--gold); font-size: 15px; flex-shrink: 0; }
.ss-other-row .sp-other-input { display: block; flex: 1; margin: 0; }

/* ============================================================
   round25: أزرار السابق السفلية (بدل أزرار رجوع العلوية المحذوفة)
   — صف واحد: الزر الرئيسي بجوار زر السابق بنفس نمط reg-nav
   ============================================================ */
.btn-row { display: flex; gap: 10px; }
.btn-row .form-button { flex: 1; }
/* round30: nowrap + تقليص الحشو الجانبي حتى لا ينكسر «رجوع ←» سطرين على 320px */
.btn-row .form-button.secondary.back-btn { flex: 0 0 34%; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.btn-row .form-button i { margin: 0 6px; font-size: 13px; }

/* ============================================================
   round28: بطاقة تفاصيل الموقع — تظهر أسفل الخريطة عند اختيار موقع
   (دولة / محافظة / مديرية / مدينة / حي-جوار / شارع / إحداثيات)
   ============================================================ */
.loc-card {
  display: none;
  margin-top: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(12, 33, 85, 0.07);
  animation: ssPanelIn .25s ease;
}
.loc-card.visible { display: block; }
.loc-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg-soft-hover));
  border-bottom: 1px solid var(--line);
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
}
.loc-card-head i { color: var(--accent); font-size: 14px; }
.loc-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.loc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.loc-item i {
  width: 18px;
  text-align: center;
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
}
.loc-item-body { min-width: 0; flex: 1; }
.loc-item-label {
  display: block;
  font-size: 10.5px;
  color: var(--text-faint);
  margin-bottom: 1px;
}
.loc-item-value {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loc-item.loc-full { grid-column: 1 / -1; }
.loc-item.loc-full .loc-item-value { white-space: normal; line-height: 1.5; }
.loc-item.loc-coords .loc-item-value {
  direction: ltr;
  text-align: right;
  font-size: 11.5px;
  color: var(--text-sub);
}
:root[data-theme="dark"] .loc-card { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.30); }
@media (max-width: 420px) {
  .loc-card-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   الدخول التجريبي السريع (dev فقط — D12): أربعة أدوار
   ============================================================ */
.dev-quick-login {
  margin-top: 18px;
  padding: 12px;
  border: 1px dashed var(--gold-deep, #b9962e);
  border-radius: 12px;
  background: rgba(185, 150, 46, 0.05);
}
.dev-quick-login .dql-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  text-align: center;
}
.dev-quick-login .dql-title i { margin-inline-end: 5px; color: var(--gold-deep, #b9962e); }
.dql-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dql-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.dql-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.dql-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.dql-admin    { background: #eef4ff; color: #0B6BE8; border-color: #cfe0fb; }
.dql-provider { background: #f0fff7; color: #00915a; border-color: #c9f2df; }
.dql-client   { background: #fff8ec; color: #b97612; border-color: #f4e3c2; }
.dql-staff    { background: #f7f0ff; color: #7a3ce8; border-color: #e5d7fa; }
:root[data-theme="dark"] .dev-quick-login { background: rgba(185, 150, 46, 0.08); }
:root[data-theme="dark"] .dql-admin    { background: #14213a; color: #6ea8f7; border-color: #23375c; }
:root[data-theme="dark"] .dql-provider { background: #10261c; color: #35d492; border-color: #1d4534; }
:root[data-theme="dark"] .dql-client   { background: #2a2113; color: #efb95c; border-color: #4a3a1e; }
:root[data-theme="dark"] .dql-staff    { background: #221537; color: #b08cf5; border-color: #3a2762; }

/* ═══════════════ §P46 — شعار المكعب المتحرك في #brand-link (من ملف المستخدم shanat_cube_logo.html) ═══════════════
   كل الأنماط مقيّدة بـ #cube-logo-root — بادئة clg لكل keyframes لمنع التصادم */
#cube-logo-root { display:flex; justify-content:center; align-items:center; touch-action:none; }
#cube-logo-root * { box-sizing:border-box; }

/* تحييد قواعد .brand-link svg الموروثة (حجم 100px + drop-shadow + hover translateY) عن طبقات المكوّن */
.brand-link #cube-logo-root svg,
#cube-logo-root .svg-layer { width:100%; height:100%; filter:none; }
.brand-link:hover #cube-logo-root svg { transform:none; }

#cube-logo-root .clg-wrapper {
  --s: clamp(90px, 22vw, 112px);
  width: var(--s); height: var(--s);
  position: relative; display:flex; justify-content:center; align-items:center;
}

#cube-logo-root .svg-layer { position:absolute; inset:0; pointer-events:none; }

#cube-logo-root .bg-layer {
  z-index:1; transform-origin:50% 50%;
  transition: transform 1s cubic-bezier(0.15,0.85,0.35,1);
}
#cube-logo-root .bg-layer.glow-pulse { animation: clgGlowPulseAnim 0.8s ease forwards; }
@keyframes clgGlowPulseAnim {
  0% { filter: drop-shadow(0 0 0px rgba(0,139,255,0)); }
  50% { filter: drop-shadow(0 0 35px rgba(0,139,255,1)); }
  100% { filter: drop-shadow(0 0 0px rgba(0,139,255,0)); }
}
#cube-logo-root .bg-layer.super-flash { animation: clgSuperFlashAnim 0.8s ease forwards; }
@keyframes clgSuperFlashAnim {
  0% { filter: brightness(1) drop-shadow(0 0 0px #fff); }
  50% { filter: brightness(2.5) drop-shadow(0 0 50px #00d2ff); }
  100% { filter: brightness(1) drop-shadow(0 0 0px #fff); }
}
#cube-logo-root .bg-layer.prism-glow { animation: clgPrismGlowAnim 0.8s ease forwards; }
@keyframes clgPrismGlowAnim {
  0% { filter: hue-rotate(0deg) drop-shadow(0 0 0px #00d2ff); }
  50% { filter: hue-rotate(180deg) drop-shadow(0 0 45px #ff0077); }
  100% { filter: hue-rotate(360deg) drop-shadow(0 0 0px #00d2ff); }
}
#cube-logo-root .bg-layer.circular-hue { animation: clgCircularHueAnim 0.8s ease forwards; }
@keyframes clgCircularHueAnim {
  0% { filter: hue-rotate(0deg) scale(1); }
  50% { filter: hue-rotate(240deg) scale(1.12); }
  100% { filter: hue-rotate(360deg) scale(1); }
}
#cube-logo-root .bg-layer.laser-edge { animation: clgLaserEdgeAnim 0.8s ease forwards; }
@keyframes clgLaserEdgeAnim {
  0% { filter: drop-shadow(0 0 0px #00ff00); }
  50% { filter: drop-shadow(0 0 50px #00ff00) brightness(2); }
  100% { filter: drop-shadow(0 0 0px #00ff00); }
}

#cube-logo-root .fg-layer { z-index:3; }

#cube-logo-root .cube-area {
  position:absolute; inset:0; width:100%; height:100%; z-index:2;
  cursor:grab; perspective: calc(var(--s) * 2);
  clip-path: url(#clgRoundedCubeClip);
  transition: clip-path 0.35s ease;
  pointer-events:auto;
}
#cube-logo-root .cube-area:active { cursor:grabbing; }
#cube-logo-root .cube-area.spinning { clip-path:none; }

#cube-logo-root .cube {
  position:absolute; top:50%; left:50%;
  width: calc(var(--s) * 0.4008); height: calc(var(--s) * 0.4008);
  transform: translate(-50%,-50%);
}
#cube-logo-root .cube.zoom-pulse { animation: clgZoomPulseAnim 0.8s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgZoomPulseAnim {
  0% { transform: translate(-50%,-50%) scale(1); }
  50% { transform: translate(-50%,-50%) scale(1.18); }
  100% { transform: translate(-50%,-50%) scale(1); }
}
#cube-logo-root .cube.shake { animation: clgShakeAnim 0.6s ease forwards; }
@keyframes clgShakeAnim {
  0%,100% { transform: translate(-50%,-50%) translateX(0); }
  20%,60% { transform: translate(-50%,-50%) translateX(-12px); }
  40%,80% { transform: translate(-50%,-50%) translateX(12px); }
}
#cube-logo-root .cube.skew-elastic { animation: clgSkewElasticAnim 0.7s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgSkewElasticAnim {
  0% { transform: translate(-50%,-50%) skew(0deg,0deg) scale(1); }
  50% { transform: translate(-50%,-50%) skew(15deg,-10deg) scale(1.1); }
  100% { transform: translate(-50%,-50%) skew(0deg,0deg) scale(1); }
}
#cube-logo-root .cube.elastic-bounce { animation: clgElasticBounceAnim 0.8s cubic-bezier(0.68,-0.55,0.27,1.55) forwards; }
@keyframes clgElasticBounceAnim {
  0% { transform: translate(-50%,-50%) scale(1); }
  50% { transform: translate(-50%,-50%) scale(1.25); }
  100% { transform: translate(-50%,-50%) scale(1); }
}
#cube-logo-root .cube.glass-blur-wave { animation: clgGlassBlurWaveAnim 0.8s ease forwards; }
@keyframes clgGlassBlurWaveAnim {
  0% { transform: translate(-50%,-50%) scale(1); filter:brightness(1); }
  50% { transform: translate(-50%,-50%) scale(1.1); filter:brightness(1.6) drop-shadow(0 0 20px rgba(0,210,255,0.8)); }
  100% { transform: translate(-50%,-50%) scale(1); filter:brightness(1); }
}
#cube-logo-root .cube.border-pulse { animation: clgBorderPulseAnim 0.8s ease forwards; }
@keyframes clgBorderPulseAnim {
  0% { transform: translate(-50%,-50%) scale(1); box-shadow:0 0 0 rgba(0,139,255,0); }
  50% { transform: translate(-50%,-50%) scale(1.08); box-shadow:0 0 35px rgba(0,210,255,0.9); }
  100% { transform: translate(-50%,-50%) scale(1); box-shadow:0 0 0 rgba(0,139,255,0); }
}
#cube-logo-root .cube.perspective-tilt { animation: clgPerspectiveTiltAnim 0.8s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgPerspectiveTiltAnim {
  0% { transform: translate(-50%,-50%) perspective(500px) rotateX(0deg); }
  50% { transform: translate(-50%,-50%) perspective(500px) rotateX(45deg) scale(1.1); }
  100% { transform: translate(-50%,-50%) perspective(500px) rotateX(0deg); }
}
#cube-logo-root .cube.mega-mix { animation: clgMegaMixAnim 0.9s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgMegaMixAnim {
  0% { transform: translate(-50%,-50%) scale(1) rotate(0deg); }
  30% { transform: translate(-50%,-50%) scale(1.2) rotate(15deg); }
  70% { transform: translate(-50%,-50%) scale(0.9) rotate(-15deg); }
  100% { transform: translate(-50%,-50%) scale(1) rotate(0deg); }
}
#cube-logo-root .cube.fast-pulse { animation: clgFastPulseAnim 0.5s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgFastPulseAnim {
  0% { transform: translate(-50%,-50%) scale(1); }
  50% { transform: translate(-50%,-50%) scale(1.25); filter:contrast(1.5); }
  100% { transform: translate(-50%,-50%) scale(1); }
}
#cube-logo-root .cube.explode-snap { animation: clgExplodeSnapAnim 0.7s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgExplodeSnapAnim {
  0% { transform: translate(-50%,-50%) scale(1); }
  40% { transform: translate(-50%,-50%) scale(1.4); opacity:0.6; }
  100% { transform: translate(-50%,-50%) scale(1); opacity:1; }
}
#cube-logo-root .cube.magnetic-shift { animation: clgMagneticShiftAnim 0.8s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgMagneticShiftAnim {
  0% { transform: translate(-50%,-50%) translate(0,0) scale(1); }
  30% { transform: translate(-50%,-50%) translate(-25px,-15px) scale(1.12); }
  70% { transform: translate(-50%,-50%) translate(25px,15px) scale(1.12); }
  100% { transform: translate(-50%,-50%) translate(0,0) scale(1); }
}
#cube-logo-root .cube.cosmic-shake { animation: clgCosmicShakeAnim 0.7s ease forwards; }
@keyframes clgCosmicShakeAnim {
  0%,100% { transform: translate(-50%,-50%) rotate(0deg); filter: drop-shadow(0 0 0px #00d2ff); }
  25% { transform: translate(-50%,-50%) rotate(-8deg) scale(1.06); filter: drop-shadow(0 0 25px #ff0077); }
  75% { transform: translate(-50%,-50%) rotate(8deg) scale(1.06); filter: drop-shadow(0 0 25px #00ffcc); }
}
#cube-logo-root .cube.gradient-wave { animation: clgGradientWaveAnim 0.8s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgGradientWaveAnim {
  0% { transform: translate(-50%,-50%) scale(1) rotate(0deg); }
  50% { transform: translate(-50%,-50%) scale(1.15) rotate(10deg); filter: hue-rotate(90deg); }
  100% { transform: translate(-50%,-50%) scale(1) rotate(0deg); }
}
#cube-logo-root .cube.double-bounce { animation: clgDoubleBounceAnim 0.9s cubic-bezier(0.68,-0.55,0.27,1.55) forwards; }
@keyframes clgDoubleBounceAnim {
  0% { transform: translate(-50%,-50%) scale(1); }
  30% { transform: translate(-50%,-50%) scale(1.25) translateY(-20px); }
  60% { transform: translate(-50%,-50%) scale(0.95) translateY(10px); }
  100% { transform: translate(-50%,-50%) scale(1) translateY(0); }
}

#cube-logo-root .cube-rotator {
  position:absolute; inset:0; transform-style:preserve-3d;
  transform: rotateX(-35.264deg) rotateY(45deg);
}
#cube-logo-root .cube-rotator.spin { animation: clgRotateCube 1s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgRotateCube {
  0%   { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)); }
  100% { transform: rotateX(-35.264deg) rotateY(calc(var(--rotY,45deg) + (360deg * var(--spin-dir,1)))); }
}
#cube-logo-root .cube-rotator.vertical-flip { animation: clgVerticalFlipAnim 1s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgVerticalFlipAnim {
  0% { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)); }
  100% { transform: rotateX(calc(var(--rotX,-35.264deg) + 360deg)) rotateY(var(--rotY,45deg)); }
}
#cube-logo-root .cube-rotator.diagonal-spin { animation: clgDiagonalSpinAnim 1s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgDiagonalSpinAnim {
  0% { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)); }
  100% { transform: rotateX(calc(var(--rotX,-35.264deg) + 360deg)) rotateY(calc(var(--rotY,45deg) + 360deg)); }
}
#cube-logo-root .cube-rotator.z-axis-spin { animation: clgZAxisSpinAnim 1s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgZAxisSpinAnim {
  0% { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)) rotateZ(0deg); }
  100% { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)) rotateZ(360deg); }
}
#cube-logo-root .cube-rotator.full-axis-turn { animation: clgFullAxisTurnAnim 1s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgFullAxisTurnAnim {
  0% { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)); }
  100% { transform: rotateX(calc(var(--rotX,-35.264deg) + 360deg)) rotateY(calc(var(--rotY,45deg) + 360deg)) rotateZ(360deg); }
}
#cube-logo-root .cube-rotator.spiral-spin { animation: clgSpiralSpinAnim 1s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgSpiralSpinAnim {
  0% { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)) scale(1); }
  50% { transform: rotateX(calc(var(--rotX,-35.264deg) + 180deg)) rotateY(calc(var(--rotY,45deg) + 180deg)) scale(1.15); }
  100% { transform: rotateX(calc(var(--rotX,-35.264deg) + 360deg)) rotateY(calc(var(--rotY,45deg) + 360deg)) scale(1); }
}
#cube-logo-root .cube-rotator.flip-wave { animation: clgFlipWaveAnim 1s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgFlipWaveAnim {
  0% { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)) scale(1); }
  50% { transform: rotateX(calc(var(--rotX,-35.264deg) + 180deg)) rotateY(var(--rotY,45deg)) scale(1.2); }
  100% { transform: rotateX(calc(var(--rotX,-35.264deg) + 360deg)) rotateY(var(--rotY,45deg)) scale(1); }
}
#cube-logo-root .cube-rotator.elastic-jump { animation: clgElasticJumpAnim 1s cubic-bezier(0.68,-0.55,0.27,1.55) forwards; }
@keyframes clgElasticJumpAnim {
  0% { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)) translateY(0); }
  50% { transform: rotateX(calc(var(--rotX,-35.264deg) + 180deg)) rotateY(calc(var(--rotY,45deg) + 180deg)) translateY(-40px); }
  100% { transform: rotateX(calc(var(--rotX,-35.264deg) + 360deg)) rotateY(calc(var(--rotY,45deg) + 360deg)) translateY(0); }
}
#cube-logo-root .cube-rotator.counter-alt { animation: clgCounterAltAnim 1s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgCounterAltAnim {
  0% { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)); }
  50% { transform: rotateX(calc(var(--rotX,-35.264deg) - 180deg)) rotateY(calc(var(--rotY,45deg) + 180deg)); }
  100% { transform: rotateX(calc(var(--rotX,-35.264deg) - 360deg)) rotateY(calc(var(--rotY,45deg) + 360deg)); }
}
#cube-logo-root .cube-rotator.cubic-spiral { animation: clgCubicSpiralAnim 1s cubic-bezier(0.15,0.85,0.35,1) forwards; }
@keyframes clgCubicSpiralAnim {
  0% { transform: rotateX(var(--rotX,-35.264deg)) rotateY(var(--rotY,45deg)) scale(1); }
  50% { transform: rotateX(calc(var(--rotX,-35.264deg) + 360deg)) rotateY(calc(var(--rotY,45deg) - 180deg)) scale(1.2); }
  100% { transform: rotateX(calc(var(--rotX,-35.264deg) + 720deg)) rotateY(calc(var(--rotY,45deg) + 360deg)) scale(1); }
}

#cube-logo-root .cube-rotator > div { position:absolute; width:100%; height:100%; backface-visibility:visible; }
#cube-logo-root .cube-rotator .top    { transform: rotateX(90deg)   translateZ(calc(var(--s) * 0.2004)); }
#cube-logo-root .cube-rotator .bottom { transform: rotateX(-90deg)  translateZ(calc(var(--s) * 0.2004)); }
#cube-logo-root .cube-rotator .front  { transform: rotateY(0deg)    translateZ(calc(var(--s) * 0.2004)); }
#cube-logo-root .cube-rotator .back   { transform: rotateY(-180deg) translateZ(calc(var(--s) * 0.2004)); }
#cube-logo-root .cube-rotator .left   { transform: rotateY(-90deg)  translateZ(calc(var(--s) * 0.2004)); }
#cube-logo-root .cube-rotator .right  { transform: rotateY(90deg)   translateZ(calc(var(--s) * 0.2004)); }

#cube-logo-root .face-half { position:absolute; overflow:hidden; transition: background 0.4s ease, box-shadow 0.4s ease; }
#cube-logo-root .left-half { top:0; left:0; width:50%; height:100%; }
#cube-logo-root .right-half { top:0; left:50%; width:50%; height:100%; }

/* الزجاج المصنفر — يتبع ثيم التطبيق html[data-theme] */
#cube-logo-root .glass-frost {
  background: linear-gradient(135deg, #0d1b2a, #1b263b);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.95);
}
html[data-theme="light"] #cube-logo-root .glass-frost {
  background: linear-gradient(135deg, #eef4fb, #d8e6f6);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.95);
}
#cube-logo-root .cube-area.spinning .glass-frost {
  background: linear-gradient(135deg, rgba(13,27,42,0.65), rgba(27,38,59,0.65));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 15px rgba(255,255,255,0.15);
}
html[data-theme="light"] #cube-logo-root .cube-area.spinning .glass-frost {
  background: linear-gradient(135deg, rgba(238,244,251,0.65), rgba(216,230,246,0.65));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 15px rgba(1,64,136,0.18);
}

#cube-logo-root .poly-grad-1 {
  background: linear-gradient(0deg, #012b5c, #0b458d, #014088);
  background-size:200% 200%; animation: clgPolyRotate1 6s linear infinite;
}
@keyframes clgPolyRotate1 { 0%{background-position:0% 0%;} 50%{background-position:100% 100%;} 100%{background-position:0% 0%;} }
#cube-logo-root .poly-grad-2 {
  background: linear-gradient(0deg, #008BFF, #00d2ff, #0091ff);
  background-size:200% 200%; animation: clgPolyRotate2 5s linear infinite;
}
@keyframes clgPolyRotate2 { 0%{background-position:100% 100%;} 50%{background-position:0% 0%;} 100%{background-position:100% 100%;} }
#cube-logo-root .poly-grad-3 {
  background: linear-gradient(0deg, #014088, #0091ff, #0055ff);
  background-size:200% 200%; animation: clgPolyRotate3 7s linear infinite;
}
@keyframes clgPolyRotate3 { 0%{background-position:0% 0%;} 50%{background-position:100% 100%;} 100%{background-position:0% 0%;} }

#cube-logo-root .cube-outline-group {
  opacity:1; transform-origin:500px 500px; transform:scale(1.09);
  transition: opacity 0.35s ease;
}
#cube-logo-root .cube-outline-group.hidden { opacity:0; }
/* ═══════════════ نهاية §P46 ═══════════════ */
