/* ⚠️ **أعلام الدول لا تظهر على ويندوز بلا خطّ**: نظام التشغيل لا يحمل رسومها،
   فـ🇪🇬 تُعرض حرفين «EG». واسم نظامٍ فيه علمٌ يقرؤه الزائر مشوَّهًا.
   فيُحمَّل خطّ الأعلام، ويوضع **آخر مكدّس الخطوط** فلا يُطلب إلّا حين يعوز
   المتصفّحَ محرفٌ لا تملكه خطوط النصّ — أي عند الإيموجي وحده. (2026-09-25) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap');

/* ==========================================================================
   طيف (tayf) — نظام التصميم (Design Tokens)
   ==========================================================================
   كل الألوان والخطوط والمسافات المستخدمة في الموقع معرّفة هنا كمتغيرات CSS.
   الفكرة: لو المبرمج أو المصمم احتاج يغيّر اللون الأساسي أو الخط، يغيّره من
   مكان واحد بس هنا، وينعكس التغيير على كل صفحات الموقع تلقائيًا.

   مصدر اللون الذهبي: تم استخراجه مباشرة من ملف الشعار الرسمي
   (assets/logo/tayf-logo-source.svg) بالكود اللوني #F8CB25.
   ========================================================================== */

:root {
  /* -------------------- الهوية / الألوان الأساسية -------------------- */
  --color-primary: #f8cb25; /* الذهبي — لون الشعار الأساسي */
  --color-primary-600: #dcae0a; /* درجة أغمق — تُستخدم في hover/active */
  --color-primary-700: #b78d04; /* أغمق للنصوص فوق خلفية فاتحة (تباين أفضل) */
  --color-primary-100: #fdf3d2; /* خلفية فاتحة جدًا لشارات/تمييز بسيط */

  /* اللون الأزرق — خلفية قسم الـ Hero (نفس لون خلفية صورة محاكاة الجوال assets/logo/tayf-mobile.png
     حتى تندمج الصورة مع خلفية القسم بدون أي حدود ظاهرة) */
  --color-brand-blue: #3164f5;

  /* -------------------- الخلفيات الداكنة (Hero / الأقسام الغامقة / الفوتر) -------------------- */
  --color-ink-900: #0e0e14; /* الأغمق — الفوتر */
  --color-ink-800: #14141c; /* الأساسي — خلفية الهيدر/الأقسام الداكنة */
  --color-ink-700: #1e2029; /* خلفية بطاقات فوق قسم داكن */
  --color-ink-600: #2a2c38; /* حدود/فواصل فوق خلفية داكنة */

  /* -------------------- الحياد (نصوص وخلفيات فاتحة) -------------------- */
  --color-white: #ffffff;
  --color-gray-900: #333333; /* نص أساسي */
  --color-gray-700: #55565c;
  --color-gray-500: #afafaf; /* نص ثانوي / وصفي */
  --color-gray-300: #e0e0e0; /* حدود */
  --color-gray-100: #f4f4f4; /* خلفية بديلة فاتحة (بدل الأبيض) */
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fb;

  /* -------------------- ألوان دلالية -------------------- */
  --color-success: #2fae60;
  --color-danger: #e11a2c;
  --color-warning: #f59e0b; /* برتقالي — حالات "قيد الانتظار/التحضير" بلوحات التحكم */
  --color-info: #0ea5b0; /* تركوازي — حالات إعلامية محايدة بلوحات التحكم */

  /* -------------------- الخطوط -------------------- */
  --font-primary: "Tajawal", "Tahoma", "Arial", sans-serif, "Noto Color Emoji";

  /* -------------------- المسافات (Spacing Scale) -------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* -------------------- الانحناءات والظلال -------------------- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 2px 8px rgba(20, 20, 28, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 20, 28, 0.1);
  --shadow-lg: 0 20px 48px rgba(20, 20, 28, 0.16);
  --shadow-gold: 0 12px 28px rgba(248, 203, 37, 0.35);

  /* -------------------- التخطيط -------------------- */
  --container-width: 1200px;
  --header-height: 76px;

  /* -------------------- الانتقالات -------------------- */
  --transition-fast: 0.18s ease;
  --transition-base: 0.28s ease;
}
/* ============================================================================
   طيف (tayf) — شاشات الدخول والتسجيل ونسيت كلمة السر (Auth Screens)
   ============================================================================
   ملف منفصل عن main.css عمدًا: شاشات المصادقة (login/register/forgot-password)
   لها هوية بصرية مختلفة عن باقي الموقع (لا يوجد فيها Sidebar ولا Topbar ولا
   Footer — فقط شاشة مقسومة نصفين + زرّي هوم/لغة ثابتين، بنفس تصميم شاشة
   التسجيل الفعلية في tayf.ae). الخط Tajawal — نفس خط باقي الموقع بالضبط
   (قرار نهائي: لا يتغيّر بأي شاشة حالية أو مستقبلية بهذا المشروع).
   ============================================================================ */

* ,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-primary);
  font-family: var(--font-primary);
  color: var(--color-ink-900);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* -------------------------- زرّا الهوم/اللغة الثابتان -------------------------- */
.auth-fixed-actions {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 100;
}

.auth-fixed-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-brand-blue);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast);
}

.auth-fixed-btn:hover {
  transform: translateY(-2px);
}

.auth-fixed-btn svg {
  width: 20px;
  height: 20px;
}

/* -------------------------------- الشاشة المقسومة --------------------------------
   على الجوال: عمود واحد — لوحة الصورة أولًا (شريط علوي بارتفاع محدود) ثم لوحة
   النموذج تحتها. من 900px فأكثر: صف كامل الارتفاع (لوحة نموذج + لوحة صورة
   جنبًا إلى جنب)، بنفس تقسيم الشاشة الفعلية في tayf.ae. */
.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.auth-form-panel {
  order: 2;
  width: 100%;
  background: var(--color-primary);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 20px 40px;
}

.auth-form-card {
  width: 100%;
  max-width: 420px;
}

/* شارة صغيرة فوق العنوان — تُستخدم بشاشات لوحة الأدمن لتمييزها ("لوحة الإدارة") */
.auth-eyebrow {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-ink-900);
  background: rgba(20, 20, 28, 0.08);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  width: fit-content;
  margin: 0 auto var(--space-4);
  letter-spacing: 0.3px;
}

.auth-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  text-align: center;
  color: rgba(20, 20, 28, 0.65);
  margin-bottom: var(--space-6);
  font-size: 0.92rem;
}

/* -------------------------------- الحقول -------------------------------- */
.auth-form-group {
  margin-bottom: var(--space-5);
  text-align: center;
}

.auth-label {
  display: block;
  text-align: center;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.auth-input,
.auth-select {
  width: 100%;
  text-align: center;
  border: 2px solid rgba(20, 20, 28, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-white);
  color: var(--color-ink-900);
  transition: border-color var(--transition-fast);
}

.auth-input:focus,
.auth-select:focus {
  outline: none;
  border-color: var(--color-brand-blue);
}

.auth-input::placeholder {
  color: var(--color-gray-500);
  text-align: center;
}

/* -------------------------------- حقل رقم الهاتف (واتساب) --------------------------------
   طريقة موحّدة لكل حقول رقم الهاتف بالمشروع: مفتاح الدولة الدولي ثابت في
   أقصى يسار الحقل (بغض النظر عن اتجاه الصفحة، لأن أرقام الهاتف بيانات LTR
   دائمًا)، ثم إدخال الرقم بعده من اليسار لليمين. */
.phone-input-group {
  display: flex;
  align-items: stretch;
  direction: ltr;
  border: 2px solid rgba(20, 20, 28, 0.15);
  border-radius: var(--radius-md);
  background: var(--color-white);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.phone-input-group:focus-within {
  border-color: var(--color-brand-blue);
}

.phone-code-select {
  border: none;
  border-inline-end: 2px solid rgba(20, 20, 28, 0.15);
  background: var(--color-bg-alt);
  padding: 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--color-ink-900);
  flex-shrink: 0;
}

.phone-code-select:focus {
  outline: none;
}

.phone-number-input {
  flex: 1;
  min-width: 0;
  direction: ltr;
  text-align: left;
  border: none;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  color: var(--color-ink-900);
}

.phone-number-input:focus {
  outline: none;
}

.phone-number-input::placeholder {
  color: var(--color-gray-500);
}

/* -------------------------------- الأزرار والروابط -------------------------------- */
.auth-btn {
  width: 100%;
  background: var(--color-brand-blue);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(49, 100, 245, 0.3);
}

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

.auth-link-row {
  text-align: center;
  margin-top: var(--space-5);
  font-size: 0.9rem;
  color: rgba(20, 20, 28, 0.75);
}

.auth-link-row a {
  color: var(--color-brand-blue);
  font-weight: 700;
}

.auth-link-row a:hover {
  text-decoration: underline;
}

.auth-forgot-link {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-brand-blue);
  margin-top: -8px;
  margin-bottom: var(--space-6);
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

/* -------------------------------- إقرار الشروط (التسجيل) -------------------------------- */
.auth-checkbox-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(20, 20, 28, 0.75);
  margin-bottom: var(--space-6);
}

.auth-checkbox-row input {
  margin-top: 3px;
  accent-color: var(--color-brand-blue);
  flex-shrink: 0;
}

.auth-checkbox-row a {
  color: var(--color-brand-blue);
  font-weight: 700;
}

.auth-checkbox-row a:hover {
  text-decoration: underline;
}

/* -------------------------------- لوحة الصورة --------------------------------
   على الجوال: شريط علوي بارتفاع ثابت (220px). من 900px فأكثر: تأخذ باقي
   عرض الشاشة بكامل الارتفاع، جنب لوحة النموذج. */
.auth-image-panel {
  order: 1;
  position: relative;
  overflow: hidden;
  height: 220px;
  flex-shrink: 0;
}

.auth-image-panel img.auth-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

/* الأيقونة والشعار بجانب النص أفقيًا (وليس فوقه) — نفس ترتيب الشاشة الفعلية */
.auth-image-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  text-align: start;
  padding: var(--space-5);
}

.auth-image-content img {
  width: 130px;
  flex-shrink: 0;
}

.auth-image-tagline {
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 700;
  max-width: 220px;
}

@media (min-width: 900px) {
  .auth-page {
    flex-direction: row;
  }

  .auth-form-panel {
    order: 0;
    width: 42%;
    min-width: 420px;
    min-height: 100vh;
    align-items: center;
    padding: 64px 24px;
  }

  .auth-image-panel {
    order: 0;
    flex: 1;
    height: auto;
    min-height: 100vh;
  }

  .auth-image-content {
    gap: var(--space-4);
  }

  .auth-image-content img {
    width: 190px;
  }

  .auth-image-tagline {
    font-size: 1.2rem;
    max-width: 260px;
  }
}

/* -------------------------------- خطوات متعددة (نسيت كلمة السر) -------------------------------- */
.auth-step {
  display: none;
}

.auth-step.active {
  display: block;
}

.auth-step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.auth-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(20, 20, 28, 0.12);
  color: var(--color-ink-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.auth-step-dot.active,
.auth-step-dot.done {
  background: var(--color-ink-900);
  color: var(--color-primary);
}

.auth-step-line {
  width: 28px;
  height: 2px;
  background: rgba(20, 20, 28, 0.15);
  flex-shrink: 0;
}

/* -------------------------------- حقول رمز التحقق (OTP) -------------------------------- */
.otp-group-title {
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: var(--space-2);
}

.otp-group-desc {
  text-align: center;
  color: rgba(20, 20, 28, 0.6);
  font-size: 0.85rem;
  margin-bottom: var(--space-3);
}

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  direction: ltr;
  margin-bottom: var(--space-6);
}

.otp-input {
  width: 52px;
  height: 52px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  border: 2px solid rgba(20, 20, 28, 0.15);
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-family: inherit;
}

.otp-input:focus {
  outline: none;
  border-color: var(--color-brand-blue);
}

.auth-resend {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(20, 20, 28, 0.6);
  margin-top: var(--space-4);
}

.auth-resend button {
  background: none;
  border: none;
  color: var(--color-brand-blue);
  font-weight: 700;
  padding: 0;
}

.auth-resend button:disabled {
  color: rgba(20, 20, 28, 0.4);
  cursor: not-allowed;
}

/* -------------------------------- شاشة النجاح -------------------------------- */
.auth-success {
  text-align: center;
}

.auth-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(47, 174, 96, 0.12);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
}

.auth-success-icon svg {
  width: 30px;
  height: 30px;
}

@media (max-width: 480px) {
  .auth-form-panel {
    padding: 24px 16px 32px;
  }

  .otp-input {
    width: 44px;
    height: 44px;
  }

  .auth-fixed-actions {
    top: 14px;
    right: 14px;
  }

  .auth-fixed-btn {
    width: 42px;
    height: 42px;
  }
}

.auth-alert,
.t-note { padding: 12px 16px; border-radius: 10px; font-size: .88rem; margin-bottom: 16px; text-align: center; }
.t-note--ok { background: #e7f6ee; color: #125c38; }
.t-note--bad { background: #fdeaea; color: #7f1616; }
.auth-step-back { display: block; width: 100%; margin-top: 12px; background: none; border: none; color: var(--color-brand-blue); font-weight: 700; font-size: .9rem; }
