/* Каркас .sidebar-fixed / .main-content / брейкпоинты: clientzone-layout.css + clientzone-tokens.css */

/* Стили для правой панели заказов - оригинальные стили */
.sidebar-fixed ~ .main-content .orderListWrapper {
    padding-top: 25px;
    background: var(--cz-order-panel-bg);
    font-size: var(--cz-font-order-panel);
}

.sidebar-fixed ~ .main-content .stickyOrderList {
    position: sticky;
    top: 30px;
}

/* Стили для кнопки заказа */
.sidebar-fixed ~ .main-content .orderList__button {
    padding: 10px;
    margin-top: 20px;
}

.sidebar-fixed ~ .main-content .orderList__button button {
    padding: 12px;
    border: 2px solid var(--cz-accent);
    background: var(--cz-accent);
    color: white;
    width: 100%;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.sidebar-fixed ~ .main-content .orderList__button button:hover {
    background: var(--cz-accent-hover);
    border-color: var(--cz-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.sidebar-fixed ~ .main-content .orderList__button button:active {
    transform: translateY(0);
}

/* Убираем кастомные стили для visible-xs - используем только Bootstrap */

/* Стили для ПК версии (большие экраны) */
@media (min-width: 601px) {
    .sidebar-fixed ~ .main-content .orderList__button button {
        padding: 10px !important;
        border: 2px solid var(--cz-accent-muted) !important;
        background: none !important;
        color: inherit !important;
        width: 100% !important;
        cursor: pointer !important;
    }
}

/*
 * Нижняя панель корзины (.tab-nav-container) — только для max-width: 768px (см. блок ниже).
 * Раньше flex/display для .tab-nav-container задавались здесь без media query и перебивали
 * display:none из view (ниже специфичность у одиночного класса).
 */
@media (min-width: 769px) {
    .sidebar-fixed ~ .main-content .tab-nav-container {
        display: none !important;
    }
}

/* Стили для таблицы декоров */
.sidebar-fixed ~ .main-content table.decors {
    margin-top: 10px;
    width: 100%;
    font-size: var(--cz-font-table);
}

.sidebar-fixed ~ .main-content table.decors td.js-name {
    width: 220px;
}

.sidebar-fixed ~ .main-content table.decors td {
    padding: .3rem;
    vertical-align: middle;
}

.sidebar-fixed ~ .main-content table.decors .td-button {
    width: 50px;
}

.sidebar-fixed ~ .main-content table.decors a.button-selector {
    border: 0;
    width: 50px;
    padding: 0;
}

.sidebar-fixed ~ .main-content table.decors a.button-selector.remove_from_order:active,
.sidebar-fixed ~ .main-content table.decors a.button-selector.remove_from_order:focus {
    background: #9dc543;
    box-shadow: none;
}

.sidebar-fixed ~ .main-content table.decors a.button-selector:active,
.sidebar-fixed ~ .main-content table.decors a.button-selector:focus {
    background: rgba(193,193,193,.52);
    box-shadow: none;
}

.sidebar-fixed ~ .main-content .add_to_order {
    background: rgba(193,193,193,.52);
}

.sidebar-fixed ~ .main-content .remove_from_order {
    background: #9dc543;
}

.sidebar-fixed ~ .main-content .js-selected {
    background: rgba(193,193,193,.52);
    color: #000;
}

/* Стили для индикаторов запаса */
.sidebar-fixed ~ .main-content .sp-indicator {
    display: inline-block;
    width: 7px;
    padding: 0;
    height: 7px;
    margin: 0 0 0 3px;
}

.sidebar-fixed ~ .main-content .sp-indicator__red {
    background: #d32f2f;
}

.sidebar-fixed ~ .main-content .sp-indicator__yellow {
    background: #ffc107;
}

.sidebar-fixed ~ .main-content .sp-indicator__green {
    background: #8bc34a;
}

.sidebar-fixed ~ .main-content .sp-indicator__gray {
    background: #ccc;
}

.sidebar-fixed ~ .main-content .indicator {
    vertical-align: middle;
    text-align: right;
    padding: 0;
    width: 80px;
}

/* Оптимизированные стили для навигации */
.sidebar-fixed .navInner {
    padding: 0;
    margin: 0;
}

/* Стили для логотипа в верхней части */
.sidebar-fixed .logo-greenwood-wrapper {
    border-bottom: 1px solid var(--cz-sidebar-hover);
    /* clients.css задаёт margin-left: 15px — в сайдбаре это сдвигает блок относительно меню (у navInner меньше отступ) */
    margin-left: 0;
    margin-right: 0;
}

.sidebar-fixed .logo-greenwood {
    width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Компактный логотип как на портале (класс nav-inner-logo в navInner) */
.sidebar-fixed .logo-greenwood-wrapper.nav-inner-logo {
    padding: 8px 12px 10px 12px !important;
}

.sidebar-fixed .nav-inner-logo .logo-greenwood {
    max-height: 34px;
    width: auto;
}

.sidebar-fixed #collections .menu-container.nav-inner-menu-tight {
    margin-top: 4px !important;
}

.sidebar-fixed #collections .navInner.list-group {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    /* В сумме с .menu-container — отступ от края сайдбара (вровень с логотипом и блоком .well margin) */
    padding-left: 14px;
    padding-right: 14px;
}

/* Меню в сайдбаре — слева, умеренные отступы между пунктами */
.sidebar-fixed #collections .navInner.list-group .list-group-item {
    background: var(--cz-sidebar-bg) !important;
    border: none !important;
    text-align: start !important;
    padding: 0.5rem 0.65rem !important;
    margin-bottom: 6px !important;
    font-size: var(--cz-font-nav);
    line-height: var(--cz-line-height-tight);
    border-radius: var(--cz-radius-nav);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-fixed #collections .navInner.list-group .list-group-item:hover {
    background: var(--cz-sidebar-hover) !important;
    transform: none;
}

.sidebar-fixed #collections .navInner.list-group .list-group-item > a {
    color: #fff !important;
    text-decoration: none !important;
    border-bottom: none !important;
    font-weight: 500;
    font-size: var(--cz-font-nav) !important;
    min-width: 0;
    padding: 0.08rem 0;
    line-height: var(--cz-line-height-tight);
    transition: color 0.2s ease;
}

.sidebar-fixed #collections .navInner.list-group .list-group-item > a:hover {
    color: #fff !important;
}

.sidebar-fixed #collections .navInner.list-group .list-group-item a i.fas,
.sidebar-fixed #collections .navInner.list-group .list-group-item a i.fab {
    flex-shrink: 0;
    font-size: 0.85rem !important;
    width: 14px !important;
    text-align: center;
    opacity: 0.9;
}

.sidebar-fixed #collections .navInner.list-group .list-group-item:hover a i {
    opacity: 1;
    color: #fff;
}

.sidebar-fixed #collections .navInner.list-group .list-group-item a .me-2 {
    margin-right: 0.4rem !important;
    width: 1em;
    text-align: center;
    font-size: 0.88em;
}

/* Текущий раздел: без «кричащего» синего — в тон тёмному сайдбару */
.sidebar-fixed #collections .navInner .list-group-item.active {
    /* Bootstrap 5: .list-group-item + .list-group-item.active { margin-top: -1px } для стыковки border.
       У нас border у пунктов убран — отрицательный margin остаётся и «поднимает» активную строку. */
    margin-top: 0 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: transparent !important;
    box-shadow: inset 3px 0 0 rgba(226, 232, 240, 0.5);
}

.sidebar-fixed #collections .navInner.list-group .list-group-item.active:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    box-shadow: inset 3px 0 0 rgba(241, 245, 249, 0.65);
}

.sidebar-fixed #collections .navInner .list-group-item.active > a {
    color: #fff !important;
    /* Тот же font-weight, что у остальных пунктов — иначе строка чуть выше и «прыгает» меню */
    font-weight: 500;
}

.sidebar-fixed #collections .list-group-item.list-group-item-warning {
    background: #ffc107 !important;
    color: #000 !important;
    border-left: 4px solid #ff8c00;
}

.sidebar-fixed #collections .list-group-item.list-group-item-warning > a {
    color: #000 !important;
    font-weight: 600;
}

.sidebar-fixed #collections .list-group-item.list-group-item-warning:hover {
    background: #ffb300 !important;
    transform: none;
}

.sidebar-fixed #collections .list-group-item.list-group-item-warning > a i {
    color: #000 !important;
    opacity: 1;
}

.sidebar-fixed #collections .list-group-item.list-group-item-info {
    background: #17a2b8 !important;
    color: #fff !important;
    border-left: 4px solid #138496;
}

.sidebar-fixed #collections .list-group-item.list-group-item-info > a {
    color: #fff !important;
}

.sidebar-fixed #collections .list-group-item.list-group-item-info:hover {
    background: #138496 !important;
    transform: none;
}

.sidebar-fixed #collections .list-group-item.list-group-item-info > a i {
    color: #fff !important;
    opacity: 1;
}

/* Поиск в сайдбаре */
.sidebar-fixed .searchWrapper {
    padding: 15px;
    border-bottom: 1px solid var(--cz-sidebar-hover);
    min-height: 80px; /* Фиксированная минимальная высота */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-fixed .searchWrapper input {
    background: var(--cz-sidebar-hover) !important;
    border: 1px solid #555 !important;
    color: #fff !important;
    border-radius: 4px;
}

.sidebar-fixed .searchWrapper input:focus {
    background: #555 !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.sidebar-fixed .searchWrapper input::placeholder {
    color: #ccc !important;
}

/* Логотип */
.sidebar-fixed .logo-greenwood-wrapper {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--cz-sidebar-hover);
}

.sidebar-fixed .logo-greenwood {
    max-width: 120px;
    height: auto;
}

/* Информационный блок */
.sidebar-fixed .well {
    background: linear-gradient(135deg, var(--cz-sidebar-hover) 0%, #3a3a3a 100%) !important;
    border: 1px solid #555555 !important;
    border-radius: 12px !important;
    margin: 15px;
    padding: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.sidebar-fixed .well p {
    color: #ccc !important;
    margin-bottom: 10px;
}

.sidebar-fixed .well img {
    max-width: 100%;
    height: auto;
}

/* Полностью убираем fixed positioning для блока с QR-кодом в сайдбаре */
.sidebar-fixed #collections .well.fixed-lg {
    position: static !important; /* Убираем fixed positioning полностью */
    bottom: auto !important;
    margin-top: 20px; /* Отступ сверху от меню */
    margin-bottom: 15px;
    flex-shrink: 0; /* Предотвращаем сжатие блока */
}

/* Логотип не должен сжиматься */
.sidebar-fixed #collections .logo-greenwood-wrapper {
    flex-shrink: 0;
}

/* Под логотипом и подписью оператора — одинаковый вертикальный «воздух» (inline у лого был 25px снизу) */
.sidebar-fixed #collections .logo-greenwood-wrapper:has(+ .sidebar-operator-mode) {
    padding-bottom: 20px !important;
}

/* Подпись «Режим оператора» сразу под логотипом (раньше — absolute внутри меню) */
.sidebar-fixed #collections .sidebar-operator-mode {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 2.75rem;
    padding: 0 20px;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.35;
    border-bottom: 1px solid var(--cz-sidebar-hover);
    box-sizing: border-box;
}

/* Контейнер с меню: прокрутка только здесь — иначе при низком viewport flex сжимает
 * высоту блока, overflow:visible оставляет пункты «над» нижней карточкой и они «просвечивают». */
.sidebar-fixed #collections .menu-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 12px;
    box-sizing: border-box;
}

/* Альтернативный селектор для контейнера меню (на случай, если класс не применился) */
.sidebar-fixed #collections > div[style*="margin-top"] {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 12px;
    box-sizing: border-box;
}

.sidebar-fixed #collections .navInner {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.sidebar-fixed #collections .menu-container .list-group,
.sidebar-fixed #collections > div[style*="margin-top"] .list-group {
    margin-bottom: 0 !important;
}

/* Сайдбар целиком может скроллиться, если колонка выше viewport */
.sidebar-fixed {
    overflow-y: auto;
    overflow-x: hidden;
}

/* Список разделов скроллится в .menu-container; #collections держит flex-каркас без вертикального скролла */
.sidebar-fixed #collections {
    overflow-x: hidden;
    overflow-y: hidden;
}

/* Карточка «Приложение и поддержка» поверх области меню (stacking при transition / focus) */
.sidebar-fixed #collections .well.fixed-lg.sidebar-info-block {
    position: relative;
    z-index: 2;
}

/* Курс USD/RUB под пунктом «Выйти» (внутри .menu-container) */
.sidebar-fixed #collections .sidebar-usd-rate {
    flex-shrink: 0;
    margin: 8px 0 4px;
    padding: 10px 8px 4px;
    text-align: center;
}

.sidebar-fixed #collections .sidebar-usd-rate-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin: 0 0 10px;
    opacity: 1;
}

.sidebar-fixed #collections .sidebar-usd-rate-line {
    margin: 0;
    color: rgba(255, 255, 255, 0.94) !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.sidebar-fixed #collections .sidebar-usd-rate-line--muted {
    color: rgba(255, 255, 255, 0.55) !important;
    font-weight: 500;
    font-size: 12px;
}

.sidebar-fixed #collections .sidebar-usd-rate-icon {
    margin-right: 6px;
    opacity: 0.9;
    font-size: 12px;
    color: rgba(255, 200, 120, 0.95);
}

.sidebar-fixed #collections .sidebar-usd-rate-meta {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 11px;
    line-height: 1.3;
}

/* Очень низкий экран: ограничить высоту раскрытой карточки, прокрутка внутри неё */
@media only screen and (max-height: 720px) {
    .sidebar-fixed #collections .sidebar-info-block.expanded {
        max-height: calc(100dvh - 100px);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* На очень маленьких экранах делаем блок компактнее и уменьшаем отступы */
@media only screen and (max-height: 600px) {
    .sidebar-fixed #collections .well.fixed-lg {
        margin-top: 10px;
        margin-bottom: 10px;
        padding: 8px !important;
    }
    
    .sidebar-fixed #collections .well.fixed-lg .qr-desktop-version img {
        width: 80px !important;
        height: 80px !important;
    }
    
    .sidebar-fixed #collections .well.fixed-lg p {
        font-size: 11px !important;
        margin-bottom: 5px !important;
    }
    
    .sidebar-fixed #collections .menu-container,
    .sidebar-fixed #collections > div[style*="margin-top"] {
        padding-bottom: 8px;
    }
}
/* Мобильные компоненты; каркас drawer / main-content / collapse — clientzone-layout.css */
@media only screen and (max-width: 768px) {
    /* Кнопка переключения сайдбара */
    .sidebar-toggle {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: var(--cz-z-sidebar-toggle);
        background: var(--cz-sidebar-bg);
        color: #fff;
        border: none;
        padding: 10px;
        border-radius: var(--cz-radius-toggle);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        font-size: 16px;
        cursor: pointer;
    }
    
    .sidebar-toggle:hover {
        background: var(--cz-sidebar-hover);
    }
    
    .sidebar-fixed ~ .main-content .orderListWrapper {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: var(--cz-z-tab-nav);
        background: transparent;
        border-top: 0;
        padding-top: 0;
    }
    
    .sidebar-fixed ~ .main-content .tab-nav-container {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: var(--cz-z-tab-nav);
        background-color: var(--cz-sidebar-bg);
        border-top-right-radius: 20px;
        border-top-left-radius: 20px;
        box-shadow: 0 15px 10px rgba(0,0,0,.16), 0 3px 6px rgba(0,0,0,.16);
        display: flex;
        padding: 10px;
        justify-content: space-between;
        width: 100%;
    }
    
    .sidebar-fixed ~ .main-content .nabarMobile button {
        padding: 0;
        background: 0 0;
        border: none;
    }
    
    /* Оригинальные мобильные стили - ИСПРАВЛЕНО */
    .sidebar-fixed ~ .main-content .orderListWrapper {
        height: auto !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding-top: 0 !important;
        background: transparent !important;
    }
    
    .sidebar-fixed ~ .main-content #orderListWrapper {
        display: block !important;
    }
    
    /* Убираем кастомные мобильные стили для visible-xs - используем только Bootstrap */
    
    .sidebar-fixed ~ .main-content .nabarMobile {
        flex: 50%;
        height: 30px;
        background-color: #e2e2e2;
        border-radius: 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 10px;
        margin: 0 5px;
        transition: background .4s linear;
    }
    
    .sidebar-fixed ~ .main-content .nabarMobile i {
        font-size: 1.2em;
    }
    
    .sidebar-fixed ~ .main-content .nabarMobile p {
        font-weight: 700;
        overflow: hidden;
        margin-top: 15px;
        margin-left: 10px;
        transition: max-width .4s linear;
    }
    
    /* Мобильные стили для кнопки убраны - используем только ПК стили */
    
    .sidebar-fixed ~ .main-content .tab-nav-container {
        background-color: var(--cz-sidebar-bg);
        border-top-right-radius: 20px;
        border-top-left-radius: 20px;
        box-shadow: 0 15px 10px rgba(0,0,0,.16), 0 3px 6px rgba(0,0,0,.16);
        display: flex;
        padding: 10px;
        justify-content: space-between;
        width: 100%;
    }
    
    /* Кнопка для открытия сайдбара на мобильных (используем существующую Bootstrap кнопку) */
    .navbar-toggler {
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        z-index: var(--cz-z-sidebar-toggle) !important;
        background: var(--cz-sidebar-bg) !important;
        color: #fff !important;
        border: none !important;
        padding: 10px !important;
        border-radius: 4px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
        font-size: 16px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .navbar-toggler:hover {
        background: var(--cz-sidebar-hover) !important;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    }
    
    /* Убеждаемся что кнопка видна на мобильных */
    .navbar .navbar-toggler {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .sidebar-fixed .navbar-toggler {
        position: absolute;
        top: 15px;
        right: 15px;
        background: var(--cz-sidebar-hover);
        border: 1px solid #555;
        color: #fff;
    }
    
    /* Мобильное меню — чуть крупнее шрифт, без «центр-кнопок» */
    .sidebar-fixed #collections .navInner.list-group .list-group-item {
        padding: 0.55rem 0.7rem !important;
        margin-bottom: 8px !important;
        font-size: var(--cz-font-nav-mobile) !important;
    }

    .sidebar-fixed #collections .navInner.list-group .list-group-item > a {
        font-size: var(--cz-font-nav-mobile) !important;
    }
    
    .sidebar-fixed .searchWrapper {
        padding: 20px 15px;
        min-height: 100px; /* Увеличенная высота для мобильных */
    }
    
    .sidebar-fixed .searchWrapper input {
        font-size: 16px;
        padding: 12px;
    }
    
    /* Переключение QR-кода на мобильных */
    .qr-desktop-version {
        display: none !important;
    }
    
    .qr-mobile-version {
        display: block !important;
    }
    
    /* Стили для кнопки приложения */
    .qr-mobile-version .btn {
        background: linear-gradient(135deg, var(--cz-accent) 0%, #20c997 100%) !important;
        color: white !important;
        border: none !important;
        padding: 12px 15px !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        display: block !important;
        text-align: center !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3) !important;
    }
    
    .qr-mobile-version .btn:hover {
        background: linear-gradient(135deg, var(--cz-accent-hover) 0%, #1e7e34 100%) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4) !important;
        color: white !important;
    }
    
    .qr-mobile-version .btn:active {
        transform: translateY(0) !important;
    }
    
    .qr-mobile-version .btn i {
        margin-right: 8px !important;
    }
    
    /* Стили для маркетингового текста */
    .qr-mobile-version p {
        line-height: 1.4 !important;
        color: #fff !important;
    }
    
    .qr-mobile-version p span:first-child {
        color: #ffc107 !important;
        font-weight: 600 !important;
        font-size: 13px !important;
    }
    
    .qr-mobile-version p span:last-child {
        color: #ccc !important;
        font-weight: 400 !important;
        font-size: 11px !important;
    }
    
    /* Исправление перекрытия кнопки заявки с открытым меню - простое решение через z-index */
    .sidebar-fixed {
        z-index: 1000 !important;
    }
    
    .orderListWrapper {
        z-index: 100 !important;
    }
    
    /* Добавляем отступ снизу к таблице продуктов, чтобы кнопки не перекрывали последний элемент */
    table.decors {
        margin-bottom: 70px;
    }
}

/* Брейкпоинты ширины сайдбара / .navbar-toggler: clientzone-layout.css */

/* Оптимизация QR-кода для маленьких ноутбуков */
@media (min-width: 992px) and (max-width: 1200px) {
    .sidebar-fixed .well img {
        width: 70px !important;
        height: 70px !important;
    }
    
    .sidebar-fixed .well {
        padding: 8px !important;
        margin: 8px !important;
    }
    
    .sidebar-fixed .well p {
        font-size: 10px !important;
        margin-bottom: 5px !important;
        line-height: 1.2 !important;
    }
}

/* Оптимизация QR-кода для средних ноутбуков */
@media (min-width: 1201px) and (max-width: 1400px) {
    .sidebar-fixed .well img {
        width: 80px !important;
        height: 80px !important;
    }
    
    .sidebar-fixed .well {
        padding: 10px !important;
        margin: 10px !important;
    }
    
    .sidebar-fixed .well p {
        font-size: 11px !important;
        margin-bottom: 6px !important;
    }
}

/* Стили для больших экранов */
@media (min-width: 1025px) {
    /* На больших экранах показываем QR-код */
    .qr-desktop-version {
        display: block !important;
    }
    
    .qr-mobile-version {
        display: none !important;
    }
}

/* Ширина 1200px+: clientzone-layout.css */

/* Flex-раскладка для страниц заказа и профиля */
.flex-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.flex-main, .flex-side {
    min-width: 0;
}
.flex-main {
    flex: 2;
}
.flex-side {
    flex: 1;
    max-width: 320px;
}
.mb-24 { margin-bottom: 24px; }

/* Таблицы и ячейки */
.table th, .table td {
    vertical-align: middle;
    white-space: nowrap;
}
/* Список декоров: несколько строк в ячейке (код + артикул, коллекция) */
.table.decors th,
.table.decors td,
table.table.decors th,
table.table.decors td {
    white-space: normal;
}
.table th {
    font-size: 11px;
}
.table td {
    font-size: var(--cz-font-table);
}
@media (max-width: 1200px) {
    .table th, .table td {
        font-size: 10px;
        padding: 4px 6px;
    }
}

#orders td { vertical-align: middle; }
.td-invoice { text-align: center; width: 20px; }
.td-payment { text-align: center; width: 60px; }
.td-invoice1c { text-align: center; width: 100px; }
.td-created { width: 125px; text-align: center; }
.td-warehouse { width: 100px; text-align: center; }
.td-responsible { width: 150px !important; }
.td-payment span { color: green; }

/* Стили для select в таблицах (старые формы) */
table select.form-select {
    line-height: 12px;
    padding: 5px 0 5px 5px;
    font-size: 10px;
}

/* Стандартные Bootstrap стили для новых форм */
.card .form-select,
.sidebar-fixed ~ .main-content .form-select {
    display: block !important;
    width: 100% !important;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    min-height: 38px !important;
}

.card .form-select:focus,
.sidebar-fixed ~ .main-content .form-select:focus {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Стили для профиля */
.profile-table th { width: 300px; }
@media screen and (max-width: 768px) {
    .profile-table th { width: 150px; }
}

/* Стили для цен (если нужно) */
.price_overrided {
    text-decoration: line-through;
    color: #ccc;
}

/* B2B стили для дашборда */
.dashboard-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 400;
}

.dashboard-header {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
}

/* B2B карточки метрик */
.metric-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
}

.metric-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.metric-card .card-header {
    background: #f8f9fa;
    color: #495057;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clients-card .card-header {
    background: #e8f5e8;
    border-left: 4px solid var(--cz-accent);
}

.orders-card .card-header {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.monthly-card .card-header {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.warehouses-card .card-header {
    background: #e2e3e5;
    border-left: 4px solid #6c757d;
}

.metric-card .metric-icon {
    font-size: 1.5rem;
    color: #495057;
}

.metric-card .metric-trend {
    font-size: 1rem;
}

.metric-card .card-body {
    padding: 1.25rem;
}

.metric-card .metric-number {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-card .metric-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
}

.metric-card .metric-description {
    font-size: 0.8rem;
    color: #6c757d;
}

.metric-card .card-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 1.25rem;
}

.metric-card .metric-link {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.metric-card .metric-link:hover {
    color: #007bff;
}

/* B2B секции */
.dashboard-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.dashboard-section .section-header {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-section .section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* B2B статистические карточки */
.stat-card {
    background: #fff;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 0.75rem;
}

.stat-card .stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
}

.stat-card .stat-description {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.stat-card .stat-progress {
    height: 3px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.stat-card .progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* B2B таблицы */
.table {
    border: 1px solid #dee2e6;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 0.75rem;
    font-size: 0.85rem;
}

.table tbody td {
    border-bottom: 1px solid #f1f3f4;
    padding: 0.75rem;
}

.table .order-row:hover {
    background: #f8f9fa;
}

.table .avatar-sm {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
}

/* B2B список клиентов */
.clients-list {
    padding: 0.75rem;
}

.client-item {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    background: #f8f9fa;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.client-item:hover {
    background: #fff;
    border-color: #dee2e6;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.client-item .avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

.client-item .client-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.client-item:hover .client-actions {
    opacity: 1;
}

.client-item .fw-medium {
    font-size: 0.9rem;
    line-height: 1.2;
}

.client-item .text-muted.small {
    font-size: 0.75rem;
    line-height: 1.1;
    margin-bottom: 0.1rem;
}


/* Пустые состояния */
.empty-state {
    padding: 1.5rem;
}

.empty-state i {
    opacity: 0.4;
}

/* Единый стандарт заголовков страниц - обновлено */
.page-header {
    background: #f8f9fa !important;
    padding: 1.25rem !important;
    border-radius: 8px !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 400;
    margin-bottom: 0;
}

.page-actions .btn {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.page-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Единый стандарт навигации */
.page-navigation {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.page-navigation .nav-tabs {
    border-bottom: none;
    margin-bottom: 0;
}

.page-navigation .nav-link {
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}

.page-navigation .nav-link:hover {
    background: #f8f9fa;
    color: #495057;
}

.page-navigation .nav-link:hover i {
    color: #495057 !important;
}

.page-navigation .nav-link.active {
    background: #111827 !important;
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(17, 24, 39, 0.25) !important;
}

.page-navigation .nav-link.active i {
    color: #fff !important;
}

/* Принудительное обновление кэша - активные табы */

/* Принудительные стили для иконок в заголовках */
.page-title i {
    color: #007bff !important;
    margin-right: 0.5rem !important;
    font-size: 1.2em !important;
    display: inline-block !important;
    font-family: "FontAwesome" !important;
    font-weight: normal !important;
}

/* Единый стандарт кнопок */
.btn {
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: none;
    padding: 0.5rem 1rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: #111827;
    color: #fff;
}

.btn-primary:hover {
    background: #1f2937;
    color: #fff;
}

.btn-primary:hover i {
    color: #fff !important;
}

.btn-outline-primary {
    background: transparent;
    color: #111827;
    border: 1px solid #111827;
}

.btn-outline-primary:hover {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.btn-outline-primary:hover i {
    color: #fff !important;
}

.btn-outline-secondary {
    background: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.btn-outline-secondary:hover i {
    color: #fff !important;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Единый стандарт контентных контейнеров */
.content-container {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.content-container .table {
    margin-bottom: 0;
}

.content-container .table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 1rem 0.75rem;
    font-size: 0.85rem;
}

.content-container .table tbody td {
    border-bottom: 1px solid #f1f3f4;
    padding: 0.75rem;
    vertical-align: middle;
}

/* Адаптивность */
@media (max-width: 768px) {
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .dashboard-header {
        padding: 1rem;
    }
    
    .metric-card .metric-number {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.25rem;
    }
    
    .metric-card .card-body {
        padding: 1rem;
    }
    
    .dashboard-section .section-header {
        padding: 0.75rem;
    }
    
    .page-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .page-subtitle {
        font-size: 0.8rem;
    }
    
    .page-actions .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}


