/* Login Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Yekan Bakh', Arial, sans-serif;
    background: #F3F8FF;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
}

.main-wrapper {
    width: 1232px;
    height: 704px;
    background: #FFFFFF;
    box-shadow: 0px 8px 60px rgba(0, 0, 0, 0.15);
    border-radius: 30px;
    display: flex;
    flex-direction: row;
    margin: auto;
    overflow: hidden;
}

/* Mobile Header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 32px;
    background: transparent;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    display: none;
}

.logo-icon {
    display: flex;
    justify-content: flex-start;
}

.logo-img {
    width: 150px;
    height: auto;
    filter: brightness(0) saturate(100%) invert(13%) sepia(94%) saturate(7151%) hue-rotate(248deg) brightness(95%) contrast(118%);
}

.back-home-mobile {
    text-align: left;
}

.back-link-mobile {
    color: #0000FF;
    text-decoration: none;
    font-family: 'Vazirmatn';
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 102, 0.15));
}

.back-link-mobile:hover {
    color: #0000CC;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 102, 0.25));
}

/* Illustration Section */
.illustration-section {
    flex: 1;
    background: #F3F8FF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Form Section */
.form-section {
    width: 400px;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
    width: 100%;
}

.form-title {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 700;
    font-size: 40px;
    line-height: 62px;
    color: #0000FF;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 102, 0.15);
}

.form-subtitle {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    line-height: 37px;
    color: #000000;
    margin-bottom: 8px;
}

.form-description {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 25px;
    color: #000000;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-label {
    display: block;
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 25px;
    color: #121212;
    margin-bottom: 12px;
    text-align: center;
    width: 100%;
}

.form-input {
    width: 291px;
    height: 48px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 25px;
    color: #121212;
    background: #F5F5F5;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    direction: ltr;
    text-align: center;
}

.form-input:focus {
    outline: none;
    background: #FFFFFF;
    box-shadow: 0 0 0 2px #0000FF, 0 4px 12px rgba(0, 0, 102, 0.1);
    transform: translateY(-1px);
}

/* Code Inputs */
.code-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
    margin-bottom: 20px;
    padding: 8px;
}

.code-input {
    width: 55px;
    height: 55px;
    text-align: center;
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 700;
    font-size: 22px;
    line-height: 25px;
    border: none;
    border-radius: 12px;
    background: #F5F5F5;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    direction: ltr;
    padding: 0;
    letter-spacing: 2px;
}

.code-input:focus {
    outline: none;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px #0000FF, 0 4px 12px rgba(0, 0, 102, 0.15);
    transform: translateY(-2px);
}

.code-input.filled {
    background: #FFFFFF;
    color: #0000FF;
    font-weight: 800;
}

/* Force LTR direction for code inputs */
.code-input[dir="ltr"] {
    direction: ltr;
    text-align: center;
    unicode-bidi: embed;
}

.submit-btn {
    width: 291px;
    margin: 0 auto;
    display: block;
}

/* Buttons */
.verify-btn, .submit-btn {
    height: 48px;
    border: none;
    border-radius: 12px;
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.verify-btn {
    width: 291px;
    background: #0000FF;
    color: #FFFFFF;
    margin: 16px auto;
}

.verify-btn:hover {
    background: #0000CC;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 255, 0.4);
}

.verify-btn:disabled {
    background: #C0C0C0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn {
    background: #D9D9FF;
    color: #0000FF;
    opacity: 0.5;
    cursor: not-allowed;
}

.submit-btn:enabled {
    opacity: 1;
    cursor: pointer;
}

.submit-btn:enabled:hover {
    background: #C0C0FF;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 102, 0.3);
}

/* Back to Home */
.back-home {
    text-align: center;
    margin-top: 1.5rem;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #5a67d8;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    flex-direction: column;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message Overlay */
.message-overlay {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1001;
    max-width: 300px;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.message-content.success .message-icon {
    background: #48bb78;
    color: white;
}

.message-content.error .message-icon {
    background: #f56565;
    color: white;
}

.message-text {
    color: #1a1a2e;
    font-weight: 500;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1300px) {
    .main-wrapper {
        width: 95%;
        max-width: 1200px;
        height: auto;
    }
}

@media (max-width: 768px) {
    body {
        padding: 5rem 1rem 1rem 1rem;
        flex-direction: column;
    }
    
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
    }
    
    .back-home {
        display: none;
    }
    
    .main-wrapper {
        width: 100%;
        max-width: 420px;
        height: auto;
        flex-direction: column;
        margin: 0 auto;
        border-radius: 20px;
        min-height: auto;
        box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.12);
    }
    
    .form-section {
        width: 100%;
        padding: 2rem 1.5rem;
    }
    
    .illustration-section {
        display: none;
    }
    
    .form-title {
        font-size: 28px;
        line-height: 40px;
        font-weight: bold;
    }
    
    .form-subtitle {
        font-size: 20px;
    }
    
    .form-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    .main-wrapper {
        border-radius: 16px;
        min-height: auto;
        max-width: 100%;
        box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .form-section {
        padding: 1.5rem 1rem;
    }
    
    .form-title {
        font-size: 24px;
        line-height: 36px;
    }
    
    .form-subtitle {
        font-size: 18px;
    }
    
    .form-description {
        font-size: 13px;
    }
    
    .form-input {
        width: 100%;
    }
    
    .verify-btn, .submit-btn {
        width: 100%;
    }
    
    .code-inputs {
        gap: 6px;
    }
    
    .code-input {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}
