﻿@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #7c3aed;
    --accent-color: #f43f5e;
    --success-color: #10b981;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 1024px;
    display: flex;
    background: var(--surface-color);
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.auth-banner {
    flex: 1;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .auth-banner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('/images/pattern.svg') center/cover;
        opacity: 0.1;
    }

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-logo {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-text {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 80%;
    margin: 0 auto;
}

.auth-form-container {
    flex: 1;
    padding: 2.5rem;
    background: var(--surface-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .auth-header h1 {
        font-size: 1.875rem;
        color: var(--text-primary);
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .auth-header p {
        color: var(--text-secondary);
        font-size: 1rem;
    }

.auth-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        font-weight: 500;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
        font-size: 0.875rem;
    }

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    background-color: var(--surface-color);
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

    .form-control::placeholder {
        color: var(--text-secondary);
    }

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .toggle-password:hover {
        color: var(--primary-color);
    }

.remember-me {
    margin-bottom: 1.5rem;
}

.remember-me-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.remember-info {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-right: 0.25rem;
    cursor: help;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

    .custom-checkbox:hover {
        color: var(--text-primary);
    }

    .custom-checkbox input[type="checkbox"] {
        width: 1.125rem;
        height: 1.125rem;
        border-radius: 0.25rem;
        border: 2px solid var(--border-color);
        cursor: pointer;
        transition: all 0.2s ease;
        accent-color: var(--primary-color);
    }

    .custom-checkbox input[type="checkbox"]:checked {
        border-color: var(--primary-color);
        background-color: var(--primary-color);
    }

    .custom-checkbox input[type="checkbox"]:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    }

.auth-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .auth-btn:hover {
        background-color: var(--primary-dark);
    }

    .auth-btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4);
    }

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
}

    .auth-links a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.875rem;
        transition: color 0.2s ease;
    }

        .auth-links a:hover {
            color: var(--primary-dark);
        }

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid var(--border-color);
    }

    .divider::before {
        margin-left: 1rem;
    }

    .divider::after {
        margin-right: 1rem;
    }

.text-danger {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.validation-summary-errors {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: var(--error-color);
}

    .validation-summary-errors ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .validation-summary-errors li {
        margin-bottom: 0.25rem;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-banner {
        padding: 2rem 1rem;
    }

    .banner-logo {
        font-size: 2.5rem;
    }

    .auth-form-container {
        padding: 2rem 1.5rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form {
    animation: fadeIn 0.3s ease-out;
}

/* Success Message */
.success-message {
    background-color: #ecfdf5;
    border: 1px solid #d1fae5;
    color: var(--success-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Icon Styles */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}
