/* TOTACHI — подбор продукции */
:root {
  --red: #D7141A;          /* фирменный красный */
  --red-deep: #A90F14;
  --red-wash: #FCEBEC;
  --ink: #16191D;
  --steel: #5A6370;
  --steel-2: #8A929D;
  --rule: #DDE1E6;
  --plate: #FFFFFF;
  --ground: #EEF1F4;
  --ok: #1F7A4D;
  --radius-s: 6px;
  --radius-m: 10px;
  --display: "Manrope", system-ui, sans-serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 15px/1.5 var(--text); font-feature-settings: "tnum" 1;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* шапка */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 28px; background: var(--ink); color: #fff;
}
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.brand b { font: 700 20px/1 var(--display); letter-spacing: .04em; color: #fff; }
.brand b i { font-style: normal; color: var(--red); }
.brand span { font-size: 13px; color: #AEB5BF; }
.search { margin-left: auto; display: flex; width: min(440px, 100%); }
.search input {
  flex: 1; min-width: 0; height: 40px; padding: 0 14px;
  border: 1px solid #3A4048; border-right: 0; border-radius: var(--radius-s) 0 0 var(--radius-s);
  background: #23272D; color: #fff;
}
.search input::placeholder { color: #8A929D; }
.search button {
  height: 40px; padding: 0 18px; border: 0; cursor: pointer;
  border-radius: 0 var(--radius-s) var(--radius-s) 0; background: var(--red); color: #fff; font-weight: 600;
}
.search button:hover { background: var(--red-deep); }

/* окно кросс-поиска в шапке (есть на всех страницах) */
.hdr-cross { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.hdr-cross input {
  width: min(460px, 100%); height: 38px; padding: 0 14px;
  border: 1px solid #3A4048; border-radius: var(--radius-s);
  background: #23272D; color: #fff; font-size: 14px;
}
.hdr-cross input::placeholder { color: #8A929D; }
.hdr-cross input:focus { outline: none; border-color: var(--red); background: #2A2F36; }

/* раскладка */
.layout {
  display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px;
  max-width: 1480px; margin: 0 auto; padding: 24px 28px 64px;
}
.panel { background: var(--plate); border-radius: var(--radius-m); }

/* шаги выбора */
.picker { padding: 20px; position: sticky; top: 88px; align-self: start;
          max-height: calc(100vh - 112px); display: flex; flex-direction: column; }
.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.step { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 10px; }
.step-n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font: 600 13px/1 var(--display); background: var(--ground); color: var(--steel);
}
.step.is-done .step-n { background: var(--ink); color: #fff; }
.step.is-current .step-n { background: var(--red); color: #fff; }
.step select {
  width: 100%; height: 42px; padding: 0 36px 0 12px; appearance: none; cursor: pointer;
  border: 1px solid var(--rule); border-radius: var(--radius-s); background: #fff
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235A6370' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.step select:disabled { color: var(--steel-2); background-color: #F7F8FA; cursor: default; }
.step select:hover:not(:disabled) { border-color: var(--steel-2); }

.mods-head { display: flex; justify-content: space-between; align-items: baseline;
             margin: 22px 0 8px; font-weight: 600; }
.mods-head small { font-weight: 400; color: var(--steel); }
.mods { overflow: auto; margin: 0 -20px -20px; border-top: 1px solid var(--rule); flex: 1; }
.mods-empty { padding: 18px 20px; color: var(--steel); }
.mod {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 2px 12px; width: 100%;
  padding: 10px 20px; border: 0; border-bottom: 1px solid var(--rule); background: none;
  text-align: left; cursor: pointer;
}
.mod:hover { background: #F7F8FA; }
.mod.is-active { background: var(--red-wash); box-shadow: inset 3px 0 0 var(--red); }
.mod-years { font-weight: 600; }
.mod-eng { font-weight: 600; }
.mod-meta { grid-column: 2 / 4; color: var(--steel); font-size: 13px; }
.mod-cm3 { color: var(--steel); font-size: 13px; text-align: right; }
.chip-kind { align-self: center; margin: 0 8px 0 -2px; color: var(--steel); font-size: 12px; white-space: nowrap; }
.mod-ru { grid-column: 2 / 4; justify-self: start; margin-top: 2px; padding: 1px 6px; border-radius: 4px;
  background: var(--red-wash); color: var(--red-deep); font-size: 12px; font-weight: 600; }

/* результат */
.result { min-width: 0; }
.welcome { padding: 48px 40px; }
.welcome h1 { font: 600 30px/1.2 var(--display); margin: 0 0 12px; max-width: 18ch; }
.welcome p { color: var(--steel); max-width: 56ch; margin: 0 0 8px; }
.welcome .figures { display: flex; gap: 40px; margin-top: 28px; }
.welcome .figures b { display: block; font: 600 26px/1.1 var(--display); }
.welcome .figures span { color: var(--steel); font-size: 13px; }

.car { padding: 28px 32px 22px; }
.car-type { color: var(--steel); font-size: 13px; margin: 0 0 4px; }
.car h2 { font: 700 34px/1.1 var(--display); margin: 0 0 18px; letter-spacing: -.01em; }
.car h2 span { color: var(--steel); font-weight: 400; }
.spec { display: flex; flex-wrap: wrap; gap: 0; margin: 0; border-top: 1px solid var(--rule); }
.spec div { padding: 12px 28px 0 0; min-width: 110px; }
.spec dt { font-size: 12px; color: var(--steel); }
.spec dd { margin: 0; font-weight: 600; }
.car-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn {
  height: 34px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--radius-s);
  background: #fff; cursor: pointer; font-size: 13px;
}
.btn:hover { border-color: var(--steel-2); }

.cats { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 16px 0;
        padding: 8px 8px 10px; background: var(--plate); border-radius: var(--radius-m);
        box-shadow: 0 1px 0 var(--rule), 0 6px 18px rgba(22, 25, 29, .06); }
/* кнопки разделов — объёмные плашки: светлый верх, тень снизу, красная «ступенька» */
.cats a {
  position: relative; display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 11px 7px; font-size: 14px; border-radius: var(--radius-m); text-decoration: none; white-space: nowrap;
  color: var(--ink); font-weight: 600;
  background: linear-gradient(180deg, #FFFFFF 0%, #F3F5F7 100%);
  border: 1px solid #D3D8DE;
  box-shadow: inset 0 1px 0 #FFFFFF, 0 3px 0 #C9CFD6, 0 6px 12px rgba(22, 25, 29, .10);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.cats a::before {                 /* красная метка слева */
  content: ""; align-self: center; width: 3px; height: 13px; border-radius: 2px;
  background: var(--red); box-shadow: 0 0 0 3px var(--red-wash);
}
.cats a:hover {
  transform: translateY(-2px); border-color: var(--red);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 5px 0 var(--red-deep), 0 10px 18px rgba(215, 20, 26, .18);
}
.cats a:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px rgba(22, 25, 29, .12), 0 1px 0 #C9CFD6;
}
.cats a em {
  font-style: normal; font-weight: 600; font-size: 12px; color: var(--red-deep);
  background: var(--red-wash); padding: 1px 7px; border-radius: 999px;
}
@media (prefers-reduced-motion: reduce) {
  .cats a, .cats a:hover, .cats a:active { transition: none; transform: none; }
}

.cat { padding: 24px 32px 28px; margin-bottom: 16px; scroll-margin-top: 130px; }
.cat > h3 { font: 600 19px/1.2 var(--display); margin: 0 0 6px; }
.cat > .hint { color: var(--steel); font-size: 13px; margin: 0 0 14px; }

.row { display: grid; grid-template-columns: 230px 1fr; gap: 16px; padding: 14px 0;
       border-top: 1px solid var(--rule); align-items: start; }
.row-label { font-weight: 600; padding-top: 5px; }
.row-label small { display: block; font-weight: 400; color: var(--steel); font-size: 13px; }

.axle { display: grid; grid-template-columns: 76px 1fr; gap: 20px; padding: 18px 0;
        border-top: 1px solid var(--rule); }
.axle h4, .variant h4 { margin: 0 0 8px; font-size: 16px; }
.sub { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 4px 0; }
.sub-label { color: var(--steel); padding-top: 5px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--rule); border-radius: var(--radius-s); background: #fff;
  text-decoration: none; font-weight: 600; letter-spacing: .01em;
}
.chip:hover { border-color: var(--red); color: var(--red-deep); }
.chip small { font-weight: 400; color: var(--steel); }
.chip-oem { border-style: dashed; color: var(--steel); background: #FAFBFC; cursor: text; user-select: all; }
.oem-note { align-self: center; font-size: 13px; color: var(--steel); margin-right: 4px; }
.oil-req-main { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.chip-2 { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0;
          height: auto; min-height: 44px; padding: 5px 12px; line-height: 1.25; }
.chip-2 small { font-size: 12px; }
.chip.is-hyper { border-color: #E9B9BB; background: var(--red-wash); }
/* артикул взят у такой же модификации из другого источника применяемости */
.chip-twin { border-style: dashed; }
.chip-twin::after { content: "≈"; color: var(--steel-2); font-weight: 400; }
.chip-mann::after { content: "M"; margin-left: 4px; font-size: 10px; font-weight: 700; color: #1a6fb5; }
.chip-legend { padding: 0 6px; }
.chip-legend::after { content: none; }

.variant { border-top: 1px solid var(--rule); padding: 18px 0 6px; }
.variant-meta { color: var(--steel); font-size: 13px; margin: -4px 0 12px; }
.side { display: grid; grid-template-columns: 76px 130px 1fr; gap: 16px; padding: 10px 0; align-items: start; }
.side-name { font-weight: 600; padding-top: 2px; }
.side-name small { display: block; font-weight: 400; color: var(--steel); }
.side .none { color: var(--steel); padding-top: 5px; }

/* масло */
.oil-req { margin-bottom: 14px; }
.oil-note { margin: 0 0 8px; font-size: 14px; color: var(--ink); max-width: 90ch; }
.oil-note span { display: block; font-size: 12px; color: var(--steel); }
.oils { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.oil { border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 12px 16px; }
.oil.is-main { border-color: var(--red); box-shadow: inset 4px 0 0 var(--red); }
.oil-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.oil-head b { font-size: 16px; }
.oil-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--ground); color: var(--steel); }
.oil.is-main .oil-tag { background: var(--red); color: #fff; }
.oil p { margin: 4px 0 0; font-size: 13px; color: var(--steel); }

/* значки фильтров и АКБ */
.with-icon { display: flex; align-items: flex-start; gap: 12px; padding-top: 0 !important; }
.with-icon > span { padding-top: 5px; }
.ficon { width: 48px; height: 48px; flex: none; }
.ficon .ib { fill: #F3F5F7; stroke: #B9C0C9; stroke-width: 1.5; }
.ficon .ir, .ficon .ir rect { fill: var(--red); }
.ficon .ig { fill: #C9CFD6; }
.ficon .ih { fill: #fff; }
.ficon .il { stroke: #C9CFD6; stroke-width: 1.5; }
.ficon .iz { fill: none; stroke: var(--red); stroke-width: 2; stroke-linejoin: round; }
.ficon .iz-grey { fill: none; stroke: #B9C0C9; stroke-width: 1.6; stroke-linejoin: round; }
.ficon .iz-dark { fill: none; stroke: #3A4048; stroke-width: 1.8; stroke-linejoin: round; }
.ficon .ia { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; }
.ficon .it-red { fill: var(--red); font: 700 15px/1 var(--text); }
.ficon .it-grey { fill: #8A929D; font: 700 15px/1 var(--text); }
.akb-row { grid-template-columns: 360px 1fr; }
@media (max-width: 980px) { .akb-row { grid-template-columns: 1fr; } }

/* схема авто: вид сверху */
.carmap { width: 64px; height: 92px; }
.carmap .body { fill: #F3F5F7; stroke: #B9C0C9; stroke-width: 1.5; }
.carmap .glass { fill: #DDE3EA; }
.carmap .wheel { fill: #C9CFD6; }
.carmap .on { fill: var(--red); }
.carmap .blade { stroke: #B9C0C9; stroke-width: 3; stroke-linecap: round; }
.carmap .blade.on { stroke: var(--red); fill: none; }

.empty { padding: 28px 32px; color: var(--steel); }
.empty b { color: var(--ink); }

/* загрузка */
.loading { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 50; overflow: hidden;
           opacity: 0; transition: opacity .15s; }
.loading.is-active { opacity: 1; }
.loading::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--red);
                  animation: load 1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* таблицы (кроссы, применяемость) */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: var(--steel); font-size: 13px;
            padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); position: sticky; top: 0;
            background: #fff; }
.table td { padding: 9px 12px 9px 0; white-space: nowrap; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table td.wrap { white-space: normal; }
.table-wrap { overflow-x: auto; }
.table tr:hover td { background: #FAFBFC; }
.table a { font-weight: 600; text-decoration: none; color: var(--red-deep); }
.table a:hover { text-decoration: underline; }

/* страница товара */
.page { max-width: 1100px; margin: 0 auto; padding: 24px 28px 64px; }
.back { display: inline-block; margin-bottom: 14px; color: var(--steel); text-decoration: none; }
.back:hover { color: var(--ink); }
.prod { padding: 28px 32px; margin-bottom: 16px; display: flex; gap: 28px; align-items: center; }
.prod h1 { font: 700 36px/1.1 var(--display); margin: 0 0 6px; }
.prod p { margin: 0; color: var(--steel); }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.tabs button { padding: 10px 16px; border: 0; border-radius: var(--radius-s); background: transparent;
               cursor: pointer; color: var(--steel); font-weight: 500; }
.tabs button.is-active { background: var(--plate); color: var(--ink); }
.tab-panel { padding: 8px 24px 24px; }
.filter { margin: 12px 0 4px; }
.filter input { width: min(360px, 100%); height: 38px; padding: 0 12px; border: 1px solid var(--rule);
                border-radius: var(--radius-s); }
.is-hidden { display: none !important; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .picker { position: static; max-height: none; }
  .mods { max-height: 360px; }
  .top { flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .search { width: 100%; }
  .hdr-cross { order: 3; flex-basis: 100%; }
  .hdr-cross input { width: 100%; }
  .car, .cat { padding: 20px; }
  .car h2 { font-size: 26px; }
  .row, .sub, .series { grid-template-columns: 1fr; gap: 6px; }
  .axle { grid-template-columns: 1fr; }
  .side { grid-template-columns: 52px 1fr; }
  .side > :last-child { grid-column: 1 / -1; }
  .carmap { width: 48px; height: 70px; }
  .cats { top: 112px; }
  .page { padding: 16px; }
  .prod { flex-direction: column; align-items: flex-start; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading::after { animation: none; width: 100%; }
}

/* АКБ: полное наименование TOTACHI длинное — переносим внутри плашки, а не за край */
.akb-row > * { min-width: 0; }
.akb-row .chips { align-items: flex-start; }
.akb-row .chip { white-space: normal; max-width: 100%; line-height: 1.35; height: auto;
                 padding-top: 8px; padding-bottom: 8px; text-align: left; overflow-wrap: anywhere; }

/* трансмиссия и технические жидкости */
.fluid { border-top: 1px solid var(--rule); padding: 14px 0; }
.fluid:first-of-type { border-top: 0; }
.fluid-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.fluid-head span { color: var(--steel); }
.fluid-head em { font-style: normal; font-weight: 600; margin-left: auto; }
.fluid-req { margin: 6px 0 10px; color: var(--steel); font-size: 14px; }
.fluid .chip { height: auto; min-height: 32px; white-space: normal; padding-top: 6px; padding-bottom: 6px; }

/* ссылки на карточку продукта */
.prod-link { text-decoration: none; border-bottom: 1px dashed var(--steel-2); }
.prod-link:hover { color: var(--red-deep); border-bottom-color: var(--red); }
.oil-tag.oil-oem { background: #E8F3EC; color: var(--ok); }
a.chip { text-decoration: none; }

/* карточка продукта */
.pcard, .pcard-sec { padding: 24px 28px; margin-bottom: 16px; }
.pcard-sec h3 { margin: 0 0 12px; }
.pcard { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 28px; align-items: start; }
.pcard-main { aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-m);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pcard-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pcard-noimg { color: var(--steel-2); text-align: center; font-size: 14px; }
.pcard-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pcard-thumbs button { width: 64px; height: 64px; padding: 2px; background: #fff; border: 1px solid var(--rule);
  border-radius: var(--radius-s); cursor: pointer; }
.pcard-thumbs button.is-active { border-color: var(--red); }
.pcard-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pcard-cat { margin: 0 0 4px; color: var(--steel); font-size: 13px; }
.pcard-info h1 { margin: 0 0 14px; font: 600 22px/1.3 var(--display); }
.pcard-info h3 { margin: 18px 0 6px; font-size: 15px; }
.pcard-packs { margin: 0; padding-left: 18px; columns: 2; color: var(--steel); }
.pcard-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; }
.pcard-links a { color: var(--red-deep); }
.pcard-appr { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pcard-appr li { padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; font-size: 13px; }
.pcard-text p, .pcard-text li { max-width: 80ch; }
@media (max-width: 720px) {
  .pcard, .pcard-sec { padding: 18px 16px; }
  .pcard { grid-template-columns: 1fr; }
  .pcard-packs { columns: 1; }
}

/* крепление поводка щётки */
.mount { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; padding: 10px 12px;
  border: 1px solid var(--rule); border-radius: var(--radius-m); background: #FAFBFC; }
.mount-pic { flex: none; width: 80px; height: 152px; border-radius: var(--radius-s);
  background-size: 600% 200%; background-repeat: no-repeat; background-color: #1b1b1b; }
.mount-cap { display: block; font-size: 12px; color: var(--steel); }
.mount b { font-size: 15px; }
.mount small { display: block; margin-top: 2px; color: var(--steel); font-size: 12.5px; }
.mount.is-special { border-color: #E9B9BB; background: var(--red-wash); }

/* подпись таблицы для скринридеров */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
                   overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- служебный режим --- */
.admin-panel { border: 2px dashed #c9a227; background: #fffbea; }
.admin-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.admin-head h3 small { font-size: 12px; font-weight: 500; color: #8a6d00; margin-left: 8px; }
.admin-switch { font-size: 13px; color: #8a6d00; }
.top .admin-switch { margin-left: 12px; color: #f0d27a; white-space: nowrap; }
.admin-facts, .admin-rules { margin: 8px 0; padding-left: 18px; font-size: 14px; }
.admin-facts li, .admin-rules li { margin: 4px 0; }
.admin-rules .rule-kind { font-weight: 600; margin-right: 6px; }
.admin-rules .rule-scope { color: #8a6d00; margin-right: 6px; }
.admin-rules .rule-text { display: block; color: #444; }
.admin-rules small { color: #888; margin: 0 8px; }
.btn-small { padding: 2px 8px; font-size: 12px; }
.admin-add summary { cursor: pointer; font-weight: 600; margin-top: 8px; }
.admin-add form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; align-items: end; }
.admin-add label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.admin-add label.wide { grid-column: 1 / -1; }
.admin-add input, .admin-add select { padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; font: inherit; }
.admin-add form.is-note .only-rule { display: none; }
.admin-hint { color: #8a6d00; }
.chip-rule::after { content: "П"; margin-left: 4px; font-size: 10px; font-weight: 700; color: #8a6d00; }
.chip-swf { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #1a6fb5; background: #e8f1fa; vertical-align: middle; }
.admin-login { max-width: 360px; margin: 40px auto; }
.admin-login form { display: flex; gap: 8px; margin-top: 12px; }
.admin-login input { flex: 1; padding: 8px 10px; border: 1px solid #ccd; border-radius: 6px; font: inherit; }
.admin-login button { padding: 8px 14px; border: 0; border-radius: 6px; background: #1a6fb5; color: #fff; font: inherit; cursor: pointer; }
.admin-login-error { color: #b3261e; margin-top: 10px; }
.lang-switch { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 40px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid #3A4048; border-radius: var(--radius-s); background: #23272D;
  color: #C9CED6; font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none; letter-spacing: .02em;
  transition: background .15s, border-color .15s, color .15s;
}
.lang-switch a:hover { border-color: #6B737E; color: #fff; }
.lang-switch a.is-active { background: var(--red); border-color: var(--red); color: #fff; }
.lang-switch a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.search ~ .lang-switch, .admin-switch ~ .lang-switch { margin-left: 0; }

.chips-ak { margin-top: 6px; }
.chips-ak .oem-note { font-weight: 600; }

/* версии программы */
.versions-page .ver-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.versions-page .ver-table th, .versions-page .ver-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #E3E6EA; vertical-align: middle; }
.versions-page .ver-save { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.versions-page .ver-save input { flex: 1; min-width: 220px; padding: 8px 10px; border: 1px solid #CDD2D8; border-radius: 6px; }
.versions-page .ver-msg { background: #EAF6EC; border: 1px solid #B9E0C0; padding: 8px 12px; border-radius: 6px; }
.versions-page .ver-diff { background: #F7F8FA; border: 1px solid #E3E6EA; padding: 10px; overflow-x: auto; font-size: 12px; line-height: 1.45; }
.versions-page .ver-diff .add { color: #1B7F3B; background: #EAF6EC; }
.versions-page .ver-diff .del { color: #B3261E; background: #FCEDEC; }
.versions-page .ver-diff .hunk { color: #5B6670; }
.versions-page .ver-files { columns: 2; font-size: 13px; }

/* варианты на оси с подсказкой, чем отличаются */
.variants { display: flex; flex-direction: column; gap: 6px; }
.variant { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.variant .chips { margin: 0; }
.var-note { font-size: 13px; color: var(--steel); }

/* ---------- кнопки-ссылки, действия по машине ---------- */
a.btn { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.car-actions { flex-wrap: wrap; }
.btn-accent { background: var(--red); border-color: var(--red); color: #fff !important; font-weight: 600; }
.btn-accent:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-ghost { background: transparent; border-style: dashed; color: var(--steel); }
.btn-ghost:hover { color: var(--red-deep); border-color: var(--red); }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--red);
         color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

/* ---------- анимации подбора ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: -320px 0; } to { background-position: 320px 0; } }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(215, 20, 26, .0); } 25% { box-shadow: 0 0 0 3px rgba(215, 20, 26, .45); }
                   100% { box-shadow: 0 0 0 0 rgba(215, 20, 26, 0); } }
@keyframes unfold { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

.result > .panel, .result > .cats { animation: rise .28s ease-out both; }
.result > :nth-child(2) { animation-delay: .04s; }
.result > :nth-child(3) { animation-delay: .08s; }
.result > :nth-child(4) { animation-delay: .12s; }
.result > :nth-child(5) { animation-delay: .16s; }
.result > :nth-child(n+6) { animation-delay: .2s; }
.result > .skeleton { animation: none; }

.skeleton .panel { padding: 22px 28px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.skeleton .sk-nav { flex-direction: row; flex-wrap: wrap; padding: 12px; }
.sk { display: block; height: 14px; border-radius: 6px;
      background: linear-gradient(90deg, #EEF1F4 0%, #E2E6EB 40%, #EEF1F4 80%) #EEF1F4;
      background-size: 640px 100%; animation: shimmer 1.1s linear infinite; }
.sk-s { width: 22%; height: 11px; } .sk-l { width: 72%; height: 22px; } .sk-m { width: 46%; }
.sk-b { width: 110px; height: 34px; border-radius: var(--radius-m); }

.cat.is-flash { animation: flash 1.2s ease-out; }
.cats a.is-current { border-color: var(--red); }
.is-folded { display: none !important; }
.is-unfold { animation: unfold .25s ease-out both; }
.more-btn { margin-top: 8px; height: 28px; font-size: 12px; }

/* кнопка «копировать» рядом с артикулом */
.chip-copy { width: 24px; height: 32px; margin-left: -8px; border: 1px solid var(--rule); border-left: 0;
             border-radius: 0 var(--radius-s) var(--radius-s) 0; background: #fff center / 13px no-repeat;
             background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238A929D' stroke-width='1.6'%3E%3Crect x='5' y='5' width='8.5' height='8.5' rx='1.5'/%3E%3Cpath d='M10.5 2.5h-7a1 1 0 0 0-1 1v7'/%3E%3C/svg%3E");
             cursor: pointer; padding: 0; flex: none; }
.chip-copy:hover { background-color: var(--red-wash); }
.chip-copy.is-done { animation: pop .35s ease-out;
             background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231F7A4D' stroke-width='2'%3E%3Cpath d='M3 8.5l3 3 7-7'/%3E%3C/svg%3E"); }
.chip-2 + .chip-copy { height: auto; align-self: stretch; }
.akb-row .chip + .chip-copy { height: auto; align-self: stretch; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px); opacity: 0;
         padding: 10px 16px; border-radius: var(--radius-m); background: var(--ink); color: #fff; font-size: 14px;
         box-shadow: 0 8px 24px rgba(0, 0, 0, .2); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .result > .panel, .result > .cats, .cat.is-flash, .is-unfold, .chip-copy.is-done { animation: none; }
  .sk { animation: none; }
  .toast { transition: none; }
}

/* ---------- «Неверный подбор?» ---------- */
.fb-dialog { width: min(520px, calc(100vw - 32px)); border: 0; border-radius: var(--radius-m); padding: 0;
             box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.fb-dialog::backdrop { background: rgba(22, 25, 29, .45); }
.fb-dialog[open] { animation: rise .2s ease-out; }
.fb-form { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; }
.fb-form h3 { margin: 0; font: 600 18px/1.2 var(--display); }
.fb-form .hint { margin: 0; color: var(--steel); font-size: 13px; }
.fb-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--steel); }
.fb-form select, .fb-form textarea { border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 8px 10px;
                                     font-size: 14px; color: var(--ink); resize: vertical; }
.fb-actions { display: flex; justify-content: flex-end; gap: 8px; }
.fb-status { margin: 0; min-height: 1em; font-size: 13px; color: var(--red-deep); }

/* служебная страница отзывов */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tabs a { padding: 8px 14px; border-radius: var(--radius-s); background: var(--plate); text-decoration: none; font-weight: 600; color: var(--steel); }
.tabs a.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
.fb-page .panel { padding: 22px 26px; }
.fb-page .hint a.is-active { font-weight: 700; color: var(--red-deep); }
.fb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fb-table th, .fb-table td { padding: 8px 10px; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.fb-table th { font-size: 12px; color: var(--steel); font-weight: 600; border-top: 0; }
.fb-table tr.is-done { opacity: .5; }
.fb-text { white-space: pre-wrap; max-width: 460px; }

/* ---------- «Подбор для клиента» ---------- */
.client-body { background: var(--ground); }
.client-sheet { max-width: 960px; margin: 24px auto; padding: 32px 40px; background: #fff; border-radius: var(--radius-m); }
.client-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
               padding-bottom: 14px; border-bottom: 3px solid var(--red); }
.client-head .brand b { color: var(--ink); }
.client-head .brand span { color: var(--steel); }
.client-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.client-sheet h1 { margin: 22px 0 4px; font: 600 26px/1.2 var(--display); }
.client-car { margin: 0 0 18px; color: var(--steel); }
.client-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.client-table th { text-align: left; font-size: 12px; color: var(--steel); padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.client-table td { padding: 8px; vertical-align: top; border-top: 1px solid #EEF1F4; }
.client-table tr.sec-start td { border-top: 1px solid var(--rule); }
.c-sec { font-weight: 700; width: 18%; }
.c-art { font-weight: 600; width: 30%; }
.c-note { color: var(--steel); font-size: 13px; }
.client-foot { margin-top: 22px; font-size: 12px; color: var(--steel); }
@media (max-width: 720px) {
  .client-sheet { margin: 0; padding: 18px 16px; border-radius: 0; }
  .client-table, .client-table tbody, .client-table tr, .client-table td { display: block; width: auto; }
  .client-table thead { display: none; }
  .client-table tr { padding: 8px 0; border-top: 1px solid var(--rule); }
  .client-table td { border: 0; padding: 2px 0; }
  .c-sec:empty { display: none; }
}
@media print {
  @page { margin: 14mm; }
  body, .client-body { background: #fff; }
  .no-print { display: none !important; }
  .client-sheet { margin: 0; padding: 0; max-width: none; }
  .client-table tr { break-inside: avoid; }
  .client-foot a { color: inherit; }
}

/* ---------- личный кабинет менеджера ---------- */
.acct-nav { display: flex; gap: 14px; align-items: center; margin-left: 16px; font-size: 13px; white-space: nowrap; }
.acct-nav a { color: #D5DAE0; text-decoration: none; }
.acct-nav a:hover { color: #fff; text-decoration: underline; }
.search + .acct-nav { margin-left: 16px; }
.base-top .acct-nav, .top > .acct-nav:first-of-type { margin-left: auto; }
.acct-actions { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.fb-form input { border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 8px 10px; font-size: 14px; color: var(--ink); }
.acct-login { max-width: 420px; margin: 40px auto; padding: 28px; }
.acct-login form { display: flex; flex-direction: column; gap: 10px; }
.acct-login input { height: 40px; border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 0 12px; font-size: 15px; }
.acct-login button { height: 40px; border: 0; border-radius: var(--radius-s); background: var(--red); color: #fff; font-weight: 600; cursor: pointer; }
.acct-ok { color: var(--ok); font-weight: 600; }

.garage-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.garage-grid .panel { padding: 22px 26px; margin-bottom: 16px; }
.garage-grid h3 { margin: 0 0 8px; font: 600 18px/1.2 var(--display); }
.garage-grid h3 small { font: 500 13px var(--text); color: var(--steel); }
.garage-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.garage-search { display: flex; gap: 6px; }
.garage-search input { height: 34px; width: 240px; border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 0 10px; }
.garage-list, .offer-list, .hist-list { list-style: none; margin: 0; padding: 0; }
.garage-item { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); }
.gi-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gi-vin { font-size: 13px; letter-spacing: .04em; color: var(--ink); background: var(--ground); padding: 1px 6px; border-radius: 4px; align-self: flex-start; }
.gi-car { font-size: 13px; color: var(--steel); }
.gi-note { font-size: 13px; }
.gi-main small, .offer-list small, .hist-list small { color: var(--steel-2); font-size: 12px; }
.gi-actions { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.offer-list li, .hist-list li { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid #EEF1F4; font-size: 14px; }
.offer-list a, .hist-list a { text-decoration: none; }
.offer-list a:hover, .hist-list a:hover { color: var(--red-deep); }
.st { font-weight: 600; } .st-sent { color: #1a6fb5; } .st-ordered { color: var(--ok); } .st-lost { color: var(--steel-2); }

.offer-page .panel { padding: 24px 28px; }
.offer-page h3 { margin: 0 0 4px; font: 600 20px/1.2 var(--display); }
.offer-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.offer-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--steel); }
.offer-fields label.wide { grid-column: 1 / -1; }
.offer-fields input, .offer-fields select { height: 36px; border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 0 10px; font-size: 14px; color: var(--ink); }
.offer-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.offer-table th { text-align: left; font-size: 12px; color: var(--steel); padding: 6px; }
.offer-table td { padding: 6px; border-top: 1px solid #EEF1F4; vertical-align: top; }
.offer-table td small { display: block; color: var(--steel); font-size: 12px; }
.offer-table .sec-row td { font-weight: 700; padding-top: 14px; border-top: 1px solid var(--rule); }
.offer-table tr.cand { color: var(--steel); }
.offer-table tr.cand.is-on { color: var(--ink); background: #FFF8F8; }
.offer-table .qty { width: 64px; height: 30px; border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 0 6px; }
.num { text-align: right; white-space: nowrap; }
.offer-bottom { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end;
                padding: 12px 0 4px; background: #fff; border-top: 1px solid var(--rule); margin-top: 12px; flex-wrap: wrap; }
.offer-total { margin-right: auto; font-weight: 600; }
.offer-view { padding: 0; }
.c-sec-small { display: block; font-size: 11px; color: var(--steel-2); text-transform: uppercase; letter-spacing: .04em; }
.offer-manage { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--rule); }
.offer-manage label { font-size: 13px; color: var(--steel); display: flex; gap: 6px; align-items: center; }
.offer-manage select { height: 34px; border: 1px solid var(--rule); border-radius: var(--radius-s); }

.users-forms { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 18px; }
.user-add { display: flex; gap: 6px; flex-wrap: wrap; }
.user-add input { height: 34px; border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 0 10px; }
.user-import { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; font-size: 13px; color: var(--steel); }
.user-import label { display: flex; flex-direction: column; gap: 6px; }
.user-acts { display: flex; gap: 4px; }
.pw-box { padding: 12px 14px; margin: 10px 0; border-radius: var(--radius-s); background: #FFF8E1; border: 1px solid #F0D27A; font-size: 14px; }
.pw { font-size: 15px; background: #fff; padding: 1px 6px; border-radius: 4px; }

@media (max-width: 980px) {
  .garage-grid { grid-template-columns: 1fr; }
  .offer-fields { grid-template-columns: 1fr; }
  .garage-item { flex-direction: column; }
  .gi-actions { justify-content: flex-start; }
  .acct-nav { margin-left: 0; flex-wrap: wrap; }
}
@media print { .offer-manage, .acct-nav { display: none !important; } }
.fb-table tr.is-pending { background: #FFF8E1; }

/* показать / скрыть пароль */
.pw-wrap { position: relative; display: flex; flex: 1; }
.pw-wrap input { flex: 1; width: 100%; padding-right: 44px !important; }
.acct-login .pw-wrap .pw-eye, .pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 32px; border: 0; background: transparent; color: var(--ink); opacity: .45;
    font-size: 17px; cursor: pointer; padding: 0; }
.pw-eye.on, .pw-eye:hover { opacity: 1; }
.acct-login form > input, .acct-login form > .pw-wrap { flex: 0 0 auto; }
.acct-login .pw-wrap input { height: 40px; }

/* админка */
.adm-page { max-width: 1180px; }
.adm-head h3 { margin-bottom: 10px; }
.adm-links { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.adm-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: #fff; border-radius: var(--radius, 12px);
    box-shadow: 0 1px 2px rgba(22,25,29,.06), 0 4px 14px rgba(22,25,29,.05); color: var(--ink); text-decoration: none; }
.adm-tile b { font-family: var(--mono); font-weight: 600; font-size: 28px; line-height: 1.1; letter-spacing: -1px; }
.adm-tile span { font-size: 13px; color: var(--steel); }
a.adm-tile:hover { box-shadow: 0 2px 4px rgba(22,25,29,.08), 0 8px 22px rgba(22,25,29,.09); }
.adm-tile.is-alert { background: var(--red-wash); }
.adm-tile.is-alert b { color: var(--red-deep); }
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.adm-page .panel h4 { margin: 0 0 10px; }
.adm-page .panel h4 + * { margin-top: 0; }
.adm-page .panel .fb-table + h4 { margin-top: 18px; }
.adm-facts { list-style: none; margin: 0; padding: 0; }
.adm-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.adm-facts li:first-child { border-top: 0; }
.adm-facts span { color: var(--steel); }
.adm-facts b { text-align: right; font-weight: 600; }
.adm-facts b.ok { color: var(--ok); }
.adm-facts b.warn { color: var(--red-deep); }
.adm-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.adm-filter input, .adm-filter select { height: 36px; border: 1px solid var(--rule); border-radius: var(--radius-s, 8px); padding: 0 10px; font: inherit; }
.adm-filter input { flex: 1; min-width: 200px; }
.adm-nav { font-weight: 700; }
.adm-page > .panel { margin-bottom: 16px; }
@media (max-width: 760px) { .adm-grid { grid-template-columns: 1fr; } .adm-page .fb-table { font-size: 13px; } }

.adm-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; margin: 10px 0 18px; }
.adm-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--steel); }
.adm-form label.wide { grid-column: 1 / -1; }
.adm-form input, .adm-form select, .adm-form textarea { border: 1px solid var(--rule); border-radius: var(--radius-s, 8px);
    padding: 8px 10px; font: inherit; color: var(--ink); background: #fff; }
.adm-form textarea { resize: vertical; font-family: inherit; }
.adm-form button { grid-column: 1 / -1; justify-self: start; }
.adm-form.is-truck .only-car { display: none; }
.adm-form h5.wide { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 15px; }
.adm-form h5.wide:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.adm-import { margin: 0 0 18px; }
.adm-import summary { cursor: pointer; font-weight: 600; }
.adm-export { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0; }
.adm-export > div { border: 1px solid var(--rule); border-radius: var(--radius, 12px); padding: 16px; }
.adm-export .btn { margin-right: 6px; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 760px) { .adm-form { grid-template-columns: 1fr; } .adm-export { grid-template-columns: 1fr; } }

/* --- КП-корзина: «＋ В КП» у товаров, фасовки, умный поиск ---------------------------------- */
.kp-add { font: inherit; font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 9px; margin-left: 4px;
    border: 1px solid var(--red); color: var(--red); background: #fff; border-radius: 999px;
    cursor: pointer; white-space: nowrap; vertical-align: middle; }
.kp-add:hover { background: var(--red); color: #fff; }
.kp-add.is-in { background: #E8F5EC; border-color: #2E8B57; color: #1F6B41; }
.kp-add:disabled { opacity: .6; }
.kp-add-main { font-size: 13px; padding: 7px 12px; }
.kp-box { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.oil-head .kp-box { margin-left: auto; }
.oil-head { flex-wrap: wrap; }
.kp-pack { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--rule, #DDE1E6); border-radius: 8px; background: #fff; }
.kp-item { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kp-lines { display: grid; gap: 6px; margin-top: 8px; }
.kp-line { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 14px; }
.kp-nav b { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 999px;
    background: var(--red); color: #fff; font-size: 12px; text-align: center; }
.kp-hint { display: block; flex-basis: 100%; margin: 4px 0 0; }
.kp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kp-search { position: relative; margin: 12px 0 16px; }
.kp-search input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 12px 14px;
    border: 2px solid var(--red); border-radius: 10px; }
.kp-res { border: 1px solid var(--rule, #DDE1E6); border-radius: 10px; margin-top: 6px; max-height: 420px; overflow: auto; background: #fff; }
.kp-hit { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--rule, #DDE1E6); }
.kp-hit > div { flex: 1; min-width: 0; }
.kp-hit small { display: block; color: var(--steel, #5A6370); }
.kp-hit .qty { width: 64px; padding: 6px 8px; font: inherit; border: 1px solid var(--rule, #DDE1E6); border-radius: 8px; }
.kp-table .kp-car td, .offer-print .kp-car td { background: #F2F3F5; font-weight: 700; }
.kp-table td small, .offer-print td.c-art small { display: block; color: var(--steel, #5A6370); font-weight: 400; }
.kp-finish { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 760px) { .kp-hit { flex-wrap: wrap; } .kp-box { margin-left: 0; } }
@media print { .kp-add, .kp-box { display: none !important; } }

/* --- Скидки по группам в КП --- */
.kp-disc { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 2px 0 16px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 10px; background: #F7F8FA; }
.kp-disc-group { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink); }
.kp-disc-group > b { font-weight: 600; }
.kd-field { display: inline-flex; align-items: center; gap: 3px; }
.kd-field i { font-style: normal; font-size: 12px; color: var(--steel); }
.kd-input { width: 56px; padding: 4px 6px; font: inherit; font-size: 13px; text-align: right; border: 1px solid var(--rule); border-radius: 8px; background: #fff; color: var(--ink); }
.kd-input:focus { outline: none; border-color: var(--red); }
.kd-base { color: var(--steel-2); font-size: 11.5px; text-decoration: line-through; }
.kd { color: var(--red); font-size: 11px; font-weight: 700; }
.kd-note { font-size: 12.5px; color: var(--steel); margin: 2px 0 10px; }

/* --- ссылка входа админа (публичный сайт) --- */
.acct-nav a.adm-login { color: #6E7683; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.acct-nav a.adm-login:hover { color: #fff; border-color: var(--red); text-decoration: none; background: rgba(215,20,26,.12); }
.adm-login-hint a { color: var(--steel); }

/* --- Печать КП: плотная таблица, компактный лист --- */
@media print {
  @page { margin: 12mm 13mm; }
  .client-sheet { padding: 0; }
  .client-sheet h1 { margin: 6px 0 2px; font-size: 17px; }
  .client-car { margin: 0 0 4px; font-size: 11px; }
  .kd-note { margin: 0 0 6px; font-size: 9.5px; color: var(--ink); }
  .client-sheet .client-head .brand span { font-size: 11px; }
  /* на узком «печатном» экране срабатывал мобильный стек ячеек — возвращаем таблицу */
  .client-table { display: table; width: 100%; font-size: 10.5px; }
  .client-table thead { display: table-header-group; }
  .client-table tbody, .client-table tfoot { display: table-row-group; }
  .client-table tr { display: table-row; padding: 0; }
  .client-table th, .client-table td { display: table-cell; padding: 2.5px 6px; }
  .client-table th { font-size: 8.5px; padding-bottom: 3px; }
  .client-table td.num, .client-table th.num { text-align: right; white-space: nowrap; }
  .client-table .c-art small, .client-table td small.c-sec-small { font-size: 8.5px; }
  .client-table .kp-car td { padding: 4px 6px; font-size: 10px; }
  .client-foot { font-size: 8.5px; margin-top: 6px; }
}

/* --- Присутствие и активность (админка) --- */
.pres-row { display: flex; gap: 10px; align-items: baseline; padding: 7px 2px; border-bottom: 1px dashed var(--rule); font-size: 13px; }
.pres-row:last-child { border-bottom: 0; }
.pres-row b { min-width: 210px; font-weight: 600; }
.pres-row span { color: var(--steel); font-size: 12.5px; }
.pres-row i { margin-left: auto; font-style: normal; color: var(--steel-2); font-size: 11.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres-updated { font-weight: 500; font-size: 11px; color: var(--steel-2); }
.pres-h4 { margin: 18px 0 8px; font-size: 13px; color: var(--steel); text-transform: uppercase; letter-spacing: .04em; }
#presence .fb-table .num, #presence .fb-table td.num, #presence .fb-table th.num { text-align: right; }
@media (max-width: 760px) { .pres-row { flex-wrap: wrap; } .pres-row b { min-width: 0; } .pres-row i { margin-left: 0; max-width: none; } }
