body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #2c3e50;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-left, .header-right {
    display: flex;
    align-items: center;
}

.nav-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background-color: #2980b9;
}

.logout-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Основное содержимое */
.main-content {
    flex: 1;
    padding: 2rem;
    background-color: white;
    margin: 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.welcome-message {
    text-align: center;
    margin-top: 2rem;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 50%;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 500px;
    padding: 25px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* Форма входа */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #ecf0f1;
}

.login-form {
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #7f8c8d;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #27ae60;
}

.error-message {
    margin-left: 10px;
    flex-grow: 1;
    text-align: left;
}

.error-message h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: inherit;
}

.errors-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(198, 40, 40, 0.2);
    border-radius: 4px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.7);
}

.error-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(198, 40, 40, 0.1);
}

.error-item:last-child {
    border-bottom: none;
}

/* Статус загрузки */
#uploadStatus {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
}

.success {
    background-color: #d5f5e3;
    color: #27ae60;
}

.error {
    background-color: #fadbd8;
    color: #e74c3c;
}

/* Стили для уведомлений */
.alert {
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert i {
    font-size: 24px;
    margin-right: 10px;
}

.alert.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.alert.error {
    display: flex;
    align-items: flex-start;
    padding: 15px;
}

.alert.error i {
    font-size: 24px;
    margin-right: 10px;
    color: #e74c3c;
}

.alert.critical {
    background-color: #fff8e1;
    color: #e65100;
}

.error-list {
    margin: 10px 0 0 20px;
    padding: 0;
    list-style-type: none;
    max-height: 200px;
    overflow-y: auto;
}


.error-list li {
    position: relative;
    padding: 3px 0;
}

.error-list li {
    position: relative;
    padding: 5px 0;
    border-bottom: 1px solid rgba(198, 40, 40, 0.1);
}

.file-input-container {
    margin: 20px 0;
}

.file-label {
    display: block;
    padding: 15px;
    border: 2px dashed #ccc;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-label:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.file-label i {
    font-size: 24px;
    color: #3498db;
    margin-bottom: 10px;
}

#file-name {
    display: block;
    margin-top: 5px;
    color: #666;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #2980b9;
}

.submit-btn i {
    margin-right: 8px;
}

.status-container {
    margin-top: 20px;
    min-height: 50px;
}

/* Иконки для статусов */
.fa-check { color: #2ecc71; }
.fa-warning { color: #f39c12; }
.fa-error { color: #e74c3c; }

.progress-container {
    width: 100%;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin: 10px 0;
}

.progress-bar {
    height: 20px;
    background-color: #4CAF50;
    border-radius: 5px;
    text-align: center;
    line-height: 20px;
    color: white;
}

.status-container.info {
    background-color: #e3f2fd;
    color: #1976d2;
}

.error-content {
    margin-left: 10px;
}

.error-content h4 {
    margin: 0 0 10px 0;
    color: inherit;
}

.alert i {
    font-size: 24px;
    margin-right: 10px;
}


.error-list {
    margin: 10px 0 0 20px;
    padding: 0;
    list-style-type: disc;
    color: #e74c3c;
    max-height: 300px;
    overflow-y: auto;
}

.error-list li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(198, 40, 40, 0.1);
}





.reprisers-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.reprisers-table th, .reprisers-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 25px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(24px);
}


/* Магазины */
.shops-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.shops-table th, .shops-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.large-modal {
    max-width: 800px;
    width: 90%;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.form-input {
            width: 100%;
            padding: 12px 15px;
            margin-bottom: 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 14px;
            box-sizing: border-box;
            transition: border-color 0.3s;
}

.form-input:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}
.form-input::placeholder {
    color: #999;
    overflow: visible;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}
.cancel-btn, .submit-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}
.cancel-btn {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    color: #333;
}
.cancel-btn:hover {
    background-color: #eaeaea;
}
.submit-btn {
    background-color: #4a90e2;
    border: 1px solid #4a90e2;
    color: white;
}

.submit-btn:hover {
    background-color: #3a7bc8;
}

/*Главаная таблица*/
#filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    align-items: center;
}

#filterShop, #filterArticle {
    width: 200px; /* Уменьшенная ширина */
    padding: 8px 12px;
}

.category-filter {
    margin-right: 5px;
}

/* Таблица */
#dataTableContainer {
    overflow-x: auto;
    position: relative;
    max-height: 75vh; /* <-- ИЗМЕНИТЬ ЗДЕСЬ. 75% от высоты окна */
}

.main-data-table {
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

/* Фиксированные колонки */


/* Ширина фиксированных колонок */
/* Фиксируем только первые 2 колонки */
.main-data-table th:nth-child(1),
.main-data-table td:nth-child(1) {
    position: sticky;
    left: 0;
    width: 100px;
    background: #fff;
    z-index: 2;
}

.main-data-table th:nth-child(2),
.main-data-table td:nth-child(2) {
    position: sticky;
    left: 100px;
    width: 120px;
    background: #fff;
    z-index: 2;
}

/* Остальные колонки (включая 3-5) - обычная прокрутка */
.main-data-table th:nth-child(n+3),
.main-data-table td:nth-child(n+3) {
    position: static;
    width: auto;
}

main-data-table {
    border-collapse: separate;
    border-spacing: 0;
}

.main-data-table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 2px -1px rgba(0,0,0,0.1);
}

.main-data-table th {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #ddd;
    font-weight: 500;
    white-space: nowrap;
}

.main-data-table td {
    padding: 8px 12px;
    border: 1px solid #eee;
    white-space: nowrap;
}

.filters-container {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 10px;
            background: #f5f5f5;
            border-radius: 8px;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }

.filter-input {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
            min-width: 150px;
        }

.filter-input:focus {
            border-color: #4a90e2;
            box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
        }

.filter-shop {
    background: #e3f2fd;
}

.filter-article {
    background: #e8f5e9;
}

.category-filters {
    display: flex;
    gap: 8px;
    align-items: center;
}

.category-filter-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-right: 5px;
}

.category-filter-label input[type="checkbox"]:checked {
    border-color: transparent;
}

    /* Цвета для разных чекбоксов */
.category-filter-label input[type="checkbox"][value="dopinfo"]:checked {
    background-color: #FFD700; /* золотой */
}

.category-filter-label input[type="checkbox"][value="price"]:checked {
    background-color: #87CEEB; /* голубой */
    }

.category-filter-label input[type="checkbox"][value="remaining"]:checked {
    background-color: #98FB98; /* светло-зеленый */
    }

.category-filter-label input[type="checkbox"][value="analytics"]:checked {
    background-color: #FFB6C1; /* розовый */
    }

.category-filter-label input[type="checkbox"][value="repricer"]:checked {
    background-color: #FFA07A; /* оранжевый */
    }

.category-filter-label {
            display: flex;
            align-items: center;
            cursor: pointer;
            font-size: 14px;
            padding: 4px 8px;
            border-radius: 16px;
            background: #fff;
            transition: all 0.2s;
        }

.category-filter-label:hover {
            background: #f0f0f0;
        }

.apply-btn {
            padding: 8px 16px;
            background: #4a90e2;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            cursor: pointer;
            transition: background 0.3s;
        }

.apply-btn:hover {
    background: #3a7bc8;
}

.reset-btn {
            padding: 8px 16px;
            background: #CD5C5C;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            cursor: pointer;
            transition: background 0.3s;
        }

.reset-btn:hover {
    background: #7B001C;
}

.date-filters {
            display: none;
            align-items: center;
            gap: 8px;
            padding: 8px;
            background: #e9ecef;
            border-radius: 4px;
            font-size: 14px;
        }

.date-select {
            padding: 4px 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }

/* Мини таблички под остатки */
.stock-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 2px;
}

.stock-bubble {
    background: #e8f5e9;
    border-radius: 12px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #c8e6c9;
}

.stock-bubble.ozon {
    background: #e3f2fd;
    border-color: #bbdefb;
}

.stock-bubble.our {
    background: #e8f5e9;
    border-color: #c8e6c9;
}

.bubble-label {
    font-size: 11px;
    color: #2e7d32;
    margin-right: 4px;
    font-weight: 500;
}

.bubble-value {
    font-size: 12px;
    font-weight: 600;
    color: #1b5e20;
}

.stock-bubble.ozon .bubble-label {
    color: #0d47a1;
}

.stock-bubble.ozon .bubble-value {
    color: #1565c0;
}

.no-stock-data {
    color: #bdbdbd;
    font-style: italic;
    padding: 4px 0;
    text-align: center;
}

/* Для продаж */
.combined-cell {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid #d9afc8;
    border-radius: 12px;
    background-color: #f4dcea;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);;
}

.combined-cell .left {
    text-align: left;
    color: #2b2b2b;
    font-weight: 400;
}

.combined-cell .right {
    text-align: right;
    color: #4a4a4a;
    font-weight: 400;
}

/* --- НОВЫЕ СТИЛИ --- */

/* Стили для уведомлений (Toast) */
.notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 320px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    background-color: #2c3e50; /* Темный цвет по умолчанию */
}

.notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-toast.error {
    background-color: #c0392b; /* Темно-красный для ошибок */
}

.notification-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    line-height: 1;
    margin-left: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.notification-close-btn:hover {
    opacity: 1;
}

/* Стили для обновления цены в таблице */
.price-update-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.current-price-display {
    font-weight: 500;
    white-space: nowrap;
    min-width: 40px;
    text-align: right;
}

.price-update-input {
    width: 45px; /* Увеличил ширину */
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: textfield;
    background-color: white;
}

.price-update-input::-webkit-outer-spin-button,
.price-update-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-update-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
    outline: none;
}

.price-update-btn {
    padding: 5px 12px;
    font-size: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 40px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Анимация ripple */
.price-update-btn:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,0.5);
    opacity: 0;
    border-radius: 100%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center;
}

.price-update-btn:not(:disabled):active::after,
.price-update-btn:not(:disabled):focus::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(20);
        opacity: 0;
    }
}

.price-update-btn:hover:not(:disabled) {
    background-color: #229954;
    transform: translateY(-1px);
}

.price-update-btn:active:not(:disabled) {
    transform: translateY(0);
}

.price-update-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Стили для состояний кнопки */
.price-update-btn.success {
    background-color: #27ae60;
}

.price-update-btn.error {
    background-color: #e74c3c;
}

/* Loader styles */
.button-loader {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.price-update-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}


/* Стили для репрайсеров в таблице */
.repr-cell-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 6px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.repr-cell-labels {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    line-height: 1.3;
    min-width: 45px;
    color: #555;
}

.repr-cell-inputs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.repr-cell-inputs input {
    width: 60px;
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.repr-cell-inputs input::-webkit-outer-spin-button,
.repr-cell-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.repr-cell-inputs input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
    outline: none;
}

.repr-cell-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.repr-save-btn {
    padding: 4px 8px;
    font-size: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.repr-save-btn:hover {
    background-color: #229954;
}

/* Увеличенные переключатели */
.repr-switch-table {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.repr-switch-table input {
    opacity: 0;
    width: 0;
    height: 0;
}

.repr-slider-table {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 22px;
}

.repr-slider-table:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.repr-switch-table input:checked + .repr-slider-table {
    background-color: #27ae60;
}

.repr-switch-table input:checked + .repr-slider-table:before {
    transform: translateX(20px);
}

/* Цвета категорий */
.cell-dopinfo { background-color: #fff9e6; }
.cell-price { background-color: #e6f4ff; }

.cell-dopinfo     { background-color: #fff9e6; }
.cell-price       { background-color: #e6f4ff; }
.cell-remaining   { background-color: #f0fff0; }
.cell-analytics   { background-color: #fff0f5; }
.cell-repricer    { background-color: #fef5e7; }

/* Фиксированные колонки */
.cell-fixed       { position: sticky; left: 0; background: #fff; z-index: 1; }

.repr-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    padding: 4px 6px;
    border-radius: 4px;
    background-color: #ecf5fd;
    border: 1px solid #d0e6f7;
    transition: background-color 0.3s;
}

.repr-link:hover {
    background-color: #d4eaff;
    text-decoration: underline;
}




/* Стили для ссылок в новых колонках */
.history-price-link,
.available-actions-link {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 2px 0;
}

.show-history,
.show-actions {
    color: #5f6368;
    text-decoration: none;
    font-weight: 400;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.15s ease;
    font-size: 12px;
    background-color: transparent;
    border: none;
    position: relative;
}

.show-history:hover,
.show-actions:hover {
    color: #1a73e8;
    background-color: rgba(26, 115, 232, 0.08);
}

.show-history:active,
.show-actions:active {
    transform: scale(0.96);
}

/* Подчеркивание при наведении */
.show-history::after,
.show-actions::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 1px;
    background-color: transparent;
    transition: background-color 0.15s ease;
}

.show-history:hover::after,
.show-actions:hover::after {
    background-color: #1a73e8;
}

/* Иконка стрелки (опционально) */
.show-history::before,
.show-actions::before {
    content: '→';
    margin-right: 4px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateX(-3px);
}

.show-history:hover::before,
.show-actions:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Стили для модального окна (акции история)*/
/* Стили для решений в таблице акций */
.actions-modal-table td.decision-yes {
    color: #28a745 !important; /* зеленый */
    font-weight: bold;
}

.actions-modal-table td.decision-no {
    color: #dc3545 !important; /* красный */
    font-weight: bold;
}

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.custom-modal-dialog {
    background-color: white;
    border-radius: 8px;
    width: 80%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: modalFadeIn 0.3s ease-out;
}

.custom-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #202124;
}

.custom-modal-header button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #5f6368;
    line-height: 1;
    padding: 0 0 4px 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.custom-modal-header button:hover {
    background-color: #f1f3f4;
}

.custom-modal-body {
    padding: 0;
    overflow-y: auto;
    max-height: calc(90vh - 60px);
}

/* Стили для таблиц в модальных окнах (акции история)*/
.history-modal-table,
.actions-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-modal-table th,
.actions-modal-table th {
    background-color: #f8f9fa;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-weight: 500;
    color: #202124;
    position: sticky;
    top: 0;
}

.history-modal-table td,
.actions-modal-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    color: #3c4043;
}

.history-modal-table tr:hover,
.actions-modal-table tr:hover {
    background-color: #f8f9fa;
}

/* Стили для статуса акции */
.in-promo {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    background-color: #e8f5e9;
    color: #2e7d32;
    font-weight: 500;
    font-size: 12px;
    border: 1px solid #c8e6c9;
}

.not-in-promo {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    background-color: #ffebee;
    color: #c62828;
    font-weight: 500;
    font-size: 12px;
    border: 1px solid #ffcdd2;
}

/* Обновленные стили для ячейки с комментарием */
.comment-cell {
    padding: 2px !important;
    font-size: 12px;
}

/* Контейнер для комментария */
.comment-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    gap: 3px; /* Добавляем небольшой отступ между элементами */
}

/* Поле ввода комментария - увеличенная высота, уменьшенная ширина */
.comment-input-field {
    width: calc(95% - 4px); /* Уменьшаем ширину до 90% */
    height: 40px; /* Фиксированная высота */
    min-height: 40px; /* Минимальная высота */
    padding: 4px;
    font-size: 12px;
    resize: vertical; /* Разрешаем изменять высоту */
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: auto; /* Выравниваем по левому краю */
}

/* Зеленая кнопка сохранения - более компактная */
.comment-save-btn {
    width: 40px; /* Фиксированная ширина */
    padding: 4px 0;
    font-size: 11px;
    background-color: #27ae60; /* Ярко-зеленый цвет */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto; /* Выравниваем по правому краю */
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-save-btn:hover {
    background-color: #27ae60; /* Темнее при наведении */
    transform: translateY(-1px);
}

.comment-save-btn:active {
    transform: translateY(0);
}

/* Анимация для кнопки комментария */
.comment-save-btn .button-loader {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Подсветка поля при успешном сохранении */
.comment-input-field:focus {
    border-color: #2ecc71;
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

.inline-edit {
  display: flex;
  gap: 5px;
  align-items: center;
  min-width: 200px;
}

.inline-edit-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.inline-edit-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.inline-edit-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.inline-edit-header {
    margin-bottom: 10px;
    font-weight: 500;
    color: #4a90e2;
}

.inline-edit-body {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.save-inline {
    background-color: #4a90e2;
    color: white;
}

.save-inline:hover {
    background-color: #3a7bc8;
}

.cancel-inline {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.cancel-inline:hover {
    background-color: #eaeaea;
}

.shop-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 4px;
  margin-left: 5px;
}

.shop-edit-btn:hover {
  color: #333;
}

/* Стили для модального окна магазинов */
.modal-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.tab-btn:hover {
    color: #3a7bc8;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Контейнеры для API ключей и proxy */
.api-key-container,
.proxy-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-display,
.proxy-display {
    flex: 1;
    padding: 4px 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.proxy-display {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Форма добавления магазина */
.shop-form-container {
    max-width: 500px;
    margin: 0 auto;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}


/* Анимация появления модального окна */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для акционного остатка (аналогично repr_out) */
.action-stock-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px; /* Уменьшил расстояние между блоками */
    padding: 6px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.action-stock-labels {
    display: flex;
    flex-direction: column;
    font-size: 12px; /* Уменьшил шрифт */
    line-height: 1.2;
    min-width: 40px; /* Уменьшил ширину */
    color: #555;
    text-align: center;
}

.action-stock-inputs {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Уменьшил расстояние */
    margin-left: 5px; /* Добавил отступ слева */
}

.action-stock-inputs input {
    width: 45px; /* Как у repr_out */
    padding: 4px 6px; /* Как у repr_out */
    font-size: 12px; /* Как у repr_out */
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: textfield;
    text-align: center;
}

.action-stock-inputs input::-webkit-outer-spin-button,
.action-stock-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.action-stock-inputs input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 1px rgba(74, 144, 226, 0.2);
    outline: none;
}

.action-stock-cell-controls {
    display: flex;
    flex-direction: column;
    gap: 5px; /* Уменьшил расстояние */
    align-items: center;
    margin-left: 5px; /* Добавил отступ слева */
}

.action-stock-save-btn {
    padding: 4px 8px;
    font-size: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.action-stock-save-btn:hover {
    background-color: #229954;
}

/* Увеличенные переключатели для action_stock */
.action-stock-switch {
    position: relative;
    display: inline-block;
    width: 42px; /* Как у repr_out */
    height: 22px; /* Как у repr_out */
}

.action-stock-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.action-stock-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 22px; /* Как у repr_out */
}

.action-stock-slider:before {
    position: absolute;
    content: "";
    height: 18px; /* Как у repr_out */
    width: 18px; /* Как у repr_out */
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* Как у repr_out */
}

.action-stock-switch input:checked + .action-stock-slider {
    background-color: #27ae60;
}

.action-stock-switch input:checked + .action-stock-slider:before {
    transform: translateX(20px); /* Как у repr_out */
}

/* Стили для ценовых индикаторов SPP */
.spp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 100px;
    border: 2px solid transparent;
}

/* Не определён - серый */
.spp-unspecified {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
}

/* Отсутствует - светло-серый */
.spp-without-index {
    background-color: #e9ecef;
    color: #495057;
    border-color: #ced4da;
}

/* Супервыгодный - ярко-зеленый */
.spp-super {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* Выгодный - зеленый */
.spp-green {
    background-color: #d1edf5;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Умеренный - желтый */
.spp-yellow {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* Невыгодный - красный */
.spp-red {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* По умолчанию */
.spp-default {
    background-color: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
}



