/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 🔤 تطبيق خط Cairo على كل الصفحة */
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: #f4f7f6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 🌏 حاوية التقسيم الرئيسي */
.page-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* 📸 الجانب الأيسر (40%) */
.left-side {
    width: 40%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1e293b;
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px 40px;
    text-align: center;
}

/* ✨ تنسيق النص العربي الثابت في اليسار */
.welcome-ar {
    direction: rtl;
}

.welcome-ar h1 {
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.5;
}

.welcome-ar p {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 400;
}

/* ✨ تنسيق النص الإنجليزي الثابت في اليسار */
.welcome-en {
    direction: ltr;
}

.welcome-en h2 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.welcome-en p {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 400;
}

/* ✍️ الجانب الأيمن (60%) ثبات كامل على لليسار */
.right-side {
    width: 60%;
    background-color: #f8fafc; /* خلفية رمادية خفيفة تبرز المربع الأبيض */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 20px 0;
    position: relative;
    direction: ltr;
    border-left: 1.5px solid #e2e8f0;
}

/* 🌐 الشريط العلوي (top-bar) */
.top-bar {
    width: 100%;
    background-color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    border-bottom: 1px solid #334155;
    margin-bottom: 0;
}

/* لوجو المبرمج ثابت على اليمين */
.dev-logo {
    order: 2;
    display: flex;
    align-items: center;
}

.dev-logo img {
    max-height: 40px;
    width: auto;
    object-fit: normal;
    filter: drop-shadow(0px 1px 2px rgba(0,0,0,0.2));
}

/* زر اختيار اللغة ثابت على اليسار */
.lang-switcher {
    order: 1;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #475569;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: #94a3b8;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* 📦 حاوية النموذج الكبرى الوسطى */
.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    margin-bottom: auto;
    padding: 20px;
}

/* ⬜ المربع الأبيض المضاف مع الظل */
.login-card {
    background-color: #ffffff;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0,0,0,0.02);
    border: 1px solid #f1f5f9;
    text-align: center;
}

/* Logo Styling */
.logo-container {
    margin-bottom: 12px;
}

.logo-container img {
    max-width: 160px;
    height: auto;
    object-fit: contain;
    margin-bottom: 0px;
}

/* ✨ تنسيق نص اسم الشركة تحت اللوجو */
.company-title {
    font-size: 18px;
    font-weight: 900;
    color: #7F7F7F;
    margin-top: 4px;
    letter-spacing: 0.5px;
    line-height: 1.7;
}

/* حقول المدخلات */
.input-group {
    margin-bottom: 24px;
    text-align: left;
    position: relative;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

/* فئة مخصصة لمحاذاة العناوين لليمين عند تفعيل اللغة العربية */
.input-group label.rtl-text {
    direction: rtl;
    text-align: right;
}

.input-group input {
    width: 100%;
    padding: 8px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #212529;
    outline: none;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.input-group input#password {
    padding-right: 44px;
}

.input-group input:focus {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

/* 👁️ تنسيق زر أيقونة العين */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toggle-password:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

.toggle-password svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 🟢 حركة الخط السفلي باللون الأخضر المميز */
.input-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: #059669;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.input-group:focus-within::after {
    width: 100%;
}

.input-group:focus-within label {
    color: #059669;
}

/* 🟢 زر تسجيل الدخول باللون الأخضر المميز */
.login-btn {
    width: 100%;
    padding: 8px;
    background-color: #059669;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.login-btn:active {
    transform: translateY(1px);
}

/* 📱 التجاوب مع الموبايل */
@media (max-width: 1024px) {
    .left-side {
        display: none;
    }

    .right-side {
        width: 100%;
        background-color: #f4f7f6;
        border-left: none;
    }

    .top-bar {
        padding: 10px 20px;
    }

    .login-card {
        padding: 35px 25px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }

    .logo-container {
        margin-bottom: 20px;
    }
}
