/* Оформление перенесено с публичного сайта tir-lugansk.ru: шрифт Oswald, палитра, форма кнопок и шапки.
   Токены — в :root; менять цвета нужно только здесь. */
:root {
  --black: #282828;
  --green: #3cc14e;
  --green-dark: #1f7a2c;   /* для текста ссылок: зелёный бренда на белом слишком бледный */
  --gray: #595959;
  --gray-bg: #f5f5f5;
  --red: #ff2e3b;
  --red-dark: #d81f2c;
  --line: #e3e6e8;
  --shadow: 0 0 30px 0 rgba(169, 175, 180, .35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; display: flex; flex-direction: column; min-height: 100vh;
  font: 16px/1.5 "Oswald", system-ui, "Segoe UI", Roboto, sans-serif;
  color: var(--black); background: var(--gray-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
button, input { font: inherit; }
.container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ---------- Шапка ---------- */
.navbar { padding: 12px 0; }
.navbar__content { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.navbar__brand img { display: block; width: 96px; height: auto; }
.navbar__menu { flex: 1 1 auto; min-width: 0; }
.navbar__menu ul {
  display: flex; flex-wrap: wrap; justify-content: space-evenly; gap: 8px 28px; margin: 0; padding: 8px 24px; list-style: none;
  background: #fff; border: 1px solid #f5f8fa; border-radius: 20px; box-shadow: var(--shadow);
}
.navbar__menu a { padding: 6px 2px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.navbar__menu a:hover, .navbar__menu a.is-active { color: var(--green-dark); border-color: var(--green); }

/* ---------- Кнопки и формы ---------- */
.btn, button[type="submit"].btn {
  display: inline-block; padding: 12px 32px; border: 0; border-radius: 30px; cursor: pointer;
  background: var(--red); color: #fff; font-weight: 500; transition: background .2s;
}
.btn:hover { background: var(--red-dark); }
.btn-link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--green-dark);
            text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }
label { display: block; margin-bottom: 4px; font-size: .9rem; color: var(--gray); }
input[type="text"], input[type="password"], input:not([type]) {
  width: 100%; padding: 10px 14px; border: 1px solid #cfd4d8; border-radius: 12px; background: #fff; color: var(--black);
}

/* ---------- Содержимое ---------- */
main { flex: 1 0 auto; padding: 24px 0 56px; }
.card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 28px 32px; }
@media (max-width: 640px) { .card { padding: 20px 16px; } }
h1 { font-size: 1.75rem; margin-bottom: 16px; }
h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.note { color: var(--gray); }
.error { color: #b3261e; }
.search-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; max-width: 40rem; }
.search-form > div { flex: 1 1 16rem; }
.login-card { max-width: 26rem; margin: 40px auto; }
.login-card form { display: grid; gap: 16px; }
.table-wrap { overflow-x: auto; margin-top: 20px; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--gray-bg); font-weight: 500; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.history { padding-left: 1.1rem; margin: 0; }
.history a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Подвал ---------- */
.footer { background: linear-gradient(120.46deg, #141414 0%, #313131 100%); color: #fff; padding: 40px 0 20px; }
.footer__content { display: flex; flex-wrap: wrap; gap: 32px 80px; margin-bottom: 28px; }
.footer__brand img { width: 120px; height: auto; display: block; }
.footer h3 { font-size: 18px; margin-bottom: 12px; }
.footer p { margin: 0 0 6px; color: #b0b0b0; font-size: 15px; }
.footer a { color: #b0b0b0; transition: color .2s; }
.footer a:hover { color: var(--green); }
.footer__social { display: flex; gap: 12px; }
.footer__social img { width: 28px; height: 28px; display: block; }
.footer__copy { border-top: 1px solid #444; padding-top: 16px; color: #b0b0b0; font-size: 14px; }

/* ---------- Ссылки и сообщения в карточках ---------- */
.text-link { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.success { color: var(--green-dark); }
.card p { margin: 0 0 12px; }
.card ul.plain { margin: 0 0 16px; padding-left: 1.2rem; }
.card--wide { max-width: 52rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
           clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Правая часть шапки ---------- */
.navbar__side { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.navbar__phone { font-weight: 500; font-size: 1.1rem; white-space: nowrap; }
.navbar__phone img { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }


/* ---------- Строка поиска в шапке ---------- */
.site-search { margin: 8px 0 4px; }
.site-search__wrapper {
  display: flex; align-items: center; background: #fff; border: 2px solid #e9ecef; border-radius: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.site-search__wrapper:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(60, 193, 78, .15); }
.site-search__mode {
  display: inline-flex; gap: 2px; margin-left: 8px; padding: 2px; flex-shrink: 0;
  background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 8px;
}
.site-search__mode-item { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.site-search__mode-item input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.site-search__mode-item span { padding: 3px 9px; border-radius: 6px; font-size: .75rem; font-weight: 500; color: var(--gray); white-space: nowrap; }
.site-search__mode-item input:checked + span { background: var(--green); color: #0d2b12; }
.site-search__mode-item input:focus-visible + span { outline: 3px solid var(--black); outline-offset: 1px; }
.site-search__wrapper input.site-search__input { flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 12px 16px; font-size: 1rem; }
.site-search__wrapper input.site-search__input:focus { outline: none; }
.site-search__btn { display: flex; align-items: center; justify-content: center; align-self: stretch; padding: 0 22px;
  border: 0; border-radius: 0 6px 6px 0; background: var(--green); color: #0d2b12; cursor: pointer; transition: background .2s; }
.site-search__btn:hover { background: #34ad45; }
@media (max-width: 640px) {
  .site-search__mode { margin-left: 6px; }
  .site-search__wrapper input.site-search__input { padding: 10px 10px; font-size: .95rem; }
  .site-search__btn { padding: 0 14px; }
}

/* ---------- Регистрация ---------- */
[hidden] { display: none !important; }
.tabs { display: inline-flex; gap: 2px; padding: 2px; margin: 8px 0 20px; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 8px; }
.tabs a { padding: 8px 18px; border-radius: 6px; font-weight: 500; color: var(--gray); }
.tabs a.is-active { background: var(--green); color: #0d2b12; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.form-grid .field--full, .form-grid .form-section { grid-column: 1 / -1; }
.form-section { margin: 12px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
select, input[type="email"], input[type="tel"], input[type="date"] {
  width: 100%; padding: 10px 14px; border: 1px solid #cfd4d8; border-radius: 12px; background: #fff; color: var(--black); font: inherit;
}
.field-error { margin: 4px 0 0; color: #b3261e; font-size: .9rem; }
.req { color: #b3261e; }
.hint { color: var(--gray); font-size: .8rem; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--black); font-size: 1rem; }
.check input { margin-top: 6px; width: 18px; height: 18px; flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Левое меню личного кабинета ---------- */
.page--with-nav { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.page__content { min-width: 0; }
.sidenav { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 12px; position: sticky; top: 16px; }
.sidenav ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sidenav a { display: block; padding: 10px 16px; border-radius: 12px; border-left: 3px solid transparent; transition: background .2s, color .2s; }
.sidenav a:hover { background: var(--gray-bg); }
.sidenav a.is-active { background: #eaf8ec; color: var(--green-dark); border-left-color: var(--green); font-weight: 500; }
@media (max-width: 800px) {
  .page--with-nav { grid-template-columns: 1fr; gap: 16px; }
  .sidenav { position: static; padding: 8px; overflow-x: auto; }
  .sidenav ul { flex-direction: row; gap: 4px; }
  .sidenav a { white-space: nowrap; padding: 8px 14px; border-left: 0; border-bottom: 3px solid transparent; border-radius: 10px; }
  .sidenav a.is-active { border-bottom-color: var(--green); }
}

/* ---------- Фото на странице «О компании» ---------- */
.about-photo { margin: 0 0 20px; }
.about-photo img { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: 16px; }
.about-photo figcaption { margin-top: 6px; color: var(--gray); font-size: .85rem; }

/* ---------- Новости в левой колонке (для гостей) ---------- */
.newsbar { padding: 20px; }
.newsbar__title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; font-size: 1.15rem; font-weight: 600;
  list-style: none; pointer-events: none; }   /* на ПК блок всегда раскрыт */
.newsbar__title::-webkit-details-marker { display: none; }
.newsbar ul { gap: 16px; margin-bottom: 16px; }
.newsbar li { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.newsbar li:last-child { border-bottom: 0; padding-bottom: 0; }
.newsbar__date { display: block; color: var(--gray); font-size: .8rem; }
.newsbar a { display: inline; padding: 0; border: 0; border-radius: 0; font-weight: 500; }
.newsbar li a:hover { background: none; color: var(--green-dark); }
.newsbar p { margin: 4px 0 0; color: var(--gray); font-size: .9rem; line-height: 1.35; }
@media (max-width: 800px) { .newsbar ul { flex-direction: column; } }

/* ---------- Недавние запросы под строкой поиска (одна строка, лишнее уходит в выпадающий список) ---------- */
.recent { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; margin: 8px 0 4px; position: relative; }
.recent__label { flex-shrink: 0; color: var(--gray); font-size: .85rem; white-space: nowrap; }
.recent__list { display: flex; flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; gap: 18px; margin: 0; padding: 0; list-style: none; overflow: hidden; white-space: nowrap; }
.recent__list li { flex-shrink: 0; }
.recent a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #b8c0c6; font-size: .9rem; transition: color .2s, text-decoration-color .2s; }
.recent a:hover { color: var(--green-dark); text-decoration-color: var(--green); }
.recent__more { position: relative; flex-shrink: 0; }
.recent__more-btn { padding: 0; border: 0; background: none; cursor: pointer; font-size: .9rem; color: var(--green-dark);
  text-decoration: underline; text-underline-offset: 3px; }
.recent__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 160px; max-height: 280px; overflow-y: auto;
  margin: 0; padding: 8px 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.recent__menu a { display: block; padding: 6px 16px; }

/* ---------- Новости справа (для вошедших): колонка идёт от строки поиска до низа страницы ---------- */
.page--with-news {
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  grid-template-areas: "nav search  news"
                       "nav content news";
  grid-template-rows: auto 1fr;   /* первая строка по высоте поиска; лишняя высота (меню, новости) уходит во вторую, а не раздвигает поиск */
}
.page--with-news > .page__search { grid-area: search; min-width: 0; }
.page--with-news > .sidenav:not(.newsbar) { grid-area: nav; }
.page--with-news > .page__content { grid-area: content; }
.page--with-news > .newsbar { grid-area: news; }
@media (max-width: 1100px) {
  .page--with-news {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "search search" "nav content" "news news";
  }
  .page--with-news > .newsbar { position: static; }
}
@media (max-width: 800px) {
  .page--with-news { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "search" "nav" "content" "news"; }
}
.page__search .site-search { margin-top: 0; }

/* Для вошедших пользователей страница на всю ширину экрана: новости прижаты к правому краю, шапка выровнена по ней */
.container--wide, .page--with-news { max-width: none; }

/* Страницы верхнего меню (О компании, Поставщикам и др.) заполняют область между боковыми блоками, как главная */
.page--with-nav .card--wide { max-width: none; }

/* ---------- Страница «Наши контакты» ---------- */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 32px; }
.contacts-grid h2 { margin-top: 20px; }
.contacts-social { display: flex; gap: 12px; }
.contacts-map { margin-top: 28px; }
.contacts-map iframe { display: block; width: 100%; height: 420px; border: 0; border-radius: 16px; background: var(--gray-bg); }
.contacts-map p { margin: 8px 0 0; }
@media (max-width: 640px) { .contacts-map iframe { height: 320px; } }

/* ---------- Меню пользователя: одна кнопка с выпадающим списком ---------- */
.navbar__side { flex-direction: row; align-items: center; gap: 16px; }
.usermenu { position: relative; }
.usermenu__btn { display: inline-flex; align-items: center; gap: 6px; max-width: 180px; padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 30px; background: #fff; color: var(--black); cursor: pointer; font-size: .95rem; }
.usermenu__btn:hover, .usermenu__btn[aria-expanded="true"] { border-color: var(--green); }
.usermenu__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 200px; margin: 0; padding: 8px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.usermenu__list a, .usermenu__list button { display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; background: none;
  text-align: left; cursor: pointer; font: inherit; color: var(--black); }
.usermenu__list a:hover, .usermenu__list button:hover { background: var(--gray-bg); }
.usermenu__list a.is-active { background: #eaf8ec; color: var(--green-dark); }
.usermenu__sep { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.usermenu__cab { display: none; }   /* пункты кабинета в выпадающем списке нужны только на телефоне, на ПК они слева */

/* ---------- Телефон: шапка компактнее ---------- */
@media (max-width: 800px) {
  .navbar { padding: 6px 0 2px; }
  .navbar__content { gap: 6px 12px; flex-wrap: wrap; }
  .navbar__brand { order: 1; }
  .navbar__brand img { width: 60px; }
  .navbar__side { order: 2; margin-left: auto; gap: 10px; }
  .navbar__phone { font-size: .95rem; }
  .navbar__menu { order: 3; flex: 1 1 100%; }
  .navbar__menu ul { flex-wrap: nowrap; justify-content: space-between; gap: 4px 10px; padding: 4px 12px; overflow-x: auto;
    scrollbar-width: none; white-space: nowrap; font-size: .85rem; line-height: 1.3; border-radius: 14px; }
  .navbar__menu ul::-webkit-scrollbar { display: none; }
  .navbar__menu a { padding: 2px 0; }   /* меньше зазор между текстом и подчёркиванием */
  .usermenu__btn { max-width: 96px; padding: 5px 10px; }
  .usermenu__cab { display: list-item; }
  .sidenav:not(.newsbar) { display: none; }   /* меню кабинета перенесено в кнопку пользователя */
  main { padding-top: 10px; }
}

/* ---------- Новости на телефоне сворачиваются ---------- */
@media (max-width: 800px) {
  .newsbar { padding: 12px 16px; }
  .newsbar__title { pointer-events: auto; cursor: pointer; margin: 0; padding: 4px 0; }
  .newsbar__title::after { content: "▾"; color: var(--gray); transition: transform .2s; }
  .newsbar__details[open] > .newsbar__title { margin-bottom: 12px; }
  .newsbar__details[open] > .newsbar__title::after { transform: rotate(180deg); }
}

/* ---------- Лимит поисков и администрирование ---------- */
.notice { margin: 12px 0; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--gray-bg); }
.notice p { margin: 4px 0 0; }
.notice--warn { background: #fff4e5; border-color: #f2c27a; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.inline-form--compact { gap: 8px; align-items: center; flex-wrap: nowrap; }
.inline-form input[type="number"], input[type="number"] {
  width: 11rem; padding: 10px 14px; border: 1px solid #cfd4d8; border-radius: 12px; background: #fff; color: var(--black); font: inherit;
}
.inline-form--compact input[type="number"] { width: 9.5rem; padding: 6px 10px; border-radius: 10px; }
.btn--small { padding: 8px 20px; }
.inline-form--compact .btn--small { padding: 6px 14px; }

/* ---------- Администрирование: заявки и пользователи ---------- */
.badge { display: inline-block; min-width: 1.4em; margin-left: 6px; padding: 0 6px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: .8rem; line-height: 1.5; text-align: center; }
.status { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .85rem; white-space: nowrap;
  background: #eef0f2; color: var(--black); }
.status--new { background: #fff4e5; color: #8a4b00; }
.status--done { background: #e6f6e9; color: #14631f; }
.status--rejected { background: #fdeaea; color: #8c1d18; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 4px 0 12px; }
.filters a { padding: 4px 2px; border-bottom: 2px solid transparent; }
.filters a.is-active { border-color: var(--green); font-weight: 600; }
.details { margin: 8px 0 16px; padding: 14px 18px; background: var(--gray-bg); border-radius: 12px;
  white-space: pre-wrap; font: inherit; overflow-wrap: anywhere; }
.request-actions { display: grid; gap: 16px; margin-top: 12px; }
.btn--secondary { background: #6b7378; }
.btn--secondary:hover { background: #4f565a; }
.actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.credentials { margin: 12px 0; padding: 16px 20px; border: 2px solid var(--green); border-radius: 12px; background: #f4fbf5; }
.credentials p { margin: 4px 0; }
.password { padding: 4px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  font: 600 1.4rem/1.6 ui-monospace, Consolas, monospace; letter-spacing: .05em; user-select: all; }

/* ---------- Администрирование: отдельный блок в левой колонке ---------- */
.sidenav__admin { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.sidenav__admin summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer;
  padding: 10px 16px; border-radius: 12px; font-weight: 600; list-style: none; }
.sidenav__admin summary::-webkit-details-marker { display: none; }
.sidenav__admin summary::after { content: "▾"; margin-left: auto; color: var(--gray); }
.sidenav__admin details:not([open]) summary::after { content: "▸"; }
.sidenav__admin summary:hover { background: var(--gray-bg); }
.sidenav__group-title { margin: 10px 16px 2px; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gray); }
.sidenav a .badge { float: right; margin-top: 3px; }
.sidenav__admin summary .badge { margin: 0 0 0 4px; }
.breadcrumbs { margin: 0 0 8px; color: var(--gray); font-size: .95rem; }
.admin-group + .admin-group { margin-top: 8px; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.admin-card { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s, box-shadow .2s; }
.admin-card:hover { border-color: var(--green); box-shadow: var(--shadow); }
.admin-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.admin-card p { margin: 0; color: var(--gray); }

/* ---------- Мои данные ---------- */
.data-list { display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; gap: 6px 20px; margin: 12px 0 8px; }
.data-list dt { color: var(--gray); }
.data-list dd { margin: 0; overflow-wrap: anywhere; }
.form-grid--narrow { max-width: 26rem; grid-template-columns: 1fr; }
@media (max-width: 640px) { .data-list { grid-template-columns: 1fr; gap: 0; } .data-list dd { margin-bottom: 10px; } }

/* ---------- Результаты поиска: зебра и заголовки групп ---------- */
.results tbody tr.row--odd { background: #ffffff; }
.results tbody tr.row--even { background: #eaf8ec; }
.results tr.group-row th { text-align: left; white-space: normal; padding: 8px 14px; background: #e4e8eb;
  font-weight: 600; border-bottom: 1px solid var(--line); }
.tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: #d3efd8; color: #14631f;
  font-size: .75rem; white-space: nowrap; vertical-align: 1px; }

/* ---------- Карточка товара ---------- */
.article { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-start; margin-bottom: 8px; }
.article__photo { margin: 0; flex: 0 0 auto; width: 320px; max-width: 100%; }
.article .data-list { flex: 1 1 22rem; }
.pre-line { white-space: pre-line; }
.notice--note { background: #fffbe0; border-color: #e8d96a; }
.tag--sale { background: #ffe3e5; color: #8c1d18; }
.tag--muted { background: #eef0f2; color: var(--gray); }

/* ---------- Таблица результатов: значки и всплывающее окно ---------- */
.results td.icons { white-space: nowrap; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-right: 4px;
  border-radius: 8px; color: var(--green-dark); border: 1px solid transparent; }
.icon-btn:hover { background: #d3efd8; border-color: var(--green); }
.icon-btn svg { display: block; }
.note-dialog { width: min(34rem, 92vw); max-height: 86vh; overflow: auto; padding: 20px 24px; border: 0; border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.note-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.note-dialog h2 { margin: 0 2rem 12px 0; font-size: 1.1rem; }
.note-dialog__body { white-space: pre-line; overflow-wrap: anywhere; }
.note-dialog__body img { display: block; max-width: 100%; height: auto; border-radius: 8px; background: var(--gray-bg); }
.note-dialog__close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: var(--gray); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.note-dialog__close:hover { background: var(--gray-bg); }
.results td.num { white-space: nowrap; }

/* ---------- «Запросить» и форма заявки ---------- */
.btn--outline { background: #fff; color: var(--red-dark); border: 2px solid var(--red); padding: 4px 14px; }
.btn--outline:hover { background: var(--red); color: #fff; }
textarea { width: 100%; padding: 10px 14px; border: 1px solid #cfd4d8; border-radius: 12px; background: #fff; color: var(--black); font: inherit; resize: vertical; }
.note-dialog label { display: block; margin-top: 10px; }
.note-dialog input[type="text"] { width: 100%; }
.note-dialog p.success { color: var(--green-dark); }

/* ---------- Запросы закупок ---------- */
.cell-text { min-width: 12rem; max-width: 22rem; white-space: normal; }
.filters .badge { margin-left: 4px; }
td .inline-form { margin-top: 6px; }

/* ---------- Корзина и заказы ---------- */
.cart-status { font-size: .85rem; max-width: 16rem; }
.cart-status.ok { color: var(--green-dark); }
.cart-status.warn { color: #8a4b00; }
.cart-status.err { color: #b3261e; }
.results td.cart-cell { white-space: nowrap; }
.row--warn { background: #fff4e5; }
.tag--warn { background: #ffe9c9; color: #8a4b00; }
.cart-table td { vertical-align: middle; }
.cart-table tfoot td { border-top: 2px solid var(--line); }
.checkout { margin: 16px 0 8px; max-width: 40rem; }
.checkout textarea { margin-bottom: 8px; }

/* ---------- Счётчик количества и кнопка-корзина ---------- */
:root { --cart-green: #2f9e44; --cart-red: #d93a45; }
.cart-add { display: block; margin: 0; }
.cart-add__row, .cart-change { display: flex; gap: 6px; align-items: center; margin: 0; }
.stepper { display: inline-flex; align-items: stretch; height: 34px; border: 1px solid #cfd4d8; border-radius: 8px;
  background: #fff; overflow: hidden; }
.stepper:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(60, 193, 78, .18); }
.stepper__btn { display: none; width: 28px; padding: 0; border: 0; background: transparent; color: var(--gray);
  font-size: 1.15rem; line-height: 1; cursor: pointer; }
.js .stepper__btn { display: inline-flex; align-items: center; justify-content: center; }
.stepper__btn:hover { background: var(--gray-bg); color: var(--black); }
.stepper .stepper__input { width: 2.8rem; min-width: 0; padding: 0 2px; border: 0; border-radius: 0; background: transparent; text-align: center; }
.stepper .stepper__input:focus { outline: none; }
.cart-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 34px; padding: 0;
  border: 0; border-radius: 8px; background: var(--cart-green); color: #fff; cursor: pointer; transition: background .15s, box-shadow .15s; }
.cart-btn:hover { filter: brightness(.92); }
.cart-btn.is-changed { background: var(--cart-red); box-shadow: 0 0 0 3px rgba(217, 58, 69, .25); }
.cart-note { display: block; margin-top: 2px; font-size: .8rem; font-weight: 500; color: var(--green-dark); }
.cart-note:empty { display: none; }

/* ---------- Галерея фото ---------- */
.gallery { margin: 0; }
.gallery__stage { position: relative; }
.gallery__open { display: block; }
.gallery__img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; border: 1px solid var(--line);
  border-radius: 12px; background: var(--gray-bg); }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 56px; padding: 0; border: 0;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.gallery__nav:hover { background: rgba(0, 0, 0, .7); }
.gallery__nav--prev { left: 0; border-radius: 0 10px 10px 0; }
.gallery__nav--next { right: 0; border-radius: 10px 0 0 10px; }
.gallery__counter { margin-top: 6px; text-align: center; font-size: .85rem; color: var(--gray); }
.gallery__thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.gallery__thumb { display: block; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px;
  background: var(--gray-bg); overflow: hidden; cursor: pointer; }
.gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb[aria-current="true"] { border-color: var(--green); }
.note-dialog__body .gallery__img { max-height: 60vh; }
