
    /* Основные стили для контейнера */
.container-content {
    max-width: 400px;
    margin: 50px auto;
    padding: 40px 30px;
    background: #ffffff;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    /* Добавляем для центрирования */
    position: relative;
    z-index: 1;
}

/* Заголовок */
.login-text {
    font-size: 28px;
    font-weight: 700;
    color: #003964;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Группа формы */
.form-group {
    margin-bottom: 15px;
}
/*
    .form-group label {
        display: block;
        font-size: 16px;
        font-weight: 600;
        color: #333;
        margin-bottom: 8px;
    }
*/
/* Поле ввода телефона */
.form-tel {
    width: 100%;
    font-size: 18px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    box-sizing: border-box;
    border: 1px solid #cbd8e0;
    height: 54px;
    border-radius: 4px;
    padding: 0 15px;
    font-weight: 400;
}

.form-tel:focus {
    outline: none;
    border-color: #003964;
    background: #ffffff;
}

.form-tel::placeholder {
    color: #819DB2;
}

/* Кнопка входа */
.custom-button {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    color: #ffffff;
    background: #003964;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 700;
}

.custom-button:hover {
    background: #346184;
}

.custom-button:active {
    transform: translateY(0);
}

.custom-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Основные настройки страницы */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Контейнер для фона */
.container-lk {
    background: #f5f9fc;
    width: 100%;
    max-width: 1744px; /* Меняем width на max-width */
    margin: 0 auto;
    padding: 15px 60px;
    font-size: 14px;
    color: #003964;
    flex: 1;
    box-sizing: border-box;
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем содержимое по горизонтали */
    /*    justify-content: center;  Центрируем содержимое по вертикали */
}

/* Контейнер для центрирования формы */
.login-container-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex: 1;
    padding: 20px;
}

/* Адаптивность для container-content */
@media (max-width: 480px) {
    .container-content {
        /*    margin: 20px;   */
        padding: 30px 20px;
        /*    width: calc(100% - 40px);   */
    }

    .login-text {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .form-tel {
        padding: 12px 14px;
        font-size: 16px;
    }

    .custom-button {
        padding: 14px;
        font-size: 16px;
    }

    .container-lk {
        padding: 15px 20px;
        margin: 0 10px;
    }
}

/* Адаптивность для больших экранов */
@media (max-width: 1800px) {
    .container-lk {
        max-width: calc(100% - 180px);
        margin: 0 90px;
    }
}

@media (max-width: 1200px) {
    .container-lk {
        max-width: calc(100% - 100px);
        margin: 0 50px;
    }
}

@media (max-width: 768px) {
    .container-lk {
        max-width: calc(100% - 40px);
        margin: 0 20px;
        padding: 15px 20px;
    }
}

/* Дополнительные стили для улучшения UX */
.agree-text {
    font-size: 14px;
    /*    color: #666;   */
    line-height: 1.4;
}

.mb-0_5 {
    margin-bottom: 5px;
}

.mb-1 {
    margin-bottom: 10px;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 25px;
}

/* Стили для состояния загрузки */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Валидация */
.form-tel.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.form-tel.success {
    border-color: #28a745;
    background: #f8fff9;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

/* Информационный блок внизу формы */
.login-info {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
}

.info-text {
    font-size: 14px;
    color: #819db2;
    line-height: 1.5;
    margin: 0;
}

.info-link {
    color: #003964;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.info-link:hover {
    color: #346184;
    text-decoration: underline;
}

/* ===== Адаптивность для новых элементов ===== */

@media (max-width: 768px) {
    .login-subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .login-info {
        margin-top: 20px;
        padding-top: 20px;
    }

    .info-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .login-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .login-info {
        margin-top: 16px;
        padding-top: 16px;
    }

    .info-text {
        font-size: 12px;
    }
}






    /* Для мобильных устройств */
    @media (max-width: 992px) {
        .loans__item-document a {
            color: white;
            text-decoration: none;
        }

        .loans__item-document a:hover {
            color: white;
            text-decoration: underline;
        }
    }




    .table__active-loans-items.no-contracts {
        display: flex;
        width: 100%;
    }

    .loans__item-full-width {
        width: 100%;
        grid-column: 1 / -1;
        text-align: center;
        padding: 20px;
        font-size: 16px;
        color: #666;
    }

    /* Или альтернативный вариант через flex
    .table__active-loans-items.no-contracts {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        min-height: 80px;
    }
    */


    .loans__item-full-width {
        flex: 1;
        text-align: center;
    }







    .header__user-name {
        position: relative;
        cursor: pointer;
    }

    .user-dropdown-menu {
        position: absolute;
        top: calc(100% + 17px);  /* ← добавляем 5px отступа сверху */
        right: 0;
        background: white;
        border: 1px solid #e0e0e0;
/*        border-radius: 8px;  */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        min-width: 160px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1000;
    }

    .user-dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 10px 16px;
        color: #003964;
        text-decoration: none;
        transition: background-color 0.2s;
        border: none;
        background: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
        font-size: 14px;
    }

    .dropdown-item:hover {
        background-color: #f5f5f5;
    }

    .dropdown-form {
        margin: 0;
    }

    .logout-btn {
        border-top: 1px solid #f0f0f0;
        color: #df2222;
    }

    .logout-btn:hover {
        background-color: #ffebee;
    }

    .user-dropdown-menu svg {
        flex-shrink: 0;
    }





    /* Явные тестовые стили */
    .status-green {
        color: #22c55e !important;
    }

    .status-red {
        color: #e02222 !important;
    }

    .status-gray {
        color: #6b7280 !important;
    }

    .status-default {
        color: #000000 !important;
    }





    .contract-link:hover {
        color: #007bff!important;
        text-decoration: none !important; /* Убираем подчеркивание */
    }

    .header__user-name:hover {
        color: #007bff!important;
        text-decoration: none;
    }





    .contract-link {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        color: #003964;
        transition: color 0.3s ease;
    }

    .blinking-arrow {
        display: inline-block !important;
        animation: blink 2s infinite;
        color: #003964;
        text-decoration: none !important;
    }

    @keyframes blink {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.3; }
    }




    .loan__buttons-row {
        display: flex;
        gap: 15px;
        margin-top: 20px;
    }

    .loan__btn {
        background: #003964;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 0.3125rem;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: center;
        font-weight: 700;
    }

    .loan__btn:hover {
        background: #346184;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    /* Для мобильных устройств */
    @media (max-width: 768px) {
        .loan__buttons-row {
            flex-direction: column;
            gap: 10px;
        }

        .loan__btn {
            padding: 14px 20px;
            font-size: 15px;
        }
    }

    .loan__pdf-item a:hover {
        color: #e02222 !important;
    }

    .loan__pdf-item a.contract-link {
        display: block;      /* ссылка занимает весь блок */
        width: 100%;
        height: 100%;
        text-decoration: none; /* убрать стандартное подчеркивание */
        color: inherit;        /* чтобы цвет текста наследовался */
        cursor: pointer;
    }




    #preloader {
        background: #fff;
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }
    .spinner {
        width: 70px;
        height: 70px;
        border: 10px solid #e0e0e0;
        border-top: 10px solid #003964;
        border-radius: 70%;
        animation: spin 0.8s ease-in-out infinite;
    }
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }



    /*
        .popup__body {
            padding: 20px;
        }

        .popup__head {
            text-align: center!important;
        }
         */

    /* Кнопка закрытия справа */
    .popup__footer {
        display: flex;
        justify-content: flex-end;
        margin-top: 25px;
        padding-top: 20px;
    }

    .form-group-custom {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
    }

    .form-group-custom .form-control {
        flex: 1;
    }

    .table.text-class {
        width: 100%;
        border-collapse: collapse;
        margin-top: 15px;
    }

    .table.text-class th,
    .table.text-class td {
        padding: 10px;
        border-bottom: 1px solid #e5e7eb;
        text-align: left;
    }

    .table.text-class th {
        background-color: #f8f9fa;
        font-weight: 600;
    }

    .text-right {
        text-align: right!important;
    }

    .text-gray {
        color: #819db2;
    }

    /* Стили для формы расчета */
    .form-group-custom {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .form-group-custom .form-control {
        flex: 1;
        min-width: 200px;
        padding: 12px 16px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        font-size: 14px;
        background: white;
        transition: all 0.3s ease;
    }

    .form-group-custom .form-control:focus {
        outline: none;
        border-color: #003964;
        box-shadow: 0 0 0 3px rgba(0, 57, 100, 0.1);
    }

    /* Стили для кнопки расчета */
    .popup-button {
        background: #003964;
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .popup-button:hover:not(:disabled) {
        background: #002b4d;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .popup-button:disabled {
        background: #9ca3af;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    /* Стили для кнопки закрытия */
    .popup__footer .btn {
        background: #6b7280;
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 14px;
        cursor: pointer;
    }

    .popup__footer .btn:hover {
        background: #4b5563;
    }

    /* Стили для Flatpickr */
    .flatpickr-calendar {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .flatpickr-day.selected {
        background: #003964;
        border-color: #003964;
    }

    .flatpickr-day.today {
        border-color: #003964;
    }

    .flatpickr-day:hover {
        background: #f3f4f6;
    }

    /* Стили для спиннера */
    .spinner-border-sm {
        width: 16px;
        height: 16px;
    }

    /* Адаптивность */
    @media (max-width: 576px) {
        .form-group-custom {
            flex-direction: column;
            align-items: stretch;
        }

        .form-group-custom .form-control {
            min-width: auto;
        }

        #calculateBtn {
            justify-content: center;
        }
    }
    /* Стили для кнопки закрытия */
    .btn-close-fancybox {
        background: #6b7280;
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        min-width: 120px;
    }

    .btn-close-fancybox:hover {
        background: #4b5563;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    /* Или используйте тот же стиль что и у кнопки расчета */
    .btn-secondary {
        background: #6b7280;
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        min-width: 120px;
    }

    .btn-secondary:hover {
        background: #4b5563;
    }

    .btn-primary2 {
        background: #003964;
        color: white;
        border: none;
        padding: 18px 32px;
        cursor: pointer;
        min-width: 120px;
        border-radius: 4px;
        font-size: 16px;
        font-weight: 700;
    }

    .btn-primary2:hover {
        background: #346184;
    }

    /* Альтернативный стиль - прозрачный с рамкой */
    .btn-outline {
        background: transparent;
        color: #003964;
        border: 2px solid #003964;
        padding: 10px 22px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-outline:hover {
        background: #003964;
        color: white;
    }

    /* Кастомный спиннер */
    .custom-spinner {
        width: 16px;
        height: 16px;
        border: 2px solid transparent;
        border-top: 2px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        display: none;
    }

    .custom-spinner:not(.d-none) {
        display: inline-block !important;
    }

    .d-none {
        display: none !important;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    /* Стили для кнопки */
    .btn-calculate {
        display: flex;
        align-items: center;
        gap: 8px;
        position: relative;
        min-width: 120px;
        justify-content: center;
    }




    /* Вертикальная группа форм */
    .form-group-custom-vertical {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin: 20px 0;
    }

    .form-group-custom-vertical .form-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .form-label {
        font-weight: 500;
        color: #003964;
        font-size: 14px;
    }

    /* Сетка для результатов */
    .results-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0;
    }

    @media (min-width: 480px) {
        .results-grid {
            grid-template-columns: 1fr 1fr;
        }
    }

    .result-item {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .result-input {
        font-size: 16px;
        color: #003964;
        font-weight: 500;
    }

    /* Вторичная кнопка расчета */
    .btn-secondary {
        background: #6b7280;
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%;
        margin: 15px 0;
    }

    .btn-secondary:hover:not(:disabled) {
        background: #4b5563;
    }

    .btn-secondary:disabled {
        background: #9ca3af;
        cursor: not-allowed;
    }

    /* Текст с предупреждением */
    .disclaimer {
        color: #819db2;
        font-size: 13px;
        text-align: center;
        margin-top: 20px;
        font-style: italic;
    }

    /* Адаптивность */
    @media (max-width: 576px) {
        .form-group-custom-vertical {
            gap: 12px;
        }

        .results-grid {
            grid-template-columns: 1fr;
        }

        .graph-container {
            padding: 15px;
        }
    }




    .pagination__item._active .pagination__link {
        background: #003964;
        color: #fff;
    }

    .pagination__item._active .pagination__link:hover {
        background: #002b4d;
        cursor: default;
    }





    /* Активный пункт */
    .menu-item.active a {
        border-bottom: 2px solid #df2222;
        font-weight: 600;
    }

    .messages__item-arrow svg {
        transition: transform 0.3s ease;
    }


    .header__user-icon-link {
        display: inline-block;
        text-decoration: none;
        position: relative;
    }
    .header__user-icon-link:hover .header__user-icon {
        opacity: 0.6;
    }


    @media (min-width: 992px) {
        .header .contacts .phone.has-user {
            margin-right: 20px!important;
        }
    }
    .header .contacts .phone {
        margin-right: 0px!important;
    }



    .chat__block-message-customer {
        margin-right: clamp( 0.0000000625rem , -10.5652758325rem + 52.8263794751vw ,48.5rem)!important;
    }
    .chat__block-message-admin {
        margin-left: clamp(.0000000625rem ,-10.5652758325rem + 52.8263794751vw ,48.5rem)!important;
        margin-right: 20px;
    }



    .btn-sm {
        max-width: 100px!important;
        padding: 3px!important;
        min-width: 100px!important;
        text-transform: none !important;
    }









    /* Кастомные кнопки для страницы ошибки */
    /* Кастомные кнопки для страницы ошибки */
    .error-page__actions {
        margin: 50px 0;
        text-align: center;
        gap: 20px; /* Расстояние между кнопками */
    }

    /* Адаптивность для мобильных */
    @media (max-width: 768px) {
        .error-page__actions {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

    }

    /* Стили для контейнера ошибки */
    .error-page__alert {
        margin: 40px 0;
        padding: 20px;
/*        border-radius: 12px;    */
        background: linear-gradient(711deg, #fff5f5 0%, #fed7d7 100%);
/*        border-left: 4px solid #e53e3e; */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .error-page__alert h4 {
        color: #c53030;
        margin-bottom: 15px;
        font-size: 18px;
        font-weight: 600;
    }

    .error-page__alert p {
        font-size: 16px;
        margin-bottom: 10px;
        color: #2d3748;
    }

    .error-page__alert ul {
        font-size: 14px;
        color: #4a5568;
        margin-left: 20px;
        margin-top: 10px;
    }

    .error-page__alert li {
        margin-bottom: 5px;
        position: relative;
    }

    .error-page__alert li:before {
        content: "•";
        color: #e53e3e;
        font-weight: bold;
        position: absolute;
        left: -15px;
    }

    .blue-btn {
        color: #fff;
        width: 257px;
        height: 55px;
        background: #003964;
        border-radius: 4px;
        font-size: 18px;
        font-weight: 700;
        padding: 12px 24px;
    }
    .blue-btn:hover {
        background: #346184;
    }