#usersContent > div.p-4 > div:nth-child(2){
    display: none;
}
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Стили для тултипа адреса */
.address-tooltip {
    position: relative;
    cursor: pointer;
}

.address-tooltip:hover::after {
    content: attr(data-full-address);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 5px;
    max-width: 300px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
}

.address-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    z-index: 1001;
}

body {
    opacity: 1;
    transition: opacity 0.2s ease;
    min-height: 100vh;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
}

body.loaded {
    opacity: 1;
}

.custom-alert {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 280px;
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    border: 1px solid #000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 14px;
}

.custom-alert.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(8px);
}

.custom-alert.success {
    background: white;
    color: black;
    border-color: #000;
}

.custom-alert.error {
    background: black;
    color: white;
    border-color: #000;
}

.custom-alert.warning {
    background: white;
    color: black;
    border-color: #000;
}

.main-container {
    background: white;
    overflow: hidden;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #222731;
    border-right: 1px solid #333333;
    flex-shrink: 0;
    transition: width 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 20;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 60px;
}

/* Заголовок сайдбара */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #333333;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.sidebar.collapsed .sidebar-header {
    padding: 15px 10px;
}

/* Навигационная область */
.sidebar-navigation {
    flex: 1;
    overflow-y: auto;
    padding: 30px 0 20px 0;
}

/* Подвал сайдбара */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #333333;
    flex-shrink: 0;
}
#sidebar > div.flex.flex-col.h-full.sidebar-content.pt-0 > div.flex-1.pb-2.px-2.overflow-y-auto{
    padding: 24px !important;
}
.sidebar-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateX(0);
}

.sidebar-header .sidebar-content {
    padding: 0;
}

.sidebar-navigation .sidebar-content {
    padding: 0 20px;
}

.sidebar-footer .sidebar-content {
    padding: 0;
}

.sidebar-version {
    color: #64748b;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
}



/* Заголовок навигации */
.navigation-header {
    margin-bottom: 0px !important;
    margin-top: 0px !important;
    padding: 4px 5px;
}

/* Меню навигации */
.navigation-menu {
    space-y: 8px;
}

/* Выпадающий список категорий */
.categories-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 24px;
    margin-top: 8px;
}

.sidebar-toggle-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.sidebar-toggle-btn:hover {
    background-color: #374151;
}

/* Стили для выпадающих списков категорий */

.main-content {
    flex: 1;
    overflow-x: auto;
    width: calc(100vw - 280px);
    margin-left: 280px;
    transition: width 0.3s ease, margin-left 0.3s ease;
}

.main-content.expanded {
    width: calc(100vw - 60px);
    margin-left: 60px;
}
#sidebar > div.flex.flex-col.h-full.sidebar-content.pt-0 > div.flex-1.pb-2.px-2.overflow-y-auto{
    max-height: 95% !important;
}


.category-item.active {
    background-color: #6b7280 !important;
    color: white !important;
}

.category-item.active svg {
    color: white !important;
}

.section-card {
    margin-bottom: 16px;
    padding: 16px;
    background: white;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
}

.section-card:last-child {
        margin-bottom: 0;
    }
    
    /* Стили для тумблера */
    #hideDuplicates:checked + label .bg-gray-300 {
        background-color: #000;
    }
    
    #hideDuplicates:checked + label .transform {
        transform: translateX(1.5rem);
    }
    
    #hideDuplicates + label:hover .bg-gray-300 {
        background-color: #6b7280;
    }
    
    /* Стили для тумблера скрытия неактивных */
    #hideInactive:checked + label .bg-gray-300 {
        background-color: #000;
    }
    
    #hideInactive:checked + label .transform {
        transform: translateX(1.5rem);
    }
    
    #hideInactive + label:hover .bg-gray-300 {
        background-color: #6b7280;
    }

.section-header {
    padding: 0 0 12px 0;
    position: relative;
}

.primary-button {
    background: black;
    color: white;
    border: 1px solid black;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.primary-button:hover {
    background: #333;
}

.secondary-button {
    background: #f9fafb;
    color: black;
    border: 0;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.secondary-button:hover {
    background: #f3f4f6;
}

.input-field {
        background: #f9fafb;
        border: 0;
        border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 16px;
}

.input-field:focus {
    background: white;
    ring: 2px;
    ring-color: #000;
    outline: none;
}

.warning-card {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
}

.sidebar-item {
    padding: 16px 20px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background-color: #374151;
}

.sidebar-item.active {
    background-color: #374151;
    border-left: 3px solid #10b981;
}

.sidebar-navigation button.sidebar-item {
    border: 0;
    background: transparent;
    font: inherit;
}

.category-item {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #d1d5db;
    background: transparent;
    border: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.category-item:hover {
    background-color: #374151;
}

.category-item.active {
    background-color: #6b7280;
    color: white;
}

.category-item.active svg {
    color: white;
}

.category-item .category-count {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: auto;
    transition: all 0.2s ease;
}

.category-item:hover .category-count {
    background: rgba(107, 114, 128, 0.15);
    color: #374151;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Простые отступы для иерархии категорий */
.category-level-1 {
    margin-left: 16px;
}

.category-level-2 {
    margin-left: 32px;
}

.category-level-3 {
    margin-left: 48px;
}

.subcategories-container {
    padding-left: 0;
}

.subcategories-level-1::before {
    background-color: #cbd5e1;
    opacity: 0.8;
}

.subcategories-level-2::before {
    background-color: #d1d5db;
    opacity: 0.6;
}

.subcategories-level-3::before {
    background-color: #e5e7eb;
    opacity: 0.4;
}

/* Улучшенные стили для элементов категорий */
.category-item[data-level="1"] {
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.02) 100%);
    border-left: 2px solid transparent;
}

.category-item[data-level="2"] {
    background: linear-gradient(90deg, transparent 0%, rgba(16, 185, 129, 0.02) 100%);
    border-left: 2px solid transparent;
}

.category-item[data-level="3"] {
    background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.02) 100%);
    border-left: 2px solid transparent;
}

.category-item[data-level="1"]:hover {
    border-left-color: rgba(59, 130, 246, 0.3);
}

.category-item[data-level="2"]:hover {
    border-left-color: rgba(16, 185, 129, 0.3);
}

.category-item[data-level="3"]:hover {
    border-left-color: rgba(245, 158, 11, 0.3);
}

/* Стили для категорий с подкатегориями */

.category-item-with-subcategories {
    position: relative;
}

.category-item-with-subcategories .category-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.category-item-with-subcategories.expanded .category-arrow {
    transform: rotate(180deg);
}

.subcategories-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.subcategories-container.expanded {
    max-height: none;
}

.hidden { display: none !important; }

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Стили для выпадающего списка категорий */
#categoriesDropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#categoriesDropdown.open {
    max-height: none;
    overflow-y: visible;
}

#categoriesContainer {
    max-height: none;
    overflow-y: visible;
}

/* Стили для таблицы с горизонтальным скроллом - УЛУЧШЕННАЯ ВЕРСИЯ */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    position: relative;
    background: white;
    /* Убираем резкие переходы */
    scroll-behavior: smooth;
    /* Предотвращаем скачки */
    contain: layout style;
    display: block;
    /* Отключаем выделение текста */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Адаптивная таблица для малого количества столбцов */
.table-responsive.adaptive {
    overflow-x: visible !important;
    overflow-y: visible !important;
}

.table-responsive.adaptive::-webkit-scrollbar {
    display: none !important;
}

.table-responsive.adaptive #productsTable {
    min-width: auto !important;
    table-layout: auto !important;
}

.table-responsive.adaptive #productsTable th,
.table-responsive.adaptive #productsTable td {
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

.table-responsive::-webkit-scrollbar {
    height: 10px;
    background: transparent;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 6px;
    margin: 0 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
    border: 2px solid #f8fafc;
    transition: background-color 0.2s ease;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.table-responsive::-webkit-scrollbar-corner {
    background: #f8fafc;
}

/* Kept outside <tbody> so the lazy-load status cannot affect table layout. */
.avifeed-infinite-products-status {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 40;
    transform: translateX(-50%);
    max-width: calc(100vw - 2rem);
    padding: .7rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
    color: #4b5563;
    font-size: .875rem;
    white-space: nowrap;
    pointer-events: none;
}

#productsTable {
    /* Фиксированная минимальная ширина для предотвращения сжатия */
    min-width: 1400px !important;
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    /* Предотвращаем скачки при загрузке */
    empty-cells: show !important;
    /* Стабильная высота строк */
    line-height: 1.5 !important;
    display: table !important;
    box-sizing: border-box !important;
    /* Отключаем выделение текста в таблице */
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Переопределение Tailwind CSS классов для таблицы */
#productsTable.w-full {
    width: 100% !important;
}

#productsTable th,
#productsTable td {
    flex: none !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
}

/* Фиксированные ширины столбцов для стабильности */
#productsTable th:nth-child(1),
#productsTable td:nth-child(1) { width: 30px !important; min-width: 30px !important; max-width: 30px !important; padding: 4px !important; text-align: center !important; } /* Чекбокс */
#productsTable th:nth-child(2),
#productsTable td:nth-child(2) { width: 200px !important; min-width: 200px !important; max-width: 200px !important; } /* Название */
#productsTable th:nth-child(3),
#productsTable td:nth-child(3) { width: 80px !important; min-width: 80px !important; max-width: 80px !important; } /* Фото */
#productsTable th:nth-child(4),
#productsTable td:nth-child(4) { width: 250px !important; min-width: 250px !important; max-width: 250px !important; } /* Описание */
#productsTable th:nth-child(5),
#productsTable td:nth-child(5) { width: 100px !important; min-width: 100px !important; max-width: 100px !important; } /* Цена */
#productsTable th:nth-child(6),
#productsTable td:nth-child(6) { 
    width: 300px !important; 
    min-width: 300px !important; 
    max-width: 300px !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
} /* Адрес */
#productsTable th:nth-child(7),
#productsTable td:nth-child(7) { width: 120px !important; min-width: 120px !important; max-width: 120px !important; } /* Группы */
#productsTable th:nth-child(8),
#productsTable td:nth-child(8) { width: 200px !important; min-width: 200px !important; max-width: 200px !important; } /* Доп. поля */
#productsTable th:nth-child(9),
#productsTable td:nth-child(9) { width: 100px !important; min-width: 100px !important; max-width: 100px !important; } /* Просмотры */
#productsTable th:nth-child(10),
#productsTable td:nth-child(10) { width: 120px !important; min-width: 120px !important; max-width: 120px !important; } /* Заказы */

/* Предотвращение переноса текста в заголовках */
#productsTable th {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    position: sticky !important;
    top: 0 !important;
    background: #f9fafb !important;
    z-index: 10 !important;
    border-bottom: 2px solid #e5e7eb !important;
    box-sizing: border-box !important;
    position: relative !important;
    border-right: 1px solid #e5e7eb !important;
}

/* Стили для изменения размера столбцов */
.column-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 15;
    user-select: none;
}

.column-resizer:hover {
    background: rgba(59, 130, 246, 0.3);
}

.column-resizer.resizing {
    background: rgba(59, 130, 246, 0.5);
}

#productsTable th:first-child .column-resizer {
    display: none;
}

/* Стили для линии-индикатора изменения размера */
.resize-line {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(59, 130, 246, 0.8);
    z-index: 9999;
    pointer-events: none;
    display: none;
}

body.resizing-column {
    cursor: col-resize !important;
    user-select: none !important;
}

body.resizing-column * {
    cursor: col-resize !important;
    user-select: none !important;
}

/* Стабильные ячейки */
#productsTable td {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 12px 8px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    vertical-align: middle !important;
    /* Предотвращаем скачки высоты */
    height: 60px !important;
    max-height: 60px !important;
    box-sizing: border-box !important;
}

/* Адаптивные стили для столбцов */
@media (min-width: 1024px) {
    #productsTable {
        min-width: 1600px;
    }
}

@media (max-width: 1023px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    #productsTable {
        min-width: 1200px;
    }
    
    #productsTable th,
    #productsTable td {
        padding: 8px 4px;
        height: 50px;
        max-height: 50px;
    }
}

@media (max-width: 768px) {
    #productsTable {
        min-width: 1000px;
    }
    
    #productsTable th,
    #productsTable td {
        padding: 6px 3px;
        font-size: 0.75rem;
        height: 45px;
        max-height: 45px;
    }
}

/* Стили для кнопки выхода */
.logout-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-medium: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-button:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

/* Стили для красивого чекбокса "Все" */
#selectAllCheckbox {
    width: 16px !important;
    height: 16px !important;
    border: 1.5px solid #6b7280 !important;
    border-radius: 4px !important;
    background: white !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

#selectAllCheckbox:hover {
    border-color: #374151 !important;
    background: #f9fafb !important;
    transform: scale(1.02) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}

#selectAllCheckbox:checked {
    background: #374151 !important;
    border-color: #374151 !important;
    transform: scale(1.02) !important;
    box-shadow: 0 1px 6px rgba(55, 65, 81, 0.15) !important;
}

#selectAllCheckbox:checked::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 10px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

#selectAllCheckbox:indeterminate {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
    transform: scale(1.02) !important;
    box-shadow: 0 1px 6px rgba(107, 114, 128, 0.15) !important;
}

#selectAllCheckbox:indeterminate::after {
    content: '−' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

/* Стили для лейбла чекбокса "Все" */
label[for="selectAllCheckbox"] {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
}

label[for="selectAllCheckbox"]:hover {
    color: #000 !important;
}

/* Стили для контейнера чекбокса "Все" */
#selectAllCheckbox + label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Стили для всех чекбоксов товаров в таблице */
.product-checkbox {
    width: 16px !important;
    height: 16px !important;
    border: 1.5px solid #9ca3af !important;
    border-radius: 4px !important;
    background: white !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.product-checkbox:hover {
    border-color: #6b7280 !important;
    background: #f9fafb !important;
    transform: scale(1.02) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

.product-checkbox:checked {
    background: #374151 !important;
    border-color: #374151 !important;
    transform: scale(1.02) !important;
    box-shadow: 0 1px 5px rgba(55, 65, 81, 0.12) !important;
}

.product-checkbox:checked::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 10px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

/* Стили для ячеек с чекбоксами */
#productsTable td:first-child {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 12px 6px !important;
    width: 50px !important;
    min-width: 50px !important;
}

/* Стили для заголовка с чекбоксом "Все" */
#productsTable th:first-child {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 10px 6px !important;
    background: #f8fafc !important;
    border-bottom: 2px solid #e5e7eb !important;
}

#productsTable th:first-child .flex {
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Улучшенные стили для hover эффектов чекбоксов */
.product-checkbox:focus,
#selectAllCheckbox:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1) !important;
}

/* Анимация для чекбоксов */
@keyframes checkboxPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1.02); }
}

.product-checkbox:checked,
#selectAllCheckbox:checked {
    animation: checkboxPulse 0.2s ease-out !important;
}

/* Стили для кликабельных строк товаров */
#productsTable tbody tr {
    transition: background-color 0.2s ease;
}

#productsTable tbody tr:hover {
    background-color: #f8fafc !important;
}

#productsTable tbody tr.selected {
    background-color: #eff6ff !important;
}

#productsTable tbody tr.selected:hover {
    background-color: #dbeafe !important;
}

/* Исключаем hover эффект для кнопок и ссылок внутри строк */
#productsTable tbody tr td button,
#productsTable tbody tr td a,
#productsTable tbody tr td img,
#productsTable tbody tr td .photo-cell,
#productsTable tbody tr td .actions-cell {
    pointer-events: auto;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 40;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .main-content {
        width: 100vw;
        margin-left: 0;
    }
    
    .sidebar-toggle-btn {
        display: none !important;
    }
    
    .mobile-sidebar-toggle-btn {
        display: block !important;
        position: fixed !important;
        top: 20px !important;
        left: 20px !important;
        z-index: 1000;
        background: #222731 !important;
        border: 1px solid #333333 !important;
        padding: 8px;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-toggle-btn:hover {
        background: #2a3441 !important;
    }
    
    .table-responsive {
        font-size: 12px;
    }
    
    .section-card {
        margin: 8px;
        padding: 12px;
    }
    
    #productsTable {
        min-width: 1000px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100vw;
    }
    
    .table-responsive {
        font-size: 11px;
    }
    
    .section-card {
        margin: 4px;
        padding: 8px;
    }
    
    #productsTable {
        min-width: 900px;
    }
}

/* Стили для фильтров столбцов */
.column-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
}

.filter-arrow {
    cursor: pointer;
    margin-left: 8px;
    color: #6b7280;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 2px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
}

.filter-arrow:hover {
    color: #000;
    background-color: #f3f4f6;
    transform: scale(1.1);
}

.column-filter-container {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 320px;
    z-index: 99999;
    overflow: visible;
    backdrop-filter: blur(10px);
    animation: filterDropIn 0.2s ease-out;
    display: none;
}

.column-filter-container.show {
    display: block;
}

.column-filter-container.position-right {
    left: auto;
    right: 0;
}

@keyframes filterDropIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.column-filter-container::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
    z-index: 100000;
}

.column-filter-container.position-right::before {
    left: auto;
    right: 20px;
}

.column-filter-content {
    padding: 16px;
    position: relative;
    z-index: 100001;
}

.filter-group {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    background: white;
    margin-bottom: 8px;
}

.filter-input:last-child {
    margin-bottom: 0;
}

.filter-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.filter-clear-btn {
    width: 100%;
    padding: 8px 12px;
    background: #f9fafb;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.filter-clear-btn:hover {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #d1d5db;
}

/* Стили для иконок сортировки */
.sort-icon {
    font-size: 10px;
    color: #9ca3af;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

/* Анимация для прогресс-бара уведомлений */
@keyframes shrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Стили для уведомлений */
.notification-enter {
    animation: slideInRight 0.5s ease-out forwards;
}

.notification-exit {
    animation: slideOutRight 0.5s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(100%) scale(0.95);
        opacity: 0;
    }
}

/* Улучшенные тени для уведомлений */
.notification-shadow {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.notification-shadow:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
}

/* Стили для блокирующего модального окна */
#blockingModal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#blockingModal .bg-white {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Анимация для спиннера */
#blockingModal .animate-spin {
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Стили для уведомлений в модальном окне */
#modalNotifications {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

#modalNotifications::-webkit-scrollbar {
    width: 6px;
}

#modalNotifications::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

#modalNotifications::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#modalNotifications::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Анимация появления модального окна */
#blockingModal:not(.hidden) {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#blockingModal:not(.hidden) > div {
    animation: modalSlideIn 0.3s ease-out;
}

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

.sort-icon.asc {
    background-color: #6b7280;
    color: white;
}

.sort-icon.asc::after {
    content: '↑';
    color: white;
}

.sort-icon.desc {
    background-color: #6b7280;
    color: white;
}

.sort-icon.desc::after {
    content: '↓';
    color: white;
}

/* Стили для ресайзеров столбцов */
.column-resizer {
    position: absolute;
    top: 0;
    right: -3px;
    width: 6px;
    height: 100%;
    background: transparent;
    cursor: col-resize;
    z-index: 20;
    transition: background-color 0.2s ease;
}

.column-resizer:hover {
    background-color: rgba(59, 130, 246, 0.3);
}

.column-resizer.active {
    background-color: rgba(59, 130, 246, 0.6);
}

/* Линия-индикатор при изменении размера */
.resize-line {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #3b82f6;
    z-index: 9999;
    pointer-events: none;
    display: none;
    box-shadow: 0 0 4px rgba(59, 130, 246, 0.5);
}

/* Курсор при изменении размера */
body.resizing-column {
    cursor: col-resize !important;
    user-select: none !important;
}

body.resizing-column * {
    cursor: col-resize !important;
    user-select: none !important;
}

/* Улучшенные стили для заголовков с ресайзерами */
#productsTable th {
    position: relative;
    border-right: 1px solid #e5e7eb;
}

#productsTable th:last-child {
    border-right: none;
}

.sort-icon.desc {
    background-color: #6b7280;
    color: white;
}

.sort-icon.desc::after {
    content: '↓';
    color: white;
}

/* Стили для активных фильтров */
.filter-active {
    color: #059669 !important;
}

.filter-active circle {
    fill: #059669;
}

/* Стили для чекбоксов городов */
.city-checkbox {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.city-checkbox:hover {
    background-color: #f3f4f6;
}

.city-checkbox input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.city-checkbox label {
    font-size: 12px;
    cursor: pointer;
    flex: 1;
}

/* Стили для названий групп */
.group-name {
    max-width: 120px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

.group-tag {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* Адаптивность для фильтров */
@media (max-width: 768px) {
    .column-filter-container {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%);
        min-width: 90vw;
        max-width: 90vw;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 99999;
    }
    
    .column-filter-container::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .column-filter-container {
        min-width: 95vw;
        max-width: 95vw;
    }
    
    .column-filter-content {
        padding: 12px;
    }
}

/* Улучшенная анимация для мобильных */
@media (max-width: 768px) {
    @keyframes filterDropIn {
        from {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.9);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }
}

/* Ограничение ширины столбца адреса */
td[data-column="address"] {
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal !important;
    overflow-wrap: break-word;
    text-overflow: clip !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    line-height: 1.4 !important;
    padding: 8px !important;
}

th[data-column="address"] {
    max-width: 300px;
}

/* Кнопка переключения сайдбара остается видимой в свернутом состоянии */
.sidebar.collapsed .sidebar-toggle-btn {
    opacity: 1 !important;
    transform: translateX(-50%) !important;
    pointer-events: auto !important;
    position: absolute;
    top: 20px;
    left: 50%;
    right: auto;
    background: #374151;
    border-radius: 8px;
    padding: 8px;
}
