/* =====================================================
   صفحة تسجيل الدخول
===================================================== */

.login-page {
    min-height: 100vh;
    direction: rtl;
    position: relative;

    background:
        url('../images/login_bg.jpg')
        no-repeat
        center center
        fixed;

    background-size: cover;
}

/* طبقة تعتيم فوق الخلفية */

.login-page::before {
    content: "";

    position: fixed;
    inset: 0;

    background-color: rgba(0, 0, 0, 0.4);

    z-index: 0;
}

/* حاوية الصفحة */

.page-container {
    position: relative;
    z-index: 1;

    min-height: 100vh;
    padding: 40px 20px;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* بطاقة تسجيل الدخول */

.login-card {
    position: relative;

    width: 100%;
    max-width: 420px;

    padding: 36px 30px;

    background: rgba(238, 238, 238, 0.8);

    border-radius: 24px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.06);

    transition: 0.3s;
}

/* الشعار */

.logo-wrapper {
    display: flex;
    justify-content: center;

    margin-bottom: 22px;
}

.logo-circle {
    width: 72px;
    height: 72px;

    display: flex;
    justify-content: center;
    align-items: center;

    color: var(--white);
    background: var(--primary-color);

    border-radius: 20px;

    font-size: 28px;
}

/* عنوان الصفحة */

.login-header {
    margin-bottom: 28px;
    text-align: center;
}

.login-header h1 {
    margin-bottom: 8px;

    color: var(--text-dark);

    font-size: 28px;
}

.company-name {
    margin-bottom: 8px;

    color: var(--primary-color);

    font-weight: 600;
}

.sub-text {
    color: var(--text-muted);

    font-size: 14px;
    line-height: 1.7;
}

/* مجموعات الحقول */

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

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 8px;
}

.input-group label {
    display: block;

    margin-bottom: 8px;

    color: var(--text-normal);

    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 16px;

    color: #9ca3af;

    font-size: 16px;

    transform: translateY(-50%);
}

/* حقول الإدخال */

.input-group input {
    width: 100%;
    height: 54px;

    padding: 0 48px;

    color: var(--text-dark);
    background: var(--white);

    border: 1px solid var(--border-color);
    border-radius: 14px;

    outline: none;

    font-size: 15px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.input-group input::placeholder {
    color: #9ca3af;
}

.input-group input:focus {
    border-color: var(--primary-color);

    box-shadow:
        0 0 0 4px rgba(15, 118, 110, 0.08);
}

/* الحقول الرقمية */

#phone,
#nationalId,
#identity {
    direction: ltr;
    text-align: right;
}

/* زر إظهار كلمة المرور */

.toggle-password {
    position: absolute;
    top: 50%;
    left: 14px;

    padding: 5px;

    color: #9ca3af;
    background: transparent;

    border: none;

    font-size: 16px;

    cursor: pointer;

    transform: translateY(-50%);
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* رابط استعادة كلمة المرور */

.forgot-link {
    color: var(--primary-color);

    text-decoration: none;

    font-size: 14px;
}

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

/* تذكرني */

.remember-row {
    margin: 18px 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #4b5563;

    cursor: pointer;
}

/* زر تسجيل الدخول */

.submit-btn {
    width: 100%;
    height: 54px;

    color: var(--white);
    background: var(--primary-color);

    border: none;
    border-radius: 14px;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.submit-btn:hover {
    background: var(--primary-hover);

    transform: translateY(-1px);
}

/* رابط إنشاء الحساب */

.register-link {
    margin-top: 22px;

    color: var(--text-muted);

    text-align: center;

    font-size: 15px;
}

.register-link a {
    color: var(--primary-color);

    text-decoration: none;

    font-weight: 600;
}

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

/* رسائل الأخطاء */

.error-message {
    display: block;

    margin-top: 6px;

    color: var(--danger-color);

    font-size: 13px;
}

/* =====================================================
   التابلت
===================================================== */

@media (max-width: 992px) {
    .login-card {
        max-width: 400px;
    }
}

/* =====================================================
   الجوال
===================================================== */

@media (max-width: 768px) {
    .page-container {
        padding: 20px 16px;

        align-items: flex-start;
    }

    .login-card {
        max-width: 100%;

        padding: 28px 22px;

        border-radius: 20px;
    }

    .logo-circle {
        width: 64px;
        height: 64px;

        border-radius: 18px;

        font-size: 24px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .company-name {
        font-size: 15px;
    }

    .sub-text {
        font-size: 13px;
    }

    .input-group input {
        height: 52px;

        font-size: 14px;
    }

    .submit-btn {
        height: 52px;

        font-size: 15px;
    }
}

/* =====================================================
   الجوال الصغير
===================================================== */

@media (max-width: 400px) {
    .login-card {
        padding: 24px 18px;
    }

    .login-header h1 {
        font-size: 22px;
    }
}