﻿/* Login Page Styles - هماهنگ با استایل آپلود */
:root {
    --primary-color: #4f46e5;
    --primary-light: #eef2ff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #d1d5db;
    --background-light: #f9fafb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}



* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Container */
/*.login-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}*/
.login-container {
    min-height: calc(100vh - 64px); /* ارتفاع Top-Bar */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Login Card */
.login-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

    .login-card::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, var(--primary-color), #8b5cf6);
    }

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

    .logo svg {
        background-color: var(--primary-light);
        padding: 0.75rem;
        border-radius: 50%;
    }

.login-header h1 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

/* Form */
.login-form {
    margin-bottom: 2rem;
}

/* Messages */
.form-error, .form-success {
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.form-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
}

.form-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.error-icon, .success-icon {
    flex-shrink: 0;
}

.form-error span {
    color: var(--error-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-success span {
    color: var(--success-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--text-primary);
        font-weight: 500;
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }

.input-icon {
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
    color: var(--text-primary);
}

    .form-group input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    }

    .form-group input.error {
        border-color: var(--error-color);
    }

    .form-group input.success {
        border-color: var(--success-color);
    }

.input-error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
}

    .checkbox-label input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox-label input:checked ~ .checkmark::after {
    opacity: 1;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .forgot-password:hover {
        color: #3a56d4;
        text-decoration: underline;
    }

/* Submit Button */
.submit-button {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

    .submit-button:hover {
        background-color: #3a56d4;
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .submit-button:active {
        transform: translateY(0);
    }

    .submit-button:disabled {
        background-color: var(--border-color);
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.button-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Register Link */
.register-link {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

    .register-link p {
        color: var(--text-secondary);
        font-size: 0.95rem;
    }

    .register-link a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 600;
        transition: color 0.3s ease;
    }

        .register-link a:hover {
            color: #3a56d4;
            text-decoration: underline;
        }


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease;
}

/* Responsive */
@media (max-width: 640px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

  
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }

    .login-header h1 {
        font-size: 1.3rem;
    }

    .submit-button {
        padding: 0.875rem;
    }
}
