﻿:root {
    --accent: #10b981;
    --accent-dark: #059669;
    --text: #111827;
    --border: #e5e7eb;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px 15px;
    background-color: #f9fafb;
    direction: rtl; /* تضمن الترتيب الصحيح لجميع العناصر العربية */
}

.login-container {
    background: white;
    width: 100%;
    max-width: 550px; /* تم تعديلها لتكون متناسقة وأكثر احترافية */
    border-radius: 30px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid var(--border);
}

.header-section img.header-image {
    width: 100%;
    height: 185px;
    object-fit: cover;
}

.company-info {
    text-align: center;
    margin-top: -45px;
    position: relative;
    z-index: 2;
}

.company-logo {
    background: white;
    width: 98px;
    height: 98px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.company-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-dark);
    margin-top: 12px;
}

.login-form {
    padding: 40px 45px 50px;
}

    .login-form h6 {
        font-size: 1.4rem;
        font-weight: 600;
        text-align: center;
        margin-bottom: 30px;
        color: var(--text);
    }

.form-group {
    margin-bottom: 26px;
    text-align: right;
}

    .form-group label {
        font-weight: 600;
        color: #374151;
        margin-bottom: 8px;
        display: block;
    }

/* التنسيق الأساسي للحقول */
.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: 16px;
    font-size: 1.05rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
    text-align: right;
}

    .form-control:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.15);
        outline: none;
    }

/* حل مشكلة العين هندسياً */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* النص ينتهي قبل الوصول للعين في اليسار */
.password-input {
    padding-left: 55px;
}

.toggle-password {
    position: absolute;
    left: 18px; /* تثبيت دقيق جهة اليسار داخل الحقل */
    top: 50%;
    transform: translateY(-50%); /* توسط عمودي مطلق وذكي */
    background: none;
    border: none;
    font-size: 1.35rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: color 0.2s ease;
}

    .toggle-password:hover {
        color: var(--accent);
    }

/* زر تسجيل الدخول */
.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 15px 0 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

    .btn-login:hover {
        background: var(--accent-dark);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    }

.text-center a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

    .text-center a:hover {
        color: var(--accent-dark);
        text-decoration: underline;
    }

/* Responsive */
@media (max-width: 576px) {
    .login-container {
        border-radius: 24px;
        margin: 10px;
    }

    .login-form {
        padding: 30px 25px 40px;
    }

    .header-image {
        height: 150px;
    }

    .company-info h2 {
        font-size: 1.3rem;
    }
}
