/* Login Redesign - Modern Split Layout */
:root {
    --primary-gradient: linear-gradient(135deg, #8e24aa 0%, #3f51b5 100%);
    --bg-gradient: linear-gradient(135deg, #2b6cb0 0%, #1a365d 100%); /* آبی سرمه‌ای متمایز */
    --bg-dark-blue: #1a365d; 
    --accent-blue: #3b82f6;
    --text-muted: #64748b;
    --input-bg: #f8fafc;
    --border-color: #e2e8f0;
}

body.login-modern {
    background: #f1f5f9;
    font-family: 'IRANSans', 'Tahoma', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh; /* تغییر به min-height برای جلوگیری از برش در مانیتورهای کوچک */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto; /* اجازه اسکرول در صورت نیاز */
}

.login-container {
    display: flex;
    width: 1000px;
    max-width: 95%;
    min-height: 600px; /* حداقل ارتفاع */
    height: auto; /* تغییر به auto برای جا شدن محتوا */
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin: 20px 0;
}

/* Left Side - Form */
.login-form-side {
    flex: 1;
    padding: 50px 60px; /* افزایش پدینگ برای ظاهر بهتر */
    display: flex;
    flex-direction: column;
    justify-content: center; /* مرکز کردن عمودی فرم */
    position: relative;
}

.login-header {
    margin-bottom: 30px;
}

.login-header h2 {
    text-align: center;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 12px;
    font-size: 28px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.6;
}

.form-group-modern {
    margin-bottom: 15px;
}

.form-group-modern label {
    display: block;
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 45px;
    padding-right: 40px; /* برای آیکون چشم */
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    color: #1e293b;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-wrapper .input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    font-size: 18px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--accent-blue);
}

/* دکمه نمایش رمز عبور جدید با Font Awesome */
.password-toggle-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748b;
    font-size: 18px;
    z-index: 10;
    padding: 5px;
    transition: color 0.2s;
    
}

.password-toggle-btn:hover {
    color: #3b82f6;
}

.btn-login-modern {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.4);
}

.btn-login-modern:active {
    transform: translateY(0);
}

.login-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-link-modern {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: color 0.2s;
}

.btn-link-modern:hover {
    color: var(--accent-blue);
}

.login-footer {
    margin-top: 30px; /* فاصله از کادر پایین */
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Right Side - Branding */
.login-info-side {
    flex: 1.2;
    background: var(--bg-gradient); /* استفاده از گرادینت آبی تیره */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 40px;
}

/* Geometric Pattern Background */
.login-info-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l25.98 15v30L30 60 4.02 45V15z' fill-rule='evenodd' stroke='%23ffffff' stroke-width='1' fill='none' stroke-opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.2;
}

.info-logo-wrapper {
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.info-logo-wrapper img {
    width: 85px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.info-content {
    z-index: 1;
}

.info-content h1 {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 12px;
}

.info-content p {
    font-size: 14px;
    opacity: 0.7;
    max-width: 280px;
    line-height: 1.6;
    margin: 0 auto 10px;
}

.info-footer-text {
    font-size: 13px;
    opacity: 0.6;
    margin-top: 10px;
}

/* OTP Boxes Custom Styling */
.otp-inputs-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 20px 0;
    direction: ltr;
}

.otp-box {
    width: 100%;
    height: 55px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    transition: all 0.3s;
}

.otp-box:focus {
    border-color: var(--accent-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Loading Overlay - Fixed placement */
#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.spinner-custom {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #8e24aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

#loading-overlay h4 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 8px;
}

#loading-overlay p {
    color: var(--text-muted);
    font-size: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 900px) {
    .login-info-side {
        display: none;
    }
    .login-container {
        width: 400px;
        height: auto;
    }
    .login-form-side {
        padding: 40px 30px;
    }
}


/* Company Info Style - برای جایگزینی inline style */
.company-info {
    font-size: 14px;
    margin-top: 20px;
    opacity: 0.6;
}

/* Alert Modern Style - برای جایگزینی inline styles */
.alert-modern {
    border-radius: 12px !important;
    font-size: 13px !important;
}
