:root {
  /* Палитра проекта — 6 семейств цветов:
     чёрный, белый, красный, зелёный, оранжевый, серый.
     Все значения — HEX в верхнем регистре. */
  --red: #E53324;
  --red-dark: #A82014;
  --text: #000000;
  --text-2: #595959;
  --text-3: #9A9A9A;
  --line: #EBEBEB;
  --line-2: #F0F0F0;
  --bg: #FFFFFF;
  --bg-soft: #FAFAFA;
  --bg-soft-2: #F5F5F5;
  --bg-chip: #EBEBEB;
  --bg-card: #FAFAFA;
  --green: #5FA800;
  --orange: #E59B24;
  --graphite: #2B2B2B;
  --text-graphite: #5A5A5A;
  --footer: #2B2B2B;
  --rc: 'Roboto Condensed', 'Helvetica Neue', Arial, sans-serif;
  --ro: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  color: var(--text);
  font-family: var(--ro);
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; }

.h-logo-mark {
  font-family: var(--rc);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 21px;
  color: var(--text);
  line-height: 0.95;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}
.h-logo-mark::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

/* Header */
.site-header { display: contents; }
.top-strip {
  background: var(--line);
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  justify-content: space-between;
  font-family: var(--rc);
  font-weight: 500;
  font-size: 15px;
  color: #000000;
  letter-spacing: -0.02em;
}
.top-strip .city {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--rc);
  font-weight: 400;
  font-style: normal;
  font-size: 17px;
  line-height: 100%;
  letter-spacing: -0.02em;
  leading-trim: normal;
}
.top-strip .city::after {
  content: '';
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #000000;
}
.top-strip nav { display: flex; gap: 24px; align-items: center; }
.top-strip nav a {
  cursor: pointer;
  font-family: var(--rc);
  font-weight: 400;
  font-style: normal;
  font-size: 17px;
  line-height: 100%;
  letter-spacing: -0.02em;
  leading-trim: normal;
}
.top-strip nav a.phone { color: #E53324; font-weight: 500; }
.top-strip nav a.bold { font-weight: 700; }
.top-strip nav a:hover { color: #E53324; }

.header-main {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  position: sticky;
  top: 0;
  background: #FFFFFF;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  transition: padding .2s ease;
}
.header-main.compact { padding: 6px 32px; }
.header-main.compact a[aria-label="Печной Эксперт"] img {
  height: 38px;
  width: auto;
  transition: height .2s ease;
}
.header-main a[aria-label="Печной Эксперт"] img { transition: height .2s ease; }

/* Compact state: gently scale down right-side controls */
.header-main.compact .catalog-btn { height: 40px; padding: 0 18px; font-size: 16px; }
.header-main.compact .catalog-btn svg { width: 16px; height: 16px; }
.header-main.compact .search { height: 40px; }
.header-main.compact .search button.search-btn { width: 52px; height: 34px; padding: 6px 16px 6px 12px; border-radius: 6px 16px 16px 6px; }
.header-main.compact .nav-item { min-width: 60px; }
.header-main.compact .nav-item svg { width: 22px !important; height: 22px !important; }
.header-main.compact .nav-label { font-size: 13px; }
.header-main.compact .avatar-ring { width: 40px; height: 40px; }
.header-main.compact .nav-item .badge { min-width: 17px; height: 17px; font-size: 10px; top: -3px; right: 4px; padding: 0 5px; border-width: 1.5px; }
.header-main.compact .notif-badge { min-width: 17px; height: 17px; font-size: 10px; padding: 0 5px; top: -4px; right: -8px; border-width: 1.5px; }
.header-main .catalog-btn, .header-main .search, .header-main .search-btn,
.header-main .nav-item, .header-main .nav-item svg, .header-main .avatar-ring,
.header-main .nav-label,
.header-main .nav-item .badge, .header-main .notif-badge {
  transition: width .2s ease, height .2s ease, font-size .2s ease,
              padding .2s ease, min-width .2s ease, border-radius .2s ease,
              top .2s ease, right .2s ease;
}
.catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #FFFFFF;
  border-radius: 60px;
  padding: 0 24px 0 28px;
  height: 48px;
  font-family: var(--rc);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background .15s ease;
  white-space: nowrap;
}
.catalog-btn:hover { background: var(--red-dark); }
.catalog-btn svg { width: 18px; height: 18px; }
.catalog-btn .catalog-icon { width: 16px; height: 16px; color: currentColor; flex-shrink: 0; }

.search {
  flex: 1;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 60px;
  display: flex;
  align-items: center;
  padding: 0 6px 0 20px;
  background: #FFFFFF;
  gap: 12px;
  max-width: 680px;
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--text); }
.search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--rc);
  font-size: 16px;
  color: var(--text);
}
.search input::placeholder { color: var(--text-3); }
.search-clear {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-right: 10px;
  border: none;
  border-radius: 50%;
  background: #B3B3B3;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background .15s ease;
}
.search-clear:hover { background: #999999; }
.search-clear:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.header-main.compact .search-clear { width: 18px; height: 18px; margin-right: 8px; }
.search button.search-btn {
  width: 60px; height: 40px;
  padding: 8px 20px 8px 16px;
  gap: 10px;
  border-radius: 8px 20px 20px 8px;
  background: var(--red);
  color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
  opacity: 1;
}
.search button.search-btn:hover { background: var(--red-dark); }

.user-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.nav-item {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 72px; padding: 4px 6px;
  background: transparent; border: none; cursor: pointer;
  color: var(--text-graphite);
  font-family: var(--rc); font-size: 14px;
  position: relative;
  transition: color .15s;
  gap: 6px;
}
.nav-item:hover { color: var(--red); }
.nav-item .badge {
  position: absolute;
  top: -4px; right: 6px;
  min-width: 20px; height: 20px;
  border-radius: 999px;
  background: var(--red);
  color: #FFFFFF;
  font-family: var(--ro); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px;
  border: 2px solid #FFFFFF;
  box-sizing: content-box;
}
.nav-item.active { color: var(--red); }
.nav-label { font-size: 14px; color: var(--text-graphite); letter-spacing: -0.01em; }

.profile-btn {
  position: relative;
  background: transparent; border: none; cursor: pointer;
  margin-left: 8px;
  padding: 0;
}
.avatar-ring {
  display: inline-block; width: 48px; height: 48px; border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--red);
  padding: 0; box-sizing: border-box;
}
/* Если внутри только инициалы — кольцо превращается в сплошной круг без обводки,
   как аватары в разделе «Сотрудники». */
.avatar-ring:has(.avatar-initials) {
  background: transparent;
  border: none;
}
.avatar-img {
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
  width: 100%; height: 100%; border-radius: 50%;
}
/* Инициалы вместо иллюстрации — палитра и типографика совпадают с .emp-avatar в employees.html */
.avatar-initials {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: 50%;
  color: #FFFFFF;
  font-family: var(--rc);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  user-select: none;
}
.header-main.compact .avatar-initials { font-size: 14px; }
/* Аватар-инициалы — все варианты в одном сером семействе,
   чтобы соответствовать палитре «6 цветов». */
.avatar-initials.a0 { background: var(--graphite); }
/* Аватар в шапке — всегда светло-серый, независимо от случайного класса */
.profile-btn .avatar-initials { background: var(--line) !important; color: var(--text) !important; }
.avatar-initials.a1 { background: #4D4D4D; }
.avatar-initials.a2 { background: var(--text-graphite); }
.avatar-initials.a3 { background: #808080; }
.avatar-initials.a4 { background: #999999; }
.avatar-initials.a5 { background: #4D4D4D; }
.avatar-initials.a6 { background: var(--text-graphite); }
.notif-badge {
  position: absolute; top: -6px; right: -10px;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: var(--red); color: #FFFFFF;
  font-family: var(--ro); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #FFFFFF;
  box-sizing: content-box;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 16px 32px 0;
  font-family: var(--rc);
  font-size: 15px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-2); }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs .sep { color: var(--text-3); }
.breadcrumbs .current { color: var(--text); }

/* Page titles */
.page-title {
  font-family: var(--rc);
  font-weight: 500;
  font-size: 48px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  margin: 24px 32px 0;
  text-transform: uppercase;
}
.page-subtitle {
  margin: 8px 32px 0;
  font-family: var(--rc);
  font-size: 17px;
  color: var(--text-2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 32px;
  font-family: var(--rc);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.02em;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--red); color: #FFFFFF; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { background: var(--bg-soft-2); color: var(--text); }
.btn-ghost:hover { background: var(--line); }
.btn-outline { background: #FFFFFF; color: var(--text); border: 2px solid var(--line); }
.btn-outline:hover { border-color: var(--text); color: var(--text); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 15px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--rc);
  font-weight: 500;
  font-size: 13px;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1;
  height: 22px;
}
.badge-hit { background: var(--red); color: #FFFFFF; }
.badge-new { background: var(--red); color: #FFFFFF; }
.badge-sale { background: var(--red); color: #FFFFFF; }

/* Footer */
.site-footer { background: var(--footer); color: #FFFFFF; padding: 32px; margin-top: 64px; }
.site-footer .cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-bottom: 32px; }
.site-footer h4 { font-family: 'Roboto Condensed', var(--rc); font-weight: 500; font-size: 19px; line-height: 1.2; letter-spacing: 0; text-transform: uppercase; margin: 0 0 16px; }
.site-footer a { display: block; font-family: 'Roboto', var(--ro); font-weight: 400; font-size: 17px; line-height: 1.4; letter-spacing: 0; color: rgba(255,255,255,.7); margin-bottom: 10px; transition: color .15s; }
.site-footer a:hover { color: #FFFFFF; }
.site-footer .sub { border-top: 1px solid rgba(255,255,255,.12); margin-top: 16px; padding-top: 16px; font-size: 15px; color: rgba(255,255,255,.5); }

/* Container */
.container { padding: 0 32px; }

/* Site width control — 'fixed' constrains the whole page to 1440px, 'full' is default fluid width */
html[data-site-width="fixed"] body {
  background: var(--line);
}
html[data-site-width="fixed"] body > #root {
  display: block;
  max-width: 1440px;
  margin: 0 auto;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px var(--line-2);
  min-height: 100vh;
}
/* Sticky header has its own background; it should also stay constrained */
html[data-site-width="fixed"] .header-main {
  position: sticky;
}

/* =====================================================================
   Навигация по разделам личного кабинета (shared компонент SubNav)

   Горизонтальная полоса из 5 кнопок-дропдаунов:
     Продукт · Финансы · Логистика · Юридическое взаимодействие · Прочее
   По клику на кнопку открывается меню со ссылками. Кнопка группы,
   в которой лежит активный раздел, подсвечивается белой капсулой.
   Используется на страницах ЛК: orders, upd, reports, organizations,
   compare, cart, claims, employees, frequent, act, checkout, order.
   ===================================================================== */
.account-subnav {
  margin: 16px 32px 24px;
  display: inline-flex;
  align-items: center;
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 4px;
  gap: 2px;
  max-width: calc(100% - 64px);
  flex-wrap: wrap;
}
.account-subnav-group { position: relative; }
.account-subnav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rc);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 9px 14px 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.account-subnav-trigger:hover { color: var(--text); }
.account-subnav-trigger.on {
  background: #FFFFFF;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.account-subnav-group.open .account-subnav-trigger {
  background: #FFFFFF;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.account-subnav-chevron {
  transition: transform .15s ease;
  opacity: 0.7;
}
.account-subnav-group.open .account-subnav-chevron {
  transform: rotate(180deg);
}
.account-subnav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 220px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.account-subnav-menu a {
  display: block;
  font-family: var(--rc);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.account-subnav-menu a:hover {
  color: var(--text);
  background: var(--bg-soft);
}
.account-subnav-menu a.on {
  color: var(--text);
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}
