﻿/* ==========================================================================
   Ofooqx (أُفق) - Full Screen responsive Auth Layout
   ========================================================================== */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

/* الحاوية الرئيسية */
.auth-page-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 4rem;
    direction: rtl;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(0, 104, 55, 0.90), rgba(15, 23, 42, 0.94)), url('https://images.unsplash.com/photo-1556742049-0a67d577c4d3?q=80&w=1920&auto=format&fit=crop') center/cover no-repeat fixed;
}

/* الكارد */
.auth-card-wrapper {
    background: #ffffff;
    width: 100%;
    max-width: 460px;
    padding: 28px 24px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    margin-right: 0;
    margin-left: auto;
}

/* الهيدر والأيقونة */
.auth-header {
    text-align: center;
    margin-bottom: 16px;
}

.auth-logo-icon {
    background: rgba(0, 104, 55, 0.1);
    color: #006837;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

    .auth-logo-icon i {
        font-size: 24px !important;
    }

.auth-header h2 {
    color: #006837;
    font-weight: 800;
    font-size: 1.25rem;
    margin: 0 0 4px 0;
}

.auth-header p {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0;
}

/* مفتاح التبديل */
.login-type-toggle {
    display: flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 14px;
    gap: 4px;
}

    .login-type-toggle button {
        flex: 1;
        border: none;
        background: transparent;
        padding: 7px;
        border-radius: 7px;
        font-size: 0.8rem;
        font-weight: 700;
        color: #64748b;
        cursor: pointer;
        transition: all 0.2s ease;
        font-family: inherit;
    }

        .login-type-toggle button.active {
            background: #006837;
            color: #ffffff;
            box-shadow: 0 2px 6px rgba(0, 104, 55, 0.2);
        }

/* شبكة الإدخال */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 10px;
    width: 100%;
}

.input-group {
    margin-bottom: 6px;
    text-align: right;
    width: 100%;
}

    .input-group label {
        display: block;
        font-size: 0.75rem;
        margin-bottom: 3px;
        font-weight: 700;
/*        color: #334155;
*/    }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

    /* الأيقونة اليمين (الرئيسية) */
    .input-wrapper > i:not(.select-arrow) {
        position: absolute;
        right: 10px;
        color: #006837;
        font-size: 1rem;
        pointer-events: none;
        z-index: 2;
    }

    /* سهم القائمة المنسدلة على اليسار */
    .input-wrapper .select-arrow {
        position: absolute;
        left: 10px;
        color: #64748b;
        font-size: 1.1rem;
        pointer-events: none;
        z-index: 2;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    /* تنسيق المدخلات القوائم والمدخلات النصية */
    .input-wrapper input,
    .input-wrapper select,
    .input-wrapper .form-control {
        width: 100%;
        padding: 8px 34px 8px 10px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        outline: none;
        background: #f8fafc;
/*        color: #334155;
*/        font-size: 0.8rem;
        box-sizing: border-box;
        transition: all 0.2s ease;
        font-family: inherit;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
    }

        /* حشو إضافي خاص بالـ Select لترك مساحة للسهم من اليسار */
        .input-wrapper select,
        .input-wrapper select.form-control {
            padding-left: 30px;
            cursor: pointer;
        }

            /* خيارات القائمة المنسدلة */
            .input-wrapper select option {
                background-color: #ffffff;
/*                color: #334155;
*/            }

            /* حالات التركيز Focus */
            .input-wrapper input:focus,
            .input-wrapper select:focus,
            .input-wrapper .form-control:focus {
/*                border-color: #006837;
*/                background: #ffffff;
                box-shadow: 0 0 0 3px rgba(0, 104, 55, 0.1);
            }

    .input-wrapper:focus-within .select-arrow {
        color: #006837;
        transform: rotate(180deg);
    }

.validation-message {
    color: #dc2626;
    font-size: 0.7rem;
    margin-top: 2px;
    display: block;
    font-weight: 600;
}

/* زر الدخول/التسجيل */
.login-btn {
    width: 100%;
    background: #006837;
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(0, 104, 55, 0.2);
}

    .login-btn:hover:not(:disabled) {
        background: #00522b;
        transform: translateY(-1px);
    }

    .login-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.footer-links {
    text-align: center;
    margin-top: 12px;
    font-size: 0.8rem;
    color: #64748b;
}

    .footer-links a {
        color: #006837;
        text-decoration: none;
        font-weight: 700;
        margin-right: 4px;
    }

        .footer-links a:hover {
            text-decoration: underline;
        }

/* ==========================================================================
   النوافذ المنبثقة (Modal / Popup Styles)
   ========================================================================== */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    direction: rtl;
}

.popup-box {
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: popupAppear 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.popup-icon {
    margin-bottom: 12px;
}

.popup-message {
    color: #1e293b;
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

@keyframes popupAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   التجاوب مع الشاشات (Responsive)
   ========================================================================== */

@media (max-width: 992px) {
    .auth-page-container {
        justify-content: center;
        padding: 2rem 1rem;
    }

    .auth-card-wrapper {
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 576px) {
    .auth-page-container {
        padding: 1rem 0.75rem;
        align-items: flex-start;
    }

    .auth-card-wrapper {
        max-width: 100%;
        padding: 20px 16px;
        border-radius: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
