﻿:root {
    /* Main Colors */
    --primary: #0f4c3a;
    --primary-light: #1e7763;
    --primary-dark: #083326;
    --accent: #ff6b35;
    --accent-light: #ff8c42;
    --accent-hover: #e55a2b;
    /* UI Elements */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #2d3748;
    --text-secondary: #6b7280;
    --text-light: #ffffff;
    --border-color: #e5e7eb;
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    --accent-gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, #ffad42 100%);
    /* Shadows */
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.2);
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    overflow-y: auto;
    color: var(--text-primary);
    background-color: #f8fafc;
}

/* Split Container */
.split-container {
    min-height: 100svh;
    display: flex;
}

/* Brand Side (Left) */
.brand-side {
    flex: 1;
    background: var(--primary-gradient);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

/* Lion Pattern Background */
.lion-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/ionicons/5.5.0/collection/svg/pattern-dots.svg');
    background-size: 350px;
    background-repeat: repeat;
    background-color: #ffff;
    opacity: 0.06;
    transform: rotate(10deg) scale(1.5);
}

.form-scroll {
    -webkit-overflow-scrolling: touch;
    max-height: calc(100svh - 280px);
    max-height: calc((var(--vh, 1vh) * 100) - 280px);
}

.form-label {
    font-weight: 600;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: .75rem 1rem;
    font-size: 1rem;
    text-align: right;
}

.input-group {
    position: relative;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

.password-toggle {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
}
/* Floating Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }

    25% {
        transform: translate(50px, 50px) rotate(90deg);
        opacity: 0.6;
    }

    50% {
        transform: translate(100px, 10px) rotate(180deg);
        opacity: 0.3;
    }

    75% {
        transform: translate(50px, -40px) rotate(270deg);
        opacity: 0.6;
    }
}

/* Brand Content */
.brand-content {
    text-align: center;
    z-index: 10;
    color: white;
    max-width: 650px;
    padding: 3rem;
    animation: fadeIn 1.2s ease-out;
}

.logo-container {
    margin-bottom: 3rem;
    position: relative;
}

.logo-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    position: relative;
    transition: var(--transition);
    animation: pulse 3s infinite;
}

.main-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 15px 35px rgba(255, 107, 53, 0.3));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 20px 45px rgba(255, 107, 53, 0.4));
    }
}

.brand-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.95;
    font-family: 'Inter', sans-serif;
}

.brand-subtitle-ar {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 600;
}

.brand-description {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.85;
    max-width: 550px;
    margin: 0 auto;
}

/* Feature Cards */
.feature-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

    .feature-item:hover {
        transform: translateY(-5px);
        background: rgba(255, 255, 255, 0.15);
    }

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-light);
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Login Side (Right) */
.login-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 2rem;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    min-height: 100svh;
    min-height: calc(var(--vh, 1vh) * 100);
}

/* Background Image */
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/AlMargaa/55.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: rgba(15, 76, 58, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    color: white;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    z-index: 100;
    box-shadow: var(--shadow-soft);
}

    .language-selector:hover {
        background: var(--primary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-medium);
    }

/* Login Container */
.login-container {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 25px;
    padding: 3.5rem 3rem;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--glass-border);
    animation: fadeIn 1.2s ease-out;
    position: relative;
    overflow: hidden;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: #45797a;
    /*    background: rgba(255, 255, 255, 0.95);*/
}

    .login-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: #bba188;
        /*        background: var(--accent-gradient);*/
    }

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 1rem;
}

.login-logo {
    width: 150px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.small-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.login-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    display: block;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(250, 251, 252, 0.8);
    width: 100%;
    font-family: 'Tajawal', sans-serif;
}

    .form-control:focus {
        border-color: #ffff;
        /*        border-color: var(--accent);*/
        background: white;
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
        outline: none;
        transform: translateY(-2px);
    }

    .form-control::placeholder {
        color: var(--text-secondary);
        opacity: 0.7;
    }

/* Password Input Group */
.input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
}

    .password-toggle:hover {
        background: rgba(0, 0, 0, 0.05);
        color: var(--text-primary);
    }

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

    .remember-me input[type="checkbox"] {
        width: 18px;
        height: 18px;
        /*        accent-color: var(--accent);*/
        accent-color: #bba188;
        cursor: pointer;
    }

    .remember-me label {
        font-weight: 500;
        color: var(--text-primary);
        cursor: pointer;
        margin: 0;
    }

.forgot-password {
    color: #ffff;
    /*    color: var(--accent);*/
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

    .forgot-password:hover {
        /*        color: var(--accent-hover);*/
        color: #bba188;
        text-decoration: underline;
    }

/* Login Button */
.login-btn {
    /*    background: var(--accent-gradient);*/
    background-color: #bba188;
    border: none;
    border-radius: 12px;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    width: 100%;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

    .login-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: all 0.8s;
    }

    .login-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    }

        .login-btn:hover::before {
            left: 100%;
        }

    .login-btn:active {
        transform: translateY(-1px);
    }

/* Register Option */
.register-option {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #bba188;
    /*    color: var(--text-secondary);*/
}

.register-link {
    color: #ffff;
    /*    color: var(--accent);*/
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

    .register-link:hover {
        /*        color: var(--accent-hover);*/
        color: #bba188;
        text-decoration: underline;
    }

/* Powered By */
.poweredby {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: rgba(15, 76, 58, 0.7);
    font-weight: 500;
    z-index: 10;
}

/* Validation Styles */
.text-danger {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
    font-weight: 500;
}

.form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Hide validation summary but keep it accessible */
.validation-summary-valid {
    display: none;
}

/* Hide hidden inputs */
input[type="hidden"] {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .brand-title {
        font-size: 3.5rem;
    }

    .feature-highlights {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    body {
        overflow-y: auto !important;
    }

    .split-container {
        flex-direction: column;
    }

    .split-container {
        flex-direction: column;
    }

    .brand-side, .login-side {
        flex: none;
    }

    .brand-side {
        height: 40vh;
    }

    .login-side {
        height: auto !important;
        min-height: 100svh;
        min-height: calc(var(--vh, 1vh) * 100);
    }

    .brand-content {
        padding: 2rem;
    }

    .brand-title {
        font-size: 3rem;
    }

    .feature-highlights {
        display: none;
    }

    .brand-description {
        max-width: 400px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        margin: 1rem;
        padding: 2.5rem 2rem;
    }

    .brand-side {
        height: 35vh;
    }

    .login-side {
        height: auto !important;
        min-height: 100svh;
        min-height: calc(var(--vh, 1vh) * 100);
    }

    .brand-title {
        font-size: 2.5rem;
    }

    .brand-description {
        display: none;
    }

    .form-scroll {
        overflow-y: auto;
        max-height: calc(100svh - 220px);
        max-height: calc((var(--vh, 1vh) * 100) - 220px);
    }

    .login-title {
        font-size: 1.5rem;
        font-weight: 500;
    }

    .login-logo {
        width: 100px;
    }
}

@media (max-width: 480px) {
    body {
        overflow-y: auto;
    }

    .login-container {
        padding: 2rem 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .language-selector {
        top: 1rem;
        left: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .form-scroll {
        overflow-y: auto;
        max-height: calc(100svh - 220px);
        max-height: calc((var(--vh, 1vh) * 100) - 220px);
    }

    .login-title {
        font-size: 1.5rem;
        font-weight: 500;
    }

    .login-logo {
        width: 100px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #111827;
    }

    .login-side {
        background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    }

    .login-container {
        background: #45797a;
        /*        background: rgba(31, 41, 55, 0.95);*/
        border-color: #374151;
    }

    .login-title, .form-label {
        color: #f3f4f6;
    }

    .login-subtitle {
        color: #d1d5db;
    }

    .form-control {
        background: rgba(55, 65, 81, 0.8);
        border-color: #bba188 !important;
        color: #f3f4f6;
    }

        .form-control:focus {
            background: #374151;
        }

    .remember-me label {
        color: #f3f4f6;
    }

    .poweredby {
        color: rgba(255, 255, 255, 0.7);
    }
}
