﻿/* ============================================================
   صفحه لاگین - Login.css
   ============================================================ */

/* ──────────────────────────────────────────
   ۱. Reset و متغیرهای کلی
   ────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #1e293b;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --error: #ef4444;
    --success: #10b981;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.form-subtitle {
    font-size: 12px;
    color: red;
    text-align: center;
}

/* ──────────────────────────────────────────
   ۲. Wrapper و پس‌زمینه دکوراتیو
   ────────────────────────────────────────── */
.login-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bg-decoration {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: -80px;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

.circle-3 {
    width: 200px;
    height: 200px;
    background: #06b6d4;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.1);
    }
}

/* ──────────────────────────────────────────
   ۳. کارت اصلی لاگین
   ────────────────────────────────────────── */
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: var(--dark-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
}

/* ──────────────────────────────────────────
   ۴. هدر (لوگو و عنوان)
   ────────────────────────────────────────── */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-circle {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

    .logo-circle i {
        font-size: 32px;
        color: white;
    }

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ──────────────────────────────────────────
   ۵. فرم و فیلدها
   ────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--text-secondary);
        margin-bottom: 8px;
    }

        .form-group label i {
            font-size: 14px;
            color: var(--primary-light);
        }

.input-wrapper {
    position: relative;
    width: 100%;
}

    .input-wrapper input {
        width: 100%;
        padding: 14px 48px 14px 16px;
        background: var(--bg-dark);
        border: 2px solid var(--border-color);
        border-radius: 12px;
        color: var(--text-primary);
        font-size: 0.95rem;
        font-family: inherit;
        transition: all 0.3s ease;
        outline: none;
    }

        .input-wrapper input::placeholder {
            color: #475569;
            font-size: 0.875rem;
        }

        .input-wrapper input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
        }

    .input-wrapper .input-icon {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-secondary);
        font-size: 16px;
        pointer-events: none;
        transition: color 0.3s ease;
    }

    .input-wrapper input:focus ~ .input-icon {
        color: var(--primary-light);
    }

/* ──────────────────────────────────────────
   ۶. دکمه نمایش/مخفی کردن رمز
   ────────────────────────────────────────── */
.password-wrapper .toggle-password {
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

    .password-wrapper .toggle-password:hover {
        color: var(--primary-light);
        background: rgba(59, 130, 246, 0.1);
    }

/* ──────────────────────────────────────────
   ۷. گزینه‌های فرم (مرا به خاطر بسپار)
   ────────────────────────────────────────── */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

    .remember-me input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--primary);
        cursor: pointer;
    }

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

    .forgot-password:hover {
        color: var(--primary);
        text-decoration: underline;
    }

/* ──────────────────────────────────────────
   ۸. پیام خطا
   ────────────────────────────────────────── */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: var(--error);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

    .error-message i {
        font-size: 18px;
    }

/* ──────────────────────────────────────────
   ۹. دکمه ورود
   ────────────────────────────────────────── */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login i {
        font-size: 18px;
    }

/* ──────────────────────────────────────────
   ۱۰. فوتر
   ────────────────────────────────────────── */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

    .login-footer p {
        font-size: 0.8rem;
        color: #475569;
    }

/* ──────────────────────────────────────────
   ۱۱. Responsive
   ────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 24px;
        border-radius: 20px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .logo-circle {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

        .logo-circle i {
            font-size: 26px;
        }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
