﻿/* 1. استدعاء خط Cairo المخصص لجهة المعلومات */
@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-blue: #000659;
    --primary-blue-hover: #000a8a;
    --text-muted: #666a8a;
    --accent-orange: #f9a01b;
}

body, input, button, a {
    margin: 0;
    font-family: 'Cairo', sans-serif !important;
}

.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    margin: 0;
}

/* الجهة الأولى (المعلومات والصورة) */
.auth-info-side {
    flex: 1;
    background: linear-gradient(rgba(0, 6, 89, 0.7), rgba(0, 6, 89, 0.7)),url('/img2/999.jpg') center center no-repeat;
    background-size: cover;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    font-family: 'Cairo', sans-serif;
}

    .auth-info-side h1 {
        color: var(--accent-orange);
        font-size: 3rem;
        margin-bottom: 5px;
        font-weight: 900;
        letter-spacing: 1px;
    }

    .auth-info-side p {
        font-size: 1.2rem;
        margin-bottom: 55px;
        line-height: 1.8;
        font-weight: 600;
    }

.contact-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
    border-radius: 5px;
    direction: ltr;
    backdrop-filter: blur(5px);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

/* الجهة الثانية (الفورمات) */
.auth-form-side {
    flex: 1;
    background-color: #f4f6f9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* صندوق الفورم */
.form-box {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    border-left: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 15px 35px rgba(0, 6, 89, 0.15);
    border-radius: 24px;
    padding: 30px 35px;
    position: relative;
    z-index: 10;
}

/* التابات */
.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(0, 6, 89, 0.1);
}

.auth-tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

    .auth-tab-btn.active {
        color: var(--primary-blue);
        border-bottom: 3px solid var(--accent-orange);
    }

.auth-form-content {
    display: none;
}

    .auth-form-content.active {
        display: block;
        animation: fadeIn 0.4s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group {
    margin-bottom: 12px;
}

    .input-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
        color: var(--primary-blue);
        font-size: 13px;
    }

    .input-group input {
        width: 100%;
        padding: 9px 12px;
        border: 1px solid rgba(0, 6, 89, 0.1);
        border-radius: 8px;
        box-sizing: border-box;
        background-color: rgba(255, 255, 255, 0.7);
        color: var(--primary-blue);
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    }

        .input-group input:focus {
            outline: none;
            border-color: var(--accent-orange);
            background-color: rgba(255, 255, 255, 0.95);
            box-shadow: 0 0 0 3px rgba(249, 160, 27, 0.15);
        }
        /* 💡 درجة أزرق جوجل كروم (هدوء واحترافية) */
        .input-group input.filled {
            background-color: #E8F0FE !important; /* الدرجة الدقيقة المستعملة في Chrome */
            /* الحفاظ على الإطار الأصلي كما هو */
        }

        /* 💡 توحيد الـ Autofill مع نفس الدرجة لضمان التناسق التام */
        .input-group input:-webkit-autofill,
        .input-group input:-webkit-autofill:hover,
        .input-group input:-webkit-autofill:focus,
        .input-group input:-webkit-autofill:active {
            -webkit-box-shadow: 0 0 0 30px #E8F0FE inset !important;
            -webkit-text-fill-color: var(--primary-blue) !important;
            transition: background-color 5000s ease-in-out 0s;
        }

/* العين */
.password-container {
    position: relative;
    display: block;
    width: 100%;
}

.toggle-password {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
    padding: 0;
    z-index: 10;
    transition: opacity 0.3s;
}

    .toggle-password:hover {
        opacity: 1;
    }

[dir="rtl"] .toggle-password {
    right: auto;
    left: 15px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--primary-blue);
    font-weight: 600;
}

    .checkbox-group input, .checkbox-group label {
        margin: 0;
        cursor: pointer;
    }

    .checkbox-group label {
        font-weight: normal;
    }

/* زر الإرسال */
.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-blue) !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 5px;
    box-shadow: 0 4px 15px rgba(0, 6, 89, 0.3);
    position: relative;
    overflow: hidden;
}

    .btn-submit:hover {
        background-color: var(--primary-blue-hover) !important;
        transform: translateY(-2px);
    }

    .btn-submit.loading {
        background-color: var(--text-muted) !important;
        color: transparent !important;
        pointer-events: none;
        box-shadow: none;
    }

        .btn-submit.loading::after {
            content: "";
            position: absolute;
            width: 24px;
            height: 24px;
            top: 50%;
            left: 50%;
            margin-top: -12px;
            margin-left: -12px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* رسائل الخطأ */
.validation-summary-errors {
    background: rgba(220, 53, 69, 0.1);
    border-right: 4px solid #dc3545;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: right;
    animation: fadeIn 0.3s ease;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-right: 20px;
        color: #dc3545;
        font-size: 14px;
        font-weight: bold;
    }

span.text-danger {
    color: #dc3545 !important;
    font-size: 11px;
    margin-top: 2px;
    display: block;
    font-weight: 700;
    animation: fadeIn 0.3s ease;
}

/* الروابط السفلية */
.auth-footer-links {
    margin-top: 50px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    animation: fadeIn 0.8s ease;
}

.orange-separator {
    height: 1.5px;
    width: 80%;
    max-width: 350px;
    background-color: rgba(249, 160, 27, 0.5);
    margin: 0 auto 15px auto;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(249, 160, 27, 0.2);
}

.auth-footer-links .links-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 25px;
}

.auth-footer-links a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

    .auth-footer-links a:hover {
        color: rgba(249, 160, 27, 0.9);
        transform: translateY(-2px);
    }

@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-info-side {
        padding: 40px 20px;
    }

    .form-box {
        padding: 25px;
    }
}
