/* دیزاین حرفه‌ای لاگین با تم وام - ترکیب Bootstrap و CSS سفارشی */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* پس‌زمینه انیمیشن‌دار */
.login-wrapper {
    min-height: 100vh;
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    top: -50%;
    left: -50%;
}

@keyframes gradientShift {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

/* شکل‌های شناور */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 20%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.5;
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
        opacity: 0.8;
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
        opacity: 0.6;
    }
}

/* کارت لاگین */
.login-card-enhanced {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
    animation: slideUpFade 0.6s ease-out;
    overflow: hidden;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

/* هدر لاگین */
.login-header-enhanced {
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
    position: relative;
}

.logo-wrapper {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    background: var(--primary-gradient);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-lg);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
    }
}

.logo-wrapper::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    top: 0;
    left: 0;
}

.logo-icon-enhanced {
    font-size: 2.5rem;
    color: white;
    z-index: 1;
    position: relative;
}

.login-title-enhanced {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.login-subtitle-enhanced {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    margin: 0;
}

/* فرم لاگین */
.login-form-enhanced {
    padding: 0 2rem 2rem;
}

.form-group-enhanced {
    margin-bottom: 1.5rem;
}

.form-label-enhanced {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.label-icon-enhanced {
    font-size: 1.1rem;
    opacity: 0.7;
}

/* Input Group بهبود یافته */
.input-group-enhanced {
    position: relative;
}

.input-group-enhanced .input-group-text {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-left: none;
    border-radius: 0.75rem 0 0 0.75rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.input-group-enhanced .form-control {
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.input-group-enhanced .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
    z-index: 1;
}

.input-group-enhanced .form-control:focus + .input-group-text,
.input-group-enhanced:focus-within .input-group-text {
    border-color: var(--primary-color);
    background: var(--bg-light);
    color: var(--primary-color);
}

.input-group-enhanced .form-control.is-invalid {
    border-color: var(--error-color);
}

.input-group-enhanced .form-control.is-invalid + .input-group-text {
    border-color: var(--error-color);
}

/* دکمه نمایش/مخفی کردن رمز */
.password-toggle-btn {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 5;
    border-radius: 0.5rem;
}

.password-toggle-btn:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

.password-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* دکمه ورود */
.btn-login-enhanced {
    background: var(--primary-gradient);
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login-enhanced::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: left 0.5s;
}

.btn-login-enhanced:hover::before {
    left: 100%;
}

.btn-login-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-login-enhanced:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* حالت Loading */
.btn-login-enhanced.loading {
    pointer-events: none;
}

.btn-login-enhanced.loading .btn-text {
    opacity: 0;
}

.btn-login-enhanced.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Remember Me */
.remember-me-enhanced {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me-enhanced .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remember-me-enhanced .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.remember-me-enhanced .form-check-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

/* پیام خطا */
.alert-enhanced {
    border-radius: 0.75rem;
    border: none;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.alert-enhanced .alert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Footer */
.login-footer-enhanced {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background: var(--bg-light);
}

.security-info-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.security-icon-enhanced {
    font-size: 1rem;
}

/* آیکون‌های شناور */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-icon-item {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.15;
    animation: floatIcon 20s infinite ease-in-out;
}

.floating-icon-item:nth-child(1) {
    top: 15%;
    right: 10%;
    animation-delay: 0s;
}

.floating-icon-item:nth-child(2) {
    top: 60%;
    left: 15%;
    animation-delay: 7s;
}

.floating-icon-item:nth-child(3) {
    bottom: 20%;
    right: 20%;
    animation-delay: 14s;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(30px, -40px) rotate(120deg) scale(1.1);
    }
    66% {
        transform: translate(-25px, 30px) rotate(240deg) scale(0.9);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .login-card-enhanced {
        border-radius: 1.5rem;
    }
    
    .login-header-enhanced {
        padding: 2rem 1.5rem 1rem;
    }
    
    .logo-wrapper {
        width: 75px;
        height: 75px;
    }
    
    .logo-icon-enhanced {
        font-size: 2rem;
    }
    
    .login-title-enhanced {
        font-size: 1.5rem;
    }
    
    .login-form-enhanced {
        padding: 0 1.5rem 1.5rem;
    }
}

/* انیمیشن ورود فیلدها */
.form-group-enhanced {
    animation: fadeInUp 0.5s ease-out backwards;
}

.form-group-enhanced:nth-child(1) { animation-delay: 0.1s; }
.form-group-enhanced:nth-child(2) { animation-delay: 0.2s; }
.form-group-enhanced:nth-child(3) { animation-delay: 0.3s; }
.form-group-enhanced:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


