         /* СТИЛИ CSS */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Roboto', sans-serif;
        }

        body {
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
            padding: 20px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
        }

        .container {
            max-width: 2200px;
            width: 100%;
            margin: 0 auto;
            background: white;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        /* Шапка */
        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px 30px;
        }

        .header-title {
            text-align: center;
            margin-bottom: 15px;
        }

        .header-title h1 {
            font-size: 28px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 5px;
        }

        .subtitle {
            font-size: 14px;
            opacity: 0.9;
            font-style: italic;
        }
        .header-user-email {
            margin-left: 6px;
            font-weight: 500;
            opacity: 0.95;
        }
        .header-controls {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: center;
            justify-content: center;
        }

        .search-box {
            display: flex;
            background: white;
            border-radius: 5px;
            overflow: hidden;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            flex: 1;
            max-width: 400px;
        }

        #searchInput {
            padding: 10px 15px;
            border: none;
            width: 100%;
            font-size: 14px;
            outline: none;
        }

        #searchBtn {
            background: #4CAF50;
            color: white;
            border: none;
            padding: 10px 15px;
            cursor: pointer;
            transition: background 0.3s;
        }

        #searchBtn:hover {
            background: #45a049;
        }

        /* Кнопки фильтров */
        .filter-buttons {
            display: flex;
            gap: 5px;
        }

        .btn {
            padding: 10px 15px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s;
            font-size: 14px;
            white-space: nowrap;
        }

        .btn-header-equal {
            width: 200px;
            justify-content: center;
            font-size: 13px;
            line-height: 1.2;
        }

        .btn-filter {
            background: #6c757d;
            color: white;
            padding: 8px 12px;
            font-size: 13px;
        }

        .btn-filter:hover {
            background: #5a6268;
        }

        .btn-filter.active {
            background: #28a745;
            box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
        }

        .btn-filter.active:hover {
            background: #218838;
        }

        .btn-small {
            padding: 6px 12px;
            font-size: 13px;
        }

        .btn-add {
            background: #2196F3;
            color: white;
        }

        .btn-add:hover {
            background: #1976D2;
        }

        .btn-export {
            background: #6c757d;
            color: white;
        }

        .btn-export:hover {
            background: #5a6268;
        }

        .btn-export-excel {
            background: #28a745;
            color: white;
        }

        .btn-export-excel:hover {
            background: #218838;
        }

        .btn-import {
            background: #ffc107;
            color: #333;
        }

        .btn-import:hover {
            background: #e0a800;
        }

        /* Выпадающее меню импорта */
        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropdown-arrow {
            font-size: 10px;
            margin-left: 5px;
            transition: transform 0.3s;
        }

        .dropdown:hover .dropdown-arrow {
            transform: rotate(180deg);
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            background: white;
            min-width: 250px;
            border-radius: 6px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
            border: 1px solid #dee2e6;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s;
            padding: 10px 0;
        }

        .dropdown:hover .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-section {
            padding: 0 15px;
            margin-bottom: 10px;
        }

        .dropdown-section:last-child {
            margin-bottom: 0;
        }

        .dropdown-section h4 {
            font-size: 12px;
            color: #6c757d;
            margin: 0 0 8px 0;
            padding-bottom: 5px;
            border-bottom: 1px solid #e9ecef;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .dropdown-section h4 i {
            font-size: 10px;
        }

        .dropdown-item {
            width: 100%;
            padding: 8px 15px;
            text-align: left;
            background: none;
            border: none;
            color: #495057;
            font-size: 13px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            border-radius: 4px;
            transition: all 0.2s;
        }

        .dropdown-item:hover {
            background: #f8f9fa;
            color: #2196F3;
        }

        .dropdown-item i {
            width: 16px;
            text-align: center;
            color: #6c757d;
        }

        .dropdown-item:hover i {
            color: #2196F3;
        }

        /* Таблица */
        .table-container {
            padding: 20px;
            overflow-x: auto;
            max-height: 70vh;
            overflow-y: auto;
        }

        /* ========== КРАСИВАЯ ШАПКА ТАБЛИЦЫ ========== */
        #productsTable {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        #productsTable thead {
            position: sticky;
            top: 0;
            z-index: 20;
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }

        /* ОСНОВНЫЕ СТИЛИ ДЛЯ ЗАГОЛОВКОВ ТАБЛИЦЫ */
        #productsTable th {
            background-color: #f8f9fa;
            padding: 20px 16px !important;  /* БОЛЬШИЕ ОТСТУПЫ */
            text-align: left;
            font-weight: 700;  /* ЖИРНЫЙ ШРИФТ */
            color: #2c3e50;
            font-size: 15px;
            position: -webkit-sticky;
            position: sticky;
            top: 0;
            z-index: 25;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            border: 1px solid #dee2e6;
            border-bottom: 4px solid #667eea;  /* ТОЛСТАЯ СИНЯЯ ЛИНИЯ */
            min-height: 70px !important;  /* ВЫСОКАЯ ШАПКА */
            line-height: 1.6;
            box-sizing: border-box;
            transition: all 0.2s ease;
        }

        #productsTable th:hover {
            background-color: #e3f2fd;  /* СВЕТЛО-СИНИЙ ПРИ НАВЕДЕНИИ */
        }

        /* Первая и последняя ячейки */
        #productsTable th:first-child {
            border-left: 1px solid #dee2e6;
            border-radius: 8px 0 0 0;
        }

        #productsTable th:last-child {
            border-right: 1px solid #dee2e6;
            border-radius: 0 8px 0 0;
        }

        /* ЯЧЕЙКИ ТАБЛИЦЫ (данные) */
        #productsTable td {
            padding: 14px 16px;
            border-bottom: 1px solid #e9ecef;
            vertical-align: middle;
            transition: all 0.2s;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Фиксированные ширины для колонок */
        #productsTable th:nth-child(1),
        #productsTable td:nth-child(1) {
            width: 60px;
            min-width: 60px;
            max-width: 60px;
            text-align: center;
        }

        /* Простой вариант: центрирование через line-height */
/* Ширина колонки SKU */
#productsTable th:nth-child(2),
#productsTable td:nth-child(2) {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    text-align: center !important;
    vertical-align: middle !important;
    overflow: visible !important; /* Чтобы иконка не обрезалась */
}

#productsTable td:nth-child(2) .sku-field {
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 20px 0 0 !important;   /* Отступ справа для иконки */
    position: relative;
    text-align: center;
    width: 100%;
}

#productsTable td:nth-child(2) .sku-field .field-content {
    font-size: 12px;
    line-height: 40px !important;
    display: inline-block;
    vertical-align: middle;
    text-align: center;
    width: 100%;
}

/* Иконка - абсолютное позиционирование поверх */
#productsTable td:nth-child(2) .sku-field .edit-icon-wrapper {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    opacity: 0.5;
}

#productsTable td:nth-child(2) .sku-field:hover .edit-icon-wrapper {
    opacity: 1;
}

        #productsTable th:nth-child(3),
        #productsTable td:nth-child(3) {
            width: 170px;
            min-width: 170px;
            max-width: 170px;
        }
        #productsTable th:nth-child(4),
        #productsTable td:nth-child(4) {
            width: 180px;
            min-width: 180px;
            max-width: 180px;
        }

        #productsTable th:nth-child(5),
        #productsTable td:nth-child(5) {
            width: 520px;
            min-width: 520px;
            max-width: 520px;
        }

        #productsTable th:nth-child(6),
        #productsTable td:nth-child(6) {
            width: 220px;
            min-width: 220px;
            max-width: 220px;
        }

        #productsTable th:nth-child(7),
        #productsTable td:nth-child(7) {
            width: 180px;
            min-width: 180px;
            max-width: 180px;
        }

        #productsTable th:nth-child(8),
        #productsTable td:nth-child(8) {
            width: 120px;
            min-width: 120px;
            max-width: 120px;
        }

        #productsTable th:nth-child(9),
        #productsTable td:nth-child(9) {
            width: 200px;
            min-width: 200px;
            max-width: 200px;
        }

        #productsTable tr:hover {
            background-color: #f8f9fa;
        }

        /* Улучшенные стили для иконок редактирования */
        .editable-field {
            position: relative;
            cursor: pointer;
            padding: 6px 10px;
            border-radius: 6px;
            transition: all 0.2s;
            min-height: 36px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .editable-field:hover {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border: 1px dashed #dee2e6;
        }

        .editable-field.editing {
            background: #fff;
            padding: 0;
            border: none;
        }

        .edit-icon-wrapper {
            margin-left: 10px;
            opacity: 0;
            transform: translateX(-5px);
            transition: all 0.3s;
        }

        .editable-field:hover .edit-icon-wrapper {
            opacity: 0.8;
            transform: translateX(0);
        }

        .edit-icon {
            color: #6c757d;
            font-size: 13px;
            padding: 5px;
            background: white;
            border-radius: 50%;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            border: 1px solid #dee2e6;
            transition: all 0.3s;
        }

        .editable-field:hover .edit-icon {
            color: #2196F3;
            background: #e3f2fd;
            border-color: #bbdefb;
            transform: scale(1.1);
            box-shadow: 0 3px 8px rgba(33, 150, 243, 0.2);
        }

        /* Стили для полей которые нельзя редактировать */
        .sku-field {
            font-weight: 600;
            color: #495057;
            padding: 6px 10px;
            background: #f8f9fa;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border: 1px solid transparent;
        }

        .sku-field:hover {
            background: #f1f3f4;
            border-color: #dee2e6;
        }

        .field-content {
            flex-grow: 1;
            padding-right: 8px;
        }

        /* Пагинация */
        .pagination {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            background: #f8f9fa;
            border-top: 1px solid #dee2e6;
            flex-wrap: wrap;
            gap: 15px;
        }

        .pagination-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        #itemsPerPage {
            padding: 6px 10px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 14px;
        }

        .pagination-controls {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .pagination-controls button {
            padding: 8px 15px;
            background: #6c757d;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .pagination-controls button:hover {
            background: #5a6268;
        }

        .pagination-controls button:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        #pageInfo {
            font-weight: 500;
        }

        /* Футер со статистикой */
        .footer {
            background: #343a40;
            color: white;
            padding: 15px 30px;
        }

        .stats {
            display: flex;
            justify-content: space-around;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 150px;
        }

        .stat-label {
            font-size: 14px;
            opacity: 0.9;
            margin-bottom: 5px;
        }

        .stat-value {
            font-size: 18px;
            font-weight: 700;
        }

        /* Кнопки в таблице */
        .btn-prices {
            background: #9C27B0;
            color: white;
            padding: 6px 10px;
            font-size: 12px;
            border-radius: 4px;
        }

        .btn-prices:hover {
            background: #7B1FA2;
        }

        .btn-edit {
            background: #FF9800;
            color: white;
            padding: 6px 10px;
            font-size: 12px;
            margin-right: 5px;
            border-radius: 4px;
        }

        .btn-edit:hover {
            background: #F57C00;
        }

        .btn-save {
            background: #4CAF50;
            color: white;
            padding: 8px 14px;
            font-size: 13px;
            margin-right: 5px;
            border-radius: 4px;
        }

        .btn-save:hover {
            background: #45a049;
        }

        .btn-cancel {
            background: #f44336;
            color: white;
            padding: 6px 10px;
            font-size: 12px;
            border-radius: 4px;
        }

        .btn-cancel:hover {
            background: #d32f2f;
        }

        .btn-history {
            background: #607d8b;
            color: white;
            padding: 6px 10px;
            font-size: 12px;
            margin-right: 5px;
            border-radius: 4px;
        }

        .btn-history:hover {
            background: #546e7a;
        }
        .btn-marketplace {
                    background: #17a2b8;
                    color: white;
                    padding: 6px 10px;
                    font-size: 12px;
                    margin-right: 5px;
                    border-radius: 4px;
                }

                .btn-marketplace:hover {
                    background: #138496;
                }
        /* Стили для полей с данными */
        .edit-input {
            width: 100%;
            padding: 8px 10px;
            border: 2px solid #2196F3;
            border-radius: 4px;
            font-size: 14px;
            outline: none;
            background: #fff;
        }

        .edit-input:focus {
            box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
        }

        .stock-badge {
            display: inline-block;
            padding: 6px 12px;
            background: #e3f2fd;
            color: #1976d2;
            border-radius: 20px;
            font-weight: 700;
            border: 1px solid #bbdefb;
            transition: all 0.3s;
            cursor: pointer;
            min-width: 70px;
            text-align: center;
            font-size: 14px;
        }

        .stock-badge:hover {
            background: #bbdefb;
        }

        .stock-status {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 700;
            margin-left: 8px;
        }

        .stock-in {
            background: #d4edda;
            color: #155724;
        }

        .stock-out {
            background: #f8d7da;
            color: #721c24;
        }

        /* Уведомления */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 15px 20px;
            background: #4CAF50;
            color: white;
            border-radius: 5px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            z-index: 1000;
            animation: slideIn 0.3s ease-out;
            display: flex;
            align-items: center;
            gap: 10px;
            max-width: 400px;
        }

        .notification.error {
            background: #f44336;
        }

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

        /* Модальные окна */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal {
            background: white;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            width: 90%;
            max-width: 800px;
            max-height: 90vh;
            overflow-y: auto;
            transform: translateY(-20px);
            transition: transform 0.3s;
            pointer-events: auto;
        }

        .modal-overlay.active .modal {
            transform: translateY(0);
        }

        .modal-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 10px 10px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h2 {
            margin: 0;
            font-size: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .modal-close {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background 0.3s;
        }

        .modal-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .modal-content {
            padding: 20px;
        }

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

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

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #495057;
        }

        .form-control {
            width: 100%;
            padding: 10px 15px;
            border: 1px solid #ced4da;
            border-radius: 6px;
            font-size: 14px;
            transition: all 0.3s;
        }

        .form-control:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .form-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        .form-row .form-group {
            flex: 1;
            margin-bottom: 0;
        }

        .history-item {
            padding: 15px;
            border: 1px solid #eee;
            border-radius: 8px;
            margin-bottom: 10px;
            background: #f8f9fa;
        }

        .history-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .history-date {
            font-weight: 600;
            color: #495057;
        }

        .history-user {
            color: #6c757d;
            font-size: 14px;
        }

        .history-details {
            font-size: 14px;
            color: #666;
        }

        .price-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .tabs {
            display: flex;
            border-bottom: 1px solid #dee2e6;
            margin-bottom: 20px;
        }

        .tab {
            padding: 10px 20px;
            background: none;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-weight: 500;
            color: #6c757d;
            transition: all 0.3s;
        }

        .tab:hover {
            color: #495057;
        }

        .tab.active {
            color: #667eea;
            border-bottom-color: #667eea;
        }

        .tab-content {
            display: none;
        }

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

        .current-user {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .current-user label {
            font-weight: 600;
            margin-right: 10px;
        }

        /* Новые стили для быстрого редактирования */
        .quick-edit-container {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .quick-edit-input {
            flex: 1;
            padding: 8px 10px;
            border: 2px solid #2196F3;
            border-radius: 4px;
            font-size: 14px;
        }

        .save-checkmark {
            color: #4CAF50;
            cursor: pointer;
            font-size: 18px;
            padding: 5px;
            transition: transform 0.2s;
        }

        .save-checkmark:hover {
            transform: scale(1.2);
        }

        /* Стили для формы входа */
        .login-form {
            max-width: 400px;
            margin: 50px auto;
            padding: 30px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }

        .login-form h2 {
            text-align: center;
            margin-bottom: 20px;
            color: #667eea;
        }

        /* Вертикальный список цен */
        .price-list-vertical {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .price-group {
                    border: 1px solid #dee2e6;
                    border-radius: 8px;
                    background: #ffffff;
                    overflow: hidden;
                }

                .price-group__summary {
                    cursor: pointer;
                    font-weight: 700;
                    padding: 10px 15px;
                    background: #f1f3f5;
                    color: #343a40;
                    list-style: none;
                    border: 1px solid transparent;
                    transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
                }

                .price-group__summary:hover {
                    filter: saturate(1.06) brightness(1.01);
                    transform: translateY(-1px);
                }

                .price-group__summary--rrp {
                    background: linear-gradient(90deg, #ecfeff 0%, #f0f9ff 100%);
                    border-color: #a5f3fc;
                    color: #0f766e;
                }

                .price-group__summary--other {
                    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
                    border-color: #cbd5e1;
                    color: #334155;
                }

                .price-group__summary--ozon {
                    background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 100%);
                    border-color: #93c5fd;
                    color: #1d4ed8;
                }

                .price-group__summary--wb {
                    background: linear-gradient(90deg, #f5f3ff 0%, #ede9fe 100%);
                    border-color: #c4b5fd;
                    color: #6d28d9;
                }

                .price-group__summary--yandex {
                    background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
                    border-color: #fdba74;
                    color: #c2410c;
                }

                .price-group__summary::-webkit-details-marker {
                    display: none;
                }

                .price-group__summary::after {
                    content: "▾";
                    float: right;
                    transition: transform 0.2s ease;
                }

                .price-group[open] > .price-group__summary::after {
                    transform: rotate(-180deg);
                }

                .price-group__body {
                    display: flex;
                    flex-direction: column;
                    gap: 10px;
                    padding: 10px 15px 15px;
                    background: #ffffff;
                }

        .price-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
            border: 1px solid #dee2e6;
            border-radius: 6px;
            background: #f8f9fa;
        }
        .price-item--checkbox {
                    cursor: pointer;
                }

.price-item--checkbox input[type="checkbox"] {
                    width: 20px;
                    height: 20px;
                    border: 2px solid #cbd3da;
                    border-radius: 6px;
                    background: #ffffff;
                    appearance: none;
                    display: inline-grid;
                    place-content: center;
                    transition: all 0.2s ease;
                }
                .price-item--checkbox input[type="checkbox"]::after {
                    content: "";
                    width: 10px;
                    height: 6px;
                    border-left: 2px solid #ffffff;
                    border-bottom: 2px solid #ffffff;
                    transform: rotate(-45deg) scale(0);
                    transform-origin: center;
                    transition: transform 0.2s ease;
                }
                .price-item--checkbox input[type="checkbox"]:checked {
                    background: var(--market-color, #667eea);
                    border-color: var(--market-color, #667eea);
                    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
                }
                .price-item--checkbox input[type="checkbox"]:checked::after {
                    transform: rotate(-45deg) scale(1);
                }
                .price-item--checkbox input[type="checkbox"]:focus-visible {
                    outline: none;
                    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
                }
                .price-item--checkbox:hover input[type="checkbox"] {
                    border-color: var(--market-color, #667eea);
                }

        .price-item[data-market] {
            border-left: 4px solid var(--market-color, #ced4da);
            background: #ffffff;
        }

        .price-item[data-market="sportmaster"] {
            --market-color: #22c55e;
            background: #eefbf4;
        }

        .price-item[data-market="mvideo"] {
            --market-color: #ef4444;
            background: #fff1f2;
        }

        .price-item[data-market="magnitmarket"] {
            --market-color: #6366f1;
            background: #eef2ff;
        }

        .price-item[data-market="aliexpress"] {
            --market-color: #f97316;
            background: #fff7ed;
        }

        .price-item[data-market="avito"] {
            --market-color: #16a34a;
            background: #ecfdf3;
        }

        .price-item[data-market="ozon"] {
            --market-color: #2563eb;
            background: #eff6ff;
        }

        .price-item[data-market="ozon_fbo"] {
            --market-color: #1d4ed8;
            background: #dbeafe;
        }

        .price-ozon-priority {
            align-self: flex-end;
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: -2px;
            margin-right: 4px;
            font-size: 12px;
            font-weight: 600;
            color: #1e3a8a;
            cursor: pointer;
            background: #eef4ff;
            border-radius: 999px;
            padding: 4px 10px 4px 8px;
            border: 1px solid #c7d7ff;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
            user-select: none;
        }

        .price-ozon-priority input[type="checkbox"] {
            width: 16px;
            height: 16px;
            margin: 0;
            appearance: none;
            border-radius: 5px;
            border: 1.5px solid #7aa1ff;
            background: linear-gradient(180deg, #ffffff 0%, #edf3ff 100%);
            display: inline-grid;
            place-content: center;
            transition: all 0.2s ease;
        }

        .price-ozon-priority input[type="checkbox"]::after {
            content: "";
            width: 8px;
            height: 5px;
            border-left: 2px solid #ffffff;
            border-bottom: 2px solid #ffffff;
            transform: rotate(-45deg) scale(0);
            transform-origin: center;
            transition: transform 0.18s ease;
        }

        .price-ozon-priority input[type="checkbox"]:checked {
            border-color: #2563eb;
            background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
        }

        .price-ozon-priority input[type="checkbox"]:checked::after {
            transform: rotate(-45deg) scale(1);
        }

        .price-ozon-priority:hover {
            background: #e5efff;
            border-color: #a9c2ff;
        }

        .price-ozon-priority input[type="checkbox"]:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
        }

        .price-ozon-priority-row {
            display: flex;
            justify-content: flex-end;
            margin-top: 2px;
            padding-right: 16px;
        }

        .price-ozon-priority {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 600;
            color: #1e3a8a;
            cursor: pointer;
            background: #eef4ff;
            border-radius: 999px;
            padding: 4px 10px 4px 8px;
            border: 1px solid #c7d7ff;
            box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
            user-select: none;
        }

        .price-ozon-priority input[type="checkbox"] {
            width: 16px;
            height: 16px;
            margin: 0;
            appearance: none;
            border-radius: 5px;
            border: 1.5px solid #7aa1ff;
            background: linear-gradient(180deg, #ffffff 0%, #edf3ff 100%);
            display: inline-grid;
            place-content: center;
            transition: all 0.2s ease;
        }

        .price-ozon-priority input[type="checkbox"]::after {
            content: "";
            width: 8px;
            height: 5px;
            border-left: 2px solid #ffffff;
            border-bottom: 2px solid #ffffff;
            transform: rotate(-45deg) scale(0);
            transform-origin: center;
            transition: transform 0.18s ease;
        }

        .price-ozon-priority input[type="checkbox"]:checked {
            border-color: #2563eb;
            background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
        }

        .price-ozon-priority input[type="checkbox"]:checked::after {
            transform: rotate(-45deg) scale(1);
        }

        .price-ozon-priority:hover {
            background: #e5efff;
            border-color: #a9c2ff;
        }

        .price-ozon-priority input[type="checkbox"]:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
        }

        .price-item[data-market="ozon_express"] {
            --market-color: #3b82f6;
            background: #eff6ff;
        }

        .price-item[data-market="wildberries_fbs"] {
            --market-color: #a855f7;
            background: #faf5ff;
        }

        .price-item[data-market="wildberries_fbo"] {
            --market-color: #8b5cf6;
            background: #f5f3ff;
        }

        .price-item[data-market="wildberries_dbs"] {
            --market-color: #9333ea;
            background: #f3e8ff;
        }

        .price-item[data-market="yandex_fbs"] {
            --market-color: #f59e0b;
            background: #fffbeb;
        }

        .price-item[data-market="yandex_express"] {
            --market-color: #f97316;
            background: #fff7ed;
        }

        .price-item[data-market="yandex_dbs"] {
            --market-color: #d97706;
            background: #fffbeb;
        }

        .price-item.suspicious {
            background: #fff3cd;
            border-color: #ffc107;
        }

        .price-label {
            font-weight: 600;
            color: #495057;
        }

        .price-item__recommended {
            font-size: 12px;
            color: #000000;
            margin-left: auto;
            margin-right: 12px;
            white-space: nowrap;
        }

        .price-value {
            font-weight: 700;
            color: #28a745;
        }

        @media (max-width: 768px) {
            .price-grid {
                grid-template-columns: 1fr;
            }
            
            .form-row {
                flex-direction: column;
                gap: 15px;
            }
            
            .tabs {
                flex-direction: column;
            }
            
            .tab {
                text-align: left;
                border-bottom: 1px solid #dee2e6;
                border-left: 3px solid transparent;
            }
            
            .tab.active {
                border-left-color: #667eea;
            }
        }

        /* Адаптивность */
        @media (max-width: 1200px) {
            .header-controls {
                flex-direction: column;
            }
            
            .search-box {
                max-width: 100%;
            }
            
            .filter-buttons {
                justify-content: center;
                flex-wrap: wrap;
            }
            
            .stats {
                flex-direction: column;
                gap: 15px;
            }
            
            .stat-item {
                min-width: 100%;
                flex-direction: row;
                justify-content: space-between;
            }
        }

        @media (max-width: 768px) {
            .pagination {
                flex-direction: column;
                gap: 10px;
            }
            
            .dropdown-menu {
                position: fixed;
                top: auto;
                left: 10px;
                right: 10px;
                bottom: 10px;
                max-height: 70vh;
                overflow-y: auto;
            }
            
            .edit-icon-wrapper {
                opacity: 0.5; /* Всегда показывать иконки на мобильных */
            }
            
            .editable-field {
                padding: 6px 8px;
            }
        }
        /* ЦЕНТРИРОВАНИЕ ВСЕГО ТЕКСТА ТОВАРОВ */
#productsTable td {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Для всех ячеек данных */
#productsTable td,
#productsTable td:nth-child(1),
#productsTable td:nth-child(2),
#productsTable td:nth-child(3),
#productsTable td:nth-child(4),
#productsTable td:nth-child(5),
#productsTable td:nth-child(6),
#productsTable td:nth-child(7),
#productsTable td:nth-child(8),
#productsTable td:nth-child(9) {
    text-align: center !important;
    vertical-align: middle !important;
}
        /* ========== СТИЛИ ДЛЯ РЕДАКТИРУЕМЫХ ПОЛЕЙ ========== */
        .editable-field {
            position: relative;
            cursor: pointer;
            padding: 6px 8px;
            border-radius: 4px;
            transition: all 0.2s;
            min-height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            box-sizing: border-box;
            text-align: center;
        }

        .editable-field:hover {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border: 1px dashed #dee2e6;
        }

        /* Контейнер для быстрого редактирования */
        .quick-edit-container {
            display: flex;
            align-items: center;
            gap: 6px;
            justify-content: center;
            width: 100%;
            max-width: 100%;
            position: relative;
            z-index: 10;
        }

        /* Поле ввода для редактирования */
        .quick-edit-input {
            flex: 1;
            padding: 6px 10px;
            border: 2px solid #2196F3;
            border-radius: 4px;
            font-size: 13px;
            max-width: 95%;
            text-align: center;
            box-sizing: border-box;
            transition: all 0.2s;
            background: white;
        }

        /* Разные ширины для разных полей */
        #productsTable td:nth-child(3) .quick-edit-input,  /* Штрихкод */
        #productsTable td:nth-child(4) .quick-edit-input,  /* Производитель */
        #productsTable td:nth-child(6) .quick-edit-input { /* Закуп. стоимость */
            max-width: 170px;
            min-width: 150px;
        }
        #productsTable td:nth-child(3) .quick-edit-input { /* Штрихкод */
            max-width: 150px;
            min-width: 140px;
            flex: 0 1 150px;
            margin: 0 auto;
        }        
        #productsTable td:nth-child(3) .quick-edit-input { /* Штрихкод */
            max-width: 110px;
            min-width: 100px;
            flex: 0 1 110px;
            margin: 0 auto;
        }
        #productsTable td:nth-child(5) .quick-edit-input { /* Наименование */
            max-width: 520px;
            min-width: 480px;        }

        #productsTable td:nth-child(2) .quick-edit-input { /* SKU */
            max-width: 100px;
            min-width: 90px;
        }

        /* Иконка сохранения */
        .save-checkmark {
            color: #4CAF50;
            cursor: pointer;
            font-size: 16px;
            padding: 4px;
            transition: transform 0.2s;
            flex-shrink: 0;
        }

        .save-checkmark:hover {
            transform: scale(1.2);
        }

        /* SKU поле (не редактируемое) */
        /* Обновленные стили для SKU с иконкой копирования */
.sku-field {
    font-weight: 600;
    color: #495057;
    padding: 6px 30px 6px 10px !important; /* Больше отступ справа для иконки */
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    position: relative; /* Для абсолютного позиционирования иконки */
    cursor: pointer; /* Курсор-указатель */
    transition: all 0.2s;
    min-height: 36px;
    text-align: center;
}

.sku-field:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Контент SKU */
.sku-field .field-content {
    flex-grow: 1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 5px;
}

/* Контейнер иконки копирования */
.sku-field .edit-icon-wrapper {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    transition: all 0.3s;
    background: white;
    border-radius: 4px;
    padding: 4px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    z-index: 5;
    padding: 2px;
    padding: 3px;          /* Было 4px */
    border-radius: 3px;    /* Было 4px */
    border: 0.8px solid #dee2e6; /* Можно оставить или сделать 0.8px */
}

/* При наведении на SKU поле */
.sku-field:hover .edit-icon-wrapper {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.1);
    border-color: #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

/* При наведении на саму иконку */
.sku-field .edit-icon-wrapper:hover {
    opacity: 1 !important;
    background: #e3f2fd;
    border-color: #2196F3;
}

/* Иконка копирования */
.sku-field .edit-icon-wrapper .edit-icon {
    color: #6c757d;
    font-size: 10px;
    transition: all 0.3s;
}

/* Иконка при наведении */
.sku-field .edit-icon-wrapper:hover .edit-icon {
    color: #2196F3;
}

/* Анимация для иконки галочки (после копирования) */
.sku-field .edit-icon-wrapper .edit-icon.fa-check {
    color: #4CAF50 !important;
    animation: bounce 0.5s;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

        .field-content {
            flex-grow: 1;
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Иконка редактирования */
        .edit-icon-wrapper {
            margin-left: 8px;
            opacity: 0;
            transform: translateX(-5px);
            transition: all 0.3s;
            flex-shrink: 0;
        }

        .editable-field:hover .edit-icon-wrapper {
            opacity: 0.8;
            transform: translateX(0);
        }

        .edit-icon {
            color: #6c757d;
            font-size: 12px;
            padding: 4px;
            background: white;
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            border: 1px solid #dee2e6;
            transition: all 0.3s;
        }

        .editable-field:hover .edit-icon {
            color: #2196F3;
            background: #e3f2fd;
            border-color: #bbdefb;
            transform: scale(1.1);
            box-shadow: 0 3px 6px rgba(33, 150, 243, 0.2);
        }

        /* Фикс чтобы поле редактирования не выходило за границы */
        #productsTable td {
            position: relative;
            overflow: visible !important;
        }

        #productsTable td.editing {
            overflow: visible !important;
        }

        .quick-edit-input:focus {
            position: relative;
            z-index: 20;
            box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
        }
  /* Оверлей модалки */
  .sm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;               /* включаем через JS */
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
  }

  /* Контент модалки */
  .sm-modal__content {
    width: min(980px, 95vw);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.25);
    overflow: hidden;
  }

  .sm-modal__header,
  .sm-modal__footer {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eee;
  }
  .sm-modal__footer {
    border-top: 1px solid #eee;
    border-bottom: none;
  }

  .sm-modal__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
  }

  .sm-modal__body {
    padding: 12px 16px 16px;
    max-height: 70vh;
    overflow: auto;
  }

  /* Таблица логов */
  .sm-table {
    width: 100%;
    border-collapse: collapse;
  }

  .sm-table th,
  .sm-table td {
    padding: 10px 10px;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid #eee;   /* линия между строками */
  }

  .sm-table thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid #ddd;
  }

  /* Дополнительная “жирная” линия для начала каждой группы taskId */
  .sm-row-group-start td {
    border-top: 2px solid #ddd;
  }

  /* Визуальные бейджи статусов */
  .sm-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    border: 1px solid transparent;
    white-space: nowrap;
  }
  .sm-badge--ok { background: rgba(40,167,69,.12); color: #1f7a36; border-color: rgba(40,167,69,.25); }
  .sm-badge--warn { background: rgba(255,152,0,.12); color: #a35f00; border-color: rgba(255,152,0,.25); }
  .sm-badge--err { background: rgba(220,53,69,.12); color: #a61f2d; border-color: rgba(220,53,69,.25); }
  .sm-badge--na { background: rgba(108,117,125,.10); color: #6c757d; border-color: rgba(108,117,125,.20); }

  /* Текст ошибки */
  .sm-error {
    color: #dc3545;
    font-weight: 600;
  }
  .sm-muted {
    color: #666;
  }
  .sm-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .sm-task {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    overflow: hidden;
  }

    .sm-task__header {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 160px 1fr 140px 120px;
    align-items: flex-start;   /* ← ВАЖНО */
    gap: 12px;
    }
  .sm-task__header:hover {
    background: #f9fafb;
  }

  .sm-task__time {
    font-size: 12px;
    color: #6b7280;
  }

  .sm-task__type {
    font-weight: 600;
  }

  .sm-task__taskid {
    font-family: monospace;
    text-decoration: underline;
    cursor: pointer;
  }

  .sm-task__body {
    padding: 12px 16px 16px;
    border-top: 1px solid #eee;
    display: none;
  }

  .sm-task.open .sm-task__body {
    display: block;
  }

  .sm-task__msg {
    margin-bottom: 6px;
    color: #374151;
  }

  .sm-task__error {
    color: #dc3545;
    font-weight: 600;
    margin-bottom: 6px;
  }

  .sm-task__hint {
    font-size: 12px;
    color: #6b7280;
  }
  
.prices-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.prices-title{ font-size:16px; font-weight:700; }
.prices-sub{ font-size:12px; color:#666; margin-top:4px; }
.prices-actions{ display:flex; gap:8px; flex-wrap:wrap; }

.price-group{
  border:1px solid #eee;
  border-radius:12px;
  padding:12px;
  margin-bottom:10px;
  background:#fff;
}
.price-group-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}
.price-group-title{ font-weight:700; }
.price-group-note{ font-size:12px; color:#666; }

.price-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap:10px;
}

.price-item-wide{ grid-column: 1 / -1; }
.mini-actions{ display:flex; gap:8px; flex-wrap:wrap; }

.price-input{ font-variant-numeric: tabular-nums; }
@media (max-width: 900px){
  .price-grid{ grid-template-columns: repeat(2, minmax(200px, 1fr)); }
}
@media (max-width: 600px){
  .price-grid{ grid-template-columns: 1fr; }
}


/* ========== ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ ========== */

/* ШАПКА ТАБЛИЦЫ */
#productsTable th,
#productsTable th:nth-child(1),
#productsTable th:nth-child(2),
#productsTable th:nth-child(3),
#productsTable th:nth-child(4),
#productsTable th:nth-child(5),
#productsTable th:nth-child(6),
#productsTable th:nth-child(7),
#productsTable th:nth-child(8),
#productsTable th:nth-child(9) {
    height: auto !important;
    min-height: 60px !important;
    max-height: none !important;
    padding: 20px 15px !important;
    line-height: 1.4 !important;
    font-size: 14px !important;
    text-align: center !important;
    vertical-align: middle !important;
}


/* ФИКС ДЛЯ 7-Й КОЛОНКИ (ОСТАТКИ) */
#productsTable td:nth-child(7) {
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: center !important;
}

#productsTable td:nth-child(7) .stock-status {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

/* ЯЧЕЙКА С ОСТАТКАМИ - ЦИФРА И СТАТУС НА ОДНОЙ СТРОКЕ */
.stock-cell {
    overflow: visible !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* Цифра остатка - слева */
.stock-badge {
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 8px !important;  /* Отступ от статуса справа */
    float: none !important;
}

/* Статус - справа от цифры */
.stock-status {
    display: inline-block !important;
    vertical-align: middle !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

/* Цвета статусов */
.stock-in {
    background: #d4edda !important;
    color: #155724 !important;
}

.stock-out {
    background: #f8d7da !important;
    color: #721c24 !important;
}

/* БЭДЖ С ЦИФРОЙ ОСТАТКА */
.stock-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-weight: 700;
    border: 1px solid #bbdefb;
    transition: all 0.3s;
    cursor: pointer;
    min-width: 70px;
    text-align: center;
    font-size: 14px;
}

.stock-badge:hover {
    background: #bbdefb;
}

/* Убираем пробелы между inline-блоками */
.stock-cell {
    font-size: 0;
}

.stock-cell > * {
    font-size: 14px;
}
/* Увеличиваем именно модалку цен */
#modalPrices .modal{
  width: 92vw;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Контент внутри модалки должен скроллиться */
#modalPrices .modal-content{
  flex: 1;
  overflow: auto;
  padding-right: 6px; /* чтобы скролл не наезжал на контент */
}

/* Аккордеон */
.mp-accordion{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-accordion details{
  border: 1px solid #e9ecef;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

/* Заголовок секции (маркет) — отдельным цветом */
.mp-accordion summary{
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;

  background: #f2f7ff;
  border-bottom: 1px solid #e9ecef;
  color: #000000;
  font-weight: 700;
}

/* Убираем стандартный маркер */
.mp-accordion summary::-webkit-details-marker{ display:none; }

/* Стрелка справа */
.mp-accordion summary::after{
  content: "▾";
  font-weight: 700;
  color: #0b3a7e;
}
.mp-accordion details[open] summary::after{
  content: "▴";
}

/* Подзаголовок справа */
.mp-note{
  font-size: 12px;
  color: #2c5aa0;
  font-weight: 600;
}

/* Сетка полей */
.mp-grid{
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}

@media (max-width: 900px){
  .mp-grid{ grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
@media (max-width: 600px){
  .mp-grid{ grid-template-columns: 1fr; }
}
/* ========================= */
/* OVERLAY MODALS (FIX) */
/* ========================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
}

.modal-overlay .modal-content {
  background: #ffffff;
  color: #222222;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  font-size: 14px;
}

/* таблицы внутри модалки */
.modal-overlay table th {
  background: #f6f7f9;
  font-weight: 600;
}

.modal-overlay table td,
.modal-overlay table th {
  color: #222;
}

/* приглушённый текст */
.modal-overlay .sm-muted {
  color: #6b7280;
}

.stock-change-amount-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 auto;
}

.stock-change-sign {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.stock-change-sign:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.stock-change-sign--minus {
  background: #dc3545;
}

.stock-change-sign--plus {
  background: #28a745;
}

.stock-change-sign.is-active {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.stock-change-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.stock-change-form-side {
  min-width: 0;
}

.stock-change-history-side {
  border-left: 1px solid #eceff3;
  padding-left: 14px;
}

.stock-change-history-side h4 {
  margin: 0;
}

.stock-change-history-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.stock-change-history-search {
  max-width: 180px;
  margin-left: auto;
  padding: 6px 10px;
  font-size: 12px;
}

.stock-change-inline-history {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.stock-change-history-placeholder {
  text-align: center;
  color: #666;
  margin: 12px 0;
}

@media (max-width: 900px) {
  .stock-change-layout {
    grid-template-columns: 1fr;
  }
  .stock-change-history-side {
    border-left: none;
    border-top: 1px solid #eceff3;
    padding-left: 0;
    padding-top: 12px;
  }
}

#stockChangeAmount {
  text-align: center;
  width: 96px;
  min-width: 96px;
  padding: 6px 8px;
  -moz-appearance: textfield;
}

#stockChangeAmount::-webkit-outer-spin-button,
#stockChangeAmount::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


.ip-products__new-price-input {
  -moz-appearance: textfield;
}

.ip-products__new-price-input::-webkit-outer-spin-button,
.ip-products__new-price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Виртуальный склад: цифра остатка окрашивается в оранжевый, если наличие только за счёт virtual */
.stock-badge.stock-badge--virtual {
  background: #fff0e0 !important;
  color: #ff7b00 !important;
  border-color: #ffb951 !important;
  box-shadow: none !important;
}
.stock-badge.stock-badge--wb {
  background: #ffe5e5 !important;
  color: #d81b1b !important;
  border-color: #ff8a8a !important;
  box-shadow: none !important;
}

/* IP marketplace page */
.ip-page .main-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ip-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e6e9ef;
}

.ip-section__header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 6px;
}

.ip-section__header p {
  color: #6c757d;
  font-size: 14px;
}

.ip-groups {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 16px;
}

.ip-group {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e6e9ef;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  margin: 0;
}

.ip-groups > .ip-group {
  margin: 0;
}

.ip-groups > .ip-group + .ip-group {
  margin-top: 28px;
}

.ip-group__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  cursor: pointer;
  list-style: none;
}

.ip-group__summary::-webkit-details-marker {
  display: none;
}

.ip-group__summary::marker {
  content: "";
}

.ip-group__summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #9ca3af;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.ip-group[open] > .ip-group__summary::after {
  transform: rotate(180deg);
}

.ip-group__title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ip-group__icon {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background-color: #ffffff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.ip-group--wb > .ip-group__summary .ip-group__icon {
  background-image: url("https://salonsvyazi.ru/d/vb.png");
}

.ip-group--yandex > .ip-group__summary .ip-group__icon {
  background-image: url("https://salonsvyazi.ru/d/yam.png");
}

.ip-group--ozon > .ip-group__summary .ip-group__icon {
  background-image: url("https://salonsvyazi.ru/d/ozon_946498.png");
}

.ip-group--aliexpress > .ip-group__summary .ip-group__icon {
  background-image: url("https://salonsvyazi.ru/d/ali.png");
}

.ip-group--avito > .ip-group__summary .ip-group__icon {
  background-image: url("https://salonsvyazi.ru/d/avito.jpg");
}

.ip-group--sportmaster > .ip-group__summary .ip-group__icon {
  background-image: url("https://salonsvyazi.ru/d/sm.png");
}

.ip-group--mvideo > .ip-group__summary .ip-group__icon {
  background-image: url("https://salonsvyazi.ru/d/mvideo_151772.png");
}

.ip-group--magnitmarket > .ip-group__summary .ip-group__icon {
  background-image: url("https://salonsvyazi.ru/d/mm.png");
}

.ip-group__title h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  color: #1f2937;
  margin: 0;
}

.ip-group__title p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.ip-group__models {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ip-group__model {
  background: #f4f8ff;
  border-radius: 12px;
  border: 1px solid #e9edf3;
  padding: 14px;
}

.ip-group--wb .ip-group__model {
  background: #f6efff;
  border-color: #e4d8ff;
}

.ip-group--yandex .ip-group__model {
  background: #fff6e5;
  border-color: #f3e0b5;
}

.ip-group--ozon .ip-group__model {
  background: #edf5ff;
  border-color: #d4e6ff;
}

.ip-group--sportmaster .ip-group__model {
  background: #eaf7f2;
  border-color: #cfeadf;
}

.ip-group--mvideo .ip-group__model {
  background: #fff0f0;
  border-color: #f2c9c9;
}

.ip-group--aliexpress .ip-group__model {
  background: #fff4e6;
  border-color: #f5d5b5;
}

.ip-group--avito .ip-group__model {
  background: #eaf9f0;
  border-color: #cfeedd;
}

.ip-group--magnitmarket .ip-group__model {
  background: #f1f5ff;
  border-color: #d6e0ff;
}

.ip-group__model-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #1f2937;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
  line-height: 1.2;
  text-align: left;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e1e6ef;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.ip-group__model-title::-webkit-details-marker {
  display: none;
}

.ip-group__model-title::marker {
  content: "";
}

.ip-group__model-title::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #6b7280;
  font-size: 12px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.ip-group__model[open] > .ip-group__model-title::after {
  transform: rotate(180deg);
}

.ip-group__model-title:hover {
  border-color: #c7d2fe;
  background: #f8fafc;
}

.ip-group__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.ip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.ip-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef1f6;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ip-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ip-card__header h3 {
  font-size: 16px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ip-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ip-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ip-api-expiry {
  min-width: 180px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 13px;
  color: #0f172a;
  background: #ffffff;
  text-align: center;
}

.ip-api-expiry__value {
  display: inline-block;
  min-width: 86px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.ip-api-expiry__value:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
  background: #ffffff;
}

.ip-field label {
  display: block;
  font-size: 13px;
  color: #495057;
  font-weight: 600;
  margin-bottom: 6px;
}
.ip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ip-action-button {
  border-radius: 0;
  padding: 7px 14px;
  font-weight: 600;
  box-shadow: 0 8px 16px rgba(30, 41, 59, 0.12);
  border: 1px solid transparent;
}

.ip-action-button i {
  font-size: 12px;
}

.ip-action-button--stocks {
  background: #0ea5e9;
  color: #ffffff;
}

.ip-action-button--stocks:hover {
background: #0284c7;
}

.ip-action-button--prices {
  background: #f97316;
  color: #ffffff;
}

.ip-action-button--prices:hover {
background: #ea580c;
}

.ip-action-button--logs {
  background: #6366f1;
  color: #ffffff;
}

.ip-action-button--logs:hover {
background: #4f46e5;
}
.ip-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e5e7eb;
  color: #374151;
}

.ip-status--ok {
  background: #dcfce7;
  color: #166534;
}

.ip-status--error {
  background: #fee2e2;
  color: #b91c1c;
}

.ip-status--loading {
  background: #dbeafe;
  color: #1d4ed8;
}
.ip-placeholder {
  background: #eef3f9;
  border: 1px dashed #cbd5f5;
  border-radius: 8px;
  padding: 12px;
  color: #6b7280;
  font-size: 13px;
}
.ip-log {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}

.ip-log__item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  color: #374151;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ip-log__item strong {
  font-weight: 600;
}

.ip-log__empty {
  color: #9ca3af;
  font-size: 12px;
}
.ip-panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #eef1f6;
  display: grid;
  gap: 14px;
}

/* Logs modal */
.ip-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 2000;
  padding: 20px;
}

.ip-modal--open {
  opacity: 1;
  visibility: visible;
}

.ip-modal__dialog {
  background: #ffffff;
  border-radius: 16px;
  width: min(960px, 96vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
  overflow: hidden;
}

.ip-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.ip-modal__header h3 {
  font-size: 18px;
  color: #1f2937;
}

.ip-modal__close {
  border: none;
  background: #e2e8f0;
  color: #334155;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ip-modal__close:hover {
  background: #cbd5f5;
}

.ip-modal__body {
  padding: 18px 22px 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ip-modal__meta {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ip-modal__table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.ip-modal__table th,
.ip-modal__table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.ip-modal__table th {
  background: #eef2ff;
  color: #1e1b4b;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ip-modal__table tr:last-child td {
  border-bottom: none;
}

.ip-modal__footer {
  padding: 16px 22px 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  background: #f8fafc;
}

.ip-modal__download {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  border-radius: 10px;
  padding: 8px 16px;
  box-shadow: 0 10px 18px rgba(34, 197, 94, 0.25);
}

.ip-modal__download:hover {
  background: linear-gradient(135deg, #4ade80, #22c55e);
}

.ip-products__mapping-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.ip-products__mapping-template,
.ip-products__mapping-upload {
  background: #eef2ff;
  color: #1e1b4b;
  border-radius: 10px;
}

.ip-products__mapping-template:hover,
.ip-products__mapping-upload:hover {
  background: #dbeafe;
}

.ip-products__mapping-input {
  display: none;
}
