﻿:root {
    --brand-charcoal: #2C3E50;
    --brand-green: #8DC63F;
    --light-bg: #F0F2F5;
    --white: #FFFFFF;
    --font-primary: 'Cairo', sans-serif;
}

body, html {
    height: 100%;
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--light-bg);
}

.login-container {
    display: flex;
    min-height: 100vh;
}

/* --- Branding Side (Left on LTR, Right on RTL) --- */
.branding-side {
    width: 50%;
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.95)), url('https://images.unsplash.com/photo-1556761175-577389e0a4da?q=80&w=2070&auto=format&fit=crop') center center/cover;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    text-align: center;
}

    .branding-side img {
        max-width: 150px;
        filter: brightness(0) invert(1);
        margin-bottom: 2rem;
    }

    .branding-side h1 {
        font-weight: 800;
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .branding-side p {
        font-size: 1.1rem;
        opacity: 0.8;
        max-width: 400px;
    }

/* --- Form Side (Right on LTR, Left on RTL) --- */
.form-side {
    width: 50%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

    .login-form h2 {
        font-weight: 700;
        color: var(--brand-charcoal);
        margin-bottom: 2rem;
    }

.form-control {
    border-radius: 0.5rem;
    padding: 1rem 1rem 1rem 3rem; /* Padding on left for icon */
    border: 1px solid #dee2e6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .form-control:focus {
        border-color: var(--brand-green);
        box-shadow: 0 0 0 0.25rem rgba(141, 198, 63, 0.25);
    }

.input-group {
    position: relative;
}

    .input-group .form-icon {
        position: absolute;
        left: 1rem; /* Left for RTL */
        top: 50%;
        transform: translateY(-50%);
        color: #adb5bd;
        z-index: 5;
    }

.btn-login {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
    font-weight: 700;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

    .btn-login:hover {
        background-color: #79a832;
        border-color: #79a832;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(141, 198, 63, 0.3);
    }

/* --- Responsive for Mobile --- */
@media (max-width: 991.98px) {
    .login-container {
        flex-direction: column;
    }

    .branding-side, .form-side {
        width: 100%;
    }

    .branding-side {
        min-height: 250px;
        padding: 2rem;
    }
}


/*update progress */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    display: grid;
    place-items: center;
    z-index: 9999;
    /* This allows the user to scroll/interact with the page behind the loader */
    pointer-events: none;
}

/* The new "Glass" card that holds the content */
.loading-box {
    /*background: rgba(30, 30, 35, 0.7);*/ /* Dark, semi-transparent background */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px); /* The glass effect */

    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    padding: 35px;
    /* Center the spinner and text inside the card */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    /* This makes the card itself clickable, while the overlay is not */
    pointer-events: auto;
}

/* The morphing spinner (style remains the same) */
.spinner {
    width: 60px;
    height: 60px;
    background: transparent;
    border: 5px solid;
    border-image-slice: 1;
    border-image-source: conic-gradient( from 90deg, #a855f7, /* Purple */
    #6366f1, /* Indigo */
    #ec4899, /* Pink */
    #a855f7 /* Back to Purple */
    );
    animation: morph-and-spin 2s ease-in-out infinite;
}

@keyframes morph-and-spin {
    0% {
        transform: rotate(0deg);
        border-radius: 50%;
    }

    50% {
        transform: rotate(180deg);
        border-radius: 8px;
    }

    100% {
        transform: rotate(360deg);
        border-radius: 50%;
    }
}

/* Polished text (style remains the same) */
/* -- Style 1: The "Gradient Wave" -- */
.loading-text {
    font-size: 1.2rem;
    font-weight: 600; /* Slightly bolder for better effect */
    /* The Magic: Make the text transparent and apply the gradient as a background */
    color: transparent;
    background-image: linear-gradient( 90deg, #a855f7, /* Start color (Purple) */
    #f1f5f9, /* Middle highlight color (White) */
    #a855f7 /* End color (Purple) */
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    /* The animation that moves the gradient */
    animation: wave-animation 2s linear infinite;
}

@keyframes wave-animation {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.flatpickr-calendar {
    z-index: 1055 !important; /* higher than Bootstrap modal (default is 1050) */
}

/*end of update progress*/