/* Основные стили как в основном сайте */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8fbff;
    color: #0f2c4e;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.48;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #f8fbff 100%);
}

/* Контейнер входа */
.login-container {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 12px;
    padding: 40px 36px;
    box-shadow: 0 8px 32px rgba(14, 30, 91, 0.12);
    border: 1px solid #d3e8ff;
    transition: all 0.3s ease;
}

.login-container:hover {
    box-shadow: 0 12px 40px rgba(14, 30, 91, 0.15);
}

/* Заголовок */
.login-container h2 {
    text-align: center;
    color: #1e40af;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 32px 0;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* Сообщения */
.messages {
    margin-bottom: 24px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

/* Форма */
.login-container form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Поля ввода */
.login-container input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #c3d8ff;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.15s;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    color: #0f2c4e;
}

.login-container input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.login-container input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Кнопка входа */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(to right, #64b5f6, #42a5f5);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(66, 165, 245, 0.25);
    margin-top: 8px;
}

.btn-submit:hover {
    background: linear-gradient(to right, #42a5f5, #2196f3);
    box-shadow: 0 4px 12px rgba(66, 165, 245, 0.35);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(66, 165, 245, 0.25);
}

/* Сообщения об ошибках */
.error {
    color: #dc2626;
    font-size: 14px;
    margin-top: 6px;
    padding: 8px 12px;
    background-color: #fef2f2;
    border-radius: 6px;
    border-left: 4px solid #ef4444;
    display: none;
}

/* Адаптивность */
@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
        margin: 0 16px;
    }

    .login-container h2 {
        font-size: 18px;
        margin-bottom: 28px;
    }

    .login-container input {
        padding: 12px 14px;
        font-size: 14.5px;
    }

    .btn-submit {
        padding: 13px 20px;
        font-size: 15.5px;
    }
}

/* Эффект загрузки при отправке формы */
.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Дополнительная информация под формой */
.login-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5eeff;
    text-align: center;
    font-size: 13.5px;
    color: #64748b;
}

.login-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
    color: #2563eb;
}

/* Стили для цветного текста */
.diabold {
    color: #E31E24;
    font-weight: 700;
    font-size: 1.05em;
}
.medbold {
    color: #393185;
    font-weight: 700;
    font-size: 1.05em;
}

/* Обновленные стили для контейнера пароля */
.password-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

/* Стили для отображаемого поля */
.password-display {
    width: 100%;
    padding: 13px 45px 13px 16px !important;
    border: 1px solid #c3d8ff;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.15s;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    color: #0f2c4e;
    margin-bottom: 0 !important;
}

.password-display:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

/* Наш кастомный глазик */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 18px;
    transition: color 0.3s;
    z-index: 10;
}

.toggle-password:hover {
    color: #E31E24;
}

/* Убираем старые стили для input[type="password"] в контейнере */
.password-container input[type="password"]:not(#real-password) {
    /* оставляем только для видимого поля */
}

/* Стили для контейнера выбора пользователя */
.select-container {
    margin-bottom: 20px;
    width: 100%;
}

.select-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.select-hint i {
    font-size: 12px;
    color: #3b82f6;
}

/* Стили для Select2 */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 48px;
    border-radius: 8px;
    border-color: #c3d8ff;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 48px;
    padding-left: 16px;
    font-size: 15px;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 46px;
}

.select2-dropdown {
    border-color: #c3d8ff;
    border-radius: 8px;
}

.select2-container--bootstrap-5 .select2-results__option {
    padding: 10px 16px;
    font-size: 14px;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #e3f2fd;
    color: #1e40af;
}

/* Стили для временных подсказок */
.temporary-hint {
    animation: fadeInOut 3s ease-in-out;
}

.custom-error {
    margin-bottom: 20px;
    animation: shake 0.5s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    15% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Стили для disabled полей */
.password-display:disabled {
    background-color: #f5f7fa;
    cursor: not-allowed;
    color: #94a3b8;
}

/* Стили для активной кнопки */
.btn-submit:disabled {
    background: linear-gradient(to right, #b0c4de, #9bb6d0);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}