/**
 * COMBINED CSS FILE
 * Generated: 2025-04-02 11:03:24
 * 
 * This file includes CSS from:
 *  * - search_tenders.css
 * - icons.css
 * - modern_search.css
 * - search_modals.css
 * - regions_limit.css
 * - my_searches/styles.css
 */


/* ===================== START: search_tenders.css ===================== */

/* Основные стили */
body {
    font-family: Arial, sans-serif;
    color: #343a40;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Стили для формы поиска */
.fixed-search-container {
    position: sticky;
    top: 0;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.search-container-left {
    max-width: 800px;
    margin: 0 auto;
}

/* Стили для кнопок */
.button-style {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #6c757d;
    background-color: #f8f9fa;
    color: #000;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.button-style:hover {
    background-color: #e9ecef;
    color: #000;
}

.common-button {
    background-color: #007bff;
    color: #fff;
    border: none;
}

.common-button:hover {
    background-color: #0056b3;
    color: #fff;
}

.save-button {
    background-color: #28a745;
    color: #ffffff;
    border: 1px solid #28a745;
}

.save-button:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Стили для полей ввода */
.form-control {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* Стили для выпадающих списков */
.dropdown {
    position: relative;
    z-index: 1000;
    overflow: visible;
    margin-bottom: 15px;
}

.dropdown-button {
    position: relative;
    z-index: 1001;
    width: 100%;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-content {
    position: fixed !important;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 99999 !important;
    display: none;
        opacity: 0;
    visibility: hidden;
    transition: 
        opacity 0.2s ease, 
        visibility 0.2s ease;
    overflow-y: auto;
    max-height: 300px;
    padding: 8px;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    will-change: transform !important;
}

.dropdown-content.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 99999 !important;
}

/* Стили для результатов поиска */
.search-results {
    margin-top: 30px;
    transition: transform 0.3s ease-out;
}

.search-results.shifted {
    transform: translateY(-20px);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.results-header h4 {
    margin: 0;
    color: #0d6efd;
    font-weight: 600;
}

.results-header span {
    color: #6c757d;
    font-weight: 500;
}

.results-container {
    display: grid;
    gap: 20px;
}



/* Анимации */
.dropdown-button,
.btn {
    transition: all 0.2s ease;
}

.dropdown-button:hover,
.btn:hover {
    transform: translateY(-1px);
}



/* Иконки в кнопках */
.btn i {
    margin-right: 5px;
}

/* Улучшенные стили для формы */
.form-group label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Стили для кнопок */
.btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn i {
    font-size: 0.9em;
}

/* Кнопки прокрутки */
.scroll-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.scroll-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007bff;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.scroll-button:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.scroll-button i {
    font-size: 1.2em;
}

/* Адаптивность для кнопок прокрутки */
@media (max-width: 768px) {
    .scroll-buttons {
        right: 10px;
        bottom: 10px;
    }

    .scroll-button {
        width: 35px;
        height: 35px;
    }
}

/* Улучшенные стили для поля поиска */
.basic-search .form-control {
    border-radius: 8px;
    padding: 12px 40px 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.basic-search .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    border-color: #86b7fe;
}

.basic-search .btn-link {
    color: #6c757d;
    background: none;
    border: none;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 5;
}

.basic-search .btn-link:hover,
.basic-search .btn-link.active {
    color: #0d6efd;
}

.basic-search .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.basic-search .btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Улучшенные стили для результатов поиска */
.empty-state {
    display: flex;
    flex-direction: column;
        align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.empty-state i {
    font-size: 3em;
    margin-bottom: 15px;
    color: #6c757d;
}

.empty-state p {
    font-size: 1.1em;
    color: #6c757d;
    max-width: 400px;
    margin: 0 auto;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
}

.loading-indicator p {
    margin-top: 15px;
    font-size: 1.1em;
    color: #0d6efd;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(13, 110, 253, 0.2);
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
    background-color: #fff8f8;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #ffcccc;
}

.error-message i {
    color: #dc3545;
    margin-bottom: 15px;
}

.error-message p {
    font-size: 1.1em;
    color: #dc3545;
    max-width: 500px;
    margin: 0 auto;
}

.filters-grid {
    position: relative;
    z-index: 50;
}

.filter-card {
    position: relative;
    z-index: 10;
    overflow: visible;
}

.filter-card-body {
    position: relative;
    z-index: 20;
    overflow: visible;
}

.filter-button .filter-badge {
    margin-left: 5px;
    font-size: 0.7em;
    padding: 2px 5px;
    vertical-align: super;
}

/* Базовые адаптивные стили для контейнера */
.container {
    width: 100%;
    max-width: 1200px;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Адаптивная сетка для фильтров */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 768px) {
    /* Общее уменьшение масштаба для всех элементов */
    .container,
    .search-container,
    .search-form,
    .advanced-search-section,
    .filter-card {
        transform: scale(0.9);
        transform-origin: top center;
        width: 110%; /* Компенсация уменьшения масштаба */
        margin-left: -5%; /* Центрирование */
    }
    
    /* Контейнер результатов поиска - без масштабирования */
    .search-results {
        transform: none !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 20px !important;
        overflow: hidden !important;
    }
    
    /* Контейнер с результатами - без масштабирования */
    .results-container {
        transform: none !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow: hidden !important;
    }

    /* Адаптивные размеры шрифтов */
    body {
        font-size: 14px;
    }

    /* Кнопки */
    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Поля ввода */
    .form-control {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* Модальные окна */
    .modal-dialog {
        max-width: 95%;
        margin: 1.75rem auto;
    }

    .modal-content {
        width: 100%;
    }

    /* Флексибельная сетка */
    .filters-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    /* Адаптивное размещение элементов */
    .search-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .search-actions button {
        width: 100%;
        margin-bottom: 10px;
    }



    /* Адаптивные отступы */
    .mt-mobile-10 {
        margin-top: 10px;
    }

    .mb-mobile-10 {
        margin-bottom: 10px;
    }

    /* Адаптивные кнопки */
    .btn-mobile-block {
    width: 100%;
        display: block;
    }

    /* Адаптивный текст */
    .text-mobile-center {
        text-align: center;
    }
    
    /* Все внутренние элементы контейнера результатов должны быть полной ширины */
    .search-results .results-header,
    .search-results .search-actions-panel,
    .search-results .batch-actions-panel,
    .search-results .selection-controls,
    .search-results .analytics-panel,
    .search-results .results-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Адаптивность для планшетов */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }

    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }


}

/* Медиа-запросы для различных размеров экрана */
@media (max-width: 375px) {
    /* Еще более компактные стили для очень маленьких экранов */
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    /* Контейнер результатов поиска для очень маленьких экранов */
    .search-results {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-top: 10px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .search-results .results-header,
    .search-results .search-actions-panel,
    .search-results .batch-actions-panel,
    .search-results .selection-controls,
    .search-results .analytics-panel,
    .search-results .results-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
    
    .container {
        padding: 5px;
    }

    .form-control {
        font-size: 11px;
        padding: 5px 8px;
    }

    .btn {
        font-size: 11px;
        padding: 6px 10px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }
}

/* Дополнительные стили для экранов 480px */
@media (max-width: 480px) {
    .search-results {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-top: 15px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .search-results .results-header,
    .search-results .search-actions-panel,
    .search-results .batch-actions-panel,
    .search-results .selection-controls,
    .search-results .analytics-panel,
    .search-results .results-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (min-width: 1025px) {
    /* Стили для больших экранов */
    .container {
        max-width: 1200px;
    }

    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Флексибельные элементы */
.flex-mobile-column {
    display: flex;
    flex-direction: column;
}

.flex-mobile-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Адаптивные отступы */
.p-mobile-10 {
    padding: 10px;
}

.m-mobile-10 {
    margin: 10px;
}

/* Адаптивная типографика */
@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1.1rem; }
}

/* Адаптивные медиа-элементы */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Улучшенная адаптивность для инпутов и кнопок */
input, 
button, 
select, 
textarea {
    max-width: 100%;
    box-sizing: border-box;
}

/* Responsive touch targets */
@media (max-width: 768px) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Критически важные стили для секции расширенного поиска */
.advanced-search-section {
    position: relative;
    z-index: 1050 !important; /* Очень высокий z-index */
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin-top: 15px;
    padding: 15px;
    pointer-events: auto;
    transition: none !important; /* Отключаем все переходы */
}

/* Специфические стили для свернутого состояния с высоким весом селектора */
.advanced-search-section.collapsed,
body .advanced-search-section.collapsed,
#search-form .advanced-search-section.collapsed {
    display: none !important; /* Полностью скрываем секцию */
    visibility: hidden !important;
    pointer-events: none !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

/* Специфические стили для развернутого состояния */
.advanced-search-section:not(.collapsed) {
    display: block !important; /* Гарантируем отображение */
    visibility: visible !important;
    pointer-events: auto !important;
    max-height: 2000px !important; /* Достаточно большая высота */
    opacity: 1 !important;
    overflow: visible !important;
}

/* Стили для кнопки "Показать еще" */
#load-more-btn {
    display: none;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#load-more-btn:hover {
    background-color: #0056b3;
}

#load-more-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* ===================== END: search_tenders.css ===================== */

/* ===================== START: icons.css ===================== */

/* Стили для иконок */
.icon-highlight {
    color: #0d6efd;
    font-size: 1.2em;
    margin-right: 0.5rem;
}

.btn .icon-highlight {
    margin-right: 0.3rem;
}

.advanced-search-button .fas {
    font-size: 1.5em !important;
    color: #0d6efd !important;
    transition: transform 0.3s ease;
}

.advanced-search-button.active .fas {
    transform: rotate(180deg);
}

.results-header i {
    color: #0d6efd;
}

.empty-state i {
    font-size: 3em;
    margin-bottom: 1rem;
    color: #6c757d;
}

/* Анимация для иконок при наведении */
.btn:hover .fas,
.dropdown-button:hover .fas {
    transition: transform 0.2s ease;
}

/* Стили для иконки расширенного поиска */
#advanced-search-button .fas {
    font-size: 1.5em;
    color: #007bff !important;
    transition: color 0.2s ease;
}

#advanced-search-button:hover .fas {
    color: #dc3545 !important;
}

#advanced-search-button.active .fas {
    color: #007bff !important;
}

/* Стили для изображения иконки расширенного поиска */
.search-icon {
    width: 24px;
    height: 24px;
    transition: color 0.2s ease;
}

#advanced-search-button:hover .search-icon {
    color: #dc3545 !important;
}

#advanced-search-button.active .search-icon {
    color: #007bff !important;
}

/* ===================== END: icons.css ===================== */

/* ===================== START: modern_search.css ===================== */

/* Современный дизайн для поиска */
:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --card-radius: 8px;
    --transition-speed: 0.3s;
}

/* Основные стили для контейнера поиска */
.modern-search {
    font-family: 'Roboto', Arial, sans-serif;
}

/* Новый компактный дизайн для расширенного поиска */
.advanced-search-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1100; /* Увеличиваем z-index выше перекрывающих элементов */
    overflow: visible;
    display: block;
    height: auto;
    width: auto;
}

.advanced-search-section.collapsed {
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    border: none;
    box-shadow: none;
}

.advanced-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1001;
}

.advanced-search-header h4 {
    margin: 0;
    color: #333;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    position: relative;
    z-index: 1002;
}

.close-button:hover {
    color: #333;
}

.advanced-search-body {
    display: flex;
    gap: 20px;
    position: relative;
    z-index: 1001;
}

.advanced-filters-panel {
    flex: 2;
    position: relative;
    z-index: 1002;
}

.filter-group {
    margin-bottom: 20px;
    position: relative;
    z-index: 1003;
}

.filter-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #333;
    position: relative;
    z-index: 1004;
}

.filter-group-body {
    position: relative;
    z-index: 1004;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 1005;
}

.filter-chip {
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1006;
}

.filter-chip:hover {
    background: #e0e0e0;
}

/* Добавляем правила для полей ввода */
.advanced-search-section input,
.advanced-search-section textarea,
.advanced-search-section select,
.advanced-search-section button {
    position: relative;
    z-index: 1150; /* Даем еще более высокий z-index элементам внутри */
    pointer-events: auto !important;
    opacity: 1 !important;
}

.advanced-search-section .form-floating {
    position: relative;
    z-index: 1005;
}

.advanced-search-section .form-check {
    position: relative;
    z-index: 1005;
}

/* Добавляем правила для модальных окон */
.modal {
    z-index: 2000;
}

.modal-backdrop {
    z-index: 1900;
}

.preview-panel {
    flex: 1;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #333;
}

.filter-group-header i {
    color: #666;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #e0e0e0;
}

.filter-badge {
    background: #007bff;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8em;
}

.preview-section {
    margin-bottom: 15px;
}

.preview-label {
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

.preview-value {
    color: #333;
}

.preview-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Обеспечиваем корректную работу полей ввода в расширенном поиске */
.advanced-search-section input,
.advanced-search-section textarea,
.advanced-search-section select,
.advanced-search-section button {
    pointer-events: auto !important; /* Принудительно делаем элементы интерактивными */
    opacity: 1 !important; /* Убеждаемся что элементы видны */
    position: relative; /* Помогает с наслоением элементов */
}

/* Исправление для модальных кнопок в расширенном поиске */
.filter-chip {
    position: relative;
    z-index: 1200; /* Самый высокий z-index для чипов фильтров */
    pointer-events: auto !important; /* Гарантируем что кнопка кликабельна */
    cursor: pointer !important;
}

/* Обеспечиваем видимость и интерактивность модальных окон */
.modal {
    z-index: 1050 !important; /* Повышаем z-index для модальных окон */
}

/* Стили для корректной работы модальных окон выбора фильтров */
.modal-content {
    position: relative;
    z-index: 2100;
}

/* Обеспечиваем активность полей ввода в модальных окнах */
.modal-body input,
.modal-body .filter-search {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Исправляем стили для переключателя "Только активные" */
.form-check-input {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Исправляем отображение для контейнера с результатами в модальных окнах */
.filter-items-container {
    max-height: 300px;
    overflow-y: auto;
    position: relative;
    z-index: 100;
}

/* Новая компактная сетка фильтров */
.filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* Новый стиль карточек фильтров */
.filter-card {
    flex: 1 0 200px;
    max-width: 300px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    overflow: visible;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.filter-card:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.filter-card.inactive {
    opacity: 0.5;
    pointer-events: none;
    transform: scale(0.98);
}

.filter-card.active-dropdown {
    z-index: 1000;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

/* Компактный заголовок карточки */
.filter-card-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background-color: #f1f3f5;
    border-bottom: 1px solid var(--border-color);
    border-radius: 6px 6px 0 0;
}

.filter-card-header i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 14px;
}

.filter-card-header span {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

/* Компактное тело карточки */
.filter-card-body {
    padding: 8px 10px;
    position: relative;
    overflow: visible;
}

/* Стили для выпадающих списков */
.filter-card .dropdown {
    position: relative;
    width: 100%;
    overflow: visible;
}

.filter-card .dropdown-button {
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
    background-color: white;
    border: 1px solid #ced4da;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
}

.filter-card .dropdown-button:hover {
    background-color: #f8f9fa;
}

.filter-card .dropdown-button:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    transition: transform 0.2s ease;
}

.filter-card .dropdown-button.active:after {
    transform: rotate(180deg);
}

.filter-card .dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
    padding: 8px;
    margin-top: 2px;
}

/* Показываем выпадающий список */
.filter-card .dropdown-content.show {
    display: block;
    z-index: 9999;
}

/* Стили для поля поиска внутри выпадающего списка */
.dropdown-search {
    width: 100%;
    padding: 6px 8px;
    margin-bottom: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
}

.dropdown-search:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для элементов выпадающего списка */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f1f3f5;
}

.dropdown-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Стили для карточки исключений */
.exclusion-card {
    flex: 1 0 100%;
    max-width: 100%;
}

.exclusion-card textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.exclusion-card textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для кнопок действий */
.search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.search-actions button {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.search-actions button i {
    margin-right: 6px;
}

.search-actions .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.search-actions .btn-primary:hover {
    background-color: var(--primary-hover);
}

.search-actions .btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.search-actions .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters-grid {
        flex-direction: column;
    }
    
    .filter-card {
        max-width: 100%;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-actions button {
        width: 100%;
    }
}

/* Заголовок фильтров */
.modern-filters .filters-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modern-filters .filters-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
}

.modern-filters .filters-header h4 i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 18px;
}

/* Сетка фильтров */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    z-index: 50;
}

/* Карточка фильтра */
.filter-card {
    background-color: white;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    overflow: visible;
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
    position: relative;
    z-index: 10;
}

.filter-card:hover {
    box-shadow: 0 4px 8px var(--shadow-color);
    transform: translateY(-2px);
}

/* Заголовок карточки фильтра */
.filter-card-header {
    background-color: var(--light-gray);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.filter-card-header i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 14px;
}

.filter-card-header span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Тело карточки фильтра */
.filter-card-body {
    padding: 10px;
    position: relative;
    z-index: 20;
    overflow: visible;
}

.filter-card .dropdown {
    position: relative;
    z-index: 50;
    overflow: visible;
}

.filter-card .dropdown-button {
    position: relative;
    z-index: 51;
}

.filter-card .dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    z-index: 1100;
    overflow: visible;
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Карточка исключений */
.exclusion-card {
    grid-column: 1 / -1;
}

.exclusion-card textarea {
    min-height: 60px;
    resize: vertical;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    width: 100%;
}

.exclusion-card textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    outline: none;
}

/* Стили для выпадающих списков */
.modern-filters .dropdown {
    position: relative;
    z-index: 1000;
    overflow: visible;
}

.modern-filters .dropdown-button {
    position: relative;
    z-index: 1001;
    width: 100%;
    text-align: left;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.modern-filters .dropdown-button:hover {
    background-color: var(--light-gray);
    border-color: var(--dark-gray);
}

.modern-filters .dropdown-button:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    transition: transform var(--transition-speed);
}

.modern-filters .dropdown-button.active:after {
    transform: rotate(180deg);
}

.modern-filters .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1100;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 
        opacity 0.2s ease, 
        visibility 0.2s ease, 
        transform 0.2s ease;
    overflow: visible;
}

.modern-filters .dropdown-content.show {
    display: block;
    opacity: 1;
    visibility: visible;
    z-index: 1100;
    overflow: visible;
}

/* Поле поиска в выпадающем списке */
.modern-filters .dropdown-search {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
}

.modern-filters .dropdown-search:focus {
    border-bottom-color: var(--primary-color);
    outline: none;
}

/* Элементы выпадающего списка */
.modern-filters .dropdown-item {
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.modern-filters .dropdown-item:hover {
    background-color: var(--light-gray);
}

.modern-filters .dropdown-item input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

/* Поля ввода */
.modern-filters input[type="number"],
.modern-filters input[type="date"] {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}

.modern-filters input[type="number"]:focus,
.modern-filters input[type="date"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    outline: none;
}

/* Кнопки действий */
.modern-filters .search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.modern-filters .search-actions button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed);
}

.modern-filters .search-actions button i {
    margin-right: 6px;
}

.modern-filters .search-actions .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.modern-filters .search-actions .btn-primary:hover {
    background-color: #3367d6;
    border-color: #3367d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modern-filters .search-actions .btn-outline-secondary {
    color: var(--dark-gray);
    border-color: var(--dark-gray);
}

.modern-filters .search-actions .btn-outline-secondary:hover {
    background-color: var(--dark-gray);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .modern-filters .search-actions {
        flex-direction: column;
    }
    
    .modern-filters .search-actions button {
        width: 100%;
    }
}

/* Глобальные стили для выпадающих списков с максимальным приоритетом */
.dropdown-content {
    position: absolute !important;
    z-index: 99999 !important;
    display: none !important;
    background-color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 4px !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    padding: 8px !important;
    margin: 0 !important;
    min-width: 200px !important;
    width: 100% !important;
    left: 0 !important;
    top: 100% !important;
}

.dropdown-content.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 99999 !important;
}

/* Стили для элементов выпадающего списка */
.dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 6px 8px !important;
    margin-bottom: 2px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
}

.dropdown-item input[type="checkbox"] {
    margin-right: 8px !important;
}

/* Стили для поля поиска внутри выпадающего списка */
.dropdown-search {
    width: 100% !important;
    padding: 6px 8px !important;
    margin-bottom: 8px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    font-size: 13px !important;
}

/* Стили для контейнера, чтобы он не перекрывал выпадающие списки */
.container {
    position: relative;
    z-index: 1;
}

/* Стили для основного контейнера поиска */
.search-container {
    position: relative;
    z-index: 1;
}

/* Стили для модальных окон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modal-appear 0.3s ease;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
}

.modal-close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.modal-close-button:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-footer button {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-footer .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.modal-footer .btn-primary:hover {
    background-color: #3367d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.modal-footer .btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Стили для содержимого модального окна */
.modal-body .dropdown-content {
    position: static !important;
    display: block !important;
    box-shadow: none !important;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-height: none !important;
    overflow-y: auto;
    padding: 10px;
    width: 100% !important;
    z-index: 1 !important;
}

.modal-body .dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.modal-body label {
    display: block;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal-body label:hover {
    background-color: #f5f5f5;
}

.modal-body input[type="checkbox"] {
    margin-right: 8px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 130px);
    }
}

/* Стили для новой секции расширенного поиска */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filters-header button {
    padding: 5px 10px;
    font-size: 12px;
}

.filter-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.filter-button i {
    margin-right: 8px;
    color: var(--primary-color);
}

.filter-button.has-selection {
    background-color: #e8f0fe;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.price-range, .date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input, .date-input {
    flex: 1;
}

.price-separator {
    color: #6c757d;
    font-weight: 500;
}

.date-input label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #6c757d;
}

.additional-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 8px;
}

.form-check-label {
    font-size: 14px;
    color: #333;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .price-range, .date-range {
        flex-direction: column;
        gap: 5px;
    }
    
    .price-separator {
        display: none;
    }
    
    .date-input {
        width: 100%;
    }
}

/* Стили для свернутого состояния секции расширенного поиска */
.advanced-search-section.collapsed .filters-grid,
.advanced-search-section.collapsed .search-actions {
    display: none;
}

.advanced-search-section.collapsed {
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.advanced-search-section.collapsed .filters-header {
    margin-bottom: 0;
}

.advanced-search-section.collapsed .filters-header h4 {
    font-size: 16px;
}

/* Анимация для секции расширенного поиска */
.advanced-search-section {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Стили для модальных окон Bootstrap */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 15px 20px;
}

.modal-title {
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

.filter-items-container {
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.filter-item:hover {
    background-color: #f8f9fa;
}

.filter-item input[type="checkbox"] {
    margin-right: 10px;
}

.filter-search {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    width: 100%;
}

.filter-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
    outline: none;
}

/* Стили для выбранных ИНН */
#selected-inns {
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.selected-inn-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #e8f0fe;
    border-radius: 4px;
    margin-bottom: 8px;
}

.selected-inn-item .remove-inn {
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
}

.selected-inn-item .remove-inn:hover {
    color: #bd2130;
}

/* Стили для переключателя "Отметить все" / "Снять" */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 5px 10px;
    border-radius: 15px;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

.toggle-switch.active {
    background-color: #007bff;
}

.toggle-switch .toggle-knob {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    margin-right: 8px;
}

.toggle-switch.active .toggle-knob {
    transform: translateX(5px);
}

.toggle-switch .toggle-label {
    font-size: 14px;
    color: #333;
    transition: color 0.3s ease;
}

.toggle-switch.active .toggle-label {
    color: #fff;
}

/* ===================== END: modern_search.css ===================== */

/* ===================== START: search_modals.css ===================== */

/* Современные стили для модальных окон 2024 */
.modal-content {
    background: #fff;
    border: none;
    border-radius: 15px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.modal-content:hover {
    transform: translateZ(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1e3a8a;
    border-bottom: none;
    padding: 20px 24px;
    position: relative;
    border-radius: 15px 15px 0 0 !important;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e3c72, #2a5298, #1e3c72);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.modal-header .btn-close {
    color: #1e3a8a;
    font-size: 1rem;
    opacity: 0.9;
    transition: all 0.3s;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    padding: 10px;
    margin: 0;
    position: relative;
    width: 24px;
    height: 24px;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background: rgba(30, 58, 138, 0.2);
}

.modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
    color: #1e3a8a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.modal-title i {
    background: rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px);
}

.modal-body {
    padding: 30px;
    background-color: white;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    background-color: #f8faff;
    justify-content: space-between;
    border-radius: 0 0 15px 15px;
}

/* Современные стили для поиска */
.search-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.input-group {
    border: 1px solid rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group-text {
    background: transparent;
    border: none;
}

.search-wrapper .input-group:focus-within {
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.1);
    transform: translateY(-2px);
}

.search-wrapper .input-group-text {
    background-color: #ffffff;
    border: none;
    color: #1e3c72;
    padding-left: 20px;
    font-size: 1.1rem;
}

.filter-search {
    border: none;
    padding: 15px 18px;
    font-size: 1rem;
    background-color: #ffffff;
}

.filter-search:focus {
    box-shadow: none;
}

.filter-search::placeholder {
    color: #a8b3cf;
    font-weight: 300;
}

/* Современные стили для контейнера элементов */
.filter-items-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 14px;
    background-color: #f5f7ff;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #2a5298 #f5f7ff;
    border: 1px solid rgba(30, 60, 114, 0.1);
    transition: all 0.3s ease;
}

.filter-items-container::-webkit-scrollbar {
    width: 6px;
}

.filter-items-container::-webkit-scrollbar-track {
    background: #f5f7ff;
    border-radius: 10px;
}

.filter-items-container::-webkit-scrollbar-thumb {
    background-color: #2a5298;
    border-radius: 10px;
    background-image: linear-gradient(180deg, #1e3c72, #2a5298);
}

/* Современные стили для элементов списка */
.filter-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-check {
    padding: 12px 18px;
    margin: 0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
    transform-style: preserve-3d;
}

.form-check:hover {
    background-color: #ffffff;
    border-color: rgba(30, 60, 114, 0.1);
    transform: translateX(4px) translateZ(5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.2em;
    border: 2px solid rgba(30, 60, 114, 0.3);
    cursor: pointer;
    border-radius: 6px;
}

.form-check-input:checked {
    background-color: #1e3c72;
    border-color: #1e3c72;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-label {
    font-size: 1rem;
    margin-left: 8px;
    cursor: pointer;
    font-weight: 400;
    color: #445277;
}

/* Современные стили для индикатора загрузки */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.4), rgba(191, 219, 254, 0.3));
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.loading-indicator .spinner-border {
    width: 45px;
    height: 45px;
    color: #1e3c72;
    border-width: 3px;
    animation-duration: 1.2s;
}

.loading-indicator p {
    font-size: 1rem;
    margin-top: 16px;
    color: #1e3a8a;
    font-weight: 500;
}

/* Современные стили для разделителя */
.filter-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1), rgba(30, 60, 114, 0.1));
    margin: 20px 0;
    border-radius: 1px;
}

/* Современные стили для "Выбрать все" */
.select-all-wrapper {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 60, 114, 0.1);
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.select-all-wrapper:hover {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    transform: translateX(4px);
}

.select-all-counter {
    color: #445277;
    font-size: 0.875rem;
    margin-left: 8px;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Современные стили для контейнера выбранных ИНН */
.section-title {
    font-size: 1.1rem;
    color: #445277;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.section-title i {
    color: #3bc374;
    margin-right: 10px;
    background: rgba(59, 195, 116, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-inns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 70px;
    padding: 16px;
    border: 1px dashed rgba(30, 60, 114, 0.3);
    border-radius: 14px;
    background-color: #f5f7ff;
    transition: all 0.3s ease;
}

.selected-inns-container:empty::after {
    content: 'Пока не выбрано ни одного ИНН';
    color: #a8b3cf;
    font-style: italic;
    width: 100%;
    text-align: center;
    padding: 10px;
}

.selected-inn-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    margin: 5px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.6), rgba(191, 219, 254, 0.5));
    border-radius: 20px;
    font-size: 0.9rem;
    color: #1e3a8a;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-inn-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.remove-inn {
    margin-left: 8px;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #1e3a8a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-inn:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

/* Современные стили для кнопок */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.btn-secondary {
    background: linear-gradient(145deg, #f0f4ff, #e6eeff);
    border: 1px solid rgba(30, 58, 138, 0.1);
    color: #1e3a8a;
}

.btn-secondary:hover {
    background: linear-gradient(145deg, #f5f9ff, #edf3ff);
    border-color: rgba(30, 58, 138, 0.2);
}

.btn-primary {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    opacity: 0.95;
}

.btn i {
    margin-right: 8px;
    font-size: 0.9rem;
}

/* Стили для компактной секции расширенного поиска */
.advanced-search-compact-section {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.advanced-search-section:not(.collapsed) {
    /* Удаляем анимацию slideDown */
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: white;
    padding: 15px 20px;
}

.advanced-search-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.advanced-search-header h5 i {
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close-advanced-search {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-advanced-search:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.advanced-search-body {
    display: flex;
    padding: 0;
}

/* Стили для левой панели с фильтрами */
.advanced-filters-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 20px;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.advanced-filters-panel:hover {
    transform: translateZ(5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.filter-group {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(30, 58, 138, 0.05);
}

.filter-group-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-group-header:hover {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.85), rgba(191, 219, 254, 0.8));
}

.filter-group-header i {
    margin-right: 10px;
    color: #1e3a8a;
}

.filter-group-body {
    padding: 15px 20px;
    background-color: white;
}

/* Стили для фильтров-чипсов */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    color: #1e3a8a;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.7), rgba(191, 219, 254, 0.6));
}

.filter-chip i {
    margin-right: 8px;
    font-size: 0.85rem;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #1e3a8a;
    color: white;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* Стили для правой панели с предпросмотром */
.preview-panel {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.preview-panel:hover {
    transform: translateZ(5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.preview-header {
    padding: 15px 20px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.preview-header h6 {
    margin: 0;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.preview-header h6 i {
    margin-right: 10px;
}

.preview-body {
    padding: 20px;
    background: white;
}

.preview-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
}

.preview-section:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.preview-value {
    color: #445277;
    font-size: 0.95rem;
}

.preview-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Обеспечиваем корректную работу полей ввода в расширенном поиске */
.advanced-search-section input,
.advanced-search-section textarea,
.advanced-search-section select,
.advanced-search-section button {
    pointer-events: auto !important; /* Принудительно делаем элементы интерактивными */
    opacity: 1 !important; /* Убеждаемся что элементы видны */
    position: relative; /* Помогает с наслоением элементов */
}

/* Исправление для модальных кнопок в расширенном поиске */
.filter-chip {
    position: relative;
    z-index: 1200; /* Самый высокий z-index для чипов фильтров */
    pointer-events: auto !important; /* Гарантируем что кнопка кликабельна */
    cursor: pointer !important;
}

/* Обеспечиваем видимость и интерактивность модальных окон */
.modal {
    z-index: 1050 !important; /* Повышаем z-index для модальных окон */
}

/* Стили для корректной работы модальных окон выбора фильтров */
.modal-content {
    position: relative;
    z-index: 2100;
}

/* Обеспечиваем активность полей ввода в модальных окнах */
.modal-body input,
.modal-body .filter-search {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Исправляем стили для переключателя "Только активные" */
.form-check-input {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Исправляем отображение для контейнера с результатами в модальных окнах */
.filter-items-container {
    max-height: 300px;
    overflow-y: auto;
    position: relative;
    z-index: 100;
}

/* Новая компактная сетка фильтров */
.filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* Новый стиль карточек фильтров */
.filter-card {
    flex: 1 0 200px;
    max-width: 300px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    overflow: visible;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.filter-card:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.filter-card.inactive {
    opacity: 0.5;
    pointer-events: none;
    transform: scale(0.98);
}

.filter-card.active-dropdown {
    z-index: 1000;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

/* Компактный заголовок карточки */
.filter-card-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background-color: #f1f3f5;
    border-bottom: 1px solid var(--border-color);
    border-radius: 6px 6px 0 0;
}

.filter-card-header i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 14px;
}

.filter-card-header span {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

/* Компактное тело карточки */
.filter-card-body {
    padding: 8px 10px;
    position: relative;
    overflow: visible;
}

/* Стили для выпадающих списков */
.filter-card .dropdown {
    position: relative;
    width: 100%;
    overflow: visible;
}

.filter-card .dropdown-button {
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
    background-color: white;
    border: 1px solid #ced4da;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
}

.filter-card .dropdown-button:hover {
    background-color: #f8f9fa;
}

.filter-card .dropdown-button:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    transition: transform 0.2s ease;
}

.filter-card .dropdown-button.active:after {
    transform: rotate(180deg);
}

.filter-card .dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
    padding: 8px;
    margin-top: 2px;
}

/* Показываем выпадающий список */
.filter-card .dropdown-content.show {
    display: block;
    z-index: 9999;
}

/* Стили для поля поиска внутри выпадающего списка */
.dropdown-search {
    width: 100%;
    padding: 6px 8px;
    margin-bottom: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
}

.dropdown-search:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для элементов выпадающего списка */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f1f3f5;
}

.dropdown-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Стили для карточки исключений */
.exclusion-card {
    flex: 1 0 100%;
    max-width: 100%;
}

.exclusion-card textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.exclusion-card textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для кнопок действий */
.search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.search-actions button {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.search-actions button i {
    margin-right: 6px;
}

.search-actions .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.search-actions .btn-primary:hover {
    background-color: var(--primary-hover);
}

.search-actions .btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.search-actions .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters-grid {
        flex-direction: column;
    }
    
    .filter-card {
        max-width: 100%;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-actions button {
        width: 100%;
    }
}

/* Заголовок фильтров */
.modern-filters .filters-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modern-filters .filters-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
}

.modern-filters .filters-header h4 i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 18px;
}

/* Сетка фильтров */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    z-index: 50;
}

/* Карточка фильтра */
.filter-card {
    background-color: white;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    overflow: visible;
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
    position: relative;
    z-index: 10;
}

.filter-card:hover {
    box-shadow: 0 4px 8px var(--shadow-color);
    transform: translateY(-2px);
}

/* Заголовок карточки фильтра */
.filter-card-header {
    background-color: var(--light-gray);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.filter-card-header i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 14px;
}

.filter-card-header span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Тело карточки фильтра */
.filter-card-body {
    padding: 10px;
    position: relative;
    z-index: 20;
    overflow: visible;
}

.filter-card .dropdown {
    position: relative;
    z-index: 50;
    overflow: visible;
}

.filter-card .dropdown-button {
    position: relative;
    z-index: 51;
}

.filter-card .dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    z-index: 1100;
    overflow: visible;
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Карточка исключений */
.exclusion-card {
    grid-column: 1 / -1;
}

.exclusion-card textarea {
    min-height: 60px;
    resize: vertical;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    width: 100%;
}

.exclusion-card textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    outline: none;
}

/* Стили для выпадающих списков */
.modern-filters .dropdown {
    position: relative;
    z-index: 1000;
    overflow: visible;
}

.modern-filters .dropdown-button {
    position: relative;
    z-index: 1001;
    width: 100%;
    text-align: left;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.modern-filters .dropdown-button:hover {
    background-color: var(--light-gray);
    border-color: var(--dark-gray);
}

.modern-filters .dropdown-button:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    transition: transform var(--transition-speed);
}

.modern-filters .dropdown-button.active:after {
    transform: rotate(180deg);
}

.modern-filters .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1100;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 
        opacity 0.2s ease, 
        visibility 0.2s ease, 
        transform 0.2s ease;
    overflow: visible;
}

.modern-filters .dropdown-content.show {
    display: block;
    opacity: 1;
    visibility: visible;
    z-index: 1100;
    overflow: visible;
}

/* Поле поиска в выпадающем списке */
.modern-filters .dropdown-search {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
}

.modern-filters .dropdown-search:focus {
    border-bottom-color: var(--primary-color);
    outline: none;
}

/* Элементы выпадающего списка */
.modern-filters .dropdown-item {
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.modern-filters .dropdown-item:hover {
    background-color: var(--light-gray);
}

.modern-filters .dropdown-item input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

/* Поля ввода */
.modern-filters input[type="number"],
.modern-filters input[type="date"] {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}

.modern-filters input[type="number"]:focus,
.modern-filters input[type="date"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    outline: none;
}

/* Кнопки действий */
.modern-filters .search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.modern-filters .search-actions button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed);
}

.modern-filters .search-actions button i {
    margin-right: 6px;
}

.modern-filters .search-actions .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.modern-filters .search-actions .btn-primary:hover {
    background-color: #3367d6;
    border-color: #3367d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modern-filters .search-actions .btn-outline-secondary {
    color: var(--dark-gray);
    border-color: var(--dark-gray);
}

.modern-filters .search-actions .btn-outline-secondary:hover {
    background-color: var(--dark-gray);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .modern-filters .search-actions {
        flex-direction: column;
    }
    
    .modern-filters .search-actions button {
        width: 100%;
    }
}

/* Глобальные стили для выпадающих списков с максимальным приоритетом */
.dropdown-content {
    position: absolute !important;
    z-index: 99999 !important;
    display: none !important;
    background-color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 4px !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    padding: 8px !important;
    margin: 0 !important;
    min-width: 200px !important;
    width: 100% !important;
    left: 0 !important;
    top: 100% !important;
}

.dropdown-content.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 99999 !important;
}

/* Стили для элементов выпадающего списка */
.dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 6px 8px !important;
    margin-bottom: 2px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
}

.dropdown-item input[type="checkbox"] {
    margin-right: 8px !important;
}

/* Стили для поля поиска внутри выпадающего списка */
.dropdown-search {
    width: 100% !important;
    padding: 6px 8px !important;
    margin-bottom: 8px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    font-size: 13px !important;
}

/* Стили для контейнера, чтобы он не перекрывал выпадающие списки */
.container {
    position: relative;
    z-index: 1;
}

/* Стили для основного контейнера поиска */
.search-container {
    position: relative;
    z-index: 1;
}

/* Стили для модальных окон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modal-appear 0.3s ease;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
}

.modal-close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.modal-close-button:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-footer button {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-footer .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.modal-footer .btn-primary:hover {
    background-color: #3367d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.modal-footer .btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Стили для содержимого модального окна */
.modal-body .dropdown-content {
    position: static !important;
    display: block !important;
    box-shadow: none !important;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-height: none !important;
    overflow-y: auto;
    padding: 10px;
    width: 100% !important;
    z-index: 1 !important;
}

.modal-body .dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.modal-body label {
    display: block;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal-body label:hover {
    background-color: #f5f5f5;
}

.modal-body input[type="checkbox"] {
    margin-right: 8px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 130px);
    }
}

/* Стили для новой секции расширенного поиска */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filters-header button {
    padding: 5px 10px;
    font-size: 12px;
}

.filter-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.filter-button i {
    margin-right: 8px;
    color: var(--primary-color);
}

.filter-button.has-selection {
    background-color: #e8f0fe;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.price-range, .date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input, .date-input {
    flex: 1;
}

.price-separator {
    color: #6c757d;
    font-weight: 500;
}

.date-input label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #6c757d;
}

.additional-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 8px;
}

.form-check-label {
    font-size: 14px;
    color: #333;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .price-range, .date-range {
        flex-direction: column;
        gap: 5px;
    }
    
    .price-separator {
        display: none;
    }
    
    .date-input {
        width: 100%;
    }
}

/* Стили для свернутого состояния секции расширенного поиска */
.advanced-search-section.collapsed .filters-grid,
.advanced-search-section.collapsed .search-actions {
    display: none;
}

.advanced-search-section.collapsed {
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.advanced-search-section.collapsed .filters-header {
    margin-bottom: 0;
}

.advanced-search-section.collapsed .filters-header h4 {
    font-size: 16px;
}

/* Анимация для секции расширенного поиска */
.advanced-search-section {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Стили для модальных окон Bootstrap */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 15px 20px;
}

.modal-title {
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

.filter-items-container {
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.filter-item:hover {
    background-color: #f8f9fa;
}

.filter-item input[type="checkbox"] {
    margin-right: 10px;
}

.filter-search {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    width: 100%;
}

.filter-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
    outline: none;
}

/* Стили для выбранных ИНН */
#selected-inns {
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.selected-inn-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #e8f0fe;
    border-radius: 4px;
    margin-bottom: 8px;
}

.selected-inn-item .remove-inn {
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
}

.selected-inn-item .remove-inn:hover {
    color: #bd2130;
}

/* Стили для переключателя "Отметить все" / "Снять" */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 5px 10px;
    border-radius: 15px;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

.toggle-switch.active {
    background-color: #007bff;
}

.toggle-switch .toggle-knob {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    margin-right: 8px;
}

.toggle-switch.active .toggle-knob {
    transform: translateX(5px);
}

.toggle-switch .toggle-label {
    font-size: 14px;
    color: #333;
    transition: color 0.3s ease;
}

.toggle-switch.active .toggle-label {
    color: #fff;
}

/* ===================== END: modern_search.css ===================== */

/* ===================== START: search_modals.css ===================== */

/* Современные стили для модальных окон 2024 */
.modal-content {
    background: #fff;
    border: none;
    border-radius: 15px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.modal-content:hover {
    transform: translateZ(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1e3a8a;
    border-bottom: none;
    padding: 20px 24px;
    position: relative;
    border-radius: 15px 15px 0 0 !important;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e3c72, #2a5298, #1e3c72);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.modal-header .btn-close {
    color: #1e3a8a;
    font-size: 1rem;
    opacity: 0.9;
    transition: all 0.3s;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    padding: 10px;
    margin: 0;
    position: relative;
    width: 24px;
    height: 24px;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background: rgba(30, 58, 138, 0.2);
}

.modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
    color: #1e3a8a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.modal-title i {
    background: rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px);
}

.modal-body {
    padding: 30px;
    background-color: white;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    background-color: #f8faff;
    justify-content: space-between;
    border-radius: 0 0 15px 15px;
}

/* Современные стили для поиска */
.search-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.input-group {
    border: 1px solid rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group-text {
    background: transparent;
    border: none;
}

.search-wrapper .input-group:focus-within {
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.1);
    transform: translateY(-2px);
}

.search-wrapper .input-group-text {
    background-color: #ffffff;
    border: none;
    color: #1e3c72;
    padding-left: 20px;
    font-size: 1.1rem;
}

.filter-search {
    border: none;
    padding: 15px 18px;
    font-size: 1rem;
    background-color: #ffffff;
}

.filter-search:focus {
    box-shadow: none;
}

.filter-search::placeholder {
    color: #a8b3cf;
    font-weight: 300;
}

/* Современные стили для контейнера элементов */
.filter-items-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 14px;
    background-color: #f5f7ff;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #2a5298 #f5f7ff;
    border: 1px solid rgba(30, 60, 114, 0.1);
    transition: all 0.3s ease;
}

.filter-items-container::-webkit-scrollbar {
    width: 6px;
}

.filter-items-container::-webkit-scrollbar-thumb {
    background-color: #2a5298;
    border-radius: 10px;
    background-image: linear-gradient(180deg, #1e3c72, #2a5298);
}

/* Современные стили для элементов списка */
.filter-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-check {
    padding: 12px 18px;
    margin: 0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
    transform-style: preserve-3d;
}

.form-check:hover {
    background-color: #ffffff;
    border-color: rgba(30, 60, 114, 0.1);
    transform: translateX(4px) translateZ(5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.2em;
    border: 2px solid rgba(30, 60, 114, 0.3);
    cursor: pointer;
    border-radius: 6px;
}

.form-check-input:checked {
    background-color: #1e3c72;
    border-color: #1e3c72;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-label {
    font-size: 1rem;
    margin-left: 8px;
    cursor: pointer;
    font-weight: 400;
    color: #445277;
}

/* Современные стили для индикатора загрузки */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.4), rgba(191, 219, 254, 0.3));
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.loading-indicator .spinner-border {
    width: 45px;
    height: 45px;
    color: #1e3c72;
    border-width: 3px;
    animation-duration: 1.2s;
}

.loading-indicator p {
    font-size: 1rem;
    margin-top: 16px;
    color: #1e3a8a;
    font-weight: 500;
}

/* Современные стили для разделителя */
.filter-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1), rgba(30, 60, 114, 0.1));
    margin: 20px 0;
    border-radius: 1px;
}

/* Современные стили для "Выбрать все" */
.select-all-wrapper {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 60, 114, 0.1);
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.select-all-wrapper:hover {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    transform: translateX(4px);
}

.select-all-counter {
    color: #445277;
    font-size: 0.875rem;
    margin-left: 8px;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Современные стили для контейнера выбранных ИНН */
.section-title {
    font-size: 1.1rem;
    color: #445277;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.section-title i {
    color: #3bc374;
    margin-right: 10px;
    background: rgba(59, 195, 116, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-inns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 70px;
    padding: 16px;
    border: 1px dashed rgba(30, 60, 114, 0.3);
    border-radius: 14px;
    background-color: #f5f7ff;
    transition: all 0.3s ease;
}

.selected-inns-container:empty::after {
    content: 'Пока не выбрано ни одного ИНН';
    color: #a8b3cf;
    font-style: italic;
    width: 100%;
    text-align: center;
    padding: 10px;
}

.selected-inn-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    margin: 5px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.6), rgba(191, 219, 254, 0.5));
    border-radius: 20px;
    font-size: 0.9rem;
    color: #1e3a8a;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-inn-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.remove-inn {
    margin-left: 8px;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #1e3a8a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-inn:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

/* Современные стили для кнопок */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.btn-secondary {
    background: linear-gradient(145deg, #f0f4ff, #e6eeff);
    border: 1px solid rgba(30, 58, 138, 0.1);
    color: #1e3a8a;
}

.btn-secondary:hover {
    background: linear-gradient(145deg, #f5f9ff, #edf3ff);
    border-color: rgba(30, 58, 138, 0.2);
}

.btn-primary {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    opacity: 0.95;
}

.btn i {
    margin-right: 8px;
    font-size: 0.9rem;
}

/* Стили для компактной секции расширенного поиска */
.advanced-search-compact-section {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.advanced-search-section:not(.collapsed) {
    /* Удаляем анимацию slideDown */
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: white;
    padding: 15px 20px;
}

.advanced-search-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.advanced-search-header h5 i {
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close-advanced-search {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-advanced-search:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.advanced-search-body {
    display: flex;
    padding: 0;
}

/* Стили для левой панели с фильтрами */
.advanced-filters-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 20px;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.advanced-filters-panel:hover {
    transform: translateZ(5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.filter-group {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(30, 58, 138, 0.05);
}

.filter-group-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-group-header:hover {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.85), rgba(191, 219, 254, 0.8));
}

.filter-group-header i {
    margin-right: 10px;
    color: #1e3a8a;
}

.filter-group-body {
    padding: 15px 20px;
    background-color: white;
}

/* Стили для фильтров-чипсов */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    color: #1e3a8a;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.7), rgba(191, 219, 254, 0.6));
}

.filter-chip i {
    margin-right: 8px;
    font-size: 0.85rem;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #1e3a8a;
    color: white;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* Стили для правой панели с предпросмотром */
.preview-panel {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.preview-panel:hover {
    transform: translateZ(5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.preview-header {
    padding: 15px 20px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.preview-header h6 {
    margin: 0;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.preview-header h6 i {
    margin-right: 10px;
}

.preview-body {
    padding: 20px;
    background: white;
}

.preview-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
}

.preview-section:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.preview-value {
    color: #445277;
    font-size: 0.95rem;
}

.preview-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Обеспечиваем корректную работу полей ввода в расширенном поиске */
.advanced-search-section input,
.advanced-search-section textarea,
.advanced-search-section select,
.advanced-search-section button {
    pointer-events: auto !important; /* Принудительно делаем элементы интерактивными */
    opacity: 1 !important; /* Убеждаемся что элементы видны */
    position: relative; /* Помогает с наслоением элементов */
}

/* Исправление для модальных кнопок в расширенном поиске */
.filter-chip {
    position: relative;
    z-index: 1200; /* Самый высокий z-index для чипов фильтров */
    pointer-events: auto !important; /* Гарантируем что кнопка кликабельна */
    cursor: pointer !important;
}

/* Обеспечиваем видимость и интерактивность модальных окон */
.modal {
    z-index: 1050 !important; /* Повышаем z-index для модальных окон */
}

/* Стили для корректной работы модальных окон выбора фильтров */
.modal-content {
    position: relative;
    z-index: 2100;
}

/* Обеспечиваем активность полей ввода в модальных окнах */
.modal-body input,
.modal-body .filter-search {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Исправляем стили для переключателя "Только активные" */
.form-check-input {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Исправляем отображение для контейнера с результатами в модальных окнах */
.filter-items-container {
    max-height: 300px;
    overflow-y: auto;
    position: relative;
    z-index: 100;
}

/* Новая компактная сетка фильтров */
.filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* Новый стиль карточек фильтров */
.filter-card {
    flex: 1 0 200px;
    max-width: 300px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    overflow: visible;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.filter-card:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.filter-card.inactive {
    opacity: 0.5;
    pointer-events: none;
    transform: scale(0.98);
}

.filter-card.active-dropdown {
    z-index: 1000;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

/* Компактный заголовок карточки */
.filter-card-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background-color: #f1f3f5;
    border-bottom: 1px solid var(--border-color);
    border-radius: 6px 6px 0 0;
}

.filter-card-header i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 14px;
}

.filter-card-header span {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

/* Компактное тело карточки */
.filter-card-body {
    padding: 8px 10px;
    position: relative;
    overflow: visible;
}

/* Стили для выпадающих списков */
.filter-card .dropdown {
    position: relative;
    width: 100%;
    overflow: visible;
}

.filter-card .dropdown-button {
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
    background-color: white;
    border: 1px solid #ced4da;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
}

.filter-card .dropdown-button:hover {
    background-color: #f8f9fa;
}

.filter-card .dropdown-button:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    transition: transform 0.2s ease;
}

.filter-card .dropdown-button.active:after {
    transform: rotate(180deg);
}

.filter-card .dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
    padding: 8px;
    margin-top: 2px;
}

/* Показываем выпадающий список */
.filter-card .dropdown-content.show {
    display: block;
    z-index: 9999;
}

/* Стили для поля поиска внутри выпадающего списка */
.dropdown-search {
    width: 100%;
    padding: 6px 8px;
    margin-bottom: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
}

.dropdown-search:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для элементов выпадающего списка */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f1f3f5;
}

.dropdown-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Стили для карточки исключений */
.exclusion-card {
    flex: 1 0 100%;
    max-width: 100%;
}

.exclusion-card textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.exclusion-card textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для кнопок действий */
.search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.search-actions button {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.search-actions button i {
    margin-right: 6px;
}

.search-actions .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.search-actions .btn-primary:hover {
    background-color: var(--primary-hover);
}

.search-actions .btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.search-actions .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters-grid {
        flex-direction: column;
    }
    
    .filter-card {
        max-width: 100%;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-actions button {
        width: 100%;
    }
}

/* Заголовок фильтров */
.modern-filters .filters-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modern-filters .filters-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
}

.modern-filters .filters-header h4 i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 18px;
}

/* Сетка фильтров */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    z-index: 50;
}

/* Карточка фильтра */
.filter-card {
    background-color: white;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    overflow: visible;
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
    position: relative;
    z-index: 10;
}

.filter-card:hover {
    box-shadow: 0 4px 8px var(--shadow-color);
    transform: translateY(-2px);
}

/* Заголовок карточки фильтра */
.filter-card-header {
    background-color: var(--light-gray);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.filter-card-header i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 14px;
}

.filter-card-header span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Тело карточки фильтра */
.filter-card-body {
    padding: 10px;
    position: relative;
    z-index: 20;
    overflow: visible;
}

.filter-card .dropdown {
    position: relative;
    z-index: 50;
    overflow: visible;
}

.filter-card .dropdown-button {
    position: relative;
    z-index: 51;
}

.filter-card .dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    z-index: 1100;
    overflow: visible;
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Карточка исключений */
.exclusion-card {
    grid-column: 1 / -1;
}

.exclusion-card textarea {
    min-height: 60px;
    resize: vertical;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    width: 100%;
}

.exclusion-card textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    outline: none;
}

/* Стили для выпадающих списков */
.modern-filters .dropdown {
    position: relative;
    z-index: 1000;
    overflow: visible;
}

.modern-filters .dropdown-button {
    position: relative;
    z-index: 1001;
    width: 100%;
    text-align: left;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.modern-filters .dropdown-button:hover {
    background-color: var(--light-gray);
    border-color: var(--dark-gray);
}

.modern-filters .dropdown-button:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    transition: transform var(--transition-speed);
}

.modern-filters .dropdown-button.active:after {
    transform: rotate(180deg);
}

.modern-filters .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1100;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 
        opacity 0.2s ease, 
        visibility 0.2s ease, 
        transform 0.2s ease;
    overflow: visible;
}

.modern-filters .dropdown-content.show {
    display: block;
    opacity: 1;
    visibility: visible;
    z-index: 1100;
    overflow: visible;
}

/* Поле поиска в выпадающем списке */
.modern-filters .dropdown-search {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
}

.modern-filters .dropdown-search:focus {
    border-bottom-color: var(--primary-color);
    outline: none;
}

/* Элементы выпадающего списка */
.modern-filters .dropdown-item {
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.modern-filters .dropdown-item:hover {
    background-color: var(--light-gray);
}

.modern-filters .dropdown-item input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

/* Поля ввода */
.modern-filters input[type="number"],
.modern-filters input[type="date"] {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}

.modern-filters input[type="number"]:focus,
.modern-filters input[type="date"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    outline: none;
}

/* Кнопки действий */
.modern-filters .search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.modern-filters .search-actions button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed);
}

.modern-filters .search-actions button i {
    margin-right: 6px;
}

.modern-filters .search-actions .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.modern-filters .search-actions .btn-primary:hover {
    background-color: #3367d6;
    border-color: #3367d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modern-filters .search-actions .btn-outline-secondary {
    color: var(--dark-gray);
    border-color: var(--dark-gray);
}

.modern-filters .search-actions .btn-outline-secondary:hover {
    background-color: var(--dark-gray);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .modern-filters .search-actions {
        flex-direction: column;
    }
    
    .modern-filters .search-actions button {
        width: 100%;
    }
}

/* Глобальные стили для выпадающих списков с максимальным приоритетом */
.dropdown-content {
    position: absolute !important;
    z-index: 99999 !important;
    display: none !important;
    background-color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 4px !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    padding: 8px !important;
    margin: 0 !important;
    min-width: 200px !important;
    width: 100% !important;
    left: 0 !important;
    top: 100% !important;
}

.dropdown-content.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 99999 !important;
}

/* Стили для элементов выпадающего списка */
.dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 6px 8px !important;
    margin-bottom: 2px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
}

.dropdown-item input[type="checkbox"] {
    margin-right: 8px !important;
}

/* Стили для поля поиска внутри выпадающего списка */
.dropdown-search {
    width: 100% !important;
    padding: 6px 8px !important;
    margin-bottom: 8px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    font-size: 13px !important;
}

/* Стили для контейнера, чтобы он не перекрывал выпадающие списки */
.container {
    position: relative;
    z-index: 1;
}

/* Стили для основного контейнера поиска */
.search-container {
    position: relative;
    z-index: 1;
}

/* Стили для модальных окон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modal-appear 0.3s ease;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
}

.modal-close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.modal-close-button:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-footer button {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-footer .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.modal-footer .btn-primary:hover {
    background-color: #3367d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.modal-footer .btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Стили для содержимого модального окна */
.modal-body .dropdown-content {
    position: static !important;
    display: block !important;
    box-shadow: none !important;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-height: none !important;
    overflow-y: auto;
    padding: 10px;
    width: 100% !important;
    z-index: 1 !important;
}

.modal-body .dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.modal-body label {
    display: block;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal-body label:hover {
    background-color: #f5f5f5;
}

.modal-body input[type="checkbox"] {
    margin-right: 8px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 130px);
    }
}

/* Стили для новой секции расширенного поиска */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filters-header button {
    padding: 5px 10px;
    font-size: 12px;
}

.filter-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.filter-button i {
    margin-right: 8px;
    color: var(--primary-color);
}

.filter-button.has-selection {
    background-color: #e8f0fe;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.price-range, .date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input, .date-input {
    flex: 1;
}

.price-separator {
    color: #6c757d;
    font-weight: 500;
}

.date-input label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #6c757d;
}

.additional-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 8px;
}

.form-check-label {
    font-size: 14px;
    color: #333;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .price-range, .date-range {
        flex-direction: column;
        gap: 5px;
    }
    
    .price-separator {
        display: none;
    }
    
    .date-input {
        width: 100%;
    }
}

/* Стили для свернутого состояния секции расширенного поиска */
.advanced-search-section.collapsed .filters-grid,
.advanced-search-section.collapsed .search-actions {
    display: none;
}

.advanced-search-section.collapsed {
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.advanced-search-section.collapsed .filters-header {
    margin-bottom: 0;
}

.advanced-search-section.collapsed .filters-header h4 {
    font-size: 16px;
}

/* Анимация для секции расширенного поиска */
.advanced-search-section {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Стили для модальных окон Bootstrap */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 15px 20px;
}

.modal-title {
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

.filter-items-container {
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.filter-item:hover {
    background-color: #f8f9fa;
}

.filter-item input[type="checkbox"] {
    margin-right: 10px;
}

.filter-search {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    width: 100%;
}

.filter-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
    outline: none;
}

/* Стили для выбранных ИНН */
#selected-inns {
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.selected-inn-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #e8f0fe;
    border-radius: 4px;
    margin-bottom: 8px;
}

.selected-inn-item .remove-inn {
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
}

.selected-inn-item .remove-inn:hover {
    color: #bd2130;
}

/* Стили для переключателя "Отметить все" / "Снять" */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 5px 10px;
    border-radius: 15px;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

.toggle-switch.active {
    background-color: #007bff;
}

.toggle-switch .toggle-knob {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    margin-right: 8px;
}

.toggle-switch.active .toggle-knob {
    transform: translateX(5px);
}

.toggle-switch .toggle-label {
    font-size: 14px;
    color: #333;
    transition: color 0.3s ease;
}

.toggle-switch.active .toggle-label {
    color: #fff;
}

/* ===================== END: modern_search.css ===================== */

/* ===================== START: search_modals.css ===================== */

/* Современные стили для модальных окон 2024 */
.modal-content {
    background: #fff;
    border: none;
    border-radius: 15px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.modal-content:hover {
    transform: translateZ(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1e3a8a;
    border-bottom: none;
    padding: 20px 24px;
    position: relative;
    border-radius: 15px 15px 0 0 !important;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e3c72, #2a5298, #1e3c72);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.modal-header .btn-close {
    color: #1e3a8a;
    font-size: 1rem;
    opacity: 0.9;
    transition: all 0.3s;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    padding: 10px;
    margin: 0;
    position: relative;
    width: 24px;
    height: 24px;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background: rgba(30, 58, 138, 0.2);
}

.modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
    color: #1e3a8a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.modal-title i {
    background: rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px);
}

.modal-body {
    padding: 30px;
    background-color: white;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    background-color: #f8faff;
    justify-content: space-between;
    border-radius: 0 0 15px 15px;
}

/* Современные стили для поиска */
.search-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.input-group {
    border: 1px solid rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group-text {
    background: transparent;
    border: none;
}

.search-wrapper .input-group:focus-within {
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.1);
    transform: translateY(-2px);
}

.search-wrapper .input-group-text {
    background-color: #ffffff;
    border: none;
    color: #1e3c72;
    padding-left: 20px;
    font-size: 1.1rem;
}

.filter-search {
    border: none;
    padding: 15px 18px;
    font-size: 1rem;
    background-color: #ffffff;
}

.filter-search:focus {
    box-shadow: none;
}

.filter-search::placeholder {
    color: #a8b3cf;
    font-weight: 300;
}

/* Современные стили для контейнера элементов */
.filter-items-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 14px;
    background-color: #f5f7ff;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #2a5298 #f5f7ff;
    border: 1px solid rgba(30, 60, 114, 0.1);
    transition: all 0.3s ease;
}

.filter-items-container::-webkit-scrollbar {
    width: 6px;
}

.filter-items-container::-webkit-scrollbar-thumb {
    background-color: #2a5298;
    border-radius: 10px;
    background-image: linear-gradient(180deg, #1e3c72, #2a5298);
}

/* Современные стили для элементов списка */
.filter-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-check {
    padding: 12px 18px;
    margin: 0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
    transform-style: preserve-3d;
}

.form-check:hover {
    background-color: #ffffff;
    border-color: rgba(30, 60, 114, 0.1);
    transform: translateX(4px) translateZ(5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.2em;
    border: 2px solid rgba(30, 60, 114, 0.3);
    cursor: pointer;
    border-radius: 6px;
}

.form-check-input:checked {
    background-color: #1e3c72;
    border-color: #1e3c72;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-label {
    font-size: 1rem;
    margin-left: 8px;
    cursor: pointer;
    font-weight: 400;
    color: #445277;
}

/* Современные стили для индикатора загрузки */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.4), rgba(191, 219, 254, 0.3));
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.loading-indicator .spinner-border {
    width: 45px;
    height: 45px;
    color: #1e3c72;
    border-width: 3px;
    animation-duration: 1.2s;
}

.loading-indicator p {
    font-size: 1rem;
    margin-top: 16px;
    color: #1e3a8a;
    font-weight: 500;
}

/* Современные стили для разделителя */
.filter-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1), rgba(30, 60, 114, 0.1));
    margin: 20px 0;
    border-radius: 1px;
}

/* Современные стили для "Выбрать все" */
.select-all-wrapper {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 60, 114, 0.1);
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.select-all-wrapper:hover {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    transform: translateX(4px);
}

.select-all-counter {
    color: #445277;
    font-size: 0.875rem;
    margin-left: 8px;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Современные стили для контейнера выбранных ИНН */
.section-title {
    font-size: 1.1rem;
    color: #445277;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.section-title i {
    color: #3bc374;
    margin-right: 10px;
    background: rgba(59, 195, 116, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-inns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 70px;
    padding: 16px;
    border: 1px dashed rgba(30, 60, 114, 0.3);
    border-radius: 14px;
    background-color: #f5f7ff;
    transition: all 0.3s ease;
}

.selected-inns-container:empty::after {
    content: 'Пока не выбрано ни одного ИНН';
    color: #a8b3cf;
    font-style: italic;
    width: 100%;
    text-align: center;
    padding: 10px;
}

.selected-inn-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    margin: 5px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.6), rgba(191, 219, 254, 0.5));
    border-radius: 20px;
    font-size: 0.9rem;
    color: #1e3a8a;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-inn-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.remove-inn {
    margin-left: 8px;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #1e3a8a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-inn:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

/* Современные стили для кнопок */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.btn-secondary {
    background: linear-gradient(145deg, #f0f4ff, #e6eeff);
    border: 1px solid rgba(30, 58, 138, 0.1);
    color: #1e3a8a;
}

.btn-secondary:hover {
    background: linear-gradient(145deg, #f5f9ff, #edf3ff);
    border-color: rgba(30, 58, 138, 0.2);
}

.btn-primary {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    opacity: 0.95;
}

.btn i {
    margin-right: 8px;
    font-size: 0.9rem;
}

/* Стили для компактной секции расширенного поиска */
.advanced-search-compact-section {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.advanced-search-section:not(.collapsed) {
    /* Удаляем анимацию slideDown */
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: white;
    padding: 15px 20px;
}

.advanced-search-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.advanced-search-header h5 i {
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close-advanced-search {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-advanced-search:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.advanced-search-body {
    display: flex;
    padding: 0;
}

/* Стили для левой панели с фильтрами */
.advanced-filters-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 20px;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.advanced-filters-panel:hover {
    transform: translateZ(5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.filter-group {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(30, 58, 138, 0.05);
}

.filter-group-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-group-header:hover {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.85), rgba(191, 219, 254, 0.8));
}

.filter-group-header i {
    margin-right: 10px;
    color: #1e3a8a;
}

.filter-group-body {
    padding: 15px 20px;
    background-color: white;
}

/* Стили для фильтров-чипсов */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    color: #1e3a8a;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.7), rgba(191, 219, 254, 0.6));
}

.filter-chip i {
    margin-right: 8px;
    font-size: 0.85rem;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #1e3a8a;
    color: white;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* Стили для правой панели с предпросмотром */
.preview-panel {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.preview-panel:hover {
    transform: translateZ(5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.preview-header {
    padding: 15px 20px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.preview-header h6 {
    margin: 0;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.preview-header h6 i {
    margin-right: 10px;
}

.preview-body {
    padding: 20px;
    background: white;
}

.preview-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
}

.preview-section:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.preview-value {
    color: #445277;
    font-size: 0.95rem;
}

.preview-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Обеспечиваем корректную работу полей ввода в расширенном поиске */
.advanced-search-section input,
.advanced-search-section textarea,
.advanced-search-section select,
.advanced-search-section button {
    pointer-events: auto !important; /* Принудительно делаем элементы интерактивными */
    opacity: 1 !important; /* Убеждаемся что элементы видны */
    position: relative; /* Помогает с наслоением элементов */
}

/* Исправление для модальных кнопок в расширенном поиске */
.filter-chip {
    position: relative;
    z-index: 1200; /* Самый высокий z-index для чипов фильтров */
    pointer-events: auto !important; /* Гарантируем что кнопка кликабельна */
    cursor: pointer !important;
}

/* Обеспечиваем видимость и интерактивность модальных окон */
.modal {
    z-index: 1050 !important; /* Повышаем z-index для модальных окон */
}

/* Стили для корректной работы модальных окон выбора фильтров */
.modal-content {
    position: relative;
    z-index: 2100;
}

/* Обеспечиваем активность полей ввода в модальных окнах */
.modal-body input,
.modal-body .filter-search {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Исправляем стили для переключателя "Только активные" */
.form-check-input {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Исправляем отображение для контейнера с результатами в модальных окнах */
.filter-items-container {
    max-height: 300px;
    overflow-y: auto;
    position: relative;
    z-index: 100;
}

/* Новая компактная сетка фильтров */
.filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* Новый стиль карточек фильтров */
.filter-card {
    flex: 1 0 200px;
    max-width: 300px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    overflow: visible;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.filter-card:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.filter-card.inactive {
    opacity: 0.5;
    pointer-events: none;
    transform: scale(0.98);
}

.filter-card.active-dropdown {
    z-index: 1000;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

/* Компактный заголовок карточки */
.filter-card-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background-color: #f1f3f5;
    border-bottom: 1px solid var(--border-color);
    border-radius: 6px 6px 0 0;
}

.filter-card-header i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 14px;
}

.filter-card-header span {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

/* Компактное тело карточки */
.filter-card-body {
    padding: 8px 10px;
    position: relative;
    overflow: visible;
}

/* Стили для выпадающих списков */
.filter-card .dropdown {
    position: relative;
    width: 100%;
    overflow: visible;
}

.filter-card .dropdown-button {
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
    background-color: white;
    border: 1px solid #ced4da;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
}

.filter-card .dropdown-button:hover {
    background-color: #f8f9fa;
}

.filter-card .dropdown-button:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    transition: transform 0.2s ease;
}

.filter-card .dropdown-button.active:after {
    transform: rotate(180deg);
}

.filter-card .dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
    padding: 8px;
    margin-top: 2px;
}

/* Показываем выпадающий список */
.filter-card .dropdown-content.show {
    display: block;
    z-index: 9999;
}

/* Стили для поля поиска внутри выпадающего списка */
.dropdown-search {
    width: 100%;
    padding: 6px 8px;
    margin-bottom: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
}

.dropdown-search:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для элементов выпадающего списка */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f1f3f5;
}

.dropdown-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Стили для карточки исключений */
.exclusion-card {
    flex: 1 0 100%;
    max-width: 100%;
}

.exclusion-card textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.exclusion-card textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для кнопок действий */
.search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.search-actions button {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.search-actions button i {
    margin-right: 6px;
}

.search-actions .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.search-actions .btn-primary:hover {
    background-color: var(--primary-hover);
}

.search-actions .btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.search-actions .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters-grid {
        flex-direction: column;
    }
    
    .filter-card {
        max-width: 100%;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-actions button {
        width: 100%;
    }
}

/* Заголовок фильтров */
.modern-filters .filters-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modern-filters .filters-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
}

.modern-filters .filters-header h4 i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 18px;
}

/* Сетка фильтров */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    z-index: 50;
}

/* Карточка фильтра */
.filter-card {
    background-color: white;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    overflow: visible;
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
    position: relative;
    z-index: 10;
}

.filter-card:hover {
    box-shadow: 0 4px 8px var(--shadow-color);
    transform: translateY(-2px);
}

/* Заголовок карточки фильтра */
.filter-card-header {
    background-color: var(--light-gray);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.filter-card-header i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 14px;
}

.filter-card-header span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Тело карточки фильтра */
.filter-card-body {
    padding: 10px;
    position: relative;
    z-index: 20;
    overflow: visible;
}

.filter-card .dropdown {
    position: relative;
    z-index: 50;
    overflow: visible;
}

.filter-card .dropdown-button {
    position: relative;
    z-index: 51;
}

.filter-card .dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    z-index: 1100;
    overflow: visible;
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Карточка исключений */
.exclusion-card {
    grid-column: 1 / -1;
}

.exclusion-card textarea {
    min-height: 60px;
    resize: vertical;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    width: 100%;
}

.exclusion-card textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    outline: none;
}

/* Стили для выпадающих списков */
.modern-filters .dropdown {
    position: relative;
    z-index: 1000;
    overflow: visible;
}

.modern-filters .dropdown-button {
    position: relative;
    z-index: 1001;
    width: 100%;
    text-align: left;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.modern-filters .dropdown-button:hover {
    background-color: var(--light-gray);
    border-color: var(--dark-gray);
}

.modern-filters .dropdown-button:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    transition: transform var(--transition-speed);
}

.modern-filters .dropdown-button.active:after {
    transform: rotate(180deg);
}

.modern-filters .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1100;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 
        opacity 0.2s ease, 
        visibility 0.2s ease, 
        transform 0.2s ease;
    overflow: visible;
}

.modern-filters .dropdown-content.show {
    display: block;
    opacity: 1;
    visibility: visible;
    z-index: 1100;
    overflow: visible;
}

/* Поле поиска в выпадающем списке */
.modern-filters .dropdown-search {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
}

.modern-filters .dropdown-search:focus {
    border-bottom-color: var(--primary-color);
    outline: none;
}

/* Элементы выпадающего списка */
.modern-filters .dropdown-item {
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.modern-filters .dropdown-item:hover {
    background-color: var(--light-gray);
}

.modern-filters .dropdown-item input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

/* Поля ввода */
.modern-filters input[type="number"],
.modern-filters input[type="date"] {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}

.modern-filters input[type="number"]:focus,
.modern-filters input[type="date"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    outline: none;
}

/* Кнопки действий */
.modern-filters .search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.modern-filters .search-actions button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed);
}

.modern-filters .search-actions button i {
    margin-right: 6px;
}

.modern-filters .search-actions .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.modern-filters .search-actions .btn-primary:hover {
    background-color: #3367d6;
    border-color: #3367d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modern-filters .search-actions .btn-outline-secondary {
    color: var(--dark-gray);
    border-color: var(--dark-gray);
}

.modern-filters .search-actions .btn-outline-secondary:hover {
    background-color: var(--dark-gray);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .modern-filters .search-actions {
        flex-direction: column;
    }
    
    .modern-filters .search-actions button {
        width: 100%;
    }
}

/* Глобальные стили для выпадающих списков с максимальным приоритетом */
.dropdown-content {
    position: absolute !important;
    z-index: 99999 !important;
    display: none !important;
    background-color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 4px !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    padding: 8px !important;
    margin: 0 !important;
    min-width: 200px !important;
    width: 100% !important;
    left: 0 !important;
    top: 100% !important;
}

.dropdown-content.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 99999 !important;
}

/* Стили для элементов выпадающего списка */
.dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 6px 8px !important;
    margin-bottom: 2px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
}

.dropdown-item input[type="checkbox"] {
    margin-right: 8px !important;
}

/* Стили для поля поиска внутри выпадающего списка */
.dropdown-search {
    width: 100% !important;
    padding: 6px 8px !important;
    margin-bottom: 8px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    font-size: 13px !important;
}

/* Стили для контейнера, чтобы он не перекрывал выпадающие списки */
.container {
    position: relative;
    z-index: 1;
}

/* Стили для основного контейнера поиска */
.search-container {
    position: relative;
    z-index: 1;
}

/* Стили для модальных окон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modal-appear 0.3s ease;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
}

.modal-close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.modal-close-button:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-footer button {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-footer .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.modal-footer .btn-primary:hover {
    background-color: #3367d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.modal-footer .btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Стили для содержимого модального окна */
.modal-body .dropdown-content {
    position: static !important;
    display: block !important;
    box-shadow: none !important;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-height: none !important;
    overflow-y: auto;
    padding: 10px;
    width: 100% !important;
    z-index: 1 !important;
}

.modal-body .dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.modal-body label {
    display: block;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal-body label:hover {
    background-color: #f5f5f5;
}

.modal-body input[type="checkbox"] {
    margin-right: 8px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 130px);
    }
}

/* Стили для новой секции расширенного поиска */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filters-header button {
    padding: 5px 10px;
    font-size: 12px;
}

.filter-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.filter-button i {
    margin-right: 8px;
    color: var(--primary-color);
}

.filter-button.has-selection {
    background-color: #e8f0fe;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.price-range, .date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input, .date-input {
    flex: 1;
}

.price-separator {
    color: #6c757d;
    font-weight: 500;
}

.date-input label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #6c757d;
}

.additional-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 8px;
}

.form-check-label {
    font-size: 14px;
    color: #333;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .price-range, .date-range {
        flex-direction: column;
        gap: 5px;
    }
    
    .price-separator {
        display: none;
    }
    
    .date-input {
        width: 100%;
    }
}

/* Стили для свернутого состояния секции расширенного поиска */
.advanced-search-section.collapsed .filters-grid,
.advanced-search-section.collapsed .search-actions {
    display: none;
}

.advanced-search-section.collapsed {
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.advanced-search-section.collapsed .filters-header {
    margin-bottom: 0;
}

.advanced-search-section.collapsed .filters-header h4 {
    font-size: 16px;
}

/* Анимация для секции расширенного поиска */
.advanced-search-section {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Стили для модальных окон Bootstrap */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 15px 20px;
}

.modal-title {
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

.filter-items-container {
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.filter-item:hover {
    background-color: #f8f9fa;
}

.filter-item input[type="checkbox"] {
    margin-right: 10px;
}

.filter-search {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    width: 100%;
}

.filter-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
    outline: none;
}

/* Стили для выбранных ИНН */
#selected-inns {
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.selected-inn-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #e8f0fe;
    border-radius: 4px;
    margin-bottom: 8px;
}

.selected-inn-item .remove-inn {
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
}

.selected-inn-item .remove-inn:hover {
    color: #bd2130;
}

/* Стили для переключателя "Отметить все" / "Снять" */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 5px 10px;
    border-radius: 15px;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

.toggle-switch.active {
    background-color: #007bff;
}

.toggle-switch .toggle-knob {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    margin-right: 8px;
}

.toggle-switch.active .toggle-knob {
    transform: translateX(5px);
}

.toggle-switch .toggle-label {
    font-size: 14px;
    color: #333;
    transition: color 0.3s ease;
}

.toggle-switch.active .toggle-label {
    color: #fff;
}

/* ===================== END: modern_search.css ===================== */

/* ===================== START: search_modals.css ===================== */

/* Современные стили для модальных окон 2024 */
.modal-content {
    background: #fff;
    border: none;
    border-radius: 15px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.modal-content:hover {
    transform: translateZ(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1e3a8a;
    border-bottom: none;
    padding: 20px 24px;
    position: relative;
    border-radius: 15px 15px 0 0 !important;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e3c72, #2a5298, #1e3c72);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.modal-header .btn-close {
    color: #1e3a8a;
    font-size: 1rem;
    opacity: 0.9;
    transition: all 0.3s;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    padding: 10px;
    margin: 0;
    position: relative;
    width: 24px;
    height: 24px;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background: rgba(30, 58, 138, 0.2);
}

.modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
    color: #1e3a8a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.modal-title i {
    background: rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px);
}

.modal-body {
    padding: 30px;
    background-color: white;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    background-color: #f8faff;
    justify-content: space-between;
    border-radius: 0 0 15px 15px;
}

/* Современные стили для поиска */
.search-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.input-group {
    border: 1px solid rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group-text {
    background: transparent;
    border: none;
}

.search-wrapper .input-group:focus-within {
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.1);
    transform: translateY(-2px);
}

.search-wrapper .input-group-text {
    background-color: #ffffff;
    border: none;
    color: #1e3c72;
    padding-left: 20px;
    font-size: 1.1rem;
}

.filter-search {
    border: none;
    padding: 15px 18px;
    font-size: 1rem;
    background-color: #ffffff;
}

.filter-search:focus {
    box-shadow: none;
}

.filter-search::placeholder {
    color: #a8b3cf;
    font-weight: 300;
}

/* Современные стили для контейнера элементов */
.filter-items-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 14px;
    background-color: #f5f7ff;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #2a5298 #f5f7ff;
    border: 1px solid rgba(30, 60, 114, 0.1);
    transition: all 0.3s ease;
}

.filter-items-container::-webkit-scrollbar {
    width: 6px;
}

.filter-items-container::-webkit-scrollbar-track {
    background: #f5f7ff;
    border-radius: 10px;
}

.filter-items-container::-webkit-scrollbar-thumb {
    background-color: #2a5298;
    border-radius: 10px;
    background-image: linear-gradient(180deg, #1e3c72, #2a5298);
}

/* Современные стили для элементов списка */
.filter-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-check {
    padding: 12px 18px;
    margin: 0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
    transform-style: preserve-3d;
}

.form-check:hover {
    background-color: #ffffff;
    border-color: rgba(30, 60, 114, 0.1);
    transform: translateX(4px) translateZ(5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.2em;
    border: 2px solid rgba(30, 60, 114, 0.3);
    cursor: pointer;
    border-radius: 6px;
}

.form-check-input:checked {
    background-color: #1e3c72;
    border-color: #1e3c72;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-label {
    font-size: 1rem;
    margin-left: 8px;
    cursor: pointer;
    font-weight: 400;
    color: #445277;
}

/* Современные стили для индикатора загрузки */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.4), rgba(191, 219, 254, 0.3));
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.loading-indicator .spinner-border {
    width: 45px;
    height: 45px;
    color: #1e3c72;
    border-width: 3px;
    animation-duration: 1.2s;
}

.loading-indicator p {
    font-size: 1rem;
    margin-top: 16px;
    color: #1e3a8a;
    font-weight: 500;
}

/* Современные стили для разделителя */
.filter-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1), rgba(30, 60, 114, 0.1));
    margin: 20px 0;
    border-radius: 1px;
}

/* Современные стили для "Выбрать все" */
.select-all-wrapper {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 60, 114, 0.1);
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.select-all-wrapper:hover {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    transform: translateX(4px);
}

.select-all-counter {
    color: #445277;
    font-size: 0.875rem;
    margin-left: 8px;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Современные стили для контейнера выбранных ИНН */
.section-title {
    font-size: 1.1rem;
    color: #445277;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.section-title i {
    color: #3bc374;
    margin-right: 10px;
    background: rgba(59, 195, 116, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-inns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 70px;
    padding: 16px;
    border: 1px dashed rgba(30, 60, 114, 0.3);
    border-radius: 14px;
    background-color: #f5f7ff;
    transition: all 0.3s ease;
}

.selected-inns-container:empty::after {
    content: 'Пока не выбрано ни одного ИНН';
    color: #a8b3cf;
    font-style: italic;
    width: 100%;
    text-align: center;
    padding: 10px;
}

.selected-inn-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    margin: 5px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.6), rgba(191, 219, 254, 0.5));
    border-radius: 20px;
    font-size: 0.9rem;
    color: #1e3a8a;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-inn-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.remove-inn {
    margin-left: 8px;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #1e3a8a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-inn:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

/* Современные стили для кнопок */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.btn-secondary {
    background: linear-gradient(145deg, #f0f4ff, #e6eeff);
    border: 1px solid rgba(30, 58, 138, 0.1);
    color: #1e3a8a;
}

.btn-secondary:hover {
    background: linear-gradient(145deg, #f5f9ff, #edf3ff);
    border-color: rgba(30, 58, 138, 0.2);
}

.btn-primary {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    opacity: 0.95;
}

.btn i {
    margin-right: 8px;
    font-size: 0.9rem;
}

/* Стили для компактной секции расширенного поиска */
.advanced-search-compact-section {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.advanced-search-section:not(.collapsed) {
    /* Удаляем анимацию slideDown */
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: white;
    padding: 15px 20px;
}

.advanced-search-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.advanced-search-header h5 i {
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close-advanced-search {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-advanced-search:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.advanced-search-body {
    display: flex;
    padding: 0;
}

/* Стили для левой панели с фильтрами */
.advanced-filters-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 20px;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.advanced-filters-panel:hover {
    transform: translateZ(5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.filter-group {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(30, 58, 138, 0.05);
}

.filter-group-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-group-header:hover {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.85), rgba(191, 219, 254, 0.8));
}

.filter-group-header i {
    margin-right: 10px;
    color: #1e3a8a;
}

.filter-group-body {
    padding: 15px 20px;
    background-color: white;
}

/* Стили для фильтров-чипсов */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    color: #1e3a8a;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.7), rgba(191, 219, 254, 0.6));
}

.filter-chip i {
    margin-right: 8px;
    font-size: 0.85rem;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #1e3a8a;
    color: white;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* Стили для правой панели с предпросмотром */
.preview-panel {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.preview-panel:hover {
    transform: translateZ(5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.preview-header {
    padding: 15px 20px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.preview-header h6 {
    margin: 0;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.preview-header h6 i {
    margin-right: 10px;
}

.preview-body {
    padding: 20px;
    background: white;
}

.preview-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
}

.preview-section:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.preview-value {
    color: #445277;
    font-size: 0.95rem;
}

.preview-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Обеспечиваем корректную работу полей ввода в расширенном поиске */
.advanced-search-section input,
.advanced-search-section textarea,
.advanced-search-section select,
.advanced-search-section button {
    pointer-events: auto !important; /* Принудительно делаем элементы интерактивными */
    opacity: 1 !important; /* Убеждаемся что элементы видны */
    position: relative; /* Помогает с наслоением элементов */
}

/* Исправление для модальных кнопок в расширенном поиске */
.filter-chip {
    position: relative;
    z-index: 1200; /* Самый высокий z-index для чипов фильтров */
    pointer-events: auto !important; /* Гарантируем что кнопка кликабельна */
    cursor: pointer !important;
}

/* Обеспечиваем видимость и интерактивность модальных окон */
.modal {
    z-index: 1050 !important; /* Повышаем z-index для модальных окон */
}

/* Стили для корректной работы модальных окон выбора фильтров */
.modal-content {
    position: relative;
    z-index: 2100;
}

/* Обеспечиваем активность полей ввода в модальных окнах */
.modal-body input,
.modal-body .filter-search {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Исправляем стили для переключателя "Только активные" */
.form-check-input {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Исправляем отображение для контейнера с результатами в модальных окнах */
.filter-items-container {
    max-height: 300px;
    overflow-y: auto;
    position: relative;
    z-index: 100;
}

/* Новая компактная сетка фильтров */
.filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* Новый стиль карточек фильтров */
.filter-card {
    flex: 1 0 200px;
    max-width: 300px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    overflow: visible;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.filter-card:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.filter-card.inactive {
    opacity: 0.5;
    pointer-events: none;
    transform: scale(0.98);
}

.filter-card.active-dropdown {
    z-index: 1000;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

/* Компактный заголовок карточки */
.filter-card-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background-color: #f1f3f5;
    border-bottom: 1px solid var(--border-color);
    border-radius: 6px 6px 0 0;
}

.filter-card-header i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 14px;
}

.filter-card-header span {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

/* Компактное тело карточки */
.filter-card-body {
    padding: 8px 10px;
    position: relative;
    overflow: visible;
}

/* Стили для выпадающих списков */
.filter-card .dropdown {
    position: relative;
    width: 100%;
    overflow: visible;
}

.filter-card .dropdown-button {
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
    background-color: white;
    border: 1px solid #ced4da;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
}

.filter-card .dropdown-button:hover {
    background-color: #f8f9fa;
}

.filter-card .dropdown-button:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    transition: transform 0.2s ease;
}

.filter-card .dropdown-button.active:after {
    transform: rotate(180deg);
}

.filter-card .dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
    padding: 8px;
    margin-top: 2px;
}

/* Показываем выпадающий список */
.filter-card .dropdown-content.show {
    display: block;
    z-index: 9999;
}

/* Стили для поля поиска внутри выпадающего списка */
.dropdown-search {
    width: 100%;
    padding: 6px 8px;
    margin-bottom: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
}

.dropdown-search:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для элементов выпадающего списка */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f1f3f5;
}

.dropdown-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Стили для карточки исключений */
.exclusion-card {
    flex: 1 0 100%;
    max-width: 100%;
}

.exclusion-card textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.exclusion-card textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Стили для кнопок действий */
.search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.search-actions button {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.search-actions button i {
    margin-right: 6px;
}

.search-actions .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.search-actions .btn-primary:hover {
    background-color: var(--primary-hover);
}

.search-actions .btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.search-actions .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters-grid {
        flex-direction: column;
    }
    
    .filter-card {
        max-width: 100%;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-actions button {
        width: 100%;
    }
}

/* Заголовок фильтров */
.modern-filters .filters-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modern-filters .filters-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
}

.modern-filters .filters-header h4 i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 18px;
}

/* Сетка фильтров */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    z-index: 50;
}

/* Карточка фильтра */
.filter-card {
    background-color: white;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    overflow: visible;
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
    position: relative;
    z-index: 10;
}

.filter-card:hover {
    box-shadow: 0 4px 8px var(--shadow-color);
    transform: translateY(-2px);
}

/* Заголовок карточки фильтра */
.filter-card-header {
    background-color: var(--light-gray);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.filter-card-header i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 14px;
}

.filter-card-header span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Тело карточки фильтра */
.filter-card-body {
    padding: 10px;
    position: relative;
    z-index: 20;
    overflow: visible;
}

.filter-card .dropdown {
    position: relative;
    z-index: 50;
    overflow: visible;
}

.filter-card .dropdown-button {
    position: relative;
    z-index: 51;
}

.filter-card .dropdown-content {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    z-index: 1100;
    overflow: visible;
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Карточка исключений */
.exclusion-card {
    grid-column: 1 / -1;
}

.exclusion-card textarea {
    min-height: 60px;
    resize: vertical;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    width: 100%;
}

.exclusion-card textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    outline: none;
}

/* Стили для выпадающих списков */
.modern-filters .dropdown {
    position: relative;
    z-index: 1000;
    overflow: visible;
}

.modern-filters .dropdown-button {
    position: relative;
    z-index: 1001;
    width: 100%;
    text-align: left;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.modern-filters .dropdown-button:hover {
    background-color: var(--light-gray);
    border-color: var(--dark-gray);
}

.modern-filters .dropdown-button:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    transition: transform var(--transition-speed);
}

.modern-filters .dropdown-button.active:after {
    transform: rotate(180deg);
}

.modern-filters .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1100;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 
        opacity 0.2s ease, 
        visibility 0.2s ease, 
        transform 0.2s ease;
    overflow: visible;
}

.modern-filters .dropdown-content.show {
    display: block;
    opacity: 1;
    visibility: visible;
    z-index: 1100;
    overflow: visible;
}

/* Поле поиска в выпадающем списке */
.modern-filters .dropdown-search {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
}

.modern-filters .dropdown-search:focus {
    border-bottom-color: var(--primary-color);
    outline: none;
}

/* Элементы выпадающего списка */
.modern-filters .dropdown-item {
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.modern-filters .dropdown-item:hover {
    background-color: var(--light-gray);
}

.modern-filters .dropdown-item input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

/* Поля ввода */
.modern-filters input[type="number"],
.modern-filters input[type="date"] {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}

.modern-filters input[type="number"]:focus,
.modern-filters input[type="date"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    outline: none;
}

/* Кнопки действий */
.modern-filters .search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.modern-filters .search-actions button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed);
}

.modern-filters .search-actions button i {
    margin-right: 6px;
}

.modern-filters .search-actions .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.modern-filters .search-actions .btn-primary:hover {
    background-color: #3367d6;
    border-color: #3367d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modern-filters .search-actions .btn-outline-secondary {
    color: var(--dark-gray);
    border-color: var(--dark-gray);
}

.modern-filters .search-actions .btn-outline-secondary:hover {
    background-color: var(--dark-gray);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .modern-filters .search-actions {
        flex-direction: column;
    }
    
    .modern-filters .search-actions button {
        width: 100%;
    }
}

/* Глобальные стили для выпадающих списков с максимальным приоритетом */
.dropdown-content {
    position: absolute !important;
    z-index: 99999 !important;
    display: none !important;
    background-color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 4px !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    padding: 8px !important;
    margin: 0 !important;
    min-width: 200px !important;
    width: 100% !important;
    left: 0 !important;
    top: 100% !important;
}

.dropdown-content.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 99999 !important;
}

/* Стили для элементов выпадающего списка */
.dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 6px 8px !important;
    margin-bottom: 2px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
}

.dropdown-item input[type="checkbox"] {
    margin-right: 8px !important;
}

/* Стили для поля поиска внутри выпадающего списка */
.dropdown-search {
    width: 100% !important;
    padding: 6px 8px !important;
    margin-bottom: 8px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    font-size: 13px !important;
}

/* Стили для контейнера, чтобы он не перекрывал выпадающие списки */
.container {
    position: relative;
    z-index: 1;
}

/* Стили для основного контейнера поиска */
.search-container {
    position: relative;
    z-index: 1;
}

/* Стили для модальных окон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modal-appear 0.3s ease;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
}

.modal-close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.modal-close-button:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-footer button {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-footer .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.modal-footer .btn-primary:hover {
    background-color: #3367d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.modal-footer .btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Стили для содержимого модального окна */
.modal-body .dropdown-content {
    position: static !important;
    display: block !important;
    box-shadow: none !important;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-height: none !important;
    overflow-y: auto;
    padding: 10px;
    width: 100% !important;
    z-index: 1 !important;
}

.modal-body .dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.modal-body label {
    display: block;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal-body label:hover {
    background-color: #f5f5f5;
}

.modal-body input[type="checkbox"] {
    margin-right: 8px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 130px);
    }
}

/* Стили для новой секции расширенного поиска */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filters-header button {
    padding: 5px 10px;
    font-size: 12px;
}

.filter-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.filter-button i {
    margin-right: 8px;
    color: var(--primary-color);
}

.filter-button.has-selection {
    background-color: #e8f0fe;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.price-range, .date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input, .date-input {
    flex: 1;
}

.price-separator {
    color: #6c757d;
    font-weight: 500;
}

.date-input label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #6c757d;
}

.additional-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 8px;
}

.form-check-label {
    font-size: 14px;
    color: #333;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .price-range, .date-range {
        flex-direction: column;
        gap: 5px;
    }
    
    .price-separator {
        display: none;
    }
    
    .date-input {
        width: 100%;
    }
}

/* Стили для свернутого состояния секции расширенного поиска */
.advanced-search-section.collapsed .filters-grid,
.advanced-search-section.collapsed .search-actions {
    display: none;
}

.advanced-search-section.collapsed {
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.advanced-search-section.collapsed .filters-header {
    margin-bottom: 0;
}

.advanced-search-section.collapsed .filters-header h4 {
    font-size: 16px;
}

/* Анимация для секции расширенного поиска */
.advanced-search-section {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Стили для модальных окон Bootstrap */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 15px 20px;
}

.modal-title {
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

.filter-items-container {
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.filter-item:hover {
    background-color: #f8f9fa;
}

.filter-item input[type="checkbox"] {
    margin-right: 10px;
}

.filter-search {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    width: 100%;
}

.filter-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
    outline: none;
}

/* Стили для выбранных ИНН */
#selected-inns {
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.selected-inn-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #e8f0fe;
    border-radius: 4px;
    margin-bottom: 8px;
}

.selected-inn-item .remove-inn {
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
}

.selected-inn-item .remove-inn:hover {
    color: #bd2130;
}

/* Стили для переключателя "Отметить все" / "Снять" */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 5px 10px;
    border-radius: 15px;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

.toggle-switch.active {
    background-color: #007bff;
}

.toggle-switch .toggle-knob {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    margin-right: 8px;
}

.toggle-switch.active .toggle-knob {
    transform: translateX(5px);
}

.toggle-switch .toggle-label {
    font-size: 14px;
    color: #333;
    transition: color 0.3s ease;
}

.toggle-switch.active .toggle-label {
    color: #fff;
}

/* ===================== END: modern_search.css ===================== */

/* ===================== START: search_modals.css ===================== */

/* Современные стили для модальных окон 2024 */
.modal-content {
    background: #fff;
    border: none;
    border-radius: 15px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.modal-content:hover {
    transform: translateZ(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1e3a8a;
    border-bottom: none;
    padding: 20px 24px;
    position: relative;
    border-radius: 15px 15px 0 0 !important;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e3c72, #2a5298, #1e3c72);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.modal-header .btn-close {
    color: #1e3a8a;
    font-size: 1rem;
    opacity: 0.9;
    transition: all 0.3s;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    padding: 10px;
    margin: 0;
    position: relative;
    width: 24px;
    height: 24px;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background: rgba(30, 58, 138, 0.2);
}

.modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
    color: #1e3a8a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.modal-title i {
    background: rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px);
}

.modal-body {
    padding: 30px;
    background-color: white;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    background-color: #f8faff;
    justify-content: space-between;
    border-radius: 0 0 15px 15px;
}

/* Современные стили для поиска */
.search-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.input-group {
    border: 1px solid rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group-text {
    background: transparent;
    border: none;
}

.search-wrapper .input-group:focus-within {
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.1);
    transform: translateY(-2px);
}

.search-wrapper .input-group-text {
    background-color: #ffffff;
    border: none;
    color: #1e3c72;
    padding-left: 20px;
    font-size: 1.1rem;
}

.filter-search {
    border: none;
    padding: 15px 18px;
    font-size: 1rem;
    background-color: #ffffff;
}

.filter-search:focus {
    box-shadow: none;
}

.filter-search::placeholder {
    color: #a8b3cf;
    font-weight: 300;
}

/* Современные стили для контейнера элементов */
.filter-items-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 14px;
    background-color: #f5f7ff;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #2a5298 #f5f7ff;
    border: 1px solid rgba(30, 60, 114, 0.1);
    transition: all 0.3s ease;
}

.filter-items-container::-webkit-scrollbar {
    width: 6px;
}

.filter-items-container::-webkit-scrollbar-thumb {
    background-color: #2a5298;
    border-radius: 10px;
    background-image: linear-gradient(180deg, #1e3c72, #2a5298);
}

/* Современные стили для элементов списка */
.filter-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-check {
    padding: 12px 18px;
    margin: 0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
    transform-style: preserve-3d;
}

.form-check:hover {
    background-color: #ffffff;
    border-color: rgba(30, 60, 114, 0.1);
    transform: translateX(4px) translateZ(5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.2em;
    border: 2px solid rgba(30, 60, 114, 0.3);
    cursor: pointer;
    border-radius: 6px;
}

.form-check-input:checked {
    background-color: #1e3c72;
    border-color: #1e3c72;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-label {
    font-size: 1rem;
    margin-left: 8px;
    cursor: pointer;
    font-weight: 400;
    color: #445277;
}

/* Современные стили для индикатора загрузки */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.4), rgba(191, 219, 254, 0.3));
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.loading-indicator .spinner-border {
    width: 45px;
    height: 45px;
    color: #1e3c72;
    border-width: 3px;
    animation-duration: 1.2s;
}

.loading-indicator p {
    font-size: 1rem;
    margin-top: 16px;
    color: #1e3a8a;
    font-weight: 500;
}

/* Современные стили для разделителя */
.filter-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1), rgba(30, 60, 114, 0.1));
    margin: 20px 0;
    border-radius: 1px;
}

/* Современные стили для "Выбрать все" */
.select-all-wrapper {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 60, 114, 0.1);
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.select-all-wrapper:hover {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    transform: translateX(4px);
}

.select-all-counter {
    color: #445277;
    font-size: 0.875rem;
    margin-left: 8px;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Современные стили для контейнера выбранных ИНН */
.section-title {
    font-size: 1.1rem;
    color: #445277;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.section-title i {
    color: #3bc374;
    margin-right: 10px;
    background: rgba(59, 195, 116, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-inns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 70px;
    padding: 16px;
    border: 1px dashed rgba(30, 60, 114, 0.3);
    border-radius: 14px;
    background-color: #f5f7ff;
    transition: all 0.3s ease;
}

.selected-inns-container:empty::after {
    content: 'Пока не выбрано ни одного ИНН';
    color: #a8b3cf;
    font-style: italic;
    width: 100%;
    text-align: center;
    padding: 10px;
}

.selected-inn-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    margin: 5px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.6), rgba(191, 219, 254, 0.5));
    border-radius: 20px;
    font-size: 0.9rem;
    color: #1e3a8a;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-inn-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.remove-inn {
    margin-left: 8px;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #1e3a8a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-inn:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

/* Современные стили для кнопок */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.btn-secondary {
    background: linear-gradient(145deg, #f0f4ff, #e6eeff);
    border: 1px solid rgba(30, 58, 138, 0.1);
    color: #1e3a8a;
}

.btn-secondary:hover {
    background: linear-gradient(145deg, #f5f9ff, #edf3ff);
    border-color: rgba(30, 58, 138, 0.2);
}

.btn-primary {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    opacity: 0.95;
}

.btn i {
    margin-right: 8px;
    font-size: 0.9rem;
}

/* Стили для компактной секции расширенного поиска */
.advanced-search-compact-section {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.advanced-search-section:not(.collapsed) {
    /* Удаляем анимацию slideDown */
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: white;
    padding: 15px 20px;
}

.advanced-search-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
}