.main.banner-auto {
    padding: 20px;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    white-space: nowrap;
}

.tab-button.active {
    background: #dc2f2f;
    color: white;
    border-color: #dc2f2f;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ИСПРАВЛЕННЫЙ БЛОК ПОИСКА И ФИЛЬТРОВ */
.search-filters {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* УБИРАЕМ отдельный стиль для обычного поиска */
.search-filters > input[type="text"] {
    display: none !important; /* Скрываем, так как переносим в общую строку */
}

/* Контейнер для ВСЕХ элементов в одну строку */
.all-in-one-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

/* Обычный поиск - растягивается равномерно */
.all-in-one-row > input[type="text"] {
    padding: 6px 8px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-size: 12px; 
    box-sizing: border-box; 
    margin: 0; 
    flex: 1;
    min-width: 80px;
}

/* Поиск по артикулу - растягивается равномерно */
.product-search-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f8f9ff;
    border: 1px solid #e0e6ff;
    border-radius: 4px;
    padding: 4px 6px;
    position: relative;
    flex: 1;
    min-width: 120px;
    z-index: 1;
}

.product-search-label {
    font-weight: bold;
    color: #333;
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.product-search-input {
    flex: 1;
    min-width: 60px;
    padding: 4px 6px;
    border: 1px solid #007bff;
    border-radius: 3px;
    font-size: 11px;
    box-sizing: border-box;
    margin: 0;
}

.product-search-input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 1px rgba(0,123,255,0.3);
}

.clear-search-btn {
    padding: 4px 6px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 9px;
    white-space: nowrap;
    flex-shrink: 0;
}

.clear-search-btn:hover {
    background: #545b62;
}

/* Фильтры - растягиваются равномерно */
.filters-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    flex: 2;
    min-width: 0;
}

.filters-inline select {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 12px;
    min-width: 60px;
    cursor: pointer;
    height: 28px;
    box-sizing: border-box;
    flex: 1;
    max-width: none;
    position: relative;
    z-index: 1;
}

.filters-inline select:focus {
    outline: none;
    border-color: #007bff;
}

/* Статистика - полностью убираем */
.search-stats-below {
    display: none !important;
}

.search-stats-below.empty {
    display: none !important;
}

.result-count {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 3px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 8px;
}

.count-compatible { background: #28a745; color: white; }
.count-eol { background: #ffc107; color: #212529; }
.count-incompatible { background: #dc3545; color: white; }

/* Таблица */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
    cursor: pointer;
}

th.sortable:hover {
    background-color: #e9ecef;
}

tr:hover {
    background-color: #f5f5f5;
}

.status-cell {
    text-align: center;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    gap: 6px;
    cursor: pointer;
}

.status-compatible {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-incompatible {
    background-color: #ffebee;
    color: #c62828;
}

.status-eol {
    background-color: #fff3cd;
    color: #856404;
}

.status-icon::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-compatible::before {
    background-color: #2e7d32;
}

.status-incompatible::before {
    background-color: #c62828;
}

.status-eol::before {
    background-color: #856404;
}

.loading {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #666;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button:hover {
    background: #f0f0f0;
}

.pagination button:disabled {
    background: #eee;
    cursor: not-allowed;
    color: #999;
}

.pagination-info {
    margin: 0 15px;
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.items-per-page select {
    min-width: auto;
    width: auto;
    height: 32px;
    padding: 4px 8px;
    font-size: 14px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 1200px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-top: 0;
}

.modal-content ul {
    padding-left: 20px;
}

.modal-content ul li {
    margin-bottom: 10px;
}

.close-button {
    float: right;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h4 {
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.product-group {
    margin-bottom: 15px;
}

.product-tag {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.product-tag.compatible {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.product-tag.not-compatible {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ИСПРАВЛЕННЫЙ Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .search-filters {
        padding: 12px;
    }
    
    .all-in-one-row {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
    }
    
    .all-in-one-row > input[type="text"] {
        flex: 1;
        min-width: 60px;
        padding: 4px 6px;
        font-size: 11px;
        height: 24px;
    }
    
    .product-search-inline {
        padding: 4px 6px;
        flex: 1;
        min-width: 100px;
    }
    
    .product-search-label {
        font-size: 10px;
    }
    
    .product-search-input {
        min-width: 50px;
        font-size: 11px;
        padding: 4px 6px;
    }
    
    .clear-search-btn {
        padding: 4px 6px;
        font-size: 9px;
    }
    
    .filters-inline {
        gap: 6px;
        flex: 2;
        width: 100%;
        margin-top: 8px;
    }
    
    .filters-inline select {
        flex: 1;
        min-width: 60px;
        max-width: none;
        font-size: 11px;
        padding: 4px 6px;
        height: 24px;
    }
    
    .tabs {
        justify-content: center;
    }
    
    .tab-button {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 6px;
    }
    
    .pagination {
        font-size: 12px;
    }
    
    .pagination button {
        padding: 4px 8px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .all-in-one-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }
    
    .filters-inline {
        margin-top: 0;
        width: 100%;
        flex-direction: column;
    }
    
    .filters-inline select {
        width: 100%;
        margin-bottom: 4px;
        flex: none;
    }
}