/* ============================================================================
   منصة مداد — أنماط شاشات الهوية (الدخول · إنشاء الحساب · استعادة كلمة المرور)
   ----------------------------------------------------------------------------
   هذه الشاشات وحدها خارج الهيكل (shell): لا قائمة جانبية ولا شريط علوي، لأن
   من يفتحها لم تُعرف بوابته بعد. فكانت أنماطها مكرّرة داخل login.html، وجُمعت
   هنا ليشترك فيها الدخول والتسجيل — فتعديل البطاقة يقع في ملف واحد.
   ============================================================================ */

/* الخلفية: تدرّجان دائريان بلون الهوية عند زاويتين متقابلتين، فوق أرضية فاتحة */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(14,74,107,.10), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(14,74,107,.08), transparent 55%),
    var(--bg-subtle, #f4f7fb);
}

.auth-card {
  width: 100%; max-width: 410px; background: var(--bg-surface, #fff);
  border: 1px solid var(--border, #e3e9f0); border-radius: 18px;
  padding: 34px 30px; box-shadow: 0 18px 50px rgba(14,74,107,.12);
}
/* بطاقة التسجيل أعرض قليلًا: تحمل حقلًا إضافيًا وقائمة الجهات */
.auth-card--wide { max-width: 470px; }   /* غير مستعملة حاليًا — تُبقى لبطاقة أعرض عند الحاجة */

.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand img { height: 58px; margin-bottom: 14px; }
.auth-brand h1 { font-size: 24px; color: var(--brand, #0E4A6B); margin: 0 0 4px; font-weight: 800; }
.auth-brand p  { color: var(--text-muted, #7A93B0); font-size: 13px; margin: 0; }

.auth-card .field { margin-bottom: 16px; }

/* البريد وكلمة المرور لاتينيّان: نفرض الاتجاه والخط اللاتيني حتى لا يحوّل
   المتصفح الأرقام إلى هندية ولا يقلب ترتيب النص. */
.auth-latin {
  direction: ltr; text-align: left; height: 46px; font-size: 15px; letter-spacing: .3px;
  font-family: var(--font-latin);
  font-feature-settings: 'locl' 0;
}

/* زرّ إظهار/إخفاء كلمة المرور — يُضاف بجافاسكربت (password-toggle.js) بلفّ
   الحقل بهذا العنصر. الحقل لاتينيّ الاتجاه دومًا، فطرف الزرّ الثابت يمين
   الصندوق بصريًّا (نهاية النص) بصرف النظر عن اتجاه الصفحة نفسها. */
.field__pass-wrap { position: relative; }
.field__pass-input { padding-left: 12px; padding-right: 40px; }
.field__pass-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: grid; place-items: center; width: 32px; height: 32px;
  border: none; background: transparent; border-radius: var(--radius-md, 8px);
  color: var(--text-muted, #7A93B0); cursor: pointer; padding: 0;
}
.field__pass-toggle:hover { color: var(--text-secondary, #4A5A6E); background: var(--bg-subtle, #f4f7fb); }
.field__pass-toggle:focus-visible { outline: 2px solid var(--brand, #0E4A6B); outline-offset: 1px; }

.auth-btn   { width: 100%; margin-top: 6px; }
.auth-error { color: #C22929; font-size: 13px; margin-top: 14px; text-align: center; min-height: 18px; line-height: 1.6; }
.auth-hint  { color: var(--text-muted, #7A93B0); font-size: 12px; text-align: center; margin-top: 18px; line-height: 1.7; }
.auth-hint a { color: var(--brand, #0E4A6B); font-weight: 600; }

/* فاصل بنصّ في وسطه — بين نموذج الدخول ورابط إنشاء الحساب */
.auth-sep {
  display: flex; align-items: center; gap: 10px; margin: 20px 0 4px;
  color: var(--text-muted, #7A93B0); font-size: 12px;
}
.auth-sep::before, .auth-sep::after {
  content: ''; flex: 1; height: 1px; background: var(--border, #e3e9f0);
}

/* باب الموظفين: أرضية أعمق قليلًا تميّزه بلمحة عن باب الجهات، فمن فتح
   الرابط الخطأ يلحظ اختلاف المكان قبل أن يكتب بياناته. لا لون جديد — نفس
   لون الهوية بكثافة أعلى. */
.auth-wrap--staff {
  background:
    radial-gradient(1100px 480px at 15% -10%, rgba(14,74,107,.16), transparent 60%),
    radial-gradient(900px 520px at 95% 110%, rgba(14,74,107,.12), transparent 58%),
    var(--bg-subtle, #eef3f8);
}

/* رابط الباب الآخر — أخفت من بقية الروابط لأنه مخرج لا دعوة */
.auth-staff-link {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border, #e3e9f0);
  font-size: 12px;
}
.auth-staff-link a { color: var(--text-muted, #7A93B0); font-weight: 600; }
.auth-staff-link a:hover { color: var(--brand, #0E4A6B); }

/* لوحة النجاح — تحلّ محل النموذج بعد إنشاء الحساب، ولا تعيده:
   الحساب أُنشئ فعلًا، وإعادة إظهار النموذج تُغري بمحاولة ثانية تفشل. */
.auth-done { text-align: center; }
.auth-done__icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(31,138,90,.10); color: #1F8A5A;
}
.auth-done h2 { font-size: 19px; margin: 0 0 10px; color: var(--brand, #0E4A6B); }
.auth-done p  { font-size: 13.5px; line-height: 1.85; color: var(--text-body, #43566b); margin: 0 0 8px; }
.auth-done .auth-mail {
  direction: ltr; display: inline-block; font-weight: 700;
  font-family: var(--font-latin);
}

/* صندوق ملاحظة داخل البطاقة — تنبيه «أكّد بريدك» وما شابهه */
.auth-note {
  background: var(--bg-subtle, #f4f7fb); border: 1px solid var(--border, #e3e9f0);
  border-radius: 12px; padding: 13px 15px; font-size: 12.5px; line-height: 1.8;
  color: var(--text-body, #43566b); margin-top: 16px;
}
.auth-note--warn { background: rgba(214,158,46,.08); border-color: rgba(214,158,46,.35); }
.auth-note button {
  border: 0; background: none; padding: 0; font: inherit; font-weight: 700;
  color: var(--brand, #0E4A6B); cursor: pointer; text-decoration: underline;
}

/* إظهار/إخفاء كلمة المرور (password-toggle.js) */
.pw-field { position: relative; display: block; }
.pw-field .input { width: 100%; padding-inline-end: 4.25rem; }
.pw-toggle {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; padding: 4px 6px; cursor: pointer;
  font: inherit; font-size: .8rem; font-weight: 700; line-height: 1;
  color: var(--brand, #0E4A6B); border-radius: 6px;
}
.pw-toggle:hover { background: rgba(14,74,107,.08); }
