/*! Navex · UX-лаборатория · css/shell-ux.css · 2026-10-10
   Оболочка ux-navex поверх theme.css «Тумана»: логотип Navex, знак ИИ-агента, группы «ИИ-агенты» / «Мои ассистенты»,
   вложенные пункты (alt-nav b), сворачивание (alt-nav c), строка и карточка тарифа (alt-plan), баланс-пилюля и аватар
   в шапке (alt-account), не липкая шапка на ПК (решение §2.1). Подключать сразу после theme.css. */

/* --- шапка на ПК не липкая: уходит вверх вместе со страницей --- */
@media (min-width: 768px) {
  .topbar { position: relative; top: auto; }
}

/* --- логотип: слово Navex в развёрнутом меню, знак — в рейке --- */
.sidebar__logo { gap: 0; padding-left: 10px; }
.uxn-logo { display: block; width: 104px; height: 28px; }
.uxn-logo-mark { display: none; }
.uxn-mark { display: block; }
:root[data-sidebar="collapsed"] .uxn-logo-full { display: none; }
:root[data-sidebar="collapsed"] .uxn-logo-mark { display: grid; place-items: center; width: 48px; height: 44px; margin-left: -4px; }

/* --- знак ИИ-агента: квадрат цвета агента; иконка сферы ↔ буква в рейке --- */
.uxn-ava {
  --s: 32px; position: relative; flex: none; display: grid; place-items: center;
  width: var(--s); height: var(--s); border-radius: 10px;
  background: var(--ag, #6B7A90); color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), inset 0 0 0 1px rgb(0 0 0 / .06);
  font: 600 14px/1 var(--font-text);
}
.uxn-ava--40 { --s: 40px; border-radius: 12px; font-size: 16px; }
.uxn-ava--36 { --s: 36px; border-radius: 11px; }
.uxn-ava .nx-icon { --nx-size: 18px; color: #fff; }
.uxn-ava--40 .nx-icon { --nx-size: 20px; }
.uxn-ava__ico, .uxn-ava__letter { grid-area: 1 / 1; display: grid; place-items: center; }
.uxn-ava__letter { display: none; }
.uxn-ava--asst { background: var(--ai-gel); }
:root[data-sidebar="collapsed"] .sidebar .uxn-agent .uxn-ava__ico { display: none; }
:root[data-sidebar="collapsed"] .sidebar .uxn-agent .uxn-ava__letter { display: grid; }
:root[data-sidebar="collapsed"] .sidebar .uxn-ava--asst .uxn-ava__letter { display: none; }
:root[data-sidebar="collapsed"] .sidebar .uxn-ava--asst .uxn-ava__ico { display: grid; }
.sidebar__ico:has(> .uxn-ava) { border-radius: 10px; }
.sidebar__link[aria-current="page"] .sidebar__ico:has(> .uxn-ava) { background: transparent; }
.sidebar__link[aria-current="page"] .uxn-ava { box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--primary); }

/* --- группы «ИИ-агенты ＋» / «Мои ассистенты ＋» --- */
.uxn-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 10px 2px 2px 12px; }
.uxn-group__label { min-width: 0; }
.uxn-group__title, .uxn-group__toggle { font: 600 12px/1 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.uxn-group__toggle {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; margin-left: -8px; padding: 0 8px; border: 0; border-radius: var(--rounded-pill);
  background: transparent; cursor: pointer;
}
.uxn-group__toggle .nx-icon { --nx-size: 14px; transition: rotate var(--normal) var(--ease); }
.uxn-group__toggle[aria-expanded="false"] .nx-icon { rotate: -90deg; }
.uxn-group__add {
  flex: none; position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0;
  background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
}
.uxn-group__add::after { content: ""; position: absolute; inset: -6px; }
.uxn-group__add .nx-icon { --nx-size: 16px; }
@media (hover: hover) and (pointer: fine) {
  .uxn-group__add:hover, .uxn-group__toggle:hover { background: rgb(255 255 255 / .6); color: var(--ink); }
}
:root[data-sidebar="collapsed"] .uxn-group { display: none; }
.uxn-sep { flex: none; height: 1px; margin: 8px 12px; background: var(--line); }
:root[data-sidebar="collapsed"] .uxn-sep { margin: 8px 14px 8px 18px; }

/* строки агентов и ассистентов */
.uxn-agent { color: var(--ink); }
.uxn-agent .sidebar__label { font-weight: 500; }
.uxn-agent.is-selected:not([aria-current="page"]) { background: rgb(255 255 255 / .5); box-shadow: inset 0 0 0 1px var(--line); }
:root[data-sidebar="collapsed"] .sidebar .uxn-agent.is-selected:not([aria-current="page"]) { background: transparent; box-shadow: none; }
:root[data-sidebar="collapsed"] .sidebar .uxn-agent.is-selected .uxn-ava { box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--ink-faint); }
.uxn-add { color: var(--ink-soft); }
.uxn-add .sidebar__ico { border: 1.5px dashed var(--ink-faint); width: 32px; height: 32px; margin: 2px; color: var(--ink-soft); }
.uxn-all .sidebar__ico { color: var(--ink-soft); }
.uxn-home { margin-left: 8px; padding: 2px 7px; border-radius: var(--rounded-pill); font: 500 12px/1.2 var(--font-text); color: var(--ink-soft); background: rgb(22 22 22 / .05); }
.sidebar__link[aria-current="page"] .uxn-home { background: var(--primary-faint); color: var(--primary-ink); }

/* alt-nav b: рабочие пункты вложены под выбранным агентом */
.uxn-tree { display: grid; gap: 2px; padding: 4px; margin: 0 -4px 4px; border-radius: 26px; background: rgb(255 255 255 / .38); box-shadow: inset 0 0 0 1px var(--line); }
.uxn-agent--head .sidebar__label { font-weight: 600; }
.uxn-agent__gear { flex: none; color: var(--ink-soft); display: inline-flex; }
.uxn-tree__kids { display: grid; gap: 2px; margin-left: 20px; padding-left: 8px; border-left: 1.5px solid var(--line); }
.uxn-nested { height: 40px; }
.uxn-nested .sidebar__ico { width: 32px; height: 32px; }
.uxn-nested .sidebar__ico .nx-icon { --nx-size: 20px; }
:root[data-sidebar="collapsed"] .uxn-tree { background: transparent; box-shadow: none; padding: 0; margin: 0 0 4px; }
:root[data-sidebar="collapsed"] .uxn-tree__kids { margin-left: 0; padding-left: 0; border-left: 0; }
:root[data-sidebar="collapsed"] .uxn-nested { height: 44px; }
:root[data-sidebar="collapsed"] .uxn-nested .sidebar__ico { width: 36px; height: 36px; }
:root[data-sidebar="collapsed"] .uxn-agent__gear { display: none; }

/* --- alt-plan a: строка «Подписка и тариф» первой в меню --- */
.uxn-planrow {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px 6px 4px; border-radius: var(--rounded-md);
  color: var(--ink); text-decoration: none; background: var(--primary-faint); box-shadow: inset 0 0 0 1px rgb(79 90 10 / .12);
}
.uxn-planrow .sidebar__ico { background: var(--primary); color: var(--on-primary); }
.uxn-planrow .sidebar__ico .nx-icon { --nx-size: 20px; }
.uxn-planrow__text { display: grid; gap: 4px; min-width: 0; flex: 1; }
.uxn-planrow__title { font: 600 14px/1.15 var(--font-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uxn-tag { justify-self: start; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--rounded-pill); font: 500 12px/1 var(--font-text); background: rgb(255 255 255 / .8); color: var(--ink-soft); white-space: nowrap; }
.uxn-tag--trial { background: #FCE7B2; color: #6A4A00; }
@media (hover: hover) and (pointer: fine) { .uxn-planrow:hover { background: var(--primary-soft); } }
:root[data-sidebar="collapsed"] .sidebar .uxn-planrow { width: 48px; min-height: 48px; padding: 6px; margin-left: 6px; border-radius: 50%; background: transparent; box-shadow: none; justify-content: center; }
.uxn-planrow--sheet { background: var(--primary-faint); }

/* --- alt-plan b: карточка над профилем (как «Быстрый старт» MoonAI) --- */
.uxn-plancard { display: grid; gap: 8px; padding: 14px; border-radius: var(--rounded-md); background: var(--surface-raised); box-shadow: var(--hl-top), var(--shadow-1), 0 0 0 1px var(--line); white-space: normal; }
.uxn-plancard__top { display: flex; align-items: center; gap: 8px; font: 600 14px/1.2 var(--font-text); }
.uxn-plancard__top .nx-icon { --nx-size: 18px; color: var(--primary-ink); }
.uxn-plancard__text { margin: 0; font: 400 13px/1.4 var(--font-text); color: var(--ink-soft); }
.uxn-plancard .btn { width: 100%; }
.uxn-plancard-mini { display: none; }
:root[data-sidebar="collapsed"] .sidebar .uxn-plancard { display: none; }
:root[data-sidebar="collapsed"] .sidebar .uxn-plancard-mini { display: grid; place-items: center; width: 48px; height: 48px; margin-left: 6px; border-radius: 50%; color: var(--ink); background: var(--primary-faint); }

/* --- alt-account a/c: баланс-пилюля и аватар в шапке --- */
.uxn-balpill { display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 4px 0 2px; border-radius: var(--rounded-pill); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); }
.uxn-balpill__main { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 12px; border: 0; border-radius: var(--rounded-pill); background: transparent; cursor: pointer; color: var(--ink); font: 600 14px/1 var(--font-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.uxn-balpill__main .nx-icon { --nx-size: 18px; }
.uxn-balpill__main .nx-kzt { font-weight: 500; }
.uxn-balpill__add { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); text-decoration: none; box-shadow: inset 0 0 0 1px rgb(22 22 22 / .1); }
.uxn-balpill__add::after { content: ""; position: absolute; inset: -6px; }
.uxn-balpill__add .nx-icon { --nx-size: 16px; }
@media (hover: hover) and (pointer: fine) { .uxn-balpill__main:hover { background: var(--surface); } }

.uxn-acc { display: inline-flex; align-items: center; gap: 10px; height: 48px; max-width: 260px; padding: 0 10px 0 4px; border: 0; border-radius: var(--rounded-pill); background: transparent; cursor: pointer; color: var(--ink); text-align: left; }
.uxn-acc__text { display: grid; gap: 2px; min-width: 0; }
.uxn-acc__name { font: 600 14px/1.15 var(--font-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uxn-acc__mail { font: 400 12px/1.2 var(--font-text); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uxn-acc .nx-icon { --nx-size: 16px; color: var(--ink-soft); }
@media (hover: hover) and (pointer: fine) { .uxn-acc:hover { background: var(--surface-raised); } }
@media (max-width: 1279.98px) { .uxn-acc__text { display: none; } .topbar__search { width: 260px; } }

.uxn-accmenu { min-width: 280px; }
.uxn-accmenu__head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; }
.uxn-accmenu__head > span:last-child { display: grid; gap: 2px; min-width: 0; }
.uxn-accmenu__head b { font: 600 14px/1.2 var(--font-text); }
.uxn-accmenu__head span span { font: 400 12px/1.2 var(--font-text); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.uxn-balpop { width: 340px; }
.uxn-balpop__sum { font: 300 34px/1.1 var(--font-display); letter-spacing: -.02em; }
.uxn-balpop__sum .nx-kzt { font-size: 20px; color: var(--ink-soft); }
.uxn-balpop__plan { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px; border-radius: var(--rounded-sm); background: var(--surface); }
.uxn-balpop__plan .sidebar__ico { width: 36px; height: 36px; background: var(--primary); color: var(--on-primary); }

.uxn-agents-menu { max-height: min(560px, 80dvh); overflow-y: auto; }

/* --- телефон --- */
@media (max-width: 767.98px) {
  .uxn-balpill, .uxn-acc { display: none !important; }
  :root:not(#nx-strong)[data-sidebar] .sidebar .uxn-group { display: flex; }
  .mz-msheet__item .uxn-ava .nx-icon { color: #fff; --nx-size: 16px; }
  .mz-msheet__item .uxn-planrow, .uxn-planrow--sheet { min-height: 56px; }
  .uxn-planrow--sheet > .nx-icon { color: var(--ink-soft); }
  .mz-msheet .mz-balance { min-height: 64px; padding: 8px 8px 8px 10px; background: var(--surface-raised); box-shadow: var(--hl-top), 0 0 0 1px var(--line); }
  .uxn-balpop { width: 100%; }
}

/* ================= Раунд 2 (SPEC §6) ================= */
/* кнопки шапки (?) / колокольчик / поиск: круг 40×40, иконка строго по центру (§6.2) */
.topbar .uxn-tbtn { width: 40px; height: 40px; min-width: 40px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; line-height: 0; }
.topbar .uxn-tbtn > .nx-icon { --nx-size: 22px; display: block; width: 22px; height: 22px; margin: 0; grid-area: 1 / 1; }
.topbar .uxn-tbtn > .nx-icon svg { display: block; width: 100%; height: 100%; }
.topbar .uxn-bell .topbar__count { left: auto; right: -6px; top: -4px; }

/* два чипа ИИ */
.uxn-aichips { display: inline-flex; gap: 6px; }
.uxn-aichip { height: 40px; padding: 0 14px 0 12px; text-decoration: none; white-space: nowrap; }
.uxn-aichip[data-ai="off"] { color: var(--ink-soft); }
.uxn-aiphone { display: none; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border: 0; border-radius: var(--rounded-pill); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 600 13px/1 var(--font-text); cursor: pointer; }
.uxn-aiphone__dots { display: inline-flex; gap: 3px; }
.uxn-aiphone__dots i { width: 8px; height: 8px; border-radius: 50%; background: #A39E93; }
.uxn-aiphone__dots i[data-ai="on"] { background: var(--success); box-shadow: 0 0 0 2px rgb(28 115 57 / .15); }
.uxn-airow { text-decoration: none; color: var(--ink); background: var(--surface); }

/* блок профиля: имя + метка тарифа «Стандарт | до 12 ноя» (§6.3) */
.uxn-acc { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 6px 0 2px; border-radius: var(--rounded-pill); }
.uxn-acc__me { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 4px; border: 0; border-radius: var(--rounded-pill); background: transparent; color: var(--ink); cursor: pointer; }
.uxn-acc__name { font: 600 14px/1.15 var(--font-text); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) and (pointer: fine) { .uxn-acc__me:hover { background: var(--surface-raised); } }
.uxn-planpill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: var(--rounded-pill); white-space: nowrap; text-decoration: none; color: var(--ink);
  font: 400 13px/1 var(--font-text); background: linear-gradient(180deg, #FFFFFF, #F4F7E6); box-shadow: inset 0 0 0 1px rgb(79 90 10 / .18), var(--shadow-1); }
.uxn-planpill b { font-weight: 700; }
.uxn-planpill i { width: 1px; height: 14px; background: rgb(22 22 22 / .18); }
.uxn-planpill span { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.uxn-planpill.is-trial { background: linear-gradient(180deg, #FFF8E5, #FCEFC9); box-shadow: inset 0 0 0 1px rgb(154 107 0 / .25); }
.uxn-planpill.is-expired { background: linear-gradient(180deg, #FDF0EE, #F9DEDA); box-shadow: inset 0 0 0 1px rgb(179 43 43 / .28); color: #8E2020; }
@media (hover: hover) and (pointer: fine) { .uxn-planpill:hover { box-shadow: inset 0 0 0 1px rgb(79 90 10 / .35), var(--shadow-2); } }
@media (max-width: 1279.98px) { .uxn-acc__name { display: none; } }

/* метка «ИИ выкл» */
.uxn-off { flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--rounded-pill); font: 600 11.5px/1 var(--font-text); background: rgb(22 22 22 / .07); color: var(--ink-soft); white-space: nowrap; font-size: 12px; }

/* фирменный зелёный блеск (#90D23D): переключатель-ассистент, «Мои ассистенты», «＋ Ассистент» */
.uxn-gloss { position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 140% at 0% 0%, rgb(144 210 61 / .18), transparent 60%), radial-gradient(90% 120% at 100% 100%, rgb(144 210 61 / .12), transparent 60%), var(--surface-raised) !important; }
.uxn-gloss::after { content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / .75), transparent); transform: skewX(-18deg) translateX(0); animation: uxn-shine 6s ease-in-out infinite; }
@keyframes uxn-shine { 0%, 70% { translate: 0 0; opacity: 0; } 72% { opacity: 1; } 92% { translate: 420% 0; opacity: 1; } 93%, 100% { translate: 420% 0; opacity: 0; } }
.uxn-switch--asst { box-shadow: var(--hl-top), inset 0 0 0 1px rgb(144 210 61 / .45) !important; }
.uxn-premium { background: radial-gradient(130% 160% at 100% 50%, rgb(144 210 61 / .22), transparent 65%), rgb(144 210 61 / .07); position: relative; overflow: hidden; isolation: isolate; color: var(--ink); }
.uxn-premium::after { content: ""; position: absolute; top: 0; bottom: 0; left: -30%; width: 22%; z-index: -1; pointer-events: none; background: linear-gradient(100deg, transparent, rgb(255 255 255 / .8), transparent); transform: skewX(-18deg); animation: uxn-shine 6s ease-in-out 1.5s infinite; }
.uxn-premium .sidebar__ico { color: #3E6A12; }
.uxn-premium[aria-current="page"] .sidebar__ico { background: #90D23D; color: #10210A; }
.uxn-premium-btn { color: #10210A !important; box-shadow: inset 0 0 0 1px rgb(144 210 61 / .6) !important; }
:root[data-motion="reduce"] :is(.uxn-gloss, .uxn-premium)::after { animation: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) { :is(.uxn-gloss, .uxn-premium)::after { animation: none; opacity: 0; } }

/* счётчики «ИИ-агенты (N)» */
.uxn-count { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--rounded-pill); display: inline-grid; place-items: center; font: 600 12px/1 var(--font-text); font-variant-numeric: tabular-nums; background: rgb(22 22 22 / .07); color: var(--ink-soft); }
.uxn-premium .uxn-count { background: rgb(144 210 61 / .3); color: #2B4A0B; }
:root[data-sidebar="collapsed"] .sidebar .uxn-count { position: absolute; left: 34px; top: 6px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; background: var(--ink-faint); box-shadow: 0 0 0 2px var(--surface); }
:root[data-sidebar="collapsed"] .sidebar .uxn-premium .uxn-count { background: #90D23D; }
:root[data-sidebar="collapsed"] .sidebar .uxn-off { display: none; }
:root[data-sidebar="collapsed"] .sidebar .uxn-switch--asst { background: transparent !important; box-shadow: none !important; }
:root[data-sidebar="collapsed"] .sidebar .uxn-switch--asst .uxn-ava { box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 4px #90D23D; }
:root[data-sidebar="collapsed"] .sidebar .uxn-switch .uxn-ava__ico { display: grid; }
.uxn-side2 .sidebar__nav { gap: 4px; }

/* окно переключателя: две секции по 3,5 строки (§6.5) */
.uxn-swmenu { width: 340px; max-width: calc(100vw - 24px); }
.uxn-swmenu .menu-sheet__title { display: flex; align-items: center; gap: 6px; }
.uxn-swmenu__n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: rgb(22 22 22 / .07); font: 600 11.5px/1 var(--font-text); font-size: 12px; letter-spacing: 0; }
.uxn-swlist { max-height: calc(52px * 3.5); overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 2px; align-content: start; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent); }
.uxn-swrow { min-height: 52px; }
.uxn-swrow .mz-proj-opt__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uxn-swset .menu-sheet__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uxn-swadd { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 6px 4px; }
.uxn-swadd .btn { width: 100%; justify-content: center; min-height: 40px; }
.uxn-swlocked { color: var(--ink-soft); }
.uxn-msw--asst { border-radius: var(--rounded-sm); }
.uxn-msme { cursor: default; gap: 10px; }
.uxn-msme__name { color: var(--ink); text-decoration: none; font: 500 15px/1.2 var(--font-text); }
.uxn-planpill--sheet { height: 34px; }
@media (max-width: 767.98px) {
  .uxn-aiphone { display: inline-flex; }
  .uxn-swmenu[data-nx-as="sheet"] { width: 100%; }
  .uxn-swlist { max-height: calc(56px * 3.5); }
  .uxn-swrow { min-height: 56px; }
  .uxn-swadd .btn { min-height: 48px; }
}
/* шапка раунда 2: поиск сжимается, чтобы (?) · колокольчик · 2 чипа · баланс · профиль помещались */
@media (min-width: 768px) {
  .topbar__bar { min-width: 0; }
  .topbar__search { flex: 0 1 380px; width: auto !important; min-width: 150px; max-width: 380px; }
  .topbar__search kbd { display: none; }
  /* §9.3: поиск слева, всё от (?) до профиля — вправо */
  .topbar__spacer { flex: 1 1 0; min-width: 0; }
  .topbar__bar > .topbar__title { display: none; }
}
@media (max-width: 1599.98px) { .uxn-acc__name { display: none; } }
@media (max-width: 1279.98px) { .uxn-balpill .nx-kzt { display: none; } }
/* иконка строго по центру круглых кнопок: в теме .btn с иконкой первой получает padding-left 14px — у .btn-icon его быть не должно (§6.2, §6.8) */
.btn.btn-icon.btn-icon { padding: 0; justify-content: center; gap: 0; }
/* знак ассистента — фирменный зелёный (#90D23D), как «маленький зелёный знак» в окне переключателя */
.uxn-ava--asst { background: radial-gradient(120% 120% at 30% 25%, #D5F2A8 0%, #90D23D 55%, #5E9E1F 100%); box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 0 0 1px rgb(0 0 0 / .06); }
.uxn-ava--asst .nx-icon { color: #10210A !important; }
/* страница-объяснение платной функции (§6.7) */
.uxn-locked { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: center; max-width: 920px; margin: 24px auto 0; padding: 40px; border-radius: var(--rounded-xl); background: radial-gradient(120% 120% at 0% 0%, rgb(144 210 61 / .14), transparent 55%), var(--surface-raised); box-shadow: var(--hl-top), var(--shadow-2), 0 0 0 1px var(--line); }
.uxn-locked__art { display: grid; place-items: center; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, var(--surface-subtle)); }
.uxn-locked__body { display: grid; gap: 14px; justify-items: start; }
.uxn-locked__tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--rounded-pill); background: rgb(22 22 22 / .06); font: 600 12px/1 var(--font-text); color: var(--ink-soft); }
.uxn-locked__t { margin: 0; font: 300 34px/1.1 var(--font-display); letter-spacing: -.03em; }
.uxn-locked__lead { margin: 0; font: 400 16px/1.55 var(--font-text); color: var(--ink-soft); max-width: 60ch; }
.uxn-locked__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font: 400 15px/1.4 var(--font-text); }
.uxn-locked__list li { display: flex; gap: 10px; } .uxn-locked__list .nx-icon { color: #3E6A12; flex: none; margin-top: 1px; }
.uxn-locked__plan { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 10px 14px; border-radius: var(--rounded-sm); background: var(--primary-faint); font: 400 14px/1.4 var(--font-text); }
.uxn-locked__acts { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 767.98px) { .uxn-locked { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 16px; margin-top: 8px; border-radius: var(--rounded-lg); } .uxn-locked__art { width: 140px; height: 140px; justify-self: center; } .uxn-locked__art img { width: 104px; height: 104px; } .uxn-locked__t { font-size: 26px; } .uxn-locked__acts .btn { flex: 1 1 100%; } }
@media (min-width: 768px) { .topbar .uxn-tbtn.topbar__phone-only, .topbar .uxn-aiphone { display: none !important; } }
@media (max-width: 767.98px) { .topbar .uxn-tbtn.topbar__desk-only { display: none !important; } .topbar .uxn-tbtn { width: 44px; height: 44px; } }

/* ================= Раунд 3 (SPEC §8) ================= */
/* блок профиля: имя + текст тарифа «Профи» до 12 ноя (без пилюли) */
.uxn-acc { display: inline-flex; align-items: center; gap: 10px; height: 52px; max-width: 280px; padding: 0 10px 0 6px; border: 0; border-radius: var(--rounded-pill); background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.uxn-acc__text { display: grid; gap: 2px; min-width: 0; }
.uxn-acc__name { font: 600 14px/1.15 var(--font-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: none; }
.uxn-acc__plan { font: 400 12px/1.2 var(--font-text); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uxn-acc__plan.is-trial { color: #8A5A00; }
.uxn-acc__plan.is-expired { color: var(--danger); font-weight: 500; }
.uxn-acc > .nx-icon { --nx-size: 16px; color: var(--ink-soft); flex: none; }
@media (hover: hover) and (pointer: fine) { .uxn-acc:hover { background: var(--surface-raised); } }
.uxn-planpill--text { height: auto; padding: 0; background: none; box-shadow: none; font: 400 13px/1.3 var(--font-text); color: var(--ink-soft); }
.uxn-planpill--text.is-expired { color: var(--danger); background: none; box-shadow: none; }
.uxn-planpill--text.is-trial { color: #8A5A00; background: none; box-shadow: none; }
@media (max-width: 1599.98px) { .uxn-acc__name { display: block; max-width: 110px; } }
@media (max-width: 1439.98px) { .uxn-acc__text { display: none; } .uxn-acc > .nx-icon { display: none; } .uxn-acc { padding: 0 4px; } }
.uxn-accmenu__head > span:last-child span { font-variant-numeric: tabular-nums; }

/* один чип ИИ */
.uxn-aichip { max-width: 100%; }
.uxn-aichip__short { display: none; }
@media (max-width: 767.98px) { .uxn-aichip__long { display: none; } .uxn-aichip__short { display: inline; } .uxn-aichip { height: 44px; padding: 0 14px 0 12px; } }

/* «Настройки» под переключателем и подпись агента (alt-ctx=c) */
.uxn-ctxcap { display: flex; align-items: center; gap: 6px; padding: 4px 14px 2px; font: 500 12px/1.3 var(--font-text); color: var(--ink-soft); min-width: 0; }
.uxn-ctxcap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uxn-dis { color: var(--ink-faint) !important; cursor: pointer; }
.uxn-dis .sidebar__ico { color: var(--ink-faint); }
.uxn-side2 .sidebar__nav { gap: 2px; }
.uxn-side2 .uxn-sep { margin: 6px 12px; }
.uxn-side2 .sidebar__link { height: 42px; }

/* раскрывающиеся списки «ИИ-агенты» и «Мои ассистенты» (alt-sidelist-toggle / -row) */
.uxn-sl { --rh: 34px; display: grid; gap: 2px; }
.uxn-sl[data-sl-row="c"] { --rh: 36px; }
.uxn-sl__head { position: relative; display: flex; align-items: center; border-radius: var(--rounded-pill); min-width: 0; }
.uxn-sl__head .sidebar__link { flex: 1 1 auto; min-width: 0; width: auto; background: transparent; }
.uxn-sl__head.uxn-premium .sidebar__link[aria-current="page"] { background: var(--surface-raised); }
.uxn-sl__chev { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-right: 4px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); cursor: pointer; padding: 0; position: relative; }
.uxn-sl__chev .nx-icon { --nx-size: 16px; transition: rotate var(--normal) var(--ease); }
.uxn-sl[data-sl-open="false"] .uxn-sl__chev .nx-icon { rotate: -90deg; }
.uxn-sl__chev::after { content: ""; position: absolute; inset: -4px; }
.uxn-sl__main > .uxn-sl__chev { width: 24px; height: 24px; margin: 0; background: none; }
.uxn-sl__main[aria-expanded="false"] > .uxn-sl__chev .nx-icon { rotate: -90deg; }
.uxn-sl__go { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-right: 6px; border-radius: 50%; color: var(--ink-soft); text-decoration: none; opacity: .55; transition: opacity var(--fast) var(--ease); position: relative; }
.uxn-sl__go::after { content: ""; position: absolute; inset: -6px; }
.uxn-sl__go .nx-icon { --nx-size: 16px; }
.uxn-sl__head:hover .uxn-sl__go, .uxn-sl__go:focus-visible { opacity: 1; }
@media (hover: none) { .uxn-sl__go { opacity: 1; } }
.uxn-sl__body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--normal) var(--ease); }
.uxn-sl[data-sl-open="false"] .uxn-sl__body { grid-template-rows: 0fr; }
.uxn-sl__list { min-height: 0; overflow: hidden; }
.uxn-sl[data-sl-open="true"] .uxn-sl__list { max-height: calc(var(--rh) * 3.5 + 6px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px 0 4px; }
.uxn-sl[data-sl-open="false"] .uxn-sl__list { visibility: hidden; }
.uxn-slrow { position: relative; display: flex; align-items: center; gap: 8px; min-height: var(--rh); height: var(--rh); margin: 0 4px 0 10px; padding: 0 10px 0 8px; border-radius: 12px; color: var(--ink); text-decoration: none; font: 500 13px/1.2 var(--font-text); min-width: 0; }
.uxn-slrow__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uxn-slrow__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 2px rgb(28 115 57 / .14); }
.uxn-slrow.is-off .uxn-slrow__dot { background: #A39E93; box-shadow: none; }
.uxn-slrow.is-off .uxn-slrow__name { color: var(--ink-soft); }
.uxn-slrow__off { flex: none; height: 18px; padding: 0 7px; border-radius: 999px; display: inline-flex; align-items: center; background: rgb(22 22 22 / .07); color: var(--ink-soft); font: 600 12px/1 var(--font-text); }
.uxn-slrow__n { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: rgb(22 22 22 / .07); color: var(--ink-soft); font: 600 12px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.uxn-slrow__n.is-hot { background: var(--danger); color: #fff; }
.uxn-slrow__sq { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--ag, #6B7A90); color: #fff; }
.uxn-slrow__sq .nx-icon { --nx-size: 14px; color: #fff; }
.uxn-slrow__sq--asst { background: radial-gradient(120% 120% at 30% 25%, #D5F2A8, #90D23D 55%, #5E9E1F); }
.uxn-slrow__sq--asst .nx-icon { color: #10210A; }
.uxn-slrow.is-sel { background: var(--surface-raised); box-shadow: var(--hl-top), var(--shadow-1); }
@media (hover: hover) and (pointer: fine) { .uxn-slrow:not(.is-sel):hover { background: rgb(255 255 255 / .6); } }
.uxn-slrow--all, .uxn-slrow--add { color: var(--ink-soft); font-weight: 500; }
.uxn-slrow--all .nx-icon, .uxn-slrow--add .nx-icon { --nx-size: 14px; flex: none; }
.uxn-slrow--all { justify-content: space-between; }
/* b · «Дерево» */
.uxn-sl[data-sl-row="b"] .uxn-sl__list { margin-left: 22px; border-left: 1.5px solid var(--line); }
.uxn-sl[data-sl-row="b"] .uxn-slrow { margin-left: 0; padding-left: 14px; border-radius: 0 12px 12px 0; }
.uxn-sl[data-sl-row="b"] .uxn-slrow::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 1.5px; background: var(--line); }
.uxn-sl[data-sl-row="b"] .uxn-slrow.is-sel { background: transparent; box-shadow: none; font-weight: 700; }
.uxn-sl[data-sl-row="b"] .uxn-slrow.is-sel::before { background: var(--ink); }
/* на рейке: только значок раздела с точкой */
:root[data-sidebar="collapsed"] .sidebar .uxn-sl__body, :root[data-sidebar="collapsed"] .sidebar .uxn-sl__chev, :root[data-sidebar="collapsed"] .sidebar .uxn-sl__go { display: none; }
:root[data-sidebar="collapsed"] .sidebar .uxn-sl__main { width: 48px; margin-left: 6px; padding-right: 0; position: relative; }
:root[data-sidebar="collapsed"] .sidebar .uxn-sl__head.uxn-premium { background: transparent; }
:root[data-sidebar="collapsed"] .sidebar .uxn-sl__main > .uxn-count { position: absolute; left: 34px; top: 6px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; background: var(--ink-faint); }
/* телефон: шторка «Меню» — строки ≥ 44 px при любом варианте */
.uxn-sl--sheet { --rh: 48px; }
.uxn-sl--sheet .sidebar__link { height: 52px; color: var(--ink); font: 500 15px/1.2 var(--font-text); }
.uxn-sl--sheet .sidebar__ico .nx-icon { --nx-size: 22px; color: var(--ink-soft); }
.uxn-sl--sheet .sidebar__label { opacity: 1; width: auto; }
.uxn-sl--sheet .uxn-sl__list { max-height: calc(var(--rh) * 3.5 + 6px) !important; }
.uxn-sl--sheet .uxn-slrow { margin-left: 14px; font-size: 15px; }
.uxn-sl--sheet .uxn-sl__chev { width: 44px; height: 44px; margin-right: 2px; }
.uxn-sl--sheet .uxn-sl__go { width: 44px; height: 44px; opacity: 1; }
.uxn-sheetlists { gap: 6px; }
.uxn-sl--sheet .uxn-sl__head.uxn-premium { margin: 2px 0; }
.uxn-sl--sheet .uxn-count { margin-right: 8px; }
.uxn-sl__head .sidebar__link { padding-right: 6px; gap: 8px; }
.uxn-sl__head .sidebar__link .uxn-count { margin-left: auto; }
.uxn-sl__chev { width: 30px; height: 36px; margin-right: 2px; }
.uxn-sl__main > .uxn-sl__chev { width: 22px; }
@media (max-width: 1599.98px) { .uxn-acc__name { max-width: 140px; } }

/* раунд 3 · цели нажатия в «Меню» на телефоне ≥ 44 px */
.mz-msheet .mz-balance__ico, .mz-msheet .mz-balance__add { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
.mz-msheet .uxn-msme__name { display: flex; flex-direction: column; justify-content: center; min-height: 44px; }
.mz-msheet .uxn-planpill--sheet { display: inline-flex; align-items: center; min-height: 44px; }

/* ================================================================
   Раунд 4 · §9.4 · широкие мониторы (как в проде: shell.css «CRM на широком экране», crm.css)
   Колонка содержимого — --content-max (1440): страница, полоса шапки и полосы-баннеры одной ширины и по центру колонки
   справа от меню. Поля .page: 8 слева + 32 справа (--space-2, --page-pad), поэтому внешняя ширина = 1440 + 40.
   Чаты — на всю ширину, в том числе шапка и баннеры. Левое меню — фиксированной ширины.
   ================================================================ */
:root { --content-max: 1440px; --uxn-col: calc(var(--content-max) + var(--page-pad) + var(--space-2)); }
@media (min-width: 768px) {
  body[data-shell="project"] .page, body[data-shell="panel"] .page { max-width: var(--uxn-col); margin-inline: auto; }
  body[data-shell="project"] .topbar__bar, body[data-shell="panel"] .topbar__bar { margin-inline: auto; max-width: var(--content-max); }
  body[data-shell="project"] .mz-banners, body[data-shell="panel"] .mz-banners { width: 100%; max-width: var(--uxn-col); margin-inline: auto; }
  /* Чаты: три колонки на всю ширину колонки; шапка и баннеры — как на других страницах (§10.3: --content-max по центру) */
  body[data-page="chats"] .page { max-width: none; margin-inline: 0; }
  /* CRM: шапка, поиск, фильтры, чипы и «Ждут ответа» — в колонке 1440 по центру; доска — до 4000, по центру */
  body[data-page="crm"] .page { max-width: none; margin-inline: 0; }
  body[data-page="crm"] :is(#crm-head, #crm-tools, #crm-status) { width: 100%; max-width: var(--content-max); margin-inline: auto; }
}

/* раунд 4 · §9.2 · первая строка списка «＋ Добавить …»: квадрат с «＋» пунктиром, текст цветом ссылки; у ассистентов — лёгкий зелёный блеск */

/* ================================================================
   Раунд 4 · §9.5 · окно уведомлений (колокольчик): аккуратный список вместо серых блоков
   ================================================================ */
.uxn-bellpop { width: 400px; }
.uxn-nt-head { align-items: center; justify-content: flex-start; gap: 8px; padding: 16px 16px 8px; }
.uxn-nt-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--danger); color: #fff; font: 600 12px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.uxn-nt-readall { min-height: 36px; padding: 0 8px; margin-right: -8px; border: 0; border-radius: 10px; background: none; color: var(--info); font: 500 13px/1 var(--font-text); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .uxn-nt-readall:hover { background: rgb(36 89 184 / .08); } }
.uxn-nt-body { padding: 0 8px 8px; }
.uxn-nt-grp { padding: 10px 12px 4px; font: 600 12px/1.2 var(--font-text); letter-spacing: .02em; color: var(--ink-soft); }
.uxn-nt-none { padding: 6px 12px 8px; font: 400 13px/1.4 var(--font-text); color: var(--ink-soft); }
.uxn-nt { position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 2px 0; padding: 10px 12px 10px 22px; border-radius: 14px; min-height: 64px; }
.uxn-nt + .uxn-nt::before { content: ""; position: absolute; left: 70px; right: 12px; top: -1px; height: 1px; background: var(--line); }
@media (hover: hover) and (pointer: fine) { .uxn-nt:hover { background: rgb(22 22 22 / .045); } .uxn-nt:hover::before, .uxn-nt:hover + .uxn-nt::before { opacity: 0; } }
.uxn-nt__dot { position: absolute; left: 8px; top: 24px; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.uxn-nt.is-unread .uxn-nt__dot { background: var(--danger); }
.uxn-nt__ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-subtle); color: var(--ink-soft); }
.uxn-nt__ico .nx-icon { --nx-size: 18px; color: currentColor; }
.uxn-nt[data-tone="red"] .uxn-nt__ico { background: #FBE3E0; color: #B32B2B; }
.uxn-nt[data-tone="green"] .uxn-nt__ico { background: #DDF1E3; color: #1C7339; }
.uxn-nt[data-tone="amber"] .uxn-nt__ico { background: #FCEFCB; color: #8A5B00; }
.uxn-nt[data-tone="blue"] .uxn-nt__ico { background: #DEE7F7; color: #2459B8; }
.uxn-nt__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.uxn-nt__top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.uxn-nt__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; font: 600 14px/1.35 var(--font-text); }
.uxn-nt__title::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }   /* вся строка кликабельна */
.uxn-nt__title:focus-visible { outline: none; }
.uxn-nt__title:focus-visible::after { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.uxn-nt__time { flex: none; font: 400 12px/1.2 var(--font-text); color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.uxn-nt__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font: 400 13px/1.4 var(--font-text); color: var(--ink-soft); }
.uxn-nt.is-unread .uxn-nt__text { color: var(--ink); }
.uxn-nt:not(.is-unread) .uxn-nt__title { font-weight: 500; }
.uxn-nt__act { position: relative; z-index: 1; justify-self: start; min-height: 28px; display: inline-flex; align-items: center; margin: 2px 0 -4px; padding: 0 2px; border-radius: 8px; color: var(--info); text-decoration: none; font: 500 13px/1 var(--font-text); }
@media (hover: hover) and (pointer: fine) { .uxn-nt__act:hover { text-decoration: underline; } }
.uxn-nt-foot { justify-content: space-between; }
.uxn-nt-all { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font: 600 13px/1 var(--font-text); color: var(--ink); text-decoration: none; }
.uxn-nt-all .nx-icon { --nx-size: 16px; }
.uxn-nt-set { min-height: 36px; display: inline-flex; align-items: center; font: 500 13px/1 var(--font-text); color: var(--ink-soft); text-decoration: none; }
@media (max-width: 767.98px) {
  .uxn-bellpop, .uxn-bellpop[data-nx-as="sheet"] { width: 100%; }
  .uxn-nt { min-height: 56px; padding-block: 12px; }
  .uxn-nt__act { min-height: 44px; margin-bottom: -10px; }
  .uxn-nt-readall { min-height: 44px; }
  .uxn-nt-all, .uxn-nt-set { min-height: 44px; }
}
/* ui.js ставит role="menuitem" на ссылки и кнопки в поповере — общий стиль пункта меню сбрасываем для строк уведомлений */
.uxn-bellpop :is(a.uxn-nt__title, a.uxn-nt__act, button.uxn-nt-readall, a.uxn-nt-all, a.uxn-nt-set) { width: auto !important; min-height: 0 !important; padding: 0 !important; background: transparent !important; border-radius: 8px; gap: 6px; }
.uxn-bellpop a.uxn-nt__title { display: block; font: 600 14px/1.35 var(--font-text) !important; color: var(--ink) !important; }
.uxn-bellpop .uxn-nt:not(.is-unread) a.uxn-nt__title { font-weight: 500 !important; }
.uxn-bellpop a.uxn-nt__act { display: inline-flex; min-height: 28px !important; padding: 0 2px !important; color: var(--info) !important; font: 500 13px/1 var(--font-text) !important; }
.uxn-bellpop button.uxn-nt-readall { display: inline-flex; align-items: center; min-height: 36px !important; padding: 0 8px !important; margin-right: -8px; color: var(--info) !important; font: 500 13px/1 var(--font-text) !important; }
.uxn-bellpop a.uxn-nt-all { display: inline-flex; align-items: center; min-height: 36px !important; white-space: nowrap; color: var(--ink) !important; font: 600 13px/1 var(--font-text) !important; }
.uxn-bellpop a.uxn-nt-set { display: inline-flex; align-items: center; min-height: 36px !important; white-space: nowrap; color: var(--ink-soft) !important; font: 500 13px/1 var(--font-text) !important; }
.uxn-bellpop .uxn-nt-all .nx-icon { color: currentColor; }
@media (hover: hover) and (pointer: fine) { .uxn-bellpop button.uxn-nt-readall:hover { background: rgb(36 89 184 / .08) !important; } .uxn-bellpop a.uxn-nt__act:hover { text-decoration: underline; } }
@media (max-width: 767.98px) {
  .uxn-bellpop a.uxn-nt__act { min-height: 44px !important; }
  .uxn-bellpop button.uxn-nt-readall, .uxn-bellpop a.uxn-nt-all, .uxn-bellpop a.uxn-nt-set { min-height: 44px !important; }
  .uxn-bellpop .uxn-nt-foot { gap: 16px; }
}

/* §9.4 · формы настроек и профиля — колонка формы не шире ~880 px внутри центрованной области; тарифы и таблицы — на всю колонку */
@media (min-width: 768px) {
  .uxt-content .uxt-pane { max-width: 880px; }
  .uxt-content .uxt-pane:has(.ux-plans, .ux-tablewrap, .ux-table) { max-width: none; }
  .as-runwrap { max-width: 880px; }
}

/* ================================================================
   Раунд 5 · §10.1 · меню: «Добавить» серые с пунктиром, списки 4,5 строки с затуханием, рейка — только иконка
   ================================================================ */
/* §10.25 · «＋ Добавить» — простая CSS-рамка 1.5px dashed (--ink-faint), фон прозрачный, содержимое по центру; при наведении рамка темнее + лёгкий фон, рамка не пропадает */
.uxn-slrow--add { box-sizing: border-box; justify-content: center; gap: 8px; margin-top: 4px; margin-bottom: 4px; color: var(--ink-soft); font-weight: 500;
  background: transparent; border: 1.5px dashed var(--ink-faint); border-radius: 12px;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), scale var(--fast) var(--ease); }
.uxn-slrow--add::before, .uxn-slrow--add::after { display: none !important; }
.uxn-slrow--add .uxn-slrow__name { flex: 0 1 auto; color: inherit; }
.uxn-slrow__plus { flex: none; display: inline-grid; place-items: center; }
.uxn-slrow__plus .nx-icon { --nx-size: 14px; color: currentColor; }
@media (hover: hover) and (pointer: fine) { .uxn-slrow--add:hover { background-color: var(--surface-subtle, rgb(22 22 22 / .05)); border-color: var(--ink); color: var(--ink); } }
.uxn-slrow--add:active { scale: .98; }
.uxn-slrow--add:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.uxn-sl--sheet .uxn-slrow--add { min-height: 48px; }
/* 4,5 строки + затухание внизу (в окне переключателя — такое же) */
.uxn-sl[data-sl-open="true"] .uxn-sl__list { max-height: calc(var(--rh) * 4.5 + 6px); }
.uxn-sl__list[data-more="1"] { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 30px), transparent); }
.uxn-sl--sheet .uxn-sl__list { max-height: calc(var(--rh) * 3.5 + 6px) !important; }
/* свёрнутое меню: выбранный пункт — только иконка в подсвеченном круге, подпись — в подсказке */
:root[data-sidebar="collapsed"] .sidebar__link[aria-current="page"] { width: 48px; min-width: 48px; max-width: 48px; padding: 0 0 0 6px; }
:root[data-sidebar="collapsed"] .sidebar__link[aria-current="page"] .sidebar__label,
:root[data-sidebar="collapsed"] .sidebar__link[aria-current="page"] .nx-side__label { width: 0; flex: 0 0 0; opacity: 0; overflow: hidden; }
:root[data-sidebar="collapsed"] .sidebar__link[aria-current="page"] .sidebar__badge { position: absolute; left: 28px; top: -3px; box-shadow: 0 0 0 2px var(--surface); }
:root[data-sidebar="collapsed"] .sidebar__link[aria-current="page"] .sidebar__badge--muted { display: none; }

/* §10.8 / §10.13 · «⋯» слева от времени у ответа ИИ — всегда на виду, бледно-серая 16–18 px; нажатие — поповер «Ответ неверный» / «Скопировать текст» */
.mz-msg__meta .mz-msg__more {
  position: relative; display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; margin: 0 2px 0 0; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-faint, #8C8F8D); cursor: pointer; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.mz-msg__meta .mz-msg__more .nx-icon { --nx-size: 17px; color: currentColor; }
.mz-msg__meta .mz-msg__more::after { content: ""; position: absolute; inset: -11px -4px; }   /* цель нажатия ≥ 44 px за счёт невидимого поля */
.mz-msg__meta .mz-msg__more.is-flagged { color: var(--danger); }
@media (hover: hover) and (pointer: fine) { .mz-msg__meta .mz-msg__more:hover, .mz-msg__meta .mz-msg__more[aria-expanded="true"] { background: rgb(22 22 22 / .07); color: var(--ink); } }
.mz-msg__meta .mz-msg__more:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

/* ================================================================
   Раунд 7 · §10.17 п.7 · сворачивание меню — только «Мгновенно»: ширина меню, шапка и тело переключаются сразу,
   содержимое тела проявляется opacity .6 → 1 за 120 мс, ничего не «едет»
   ================================================================ */
@property --sb-w { syntax: "<length>"; inherits: true; initial-value: 288px; }
:root { transition: none; }
.sidebar__panel, .nx-side { transition: none; }
/* сдвиг тела (FLIP из motion-kit: translate на <main>) отключаем — иначе «едет» тело */
@media (min-width: 768px) { .app-main, [data-nx-main] { translate: 0 0 !important; } }
@keyframes uxn-body-in-a { from { opacity: .6; } to { opacity: 1; } }
@keyframes uxn-body-in-b { from { opacity: .6; } to { opacity: 1; } }
:root[data-sidebar="collapsed"] .app-main { animation: uxn-body-in-a 120ms ease-out; }
:root[data-sidebar="expanded"] .app-main { animation: uxn-body-in-b 120ms ease-out; }
:root[data-sidebar-instant], :root[data-sidebar-instant] .sidebar__panel { transition: none !important; }
@media (prefers-reduced-motion: reduce) { :root, .sidebar__panel, .nx-side { transition: none !important; } .app-main { animation: none !important; } }
:root[data-motion="reduce"], :root[data-motion="reduce"] .sidebar__panel { transition: none !important; }
/* подписи в рейке скрываются сразу (без затухания); в развёрнутом виде не переносятся и не вылезают за панель */
:root[data-sidebar="collapsed"] .sidebar .sidebar__link .sidebar__label, :root[data-sidebar="collapsed"] .sidebar .sidebar__link .nx-side__label,
:root[data-sidebar="collapsed"] .sidebar .uxn-logo-live__t { display: none; }
.sidebar .sidebar__link, .sidebar .sidebar__label { white-space: nowrap; }
.sidebar__nav { overflow-x: hidden; }
:root[data-sidebar="collapsed"] .sidebar__nav { overflow-x: clip; overflow-clip-margin: 0; }

/* выбранный пункт — как было: белая плашка + зелёный кружок под иконкой; в рейке — только зелёный кружок, без плашки и без текста */
/* по просьбе владельца (11.10): в рейке у выбранного пункта возвращён белый задний фон (плитка) + зелёный кружок под иконкой, без подписи */
:root[data-sidebar="collapsed"] .sidebar__link[aria-current="page"],
:root[data-sidebar="collapsed"] .sidebar__link[aria-current="page"]:hover { background: var(--surface-raised); box-shadow: var(--hl-top), var(--shadow-1); }

/* одна ось иконок: центр иконки 54 px от края окна и в развёрнутом, и в свёрнутом меню */
.sidebar__link { padding-left: 12px; }
.sidebar__project, .uxn-switch { padding-left: 10px; }
.sidebar__logo { padding-left: 16px; gap: 8px; }
:root[data-sidebar="collapsed"] .sidebar__link { padding-left: 6px; }
:root[data-sidebar="collapsed"] .sidebar__project, :root[data-sidebar="collapsed"] .uxn-switch { padding-left: 4px; }

/* логотип · alt-logo: a — знак + «navex» живым текстом (по умолчанию), b — logo-light.svg */
.uxn-logo-live { display: inline-flex; align-items: center; gap: 8px; line-height: 1; }
.uxn-logo-live .uxn-mark { width: 28px; height: 28px; flex: none; }
.uxn-logo-live__t { font: 600 22px/1 "Inter Tight", var(--font-display), system-ui, sans-serif; letter-spacing: -.02em; color: var(--ink); text-transform: lowercase; position: relative; top: -1px; }
.sidebar__logo :is(.uxn-logo-full, .uxn-logo-mark) { display: none !important; }
:root[data-sidebar="collapsed"] .uxn-logo-mark { width: 28px; margin-left: 0; }
.uxn-logo-live--ins { display: inline-flex; }
img[data-logo-orig] { display: none !important; }

/* вертикаль: те же высоты строк и отступы, что в развёрнутом меню — иконки не прыгают по вертикали */
:root[data-sidebar="collapsed"] .sidebar__project, :root[data-sidebar="collapsed"] .uxn-switch { height: 56px; }
:root[data-sidebar="collapsed"] .sidebar__nav > .sidebar__link, :root[data-sidebar="collapsed"] .sidebar .uxn-sl__main { height: 42px; }
:root[data-sidebar="collapsed"] .uxn-sep { margin-top: 6px; margin-bottom: 6px; }


/* ================================================================
   Раунд 7 · §10.17
   ================================================================ */
/* §10.25 · общий hover строк списка не трогает рамку: свои правила с той же специфичностью */
.uxn-sl .uxn-slrow--add:not(.is-sel) { background: transparent; border: 1.5px dashed var(--ink-faint); }
@media (hover: hover) and (pointer: fine) {
  .uxn-sl .uxn-slrow--add:not(.is-sel):hover { background: var(--surface-subtle, rgb(22 22 22 / .05)); border-color: var(--ink); color: var(--ink); }
}

/* п.5 · иконки в цветных квадратах — белые везде (в окне переключателя общий стиль пункта меню делал их серыми) */
.uxn-ava:not(.uxn-ava--asst) .nx-icon, .uxn-ava:not(.uxn-ava--asst) svg, .uxn-ava:not(.uxn-ava--asst) svg :is(path, g, circle, rect, line, polyline) { color: #fff !important; }
[data-nx-menu] [role^="menuitem"] .uxn-ava:not(.uxn-ava--asst) .nx-icon, .uxn-slrow__sq:not(.uxn-slrow__sq--asst):not(.uxn-slrow__plus) .nx-icon { color: #fff !important; }
.uxn-ava--asst .nx-icon, [data-nx-menu] [role^="menuitem"] .uxn-ava--asst .nx-icon, .uxn-slrow__sq--asst .nx-icon { color: #10210A !important; }

/* п.6 · пункты меню не сжимаются: flex-shrink 0, высота ≥ 40 (на телефоне ≥ 44), вертикальный padding 8 px, одинаковый шаг;
   не помещается по высоте — прокручивается вся колонка меню */
.sidebar__nav > * { flex: none; }
.sidebar__nav > .sidebar__link, .sidebar .uxn-sl__main, :root[data-sidebar="collapsed"] .sidebar__nav > .sidebar__link, :root[data-sidebar="collapsed"] .sidebar .uxn-sl__main {
  flex: none; box-sizing: border-box; height: 44px; min-height: 44px; padding-top: 8px; padding-bottom: 8px;
}
.sidebar__link { padding-left: 16px; }
:root[data-sidebar="collapsed"] .sidebar__link { padding-left: 10px; }
.sidebar__link .sidebar__ico { width: 28px; height: 28px; }
.sidebar__link .sidebar__ico .nx-icon { --nx-size: 20px; }
.uxn-sl { --rh: 40px; flex: none; }
.uxn-slrow { flex: none; box-sizing: border-box; height: var(--rh); min-height: var(--rh); padding-top: 8px; padding-bottom: 8px; }
.uxn-sl--sheet .uxn-slrow { --rh: 48px; }
.sidebar__nav { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
:root[data-sidebar="collapsed"] .sidebar__nav { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
:root[data-sidebar="collapsed"] .sidebar__nav::-webkit-scrollbar { display: none; }

/* п.3 · шапка agents.html — как у assistants.html (та же структура, отступы, радиус), непрозрачный спокойный фон для агентов */
.uxl-head--calm { background: linear-gradient(180deg, #EAF0FA 0%, #F4F7FC 100%) !important; box-shadow: var(--hl-top), var(--shadow-1), inset 0 0 0 1px rgb(47 111 219 / .16) !important; }
.uxn-sl__head, .uxn-sl__body, .uxn-sep { flex: none; }
:root[data-sidebar="collapsed"] .sidebar__link[aria-current="page"] { padding: 8px 0 8px 10px; }

/* ================================================================
   Раунд 8 · по просьбе владельца: в свёрнутом меню переключатель (иконка ИИ-агента под логотипом) сохраняет белый фон плитки
   ================================================================ */
:root[data-sidebar="collapsed"] .sidebar .sidebar__project, :root[data-sidebar="collapsed"] .sidebar .uxn-switch {
  width: 48px; height: 48px; margin: 4px 0 4px 6px; padding: 4px; border-radius: 16px; justify-content: center;
  background: var(--surface-raised); box-shadow: var(--hl-top), var(--shadow-1), 0 0 0 1px var(--line);
}
/* ассистент в рейке — тоже своя белая плитка: без зелёного блеска, зелёной рамки и кольца вокруг иконки */
:root[data-sidebar="collapsed"] .sidebar .uxn-switch.uxn-switch--asst, :root[data-sidebar="collapsed"] .sidebar .uxn-switch.uxn-switch--asst.uxn-gloss {
  background: var(--surface-raised) !important; box-shadow: var(--hl-top), var(--shadow-1), 0 0 0 1px var(--line) !important;
}
:root[data-sidebar="collapsed"] .sidebar .uxn-switch--asst::after { display: none !important; }
:root[data-sidebar="collapsed"] .sidebar .uxn-switch--asst .uxn-ava, :root[data-sidebar="collapsed"] .sidebar .uxn-switch .uxn-ava { box-shadow: none !important; }

/* ================================================================
   Раунд 8 · §10.18 / §10.19 · деньги: alt-money (ok · balance-zero · plan-expired · both), способ показа alt-moneybar (a/b/c/d)
   ================================================================ */
/* полоса: красная во всех трёх состояниях */
.notice--money { background: linear-gradient(90deg, rgb(179 43 43 / .13), rgb(179 43 43 / .05)), var(--surface-raised); box-shadow: inset 0 0 0 1px rgb(179 43 43 / .28); }
.notice--money .notice__ico { background: var(--danger); color: #fff; }
.notice--money .notice__text { color: var(--ink); font-weight: 500; }
.notice--money .notice__actions { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.notice--money .btn-primary { background: var(--danger); color: #fff; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .notice--money .btn-primary:hover { background: #962222; } }
.notice--slim { min-height: 36px; padding-block: 4px; align-items: center; }
.notice--slim .notice__text { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 767.98px) {
  .notice--money { flex-wrap: wrap; }
  .notice--money .notice__text { flex: 1 1 calc(100% - 48px); }
  .notice--money .notice__actions { flex: 1 1 100%; width: 100%; }
  .notice--money .notice__actions .btn { flex: 1 1 auto; min-height: 44px; }
  .notice--slim { flex-wrap: nowrap; }
  .notice--slim .notice__text { flex: 1 1 auto; white-space: normal; }
  .notice--slim .notice__actions { flex: none; width: auto; }
  .notice--slim .notice__actions .btn { flex: none; }
}
/* баланс-пилюля в шапке — красноватая при нуле */
.uxn-balpill.is-zero { background: rgb(179 43 43 / .1) !important; box-shadow: inset 0 0 0 1px rgb(179 43 43 / .3) !important; color: #8E2020; }
.uxn-balpill.is-zero .uxn-balpill__main { color: #8E2020; }
.uxn-balpill.is-zero .nx-icon { color: #B32B2B; }
/* чип ИИ: серая точка, причина в меню */
.uxn-aistop { display: grid; gap: 10px; }
.uxn-aistop__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.uxn-aistop .mz-switch-row__title { color: var(--danger); }
.uxn-aistop .nx-switch:disabled { opacity: .45; }
/* переключатели на карточках — неактивны */
.uxl-aisw.is-blocked, .ux-aiswitch.is-blocked { cursor: not-allowed; }
.uxl-aisw.is-blocked .uxl-aisw__t, .ux-aiswitch.is-blocked .ux-aiswitch__text { color: var(--danger); }
.uxl-aisw.is-blocked .nx-switch, .ux-aiswitch.is-blocked .nx-switch { opacity: .45; }
/* режим просмотра */
.is-ro { opacity: .55; cursor: not-allowed !important; filter: grayscale(.4); }
html[data-uxn-ro] .mz-composer, html[data-uxn-ro] [data-nx-composer] { opacity: .6; }
.uxn-slrow--add.is-ro { opacity: .55; }
/* d «Окно при входе» */
.uxn-moneymodal { --nx-modal-w: 480px; }
.uxn-moneymodal .modal__head { align-items: center; gap: 12px; }
.uxn-moneymodal__ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgb(179 43 43 / .12); color: var(--danger); }
.uxn-moneymodal .modal__footer .btn-primary { background: var(--danger); color: #fff; }
@media (max-width: 767.98px) { .uxn-moneymodal .modal__footer { flex-direction: column-reverse; align-items: stretch; } .uxn-moneymodal .modal__footer .btn { min-height: 48px; } }

/* баг: из-за flex: none у .uxn-sl__main заголовок «ИИ-агенты» / «Мои ассистенты» не растягивался — стрелка стояла не справа */
.sidebar .uxn-sl__head > .uxn-sl__main { flex: 1 1 auto; min-width: 0; width: auto; }

/* раунд 8: уточнения денег */
.uxn-moneycard__t { white-space: normal; overflow: visible; text-overflow: clip; }
.uxn-moneymodal .modal__head { justify-content: flex-start; }
.uxn-moneymodal .modal__title { text-align: left; }

/* ================================================================
   Раунд 8 · по просьбе владельца: пункты левого меню (от «Дашборда» и ниже) и списки ИИ-агентов / ассистентов — теснее.
   Рабочие пункты 40 px (было 44), строки списков 34 px (было 40), «Добавить» 30 px; шаг и отступы пересчитаны.
   Ось иконок остаётся на 54 px от края окна.
   ================================================================ */
.sidebar__nav { gap: 1px; padding-top: 8px; }
.sidebar__nav > .sidebar__link, .sidebar .uxn-sl__main, :root[data-sidebar="collapsed"] .sidebar__nav > .sidebar__link, :root[data-sidebar="collapsed"] .sidebar .uxn-sl__main {
  height: 40px; min-height: 40px; padding-top: 8px; padding-bottom: 8px;
}
.sidebar__link { padding-left: 18px; gap: 10px; }
:root[data-sidebar="collapsed"] .sidebar__link { padding-left: 12px; }
:root[data-sidebar="collapsed"] .sidebar__link[aria-current="page"] { padding: 8px 0 8px 12px; }
.sidebar__link .sidebar__ico { width: 24px; height: 24px; }
.sidebar__link .sidebar__ico .nx-icon { --nx-size: 19px; }
.sidebar .uxn-sep, .uxn-sep { margin-top: 4px; margin-bottom: 4px; }
:root[data-sidebar="collapsed"] .uxn-sep { margin-top: 4px; margin-bottom: 4px; }
/* списки */
.uxn-sl { --rh: 34px; }
.uxn-sl__list { padding: 0 0 2px; }
.uxn-sl[data-sl-open="true"] .uxn-sl__list { max-height: calc(var(--rh) * 4.5 + 6px); padding: 1px 0 3px; }
.uxn-slrow { height: var(--rh); min-height: var(--rh); padding-top: 4px; padding-bottom: 4px; margin-top: 0; margin-bottom: 1px; gap: 8px; font-size: 13px; }
.uxn-slrow__sq { width: 20px; height: 20px; border-radius: 6px; }
.uxn-slrow__sq .nx-icon { --nx-size: 13px; }
.uxn-sl .uxn-slrow--add { height: 30px; min-height: 30px; padding-top: 3px; padding-bottom: 3px; margin-top: 3px; margin-bottom: 4px; font-size: 12.5px; gap: 6px; border-radius: 10px; }
.uxn-slrow--add .uxn-slrow__plus .nx-icon { --nx-size: 13px; }
.uxn-sl--sheet { --rh: 48px; }
.uxn-sl--sheet .uxn-slrow { font-size: 15px; padding-top: 8px; padding-bottom: 8px; }
.uxn-sl--sheet .uxn-slrow--add { height: 48px; min-height: 48px; font-size: 14px; }
.uxn-sl--sheet .uxn-sl__main { height: 48px; }
.uxn-slrow { padding-left: 10px; }
.uxn-sl[data-sl-row="b"] .uxn-slrow { padding-left: 14px; }

/* по просьбе владельца: зелёный кружок под иконкой выбранного пункта чуть больше (белая плитка не меняется — кружок вынесен отрицательным отступом) */
.sidebar__link[aria-current="page"] .sidebar__ico { width: 30px; height: 30px; margin: -3px; flex: none; }
.sidebar__link[aria-current="page"] .sidebar__ico .nx-icon { --nx-size: 20px; }
/* «ИИ-агенты» / «Мои ассистенты» на своей странице — такая же белая плитка на всю ширину (со стрелкой), как у остальных пунктов */
.uxn-sl__head:has(> .uxn-sl__main[aria-current="page"]) { background: var(--surface-raised) !important; box-shadow: var(--hl-top), var(--shadow-1); }
.uxn-sl__head > .uxn-sl__main[aria-current="page"], .uxn-sl__head.uxn-premium > .uxn-sl__main[aria-current="page"] { background: transparent !important; box-shadow: none !important; }
:root[data-sidebar="collapsed"] .sidebar .uxn-sl__head:has(> .uxn-sl__main[aria-current="page"]) { background: transparent !important; box-shadow: none; }
:root[data-sidebar="collapsed"] .sidebar .uxn-sl__main[aria-current="page"] { background: var(--surface-raised) !important; box-shadow: var(--hl-top), var(--shadow-1) !important; }


/* ================================================================
   Раунд 8 · §10.20 · «деньги»: e — линия 4 px + красная полоса над шапкой; f — красная лента сверху (36–40 px, на 390 — 44 px)
   ================================================================ */
.uxn-moneyline { position: fixed; z-index: 480; top: 0; left: 0; right: 0; height: 4px; background: var(--danger); pointer-events: none; }
/* e: полоса — самая первая, выше шапки и других полос; шапка остаётся ниже */
.topbar.has-moneybar { height: auto; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; padding-top: 12px; }
.topbar.has-moneybar .uxn-moneybar { width: 100%; max-width: var(--content-max, 1440px); margin: 0 auto; flex: none; }
body[data-page="chats"] .topbar.has-moneybar .uxn-moneybar { max-width: var(--content-max, 1440px); }
.topbar.has-moneybar .topbar__bar { flex: none; }
@media (max-width: 767.98px) {
  .topbar.has-moneybar { padding: 8px 12px 0; gap: 8px; }
  .topbar.has-moneybar .topbar__bar { padding-inline: 0; }
}
/* f: лента */
:root { --uxn-ribbon-h: 40px; }
@media (max-width: 767.98px) { :root { --uxn-ribbon-h: 44px; } }
.uxn-ribbon { position: fixed; z-index: 480; top: 0; left: 0; right: 0; height: var(--uxn-ribbon-h); display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--danger); color: #fff; }
.uxn-ribbon__main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: 600 14px/1.2 var(--font-text); }
.uxn-ribbon__ico { flex: none; display: grid; place-items: center; }
.uxn-ribbon__ico .nx-icon { color: #fff; --nx-size: 18px; }
.uxn-ribbon__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uxn-ribbon__acts { flex: none; display: inline-flex; gap: 8px; align-items: center; }
.uxn-ribbon__btn { height: 28px; min-height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: #fff; color: #8E2020; font: 600 13px/1 var(--font-text); box-shadow: none; }
.uxn-ribbon__btn--secondary { background: rgb(255 255 255 / .22); color: #fff; }
@media (hover: hover) and (pointer: fine) { .uxn-ribbon__btn:hover { background: #FBE9E7; } .uxn-ribbon__btn--secondary:hover { background: rgb(255 255 255 / .34); } }
@media (max-width: 767.98px) {
  .uxn-ribbon { padding: 0 12px; }
  .uxn-ribbon__btn { height: 36px; min-height: 36px; }
  .uxn-ribbon__btn--secondary { display: none; }   /* на 390 — одна кнопка «Продлить» (или «Пополнить»); подробности — по нажатию на текст */
  .uxn-ribbon__main { min-height: 44px; }
}
html[data-uxn-ribbon] .app-shell { padding-top: var(--uxn-ribbon-h); }
html[data-uxn-ribbon] .sidebar { top: var(--uxn-ribbon-h); height: calc(100dvh - var(--uxn-ribbon-h)); }
@media (max-width: 767.98px) { html[data-uxn-ribbon] .topbar { top: var(--uxn-ribbon-h); } }
/* окно-напоминание */
.uxn-moneymodal .uxn-moneymodal__pay { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.uxn-moneymodal .uxn-moneymodal__pay .btn { flex: 1 1 auto; }
.uxn-moneymodal .uxn-moneymodal__later { margin-top: 8px; justify-content: flex-start; flex-wrap: wrap; gap: 4px; }
.uxn-moneymodal .uxn-moneymodal__later .btn { color: var(--ink-soft); }
.uxn-moneymodal .modal__footer { flex-direction: row; }
@media (max-width: 767.98px) {
  .uxn-moneymodal .uxn-moneymodal__later { flex-direction: column; align-items: stretch; }
  .uxn-moneymodal .uxn-moneymodal__later .btn, .uxn-moneymodal .uxn-moneymodal__pay .btn { min-height: 48px; }
}


/* ================================================================
   Раунд 9 · центровка кнопок: допуск ≤ 1 px (замер скриптом по всем страницам на 390 и 1440)
   ================================================================ */
.uxn-balpill__main { padding: 0 10px; }
.uxn-aichip { padding: 0 14px; justify-content: center; }
@media (max-width: 767.98px) { .uxn-aichip { padding: 0 14px; } }
.mz-fab, .btn-fab { padding: 0 !important; display: inline-grid; place-items: center; }
.mz-fab .nx-icon, .btn-fab .nx-icon { margin: 0; }


/* ================================================================
   Раунд 9 · §10.22 · «деньги»: ПК — линия + красная полоса, закреплённая вверху окна; телефон — лента (f)
   ================================================================ */
:root { --uxn-money-top-h: 52px; }
@media (min-width: 768px) {
  html[data-uxn-moneyform="e"] { --uxn-ribbon-h: var(--uxn-money-top-h); }
}
.uxn-moneytop { position: fixed; z-index: 470; top: 4px; left: 0; right: 0; height: calc(var(--uxn-money-top-h) - 4px); display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: linear-gradient(90deg, #FBE4E1, #FDEFED); color: #5E1414; box-shadow: inset 0 -1px 0 rgb(179 43 43 / .35); }
.uxn-moneytop .notice__ico { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--danger); color: #fff; }
.uxn-moneytop .notice__ico .nx-icon { --nx-size: 16px; color: #fff; }
.uxn-moneytop__t { flex: 1 1 auto; min-width: 0; font: 600 14px/1.3 var(--font-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uxn-moneytop__acts { flex: none; display: inline-flex; gap: 8px; }
.uxn-moneytop .btn-primary { background: var(--danger); color: #fff; box-shadow: none; }
.uxn-moneytop .btn-secondary { background: #fff; }
.uxn-moneyline { z-index: 480; }
/* страница и меню начинаются под полосой; шапка остаётся нелипкой (поднимается вместе со страницей), полоса — на месте */
@media (min-width: 768px) {
  html[data-uxn-moneyform="e"] .app-shell { padding-top: var(--uxn-money-top-h); }
  html[data-uxn-moneyform="e"] .sidebar { top: var(--uxn-money-top-h); height: calc(100dvh - var(--uxn-money-top-h)); }
}
@media (max-width: 767.98px) { .uxn-moneytop { display: none; } }


/* по просьбе владельца: в рейке белая плитка переключателя — того же размера, что в развёрнутом меню (56 px по высоте, во всю ширину рейки) */
:root[data-sidebar="collapsed"] .sidebar .sidebar__project, :root[data-sidebar="collapsed"] .sidebar .uxn-switch {
  width: 100%; height: 56px; margin: 0; padding: 0; border-radius: var(--rounded-md); justify-content: center;
}

/* по просьбе владельца: в свёрнутом меню у плитки переключателя нет рамки и тени — остаётся только белый фон */
:root[data-sidebar="collapsed"] .sidebar .sidebar__project,
:root[data-sidebar="collapsed"] .sidebar .uxn-switch,
:root[data-sidebar="collapsed"] .sidebar .uxn-switch.uxn-switch--asst,
:root[data-sidebar="collapsed"] .sidebar .uxn-switch.uxn-switch--asst.uxn-gloss { border: 0 !important; box-shadow: none !important; }


/* по просьбе владельца: в рейке у второго элемента (переключатель под логотипом) нет белого фона — только сама иконка, с рамкой */
:root[data-sidebar="collapsed"] .sidebar .sidebar__project,
:root[data-sidebar="collapsed"] .sidebar .uxn-switch,
:root[data-sidebar="collapsed"] .sidebar .uxn-switch.uxn-switch--asst,
:root[data-sidebar="collapsed"] .sidebar .uxn-switch.uxn-switch--asst.uxn-gloss { background: transparent !important; }
:root[data-sidebar="collapsed"] .sidebar .uxn-switch .uxn-ava { border: 2px solid #fff; box-shadow: 0 0 0 1px rgb(22 22 22 / .16) !important; }
/* рамка иконки — снаружи (размер иконки 40 px не меняется): белая 2 px + тонкое кольцо */
:root[data-sidebar="collapsed"] .sidebar .uxn-switch .uxn-ava { border: 0; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgb(22 22 22 / .16) !important; }


/* ================================================================
   Раунд 12 · §11.2 · меню
   ================================================================ */
/* 1. черта между «ИИ-агенты» и «Мои ассистенты» — как между блоками выше (.uxn-sep); на телефоне — два отдельных серых блока */
.mz-msheet > .uxn-sheetlists + .uxn-sheetlists { margin-top: 0; }
/* 2. блик «Мои ассистенты»: проходит всю ширину пункта и мягко гаснет; цикл 6 с; без движения при reduced-motion */
.uxn-premium::after { left: -30%; width: 22%; opacity: 0; animation: uxn-shine-wide 6s ease-in-out 1.5s infinite; }
@keyframes uxn-shine-wide {
  0%, 55% { translate: 0 0; opacity: 0; }
  63% { opacity: 1; }
  90% { translate: 700% 0; opacity: 1; }
  100% { translate: 760% 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .uxn-premium::after, .uxn-gloss::after { animation: none !important; opacity: 0 !important; } }
:root[data-motion="reduce"] .uxn-premium::after, :root[data-motion="reduce"] .uxn-gloss::after { animation: none !important; opacity: 0 !important; }
/* 3. свёрнутое меню: между рейкой и основным блоком ≈ 16 px (рейка 12 + 84 = 96 → колонка 104, шапка отступает ещё 8) */
:root[data-sidebar="collapsed"] { --sb-w-closed: 104px; --sb-w: 104px; }

/* §11.11 · иконка звука у колокольчика */
.uxn-bellwrap { position: relative; display: inline-flex; flex: none; }
.uxn-snd { position: absolute; right: -2px; bottom: 0; z-index: 2; display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--surface-raised); color: var(--ink-soft); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.uxn-snd::before { content: ""; position: absolute; inset: -13px; }               /* зона нажатия ≥ 44 px */
.uxn-snd .nx-icon { --nx-size: 12px; }
.uxn-snd[data-snd="off"] { color: var(--ink-faint); }
.uxn-snd[data-snd="on"] .uxn-snd__off, .uxn-snd[data-snd="off"] .uxn-snd__on { display: none; }
.uxn-snd:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { .uxn-snd:hover { color: var(--ink); } }

/* по просьбе владельца (13.10): у пункта «Мои ассистенты» в меню нет зелёного цвета и блика — такой же, как «ИИ-агенты»
   (класс .uxn-premium с заголовка списка снят в shell.js; правила выше остались только для «＋ Ассистент» в окне переключателя) */

/* §12.1.2 · звук — в окне колокольчика, рядом с «Прочитать все» */
.uxn-nt-snd { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; margin-right: 2px; border: 0; border-radius: 10px; background: none; color: var(--ink-soft); font: 500 13px/1 var(--font-text); cursor: pointer; }
.uxn-nt-snd .nx-icon { --nx-size: 16px; }
.uxn-nt-snd[data-snd="on"] .uxn-snd__off, .uxn-nt-snd[data-snd="off"] .uxn-snd__on { display: none; }
.uxn-nt-snd[data-snd="off"] { color: var(--ink-faint); }
@media (hover: hover) and (pointer: fine) { .uxn-nt-snd:hover { background: rgb(22 22 22 / .06); color: var(--ink); } }
.uxn-nt-snd:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
@media (max-width: 767.98px) { .uxn-nt-snd { min-height: 44px; } }
.uxn-bellpop button.uxn-nt-snd { display: inline-flex !important; min-height: 36px !important; padding: 0 10px !important; width: auto !important; }
@media (max-width: 767.98px) { .uxn-bellpop button.uxn-nt-snd { min-height: 44px !important; } }

/* §12.5 · аккаунт без ИИ-агента: на рабочих страницах агента только пустое состояние */
html[data-uxn-noagent] #main > :not(.uxn-noagent), html[data-uxn-noagent] .app-main > :not(.uxn-noagent) { display: none !important; }
.uxn-noagent { display: grid; place-items: center; min-height: 60vh; padding: 24px 16px; }
.uxn-noagent__box { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 520px; padding: 32px 24px; border-radius: var(--rounded-xl); background: var(--surface-raised); box-shadow: var(--hl-top), var(--shadow-1), 0 0 0 1px var(--line); }
.uxn-noagent__t { margin: 0; font: 400 28px/1.15 var(--font-display); letter-spacing: -.02em; }
.uxn-noagent__lead { margin: 0; color: var(--ink-soft); font: 400 15px/1.5 var(--font-text); }
.uxn-noagent__acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
@media (max-width: 767.98px) { .uxn-noagent__t { font-size: 24px; } .uxn-noagent__acts .btn { flex: 1 1 100%; } }

/* планшет 768–1100 px: шапка не должна быть шире экрана — поиск сжимается до кнопки-лупы */
@media (min-width: 768px) and (max-width: 1100px) {
  .topbar__bar .topbar__search { flex: 1 1 0; min-width: 44px; max-width: 100%; overflow: hidden; }
  .topbar__bar .topbar__search > :not(.nx-icon):not(svg):not(i):not(:first-child) { min-width: 0; }
}

/* §12.6 п.2 · звук в окне колокольчика — только иконка (динамик / перечёркнутый), без текста */
.uxn-nt-snd { width: 36px; padding: 0; justify-content: center; }
@media (max-width: 767.98px) { .uxn-nt-snd, .uxn-bellpop button.uxn-nt-snd { width: 44px; } }
.uxn-bellpop button.uxn-nt-snd { width: 36px !important; padding: 0 !important; justify-content: center; }
