/* ============================================================
   CRM THEME — скін кабінету в стилі CONSULTANT CRM (B2B module)
   Підключається ПІСЛЯ main.css і dashboard.css.
   Хром (топбар + сайдбар) — власні класи .crm-*.
   Контент рескіниться через перевизначення токенів :root.
   ============================================================ */

:root {
  /* фірмовий синій CRM */
  --crm-blue: #1397d6;
  --crm-blue-rgb: 19, 151, 214;
  /* темний хром */
  --crm-dark: #000000;
  --crm-dark-2: #000000;
  --crm-text-dim: #97979a;
  --crm-red: #ff2d55;
  --crm-topbar-h: 60px;
  --crm-aside-w: 278px;

  /* перекраска токенів кабінету */
  --font-family: "AvenirNextCyr", sans-serif;
  --font-family2: "AvenirNextCyr", sans-serif;
  --font-family3: "AvenirNextCyr", sans-serif;
  --font-family4: "Roboto", sans-serif;
  --font-family5: "AvenirNextCyr", sans-serif;
  --font-family6: "AvenirNextCyr", sans-serif;
  --cl-c: 19, 151, 214;
  --cl-g: 19, 151, 214;
  --cl-k: 19, 151, 214;
  --cl-l: 19, 151, 214;
  --bg-d: 19, 151, 214;
  --bg-l: 19, 151, 214;
  --br-a: #1397d6;
  --br-d: #1397d6;
  --scrollbar-thumb: #1397d6;
  --body-bg: #f8f9fc;
}

html { scroll-padding-top: calc(var(--crm-topbar-h) + 10px); }

body {
  font-family: var(--font-family2);
  background: #f8f9fc;
  padding-top: var(--crm-topbar-h);
}

/* стара сітка main-inner резервувала колонку під старий сайдбар */
.main-inner,
.main-inner--mode {
  display: block;
  grid-template-columns: 100%;
}

/* ================= ТОПБАР ================= */
.crm-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--crm-topbar-h);
  z-index: 220;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: var(--crm-dark);
}
.crm-topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: calc(var(--crm-aside-w) - 18px);
}
.crm-topbar__logo { display: flex; align-items: center; }
.crm-topbar__logo img { width: auto; height: 30px; display: block; }
/* у топбарі: хлібні крихти після лого, праворуч — баланс, тариф і дзвіночок;
   заголовок сторінки — у білому pagehead нижче */
.crm-topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.crm-topbar .crm-wallet,
.crm-topbar .crm-bell { background: #fff; border-color: transparent; }
.crm-topbar .crm-wallet:hover,
.crm-topbar .crm-bell:hover { border-color: #fff; background: #f0f6fa; }

/* блок консультанта в топбарі (перенесений із сайдбара) */
.crm-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: 6px;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, .14);
}
.crm-user__ava { position: relative; flex: 0 0 auto; display: block; }
.crm-user__ava img {
  width: 38px; height: 38px; border-radius: 4px; object-fit: cover; display: block;
  border: 1px solid rgba(255, 255, 255, .18); transition: border-color .2s;
}
.crm-user__ava:hover img { border-color: #fff; }
.crm-user__dot {
  position: absolute; right: -3px; bottom: -3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #26c281; border: 2px solid var(--crm-dark, #000000);
}
.crm-user__info { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.crm-user__name {
  color: #fff; font-size: 13.5px; font-weight: 700; text-decoration: none;
  max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.crm-user__name:hover { color: #fff; text-decoration: underline; }
.crm-user__rating {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 1px;
  color: rgba(255, 255, 255, .68); font-size: 12px; text-decoration: none;
}
.crm-user__rating svg { width: 12px; height: 12px; fill: #ffc93c; flex: 0 0 auto; }
.crm-user__rating b { color: #fff; font-weight: 700; }
.crm-user__rating:hover { color: #fff; }
@media (max-width: 560px) { .crm-user { padding-left: 10px; } .crm-user__ava img { width: 34px; height: 34px; } }

/* сайдбар без профілю: меню починається одразу під шапкою */
.crm-aside__scroll > .crm-progress:first-child { border-top: 0; }

/* бургер (мобайл) */
.crm-burger {
  display: none;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.crm-burger:hover { background: rgba(255, 255, 255, .08); }
.crm-burger span,
.crm-burger span::before,
.crm-burger span::after {
  content: "";
  position: absolute;
  left: 9px;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: #fff;
  transition: transform .25s, opacity .2s, top .25s;
}
.crm-burger span { top: 18px; }
.crm-burger span::before { left: 0; top: -6px; }
.crm-burger span::after { left: 0; top: 6px; }
body.crm-menu-open .crm-burger span { background: transparent; }
body.crm-menu-open .crm-burger span::before { top: 0; transform: rotate(45deg); }
body.crm-menu-open .crm-burger span::after { top: 0; transform: rotate(-45deg); }

/* ================= САЙДБАР (темно-синій, під новачків) ================= */
:root {
  --nav-bg: #000000;
  --nav-bg-2: #000000;
  --nav-line: rgba(255, 255, 255, .10);
  --nav-text: #e6edf3;
  --nav-dim: #8fa8b8;
  --nav-bottom-h: 68px;
}

.crm-aside {
  position: fixed;
  top: var(--crm-topbar-h);
  left: 0;
  bottom: 0;
  width: var(--crm-aside-w);
  z-index: 210;
  display: flex;
  flex-direction: column;
  background: var(--nav-bg);
  border-right: none;
  font-family: var(--font-family2);
}
.crm-aside__scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.crm-aside__scroll::-webkit-scrollbar { width: 5px; }
.crm-aside__scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 3px; }

/* профіль */
.crm-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--nav-line);
}
.crm-profile__ava { position: relative; flex: 0 0 auto; }
.crm-profile__ava img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: block; }
.crm-profile__dot {
  position: absolute; right: -3px; bottom: -3px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #26c281; border: 2px solid var(--nav-bg);
}
.crm-profile__info { min-width: 0; }
.crm-profile__name {
  display: block; color: #fff; font-size: 14.5px; font-weight: 700; line-height: 1.25;
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.crm-profile__name:hover { color: #fff; text-decoration: underline; }
.crm-profile__rating {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 2px;
  color: var(--nav-dim); font-size: 12px; text-decoration: none;
}
.crm-profile__rating svg { width: 14px; height: 14px; fill: #ffc93c; }
.crm-profile__rating b { color: #fff; font-weight: 700; }
.crm-profile__rating:hover { color: #fff; }

/* прогрес заповнення профілю */
.crm-progress {
  display: block; margin: 10px 12px 6px; padding: 11px 13px;
  background: rgba(255, 255, 255, .07); border-radius: 8px; text-decoration: none; transition: background .2s;
}
.crm-progress:hover { background: rgba(255, 255, 255, .12); }
.crm-progress__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--nav-dim); }
.crm-progress__row b { color: #fff; font-size: 13px; }
.crm-progress__bar { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.crm-progress__bar span { display: block; height: 100%; border-radius: 3px; background: var(--crm-blue); }
.crm-progress__hint { display: block; margin-top: 7px; font-size: 12px; font-weight: 700; color: #4cc3f2; }

/* плашка реклами */
.crm-ad {
  display: block; margin: 8px 12px 14px; padding: 12px 13px; border-radius: 8px;
  background: rgba(19, 151, 214, .16); border: 1px solid rgba(76, 195, 242, .35);
  text-decoration: none; transition: background .2s;
}
.crm-ad:hover { background: rgba(19, 151, 214, .26); }
.crm-ad__title { display: block; color: #fff; font-size: 13.5px; font-weight: 700; }
.crm-ad__text { display: block; margin-top: 3px; color: var(--nav-dim); font-size: 11.5px; line-height: 1.45; }
.crm-ad__link { display: inline-block; margin-top: 7px; color: #4cc3f2; font-size: 12.5px; font-weight: 700; }

/* ================= МЕНЮ ================= */
.crm-menu { list-style: none; margin: 0; padding: 6px 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.crm-menu__link {
  display: flex; align-items: center; gap: 11px;
  width: 100%; min-height: 48px; padding: 0 12px;
  border: none; border-radius: 8px; background: transparent;
  color: var(--nav-text); font-family: inherit; font-size: 14.5px; font-weight: 600;
  text-align: left; text-decoration: none; cursor: pointer; position: relative;
  transition: background .18s;
}
.crm-menu__link:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.crm-menu__link > svg:first-child { width: 21px; height: 21px; flex: 0 0 auto; }
.crm-menu__label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-menu__badge {
  flex: 0 0 auto; min-width: 22px; padding: 2px 7px; border-radius: 1.25rem;
  background: var(--crm-red); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
}
.crm-menu__chev { width: 15px; height: 15px; flex: 0 0 auto; color: var(--nav-dim); transition: transform .25s; }
.crm-menu__item.is-open .crm-menu__chev { transform: rotate(180deg); }
.crm-menu__item.is-open > .crm-menu__link { background: rgba(255, 255, 255, .09); color: #fff; }

/* кольорові іконки розділів */
.crm-menu__link > svg:first-child { color: var(--ico, #8fa8b8); }
.ico-home    { --ico: #1397d6; }
.ico-profile { --ico: #8b7be8; }
.ico-find    { --ico: #ff7a29; }
.ico-clients { --ico: #00b4ce; }
.ico-services{ --ico: #c77dff; }
.ico-docs    { --ico: #5b6fe0; }
.ico-content { --ico: #ec5e9a; }
.ico-promo   { --ico: #ff5c7a; }
.ico-money   { --ico: #f0b429; }
.ico-rating  { --ico: #ffc93c; }
.ico-gift    { --ico: #67d3e8; }
.ico-bell    { --ico: #9db3c2; }

/* активний пункт — суцільна плашка */
.crm-menu__link.is-active { background: var(--crm-blue); color: #fff; font-weight: 700; }
.crm-menu__link.is-active > svg:first-child { color: #fff; --ico: #fff; }
.crm-menu__link.is-active .crm-menu__badge { background: rgba(255, 255, 255, .3); }
.crm-menu__link.is-active::before { display: none; }

/* підменю */
.crm-submenu-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.crm-menu__item.is-open .crm-submenu-wrap { grid-template-rows: 1fr; }
.crm-submenu { list-style: none; margin: 2px 0 6px; padding: 0 0 0 33px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.crm-submenu__link {
  display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 13px;
  border-radius: 8px; color: #b9cbd8; font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background .18s, color .18s;
}
.crm-submenu__link:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.crm-submenu__link.is-active { background: var(--crm-blue); color: #fff; font-weight: 700; }
.crm-submenu__badge {
  margin-left: auto; min-width: 22px; padding: 2px 7px; border-radius: 1.25rem;
  background: var(--crm-red); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
}
.crm-submenu__link.is-active .crm-submenu__badge { background: rgba(255, 255, 255, .3); }

/* низ сайдбара: службові пункти + допомога */
.crm-aside__bottom { border-top: 1px solid var(--nav-line); padding: 10px 12px 14px; background: var(--nav-bg-2); }
.crm-aside__extra { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.crm-aside__extra a {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 11px;
  border-radius: 8px; color: #b9cbd8; font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.crm-aside__extra a:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.crm-aside__extra a.is-active { background: var(--crm-blue); color: #fff; }
.crm-aside__extra svg { width: 18px; height: 18px; color: var(--ico, #9db3c2); }
.crm-aside__extra a.is-active svg { --ico: #fff; color: #fff; }
.crm-help { background: rgba(255, 255, 255, .07); border-radius: 8px; padding: 13px; }
.crm-help b { display: block; color: #fff; font-size: 13.5px; margin-bottom: 4px; }
.crm-help span { display: block; color: var(--nav-dim); font-size: 11.5px; line-height: 1.5; }
.crm-help__call {
  display: block; margin-top: 10px; padding: 11px; border-radius: 8px;
  background: var(--crm-blue); color: #fff; font-size: 13.5px; font-weight: 700;
  text-align: center; text-decoration: none;
}
.crm-help__call:hover { background: #1187c0; color: #fff; }
.crm-aside__pretitle, .crm-aside__contact { display: none; }

/* ================= НИЖНЄ МЕНЮ (телефон) ================= */
.crm-tabbar { display: none; }
.crm-sheet { display: none; }

@media (max-width: 760px) {
  body { padding-bottom: var(--nav-bottom-h); }

  .crm-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 240;
    display: flex; padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-top: 1px solid #e5e5ea; box-shadow: 0 -3px 14px rgba(15, 25, 35, .08);
  }
  .crm-tab {
    position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 2px 4px; border: 0; background: none; cursor: pointer;
    color: #686868; font-family: inherit; text-decoration: none;
  }
  .crm-tab svg { width: 23px; height: 23px; color: currentColor; }
  .crm-tab__lbl { font-size: 11px; font-weight: 700; }
  .crm-tab svg { transition: transform .18s; }
  .crm-tab__lbl { color: #686868; }
  .crm-tab.is-active .crm-tab__lbl { color: var(--ico-lbl, var(--crm-blue)); font-weight: 750; }
  .crm-tab.is-active svg { transform: scale(1.08); }
  .crm-tab.is-active::after {
    content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
    width: 44px; height: 30px; border-radius: 999px; background: currentColor; opacity: .12; z-index: -1;
  }
  .crm-tab { z-index: 0; }
  .crm-tab:nth-child(1) { color: #1397d6; }
  .crm-tab:nth-child(2) { color: #ff7a29; }
  .crm-tab:nth-child(3) { color: #00b4ce; }
  .crm-tab:nth-child(4) { color: #f0b429; }
  .crm-tab:nth-child(5) { color: #686868; }
  .crm-tab:nth-child(1).is-active .crm-tab__lbl { color: #1397d6; }
  .crm-tab:nth-child(2).is-active .crm-tab__lbl { color: #d95f14; }
  .crm-tab:nth-child(3).is-active .crm-tab__lbl { color: #00889b; }
  .crm-tab:nth-child(4).is-active .crm-tab__lbl { color: #b8830c; }
  .crm-tab:nth-child(5).is-active .crm-tab__lbl { color: #2c2c2c; }
  .crm-tab__badge {
    position: absolute; top: 1px; right: 22%;
    min-width: 18px; padding: 1px 5px; border-radius: 999px;
    background: var(--crm-red); border: 2px solid #fff;
    color: #fff; font-size: 9.5px; font-weight: 700; line-height: 13px; text-align: center;
  }

  /* екран «Ще» */
  .crm-sheet {
    position: fixed; inset: var(--crm-topbar-h) 0 0; z-index: 235;
    display: flex; flex-direction: column; background: #f8f9fc;
    transform: translateY(100%); transition: transform .28s ease; visibility: hidden;
  }
  body.crm-sheet-open .crm-sheet { transform: none; visibility: visible; }
  body.crm-sheet-open { overflow: hidden; }
  .crm-sheet__head { display: flex; align-items: center; height: 52px; padding: 0 16px; background: var(--nav-bg); color: #fff; }
  .crm-sheet__head b { font-size: 16.5px; }
  .crm-sheet__close { margin-left: auto; border: 0; background: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
  .crm-sheet__scroll { flex: 1; overflow-y: auto; padding: 12px 14px calc(var(--nav-bottom-h) + 20px); }
  .crm-sheet__cap { color: #9aa0a8; font-size: 11px; font-weight: 750; letter-spacing: .08em; margin: 14px 4px 7px; text-transform: uppercase; }
  .crm-sheet__row {
    display: flex; align-items: center; gap: 12px; min-height: 60px; margin-bottom: 8px; padding: 0 14px;
    background: #fff; border: 1px solid #e6e9ee; border-radius: 10px; text-decoration: none; color: #2c2c2c;
  }
  .crm-sheet__row svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--ico, #686868); }
  .crm-sheet__row b { display: block; font-size: 14.5px; font-weight: 700; }
  .crm-sheet__row small { display: block; color: #686868; font-size: 11.5px; }
  .crm-sheet__row .arr { margin-left: auto; color: #b6b9c0; font-size: 18px; }
  .crm-sheet .crm-help { background: var(--nav-bg); margin-top: 14px; }

  /* бічне меню на телефоні не потрібне */
  .crm-aside { display: none !important; }
  .crm-burger { display: none !important; }
  .crm-overlay { display: none !important; }
}

/* ================= КОНТЕНТ ПІД ХРОМ ================= */
@media (min-width: 1024px) {
  body { padding-left: var(--crm-aside-w); }
}
/* повітря навколо контенту на БУДЬ-ЯКІЙ ширині
   (перебиваємо старі #app-правила з dashboard.css, у т.ч.
    #app .main-inner{padding-top:0} — ID-селектор) */
#app .main-inner,
main .main-inner { padding-top: 24px; }
#app .main-inner__container,
main .main-inner__container { padding-top: 0; }
main .container { padding-left: 32px; padding-right: 32px; }
#app .container--big,
main .container:not(.container--mode):not(.container--big) { padding-left: 32px; }
footer.cabf { padding-left: 32px; padding-right: 32px; }

/* компактний правовий футер кабінету */
.crm-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  margin-top: 34px;
  padding: 16px 32px 22px;
  border-top: 1px solid var(--u-border);
  color: var(--u-muted);
  font-size: 12px;
}
.crm-footer__links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.crm-footer a { color: var(--u-muted); text-decoration: none; }
.crm-footer a:hover { color: var(--crm-blue); text-decoration: underline; }
.crm-footer__pay { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.crm-footer__pay span {
  display: flex;
  align-items: center;
  background: var(--crm-dark);
  border-radius: 4px;
  padding: 4px 8px;
}
.crm-footer__pay img { height: 16px; width: auto; display: block; }
@media (max-width: 1023px) { .crm-footer { padding: 14px 16px 20px; } }
@media (max-width: 1023px) {
  main .container { padding-left: 16px; padding-right: 16px; }
  #app .container--big,
  main .container:not(.container--mode):not(.container--big) { padding-left: 16px; }
  footer.cabf { padding-left: 16px; padding-right: 16px; }
}
/* сторінки без хрому (index, екран без підписки) */
body:not(:has(.crm-aside)) { padding-left: 0; }
body:not(:has(.crm-topbar)) { padding-top: 0; }
/* без сайдбара бургер і оверлей не потрібні (мертвий контрол) */
body:not(:has(.crm-aside)) .crm-burger,
body:not(:has(.crm-aside)) .crm-overlay { display: none !important; }

/* ---- z-шкала: оверлеї та дровери старого CSS мають лежати НАД хромом
   (топбар 220 / сайдбар 210); відносний порядок оригіналу збережено ---- */
.lead-drawer-backdrop { z-index: 290; }
.lead-drawer { z-index: 300; }
.chat-modal { z-index: 310; }
.filter-modal, .call-modal { z-index: 400; }
.funds-modal { z-index: 410; }

/* захардкожений старий синій у dashboard.css */
.chat-modal__call-btn:hover { background: rgba(19, 151, 214, .12); }
.crm-status-select__opt.is-active { background: rgba(19, 151, 214, .08); }

/* rating-сторінки (glassupply.css): секції з літеральним Avenir → Open Sans */
.map-section, .map-section *,
.call-trigger-modal, .call-trigger-modal *,
.cookies-text__title, .cookies-text__description,
.cookies-buttons .cookies-button,
.feedback-form, .feedback-form * {
  font-family: var(--font-family2) !important;
}

/* ============================================================
   ШАР УНІФІКАЦІЇ КОМПОНЕНТІВ
   Один вигляд для повторюваних елементів на всіх сторінках:
   тулбар, пошук, інпути, кнопки, дропдауни, чипи, пагінація.
   ============================================================ */
:root {
  --u-ctrl-h: 38px;
  --u-border: #e5e5ea;
  --u-card-shadow: 0 1px 4px rgba(15, 25, 35, .08);
  --u-blue-hover: #1187c0;
  --u-ink: #2c2c2c;
  --u-muted: #686868;
}

/* ---- опис сторінки над тулбаром ---- */
.page-intro {
  color: var(--u-muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 860px;
  margin: 0 0 14px;
}
.page-intro b { color: var(--u-ink); font-weight: 600; }
.page-intro--center { margin-left: auto; margin-right: auto; }

/* ---- тулбар списочних сторінок (колишній .topbar без табів) ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--u-border);
  border-radius: 6px;
  box-shadow: var(--u-card-shadow);
  padding: 8px 10px;
  margin-bottom: 14px;
}
.topbar__spacer { display: block; flex: 1; }
@media (max-width: 760px) { .topbar__spacer { display: none; } }
/* живий пошук у тулбарі списочних сторінок */
.topbar .page-search { flex: 1 1 220px; max-width: 460px; }
.crm-search-note {
  color: var(--u-muted);
  font-size: 14px;
  padding: 26px 4px;
  text-align: center;
}

/* ---- шапка сторінки з пошуком (.page-head) — той самий білий бар ---- */
.page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--u-border);
  border-radius: 6px;
  box-shadow: var(--u-card-shadow);
  padding: 8px 10px;
  margin-bottom: 14px;
}
.page-head > h1, .page-head > h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--u-ink);
  margin: 0 6px 0 4px;
}
.page-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 460px;
  height: var(--u-ctrl-h);
  background: #fff;
  border: 1px solid var(--u-border);
  border-radius: 4px;
  overflow: hidden;
}
.page-search:focus-within {
  border-color: var(--crm-blue);
  box-shadow: 0 0 0 3px rgba(19, 151, 214, .15);
}
.page-search__input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--u-ink);
  background: transparent;
}
.page-search__btn {
  width: 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--u-muted);
  cursor: pointer;
}
.page-search__btn:hover { color: var(--crm-blue); }

/* ---- кнопки тулбара (Збережені / Фільтри) ---- */
.topbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--u-ctrl-h);
  padding: 0 14px;
  border: 1px solid var(--u-border);
  border-radius: 4px;
  background: #fff;
  color: var(--u-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.topbar__btn:hover { border-color: var(--crm-blue); color: var(--crm-blue); }
.topbar__btn--primary {
  background: rgba(var(--crm-blue-rgb), 1);
  border-color: rgba(var(--crm-blue-rgb), 1);
  color: #fff;
}
.topbar__btn--primary:hover { background: var(--u-blue-hover); border-color: var(--u-blue-hover); color: #fff; }

/* ---- єдина геометрія текстових інпутів і textarea ---- */
.inp, .bl-input, .sp-input, .pp-input, .dc-input, .txt, .ms-inp,
.filter-search, .pub-search__input, .int-add__input, .bl-topup__input,
.dc-mail__input, .dc-ref-form__input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--u-border);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--u-ink);
  transition: border-color .15s, box-shadow .15s;
}
.sp-textarea, .pp-editor__area, .reply-textarea {
  padding: 10px 12px;
  border: 1px solid var(--u-border);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--u-ink);
  transition: border-color .15s, box-shadow .15s;
}
.inp:focus, .bl-input:focus, .sp-input:focus, .pp-input:focus, .dc-input:focus,
.txt:focus, .ms-inp:focus, .filter-search:focus, .pub-search__input:focus,
.int-add__input:focus, .bl-topup__input:focus, .dc-mail__input:focus,
.dc-ref-form__input:focus, .sp-textarea:focus, .pp-editor__area:focus,
.reply-textarea:focus {
  outline: none;
  border-color: var(--crm-blue);
  box-shadow: 0 0 0 3px rgba(19, 151, 214, .15);
}

/* ---- єдина геометрія кнопок ---- */
.buy-btn, .pub-btn, .btn-ghost, .btn-secondary, .sp-cat-btn, .ms-btn,
.av-btn-primary, .dc-share__btn, .dc-upload__btn, .sp-upload__btn,
.pp-upload__btn, .qc-seg__btn, .plan__cta, .planv8-run,
.gate-return__cta, .gate-paid__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.buy-btn, .btn-ghost, .btn-secondary, .ms-btn, .av-btn-primary { min-height: var(--u-ctrl-h); }
/* filled-сині */
.buy-btn, .pub-btn--primary, .av-btn-primary {
  background: rgba(var(--crm-blue-rgb), 1);
  color: #fff;
  border: none;
}
.buy-btn:hover, .pub-btn--primary:hover, .av-btn-primary:hover {
  background: var(--u-blue-hover);
}
/* ghost-контурні */
.btn-ghost, .btn-secondary, .pub-btn--ghost {
  background: #fff;
  border: 1px solid var(--u-border);
  color: var(--u-ink);
}
.btn-ghost:hover, .btn-secondary:hover, .pub-btn--ghost:hover {
  border-color: var(--crm-blue);
  color: var(--crm-blue);
  background: #fff;
}
/* текстові лінки-кнопки */
.btn-link {
  background: none;
  border: none;
  color: var(--crm-blue);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.btn-link:hover { text-decoration: underline; }

/* ---- дропдауни фільтрів ---- */
.filter-dd__btn {
  height: var(--u-ctrl-h);
  border: 1px solid var(--u-border);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: var(--u-ink);
}
.filter-dd.is-open .filter-dd__btn,
.filter-dd__btn:hover { border-color: var(--crm-blue); }

/* ---- чипи активних фільтрів ---- */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(var(--crm-blue-rgb), .1);
  border: 1px solid rgba(var(--crm-blue-rgb), .25);
  color: #04709c;
  font-size: 12.5px;
  font-weight: 600;
}
.filter-chip--active { background: rgba(var(--crm-blue-rgb), .16); }

/* ---- пагінація ---- */
.page-nav { display: flex; gap: 6px; justify-content: center; padding: 18px 0 6px; }
.page-nav__link {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--u-border);
  border-radius: 4px;
  background: #fff;
  color: var(--u-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
a.page-nav__link:hover { border-color: var(--crm-blue); color: var(--crm-blue); }
.page-nav__link.active {
  background: rgba(var(--crm-blue-rgb), 1);
  border-color: rgba(var(--crm-blue-rgb), 1);
  color: #fff;
}
.page-nav .disabled .page-nav__link:not(.active) { opacity: .45; }

/* ---- заголовки секцій ---- */
.order-section__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--u-ink);
}

/* ---- єдиний вигляд статус-чипів (швидкі фільтри за станом) ---- */
.seg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.seg-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--u-border);
  border-radius: 999px;
  background: #fff;
  color: var(--u-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.seg-tab:hover { border-color: var(--crm-blue); color: var(--crm-blue); }
.seg-tab.is-on {
  background: rgba(var(--crm-blue-rgb), .12);
  border-color: rgba(var(--crm-blue-rgb), .45);
  color: #04709c;
}

/* ---- бар фільтрів публікацій = канонічний білий бар ---- */
.pub-filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--u-border);
  border-radius: 6px;
  box-shadow: var(--u-card-shadow);
  padding: 8px 10px;
  margin-bottom: 14px;
}
.pub-filterbar__spacer { flex: 1; }
.pub-search__input {
  height: var(--u-ctrl-h);
  border: 1px solid var(--u-border);
  border-radius: 4px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--u-ink);
  min-width: 240px;
}
.pub-search__input:focus {
  outline: none;
  border-color: var(--crm-blue);
  box-shadow: 0 0 0 3px rgba(19, 151, 214, .15);
}

/* картка ліда: інфо-список на світлій панелі був білим текстом старого сайдбара */
.lead-detail__side .aside-nav__link { color: var(--u-muted); }
.lead-detail__side .aside-nav__link:hover { color: var(--u-ink); }

/* баланс: стрілки слайдера реклами позиціоновані відносно 100vw і висять поза сіткою */
.balance-slider__next, .balance-slider__prev { display: none !important; }

/* ---- єдиний рядок-картка списків (послуги, документи, відхилені) ---- */
.crm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.crm-row {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--u-border); border-radius: 6px;
  box-shadow: var(--u-card-shadow); padding: 12px 16px;
}
.crm-row__thumb { width: 56px; height: 42px; border-radius: 4px; object-fit: cover; flex: 0 0 auto; background: #eef2f5; }
.crm-row__doc {
  width: 42px; height: 42px; border-radius: 6px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(19, 151, 214, .1); color: var(--crm-blue);
}
.crm-row__doc svg { width: 20px; height: 20px; }
.crm-row__main { flex: 1; min-width: 0; }
.crm-row__title { font-size: 14.5px; font-weight: 700; color: var(--u-ink); margin: 0 0 4px; }
.crm-row__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--u-muted); align-items: center; }
.crm-row__reason { margin-top: 5px; font-size: 12.5px; color: #b3123a; }
.crm-row__actions { display: flex; gap: 8px; flex: 0 0 auto; align-items: center; }
.crm-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.crm-chip--blue { background: rgba(19, 151, 214, .12); color: #04709c; }
.crm-chip--amber { background: rgba(231, 160, 23, .16); color: #8a5b00; }
.crm-chip--gray { background: #f2f2f2; color: #2c2c2c; }
.crm-chip--red { background: rgba(255, 45, 85, .1); color: #b3123a; }
@media (max-width: 700px) {
  .crm-row { flex-wrap: wrap; }
  .crm-row__actions { width: 100%; justify-content: flex-end; }
}

/* ---- порожні стани ---- */
.empty-state[hidden] { display: none !important; }
.empty-state__hint {
  color: var(--u-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 6px auto 12px;
  max-width: 440px;
}

/* останній елемент бара (лінк-дія, чип) — праворуч; пошук лишається зліва */
.page-head__spacer { flex: 1; }
.page-head > *:last-child:not(.page-search):not(h1):not(h2) { margin-left: auto; }

/* прибрати старі елементи, якщо десь лишились */
.aside-menu, .mobile-menu { display: none !important; }

/* картки й кнопки — радіуси CRM */
.lead-card,
.pub-card,
.price-card__box,
.question-card,
.doc-card,
.service-card {
  border-radius: 6px;
}
.buy-btn,
.pub-btn,
.btn-ghost,
.price-card__btn,
.sp-cat-btn {
  border-radius: 4px;
}

/* мобайл */
@media (max-width: 1023px) {
  .crm-burger { display: block; }
  .crm-topbar__left { min-width: 0; }
  .crm-aside {
    transform: translateX(-100%);
    transition: transform .3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  }
  body.crm-menu-open .crm-aside { transform: translateX(0); }
  .crm-overlay {
    position: fixed;
    inset: var(--crm-topbar-h) 0 0 0;
    z-index: 205;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }
  body.crm-menu-open .crm-overlay { opacity: 1; pointer-events: auto; }
  body.crm-menu-open { overflow: hidden; }
}
@media (max-width: 560px) {
  .crm-topbar { padding: 0 10px; }
  .crm-topbar__logo img { height: 24px; }
}

/* ================= PAGEHEAD: білий бар — заголовок + крихти + баланс/план/дзвіночок ================= */
.crm-pagehead {
  position: relative;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 0 0 18px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--u-border, #e5e5ea);
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(15, 25, 35, .06);
}
.crm-pagehead__left { min-width: 0; }
.crm-pagehead__title {
  margin: 0;
  color: var(--u-ink, #2c2c2c);
  font-family: var(--font-family2);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
}
.crm-crumbs a { color: var(--u-muted, #686868); text-decoration: none; }
.crm-crumbs a:hover { color: var(--crm-blue); text-decoration: underline; }
.crm-crumbs__sep { color: #c3c5cb; }
.crm-crumbs__cur { color: var(--crm-blue); overflow: hidden; text-overflow: ellipsis; }
.crm-pagehead__right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.crm-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--u-border, #e5e5ea);
  border-radius: 4px;
  background: #f8f9fa;
  color: var(--u-ink, #2c2c2c);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s, background .2s;
}
.crm-wallet:hover { border-color: var(--crm-blue); background: #fff; }
.crm-wallet svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; }
.crm-plan {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 4px;
  background: var(--crm-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .03em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.crm-plan:hover { background: #1187c0; color: #fff; }
.crm-plan svg { width: 15px; height: 15px; fill: currentColor; }
.crm-bellwrap { position: relative; flex: 0 0 auto; }
.crm-bell {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--u-border, #e5e5ea);
  border-radius: 4px;
  background: #fff;
  color: var(--u-ink, #2c2c2c);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.crm-bell:hover { border-color: var(--crm-blue); color: var(--crm-blue); }
.crm-bell svg { width: 19px; height: 19px; fill: none; stroke: currentColor; }
.crm-bell__badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--crm-red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.crm-bell__badge[hidden] { display: none; }

/* дропдаун сповіщень */
.crm-notify {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--u-border, #e5e5ea);
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 400;
}
.crm-notify.is-open { opacity: 1; transform: none; pointer-events: auto; }
.crm-notify__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--u-border, #e5e5ea);
}
.crm-notify__title { font-size: 14px; font-weight: 750; color: var(--u-ink, #2c2c2c); }
.crm-notify__mark {
  border: none;
  background: none;
  padding: 0;
  color: var(--crm-blue);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.crm-notify__mark:hover { text-decoration: underline; }
.crm-notify__list { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.crm-notify__item a {
  display: flex;
  gap: 10px;
  padding: 11px 16px;
  text-decoration: none;
  transition: background .15s;
}
.crm-notify__item + .crm-notify__item a { border-top: 1px solid #f0f1f3; }
.crm-notify__item a:hover { background: #f5f9fc; }
.crm-notify__dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #d6d8dd; }
.crm-notify__item.is-unread .crm-notify__dot { background: var(--crm-blue); }
.crm-notify__text { font-size: 13px; line-height: 1.45; color: var(--u-ink, #2c2c2c); font-weight: 400; }
.crm-notify__item.is-unread .crm-notify__text { font-weight: 600; }
.crm-notify__time { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 400; color: var(--u-muted, #686868); }
.crm-notify__foot { padding: 10px 16px; border-top: 1px solid var(--u-border, #e5e5ea); text-align: center; }
.crm-notify__foot a { color: var(--crm-blue); font-size: 13px; font-weight: 600; text-decoration: none; }
.crm-notify__foot a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .crm-pagehead { padding: 12px 14px; }
  .crm-pagehead__title { white-space: normal; }
  .crm-wallet { font-size: 13px; padding: 0 10px; }
  .crm-plan { padding: 0 10px; }
}

@media (max-width: 560px) {
  .crm-notify { position: fixed; top: calc(var(--crm-topbar-h) + 6px); right: 8px; left: 8px; width: auto; }
}

/* футер картки — колонка: вміст притиснутий ліворуч (кнопки самі тягнуться на всю ширину) */
.order-list .lead-card__footer { align-items: stretch; }
.order-list .lead-card__tags { justify-content: flex-start; }

/* ============================================================
   LC — нова єдина лід-картка (Купити ліди / Прямі звернення /
   Питання клієнтів / Мої відповіді / Мої клієнти).
   Розмітка: .lc замінює .main-order усередині .order-list__item.
   ============================================================ */
.order-list__item .lc {
  background: #fff;
  border: 1px solid #e9ebee;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(15, 25, 35, .06);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}
.order-list__item:hover .lc { box-shadow: 0 6px 18px rgba(6, 32, 44, .13); transform: translateY(-1px); }

.lc__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.lc__head-l { display: flex; align-items: center; gap: 6px; min-width: 0; }

.lc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  flex: 0 0 auto;
}
.lc-chip--cat { background: rgba(19, 151, 214, .1); color: #04709c; flex: 0 1 auto; min-width: 0; overflow: hidden; }
.lc-chip--cat span { overflow: hidden; text-overflow: ellipsis; }
.lc-chip--check { background: rgba(19, 151, 214, .1); color: #04709c; }
.lc-chip--sum { background: var(--crm-blue); color: #fff; }
.lc-chip--timer { background: rgba(231, 160, 23, .16); color: #8a5b00; font-variant-numeric: tabular-nums; }
.lc-chip--closed { background: #f2f2f2; color: #2c2c2c; }
.lc__time { color: #686868; font-size: 11.5px; white-space: nowrap; flex: 0 0 auto; }

/* статус-капсула CRM: ті самі класи, що переписує main.js, — новий вигляд */
.lc .lead-card__status {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  text-transform: none; letter-spacing: 0;
  animation: none; box-shadow: none;
}
.lc .lead-card__status--new { background: rgba(255, 45, 85, .1); color: #b3123a; }
.lc .lead-card__status--new::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff2d55; animation: lcPulse 1.6s infinite; }
@keyframes lcPulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }
.lc .lead-card__status--working { background: rgba(19, 151, 214, .12); color: #04709c; }
.lc .lead-card__status--waiting { background: rgba(231, 160, 23, .16); color: #8a5b00; }
.lc .lead-card__status--closed { background: #f2f2f2; color: #2c2c2c; }

.lc__title {
  font-size: 14.5px; font-weight: 700; line-height: 1.32; color: var(--u-ink, #2c2c2c);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(2 * 1.32em);
  margin: 0;
}
.lc__desc {
  font-size: 12.5px; line-height: 1.5; color: var(--u-muted, #686868);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(2 * 1.5em);
  margin: 0;
}

/* акцентні блоки */
.lc__quote { background: rgba(19, 151, 214, .06); border-left: 3px solid var(--crm-blue); border-radius: 0 4px 4px 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.lc__quote-label { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #04709c; }
.lc__quote p { font-size: 12.5px; line-height: 1.5; color: var(--u-ink, #2c2c2c); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.lc__quote-svc { font-size: 11.5px; color: var(--u-muted, #686868); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc__quote-svc b { color: #04709c; font-weight: 600; }

.lc__lock { display: flex; align-items: center; gap: 8px; background: #f5f6f8; border-radius: 4px; padding: 8px 11px; font-size: 12px; color: #686868; line-height: 1.4; }
.lc__lock svg { flex: 0 0 auto; width: 14px; height: 14px; stroke: #cccccc; fill: none; stroke-width: 2; }

/* контакти після взяття ліда (Прямі звернення) */
.lc .dir-contacts { border: 1px solid #e5e5ea; border-radius: 4px; padding: 10px 12px; }

.lc__answers { display: flex; align-items: center; gap: 8px; }
.lc__avastack { display: flex; }
.lc__ava { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: #e8ebee; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lc__ava + .lc__ava { margin-left: -7px; }
.lc__ava svg { width: 12px; height: 12px; fill: #aeb4bc; }
.lc__ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc__answers > span:last-child { font-size: 12px; color: var(--u-muted, #686868); }
.lc__answers b { color: var(--u-ink, #2c2c2c); font-weight: 600; }

/* мета-рядок: місто · джерело · телефон · час */
.lc__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; font-size: 12px; color: #686868; margin-top: auto; }
.lc__meta svg { width: 12px; height: 12px; fill: none; stroke: #aeb4bc; stroke-width: 1.8; flex: 0 0 auto; }
.lc__meta b { color: #2c2c2c; font-weight: 600; }
.lc__meta .lc-sep { color: #c9ccd1; }

/* дії: все по 38px */
.lc__act { display: flex; gap: 8px; }
.lc__act .buy-wrap { flex: 1 1 0; display: flex; margin: 0; }
.lc__act .buy-wrap > * { flex: 1 1 0; }
.lc__act .buy-btn,
.lc__act .btn-secondary,
.lc__act .lr-state,
.lc__act .dir-cc {
  flex: 1 1 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px !important; height: 38px;
  padding: 0 14px !important;
  border-radius: 4px;
  font-size: 13.5px !important; font-weight: 700;
  text-transform: none;
  width: auto;
  margin: 0;
}
.lc__act .buy-btn { background: var(--crm-blue); color: #fff; border: none; }
.lc__act .buy-btn:hover { background: #1187c0; }
.lc__act .buy-btn .buy-btn__sep { opacity: .55; font-weight: 400; }
.lc__act .buy-btn.is-lr-reserved { background: rgba(231, 160, 23, .9); color: #2c2c2c; }
.lc__act .btn-secondary { background: #fff; border: 1px solid #d7dade; color: var(--u-ink, #2c2c2c); }
.lc__act .btn-secondary:hover { background: #f5f9fc; border-color: var(--crm-blue); color: var(--crm-blue); }
.lc__act .lr-state { background: rgba(204, 204, 204, .35); color: #2c2c2c; font-weight: 600; }
.lc__act .lr-state--reserved { background: rgba(231, 160, 23, .16); color: #8a5b00; }
.lc__act .dir-cc { background: #f2f2f2; color: #2c2c2c; font-weight: 600; }
.lc__act svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

.lc__act:empty { display: none; }

/* джерело трафіку: кольорова точка + сірий текст (без райдужного тексту) */
.lc-src { display: inline-flex; align-items: center; gap: 5px; }
.lc-src i { width: 7px; height: 7px; border-radius: 50%; background: #cccccc; flex: 0 0 auto; }
.lc-src--google i { background: #1a73e8; }
.lc-src--meta i { background: #1877f2; }
.lc-src--instagram i { background: #e4405f; }
.lc-src--seo i { background: #7b61c4; }
.lc-src--app i { background: #0aa2c0; }
.lc-src--googleads i { background: #c9860b; }
.lc-src--tiktok i { background: #2c2c2c; }
.lc-src--website i { background: #2c2c2c; }
.lc-src--email i { background: #8a5b00; }
.lc-src--referral i { background: #ff6b35; }
.lc-src--content i { background: #b3123a; }
.lc-src--callcenter i { background: #e7a017; }

/* кваліфікований (передплачений) лід — золота мітка + мʼяка золота рамка картки */
.lc-chip--check { background: rgba(231, 160, 23, .16); color: #8a5b00; cursor: help; }
.lc-chip--check .lc-star { color: #e7a017; }
.order-list__item[data-badges="prepaid"] .lc { border-color: rgba(231, 160, 23, .55); }

/* кваліфікований лід: позначка в мета-рядку замість джерела, золота */
.lc-src--qualified { color: #8a5b00; font-weight: 600; cursor: help; }
.lc-src--qualified .lc-star { color: #e7a017; font-size: 12px; line-height: 1; }

/* pagehead: хлібні крихти замість заголовка; кнопки дій праворуч */
.crm-pagehead { min-height: 66px; }
.crm-crumbs--page { margin: 0; font-size: 13.5px; gap: 8px; min-width: 0; }
.crm-crumbs--page a { color: var(--u-muted, #686868); }
.crm-crumbs--page a:hover { color: var(--crm-blue); }
.crm-crumbs--page .crm-crumbs__cur {
  color: var(--u-ink, #2c2c2c);
  font-family: var(--font-family2);
  font-size: 17px;
  font-weight: 750;
  white-space: normal;
}
.crm-pagehead .topbar__btn { margin: 0; }

/* тулбари, від яких лишилися тільки приховані таби для JS */
section.topbar[hidden] { display: none !important; }

/* лічильники-бейджі: нижчі, компактні, цифра строго по центру */
.topbar__count,
.topbar__count--badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  font-size: 10px;
  line-height: 1;
}
.crm-bell__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 1;
}

/* вкладки другорядних сторінок усередині розділу */
.seg-tabs[data-page-tabs] { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.seg-tabs[data-page-tabs] .seg-tab {
  display: inline-flex; align-items: center; height: 38px; padding: 0 16px;
  border: 1px solid var(--u-border, #e5e5ea); border-radius: 1.25rem; background: #fff;
  color: var(--u-ink, #2c2c2c); font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.seg-tabs[data-page-tabs] .seg-tab:hover { border-color: var(--crm-blue); color: var(--crm-blue); }
.seg-tabs[data-page-tabs] .seg-tab.is-on { background: var(--crm-blue); border-color: var(--crm-blue); color: #fff; font-weight: 700; }

/* пари кнопок в один ряд: однакова висота (flex-stretch), текст усередині по центру */
.pe-ava__btns, .pe-actions, .form-actions, .funds-modal__actions { align-items: stretch; }

/* ============================================================
   ШАР УЗГОДЖЕНОСТІ (останній): зводить компоненти трьох поколінь
   (сайтові main-*, проміжні sp-/bl-/dc-/pp-, нові crm-/pe-/lc-)
   до однієї геометрії. Правити тут, а не в пер-сторінкових стилях.
   ============================================================ */

/* --- Картки: радіус 6, рамка 1px, однакова тінь --- */body .pe-card,
body .db-card,
body .crm-row,
body .rating-boost,
body .bl-card,
body .bl-stat,
body .bl-tblwrap,
body .bl-method,
body .sp-card,
body .sp-rules__card,
body .sp-row,
body .dc-card,
body .dc-rules__card,
body .dc-row,
body .pp-card,
body .pp-rules__card,
body .ms-card,
body .av-card,
body .rt-card,
body .main-rating,
body .main-top {
  border: 1px solid #e5e5ea;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(16, 41, 58, .05);
}

/* дрібні рядки-картки — компактніші паддинги */body .crm-row,
body .sp-row,
body .dc-row { padding: 12px 16px; }
/* великі контентні картки — єдиний паддинг */body .pe-card,
body .db-card,
body .bl-card,
body .sp-card,
body .dc-card,
body .pp-card,
body .ms-card,
body .av-card,
body .rt-card,
body .rating-boost,
body .sp-rules__card,
body .dc-rules__card,
body .pp-rules__card { padding: 18px 20px; }

/* --- Кнопки: єдина висота, радіус, шрифт --- */body .buy-btn,
body .btn-ghost,
body .btn-secondary,
body .main-button,
body .bl-btn,
body .sp-btn,
body .dc-btn,
body .pp-btn,
body .ms-btn,
body .av-btn-primary,
body .sp-upload__btn,
body .dc-upload__btn,
body .pp-upload__btn,
body .dc-share__btn {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  font-family: var(--font-family2);
  font-size: 13.5px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-height: 40px;
  padding: 0 18px;
  text-transform: none;
}body .main-button { font-size: 14px; min-height: 46px; }body .ms-btn { font-size: 13px; min-height: 36px; padding: 0 14px; }body .dc-share__btn { border-radius: 4px; }

/* тулбари редакторів: без Arial, однаковий розмір */body .sp-editor__tool,
body .dc-editor__tool,
body .pp-editor__tool {
  border-radius: 3px;
  font-family: var(--font-family2);
  font-size: 12.5px;
  font-weight: 600;
  min-height: 29px;
}

/* --- Поля вводу: 40px, радіус 4, однакова рамка і фокус --- */body .inp,
body .bl-input,
body .sp-input,
body .dc-input,
body .pp-input,
body .ms-inp,
body .dc-mail__input,
body .dc-ref-form__input,
body .bl-topup__input,
body .sp-select,
body .dc-select,
body .pp-select,
body .bl-select,
body input[type="text"].form-control,
body input[type="email"].form-control {
  border: 1px solid #e5e5ea;
  border-radius: 4px;
  font-family: var(--font-family2);
  font-size: 14px;
  height: 40px;
  min-height: 0;
  padding: 0 14px;
}body .inp:focus,
body .bl-input:focus,
body .sp-input:focus,
body .dc-input:focus,
body .pp-input:focus,
body .ms-inp:focus,
body .dc-mail__input:focus,
body .dc-ref-form__input:focus,
body .bl-topup__input:focus {
  border-color: var(--crm-blue);
  box-shadow: 0 0 0 3px rgba(19, 151, 214, .12);
  outline: none;
}body textarea.inp,
body .sp-textarea,
body .dc-textarea,
body .pp-textarea,
body .sp-editor__area,
body .dc-editor__area,
body .pp-editor__area {
  border-radius: 4px;
  font-family: var(--font-family2);
  font-size: 14px;
  line-height: 1.6;
  min-height: 120px;
  padding: 12px 14px;
}

/* --- Заголовки: три рівні замість десяти --- */body .pe-card > h2,
body .db-card > h2,
body .bl-card > h2,
body .sp-card > h2,
body .dc-card > h2,
body .pp-card > h2,
body .ms-card > h2,
body .av-card > h2,
body .rating-boost__title,
body .main-rating__title,
body .rt-card > h2 {
  font-family: var(--font-family2);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}body .bl-sec-title,
body .main-top__title,
body .sp-sec-title,
body .dc-sec-title {
  font-family: var(--font-family2);
  font-size: 18px;
  font-weight: 750;
  text-transform: none;
}body .pe-q-title,
body .pp-card__title,
body .sp-rules__title,
body .dc-rules__title,
body .pp-rules__title,
body .av-step-title {
  font-family: var(--font-family2);
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
}

/* жодного Arial у контенті кабінету */body .main-inner__container *,
body .funds-modal *,
body .filter-drawer * { font-family: var(--font-family2); }

/* ------------------------------------------------------------
   Форми контенту (послуга / документ / стаття / кейс / відео):
   один вигляд правил, дропдаунів, дропзон, редакторів, модалок.
   ------------------------------------------------------------ */

/* підписи полів — як у profile-edit */
body .form-label {
  color: var(--u-muted);
  font-family: var(--font-family2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* панель дропдауна — та сама рамка й радіус, що в карток */
body .filter-dd__panel {
  border: 1px solid var(--u-border);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(16, 41, 58, .12);
}

/* розкривний блок «Правила публікації» */
body .sp-rules summary,
body .dc-rules summary,
body .pp-rules summary {
  color: var(--crm-blue);
  cursor: pointer;
  font-family: var(--font-family2);
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body .sp-rules summary::-webkit-details-marker,
body .dc-rules summary::-webkit-details-marker,
body .pp-rules summary::-webkit-details-marker { display: none; }
body .sp-rules[open] summary,
body .dc-rules[open] summary,
body .pp-rules[open] summary { margin-bottom: 10px; }
body .sp-rules__item,
body .dc-rules__item,
body .pp-rules__item { border-bottom: 1px dashed var(--u-border); padding: 14px 0; }
body .sp-rules__item:first-child,
body .dc-rules__item:first-child,
body .pp-rules__item:first-child { padding-top: 0; }
body .sp-rules__item:last-child,
body .dc-rules__item:last-child,
body .pp-rules__item:last-child { border-bottom: 0; padding-bottom: 0; }
body .sp-rules__subtitle,
body .dc-rules__subtitle,
body .pp-rules__subtitle {
  align-items: center; color: var(--u-ink); display: flex;
  font-size: 14px; font-weight: 700; gap: 8px; margin-bottom: 6px;
}
body .sp-rules__subtitle svg,
body .dc-rules__subtitle svg,
body .pp-rules__subtitle svg { color: var(--crm-blue); flex: 0 0 auto; }
body .sp-rules__item p,
body .dc-rules__item p,
body .pp-rules__item p { color: #2c2c2c; font-size: 13px; line-height: 1.6; margin: 0; }

/* секції всередині картки форми — один дешевий роздільник */
body .sp-block,
body .dc-block,
body .pp-block {
  border-bottom: 1px dashed var(--u-border);
  margin-bottom: 22px;
  padding-bottom: 22px;
}
body .sp-block:last-child,
body .dc-block:last-child,
body .pp-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
body .sp-hint, body .dc-hint, body .pp-hint {
  color: var(--u-muted); font-size: 12.5px; line-height: 1.5; margin: 10px 0 0; max-width: 78ch;
}

/* зони завантаження — одна дропзона */
body .sp-upload,
body .dc-upload,
body .pp-upload {
  align-items: center;
  background: #fbfcfd;
  border: 1px dashed #cdd2d8;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 18px;
}
body .sp-upload__thumb,
body .dc-upload__thumb,
body .pp-upload__thumb,
body .pp-upload__icon {
  align-items: center;
  background: rgba(var(--crm-blue-rgb), .08);
  border-radius: 4px;
  box-shadow: none;
  color: var(--crm-blue);
  display: flex;
  flex: 0 0 auto;
  height: 48px;
  justify-content: center;
  width: 48px;
}
body .sp-upload__title,
body .dc-upload__title,
body .pp-upload__title { color: var(--u-ink); font-size: 14px; font-weight: 700; }
body .sp-upload__text,
body .dc-upload__text,
body .pp-upload__text { color: var(--u-muted); font-size: 12.5px; line-height: 1.5; }
body .dc-upload__size { color: #2c2c2c; font-size: 12.5px; font-weight: 600; }

/* вкладки мов — один чип */
body .sp-lang-tabs,
body .dc-lang-tabs,
body .pp-lang-tabs,
body .pp-langtabs {
  border-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
body .sp-lang-tab,
body .dc-lang-tab,
body .pp-lang-tab,
body .pp-langtab {
  background: #fff;
  border: 1px solid var(--u-border);
  border-bottom: 1px solid var(--u-border);
  border-radius: 4px;
  color: #2c2c2c;
  cursor: pointer;
  font-family: var(--font-family2);
  font-size: 13px;
  font-weight: 600;
  min-height: 32px;
  padding: 0 14px;
}
body .sp-lang-tab.active,
body .dc-lang-tab.active,
body .pp-lang-tab.active,
body .pp-langtab.active {
  background: var(--crm-blue);
  border-color: var(--crm-blue);
  color: #fff;
}
body .sp-lang, body .dc-lang, body .pp-lang, body .pp-check {
  align-items: center; color: var(--u-ink); cursor: pointer; display: inline-flex;
  font-size: 14px; gap: 9px;
}
body .sp-lang input, body .dc-lang input, body .pp-lang input, body .pp-check input {
  accent-color: var(--crm-blue); height: 17px; width: 17px;
}

/* кнопка «Згенерувати через ШІ» */
body .sp-ai-btn,
body .dc-ai-btn,
body .pp-ai-btn {
  align-items: center;
  background: var(--crm-blue);
  border: 1px solid var(--crm-blue);
  border-radius: 4px;
  color: #fff;
  display: inline-flex;
  font-family: var(--font-family2);
  font-size: 13.5px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  line-height: 1;
  min-height: 40px;
  padding: 0 18px;
  text-transform: none;
}
body .sp-ai-hint, body .dc-ai-hint, body .pp-ai-hint { color: var(--u-muted); font-size: 12.5px; }
body .sp-ai-row, body .dc-ai-row, body .pp-ai-row {
  align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px;
}

/* лічильник символів */
body .sp-counter,
body .dc-counter,
body .pp-counter {
  color: var(--u-muted);
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px;
  text-align: right;
}
body .sp-counter b, body .dc-counter b, body .pp-counter b { color: var(--u-ink); font-weight: 700; }

/* тулбари демо-редакторів — один набір кнопок */
body .sp-editor,
body .dc-editor,
body .pp-editor {
  border: 1px solid #e5e5ea;
  border-radius: 4px;
  overflow: hidden;
}
body .sp-editor:focus-within,
body .dc-editor:focus-within,
body .pp-editor:focus-within {
  border-color: var(--crm-blue);
  box-shadow: 0 0 0 3px rgba(var(--crm-blue-rgb), .12);
}
body .sp-editor__toolbar,
body .dc-editor__toolbar,
body .pp-editor__toolbar {
  align-items: center;
  background: #f7f8fa;
  border-bottom: 1px solid var(--u-border);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 7px 8px;
}
body .sp-editor__tool,
body .dc-editor__tool,
body .pp-editor__tool {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #2c2c2c;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-family2);
  font-size: 12.5px;
  font-weight: 600;
  gap: 4px;
  height: 29px;
  min-height: 29px;
  padding: 0 9px;
  white-space: nowrap;
}
body .sp-editor__tool:hover,
body .dc-editor__tool:hover,
body .pp-editor__tool:hover {
  background: #fff;
  border-color: var(--u-border);
  color: var(--crm-blue);
}
body .sp-editor__sep,
body .dc-editor__sep,
body .pp-editor__sep {
  align-self: center;
  background: var(--u-border);
  flex: 0 0 auto;
  height: 18px;
  margin: 0 4px;
  width: 1px;
}
body .sp-editor__area,
body .dc-editor__area,
body .pp-editor__area {
  border: 0;
  border-radius: 0;
  color: var(--u-ink);
  min-height: 200px;
  padding: 14px 16px;
  resize: vertical;
  width: 100%;
}

/* модалки .funds-modal — одна оболонка (панель + підкладка + дії) */
body .funds-modal__backdrop { background: rgba(15, 18, 25, .42); inset: 0; position: absolute; }
body .funds-modal__panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
  max-width: 440px;
  padding: 26px 24px 24px;
  position: relative;
  text-align: center;
  width: 100%;
  z-index: 1;
}
body .funds-modal__close {
  background: none;
  border: 0;
  color: var(--u-muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 4px 6px;
  position: absolute;
  right: 10px;
  top: 8px;
}
body .funds-modal__close:hover { color: var(--u-ink); }
body .funds-modal__title {
  color: var(--u-ink);
  font-family: var(--font-family2);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 0 0 8px;
}
body .funds-modal__text { color: var(--u-muted); font-size: 13.5px; line-height: 1.55; margin: 0 0 18px; }
body .funds-modal__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
body .funds-modal__actions .buy-btn,
body .funds-modal__actions .btn-secondary { flex: 1 1 140px; }

/* статичні «селекти»-заглушки — той самий контрол, що й інпут */
body .sp-select,
body .dc-select,
body .pp-select {
  align-items: center;
  background: #fff;
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
body .sp-editor__tool--b,
body .dc-editor__tool--b,
body .pp-editor__tool--b { font-weight: 800; }

body .sp-upload__box,
body .dc-upload__box,
body .pp-upload__box {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
/* кнопка дропзони — той самий ghost, що й .btn-secondary */
body .sp-upload__btn,
body .dc-upload__btn,
body .pp-upload__btn,
body .dc-sample__btn {
  background: #fff;
  border: 1px solid #d7dade;
  color: var(--u-ink);
  letter-spacing: 0;
}
body .sp-upload__btn:hover,
body .dc-upload__btn:hover,
body .pp-upload__btn:hover,
body .dc-sample__btn:hover {
  background: #fff;
  border-color: var(--crm-blue);
  color: var(--crm-blue);
}

/* ============================================================
   ШАР УЗГОДЖЕНОСТІ · частина 2: списки, тулбари, спливаючі
   панелі і тости. Ті самі рамка/радіус/тінь, що в карток.
   ============================================================ */

/* --- Спливаюча панель дропдауна = маленька картка --- */
body .filter-dd__panel {
  border: 1px solid #e5e5ea;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(16, 41, 58, .16);
}
body .filter-dd__panel .filter-search { border-radius: 4px; }
body .filter-options li { border-radius: 4px; }
/* усередині дровера панель розкривається inline — без рамки й радіуса */
body .filter-drawer .filters-bar .filter-dd__panel { border: 0; }

/* --- Тулбар фільтрів поза дровером --- */
body .filters-bar {
  border: 1px solid #e5e5ea;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(16, 41, 58, .05);
}
body .filter-drawer .filters-bar { border: 0; }

/* --- Рядки збережених фільтрів = ті самі рядки-картки --- */
body .saved-row {
  border: 1px solid #e5e5ea;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(16, 41, 58, .05);
}
body .saved-row:hover {
  border-color: rgba(19, 151, 214, .45);
  box-shadow: 0 4px 14px rgba(16, 41, 58, .1);
}
body .saved-row__actions { border-left-color: #e5e5ea; }

/* --- Список публікацій = та сама анатомія, що .crm-row --- */
body .pub-row {
  border: 1px solid #e5e5ea;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(16, 41, 58, .05);
  padding: 12px 16px;
}
body .pub-row:hover { box-shadow: 0 4px 14px rgba(16, 41, 58, .1); }
body .pub-row__media img,
body .pub-row__media { border-radius: 4px; }
body .pub-row__actions .pub-btn { min-height: 40px; }
body .pub-row__title { font-size: 14.5px; font-weight: 700; }

/* --- Плашки-стани в лід-картках: радіус кнопок --- */
body .lr-state,
body .dir-cc,
body .lc__lock,
body .dir-lock,
body .dir-contacts,
body .lc .dir-contacts { border-radius: 4px; }

/* Дві дії не влазять в один рядок (ціна в кнопці) — переносимо,
   а не ріжемо підпис */
body .lc__act { flex-wrap: wrap; }

/* --- Інформери над списками (амбер/синій) — радіус карток --- */
body .dir-note,
body .consult-tooltip,
body .plan-rat { border-radius: 6px; }

/* --- Тости: один вигляд на весь кабінет --- */
body .toast,
body .pub-toast,
body .lr-toast,
body .dir-toast {
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(16, 41, 58, .18);
  font-family: var(--font-family2);
  font-size: 13.5px;
  font-weight: 600;
}

/* --- Порожні стани: радіус і вага заголовка як у карток --- */
body .empty-state { border-radius: 6px; border: 1px solid #e5e5ea; box-shadow: 0 1px 3px rgba(16, 41, 58, .05); }
body .empty-state__title { font-weight: 700; }

/* --- Лічильник над списком: один вигляд («Знайдено N…», «Показано N…») --- */
body .lr-found,
body .pub-foot {
  color: var(--u-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 12px;
  text-align: left;
}
body .lr-found b,
body .pub-foot b { color: var(--u-ink); font-weight: 700; }

/* картки форм — явний білий фон (щоб не залежати від батьківського блока) */
body .sp-card,
body .dc-card,
body .pp-card,
body .sp-rules__card,
body .dc-rules__card,
body .pp-rules__card { background: #fff; }

/* --- Лід-картка і рядок-картка: та сама рамка й тінь --- */
body .order-list__item .lc {
  border-color: #e5e5ea;
  box-shadow: 0 1px 3px rgba(16, 41, 58, .05);
}
body .order-list__item:hover .lc { box-shadow: 0 4px 14px rgba(16, 41, 58, .1); }

/* --- Публікації/реклама: плитки й картки в тій самій геометрії --- */
body .pub-btn { border-radius: 4px; }
body .sumry__tile,
body .prof,
body .st-big {
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(16, 41, 58, .05);
}
body .sumry__tile,
body .prof { border-color: #e5e5ea; }
body .sumry__tile--accent { border-color: rgba(19, 151, 214, .45); }
body .prof { padding: 18px 20px; }
body .pub-tip,
body .rowmenu__panel { border-radius: 4px; }

/* ============ ВКЛАДКИ РОЗДІЛУ (папки) ============
   Генерує build_nav.py із підпунктів групи меню; активна вкладка
   зростається з білим pagehead, що лежить під нею. */
body .pg-wrap { margin-bottom: 18px; position: relative; }
body .pg-tabs {
  display: flex; gap: 2px; overflow-x: auto;
  position: relative; z-index: 2; scrollbar-width: none;
}
body .pg-tabs::-webkit-scrollbar { display: none; }
body .pg-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  background: #f2f2f2; border: 1px solid #e5e5ea; border-bottom: none;
  border-radius: 6px 6px 0 0; color: #2c2c2c; font-size: 13.5px; font-weight: 600;
  padding: 9px 17px 10px; position: relative; top: 1px; white-space: nowrap;
  text-decoration: none; transition: background .15s, color .15s;
}
body .pg-tab:hover { background: #eff2f5; color: #2c2c2c; }
body .pg-tab.is-active {
  background: #fff; color: #2c2c2c; font-weight: 700;
  padding-bottom: 12px; top: 0; z-index: 3;
}
/* біла смуга перекриває шов між вкладкою і панеллю (видно при масштабуванні) */
body .pg-tab.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 4px; background: #fff; z-index: 1;
}
body .pg-tab__count {
  background: rgba(19, 151, 214, .12); border-radius: 20px; color: #0079ad;
  font-size: 11px; font-weight: 700; line-height: 1.6; padding: 0 7px;
}
body .pg-tab.is-active .pg-tab__count { background: var(--crm-blue); color: #fff; }
/* pagehead усередині обгортки стає «панеллю папки» */
body .pg-wrap .crm-pagehead {
  border-radius: 0 6px 6px 6px; margin: -2px 0 0; position: relative; z-index: 1;
}
@media (max-width: 760px) {
  body .pg-wrap::after {
    content: ""; position: absolute; top: 0; right: 0; width: 26px; height: 42px;
    background: linear-gradient(90deg, rgba(247, 247, 247, 0), #f8f9fc);
    pointer-events: none; z-index: 4;
  }
  body .pg-tab { font-size: 12.5px; padding: 8px 13px 9px; }
}

/* обгортки-секції зі старого сайту — це контейнери, а не картки */
body .order-section__box, body .question-section__box, body .rating-section__box,
body .order-section__inner, body .question-section, body .rating-section {
  background: none; border: 0; box-shadow: none; padding: 0;
}

/* рамки-привиди: прозорий блок з рамкою навколо вмісту, який уже має свою рамку */
body .pp-editor, body .dc-editor, body .sp-editor {
  background: #fff; border: 1px solid #e5e5ea; border-radius: 4px; overflow: hidden; padding: 0;
}
body .sp-stage { background: none; border: 0; padding: 0; }
body .pp-editor__toolbar, body .dc-editor__toolbar, body .sp-editor__toolbar {
  background: #f7f8fa; border: 0; border-bottom: 1px solid var(--u-border); border-radius: 0;
}
body .pp-editor__area, body .dc-editor__area, body .sp-editor__area {
  border: 0; border-radius: 0; margin-top: 0; min-height: 200px;
}
/* рядок-картка соцмережі та поле суми — білі, а не прозорі */
body .ms-row { background: #fff; }
body .bl-topup__field { background: #fff; }

/* ---- форми подачі (документ / послуга / публікація): відступи і ритм ---- */
/* роздільник секцій — тонка суцільна лінія замість пунктиру */
body .sp-block, body .dc-block, body .pp-block {
  border-bottom: 1px solid #f2f2f2; margin-bottom: 24px; padding-bottom: 24px;
}
/* підпис поля відділений від самого поля */
body .sp-block > .form-label, body .dc-block > .form-label, body .pp-block > .form-label {
  display: block; margin-bottom: 9px;
}
/* кнопка ШІ — під полем з відступом, а не впритул */
body .sp-ai-row, body .dc-ai-row, body .pp-ai-row { margin: 12px 0 0; }
/* лічильник символів — над редактором, з повітрям */
body .sp-counter, body .dc-counter, body .pp-counter { margin: 0 0 8px; }
/* «Правила публікації» — акуратна кнопка-розкривачка, а не гола лінк-стрічка */
body .sp-rules, body .dc-rules, body .pp-rules { margin: 0 0 20px; }
body .sp-rules > summary, body .dc-rules > summary, body .pp-rules > summary {
  align-items: center; background: #fff; border: 1px solid var(--u-border); border-radius: 4px;
  color: var(--crm-blue); cursor: pointer; display: inline-flex; font-size: 13.5px; font-weight: 700;
  gap: 8px; list-style: none; min-height: 40px; padding: 0 16px; text-decoration: none;
}
body .sp-rules > summary::-webkit-details-marker,
body .dc-rules > summary::-webkit-details-marker,
body .pp-rules > summary::-webkit-details-marker { display: none; }
body .sp-rules > summary::after, body .dc-rules > summary::after, body .pp-rules > summary::after {
  content: "▾"; font-size: 12px; transition: transform .18s;
}
body .sp-rules[open] > summary::after, body .dc-rules[open] > summary::after,
body .pp-rules[open] > summary::after { transform: rotate(180deg); }
body .sp-rules > summary:hover, body .dc-rules > summary:hover, body .pp-rules > summary:hover {
  border-color: var(--crm-blue); background: #f2f9fd;
}
body .sp-rules__card, body .dc-rules__card, body .pp-rules__card { margin-top: 12px; }
/* зразок документа: підпис і прев'ю в одному ритмі */
body .dc-sample { gap: 22px; }
body .dc-sample__doc img { max-width: 200px; }
/* сітка полів у два стовпці — однаковий проміжок з рештою форми */
body .dc-grid2, body .sp-grid2, body .pp-grid2 { gap: 18px; }

/* ---- кольорові теги категорій права (єдина палітра кабінету) ---- */
body .lc-chip--cat {
  background: color-mix(in srgb, var(--cat, #1397d6) 12%, #fff);
  color: color-mix(in srgb, var(--cat, #1397d6) 78%, #000);
}
body .cat--fam    { --cat: #ec5e9a; } /* сімейне */
body .cat--crim   { --cat: #e5484d; } /* кримінальне */
body .cat--real   { --cat: #5b6fe0; } /* нерухомість */
body .cat--tax    { --cat: #f0b429; } /* податкове */
body .cat--auto   { --cat: #ff7a29; } /* авто та ДТП */
body .cat--corp   { --cat: #1397d6; } /* корпоративне */
body .cat--biz    { --cat: #00b4ce; } /* бізнес */
body .cat--ip     { --cat: #c77dff; } /* інтелектуальна власність */
body .cat--lab    { --cat: #2f9e8f; } /* трудове */
body .cat--her    { --cat: #a47551; } /* спадкове */
body .cat--mil    { --cat: #7e9b3a; } /* військове */
body .cat--mig    { --cat: #4aa3df; } /* міграційне */
body .cat--fin    { --cat: #8b7be8; } /* фінансове */
body .cat--dogo   { --cat: #6b7fa8; } /* договірне */
body .cat--harm   { --cat: #d1568c; } /* відшкодування шкоди */
body .cat--other  { --cat: #686868; } /* інше */

/* поле суми з суфіксом ₴ — одна рамка на контейнері, а не «поле в полі» */
body .bl-topup__field {
  align-items: center; background: #fff; border: 1px solid #e5e5ea; border-radius: 4px;
  display: flex; gap: 8px; height: 40px; padding: 0 14px;
}
body .bl-topup__field:focus-within { border-color: var(--crm-blue); box-shadow: 0 0 0 3px rgba(var(--crm-blue-rgb), .12); }
body .bl-topup__input {
  background: none; border: 0; box-shadow: none; flex: 1; height: 100%;
  min-height: 0; outline: none; padding: 0; width: auto;
}
body .bl-topup__input:focus { border: 0; box-shadow: none; }
body .bl-topup__cur { color: #686868; flex: 0 0 auto; font-weight: 700; }

/* ============================================================
   ПРІОРИТЕТ ЕЛЕМЕНТІВ ТОПБАРА ПРИ ЗВУЖЕННІ ЕКРАНА
   Найважливіше — консультант (аватар + ім'я + рейтинг) і дзвіночок:
   вони тримаються найдовше. Першим згортається баланс, далі підписка.
   ============================================================ */
/* 1) ≤1180px: баланс згортається до іконки-гаманця (сума ховається) */
@media (max-width: 1180px) {
  body .crm-topbar .crm-wallet { font-size: 0; gap: 0; padding: 0 12px; }
  body .crm-topbar .crm-wallet svg { margin: 0; }
}
/* 2) ≤1000px: підписка згортається до значка */
@media (max-width: 1000px) {
  body .crm-topbar .crm-plan { font-size: 0; gap: 0; padding: 0 11px; }
  body .crm-topbar .crm-plan svg { margin: 0; }
}
/* 3) ≤860px: баланс ховається зовсім (він є в меню «Гроші») */
@media (max-width: 860px) {
  body .crm-topbar .crm-wallet { display: none; }
}
/* 4) ≤700px: ховається підписка; консультант і дзвіночок лишаються */
@media (max-width: 700px) {
  body .crm-topbar .crm-plan { display: none; }
  body .crm-user__info { max-width: 140px; }
  body .crm-user__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* 5) ≤480px: лишаються лише дзвіночок і аватар консультанта */
@media (max-width: 480px) {
  body .crm-user__info { display: none; }
  body .crm-user { margin-left: 2px; padding-left: 10px; }
  body .crm-user__ava img { height: 34px; width: 34px; }
}

/* ============================================================
   ПІДПИСКА: hero + тарифи (стиль зразка, геометрія кабінету)
   Використовується на subscription-packages.html і subscription-required.html
   ============================================================ */
body .sub-hero {
  background: linear-gradient(118deg, #1397d6 0%, #1499d8 52%, #3fb6ec 100%);
  border-radius: 6px; color: #fff; overflow: hidden;
  padding: 40px 26px 42px; position: relative; margin-bottom: 22px;
}
body .sub-hero::after,
body .sub-hero::before { border-radius: 50%; content: ""; pointer-events: none; position: absolute; }
body .sub-hero::after { background: rgba(255, 255, 255, .09); height: 340px; right: -90px; top: -150px; width: 340px; }
body .sub-hero::before { background: rgba(255, 255, 255, .07); bottom: -130px; height: 240px; left: -70px; width: 240px; }
body .sub-hero__body { margin: 0 auto; max-width: 720px; position: relative; text-align: center; z-index: 1; }
body .sub-hero__eyebrow {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.4px;
  opacity: .8; text-transform: uppercase;
}
body .sub-hero__title {
  font-size: clamp(20px, 2.4vw, 28px); font-weight: 750; line-height: 1.28; margin: 10px 0 12px;
}
body .sub-hero__text { color: rgba(255, 255, 255, .9); font-size: 14px; line-height: 1.6; margin: 0 auto; max-width: 620px; }
body .sub-hero__chips { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
body .sub-hero__chip {
  align-items: center; background: rgba(255, 255, 255, .16); border-radius: 20px; color: #fff;
  display: inline-flex; font-size: 12.5px; font-weight: 700; gap: 7px; padding: 6px 14px;
}
body .sub-hero__cta {
  align-items: center; background: #fff; border-radius: 4px; color: #04709c; display: inline-flex;
  font-size: 13.5px; font-weight: 700; justify-content: center; margin-top: 18px; min-height: 40px;
  padding: 0 22px; text-decoration: none; transition: background .2s;
}
body .sub-hero__cta:hover { background: #eaf6fc; color: #04709c; }

/* --- сітка тарифів --- */
body .plan-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
body .plan {
  background: #fff; border: 1px solid rgba(19, 151, 214, .3); border-radius: 6px;
  box-shadow: 0 1px 3px rgba(16, 41, 58, .05); display: flex; flex-direction: column;
  padding: 24px 22px; position: relative;
}
body .plan__name { color: #2c2c2c; font-size: 17px; font-weight: 750; letter-spacing: .4px; }
body .plan__note { color: #686868; font-size: 13px; margin-top: 3px; }
body .plan__price { align-items: baseline; display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 16px; }
body .plan__amount { color: #2c2c2c; font-size: 30px; font-weight: 750; line-height: 1.1; }
body .plan__per { color: #686868; font-size: 13.5px; }
body .plan__cta {
  align-items: center; border-radius: 4px; display: inline-flex; font-size: 13.5px; font-weight: 700;
  justify-content: center; min-height: 42px; padding: 0 18px; text-decoration: none; transition: background .2s, border-color .2s;
}
body .plan__cta--primary { background: var(--crm-blue); border: 1px solid var(--crm-blue); color: #fff; }
body .plan__cta--primary:hover { background: #1187c0; border-color: #1187c0; color: #fff; }
body .plan__cta--ghost { background: #fff; border: 1px solid #e5e5ea; color: #2c2c2c; }
body .plan__cta--ghost:hover { border-color: var(--crm-blue); color: var(--crm-blue); }
body .plan__cta[aria-disabled="true"] { cursor: default; opacity: .9; }
body .plan__feats-label {
  color: #686868; font-size: 11.5px; font-weight: 700; letter-spacing: .6px;
  margin-top: 20px; text-transform: uppercase;
}
body .plan__feats { display: flex; flex-direction: column; gap: 9px; list-style: none; margin: 12px 0 0; padding: 0; }
body .plan .pf { color: #2c2c2c; font-size: 13.5px; line-height: 1.5; padding-left: 22px; position: relative; }
body .plan .pf::before { color: var(--crm-blue); content: "✓"; font-weight: 700; left: 0; position: absolute; top: 0; }

/* --- поточний тариф: темна картка з золотою пілюлею --- */
body .plan--featured { background: #000000; border-color: #000000; }
body .plan--featured .plan__name,
body .plan--featured .plan__amount { color: #fff; }
body .plan--featured .plan__note,
body .plan--featured .plan__per,
body .plan--featured .plan__feats-label { color: rgba(255, 255, 255, .72); }
body .plan--featured .pf { color: rgba(255, 255, 255, .92); }
body .plan--featured .pf::before { color: #ffdb48; }
body .plan--featured .plan__cta--ghost { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff; }
body .plan--featured .plan__cta--ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }
body .plan__badge {
  background: #ffdb48; border-radius: 20px; color: #2c2c2c; font-size: 10.5px; font-weight: 750;
  left: 50%; letter-spacing: .6px; padding: 4px 14px; position: absolute; top: -11px;
  transform: translateX(-50%); text-transform: uppercase; white-space: nowrap;
}
body .plan__till { color: #ffdb48; font-size: 12.5px; font-weight: 700; margin: -8px 0 14px; }

/* --- планшет: 3 колонки тісні → 2 --- */
@media (max-width: 1180px) {
  body .plan { padding: 22px 18px; }
  body .plan__amount { font-size: 27px; }
  body .plan .pf { font-size: 13px; }
}

/* --- компактний hero на вузьких екранах --- */
@media (max-width: 860px) {
  body .sub-hero { padding: 28px 18px 30px; }
  body .sub-hero__title { font-size: 20px; line-height: 1.3; }
  body .sub-hero__text { font-size: 13.5px; }
  body .sub-hero::after { height: 200px; right: -70px; top: -100px; width: 200px; }
  body .sub-hero::before { display: none; }
}

/* --- слайдер тарифів: із планшета, бо 3 колонки стають надто вузькими --- */
@media (max-width: 1100px) {
  body .plan-slider { position: relative; }
  body .plan-grid {
    display: flex; gap: 12px; grid-template-columns: none;
    margin: 0 -16px; overflow-x: auto; padding: 4px 16px 6px;
    scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  body .plan-grid::-webkit-scrollbar { display: none; }
  body .plan {
    flex: 0 0 86%; max-width: 340px; scroll-snap-align: center; padding: 22px 18px;
  }
  body .plan__badge { top: -9px; }
  body .plan-dots { display: flex; gap: 7px; justify-content: center; margin-top: 14px; }
  body .plan-dot {
    background: #d3d7dd; border: 0; border-radius: 50%; cursor: pointer; height: 8px; padding: 0;
    transition: background .2s, width .2s; width: 8px;
  }
  body .plan-dot.is-on { background: var(--crm-blue); width: 22px; border-radius: 6px; }
  body .plan-hint { color: #686868; font-size: 12.5px; margin-top: 10px; text-align: center; }
}
@media (min-width: 1101px) { body .plan-dots, body .plan-hint { display: none; } }
