/* Modern Arabic Login Page Styles */
:root {
    --primary-blue: #2563eb;
    --secondary-blue: #3b82f6;
    --light-blue: #60a5fa;
    --dark-blue: #1d4ed8;
    --accent-green: #059669;
    --light-green: #10b981;
    --background-white: #ffffff;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Main Login Container */
.login-container {
    display: flex;
    min-height: 100vh;
    background: var(--background-white);
    box-shadow: var(--shadow-heavy);
}

/* Left Side - Background Image Section */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(5, 150, 105, 0.8) 100%),
                /* Tech Pattern Background */
                repeating-linear-gradient(45deg, 
                    rgba(37, 99, 235, 0.1) 0px, 
                    rgba(37, 99, 235, 0.1) 20px, 
                    rgba(59, 130, 246, 0.1) 20px, 
                    rgba(59, 130, 246, 0.1) 40px,
                    rgba(5, 150, 105, 0.1) 40px,
                    rgba(5, 150, 105, 0.1) 60px,
                    rgba(16, 185, 129, 0.1) 60px,
                    rgba(16, 185, 129, 0.1) 80px),
                /* Circuit Lines */
                linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.2) 20%, transparent 40%),
                linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.2) 30%, transparent 60%),
                linear-gradient(90deg, transparent 0%, rgba(5, 150, 105, 0.2) 40%, transparent 80%),
                /* Vertical Lines */
                linear-gradient(0deg, transparent 0%, rgba(37, 99, 235, 0.2) 20%, transparent 40%),
                linear-gradient(0deg, transparent 0%, rgba(59, 130, 246, 0.2) 30%, transparent 60%),
                linear-gradient(0deg, transparent 0%, rgba(5, 150, 105, 0.2) 40%, transparent 80%),
                /* Grid Pattern */
                repeating-linear-gradient(45deg, 
                    rgba(255, 255, 255, 0.05) 0px, 
                    rgba(255, 255, 255, 0.05) 10px, 
                    transparent 10px, 
                    transparent 20px);
    background-size: cover, 80px 80px, 100% 3px, 100% 3px, 100% 3px, 3px 100%, 3px 100%, 3px 100%, 20px 20px;
    background-position: center, 0 0, 0 200px, 0 400px, 0 600px, 300px 0, 600px 0, 900px 0, 0 0;
    background-attachment: fixed, scroll, scroll, scroll, scroll, scroll, scroll, scroll, scroll;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: backgroundShift 20s ease-in-out infinite;
}

/* Tech Pattern Overlay */
.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Circuit lines */
        linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.15) 20%, transparent 40%),
        linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.15) 30%, transparent 60%),
        linear-gradient(90deg, transparent 0%, rgba(5, 150, 105, 0.15) 40%, transparent 80%),
        /* Vertical lines */
        linear-gradient(0deg, transparent 0%, rgba(37, 99, 235, 0.15) 20%, transparent 40%),
        linear-gradient(0deg, transparent 0%, rgba(59, 130, 246, 0.15) 30%, transparent 60%),
        linear-gradient(0deg, transparent 0%, rgba(5, 150, 105, 0.15) 40%, transparent 80%),
        /* Grid pattern */
        repeating-linear-gradient(45deg, transparent, transparent 50px, rgba(255, 255, 255, 0.08) 50px, rgba(255, 255, 255, 0.08) 100px);
    background-size: 100% 3px, 100% 3px, 100% 3px, 3px 100%, 3px 100%, 3px 100%, 100px 100px;
    background-position: 0 200px, 0 400px, 0 600px, 300px 0, 600px 0, 900px 0, 0 0;
    z-index: 1;
    opacity: 0.8;
}

/* Tech Elements Overlay */
.login-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Floating dots */
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.4) 3px, transparent 3px),
        radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.4) 3px, transparent 3px),
        radial-gradient(circle at 30% 80%, rgba(5, 150, 105, 0.4) 3px, transparent 3px),
        radial-gradient(circle at 70% 70%, rgba(16, 185, 129, 0.4) 3px, transparent 3px),
        radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.4) 3px, transparent 3px),
        radial-gradient(circle at 10% 60%, rgba(37, 99, 235, 0.3) 2px, transparent 2px),
        radial-gradient(circle at 90% 40%, rgba(59, 130, 246, 0.3) 2px, transparent 2px),
        radial-gradient(circle at 40% 20%, rgba(5, 150, 105, 0.3) 2px, transparent 2px),
        radial-gradient(circle at 60% 90%, rgba(16, 185, 129, 0.3) 2px, transparent 2px),
        /* Data flow lines */
        linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%),
        linear-gradient(-45deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%),
        linear-gradient(30deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%),
        linear-gradient(-30deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    background-size: 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 150px 150px, 150px 150px, 150px 150px, 150px 150px, 100% 2px, 100% 2px, 100% 2px, 100% 2px;
    background-position: 0 0, 100px 100px, 200px 0, 0 200px, 100px 0, 50px 50px, 150px 150px, 250px 50px, 50px 250px, 0 300px, 0 500px, 0 100px, 0 700px;
    z-index: 1;
    opacity: 0.7;
    animation: techElements 15s ease-in-out infinite;
}

@keyframes techElements {
    0%, 100% {
        transform: translateX(0) translateY(0);
        opacity: 0.6;
    }
    25% {
        transform: translateX(10px) translateY(-5px);
        opacity: 0.8;
    }
    50% {
        transform: translateX(-5px) translateY(10px);
        opacity: 0.4;
    }
    75% {
        transform: translateX(-10px) translateY(-5px);
        opacity: 0.7;
    }
}

@keyframes backgroundShift {
    0%, 100% {
        background-position: center top;
    }
    50% {
        background-position: center bottom;
    }
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.6) 0%, rgba(5, 150, 105, 0.5) 100%);
    z-index: 1;
}

.content-overlay {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 500px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logo-section {
    margin-bottom: 3rem;
}

.logo-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: ubuntuGlow 3s ease-in-out infinite alternate;
}

@keyframes ubuntuGlow {
    0% {
        color: white;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }
    100% {
        color: #f0f0f0;
        text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.3);
    }
}

.system-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.2;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
}

.system-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.95;
    line-height: 1.4;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.food-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.food-icons i {
    font-size: 2rem;
    color: white;
    opacity: 0.9;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.food-icons i:nth-child(1) { animation-delay: 0s; }
.food-icons i:nth-child(2) { animation-delay: 0.5s; }
.food-icons i:nth-child(3) { animation-delay: 1s; }
.food-icons i:nth-child(4) { animation-delay: 1.5s; }

.food-icons i:hover {
    opacity: 1;
    transform: scale(1.2);
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.features-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.feature-item i {
    font-size: 1.5rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Right Side - Login Form Section */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--background-white);
}

.login-form-container {
    width: 100%;
    max-width: 450px;
    padding: 3rem 2rem;
    background: var(--background-white);
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 400;
}

/* Form Styles */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--primary-blue);
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    background: var(--background-white);
    direction: rtl;
    text-align: right;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

/* Password Input with Toggle */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-blue);
}

.password-input .form-control {
    padding-left: 3rem;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
}

.remember-me label {
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--dark-blue);
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-light);
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Login Footer */
.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        min-height: 40vh;
        background-attachment: scroll;
        animation: none; /* Disable animation on mobile */
    }
    
    .content-overlay {
        backdrop-filter: blur(5px);
        background: rgba(255, 255, 255, 0.2);
        border-radius: 15px;
        padding: 1.5rem;
    }
    
    .system-title {
        font-size: 2rem;
    }
    
    .features-section {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .feature-item {
        flex: 1;
        min-width: 200px;
        font-size: 1rem;
        backdrop-filter: blur(10px);
    }
}

@media (max-width: 768px) {
    .login-right {
        padding: 1rem;
    }
    
    .login-form-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .login-header h2 {
        font-size: 1.75rem;
    }
    
    .system-title {
        font-size: 1.75rem;
    }
    
    .system-subtitle {
        font-size: 1rem;
    }
    
    .features-section {
        flex-direction: column;
    }
    
    .feature-item {
        min-width: auto;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .system-title {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        font-size: 3rem;
    }
    
    .form-control {
        padding: 0.75rem 0.875rem;
    }
    
    .login-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* 4K Resolution Support */
@media (min-width: 2560px) {
    .login-container {
        max-width: 2400px;
        margin: 0 auto;
    }
    
    .login-form-container {
        max-width: 600px;
        padding: 4rem 3rem;
    }
    
    .login-header h2 {
        font-size: 2.5rem;
    }
    
    .login-header p {
        font-size: 1.2rem;
    }
    
    .system-title {
        font-size: 3.5rem;
    }
    
    .system-subtitle {
        font-size: 1.5rem;
    }
    
    .form-control {
        padding: 1.25rem 1.5rem;
        font-size: 1.2rem;
    }
    
    .login-btn {
        padding: 1.25rem 2.5rem;
        font-size: 1.3rem;
    }
    
    .feature-item {
        font-size: 1.3rem;
        padding: 1.5rem 2rem;
    }
    
    .feature-item i {
        font-size: 2rem;
    }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-form-container {
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    }
    
    .login-btn {
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    }
}

/* Animation Enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form-container {
    animation: fadeInUp 0.6s ease-out;
}

.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

/* Focus States for Accessibility */
.form-control:focus,
.login-btn:focus,
.password-toggle:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}
