/* --------------------------------------------------------------------------
 * Нижний пейджер табличных списков: по центру (см. docs/PAGINATION_STANDARD.md).
 * Класс .grid-view-pager-bottom оборачивает только нижний пейджер; верхний не трогаем.
 * -------------------------------------------------------------------------- */
.grid-view-pager-bottom {
    text-align: center;
}
.grid-view-pager-bottom .pagination {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* --------------------------------------------------------------------------
 * Базовый сброс: устраняет артефакт «белая полоса слева», когда весь интерфейс
 * иногда сдвигается вправо. Причины: дефолтные margin у body, появление/исчезновение
 * полосы прокрутки (при открытии модалок или смене высоты контента), горизонтальный
 * скролл. Использование: подключается глобально через AppAsset.
 * -------------------------------------------------------------------------- */
html {
    margin: 0;
    padding: 0;
    /* Резервируем место под скроллбар, чтобы при его появлении/исчезновении
       (модалки, смена высоты контента) макет не прыгал и не появлялась «полоса» слева */
    scrollbar-gutter: stable;
}
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
 * Стиль кнопок: единое скругление (см. docs/UI_STYLE.md).
 * Bootstrap 3 задаёт радиус через @btn-border-radius-base в LESS (в проекте — скомпилированный CSS, переменной нет). AdminLTE своей переменной не даёт. Переопределяем здесь с повышенной специфичностью, чтобы побеждать селекторы вроде .box .btn, .content-wrapper .btn.
 * -------------------------------------------------------------------------- */
:root {
    --btn-border-radius: 16px;

    /* ── Фирменные цвета маркетплейсов ─────────────────────────────────────
     * Единый источник истины. Использовать везде в интерфейсе через var().
     * Ozon  (mpId=1): синий  #5686e6 / текст белый
     * WB    (mpId=2): фиолетовый #b757ae / текст белый
     * ЯМаркет (mpId=4): жёлтый #FFCC00 / текст тёмный #222
     * Документация: docs/UI_STYLE.md → раздел «Маркетплейсы»
     * ─────────────────────────────────────────────────────────────────── */
    --mp-ozon-bg:        #5686e6;
    --mp-ozon-text:      #ffffff;
    --mp-wb-bg:          #b757ae;
    --mp-wb-text:        #ffffff;
    --mp-ym-bg:          #FFCC00;
    --mp-ym-text:        #222222;
}

/* ── Бейджи маркетплейсов (.mp-badge) ─────────────────────────────────────
 * Универсальные бейджи с фирменными цветами, применимы в любом разделе.
 * Разметка: <span class="mp-badge mp-ozon">Ozon</span>
 * Модификаторы: mp-ozon | mp-wb | mp-ym
 * ─────────────────────────────────────────────────────────────────── */
.mp-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
}
.mp-badge.mp-ozon { background: var(--mp-ozon-bg); color: var(--mp-ozon-text); }
.mp-badge.mp-wb   { background: var(--mp-wb-bg);   color: var(--mp-wb-text); }
.mp-badge.mp-ym   { background: var(--mp-ym-bg);   color: var(--mp-ym-text); }
.btn,
body .btn,
.content-wrapper .btn,
.box .btn,
.box-header .btn {
    border-radius: var(--btn-border-radius);
}
/* Для старых браузеров без scrollbar-gutter: всегда показывать скроллбар по вертикали,
   чтобы ширина контента не менялась при появлении скроллбара */
@supports not (scrollbar-gutter: stable) {
    html {
        overflow-y: scroll;
    }
}

/* --------------------------------------------------------------------------
 * Страница «Сервис»: плитка сервисных разделов
 * — Высота плитки строго равна высоте цветного значка (90px — как .info-box-icon в AdminLTE).
 * — Названия переносятся; если не влезают — обрезаются с многострочным ellipsis.
 * -------------------------------------------------------------------------- */
.service-index .service-tiles-row {
    display: flex;
    flex-wrap: wrap;
}

.service-index .service-tiles-row > [class*="col-"] {
    min-width: 0;
}

.service-index .service-tiles-row .info-box {
    height: 90px;
    min-height: 90px;
    max-height: 90px;
    overflow: hidden;
}

.service-index .service-tiles-row .info-box-icon {
    height: 90px;
    width: 90px;
    line-height: 90px;
}

.service-index .service-tiles-row .info-box-content {
    overflow: hidden;
    margin-left: 90px;
    padding: 7px 10px;
}

.service-index .service-tiles-row .info-box-content .text-uppercase {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    line-height: 1.25;
    word-wrap: break-word;
    white-space: normal;
}

.service-index .service-tiles-row .info-box-content > a {
    display: block;
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
 * Склад 2.0: блок действий справа (выгрузка, заполнение, история)
 * Три плитки в один ряд, компактная высота, крупнее иконка и текст.
 * -------------------------------------------------------------------------- */
.stock-index .stock-top-row {
    align-items: stretch;
}

.stock-index .stock-action-tiles-col {
    margin-top: 0;
}

/* Блок плиток не сужается раньше времени: мин. ширина при размещении в ряд */
@media (min-width: 768px) {
    .stock-index .stock-action-tiles-col {
        min-width: 320px;
        padding-left: 0;
    }
}

.stock-index #stock-city-form .form-group.stock-filter-city-group {
    margin-right: 2rem;
}

.stock-action-tiles {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
}

.stock-action-tile {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    min-height: 50px;
    max-height: 56px;
    padding: 0;
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
}

.stock-action-tile:hover {
    background: #fff;
    border-color: #b0b0b0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    color: #333;
    text-decoration: none;
}

.stock-action-tile-icon {
    flex-shrink: 0;
    width: 44px;
    height: 56px;
    min-height: 50px;
    line-height: 56px;
    text-align: center;
    font-size: 1.5rem;
    color: #fff;
}

.stock-action-tile-export .stock-action-tile-icon { background: #00c0ef; }
.stock-action-tile-fill .stock-action-tile-icon   { background: #00a65a; }
.stock-action-tile-history .stock-action-tile-icon { background: #605ca8; }

.stock-action-tile:hover .stock-action-tile-icon {
    filter: brightness(1.08);
}

.stock-action-tile-label {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    font-size: 1.2rem;
    line-height: 1.25;
    font-weight: 600;
}

.stock-action-tile-arrow {
    flex-shrink: 0;
    padding-right: 10px;
    font-size: 1.2rem;
    color: #999;
    transition: color 0.15s, transform 0.15s;
}

.stock-action-tile:hover .stock-action-tile-arrow {
    color: #00c0ef;
    transform: translateX(2px);
}

.stock-action-tile-fill:hover .stock-action-tile-arrow { color: #00a65a; }
.stock-action-tile-history:hover .stock-action-tile-arrow { color: #605ca8; }

@media (max-width: 767px) {
    .stock-action-tiles {
        flex-direction: column;
    }
    .stock-action-tile {
        max-height: none;
        min-height: 52px;
    }
    .stock-action-tile-icon {
        height: 52px;
        min-height: 52px;
        line-height: 52px;
    }
}


.error-page {
    text-align: center;
}

.error-page>.headline {
    float: none;
}

.error-page>.error-content {
    margin-left: auto;
}


/* -------------------------------------------------------------------------- */

hr {
    border-top: 1px solid #d2d6de;
}

.bg-white {
    background-color: #fff !important;
}

.text-white {
    color: #fff;
}

.text-light {
    color: #bbb;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-move {
    cursor: move;
}

.font-weight-normal {
    font-weight: 400 !important;
}

.form-row {
    margin-right: -5px;
    margin-left: -5px;
}

.form-row > [class*="col-"] {
    padding-right: 5px;
    padding-left: 5px;
}

.mt-0 {
    margin-top: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.pl-5 {
    padding-left: 5px !important;
}

.pr-5 {
    padding-right: 5px !important;
}

.py-5 {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.text-break {
    word-wrap: break-word !important;
}

.line-end {
    font-weight: bold;
    font-size: 1.2em;
    line-height: 1;
    color: tomato;
    -webkit-user-select: none; /* Safari */
       -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* IE10+/Edge */
            user-select: none; /* Standard */
}

.text-decoration-none {
    text-decoration: none !important;
}

.user-select-none {
    -webkit-user-select: none; /* Safari */
       -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* IE10+/Edge */
            user-select: none; /* Standard */
}

.btn-no-style {
    line-height: 1;
    background: none;
    vertical-align: initial;
    padding-block: 1px;
    padding-inline: 6px;
}

.btn-no-style:hover,
.btn-no-style:focus{
    background-color: #e0e0e0;
}

a.asc::after,
a.desc::after {
    font-family: 'FontAwesome';
    font-weight: normal;
}

a.asc::after {
    content: "\00a0\f15d";
}

a.desc::after {
    content: "\00a0\f15e";
}

/* Стили чекбоксов для CheckboxColumn у GridView */
.select-on-check-all,
.select-on-check {
    width: 20px;
    height: 20px;
}

.no-wrap {
    white-space: nowrap;
}

/* Новогодняя гирлянда */
.new-year-mood {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22136%22%20height%3D%2212%22%20fill%3D%22none%22%3E%3Cg%20clip-path%3D%22url(%23clip0)%22%3E%3Cpath%20d%3D%22M25.37%207.25c-.33%201.6-1.44%202.66-2.5%202.34-1.04-.31-1.62-1.86-1.3-3.48.32-1.6%201.44-2.66%202.49-2.35%201.05.3%201.64%201.88%201.3%203.49z%22%20fill%3D%22%23FF4F72%22%2F%3E%3Cpath%20d%3D%22M11.15%205.64c-.41%201.6-1.58%202.59-2.62%202.22S7%205.9%207.4%204.32c.4-1.58%201.58-2.58%202.62-2.22%201.05.37%201.5%201.96%201.13%203.54z%22%20fill%3D%22%23FFD54F%22%2F%3E%3Cpath%20d%3D%22M40.4%208.31c-.13%201.64-1.17%202.82-2.27%202.62-1.1-.2-1.8-1.7-1.62-3.34.18-1.64%201.2-2.79%202.26-2.57%201.07.21%201.76%201.64%201.63%203.3z%22%20fill%3D%22%234BB34B%22%2F%3E%3Cpath%20d%3D%22M55.39%208.86c-.06%201.65-.99%202.93-2.08%202.85-1.1-.09-1.92-1.49-1.84-3.14.08-1.65%201.01-2.92%202.08-2.84%201.07.08%201.9%201.48%201.84%203.13z%22%20fill%3D%22%2378D2FF%22%2F%3E%3Cpath%20d%3D%22M70.45%209.02c0%201.65-.91%202.96-2%202.94-1.1-.03-1.98-1.4-1.93-3.05.05-1.64.93-2.95%202-2.93%201.08.02%201.94%201.38%201.93%203.04z%22%20fill%3D%22%23FFD54F%22%2F%3E%3Cpath%20d%3D%22M85.54%208.6c.05%201.65-.81%203.05-1.9%203.08-1.1.02-2-1.31-2.02-2.94-.02-1.63.84-3.01%201.9-3.05%201.07-.03%201.97%201.26%202.02%202.91z%22%20fill%3D%22%23FF4F72%22%2F%3E%3Cpath%20d%3D%22M100.46%207.33c.32%201.61-.28%203.17-1.31%203.49-1.03.31-2.23-.79-2.48-2.41-.25-1.63.32-3.14%201.35-3.43%201.02-.29%202.13.74%202.44%202.35z%22%20fill%3D%22%23FFD54F%22%2F%3E%3Cpath%20d%3D%22M115.33%205.97c.36%201.6-.19%203.18-1.23%203.52s-2.17-.65-2.53-2.27c-.36-1.62.19-3.18%201.22-3.52%201.04-.35%202.16.66%202.54%202.27z%22%20fill%3D%22%2378D2FF%22%2F%3E%3Cpath%20d%3D%22M130.1%204.08c.43%201.59-.06%203.18-1.09%203.57-1.02.38-2.2-.6-2.62-2.18-.42-1.58.07-3.18%201.1-3.57%201.03-.39%202.2.59%202.62%202.18z%22%20fill%3D%22%234BB34B%22%2F%3E%3Cpath%20d%3D%22M.33.33a432.52%20432.52%200%2000135.34%200%22%20stroke%3D%22%23555E69%22%20stroke-width%3D%22.75%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M0%200h136v11.96H0z%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: center top;
}

/* Новогодняя гирлянда в header */
.main-header {
    position: relative;
}

.christmas-garland-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    overflow: visible;
}

.christmas-garland {
    position: relative;
    width: 100%;
    height: 100%;
}

.garland-bulb {
    position: absolute;
    border-radius: 50%;
    background-color: var(--bulb-color, currentColor);
    box-shadow: 
        0 0 3px var(--bulb-color, currentColor),
        0 0 6px var(--bulb-color, currentColor),
        0 0 10px var(--bulb-color, currentColor),
        0 0 14px var(--bulb-color, currentColor),
        0 0 20px rgba(255, 255, 255, 0.4);
    transition: background-color 0.6s ease, box-shadow 0.6s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    will-change: background-color, box-shadow;
}

.garland-bulb-inner {
    border-radius: 50%;
    background-color: var(--bulb-color, currentColor);
    box-shadow: 
        0 0 2px var(--bulb-color, currentColor),
        0 0 4px rgba(255, 255, 255, 0.5);
    transition: background-color 0.6s ease, box-shadow 0.6s ease;
    will-change: background-color, box-shadow;
}

.garland-line {
    position: absolute;
    height: 2px;
    background-color: #bbb;
    transform-origin: left center;
    z-index: 1;
    box-shadow: 0 0 2px rgba(187, 187, 187, 0.5);
}

/* Кнопки управления новогодними эффектами */
.new-year-controls {
    position: fixed;
    z-index: 10000;
    display: flex;
    flex-direction: row;
    gap: 8px;
    pointer-events: auto;
}

.new-year-control-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 192, 203, 0.8);
    background-color: rgba(255, 192, 203, 0.9);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 0;
}

.new-year-control-btn:hover {
    background-color: rgba(255, 192, 203, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.new-year-control-btn:active {
    transform: scale(0.95);
}

.new-year-control-btn.active {
    background-color: #FFD700;
    color: #fff;
    border-color: #FFA500;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.new-year-control-btn.active:hover {
    background-color: #FFA500;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.new-year-control-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.new-year-control-btn.disabled:hover {
    transform: none;
}

/* Новогодний снег */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake-wrapper {
    position: absolute;
    will-change: transform;
}

.snowflake {
    position: absolute;
    color: #7ba3d0;
    font-size: 1.2em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(123, 163, 208, 0.8);
    animation: snowfall linear infinite;
    user-select: none;
    will-change: transform;
}

/* Стили для снежинок применяются динамически через JavaScript */

@keyframes snowfall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 200px)) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* Новогодняя елка в правом нижнем углу */
.new-year-tree-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 10001;
    cursor: pointer;
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.new-year-tree-container:hover {
    transform: scale(1.1);
}

.new-year-tree-image {
    width: 360px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    user-select: none;
    -webkit-user-drag: none;
}

.new-year-tree-container.playing .new-year-tree-image {
    animation: treePulse 1.5s ease-in-out infinite;
}

@keyframes treePulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
}

/* Скрываем аудио элемент */
#new-year-music {
    display: none;
}




/**
 * Select2 validation states
 */

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #3c8dbc;
}

.has-warning.select2-container--default .select2-dropdown,
.has-warning .select2-container--default .select2-selection {
    border-color: #f39c12;
}

.has-warning .select2-container--open .select2-selection,
.has-warning .select2-container--default.select2-container--focus .select2-selection {
    border-color: #f39c12;
}

.has-error.select2-container--default .select2-dropdown,
.has-error .select2-container--default .select2-selection {
    border-color: #dd4b39;
}

.has-error .select2-container--open .select2-selection,
.has-error .select2-container--default.select2-container--focus .select2-selection {
    border-color: #dd4b39;
}

.has-success.select2-container--default .select2-dropdown,
.has-success .select2-container--default .select2-selection {
    border-color: #00a65a;
}

.has-success .select2-container--open .select2-selection,
.has-success .select2-container--default.select2-container--focus .select2-selection {
    border-color: #00a65a;
}


/* Фикс проблемы с длинным выбранным пунктом в Select2 */
.select2-container--default {
  .select2-selection--single {
    overflow: hidden;

    .select2-selection__rendered {
      word-wrap: break-word;
      word-break: break-all;
      text-overflow: inherit;
      white-space: normal;
    }
  }
  .select2-results > .select2-results__options {
    width: 100%;
    overflow-x: hidden;
  }
}

/* Увеличение размера выпадашки у Select2 */
.select2-container--default .select2-results > .select2-results__options {
    max-height: 400px;
}



/* Стили для фиксирования элементов управления при прокрутке страницы */
.page-controls-fixed.active {
    position: fixed;
    top: 0;
    right: 15px;
    z-index: 9999;
    background-color: white;
    box-shadow: -1px 1px 1px rgb(0 0 0 / 10%);
}



/* Кнопка "Наверх" */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 850;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background-color: rgba(27, 35, 39, .6);
    text-align: center;
    transition:
        background-color .1s ease-in,
        color .1s ease-in,
        width .3s ease-in-out,
        height .3s ease-in-out,
        line-height .3s ease-in-out;
}

.back-to-top,
.back-to-top:focus {
    color: #b8c7ce;
}

.back-to-top:hover {
    color: #fff;
    background-color: rgb(23, 28, 31);
}

.sidebar-open .back-to-top {
    width: 230px;
}

@media (min-width: 768px) {
    .back-to-top {
        width: 230px;
        height: 25vh;
        line-height: 25vh;
    }

    .sidebar-mini.sidebar-collapse .back-to-top {
        width: 50px;
    }
}



/* Перенос длинных текстов в боковом меню: иконка и текст в одну строку, длинный текст переносится */
.main-sidebar,
.main-sidebar .sidebar {
    overflow-x: hidden;
}

.sidebar-menu,
.sidebar-menu ul.treeview-menu {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar-menu .treeview,
.sidebar-menu .treeview-menu,
.sidebar-menu .treeview-menu li {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar-menu .treeview > a,
.sidebar-menu .treeview-menu > li > a {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    min-width: 0 !important;
    max-width: 100% !important;
    line-height: 1.4;
    padding-top: 12px;
    padding-bottom: 12px;
    white-space: normal !important;
    box-sizing: border-box;
}

.sidebar-menu .treeview > a > i.fa,
.sidebar-menu .treeview-menu > li > a > i.fa {
    flex-shrink: 0;
    margin-right: 0.3em;
    margin-top: 0.2em;
}

.sidebar-menu .treeview > a > span:not(.pull-right-container),
.sidebar-menu .treeview-menu > li > a > span {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}

.sidebar-menu .treeview > a > .pull-right-container {
    flex-shrink: 0;
}

/* Карточка товара — чекбоксы «Активный» и «Комплект»: текст в одну линию с чекбоксом на одном уровне, отступ между галкой и подписью */
.product-form-checkboxes-row .form-group {
    margin-bottom: 0;
}
.product-form-checkboxes-row .checkbox {
    margin-bottom: 0;
}
.product-form-checkboxes-row .checkbox label {
    display: flex;
    align-items: center;
    align-content: center;
    cursor: pointer;
    padding-left: 0;
    min-height: 20px;
    line-height: 20px;
}
.product-form-checkboxes-row .checkbox input[type="checkbox"] {
    margin: 0;
    margin-right: 8px;
    flex-shrink: 0;
    vertical-align: middle;
    position: relative;
}
.product-form-checkboxes-row .checkbox label span {
    line-height: 20px;
}

/* Карточка товара — комплект: светлый пастельный зелёный фон для визуального отличия (как в списке товаров) */
.product-update--kit {
    background: #e8f5e9;
    margin: 0 -15px;
    padding: 15px;
    min-height: 100%;
}

/* Список товаров (catalog/products): строка комплекта — светлый пастельный оттенок для отличия */
.product-row--kit {
    background-color: #e8f5e9; /* светлый пастельный зелёный (mint) */
}
.product-row--kit.bg-warning {
    background-color: #fff9c4; /* светлый пастельный жёлтый при необновлённом */
}

/* Комплект в городах: ровная сетка чекбоксов, выравнивание по вертикали и отступы */
.kit-cities-block .kit-cities-desc {
    margin-bottom: 12px;
}
.kit-cities-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: -8px;
}
.kit-cities-row > .kit-cities-col {
    display: flex;
    align-items: center;
    min-height: 36px;
    margin-bottom: 8px;
    padding-right: 12px;
}
.kit-cities-label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    width: 100%;
    min-height: 28px;
}
.kit-cities-label input[type="checkbox"] {
    flex-shrink: 0;
    margin: 0 10px 0 0;
}
.kit-cities-name {
    line-height: 1.35;
    word-break: break-word;
}

/* Стили для текста ссылки */
a.text-blue:hover,
a.text-blue:focus {
    color: #005384 !important;
}

a.text-yellow:hover,
a.text-yellow:focus {
    color: #c87f0a !important;
}

a.text-green:hover,
a.text-green:focus {
    color: #00733e !important;
}

a.text-red:hover,
a.text-red:focus {
    color: #c23321 !important;
}

a.text-aqua:hover,
a.text-aqua:focus {
    color: #0097bc !important;
}

a.text-black:hover,
a.text-black:focus {
    color: #000000 !important;
}

a.text-light-blue:hover,
a.text-light-blue:focus {
    color: #307095 !important;
}

a.text-gray:hover,
a.text-gray:focus {
    color: #b5bbc8 !important;
}

a.text-navy:hover,
a.text-navy:focus {
    color:#00060c!important;
}

a.text-teal:hover,
a.text-teal:focus {
    color: #2ba7a7 !important;
}

a.text-olive:hover,
a.text-olive:focus {
    color: #2e7555 !important;
}

a.text-lime:hover,
a.text-lime:focus {
    color: #00cd5a !important;
}

a.text-orange:hover,
a.text-orange:focus {
    color: #e76b00 !important;
}

a.text-fuchsia:hover,
a.text-fuchsia:focus {
    color: #c30c9a !important;
}

a.text-purple:hover,
a.text-purple:focus {
    color: #4c4988 !important;
}

a.text-maroon:hover,
a.text-maroon:focus {
    color: #ab154c !important;
}

/* Классы для вертикального выравнивания */
.align-baseline {
  vertical-align: baseline !important;
}

.align-top {
  vertical-align: top !important;
}

.align-middle {
  vertical-align: middle !important;
}

.align-bottom {
  vertical-align: bottom !important;
}

.align-text-bottom {
  vertical-align: text-bottom !important;
}

.align-text-top {
  vertical-align: text-top !important;
}
.modal-xl {
    max-width: 80%;
    width: auto;
}


/* Класс кастомной кнопки для озона */
.btn-ozon-color {
    background-color: var(--mp-ozon-bg);
    color: var(--mp-ozon-text);
}
.btn-ozon-color:hover {
    background-color: #4270cc;
    color: var(--mp-ozon-text);
}

/* Класс кастомной кнопки ВБ */
.btn-wildberries-color {
    background-color: var(--mp-wb-bg);
    color: var(--mp-wb-text);
}
.btn-wildberries-color:hover {
    background-color: #9a4694;
    color: var(--mp-wb-text);
}

/* Классы для свойства display */
.d-inline {
  display: inline !important;
}

.d-inline-block {
  display: inline-block !important;
}

.d-block {
  display: block !important;
}

.d-grid {
  display: grid !important;
}

.d-inline-grid {
  display: inline-grid !important;
}

.d-table {
  display: table !important;
}

.d-table-row {
  display: table-row !important;
}

.d-table-cell {
  display: table-cell !important;
}

.d-flex {
  display: flex !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.d-none {
  display: none !important;
}

/* Класс для вертикальной разделительной линии */
.vertical-line {
    border-left: 0.5px solid #e5e5e5;
    height: 100%;
}

.flex-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}

.flex-item {
    flex: 1;
    padding: 0 10px;
}

.form-column {
    border-right: 0.5px solid #e5e5e5;
}

.tree-column {
    border-left: 0.5px solid #e5e5e5;
}



/* Класс для плагина jsTree у которого отображаются чекбоксы только на концах веток */
.jstree-only-leaf-checkbox .jstree-node:not(.jstree-leaf) > .jstree-anchor .jstree-checkbox {
    display:none;
}

/* Добавление !important стандартным хелперам фонового цвета */
.bg-primary {
  color: #fff;
  background-color: #337ab7 !important;
}
a.bg-primary:hover,
a.bg-primary:focus {
  background-color: #286090 !important;
}
.bg-success {
  background-color: #dff0d8 !important;
}
a.bg-success:hover,
a.bg-success:focus {
  background-color: #c1e2b3 !important;
}
.bg-info {
  background-color: #d9edf7 !important;
}
a.bg-info:hover,
a.bg-info:focus {
  background-color: #afd9ee !important;
}
.bg-warning {
  background-color: #fcf8e3 !important;
}
a.bg-warning:hover,
a.bg-warning:focus {
  background-color: #f7ecb5 !important;
}
.bg-danger {
  background-color: #f2dede !important;
}
a.bg-danger:hover,
a.bg-danger:focus {
  background-color: #e4b9b9 !important;
}

/* Класс для определения минимальной высоты блока well */
.well-min-height {
    min-height: 150px;
}

/* .well сопоставимый по размерам с .form-control */
.well-example {
    padding: 6px 12px;
}

/* Классы для скрытия границ */
.border-0 {
    border: 0 !important;
}
.border-top-0 {
    border-top: 0 !important;
}
.border-right-0 {
    border-right: 0 !important;
}
.border-bottom-0 {
    border-bottom: 0 !important;
}
.border-left-0 {
    border-left: 0 !important;
}

/* --------------------------------------------------------------------------
 * История изменений остатков (service/fill-stock-by-sku-history): заголовок даты
 * и подзаголовки разделов; цвета для дельт (прирост/уменьшение).
 * -------------------------------------------------------------------------- */

/* Блок одного дня: скруглённая панель с заголовком */
.fill-stock-by-sku-history .history-date-block-tile {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.fill-stock-by-sku-history .history-date-heading {
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #d1d5db;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin: 0;
}
.fill-stock-by-sku-history .history-date-body {
    padding: 12px 16px 14px;
}

/* Подзаголовок раздела (Точечные правки / Системные записи) */
.fill-stock-by-sku-history .history-section-heading {
    font-size: 0.88em;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 14px 0 6px;
}
.fill-stock-by-sku-history .history-date-body > .history-section-heading:first-child {
    margin-top: 0;
}

/* Обёртка таблицы — скруглённая рамка */
.fill-stock-by-sku-history .history-table-wrap {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 4px;
}

/* Таблица в стиле tasks-table */
.fill-stock-by-sku-history .fill-stock-history-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin: 0;
}
.fill-stock-by-sku-history .fill-stock-history-table thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 12.5px;
    color: #475569;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 2px solid #d1d5db;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
    vertical-align: middle;
}
.fill-stock-by-sku-history .fill-stock-history-table thead th:last-child {
    border-right: none;
}
.fill-stock-by-sku-history .fill-stock-history-table tbody tr {
    border-bottom: 2px solid #e2e8f0;
}
.fill-stock-by-sku-history .fill-stock-history-table tbody tr:last-child {
    border-bottom: none;
}
.fill-stock-by-sku-history .fill-stock-history-table tbody td {
    padding: 8px 10px;
    background: #fff;
    vertical-align: middle;
    border-right: 1px solid #f0f2f5;
}
.fill-stock-by-sku-history .fill-stock-history-table tbody td:last-child {
    border-right: none;
}
.fill-stock-by-sku-history .fill-stock-history-table tbody tr:hover td {
    background: #f5f9ff;
}

/* Ширины столбцов */
.fill-stock-by-sku-history .fill-stock-history-table col.col-time     { width: 110px; }
.fill-stock-by-sku-history .fill-stock-history-table col.col-type     { width: 18%; }
.fill-stock-by-sku-history .fill-stock-history-table col.col-who      { width: 15%; }
.fill-stock-by-sku-history .fill-stock-history-table col.col-wh       { width: 18%; }
.fill-stock-by-sku-history .fill-stock-history-table col.col-count    { width: 80px; }
.fill-stock-by-sku-history .fill-stock-history-table col.col-changes  { width: 90px; }
.fill-stock-by-sku-history .fill-stock-history-table col.col-actions  { width: 90px; }

/* Ячейка «Время + Статус» */
.fill-stock-by-sku-history .fill-stock-history-time-status-cell {
    padding: 0 !important;
}
.fill-stock-by-sku-history .fill-stock-history-time-status-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    box-sizing: border-box;
}
.fill-stock-by-sku-history .fill-stock-history-time {
    flex-shrink: 0;
    color: #334155;
}
.fill-stock-by-sku-history .fill-stock-history-status {
    flex-shrink: 0;
}

/* Дельты */
.fill-stock-by-sku-history .fill-stock-history-changes-cell {
    white-space: nowrap;
    line-height: 1.5;
    text-align: right;
}
.fill-stock-by-sku-history .fill-stock-history-changes-plus,
.fill-stock-by-sku-history .fill-stock-history-changes-minus {
    font-weight: 600;
}
.fill-stock-by-sku-history .fill-stock-history-changes-plus {
    color: #16a34a;
}
.fill-stock-by-sku-history .fill-stock-history-changes-minus {
    color: #dc2626;
}

/* --- fill-stock-by-sku-history-view: инфо-плашка (как showcase-detail) --- */
.fill-stock-by-sku-history-view .detail-info-block {
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    color: #333;
    font-size: 0.92em;
    line-height: 1.7;
}
.fill-stock-by-sku-history-view .detail-info-block strong { color: #222; }

/* ═══════════════════════════════════════════════════════════════════════════
 * Базовые стили таблиц детализации — DATA_TABLES_DETAIL.md
 * Используются глобально на всех страницах с .detail-table-merged.
 * Переопределения (ширины колонок, sticky-шапка, цвета групп) задаются
 * в CSS конкретного раздела.
 * ═══════════════════════════════════════════════════════════════════════════ */
.detail-results {
    margin-top: 12px;
    max-height: 80vh;
    overflow: auto;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}
.detail-table-merged {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    width: 100%;
    font-size: 14px;
}
.detail-table-merged th {
    vertical-align: middle;
    text-align: center;
    font-weight: 600;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    padding: 8px 10px;
    border-bottom: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
}
.detail-table-merged th:last-child { border-right: none; }
.detail-table-merged td {
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    background-color: #fff;
    vertical-align: middle;
    word-break: break-word;
    overflow-wrap: break-word;
}
.detail-table-merged td:last-child { border-right: none; }
.detail-table-merged tbody tr:last-child td { border-bottom: none; }
.detail-table-merged tbody tr:hover td { background-color: #f5f9ff; }
.detail-table-merged .col-name-cell { text-align: left; }

/* --- fill-stock-by-sku-history-view: ширины столбцов (база — глобальная) --- */
/* Ширины столбцов: Артикул / Название / Изменение / Было→Стало */
.fill-stock-by-sku-history-view .detail-table-merged col.col-sku           { width: 130px; }
.fill-stock-by-sku-history-view .detail-table-merged col.col-name          { width: auto; }
.fill-stock-by-sku-history-view .detail-table-merged col.col-delta         { width: 100px; }
.fill-stock-by-sku-history-view .detail-table-merged col.col-before-after  { width: 150px; }

.fill-stock-by-sku-history-view .fill-stock-log-th-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

/* --- stock-change-log-view: инфо-плашка и ширины столбцов (база — глобальная) --- */
.stock-change-log-view .detail-info-block {
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 0.92em;
    line-height: 1.7;
}
.stock-change-log-view .detail-info-block strong { color: #222; }

.stock-change-log-view .detail-table-merged col.col-time         { width: 100px; }
.stock-change-log-view .detail-table-merged col.col-who          { width: 12%; }
.stock-change-log-view .detail-table-merged col.col-source       { width: 14%; }
.stock-change-log-view .detail-table-merged col.col-wh           { width: 12%; }
.stock-change-log-view .detail-table-merged col.col-sku          { width: 110px; }
.stock-change-log-view .detail-table-merged col.col-name         { width: auto; }
.stock-change-log-view .detail-table-merged col.col-delta        { width: 90px; }
.stock-change-log-view .detail-table-merged col.col-before-after { width: 130px; }

/* Детальные представления: столбец «Изменение» (дельта остатка) */
.fill-stock-by-sku-history-view .stock-delta-plus,
.stock-change-log-view .stock-delta-plus {
    font-weight: 600;
    color: #28a745;
}
.fill-stock-by-sku-history-view .stock-delta-minus,
.stock-change-log-view .stock-delta-minus {
    font-weight: 600;
    color: #dc3545;
}

/* ── Универсальная инфо-плашка (краткая справка к форме) ── */
.info-block {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 14px;
    color: #333;
    font-size: 0.92em;
    line-height: 1.7;
}
.info-block strong { color: #222; }
.info-block code {
    background: #fff;
    border: 1px solid #d6e3f5;
    border-radius: 4px;
    padding: 1px 6px;
    color: #1a4480;
}
