.login-container {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
}

.login-wrapper {
    flex: 1;
    max-width: 500px;
    padding: 40px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: #2c3e50;
    margin: 20px 0 10px;
    font-weight: 600;
}

.login-header p {
    color: #7f8c8d;
    font-size: 14px;
}

.login-form {
    width: 100%;
}

.optional-fields-header {
    margin: 30px 0 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.optional-fields-header h4 {
    color: #2c3e50;
    margin: 0 0 5px 0;
    font-size: 16px;
}

.optional-fields-header p {
    color: #7f8c8d;
    margin: 0;
    font-size: 13px;
}

.form-group {
    margin-bottom: 20px;
}

.optional-field {
    opacity: 0.9;
}

.optional-field:hover {
    opacity: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group label i {
    margin-left: 8px;
    color: #3498db;
}

.input-container {
    position: relative;
}

.input-container input,
.input-container select,
.input-container textarea {
    width: 100%;
    padding: 12px 45px 12px 12px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-container input:focus,
.input-container select:focus,
.input-container textarea:focus {
    outline: none;
    border-color: #3498db;
}

.info-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    cursor: help;
}

.toggle-password {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    cursor: pointer;
}

.form-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    color: #7f8c8d;
}

.remember-me input {
    margin-left: 8px;
}

.terms-link {
    color: #3498db;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.login-btn i {
    margin-right: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
    font-size: 14px;
}

.login-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

.login-side-image {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.login-side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
}

.image-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
}

.image-overlay h3 {
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 600;
}

.image-overlay p {
    font-size: 16px;
    opacity: 0.9;
    margin: 5px 0;
}

/* استایل مدال */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ecf0f1;
}

.modal-body {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.terms-content h4 {
    color: #2c3e50;
    margin: 20px 0 10px 0;
    font-size: 16px;
    border-right: 3px solid #3498db;
    padding-right: 10px;
}

.terms-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
    text-align: justify;
    font-size: 14px;
}

.modal-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #ecf0f1;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.confirm-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.cancel-btn {
    background: #95a5a6;
    color: white;
}

.cancel-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-side-image {
        display: none;
    }
    
    .login-wrapper {
        max-width: 100%;
        padding: 30px 20px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

.client-error {
    display: none;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    padding: 5px;
    background: #fdf2f2;
    border-radius: 4px;
    border-right: 3px solid #e74c3c;
}

.client-error i {
    margin-left: 5px;
}

/* هایلایت فیلدهای دارای خطا */
.input-container input:invalid {
    border-color: #e74c3c;
}

.input-container input:valid {
    border-color: #27ae60;
}

/* استایل برای فیلدهای در حال اعتبارسنجی */
.validating {
    border-color: #f39c12 !important;
}
