/* Стили для страницы входа */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Arial', sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Контейнер входа */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 20px 40px;
    margin-top: -20px;
}

/* Форма входа */
.login-form {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
}

.login-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: #3498db;
    border-width: 1.5px;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Граница для группы пароля */
.password-group {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

/* Забыли пароль */
.forgot-password {
    text-align: right;
    margin-top: 10px;
}

.forgot-password a {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Запомнить меня */
.remember-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.remember-checkbox input {
    margin-right: 10px;
    cursor: pointer;
}

.remember-checkbox label {
    color: #7f8c8d;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Кнопка входа */
.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 600;
    margin-bottom: 20px;
}

.submit-btn:hover {
    background-color: #2980b9;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Ссылка на регистрацию */
.register-link {
    text-align: center;
    color: #7f8c8d;
}

.register-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Сообщения */
.error-message {
    background-color: #ffeaea;
    color: #d63031;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #d63031;
    display: none;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #155724;
    display: none;
}

/* Стили для кнопки просмотра пароля */
.password-input-wrapper {
    position: relative;
}

.password-input {
    padding-right: 45px !important;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    font-size: 1.1rem;
    padding: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: color 0.3s, background-color 0.3s;
}

.password-toggle:hover {
    background-color: #f5f5f5;
}

.password-toggle:hover .eye-icon {
    fill: #3498db;
}

.password-toggle:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.eye-icon {
    width: 20px;
    height: 20px;
    fill: #7f8c8d;
    transition: fill 0.3s;
}

/* Анимация для спиннера загрузки */
#loadingSpinner {
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 8px;
}

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

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .login-form {
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 1.7rem;
    }
    
    .login-container {
        padding: 10px 15px 30px;
        margin-top: -10px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 5px 10px 20px;
    }
    
    .login-form {
        padding: 25px 15px;
        margin-top: 10px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .form-input {
        padding: 10px 12px;
    }
    
    .submit-btn {
        padding: 12px;
        font-size: 1rem;
    }
    
    .password-toggle {
        width: 25px;
        height: 25px;
    }
    
    .password-input {
        padding-right: 40px !important;
    }
    
    .eye-icon {
        width: 18px;
        height: 18px;
    }
}