/* Своє для меню CRM — підключається ПІСЛЯ спільного vendor/fregat-sidebar/fregat-sidebar.w1023.css
   (той руками не правимо). Тут те, що в Атласі зроблено класами Tailwind у розмітці: каркас, шапка,
   підвал, мобільна шапка, висувне меню — значення з sidebar-guide.md Атласа (розділи 2, 4, 9, 10).
   Плюс надбудови CRM: лічильники на пунктах, дзвіночок, швидкі переходи в сусідні системи. */

/* ── Каркас ──────────────────────────────────────────────────────────────── */

.layout { display: flex; min-height: 100vh; min-height: 100dvh; }
.layout > .content { flex: 1 1 auto; min-width: 0; }

#sidebar {
  position: sticky; top: 0; z-index: 30;
  flex: 0 0 auto; width: 288px; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
}
#sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 4px; }
#sidebar-nav::-webkit-scrollbar { width: 6px; }
#sidebar-nav::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .35); border-radius: 3px; }

/* ── Шапка меню (80 px): логотип-плитка, назва, дзвіночок і лупа ─────────────── */

.sb-head {
  position: relative; overflow: hidden; flex: 0 0 auto;
  height: 80px; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 16px;
  border-bottom: 1px solid rgba(229, 231, 235, .5); cursor: pointer; transition: background .2s;
}
html.dark .sb-head { border-bottom-color: rgba(55, 65, 81, .5); }
.sb-head:hover { background: rgba(250, 245, 255, .5); }
html.dark .sb-head:hover { background: rgba(88, 28, 135, .1); }
.sb-tri { position: absolute; right: 0; top: 0; width: 120px; height: 100%; pointer-events: none; }
.sb-tri svg { display: block; width: 100%; height: 100%; }
:root[data-anim="off"] .atlas-tri { animation: none; }

.sb-logo {
  position: relative; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
  box-shadow: 0 8px 16px -8px rgba(79, 70, 229, .55);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .3s;
}
.sb-logo img { display: block; width: 36px; height: 36px; }
.sb-head:hover .sb-logo { transform: translateY(-1px) scale(1.04); box-shadow: 0 6px 20px rgba(79, 70, 229, .45); }
.sb-head:active .sb-logo { transform: scale(.88); transition-duration: .08s; }

.sb-head-txt { position: relative; display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.sb-head-txt b { font-size: 16px; font-weight: 700; color: #9333ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* «Fregat ISP» — однаковий відтінок у всіх систем (стандарт typography/README.md, Артьом 19.11): #6b7280 в обох темах */
.sb-head-txt small { font-size: 10px; font-weight: 400; line-height: 1.5; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.dark .sb-head-txt small { color: #6b7280; }
html.dark .sb-head-txt b { color: #c084fc; }

/* лупа — як в Атласі: абсолютно, по центру висоти (спільні анімації розраховані на translateY(-50%)) */
.sb-head-actions { position: relative; flex: 0 0 auto; width: 86px; height: 40px; }
.sb-head-actions .bell { position: absolute; left: 0; top: 0; }
.sb-head-search, .sb-head-actions .bell-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: #a855f7; background: rgba(255, 255, 255, .7); border: 1px solid #f3e8ff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .15s, transform .15s;
}
.sb-head-search { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.sb-head-search:hover { background: #faf5ff; transform: translateY(-50%) scale(1.05); }
.sb-head-actions .bell-btn:hover { background: #faf5ff; transform: scale(1.05); }
html.dark .sb-head-search, html.dark .sb-head-actions .bell-btn {
  color: #d8b4fe; background: rgba(31, 41, 55, .7); border-color: rgba(107, 33, 168, .5);
}
html.dark .sb-head-search:hover, html.dark .sb-head-actions .bell-btn:hover { background: rgba(88, 28, 135, .4); }
.sb-head-search svg, .sb-head-actions .bell-btn svg { width: 20px; height: 20px; }

/* вузькі режими: лупа й дзвіночок — плитками під логотипом */
#sb-search-wrap { flex-direction: column; align-items: center; gap: 2px; }
#sb-search-wrap .bell-btn {
  width: 44px; height: 44px; border-radius: 13px; border: none; background: transparent; color: var(--fsb-accent);
  display: flex; align-items: center; justify-content: center;
}
#sb-search-wrap .bell-btn:hover { background: rgba(var(--fsb-accent-rgb), .08); }
html.dark #sb-search-wrap .bell-btn { color: var(--fsb-soft); }
#sb-search-wrap .bell-btn svg { width: 20px; height: 20px; }
#sidebar.sidebar-collapsed .sb-head, #sidebar.sidebar-rail .sb-head { justify-content: center; padding: 0; }
#sidebar.sidebar-collapsed .sb-tri, #sidebar.sidebar-rail .sb-tri { display: none; }

/* ── Пункти: лічильники CRM (своє, гайдбук 5.5), притушені відділи ─────────────── */

.nav-cnt {
  flex: 0 0 auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; text-align: center;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgba(139, 92, 246, .12); color: #6d28d9;
}
html.dark .nav-cnt { background: rgba(139, 92, 246, .22); color: #ddd6fe; }
.nav-cnt.hot { background: #dc2626; color: #fff; }
.nav-row-on .nav-cnt { background: rgba(255, 255, 255, .22); color: #fff; }
.nav-dim { opacity: .55; }
.rail-fly-txt { flex: 1; }
.nav-row, .nav-back { border: none; background: transparent; font: inherit; cursor: pointer; text-decoration: none; }
.nav-back { width: 100%; }
.nav-sec { width: 100%; }
.nav-pins-t svg, .nav-pin svg { width: 14px; height: 14px; }
.rail-btn { color: inherit; }

/* ── Кнопка «Згорнути» (лише від 1024 px) ──────────────────────────────────── */

.sb-collapse { flex: 0 0 auto; padding: 0 12px 4px; display: none; }
@media (min-width: 1024px) { .sb-collapse { display: block; } }
/* Блок — як є зі стандарту /Users/Shared/fregat-ui-kit/sidebar-fold/README.md (еталон Атлас) */
/* ── 19.11 кнопка «Згорнути» внизу меню — та сама плитка, що лупа й дзвіночок. Артьом: «кнопку згорнути должна быть в таком же стиле как и лупа
   с колокольчиком… обязательное требование всем агентам». Плитка 40 × 40, радіус 12, напівпрозоре тло з розмиттям 8 px, межа #f3e8ff, значок 20 px
   #a855f7 (темна: тло rgba(31,41,55,.7), межа rgba(107,33,168,.5), значок #d8b4fe); підпис поруч — 13 px / 500, #6b7280. Наведення: кільце й відблиск,
   як у лупи, стрілки «відскакують» у бік згортання (у згорнутому меню — у бік розгортання); натиск — пружинка. Розмітка:
   <button class="sb-fold"><span class="sb-fold-tile"><svg…/></span><span class="sb-fold-t">Згорнути</span></button> ── */
.sb-fold { display: flex; align-items: center; gap: 12px; width: 100%; padding: 4px; border: 0; border-radius: 14px; background: none; cursor: pointer; text-align: left; font: inherit; }
.sb-fold-tile { position: relative; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; isolation: isolate;
  color: #a855f7; background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid #f3e8ff;
  transition: background-color .2s, transform .2s cubic-bezier(.3,1.6,.5,1); }
.sb-fold-tile svg { width: 20px; height: 20px; }
.sb-fold-t { font-size: 13px; font-weight: 500; color: #6b7280; transition: color .2s; }
.sb-fold:hover .sb-fold-tile { background: #faf5ff; }
.sb-fold:hover .sb-fold-t { color: #9333ea; }
.dark .sb-fold-tile { color: #d8b4fe; background: rgba(31,41,55,.7); border-color: rgba(107,33,168,.5); }
.dark .sb-fold:hover .sb-fold-tile { background: rgba(88,28,135,.4); }
.dark .sb-fold:hover .sb-fold-t { color: #d8b4fe; }
.sb-fold-tile::before { content: ''; position: absolute; inset: -2px; border-radius: 14px; border: 2px solid rgba(139,92,246,.55); opacity: 0; transform: scale(.85); pointer-events: none; }
.sb-fold-tile::after { content: ''; position: absolute; inset: 0; border-radius: 12px; pointer-events: none; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, transparent 60%); background-size: 250% 100%; background-position: 120% 0; opacity: 0; }
.dark .sb-fold-tile::after { background: linear-gradient(115deg, transparent 30%, rgba(196,181,253,.35) 45%, transparent 60%); background-size: 250% 100%; }
.sb-fold:hover .sb-fold-tile::before, .sb-fold:focus-visible .sb-fold-tile::before { animation: sbRing 1.4s ease-out infinite; }
.sb-fold:hover .sb-fold-tile::after { opacity: 1; animation: sbGlint 1.4s ease-in-out infinite; }
.sb-fold:hover .sb-fold-tile svg, .sb-fold:focus-visible .sb-fold-tile svg { animation: sbFoldL 1.1s ease-in-out infinite; }
#sidebar.sidebar-collapsed .sb-fold:hover .sb-fold-tile svg, #sidebar.sidebar-collapsed .sb-fold:focus-visible .sb-fold-tile svg { animation-name: sbFoldR; }
.sb-fold:active .sb-fold-tile { transform: scale(.88); transition-duration: .08s; }
@keyframes sbFoldL { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 45% { transform: translateX(1px); } 65% { transform: translateX(-2px); } }
@keyframes sbFoldR { 0%,100% { transform: translateX(0); } 25% { transform: translateX(4px); } 45% { transform: translateX(-1px); } 65% { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) { .sb-fold-tile svg, .sb-fold-tile::before, .sb-fold-tile::after { animation: none !important; } .sb-fold:active .sb-fold-tile { transform: none; } }
/* поправка стандарту 19.11 (контраст): підпис у темній темі — #9ca3af (#6b7280 на #111827 = 3,67 < 4,5) */
.dark .sb-fold-t { color: #9ca3af; }
/* CRM: у згорнутому меню — лише плитка по центру */
#sidebar.sidebar-collapsed .sb-fold { justify-content: center; }

/* ── Підвал: людина + перемикачі, назва й версія, «Вийти» ───────────────────── */

.sb-foot { flex: 0 0 auto; padding: 12px; border-top: 1px solid rgba(229, 231, 235, .5); }
html.dark .sb-foot { border-top-color: rgba(55, 65, 81, .5); }
/* Підвал — за стандартом /Users/Shared/fregat-ui-kit/sidebar-footer (Артьом 19.11: аватарка — як «Згорнути», лупа й дзвіночок, 40 × 40) */
.sb-footer-row { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.sb-avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
  background: #f3e8ff; color: #7e22ce; transition: box-shadow .15s;
}
.sb-avatar:hover { box-shadow: 0 0 0 2px #c084fc; }
html.dark .sb-avatar { background: rgba(88, 28, 135, .4); color: #d8b4fe; }
.sb-me { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sb-me b { font-size: 14px; font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-avatar.sb-avatar-emoji { font-size: 20px; }
.sb-me small { font-size: 12px; font-weight: 400; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.dark .sb-me small { color: #9ca3af; }
.sb-footer-actions .icon-btn { color: #6b7280; }
.sb-footer-actions .icon-btn:hover { background: #f3f4f6; color: #6b7280; }
html.dark .sb-footer-actions .icon-btn { color: #9ca3af; }
html.dark .sb-footer-actions .icon-btn:hover { background: #374151; color: #9ca3af; }
.sb-footer-actions .icon-btn.on { color: #a855f7; }
html.dark .sb-footer-actions .icon-btn.on { color: #c084fc; }
html.dark .sb-me b { color: #fff; }
.sb-footer-actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
#sidebar.sidebar-collapsed .sb-footer-actions, #sidebar.sidebar-rail .sb-footer-actions { flex-direction: column; }

.sb-meta-row { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 10px; color: #6b7280; }
html.dark .sb-meta-row { color: #9ca3af; }
.sb-meta-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-ver {
  padding: 1px 6px; border-radius: 6px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--brand-soft); color: var(--brand-soft-ink);
}
/* швидкі переходи в сусідні системи — плитки їхніх кольорів (своя надбудова CRM) */
.sb-sys { display: flex; gap: 4px; }
.sb-sys a { width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.sb-sys a:hover { transform: translateY(-1px) scale(1.08); }
.sb-sys a svg { width: 13px; height: 13px; }
.sb-sys a.nav-icon-box::before { display: none; }

.sb-logout {
  width: 100%; height: 34px; padding: 0 8px; border-radius: 8px; cursor: pointer;
  border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; font-size: 14px; font-weight: 400;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
/* «Вийти» — мʼяка червона заливка (рішення Артьома 19.11, sidebar-footer/README.md) */
html.dark .sb-logout { color: #f87171; border-color: #7f1d1d; background: rgba(127, 29, 29, .2); }
/* блок «наповнення наростає» — як є зі стандарту (еталон Атлас); вимикач анімацій CRM — теж «без руху» */
/* ── 19.11 «Вийти»: на наведенні й натиску червоне наповнення наростає зліва направо, а не спалахує одразу (Артьом: «чтобы она когда на нее наводишь
   мышку или тапаешь как бы анимированно наполнялась красным а не сразу загоралась вот как кнопки лупы и колокольчика»). Плюс червоне кільце, як у лупи,
   і пружинка на натиску. Наповнення — псевдоелемент під написом; без руху — одразу заповнено, без кільця. Стандарт — fregat-ui-kit/sidebar-footer. ── */
.sb-logout { position: relative; overflow: hidden; isolation: isolate; transition: color .3s, border-color .3s, transform .2s cubic-bezier(.3,1.6,.5,1); }
.sb-logout::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, #fecaca, #fca5a5); transform: scaleX(0); transform-origin: left center; transition: transform .5s cubic-bezier(.22,.8,.3,1); }
.dark .sb-logout::before { background: linear-gradient(90deg, rgba(185,28,28,.45), rgba(220,38,38,.6)); }
@media (hover: hover) {
  .sb-logout:hover::before, .sb-logout:focus-visible::before { transform: scaleX(1); }
  .sb-logout:hover { color: #991b1b; border-color: #fca5a5; animation: logoutRing 1.4s ease-out infinite; }
  .dark .sb-logout:hover { color: #fee2e2; border-color: #dc2626; }
}
.sb-logout:active::before { transform: scaleX(1); transition-duration: .28s; }
.sb-logout:active { transform: scale(.96); transition-duration: .08s; }
@keyframes logoutRing { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); } 100% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }
@media (prefers-reduced-motion: reduce) { .sb-logout::before { transition: none; } .sb-logout { animation: none !important; } }
html[data-anim="off"] .sb-logout::before { transition: none; }
html[data-anim="off"] .sb-logout { animation: none !important; }
.sb-logout .sb-show svg { width: 18px; height: 18px; }

/* ── Телефон і вузьке вікно (до 1023 px): висувне меню, мобільна шапка ───────── */

#mobile-header { display: none; }
@media (max-width: 1023px) {
  #sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: 100dvh; }
  #sidebar.-translate-x-full { transform: translateX(-100%); }
  #sidebar-overlay { position: fixed; inset: 0; z-index: 20; }
  #mobile-header {
    display: flex; align-items: center; gap: 4px; position: sticky; top: 0; z-index: 15;
    height: 56px; padding-left: 8px; padding-right: 8px;
    background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  html.dark #mobile-header { background: rgba(17, 24, 39, .86); }
}
@media (min-width: 1024px) { #sidebar-overlay { display: none; } }

.mh-burger, .mh-btn, #mobile-header .bell-btn {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--text-2);
}
.mh-burger:hover, .mh-btn:hover, #mobile-header .bell-btn:hover { background: rgba(139, 92, 246, .08); }
.mh-burger svg, .mh-btn svg, #mobile-header .bell-btn svg { width: 22px; height: 22px; }
.mh-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.15; padding: 0 4px; }
/* смуга телефона — за стандартом typography/README.md §2 (+ поправка контрасту 19.11: мітка у світлій темі суцільна #9333ea) */
.mh-titles small { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #9333ea; }
html.dark .mh-titles small { color: rgba(216, 180, 254, .7); }
.mh-titles b { font-size: 15px; font-weight: 600; line-height: 1.25; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.dark .mh-titles b { color: #f3f4f6; }

/* ── Дзвіночок: лічильник і панель ─────────────────────────────────────────── */

.bell-btn { position: relative; }
.bell-count {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 999px;
  background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; border: 2px solid var(--surface);
}
.bell-panel {
  position: fixed; z-index: 80; width: 320px; max-height: 60vh; overflow-y: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-menu);
  box-shadow: var(--shadow-menu);
}
.bell-head { display: flex; align-items: center; padding: 8px 10px 6px; font-weight: 700; font-size: 13px; }
.bell-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.bell-item { display: flex; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.bell-item:hover { background: rgba(139, 92, 246, .1); }
.bell-item.unread { background: rgba(139, 92, 246, .1); }
.bell-ico { flex: 0 0 auto; font-size: 17px; }
.bell-title { font-size: 13px; font-weight: 600; }
.bell-body { font-size: 12px; color: var(--muted); margin-top: 1px; }
.bell-time { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Дзвіночок — як лупа поруч (Артьом 19.11): при наведенні гойдається, як справжній (від верхівки, загасаючи),
      і розходиться кільце; натиск — пружинка. Ключові кадри sbRing — зі спільного файлу меню (лупа). ── */
.sb-head-actions .bell-btn, #sb-search-wrap .bell-btn { position: relative; overflow: visible; isolation: isolate; }
.sb-head-actions .bell-btn::before, #sb-search-wrap .bell-btn::before {
  content: ''; position: absolute; inset: -2px; border-radius: 14px; border: 2px solid rgba(var(--fsb-violet-rgb), .55);
  opacity: 0; transform: scale(.85); pointer-events: none;
}
.bell-btn svg { transform-origin: 50% 12%; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.bell-btn:hover svg, .bell-btn:focus-visible svg { animation: bellSwing 1.2s ease-in-out infinite; }
.bell-btn:hover::before, .bell-btn:focus-visible::before { animation: sbRing 1.4s ease-out infinite; }
.sb-head-actions .bell-btn:active, #sb-search-wrap .bell-btn:active { transform: scale(.88) !important; transition: transform .08s; }
.bell-btn:active svg { animation: none; transform: rotate(14deg) scale(1.12); }
@keyframes bellSwing {
  0%, 100% { transform: rotate(0); } 8% { transform: rotate(18deg); } 20% { transform: rotate(-15deg); } 32% { transform: rotate(11deg); }
  44% { transform: rotate(-7deg); } 56% { transform: rotate(4deg); } 68% { transform: rotate(-2deg); } 80% { transform: rotate(0); }
}
@media (prefers-reduced-motion: reduce) { .bell-btn svg, .bell-btn::before { animation: none !important; } }
:root[data-anim="off"] .bell-btn svg, :root[data-anim="off"] .bell-btn::before { animation: none !important; }

/* спільний файл меню знає лише prefers-reduced-motion — особистий вимикач CRM додаємо тут (аудит P1-4) */
html[data-anim="off"] :is(#sidebar, #sidebar-overlay, #sidebar *) { animation: none !important; transition: none !important; }
html[data-anim="off"] #sidebar *::before, html[data-anim="off"] #sidebar *::after { animation: none !important; transition: none !important; }

/* ── Підвал меню як в Атласі: капсула стану ⇄ ряд пілюль (js/sb-meta.js) ── */
.sbm { display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 8px; border-radius: 999px; cursor: pointer;
  background: rgba(148, 163, 184, .12); outline: none; transition: background .15s; }
.sbm:focus-visible { box-shadow: 0 0 0 2px rgba(139, 92, 246, .45); }
.sbm-dots { display: inline-flex; gap: 4px; }
.sbm.open .sbm-dots { display: none; }
.sbm-pills { display: none; flex-wrap: wrap; gap: 4px; }
.sbm.open { border-radius: 14px; background: transparent; padding: 0; }
.sbm.open .sbm-pills { display: flex; }
.sbm-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #16a34a; flex: none; }
.sbm-dot.bad { background: #f59e0b; }
.sbm-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border: 0; border-radius: 999px;
  background: rgba(148, 163, 184, .16); color: var(--text-2); font: 600 11.5px/1 Inter, system-ui, sans-serif; cursor: default; }
.sbm-pill .sbm-at { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
button.sbm-pill { cursor: pointer; }
button.sbm-pill:hover { background: rgba(139, 92, 246, .16); color: #6d28d9; }
html.dark .sbm { background: rgba(148, 163, 184, .1); }
html.dark .sbm.open { background: transparent; }
html.dark .sbm-pill { background: rgba(148, 163, 184, .14); color: #e5e7eb; }
html.dark button.sbm-pill:hover { background: rgba(139, 92, 246, .24); color: #ddd6fe; }
.sbm-ver { background: rgba(139, 92, 246, .14); color: #6d28d9; }
html.dark .sbm-ver { background: rgba(139, 92, 246, .24); color: #ddd6fe; }
.wn-item { margin: 0 0 10px; }
.wn-item b { display: block; font-size: 14px; margin-bottom: 2px; }

/* лічильники в меню й підменю — стовпчиком біля правого краю, однієї ширини, цифри таблично (Артьом 19.11: «цифри
   приклеєні до назв — зробив би стовпчиком красиво»); шпилька «закріпити» зʼявляється при наведенні — ліворуч від лічильника */
.rail-fly-item .nav-cnt, .nav-row .nav-cnt { order: 4; flex: none; min-width: 34px; justify-content: center; text-align: center;
  font-variant-numeric: tabular-nums; margin-left: 6px; }
.rail-fly-item .nav-pin, .nav-row .nav-pin { order: 3; margin-left: auto; }
.rail-fly-item .rail-fly-txt { flex: 1 1 auto; min-width: 0; }
