/* ===== Палитра по макету =====
  --brand-blue       #2E7DD1   главный синий
  --brand-blue-dark  #1F62B0   тёмно-синий
  --brand-blue-deep  #1F4E8C   для текста / заголовков
  --page-bg          #F1F4F9
  --surface          #FFFFFF
  --border           #E1E7EF
  --text             #14253E
  --text-muted       #5C6779
  --discount-bg      #E7F0FB
  --discount-fg      #1F4E8C
  --dark             #2A2F38   тёмный футер
  --dark-muted       #8A93A6
*/

* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: #14253E;
    background: #F1F4F9;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
a { color: #2E7DD1; text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea { font: inherit; color: inherit; }
.muted { color: #5C6779; }
.muted-light { color: rgba(255,255,255,0.7); font-weight: 400; }
.hidden { display: none !important; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 700px) { .container { padding: 0 16px; } }

/* ===== Buttons / inputs (общие для install + login + admin) ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: #f1f4f9;
    color: #14253E;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    text-decoration: none;
}
.btn:hover { background: #e6ecf5; text-decoration: none; }
.btn-primary { background: #2E7DD1; color: #fff; border-color: #2E7DD1; }
.btn-primary:hover { background: #1F62B0; border-color: #1F62B0; color: #fff; }
.btn-ghost { background: transparent; border-color: #d8dee9; }
.btn-ghost:hover { background: #e6ecf5; }
.btn-danger { background: #fff; color: #c53030; border-color: #f0bcbc; }
.btn-danger:hover { background: #fdeaea; }
.btn-link { background: transparent; border: 0; color: #2E7DD1; padding: 4px 6px; }
.btn-link:hover { text-decoration: underline; }
/* Кнопки, оформленные как ссылки (напр. «Загрузить»), — без подчёркивания, курсор-указатель */
.btn.btn-link { cursor: pointer; }
.btn.btn-link:hover { text-decoration: none; }
.btn-small { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.alert-error { background: #fdeaea; color: #c53030; border: 1px solid #f0bcbc; }
.alert-success { background: #e6f4ee; color: #2f855a; border: 1px solid #bfe3d1; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=datetime-local], textarea, select {
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #d8dee9;
    background: #fff;
    transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus, select:focus {
    border-color: #2E7DD1; outline: 0; box-shadow: 0 0 0 3px rgba(46,125,209,0.18);
}
label { display: block; font-size: 13px; color: #5C6779; margin-bottom: 10px; }
label > input, label > select, label > textarea { margin-top: 4px; }

/* ===== Install / Login ===== */
.install-page, .login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #F1F4F9;
}
.install-shell {
    max-width: 540px; width: 100%;
    background: #fff;
    padding: 28px 32px;
    border-radius: 14px;
    box-shadow: 0 6px 32px rgba(31,78,140,0.08);
}
.install-head h1 { margin: 0 0 6px; font-size: 22px; }
.install-step { margin-top: 22px; padding-top: 22px; border-top: 1px solid #eef2f8; }
.install-step:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.login-card {
    max-width: 380px; width: 100%;
    background: #fff;
    padding: 28px 32px;
    border-radius: 14px;
    box-shadow: 0 6px 32px rgba(31,78,140,0.08);
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; }

/* ===== Site header ===== */
.site-header { background: transparent; }
.topbar {
    background: #2E7DD1;
    color: #fff;
    font-size: 13px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,0.18);
}
.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar-sep { width: 1px; height: 12px; background: rgba(255,255,255,0.32); display: inline-block; }
.topbar-manager a { color: #fff; font-weight: 500; }
.topbar-manager a:hover { text-decoration: underline; }
.topbar-phone { color: #fff; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.topbar-phone:hover { text-decoration: underline; }
.icon-phone {
    display: inline-block; width: 14px; height: 14px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.6 10.8c1.4 2.7 3.7 4.9 6.4 6.4l2.1-2.1c.3-.3.7-.4 1-.3 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C9.4 21 3 14.6 3 6c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.4.6 3.6.1.4 0 .7-.3 1l-2.2 2.2z'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.6 10.8c1.4 2.7 3.7 4.9 6.4 6.4l2.1-2.1c.3-.3.7-.4 1-.3 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C9.4 21 3 14.6 3 6c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.4.6 3.6.1.4 0 .7-.3 1l-2.2 2.2z'/></svg>") center / contain no-repeat;
}
.icon-phone-light { display: inline-block; width: 16px; height: 16px; background: #fff;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.6 10.8c1.4 2.7 3.7 4.9 6.4 6.4l2.1-2.1c.3-.3.7-.4 1-.3 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C9.4 21 3 14.6 3 6c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.4.6 3.6.1.4 0 .7-.3 1l-2.2 2.2z'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.6 10.8c1.4 2.7 3.7 4.9 6.4 6.4l2.1-2.1c.3-.3.7-.4 1-.3 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C9.4 21 3 14.6 3 6c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.4.6 3.6.1.4 0 .7-.3 1l-2.2 2.2z'/></svg>") center / contain no-repeat;
}

.navbar { background: #2E7DD1; padding: 14px 0 20px; box-shadow: 0 6px 22px rgba(46,125,209,0.18); }
.navbar-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 28px;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; line-height: 1; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; }
.brand-logo { max-height: 40px; }
.brand-text { display: inline-flex; flex-direction: column; align-items: flex-start; font-size: 15px; letter-spacing: 0.04em; }
.brand-text strong { font-weight: 700; }
.brand-text span { font-weight: 500; }
.brand-on-dark .brand-text strong, .brand-on-dark .brand-text span { color: #fff; }

.nav-select { max-width: 320px; min-width: 200px; position: relative; margin: 0 0 0 24px; }
.nav-select select {
    appearance: none; -webkit-appearance: none;
    width: 100%;
    padding: 10px 38px 10px 14px;
    background: #fff;
    color: #14253E;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
}
.nav-select-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #2E7DD1; pointer-events: none; font-size: 12px; }

.navbar-phone {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-weight: 600;
    font-size: 16px;
    background: transparent;
    margin-left: auto;
}
.navbar-phone:hover { text-decoration: none; color: rgba(255,255,255,0.85); }
.navbar-inner { gap: 12px; }
.brand { margin-right: 8px; }
.topbar-manager-name { color: #fff; font-weight: 600; margin-left: 4px; }

/* ===== Поиск товаров в навбаре ===== */
.nav-search { position: relative; flex: 1 1 240px; min-width: 180px; max-width: 460px; }
.nav-search-form { position: relative; display: flex; align-items: center; }
.nav-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #7C8AA0; display: inline-flex; pointer-events: none; }
.nav-search-input {
    width: 100%; padding: 10px 34px 10px 38px;
    background: #fff; color: #14253E; font-size: 15px;
    border-radius: 10px; border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.nav-search-input::placeholder { color: #97A2B4; }
.nav-search-input:focus { outline: none; border-color: #9cc4ef; box-shadow: 0 0 0 3px rgba(255,255,255,0.28); }
.nav-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.nav-search-clear {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: #97A2B4; font-size: 20px; line-height: 1;
    cursor: pointer; width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.nav-search-clear:hover { color: #14253E; background: #eef2f7; }
.nav-search-results {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: #fff; border-radius: 12px; box-shadow: 0 12px 32px rgba(20,37,62,0.22);
    max-height: 70vh; overflow-y: auto; z-index: 60; padding: 6px;
}
.nav-search-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border-radius: 8px; text-decoration: none; color: #1F2937;
}
.nav-search-item:hover, .nav-search-item.active { background: #EEF5FD; text-decoration: none; }
.nav-search-thumb { width: 38px; height: 38px; object-fit: contain; border-radius: 6px; background: #f5f7fa; flex-shrink: 0; }
.nav-search-text { min-width: 0; flex: 1; }
.nav-search-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-search-meta { font-size: 12px; color: #7C8AA0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.nav-search-empty { padding: 16px 12px; color: #7C8AA0; font-size: 14px; text-align: center; }

/* Подсветка найденного товара при переходе из поиска */
@keyframes rowFlash { 0%, 55% { background: #FFF3BF; } 100% { background: transparent; } }
.price-table tr.row-flash td { animation: rowFlash 2.6s ease-out; }
/* Отступ под липкую плашку при переходе к товару по якорю (нативный скролл браузера) */
.price-table tr[id^="p-"] { scroll-margin-top: 84px; }

/* ===== Шапка на мобильных ===== */
@media (max-width: 768px) {
    /* Топбар: убираем слоган и доставку — остаётся только «Ваш менеджер» */
    .topbar { padding: 8px 0; }
    .topbar-inner { justify-content: center; padding: 0 16px; }
    .topbar-left { display: none; }
    .topbar-right { width: 100%; justify-content: center; }

    /* Навбар: 1-я строка — лого + телефон, 2-я строка — выпадающий список */
    .navbar { padding: 12px 0 14px; }
    .navbar-inner { padding: 0 16px; gap: 10px 12px; align-items: center; }
    .brand { order: 1; margin-right: 0; }
    .brand-text { font-size: 14px; }
    .navbar-phone { order: 2; margin-left: auto; font-size: 15px; padding: 2px 0; }
    .nav-select { order: 3; flex-basis: 100%; width: 100%; min-width: 0; max-width: none; margin: 0; }
    /* Поиск на мобильных полностью скрыт (строка в шапке + плавающая кнопка) */
    .nav-search { display: none !important; }
}

/* ===== Hero / heading ===== */
.page-main { padding: 30px 0 56px; }
.page-heading {
    color: #1F4E8C;
    font-size: 28px;
    font-weight: 700;
    margin: 14px 0 24px;
    line-height: 1.2;
}
@media (max-width: 700px) {
    .page-heading { font-size: 22px; }
}

/* ===== Link meta (для персональных ссылок) ===== */
.link-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.link-meta-badge { background: #E7F0FB; color: #1F4E8C; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.link-meta-title { color: #5C6779; font-size: 13px; }

/* ===== Главная: группы и сетка категорий ===== */
.cat-group { margin: 0 0 32px; }
.cat-group + .cat-group { margin-top: 14px; }
.cat-group-title {
    color: #14253E;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 14px;
}
.cat-group-title-misc { color: #5C6779; font-weight: 600; font-size: 18px; }
@media (max-width: 700px) {
    .cat-group-title { font-size: 18px; }
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .cat-grid { grid-template-columns: 1fr; } }

.cat-card {
    display: flex;
    flex-direction: row;
    background: #fff;
    border: 1px solid #E1E7EF;
    border-radius: 14px;
    padding: 18px 18px 18px 20px;
    min-height: 132px;
    text-decoration: none;
    color: #14253E;
    transition: border-color .12s, box-shadow .12s, transform .12s;
    position: relative;
    overflow: hidden;
    gap: 12px;
}
.cat-card:hover {
    border-color: #2E7DD1;
    box-shadow: 0 8px 20px rgba(46,125,209,0.12);
    text-decoration: none;
}
.cat-card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}
.cat-card-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #14253E;
    line-height: 1.35;
}
.cat-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #2E7DD1;
    color: #fff;
    font-size: 18px;
    align-self: flex-start;
    transition: background .12s;
}
.cat-card:hover .cat-card-arrow { background: #1F62B0; }
.cat-card-image {
    width: 92px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cat-card-image img { max-width: 100%; max-height: 96px; object-fit: contain; }
@media (max-width: 520px) {
    .cat-card { min-height: 0; padding: 14px 14px 14px 16px; align-items: center; }
    .cat-card-title { margin: 0; }
    .cat-card-content { flex-direction: row; justify-content: space-between; align-items: center; }
    .cat-card-image { width: 60px; }
    .cat-card-image img { max-height: 60px; }
}

/* ===== Страница категории ===== */
.cat-hero {
    background: #D6E6F8;
    border: 1px solid #BFD5EE;
    border-radius: 16px;
    padding: 28px 32px;
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    gap: 28px;
    position: relative;
    box-shadow: 0 2px 10px rgba(31,78,140,0.06);
}
.cat-hero-image {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(31,78,140,0.06);
}
.cat-hero-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cat-hero-text { flex: 1; min-width: 0; }
.cat-hero-text .cat-page-head { margin: 0; }
.cat-hero-text .page-heading { color: #1F4E8C; margin: 0 0 10px; font-size: 26px; }
.cat-hero-description-wrap { position: relative; }
.cat-hero-description {
    color: #1F4E8C;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    opacity: 0.9;
    overflow: hidden;
    position: relative;
    transition: max-height 0.25s ease;
}
.cat-hero-description.clamped { max-height: 8em; }
.cat-hero-description.clamped::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 38px;
    background: linear-gradient(rgba(214,230,248,0), #D6E6F8);
    pointer-events: none;
}
.cat-hero-description.expanded { max-height: 2000px; }
.cat-hero-description.expanded::after { display: none; }
.cat-hero-toggle {
    background: none;
    border: 0;
    color: #1F4E8C;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0 0;
    margin-top: 4px;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cat-hero-toggle:hover { color: #14253E; }
.cat-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.cat-page-head .page-heading { margin-bottom: 4px; }
.discount-pill {
    background: #fff;
    color: #1F4E8C;
    padding: 10px 16px 10px 14px;
    border-radius: 12px;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}
.cat-hero .discount-pill { box-shadow: 0 2px 6px rgba(31,78,140,0.06); }
.discount-pill-num { font-size: 26px; font-weight: 700; line-height: 1; }
.discount-pill-text { font-size: 12px; line-height: 1.15; color: #1F4E8C; font-weight: 500; }

/* ===== Кнопка и форма заявки ===== */
.btn-lead {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #FB6514; color: #fff; border: 1px solid transparent; border-radius: 10px;
    padding: 10px 20px; font-size: 15px; font-weight: 700; letter-spacing: 0.01em; cursor: pointer;
    transition: background .14s, transform .08s, box-shadow .14s;
    box-shadow: 0 4px 14px rgba(251,101,20,0.34);
    text-decoration: none;
}
.btn-lead:hover { background: #E25406; color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(251,101,20,0.48); }
.btn-lead:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(251,101,20,0.35); }
.cat-hero-cta { margin-top: 14px; }

/* ===== Плавающая кнопка «Наверх» (десктоп) ===== */
.scroll-top {
    position: fixed; right: 28px; bottom: 28px; z-index: 900;
    width: 46px; height: 46px; border-radius: 50%;
    background: #2E7DD1; color: #fff; border: 0; cursor: pointer;
    font-size: 22px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(31,78,140,0.32);
    opacity: 0; transform: translateY(8px); pointer-events: none;
    transition: opacity .18s, transform .18s, background .14s;
}
.scroll-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top:hover { background: #1F4E8C; }
@media (max-width: 768px) { .scroll-top { display: none !important; } }

/* Плавающая кнопка поиска — навбар не липкий, даём доступ к поиску при прокрутке */
.search-fab {
    position: fixed; right: 28px; bottom: 84px; z-index: 900;
    width: 46px; height: 46px; border-radius: 50%;
    background: #fff; color: #2E7DD1; border: 1px solid #d8e6f6; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(31,78,140,0.22);
    opacity: 0; transform: translateY(8px); pointer-events: none;
    transition: opacity .18s, transform .18s, background .14s, color .14s;
}
.search-fab.visible { opacity: 1; transform: none; pointer-events: auto; }
.search-fab:hover { background: #2E7DD1; color: #fff; }
/* На мобильных поиск полностью отключён — плавающую кнопку тоже скрываем */
@media (max-width: 768px) {
    .search-fab { display: none !important; }
}

/* ===== Правовая страница ===== */
.legal-page { background: #fff; border: 1px solid #E1E7EF; border-radius: 14px; padding: 34px 42px; margin: 8px 0 24px; }
.legal-page .page-heading { margin-top: 0; }
.legal-updated { color: #8A93A6; font-size: 13px; margin: 0 0 18px; }
.legal-content { color: #2D3748; font-size: 15px; line-height: 1.7; }
.legal-content h2 { font-size: 20px; color: #1F4E8C; margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 1px solid #E1E7EF; }
.legal-content h3 { font-size: 16px; color: #14253E; margin: 20px 0 8px; }
.legal-content p { margin: 0 0 12px; }
.legal-content ul, .legal-content ol { margin: 0 0 12px; padding-left: 22px; }
.legal-content li { margin: 5px 0; }
.legal-content a { color: #2E7DD1; }
.legal-back { margin-top: 26px; }
.legal-back a { color: #2E7DD1; font-weight: 500; text-decoration: none; }
.legal-back a:hover { text-decoration: underline; }
@media (max-width: 768px) { .legal-page { padding: 22px 18px; } }
.lead-modal-overlay {
    position: fixed; inset: 0; background: rgba(20,37,62,0.55);
    display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1000;
}
.lead-modal-overlay[hidden] { display: none; }
.lead-modal {
    background: #fff; border-radius: 14px; width: 100%; max-width: 440px;
    padding: 26px 26px 24px; position: relative; box-shadow: 0 18px 50px rgba(0,0,0,0.28);
    animation: leadIn .16s ease-out;
}
@keyframes leadIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.lead-modal h3 { margin: 0 0 6px; font-size: 20px; color: #14253E; }
.lead-modal-sub { margin: 0 0 16px; color: #5C6779; font-size: 14px; line-height: 1.45; }
.lead-modal-close {
    position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border: 0;
    background: transparent; font-size: 26px; line-height: 1; color: #9AA6B8; cursor: pointer; border-radius: 8px;
}
.lead-modal-close:hover { background: #F0F3F8; color: #5C6779; }
.lead-form label { display: block; font-size: 13px; color: #5C6779; font-weight: 500; margin-bottom: 12px; }
.lead-form input, .lead-form textarea {
    display: block; width: 100%; margin-top: 5px; padding: 10px 12px;
    border: 1px solid #D6DEEA; border-radius: 8px; font-size: 15px; font-family: inherit;
    color: #14253E; box-sizing: border-box;
}
.lead-form input:focus, .lead-form textarea:focus { outline: none; border-color: #2E7DD1; box-shadow: 0 0 0 3px rgba(46,125,209,0.15); }
.lead-form textarea { resize: vertical; }
.lead-form .lead-submit { width: 100%; margin-top: 4px; }
.lead-form .lead-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.45; color: #5C6779; font-weight: 400; margin-bottom: 14px; cursor: pointer; }
.lead-form .lead-consent input { width: auto; margin: 2px 0 0; flex: 0 0 auto; }
.lead-form .lead-consent a { color: #2E7DD1; }
.lead-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.lead-form-msg { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; line-height: 1.4; }
.lead-form-msg.is-ok { background: #E6F4EA; color: #2f6f43; }
.lead-form-msg.is-err { background: #FCEBEA; color: #B3261E; }
.lead-success { text-align: center; padding: 6px 0 2px; }
.lead-success-check {
    width: 58px; height: 58px; margin: 4px auto 16px; border-radius: 50%;
    background: #E6F4EA; color: #2f8f4e; font-size: 32px; line-height: 58px; font-weight: 700;
}
.lead-success-text { color: #14253E; font-size: 15px; line-height: 1.5; margin: 0 0 20px; }
.lead-success .btn-lead { min-width: 150px; }
@media (max-width: 768px) {
    /* Лого + плашка скидки в верхней строке, описание раздела — на всю ширину ниже */
    .cat-hero { flex-wrap: wrap; padding: 20px; gap: 14px 16px; align-items: center; }
    .cat-hero-image { order: 1; width: 88px; height: 88px; }
    .cat-hero .discount-pill { order: 2; margin-left: auto; align-self: center; padding: 8px 14px; }
    .cat-hero-text { order: 3; flex-basis: 100%; }
    .cat-hero-text .page-heading { font-size: 22px; }
}
@media (max-width: 520px) {
    .discount-pill-num { font-size: 22px; }
    .cat-hero-image { width: 72px; height: 72px; }
}

/* ===== Preview-режим (подбор скидки в реальном времени) ===== */
.preview-bar {
    position: sticky; top: 0; z-index: 40;
    background: #FFF7E0; border: 1px solid #F1D58A; color: #5C4520;
    border-radius: 10px; padding: 10px 16px;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    margin: 0 0 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.preview-bar-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.preview-bar-label input[type="number"] {
    width: 90px; padding: 6px 10px; font-size: 15px; font-weight: 600;
    border: 1px solid #E2C77A; border-radius: 8px; background: #fff;
}
.preview-bar-reset {
    margin-left: auto;
    color: #B3261E; font-size: 13px; font-weight: 500; text-decoration: none;
    padding: 4px 10px; border-radius: 6px; border: 1px solid #E8B6B0; background: #FFFBFB;
}
.preview-bar-reset:hover { background: #FCEBEA; text-decoration: none; }
/* На мобилке — компактная плашка в одну строку: длинный хвост лейбла прячем */
@media (max-width: 600px) {
    .preview-bar { gap: 8px; padding: 8px 12px; flex-wrap: nowrap; }
    .preview-bar-label { gap: 6px; }
    .preview-bar-label input[type="number"] { width: 64px; padding: 5px 8px; font-size: 14px; }
    .preview-bar-label-full { display: none; }
    .preview-bar-reset { padding: 4px 8px; font-size: 12px; white-space: nowrap; }
}
/* В preview-режиме хлебные крошки прячем — на их месте панель скидки */
.preview-mode .cat-breadcrumb { display: none !important; }

/* ===== Sticky breadcrumb на странице категории ===== */
.cat-breadcrumb {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #2E7DD1;
    color: #fff;
    padding: 10px 18px;
    margin: 0 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(31,78,140,0.18);
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    display: none;
}
.cat-breadcrumb.visible { display: flex; }
.cat-breadcrumb .bc-cat { color: #fff; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; user-select: none; text-decoration: none; }
.cat-breadcrumb .bc-cat:hover { text-decoration: none; }
/* Подчёркиваем ТОЛЬКО текст названия, не стрелку */
.cat-breadcrumb .bc-cat:hover .bc-cat-label { text-decoration: underline; }
.cat-breadcrumb .bc-cat:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; border-radius: 4px; }
.cat-breadcrumb .bc-caret { font-size: 10px; opacity: 0.9; display: inline-block; text-decoration: none; transition: transform .15s; }
.cat-breadcrumb.bc-open .bc-caret { transform: rotate(180deg); }
/* Выпадающий список разделов из хлебных крошек */
.bc-dropdown {
    position: absolute; top: calc(100% + 6px); left: 14px;
    min-width: 240px; max-width: min(92vw, 340px);
    max-height: 62vh; overflow-y: auto;
    background: #fff; color: #1F2937;
    border-radius: 10px; box-shadow: 0 12px 34px rgba(20,37,62,0.30);
    padding: 6px; z-index: 50;
}
.bc-dropdown-group {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
    color: #8A93A6; font-weight: 600; padding: 8px 10px 4px;
}
.bc-dropdown-item {
    display: block; padding: 8px 10px; border-radius: 7px;
    color: #1F2937; text-decoration: none; font-size: 14px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bc-dropdown-item:hover { background: #EEF5FD; text-decoration: none; }
.bc-dropdown-item.current { color: #2E7DD1; font-weight: 700; background: #F3F8FE; }
.cat-breadcrumb .bc-sub::before,
.cat-breadcrumb .bc-group::before { content: '›'; margin-right: 8px; opacity: 0.7; }
.cat-breadcrumb .bc-sub { color: rgba(255,255,255,0.95); }
.cat-breadcrumb .bc-group { color: rgba(255,255,255,0.85); }
.cat-breadcrumb .bc-clickable { cursor: pointer; }
.cat-breadcrumb .bc-clickable:hover { text-decoration: underline; }
.cat-breadcrumb .bc-lead {
    margin-left: auto;
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    flex-shrink: 0;
}
@media (max-width: 768px) { .cat-breadcrumb .bc-lead { display: none; } }

.cat-notes {
    margin-top: 28px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #E1E7EF;
    border-radius: 12px;
}
.cat-notes h3 { margin: 0 0 8px; font-size: 14px; color: #5C6779; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.cat-notes ul { margin: 0; padding-left: 0; list-style: none; }
.cat-notes li { padding: 4px 0; font-size: 13px; color: #4A5568; line-height: 1.5; }
.cat-notes li strong { color: #2E7DD1; margin-right: 6px; }

.footnote-ref {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #E7F0FB;
    color: #1F4E8C;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: help;
    position: relative;
}
.footnote-ref:hover, .footnote-ref:focus {
    background: #2E7DD1;
    color: #fff;
    outline: none;
}
/* Подсказка примечания рендерится в <body> (см. JS) — не обрезается прокручиваемой таблицей */
.note-tip {
    position: fixed;
    z-index: 1100;
    background: #14253E;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    max-width: min(280px, calc(100vw - 24px));
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s;
}
.note-tip.show { opacity: 1; }

.cat-section { margin: 14px 0 18px; }
.cat-section-subsection > .cat-section-head > .cat-section-head-text > .cat-section-title,
.cat-section-subsection > .cat-section-title {
    font-size: 23px; font-weight: 700; color: #14253E; margin: 30px 0 10px;
    padding-bottom: 8px; border-bottom: 2px solid #DCE4F0;
    text-transform: none; letter-spacing: 0;
}
.cat-section-group > .cat-section-head > .cat-section-head-text > .cat-section-title,
.cat-section-group > .cat-section-title {
    font-size: 17px; font-weight: 600; color: #1F4E8C; margin: 18px 0 6px;
    padding-left: 11px; border-left: 3px solid #2E7DD1; border-bottom: 0;
}
.cat-section-flat { margin-top: 8px; }
.cat-section-description {
    color: #5C6779;
    font-size: 13px;
    background: transparent;
    padding: 0;
    margin: 0 0 12px;
    line-height: 1.55;
}
.cat-section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}
.cat-section-head-text { flex: 1; min-width: 0; }
.cat-section-head .section-image {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #E1E7EF;
    padding: 6px;
    margin: 4px 0 0;
}
@media (max-width: 540px) {
    .cat-section-head .section-image { width: 60px; height: 60px; }
}

/* ===== Price tables ===== */
.table-wrap {
    background: #fff;
    border: 1px solid #E1E7EF;
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 8px 0 6px;
}
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td {
    text-align: left;
    vertical-align: top;
    padding: 13px 16px;
    border-bottom: 1px solid #EEF2F8;
    border-right: 1px solid #F1F4F9;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: break-word;
}
.price-table th:last-child, .price-table td:last-child { border-right: 0; }
.price-table tr:last-child td { border-bottom: 0; }
.price-table th {
    background: #F6F8FB;
    color: #5C6779;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: normal;
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    vertical-align: bottom;
}
.price-table tbody tr:nth-child(even) td { background: #FAFCFE; }
.price-table tbody tr:hover td { background: #EEF5FD; }
.col-retail, .col-final { text-align: right; white-space: nowrap; width: 130px; }
.col-final strong { color: #1F4E8C; font-size: 14px; }
.col-retail s { color: #B3BCCE; }
.col-price {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}
.col-stock { width: 1%; white-space: nowrap; }
.price-table .col-pack { width: 1%; white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; }
.price-table .col-ext  { width: 1%; white-space: nowrap; font-family: Consolas, 'Courier New', monospace; font-size: 13px; color: #4A5568; }
.stock-yes { color: #2f855a; font-weight: 600; font-size: 14px; }
.stock-order { color: #c05621; font-weight: 500; font-size: 14px; }
.stock-na { color: #B3BCCE; font-size: 14px; }
/* Наличие: вторая строка — то же количество в штуках, приглушённо */
.stock-pieces { display: block; margin-top: 2px; color: #A9B2C4; font-size: 12px; font-weight: 400; }
.price-table .col-packprice { width: 1%; white-space: nowrap; }
.col-price .price-old, .col-packprice .price-old {
    color: #B3BCCE;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: 400;
    margin-right: 8px;
}
.col-price .price-new, .col-packprice .price-new {
    color: #1F4E8C;
    font-size: 14px;
    font-weight: 700;
}
/* «Насыщенные» таблицы: цена в две строки — розничная сверху, актуальная снизу */
.col-price--stacked .price-old { display: block; margin: 0; }
.col-price--stacked .price-new { display: block; }
.col-chars { color: #4A5568; font-size: 14px; line-height: 1.5; min-width: 130px; }
.price-table td.col-extra { min-width: 90px; color: #4A5568; font-size: 14px; line-height: 1.5; }
.dl-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E7F0FB;
    color: #1F4E8C;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.12s;
}
.dl-link::before {
    content: '';
    display: inline-block;
    width: 14px; height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3v12m0 0l-4-4m4 4l4-4M5 21h14' stroke='black' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3v12m0 0l-4-4m4 4l4-4M5 21h14' stroke='black' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}
.dl-link:hover { background: #2E7DD1; color: #fff; text-decoration: none; }
.col-model { min-width: 160px; }
.product-cell { display: flex; align-items: flex-start; gap: 12px; }
.product-cell.has-image .product-model { flex: 1; min-width: 0; }
.product-thumb {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 4px;
    background: transparent;
    flex-shrink: 0;
}
.product-model { font-weight: 500; }
/* Название-ссылка на карточку товара на сайте: постоянное лёгкое подчёркивание,
   при наведении меняется только цвет (подчёркивание на ховере не трогаем) */
.product-link { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(46,125,209,0.35); transition: color .12s; }
.product-link:hover { color: #2E7DD1; text-decoration: none; }   /* гасим глобальный a:hover underline — иначе двойное подчёркивание */

@media (max-width: 760px) {
    .price-table .col-chars { display: none; }
    .price-table th, .price-table td { padding: 10px; font-size: 13px; }
}

/* ===== Cat-nav (между категориями) ===== */
.cat-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    margin-top: 36px;
    padding-top: 26px;
    border-top: 1px solid #E1E7EF;
    align-items: center;
}
.cat-nav-link {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: #14253E;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #E1E7EF;
}
.cat-nav-link:hover { border-color: #2E7DD1; text-decoration: none; }
.cat-nav-prev  { justify-self: start; }
.cat-nav-home  { justify-self: center; background: #2E7DD1; color: #fff; border-color: #2E7DD1; }
.cat-nav-home:hover { background: #1F62B0; border-color: #1F62B0; color: #fff; }
.cat-nav-next  { justify-self: end; text-align: right; }
.cat-nav-meta { display: flex; flex-direction: column; line-height: 1.15; }
.cat-nav-meta strong { font-weight: 600; }
.cat-nav-meta .muted { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.cat-nav-arrow { font-size: 18px; color: #2E7DD1; }
@media (max-width: 720px) {
    .cat-nav { grid-template-columns: 1fr; gap: 8px; }
    .cat-nav-prev, .cat-nav-home, .cat-nav-next { justify-self: stretch; justify-content: center; }
}

.empty { padding: 60px; text-align: center; color: #5C6779; background: #fff; border-radius: 14px; border: 1px solid #E1E7EF; }

/* ===== Footer ===== */
.site-footer {
    background: #2A2F38;
    color: #cfd6e4;
    padding: 36px 0 28px;
    margin-top: 30px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
}
.footer-left .brand .brand-text strong,
.footer-left .brand .brand-text span { color: #fff; }
.footer-tagline { color: #cfd6e4; margin: 14px 0 6px; font-size: 14px; line-height: 1.45; max-width: 360px; }
.footer-legal { color: #8A93A6; font-size: 12px; margin: 8px 0 0; }
.footer-legal a { color: #8A93A6; }
.footer-admin-links { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.footer-admin-link { color: #6B7280; font-size: 11px; text-decoration: none; transition: color .15s; }
.footer-admin-link:hover { color: #B4BBC9; text-decoration: underline; }
.footer-admin-sep { color: #6B7280; font-size: 11px; user-select: none; }
.footer-legal a:hover { color: #fff; }
.footer-right h4 { color: #fff; font-size: 15px; margin: 0 0 8px; font-weight: 600; }
.footer-phone { color: #fff; font-size: 18px; font-weight: 600; }
.footer-address { color: #cfd6e4; font-size: 14px; margin-top: 4px; }
.footer-socials { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.social-icon {
    width: 34px; height: 34px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}
.social-icon:hover { background: rgba(255,255,255,0.2); text-decoration: none; color: #fff; }
.social-vk { background: #2E7DD1; }
.social-vk:hover { background: #1F62B0; }
.social-telegram { background: #229ED9; }
.social-telegram:hover { background: #1781b4; }
.social-whatsapp { background: #25D366; }
.social-whatsapp:hover { background: #1eaf52; }
.social-max { background: linear-gradient(135deg, #2B8CFF, #6B5BFF); font-size: 10px; letter-spacing: 0.02em; }
.social-max:hover { background: linear-gradient(135deg, #1E78F0, #5A48F0); }
.btn-order-call {
    background: #2E7DD1;
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-order-call:hover { background: #1F62B0; text-decoration: none; color: #fff; }

@media (max-width: 720px) {
    .footer-inner { grid-template-columns: 1fr; }
}

/* ===== Lightbox для увеличения картинок ===== */
.product-thumb,
.section-image,
.cat-hero-image img { cursor: zoom-in; transition: transform 0.12s; }
.product-thumb:hover,
.section-image:hover,
.cat-hero-image img:hover { transform: scale(1.05); }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 37, 62, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 40px;
    cursor: zoom-out;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: lb-fade 0.18s ease;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    cursor: default;
    background: #fff;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: #fff;
    color: #14253E;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.lightbox-close:hover { background: #F1F4F9; }
@media (max-width: 600px) {
    .lightbox { padding: 16px; }
    .lightbox-close { top: 12px; right: 12px; width: 36px; height: 36px; }
}

/* ===== Print ===== */
@media print {
    body { background: #fff; }
    .topbar, .navbar, .site-footer, .cat-nav, .nav-select, .navbar-phone { display: none !important; }
    .page-main { padding-top: 0; }
    .table-wrap { border: 1px solid #ccc; }
    a { color: inherit; text-decoration: none; }
    .page-heading { color: #14253E; }
    .cat-section { page-break-inside: avoid; }
}

/* ============================================================ */
/*                        АДМИНКА                                 */
/* ============================================================ */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.admin-page #admin-root { min-height: 100vh; }
.admin-page, .admin-page body { background: #F1F4F9; }

/* ===== Верхняя панель админки ===== */
.admin-topbar {
    background: #14253E;
    color: #fff;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 2px 10px rgba(20,37,62,0.15);
}
.admin-brand {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.admin-brand small { color: #8A93A6; font-size: 11px; font-weight: 400; margin-top: 2px; }
.admin-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-link {
    background: transparent;
    border: 0;
    color: rgba(255,255,255,0.72);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.nav-link.active { background: #2E7DD1; color: #fff; }
.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}
.admin-user .user-name { color: #fff; font-weight: 500; }
.admin-user .user-role { color: rgba(255,255,255,0.6); font-size: 12px; }
.admin-user .btn {
    background: transparent;
    color: #cfd6e4;
    border-color: rgba(255,255,255,0.18);
    padding: 6px 12px;
    font-size: 13px;
}
.admin-user .btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ===== Тело с опциональным сайдбаром ===== */
.admin-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 56px);
}
.admin-body.no-sidebar { grid-template-columns: 1fr; }

.cat-sidebar {
    background: #fff;
    border-right: 1px solid #E1E7EF;
    padding: 18px 12px;
    overflow-y: auto;
    max-height: calc(100vh - 56px);
    position: sticky;
    top: 56px;
}
.cat-sidebar-title {
    font-size: 11px;
    color: #5C6779;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 8px;
    padding: 0 10px;
    font-weight: 600;
}
.cat-sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    color: #14253E;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.35;
    margin-bottom: 2px;
}
.cat-sidebar-link:hover { background: #F1F4F9; text-decoration: none; }
.cat-sidebar-link.active { background: #2E7DD1; color: #fff; }
.cat-sidebar-link .count { color: #8A93A6; font-size: 11px; margin-left: auto; }
.cat-sidebar-link.active .count { color: rgba(255,255,255,0.8); }
.cat-sidebar-link .cat-icon {
    width: 24px; height: 24px;
    background: #F1F4F9; border-radius: 5px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cat-sidebar-link .cat-icon img { width: 18px; height: 18px; object-fit: contain; }
.cat-sidebar-link.active .cat-icon { background: rgba(255,255,255,0.15); }

.cat-drag-handle {
    color: #B3BCCE;
    font-size: 12px;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
    padding: 0 2px;
    letter-spacing: -1px;
    line-height: 1;
}
.cat-sidebar-link.active .cat-drag-handle { color: rgba(255,255,255,0.6); }
.cat-sidebar-link:hover .cat-drag-handle { color: #5C6779; }
.cat-sidebar-link.active:hover .cat-drag-handle { color: #fff; }
.cat-sidebar-link.dragging { opacity: 0.4; }
.cat-sidebar-link.drag-over-before { box-shadow: 0 -2px 0 #2E7DD1 inset, 0 -2px 0 #2E7DD1; }
.cat-sidebar-link.drag-over-after { box-shadow: 0 2px 0 #2E7DD1 inset, 0 2px 0 #2E7DD1; }
.cat-sidebar-link[draggable="true"] { transition: opacity 0.12s; }

.cat-sidebar-add {
    margin-top: 8px;
    width: 100%;
    background: #fff;
    color: #2E7DD1;
    border: 1px dashed #2E7DD1;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
}
.cat-sidebar-add:hover { background: #2E7DD1; color: #fff; }
.cat-sidebar-add-group { margin-top: 14px; color: #5C6779; border-color: #B3BCCE; }
.cat-sidebar-add-group:hover { background: #5C6779; color: #fff; border-color: #5C6779; }

/* Группы в сайдбаре */
.cat-group-block { margin-bottom: 6px; }
.cat-group-head {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px 4px;
    margin-top: 8px;
    border-radius: 6px;
    transition: background 0.12s;
}
.cat-group-head-title {
    flex: 1;
    font-size: 10.5px;
    color: #1F4E8C;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cat-group-head-empty .cat-group-head-title { color: #8A93A6; cursor: default; }
.cat-group-head-title:hover { color: #2E7DD1; }
.cat-group-rename {
    background: transparent;
    border: 0;
    color: #B3BCCE;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 4px;
}
.cat-group-rename:hover { color: #2E7DD1; background: #F1F4F9; }
.cat-group-dropend { min-height: 8px; }
.cat-group-head.drag-over-group,
.cat-group-dropend.drag-over-group {
    background: #E7F0FB;
    outline: 2px dashed #2E7DD1;
    outline-offset: -2px;
}
.cat-group-dropend.drag-over-group { min-height: 24px; }

.main { padding: 0 32px 60px; min-width: 0; }
.page-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    flex-wrap: wrap;
    position: sticky;
    top: 56px;
    z-index: 20;
    background: #F1F4F9;
    padding: 18px 32px 14px;
    margin: 0 -32px 18px;
    border-bottom: 1px solid #E1E7EF;
    box-shadow: 0 4px 14px rgba(20,37,62,0.04);
}
.page-head h1 { margin: 0; font-size: 22px; color: #1F4E8C; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 900px) {
    .main { padding: 0 16px 40px; }
    .page-head { padding: 14px 16px 12px; margin: 0 -16px 14px; top: 0; position: static; }
}

.card { background: #fff; border: 1px solid #E1E7EF; border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.card h2 { margin: 0 0 12px; font-size: 16px; }
.card h3 { margin: 14px 0 6px; font-size: 14px; color: #1F4E8C; }

.cat-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.cat-description-label, .cat-group-label { display: block; margin: 14px 0 8px; }
.cat-description-caption { display: block; font-size: 12px; color: #5C6779; margin-bottom: 4px; }
.cat-description-input { width: 100%; padding: 10px 12px; font-family: inherit; resize: vertical; }
.cat-group-input { width: 100%; padding: 8px 12px; }
.cat-card-head h2 { flex: 1; margin: 0; font-size: 17px; }
.cat-controls { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cat-controls .label-inline { font-size: 12px; color: #5C6779; }
.cat-controls input[type=number] { width: 70px; padding: 4px 8px; }
.cat-controls label { margin: 0; display: inline-flex; align-items: center; gap: 4px; }

.section-card {
    margin: 12px 0; padding: 12px;
    background: #F1F4F9; border-radius: 10px; border: 1px solid #E1E7EF;
}
.section-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-card-head input[type=text] { flex: 1; min-width: 200px; }
.kind-chip {
    background: #1F4E8C; color: #fff;
    padding: 3px 9px; border-radius: 999px;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
}
.kind-chip.kind-group { background: #2E7DD1; }

.product-table-wrap { overflow-x: auto; margin-top: 8px; }

/* ===== Drag-and-drop товаров ===== */
.product-table .col-drag { width: 26px; min-width: 26px; padding: 9px 2px 0; text-align: center; vertical-align: top; }
.prod-drag-handle {
    cursor: grab; color: #B4BBC9; font-size: 15px; line-height: 1;
    user-select: none; display: inline-block; padding: 6px 2px; letter-spacing: -2px;
}
.prod-drag-handle:hover { color: #2E7DD1; }
.prod-drag-handle:active { cursor: grabbing; }
tr.product-row.row-dragging { opacity: 0.45; }
/* Маркер вставки — линия сверху/снизу по ячейкам строки */
tr.product-row.drag-row-before td { box-shadow: inset 0 3px 0 #2E7DD1; }
tr.product-row.drag-row-after  td { box-shadow: inset 0 -3px 0 #2E7DD1; }
/* Подсветка секции-приёмника */
.product-tbody.drag-tbody-over { outline: 2px dashed #2E7DD1; outline-offset: -2px; background: #F3F8FE; }
.product-empty-row .product-empty-cell {
    text-align: center; color: #9AA5B5; font-size: 13px; padding: 14px;
    border: 1px dashed #D7DEE8; border-radius: 6px; background: #FBFCFE;
}

.product-table {
    width: 100%; border-collapse: collapse;
    background: #fff;
    border: 1px solid #E1E7EF; border-radius: 8px; overflow: hidden;
    min-width: 100%;
}
.product-table th, .product-table td {
    padding: 8px 10px; border-bottom: 1px solid #EEF2F8;
    font-size: 13px; vertical-align: top;
}
.product-table th { background: #F6F8FB; text-align: left; font-weight: 600; color: #5C6779; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; white-space: normal; line-height: 1.3; word-break: normal; overflow-wrap: normal; hyphens: none; max-width: 200px; }
.product-table input, .product-table textarea {
    width: 100%; padding: 2px 6px; border-radius: 5px; border: 1px solid transparent; background: transparent;
    font-size: 13px; font-family: inherit; resize: vertical; line-height: 1.35;
}
/* Характеристики авто-подгоняются под содержимое (пустое поле не резервирует 2 строки) */
.product-table textarea { field-sizing: content; min-height: 1.9em; }
.product-table input:focus, .product-table textarea:focus { background: #fff; border-color: #2E7DD1; }
.product-table .col-ext { width: 100px; min-width: 100px; }
.product-table .col-model { min-width: 260px; }
.product-table .col-chars { min-width: 260px; }
.product-table .col-note { width: 170px; min-width: 150px; vertical-align: top; }
.product-table .col-siteurl { width: 250px; min-width: 220px; vertical-align: top; }
/* Ячейка ссылки: поле + кнопка перехода в одну строку */
.siteurl-cell { display: flex; gap: 6px; align-items: flex-start; }
.product-table .url-field { font-size: 12px; min-height: 2.2em; }
.product-table .url-open { padding: 3px 5px; }
.product-table .url-open svg { width: 14px; height: 14px; }
.product-table .col-extra { min-width: 160px; vertical-align: top; }
.product-table .col-price { width: 120px; min-width: 120px; }
.product-table .col-pack  { width: 90px; min-width: 80px; }
.product-table .col-stock { width: 100px; min-width: 90px; white-space: nowrap; }
.product-table .col-actions { width: 48px; padding: 10px 14px 4px 2px; text-align: center; vertical-align: top; }
.product-table td.col-price input { text-align: right; }
.product-table td.col-pack input { text-align: right; }
/* «Наличие» read-only в админке — без input, только текст; выравниваем по верху, как у полей ввода */
.product-table td.col-stock { font-size: 13px; vertical-align: top; }
.product-table td.col-stock span { display: inline-block; padding: 2px 6px; border: 1px solid transparent; }
/* Единый вид «скрыто»: подсвечиваем ВСЮ колонку — и шапку, и ячейки (встроенные + пользовательские) */
.product-table th.col-hidden { background: #fef5e7; }
.product-table th.col-hidden .col-title-edit { opacity: 0.45; text-decoration: line-through; }
.product-table td.col-hidden { background: #fef5e7; }
.product-table .col-add-th { width: 100px; min-width: 100px; padding: 6px 8px; text-align: center; }
.product-table .col-add-cell { padding: 0; }

.product-table th.col-extra {
    padding: 8px 10px;
    vertical-align: top;
    font-size: 11px;
}
.product-table th.col-extra.col-hidden .col-title-edit { opacity: 0.45; text-decoration: line-through; }
.product-table th.col-extra.col-hidden { background: #fef5e7; }
.col-title-edit { display: block; cursor: text; padding: 2px 0; }
.col-title-edit:hover { color: #1F4E8C; }
.col-actions-mini { display: inline-flex; gap: 4px; margin-top: 4px; }
.col-eye-btn, .col-del-btn {
    background: transparent;
    border: 1px solid #d8dee9;
    color: #5C6779;
    cursor: pointer;
    font-size: 11px;
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.col-eye-btn:hover { color: #2E7DD1; border-color: #2E7DD1; }
.col-eye-btn.off { color: #c05621; border-color: #f6d39a; background: #fef5e7; }
/* Булавка «показывать колонку всегда»: приглушена, пока не включена */
.col-pin-btn { filter: grayscale(1); opacity: 0.5; }
.col-pin-btn.on { filter: none; opacity: 1; border-color: #2E7DD1; background: #EEF5FD; }
.col-del-btn:hover { color: #c53030; border-color: #f0bcbc; background: #fdeaea; }
.col-add-btn {
    background: #fff;
    color: #2E7DD1;
    border: 1px dashed #2E7DD1;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.col-add-btn:hover { background: #2E7DD1; color: #fff; }

/* col-extra ячейки покрываются общим правилом td.col-hidden выше — отдельное правило не нужно */

/* Кнопка видимости в шапке секции (устаревший emoji-стиль, вне области товарных кнопок) */
.toggle-eye { background: transparent; border: 0; color: #5C6779; padding: 4px; }
.toggle-eye.off { color: #c53030; }

/* Управляющие кнопки товара — единый набор иконок и одинаковый ховер, сетка 2×2 */
.prod-actions-grid { display: inline-grid; grid-template-columns: repeat(2, 20px); gap: 2px; }
.prod-act {
    width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px;
    background: transparent; color: #5C6779; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .12s ease, color .12s ease;
}
.prod-act svg { width: 13px; height: 13px; display: block; }
.prod-act:hover { background: #E9EEF5; color: #1F2937; text-decoration: none; }
.prod-act:focus-visible { outline: 2px solid #2E7DD1; outline-offset: 1px; }
.prod-act[disabled] { cursor: default; }
/* Состояния синхронизации с Б24 — иконка та же, добавляется только индикация процесса */
.btn-b24-sync.syncing { color: #2E7DD1; cursor: default; animation: b24spin 0.8s linear infinite; }
.btn-b24-price.syncing { opacity: 0.5; cursor: default; }
@keyframes b24spin { to { transform: rotate(360deg); } }

/* Поле ссылки на сайт: длинный URL переносится и виден целиком */
.url-field {
    field-sizing: content; min-height: 2.6em; resize: vertical;
    font-size: 13px; line-height: 1.35; word-break: break-all;
}

/* Кнопка-иконка «открыть ссылку» рядом с полем ссылки на сайт */
.url-open { padding: 6px 8px; line-height: 0; flex: 0 0 auto; }
.url-open svg { width: 16px; height: 16px; display: block; }
.url-open.is-disabled { opacity: 0.4; pointer-events: none; }

/* Скрытый от клиента товар — серая приглушённая строка */
.product-row.product-hidden > td { background: #E9EBEF; }
.product-row.product-hidden input,
.product-row.product-hidden textarea { background: #EFF1F4; color: #838C9B; border-color: #DCE0E6; }
.product-row.product-hidden .prod-drag-handle { color: #AEB4BF; }
.product-row.product-hidden .prod-act { color: #6B7482; }
/* Отчёт о синхронизации */
.sync-report-count { font-size: 18px; font-weight: 700; color: #1F4E8C; margin: 4px 0; }
.sync-report-list { max-height: 48vh; overflow-y: auto; border: 1px solid #E5E7EB; border-radius: 8px; margin-top: 6px; }
.sync-report-item { padding: 8px 12px; border-bottom: 1px solid #F3F4F6; }
.sync-report-item:last-child { border-bottom: 0; }
.sync-report-model { font-weight: 500; font-size: 14px; color: #1F2937; }
.sync-report-detail { font-size: 13px; color: #4A5568; margin-top: 2px; }

.section-image-preview, .category-image-preview, .product-image-preview {
    width: 48px; height: 48px;
    border-radius: 6px; object-fit: contain;
    border: 1px solid #E1E7EF; background: #F6F8FB;
    display: block;
}
.image-preview-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}
/* Ячейка «Картинка» в таблице товаров — компактно, миниатюра и «Загрузить» в одну строку,
   чтобы строки не растягивались по высоте */
.product-image-cell { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.product-table .product-image-preview { width: 32px; height: 32px; }
.product-table .col-image { vertical-align: top; min-width: 150px; padding: 13px 10px 4px; }
.image-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #c53030;
    color: #fff;
    border: 2px solid #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.image-remove-btn:hover { background: #9b2424; }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(20,37,62,0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 50; padding: 16px;
}
.modal {
    background: #fff; border-radius: 14px;
    max-width: 560px; width: 100%;
    max-height: 92vh; overflow: auto;
    padding: 22px 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.modal h2 { margin: 0 0 10px; font-size: 18px; }
.modal .modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

.data-table {
    width: 100%; border-collapse: collapse;
    background: #fff; border: 1px solid #E1E7EF;
    border-radius: 10px; overflow: hidden;
}
.data-table th, .data-table td {
    padding: 10px 12px; text-align: left;
    border-bottom: 1px solid #EEF2F8;
    font-size: 14px; vertical-align: top;
}
.data-table th { background: #F6F8FB; color: #5C6779; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

.tag {
    display: inline-block;
    padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600;
}
.tag-admin { background: #1F4E8C; color: #fff; }
.tag-editor { background: #FB6514; color: #fff; }
.tag-manager { background: #E7F0FB; color: #1F4E8C; }

/* Поле пароля с кнопкой «глазик» */
.pw-field { position: relative; margin-top: 4px; }
.pw-field input { width: 100%; padding-right: 38px; box-sizing: border-box; }
.pw-eye {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; padding: 0; border: 0; background: transparent;
    cursor: pointer; opacity: 0.55; color: #5C6779;
    display: inline-flex; align-items: center; justify-content: center;
    transition: opacity .12s;
}
.pw-eye:hover { opacity: 1; }
.pw-eye svg { display: block; }
.tag-inactive { background: #fdeaea; color: #c53030; }
.tag-active { background: #e6f4ee; color: #2f855a; }

.copyable { display: flex; align-items: center; gap: 6px; }
.copyable code { background: #F6F8FB; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-family: 'JetBrains Mono', Consolas, monospace; color: #1F4E8C; }

.dirty-counter {
    font-size: 12px;
    color: #c05621;
    background: #fef5e7;
    border: 1px solid #f6d39a;
    padding: 4px 10px;
    border-radius: 999px;
    align-self: center;
}
.hidden { display: none !important; }

.row-dirty { background: #fffaf0; }
.row-dirty:hover td { background: #fff5e0 !important; }

.cat-nav-admin {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #E1E7EF;
    gap: 8px;
}

.discount-grid {
    display: grid;
    grid-template-columns: 1fr 100px 60px;
    gap: 8px 12px; align-items: center;
}
.discount-grid > .grid-head { font-size: 11px; color: #5C6779; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 4px; border-bottom: 1px solid #EEF2F8; }
.discount-grid input[type=number] { padding: 4px 8px; }

@media (max-width: 900px) {
    .admin-topbar { padding: 0 14px; height: auto; min-height: 56px; flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
    .admin-nav { order: 3; width: 100%; }
    .admin-body { grid-template-columns: 1fr; }
    .cat-sidebar { position: static; max-height: none; border-right: 0; border-bottom: 1px solid #E1E7EF; }
    .main { padding: 16px; }
}

/* ===== Кнопка «Скачать прайс в XLSX» на главной ===== */
/* сверху воздух, снизу подтягиваем к футеру: у main padding-bottom 56px + у футера margin-top 30px */
.price-download { margin: 44px 0 -42px; text-align: center; }
.price-download-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 26px; border-radius: 10px;
    background: #2E7DD1; color: #fff; font-weight: 600; font-size: 15px;
    text-decoration: none; border: 1px solid #2E7DD1;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.price-download-btn:hover { background: #1F62B0; border-color: #1F62B0; color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgba(46,125,209,0.25); }
.price-download-btn svg { flex: 0 0 auto; }
.price-download-note { margin-top: 8px; font-size: 13px; color: #8A94A6; }
@media (max-width: 520px) {
    .price-download-btn { width: 100%; justify-content: center; }
}

/* ===== Новые товары в Б24 (мониторинг) ===== */
.nav-badge {
    display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px;
    border-radius: 9px; background: #E53E3E; color: #fff;
    font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px;
}
.b24new-settings-title { margin: 22px 0 6px; padding-top: 16px; border-top: 1px solid #E1E7EF; font-size: 16px; }
.b24new-list { max-height: 56vh; }
.b24new-item { display: flex; gap: 12px; align-items: center; }
.b24new-info { flex: 1; min-width: 0; }
.b24new-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.b24new-popup {
    position: fixed; right: 20px; bottom: 20px; z-index: 40;
    width: 340px; max-width: calc(100vw - 32px);
    background: #fff; border: 1px solid #E1E7EF; border-left: 4px solid #2E7DD1; border-radius: 10px;
    padding: 14px 16px; box-shadow: 0 10px 30px rgba(20,37,62,0.18);
}
.b24new-popup-title { font-weight: 700; color: #1F4E8C; margin-bottom: 4px; }
.b24new-popup-text { font-size: 13px; color: #5C6779; }
.b24new-popup-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
@media (max-width: 600px) {
    .b24new-item { flex-direction: column; align-items: stretch; }
    .b24new-actions { justify-content: flex-end; }
}
.btn.b24new-open-hl { border-color: #E53E3E; background: #FFF5F5; color: #C53030; font-weight: 600; }
.btn.b24new-open-hl:hover { background: #FED7D7; }

/* ===== Журнал изменений ===== */
.audit-filters { display: grid; grid-template-columns: 200px 220px 1fr 150px 150px; gap: 10px; align-items: end; margin-bottom: 14px; }
.audit-filters label { margin: 0; }
@media (max-width: 1000px) { .audit-filters { grid-template-columns: 1fr 1fr; } .audit-filter-q { grid-column: 1 / -1; } }
.audit-list { border: 1px solid #E1E7EF; border-radius: 10px; overflow: hidden; }
.audit-list:empty { display: none; }
.audit-item { display: grid; grid-template-columns: 190px 1fr; gap: 14px; padding: 10px 14px; border-bottom: 1px solid #EEF2F8; background: #fff; }
.audit-item:last-child { border-bottom: 0; }
.audit-item.audit-auto { background: #FAFBFD; }
.audit-meta { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.audit-time { color: #5C6779; }
.audit-who { font-weight: 600; color: #14253E; }
.audit-who-auto { display: inline-block; align-self: flex-start; font-weight: 500; font-size: 12px; color: #5C6779; background: #EEF2F8; border-radius: 6px; padding: 1px 8px; }
.audit-body { min-width: 0; font-size: 14px; }
.audit-title { color: #14253E; }
.audit-title b { font-weight: 600; }
.audit-changes { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: #4A5568; }
.audit-changes li { margin: 1px 0; overflow-wrap: anywhere; }
.audit-field { color: #5C6779; }
.audit-old { color: #9B2C2C; text-decoration: line-through; text-decoration-color: rgba(155,44,44,0.45); }
.audit-new { color: #276749; font-weight: 500; }
.audit-details-toggle { padding-left: 0; margin-top: 2px; }
.audit-details { max-height: 40vh; margin-top: 4px; }
@media (max-width: 640px) { .audit-item { grid-template-columns: 1fr; gap: 4px; } .audit-meta { flex-direction: row; gap: 8px; align-items: center; } }

/* Расхождения «шт. в упаковке» с единицей Б24 */
.unit-warn { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #FFF5F5; border: 1px solid #FED7D7; font-size: 13px; color: #9B2C2C; }
