/* إعدادات الصفحة العامة والخطوط */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f5f7;
    color: #212529;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.split-screen {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* --- النصف الأيمن: مساحة (Canvas) تحتضن بطاقة تسجيل الدخول المرتفعة ---
   عرض مرن بحدين أدنى/أقصى (clamp) بدل نسبة مئوية ثابتة، لضمان بقاء البطاقة
   بعرض مريح للقراءة على كل أحجام الشاشات المكتبية دون أن تتمدد أو تنكمش
   بشكل غير متناسق. */
.right-side {
    flex: 0 0 clamp(400px, 32vw, 480px);
    background: linear-gradient(180deg, #fcfcfd 0%, #f4f5f7 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    z-index: 2;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.login-box {
    width: 100%;
    max-width: 320px;
    text-align: right;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 48px -16px rgba(15, 23, 42, 0.14);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    opacity: 1;
    animation: loginBoxEnter 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
}

/* ⚠️ نقطة دقيقة اكتُشفت أثناء اختبار بصري للتصميم قبل التسليم: بمجرد أن
   ينتهي أنيميشن الدخول loginBoxEnter، يضيف script.js الكلاس .settled أدناه
   (استماعاً لحدث animationend/animationcancel) ليُلغي خاصية animation عن
   البطاقة نهائياً. هذا ضروري تحديداً بسبب سلوك خفي بمواصفات CSS: عند إضافة
   .shake لاحقاً (فتُستبدل خاصية animation بالكامل بأنيميشن مختلف الاسم)، ثم
   إزالة .shake بعد انتهائه (فتعود خاصية animation لقيمة loginBoxEnter نفسها
   التي كانت عليها قبل ذلك) — المتصفح لا "يستأنف" الأنيميشن القديم بل
   يُعيد تشغيله من الصفر (تأخير 0.15s + مدة 0.7s كاملة)، فتختفي البطاقة
   مؤقتاً (retroactively) في كل مرة يُعرض فيها خطأ تسجيل دخول لاحق! بوجود
   .settled (نفس درجة التخصيص 0-2-0 مثل .shake، لكنه مُعرَّف أولاً بالترتيب
   بالملف فيخسر التعادل أمام .shake حين يجتمعان، ويسود وحده حين يُزال .shake)
   لا تُستبدل قيمة animation بعد أول تشغيل إلا بأنيميشن الاهتزاز نفسه فقط —
   فلا فرصة لإعادة تشغيل loginBoxEnter مطلقاً بعد اكتمال ظهور البطاقة أول مرة. */
.login-box.settled {
    animation: none;
}

/* اهتزاز خفيف تنبيهي عند فشل تسجيل الدخول (يُفعَّل عبر إضافة الكلاس .shake من script.js)
   — مُعرَّف بعد .settled أعلاه عمداً: نفس درجة التخصيص (0-2-0)، فيسود هذا
   التعريف (الأحدث بترتيب الملف) حين يجتمع .settled و.shake معاً على العنصر. */
.login-box.shake {
    animation: loginBoxShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.left-side {
    flex: 1 1 auto;
    min-width: 0;
    background: linear-gradient(155deg, #14161c 0%, #1f2430 45%, #171a22 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 100vh;
}

/* --- خلفية متحركة: فقاعات ضوئية ناعمة (Ambient Blobs) خلف القسم الترويجي --- */
.bg-blobs {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    will-change: transform;
}

.blob-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.55), transparent 70%);
    top: -10%;
    inset-inline-start: -8%;
    animation: blobFloat1 16s ease-in-out infinite alternate;
}

.blob-2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle at 60% 40%, rgba(99, 102, 241, 0.35), transparent 70%);
    bottom: -12%;
    inset-inline-end: -6%;
    animation: blobFloat2 20s ease-in-out infinite alternate;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.28), transparent 70%);
    top: 40%;
    inset-inline-start: 38%;
    animation: blobFloat3 24s ease-in-out infinite alternate;
}

/* شبكة نقطية خفيفة جداً لإضافة عمق بصري دون تشتيت الانتباه */
.left-side::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0.5;
}

.promo-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 560px;
    opacity: 1;
    animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s backwards;
}

.promo-logo {
    width: 88px;
    height: auto;
    margin-bottom: 6px;
    filter: drop-shadow(0 8px 20px rgba(212, 175, 55, 0.35));
    animation: logoFloat 5s ease-in-out infinite;
}

.promo-content h2 {
    color: #f5efe0;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
}

.promo-content p {
    color: #b9bfcc;
    font-size: 16px;
    line-height: 1.9;
    max-width: 460px;
    margin: 0;
}

.promo-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 16px 26px;
    border-radius: 12px;
    color: #e9d9a4;
    font-size: 14px;
    line-height: 1.8;
    width: 100%;
    max-width: 460px;
    margin-top: 6px;
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.promo-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.55);
    background: rgba(255, 255, 255, 0.09);
}

/* --- شريط مزايا مختصر: ثلاث نقاط قوة سريعة أسفل الفقرة الترويجية --- */
.feature-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 600;
    color: #d7dce6;
    transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
}

.feature-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.feature-chip .feature-chip-icon {
    font-size: 14px;
    line-height: 1;
}

.logo-section {
    text-align: center;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.logo-section img {
    width: 62px;
    margin-bottom: 14px;
    display: inline-block;
    animation: logoFloat 5s ease-in-out infinite;
}

.system-title {
    color: #1a1d24;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.system-subtitle {
    color: #6c757d;
    font-size: 13px;
}

/* --- رسالة خطأ تسجيل الدخول (بديل أنيق لنافذة alert التقليدية) --- */
.login-error-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.7;
    margin-bottom: 18px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    margin-bottom: 0;
    transform: translateY(-6px);
    transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease,
                padding 0.35s ease, margin 0.35s ease, border-width 0.35s ease;
}

.login-error-box.show {
    max-height: 140px;
    opacity: 1;
    transform: translateY(0);
    padding: 12px 14px;
    margin-bottom: 18px;
    border-width: 1px;
}

.login-error-icon {
    flex-shrink: 0;
    font-size: 15px;
    line-height: 1;
    margin-top: 1px;
}

.form-group {
    margin-bottom: 18px;
}

/* تنسيق خاص لحاويتي البريد وكلمة المرور لضبط تموضع أيقونات الحقول بالداخل */
.input-icon-container {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #495057;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    background-color: #f8f9fa;
    border: 1.5px solid #e2e6ea;
    border-radius: 10px;
    padding: 12px 14px;
    color: #212529;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, transform 0.15s ease;
}

/* ⚙️ حشو منطقي (Logical Properties) بدل left/right صريحين: padding-inline-start
   يقابل يمين الحقل تلقائياً بالعربية (RTL) ويسار الحقل تلقائياً بالإنجليزية
   (LTR) دون الحاجة لأي قاعدة [dir="ltr"] منفصلة تُكرر نفس المنطق. تفريغ
   مساحة لأيقونة الحقل (بريد/قفل) في الجهة البادئة، ولزر العين في الجهة
   الختامية لحقل كلمة المرور تحديداً. */
.input-icon-container input {
    padding-inline-start: 42px;
}

#password {
    padding-inline-end: 42px;
}

.form-group input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.14);
    background-color: #ffffff;
    transform: translateY(-1px);
}

/* أيقونة ثابتة (بريد/قفل) في الجهة البادئة من الحقل — عنصر بصري بحت لا يتفاعل مع النقر
   ⚠️ .input-icon-container يحتضن هنا حقل الإدخال فقط (بدون التسمية label التي
   انتقلت لتصبح شقيقة له خارج الحاوية، لا ابناً لها) — لذا التموضع الرأسي
   للأيقونة يُحسب بالنسبة لمنتصف الحقل نفسه تحديداً (top:50% + انزياح -50%
   عبر transform)، لا بإزاحة بالبكسل ثابتة مبنية على افتراض وجود تسمية فوقه
   داخل نفس الحاوية (وهو افتراض خاطئ هنا وتسبب بظهور الأيقونة أسفل الحقل
   فعلياً بدل توسطها رأسياً — عولج أثناء المراجعة البصرية قبل التسليم). */
.input-leading-icon {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #94a3b8;
    transition: color 0.25s ease;
}

/* ⚙️ أيقونة القفل (البادئة) وأيقونة العين (الختامية بحقل كلمة المرور) كانتا
   بمقاسين ولون وسُمك خط مختلفين فبدَتا غير متناسقتين بصرياً رغم وجودهما
   بنفس الحقل — تُوحَّد أبعادهما (18px) ولونهما الأساسي هنا صراحةً حتى تبقيا
   متطابقتين دائماً مهما تغيّر سُمك الخط (stroke-width) داخل كل SVG بالـHTML. */
.input-leading-icon svg,
.password-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.input-icon-container input:focus ~ .input-leading-icon,
.input-icon-container:focus-within .input-leading-icon {
    color: #d4af37;
}

/* زر العين المتناسق والشفاف الاحترافي — الجهة الختامية من الحقل (منطقياً) */
.password-toggle-btn {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%); /* ضبط التمركز لتتوسط الصندوق عمودياً بالنسبة لارتفاع الحقل نفسه */
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* لون أيقونة الـ SVG وتأثير تمرير الفأرة — نفس اللون الأساسي لأيقونة القفل المجاورة تماماً */
.password-toggle-btn svg {
    color: #94a3b8;
    transition: color 0.2s, transform 0.1s;
}

.password-toggle-btn:hover svg {
    color: #d4af37;
}

.password-toggle-btn:active svg {
    transform: scale(0.9); /* تأثير ارتداد بسيط جداً وممتع عند النقر الكليك */
}

.forgot-password-container {
    text-align: right;
    margin-top: -12px;
    margin-bottom: 20px;
}

.forgot-password-link {
    color: #d4af37;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: #baa232;
    text-decoration: underline;
}

/* --- زر تسجيل الدخول: تأثير لمعان (Shine Sweep) عند تمرير الفأرة + ضغطة نابضة --- */
.btn-login {
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: #d4af37;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.12s ease, box-shadow 0.3s ease;
    margin-bottom: 15px;
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.28);
}

.btn-login::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 48%, transparent 65%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.btn-login:hover::before {
    transform: translateX(120%);
}

.btn-login:hover {
    background-color: #c39f2e;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.36);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:disabled {
    cursor: default;
    opacity: 0.85;
    transform: none;
}

.btn-lang {
    width: 100%;
    background-color: transparent;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 9px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-lang:hover {
    background-color: #f1f3f5;
    border-color: #ced4da;
}

@media (max-width: 1100px) {
    .split-screen {
        flex-direction: column-reverse;
        min-height: auto;
    }
    .right-side {
        flex-basis: auto;
        width: 100%;
        padding: 40px 20px;
    }
    .left-side {
        width: 100%;
        padding: 60px 20px 40px;
        height: auto;
        min-height: 320px;
    }
    .login-box {
        max-width: 380px;
    }
}

/* ضبط موضع زر العين بشكل ديناميكي حسب اتجاه الصفحة */
/* تنسيقات خاصة باللغة الإنجليزية والاتجاه من اليسار إلى اليمين */
[dir="ltr"] {
    text-align: left;
}

/* محاذاة العناوين وتسميات الحقول جهة اليسار */
[dir="ltr"] .system-title,
[dir="ltr"] .system-subtitle,
[dir="ltr"] .form-group label {
    text-align: left;
}

/* ضبط اتجاه الكتابة وتلميحات الحقول (Placeholders) */
[dir="ltr"] .form-group input {
    text-align: left;
    direction: ltr;
}

/* ملاحظة: موضع زر العين وأيقونات الحقول لم يعودا بحاجة لقواعد [dir="ltr"]
   منفصلة — تُستخدم الآن خصائص CSS المنطقية (inset-inline-start/end,
   padding-inline-start/end) في القواعد الأساسية أعلاه، فتنعكس تلقائياً مع
   تغيّر اتجاه الصفحة دون أي تكرار للمنطق هنا. */

/* --- UNIVERSAL RESET FOR THE LINK CONTAINER --- */
.forgot-password-container {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    margin-bottom: 20px;
}

/* --- ARABIC: FORCE ALIGN RIGHT --- */
[dir="rtl"] .forgot-password-container {
    text-align: right !important;
}
[dir="rtl"] .forgot-password-link {
    float: none !important;
    text-align: right !important;
}

/* --- ENGLISH: FORCE ALIGN LEFT --- */
[dir="ltr"] .forgot-password-container {
    text-align: left !important; /* Forces the box contents to align left */
}
[dir="ltr"] .forgot-password-link {
    display: inline-block !important;
    text-align: left !important;  /* Forces the text string inside to point left */
    margin-right: auto !important;
    margin-left: 0px !important;
}

/* ==========================================================================
   🔄 شاشة التحميل الأولية (Page Loader) — تظهر عند فتح صفحة تسجيل الدخول
   ========================================================================== */
.page-loader {
    position: fixed;
    inset: 0;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease, background-color 0.3s ease;
}

.page-loader.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-ring {
    position: absolute;
    width: 96px;
    height: 96px;
    border: 3px solid #f1f3f5;
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: loaderSpin 0.9s linear infinite;
}

.loader-logo {
    width: 46px;
    height: auto;
    object-fit: contain;
    animation: loaderPulse 1.4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(0.9); opacity: 0.75; }
}

/* ==========================================================================
   🎬 أنيميشن الدخول التدريجي لعناصر الصفحة (Entrance Animations)
   ========================================================================== */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes loginBoxEnter {
    from { opacity: 0; transform: translateY(16px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes loginBoxShake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes blobFloat1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(6%, 8%) scale(1.12); }
}

@keyframes blobFloat2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-8%, -6%) scale(1.08); }
}

@keyframes blobFloat3 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-4%, 10%) scale(1.15); }
}

/* --- مؤشر التحميل الصغير داخل زر تسجيل الدخول أثناء المصادقة --- */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: loaderSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    .page-loader,
    .loader-ring,
    .loader-logo,
    .btn-spinner,
    .login-box,
    .promo-content,
    .promo-logo,
    .logo-section img,
    .blob,
    .btn-login::before {
        animation: none !important;
        transition: none !important;
    }
    .login-box, .promo-content {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   🌓 شريط التحكم العلوي: تبديل اللغة (Switch) + تبديل الوضع الليلي/النهاري
   ========================================================================== */
.top-page-bar {
    position: fixed;
    top: 20px;
    inset-inline-end: 20px;
    z-index: 6000;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 1;
    animation: fadeSlideUp 0.6s ease 0.5s backwards;
}

/* مفتاح تبديل اللغة على هيئة Switch حقيقي بدل الزر النصي القديم */
.lang-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.lang-switch-wrapper:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

.lang-switch-label {
    font-size: 11px;
    font-weight: 700;
    color: #adb5bd;
    transition: color 0.2s ease;
}

.lang-switch-label.active {
    color: #d4af37;
}

.lang-switch-track {
    position: relative;
    width: 34px;
    height: 18px;
    background-color: #e9ecef;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.lang-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background-color: #d4af37;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* عند التبديل للغة الإنجليزية تنتقل الكرة لليمين داخل المسار */
.lang-switch-wrapper[data-lang="en"] .lang-switch-thumb {
    transform: translateX(16px);
}

/* زر تبديل الوضع الليلي/النهاري بشكل أيقونة دائرية أنيقة */
.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    transform: scale(1.06) rotate(12deg);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    color: #d4af37;
}

@media (max-width: 1100px) {
    .top-page-bar {
        top: 12px;
        inset-inline-end: 12px;
        gap: 8px;
    }
}

/* ==========================================================================
   🌙 الوضع الليلي (Dark Mode) — يُفعَّل عبر إضافة الكلاس dark-mode على <html>
   ========================================================================== */
html.dark-mode body {
    background-color: #0b0e14;
    color: #e2e8f0;
}

html.dark-mode .right-side {
    background: linear-gradient(180deg, #0d1018 0%, #0b0e14 100%);
}

html.dark-mode .login-box {
    background: #131722;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 24px 48px -16px rgba(0, 0, 0, 0.55);
}

html.dark-mode .logo-section {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .left-side {
    background: linear-gradient(155deg, #05060a 0%, #0d1018 45%, #07080d 100%);
}

html.dark-mode .system-title {
    color: #f1f5f9;
}

html.dark-mode .input-leading-icon {
    color: #64748b;
}

html.dark-mode .input-icon-container input:focus ~ .input-leading-icon,
html.dark-mode .input-icon-container:focus-within .input-leading-icon {
    color: #e8c766;
}

html.dark-mode .system-subtitle {
    color: #94a3b8;
}

html.dark-mode .form-group label {
    color: #cbd5e1;
}

html.dark-mode .form-group input {
    background-color: #0f172a;
    border-color: #2c3547;
    color: #e2e8f0;
}

html.dark-mode .form-group input:focus {
    border-color: #d4af37;
    background-color: #1e293b;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

html.dark-mode .password-toggle-btn svg {
    color: #64748b;
}

html.dark-mode .password-toggle-btn:hover svg {
    color: #e8c766;
}

html.dark-mode .forgot-password-link {
    color: #e8c766;
}

html.dark-mode .login-error-box {
    background: rgba(127, 29, 29, 0.25);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

html.dark-mode .page-loader {
    background-color: #0b0e14;
}

html.dark-mode .loader-ring {
    border-color: #2c3547;
    border-top-color: #d4af37;
}

html.dark-mode .lang-switch-wrapper,
html.dark-mode .theme-toggle-btn {
    background-color: #1e293b;
    border-color: #334155;
}

html.dark-mode .lang-switch-label {
    color: #64748b;
}

html.dark-mode .lang-switch-label.active {
    color: #e8c766;
}

html.dark-mode .lang-switch-track {
    background-color: #334155;
}

html.dark-mode .theme-toggle-btn svg {
    color: #e8c766;
}

html.dark-mode .promo-content h2 {
    color: #f3e6c2;
}

html.dark-mode .blob-1,
html.dark-mode .blob-3 {
    opacity: 0.35;
}