/* ==============================================
   Modern Login Page - Default Demo Only
   MarketMLM Theme
   ============================================== */

/* ===== فقط برای دمو اول (Default) ===== */
body.mlm-modern-login-default {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* مخفی کردن هدر و فوتر فقط در دمو اول */
body.mlm-modern-login-default #header,
body.mlm-modern-login-default .site-header,
body.mlm-modern-login-default #footer,
body.mlm-modern-login-default .site-footer,
body.mlm-modern-login-default .mlm-header,
body.mlm-modern-login-default .mlm-footer {
    display: none !important;
}

/* ===== Wrapper ===== */
.modern-login-wrapper {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== Back Button ===== */
.modern-back-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.modern-back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
    color: #ffffff;
    text-decoration: none;
}

/* ===== Grid Layout ===== */
.modern-login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    min-height: 600px;
}

/* ===== Form Side ===== */
.modern-login-form-side {
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-login-form-container {
    width: 100%;
    max-width: 420px;
}

.modern-login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.modern-login-logo img {
    max-width: 180px;
    height: auto;
}

.modern-login-logo h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
}

/* ===== Form Styles ===== */
.modern-login-content .mlm-form-wrapper {
    width: 100%;
}

/* عنوان و توضیحات فرم */
.modern-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.modern-form-title {
    font-size: 26px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.modern-form-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.modern-login-content .form-group {
    margin-bottom: 20px;
}

.modern-login-content label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.modern-login-content input[type="text"],
.modern-login-content input[type="password"],
.modern-login-content input[type="email"],
.modern-login-content .form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: #1f2937;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.modern-login-content input:focus {
    background: #ffffff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modern-login-content button[type="submit"],
.modern-login-content .btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.modern-login-content button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.modern-login-content .alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.modern-login-content .alert-danger {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* فوتر فرم */
.modern-form-footer {
    text-align: center;
    margin-top: 24px;
}

.modern-form-note {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

.modern-form-note a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.modern-form-note a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ===== Visual Side ===== */
.modern-login-visual-side {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.modern-login-visual-content {
    text-align: center;
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.modern-login-visual-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
}

.modern-login-visual-desc {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 60px;
}

/* آیکون‌های تزیینی */
.modern-login-visual-icons {
    position: relative;
    height: 300px;
}

.visual-icon {
    position: absolute;
    animation: float 6s ease-in-out infinite;
}

.visual-icon-1 {
    top: 20px;
    right: 50px;
    animation-delay: 0s;
}

.visual-icon-2 {
    top: 120px;
    left: 40px;
    animation-delay: 2s;
}

.visual-icon-3 {
    bottom: 40px;
    right: 80px;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Pattern background */
.modern-login-visual-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    z-index: 1;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .modern-login-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .modern-login-visual-side {
        display: none;
    }
    
    .modern-login-form-side {
        padding: 40px 30px;
    }
    
    .modern-back-btn {
        top: 20px;
        right: 20px;
        font-size: 13px;
        padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    .modern-login-wrapper {
        padding: 10px;
    }
    
    .modern-login-form-side {
        padding: 30px 20px;
    }
    
    .modern-login-logo h2 {
        font-size: 22px;
    }
    
    .modern-login-content input {
        font-size: 14px;
        padding: 12px 14px;
    }
    
    .modern-login-content button[type="submit"] {
        font-size: 15px;
        padding: 12px 20px;
    }
}

/* ===== RTL Support ===== */
[dir="rtl"] .modern-back-btn {
    right: auto;
    left: 30px;
}

[dir="rtl"] .modern-back-btn svg {
    transform: scaleX(-1);
}

[dir="rtl"] .modern-back-btn:hover {
    transform: translateX(-4px);
}
