/* go7.uz — «AI-офис» (assets/js/office.js): пиксельный офис AI-сотрудников, карточки и лента */
.of-page { max-width: 1480px; }
.of-root { --of-seller: #2F6FED; --of-marketer: #E5476A; --of-boss: #64748B; }
.of-load { display: grid; place-items: center; min-height: 50vh; }

/* Шапка */
.of-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.of-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.of-title-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(135deg, #2F6FED 0%, #8B5CF6 55%, #E5476A 100%); box-shadow: 0 6px 18px rgba(91, 76, 230, .28); }
.of-title h1 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.of-title p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.of-head-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.of-head-r .btn { display: inline-flex; align-items: center; gap: 6px; }
.of-live { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  color: #15803D; background: rgba(22, 163, 74, .12); text-transform: uppercase; }
.of-live i { width: 7px; height: 7px; border-radius: 50%; background: #16A34A; animation: of-pulse 1.6s infinite; }
.of-clock { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: .85rem; }
.of-clock b { font-variant-numeric: tabular-nums; }
@keyframes of-pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .55); } 70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }

/* Сцена */
.of-stagewrap { border-radius: 18px; overflow: hidden; background: #1B2030; border: 1px solid var(--line); box-shadow: var(--shadow, 0 10px 30px rgba(15, 23, 42, .10)); }
.of-stage { position: relative; width: 100%; aspect-ratio: 448 / 240; --u: 2px; user-select: none; }
.of-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.of-stage > :not(canvas) { position: absolute; }

.of-tag { transform: translate(-50%, -100%); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; cursor: pointer; border: 0;
  padding: calc(var(--u) * .9) calc(var(--u) * 2.6); border-radius: 99px; background: rgba(17, 22, 38, .80); color: #fff;
  font: 600 clamp(9px, calc(var(--u) * 4), 13px)/1.2 inherit; font-family: inherit; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); z-index: 3; }
.of-tag i { width: clamp(5px, calc(var(--u) * 2), 8px); height: clamp(5px, calc(var(--u) * 2), 8px); border-radius: 50%; background: #3EDB8A; flex: none; }
.of-tag[data-k="seller"] { box-shadow: 0 0 0 1.5px rgba(47, 111, 237, .9), 0 2px 6px rgba(0, 0, 0, .25); }
.of-tag[data-k="marketer"] { box-shadow: 0 0 0 1.5px rgba(229, 71, 106, .9), 0 2px 6px rgba(0, 0, 0, .25); }
.of-tag.off i { background: #94A3B8; }
.of-tag em { display: none; gap: 2px; margin-left: 2px; }
.of-tag.busy em { display: inline-flex; }
.of-tag em u, .of-dots u { width: 3px; height: 3px; border-radius: 50%; background: currentColor; display: inline-block; animation: of-dot 1.1s infinite; }
.of-tag em u:nth-child(2), .of-dots u:nth-child(2) { animation-delay: .18s; }
.of-tag em u:nth-child(3), .of-dots u:nth-child(3) { animation-delay: .36s; }
@keyframes of-dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.of-tag:hover { background: rgba(17, 22, 38, .95); }
.of-tag:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.of-bub { transform: translate(-50%, -100%); max-width: clamp(150px, calc(var(--u) * 100), 330px); width: max-content; z-index: 4; pointer-events: none;
  background: #fff; color: #1E2433; border-radius: 12px; padding: calc(var(--u) * 2.2) calc(var(--u) * 3.2);
  font: 500 clamp(10.5px, calc(var(--u) * 4.4), 14px)/1.35 inherit; font-family: inherit; box-shadow: 0 6px 18px rgba(15, 23, 42, .22); border: 1px solid rgba(15, 23, 42, .06); }
.of-bub::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #fff; }
.of-bub.left { transform: translate(-86%, -100%); } .of-bub.left::after { left: 86%; }
.of-bub.right { transform: translate(-14%, -100%); } .of-bub.right::after { left: 14%; }
.of-bub.in { animation: of-in .28s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes of-in { from { opacity: 0; margin-top: 6px; scale: .92; } to { opacity: 1; margin-top: 0; scale: 1; } }
.of-emo { transform: translate(-50%, -100%); font-size: clamp(12px, calc(var(--u) * 6), 20px); z-index: 3; pointer-events: none; animation: of-float 2.4s ease-in-out infinite; }
@keyframes of-float { 0%, 100% { margin-top: 0; } 50% { margin-top: -4px; } }

.of-zone { transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap; color: rgba(70, 48, 26, .42); font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  font-size: clamp(8px, calc(var(--u) * 3.3), 12px); }
.of-board { left: calc(138 / 448 * 100%); top: calc(8 / 240 * 100%); width: calc(70 / 448 * 100%); height: calc(30 / 240 * 100%); padding: calc(var(--u) * 1.4) calc(var(--u) * 2.4);
  color: #24324A; display: flex; flex-direction: column; gap: calc(var(--u) * .6); overflow: hidden; pointer-events: none; }
.of-board b { font-size: clamp(7px, calc(var(--u) * 3.3), 12px); color: #E5476A; text-transform: uppercase; letter-spacing: .08em; }
.of-board-l { display: grid; grid-template-columns: 1fr 1fr; gap: 0 calc(var(--u) * 2); font-size: clamp(7px, calc(var(--u) * 3.2), 12px); font-weight: 600; line-height: 1.35; }
.of-board-l span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-poster-cap { transform: translate(-50%, 0); pointer-events: none; color: rgba(60, 50, 90, .55); font-weight: 700; white-space: nowrap; font-size: clamp(7px, calc(var(--u) * 2.8), 11px); }
.of-soon { transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; z-index: 2; font-family: inherit;
  padding: calc(var(--u) * 2) calc(var(--u) * 4); border-radius: 12px; border: 1px dashed rgba(255, 255, 255, .7); background: rgba(30, 36, 60, .55); color: #fff; backdrop-filter: blur(2px); }
.of-soon b { font-size: clamp(9px, calc(var(--u) * 3.8), 14px); }
.of-soon span { font-size: clamp(8px, calc(var(--u) * 3), 11px); color: #FCD34D; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.of-soon:hover { background: rgba(30, 36, 60, .72); }
.of-lock { transform: translate(-50%, -100%); display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; z-index: 2; white-space: nowrap;
  background: rgba(17, 22, 38, .78); color: #fff; font-size: clamp(9px, calc(var(--u) * 3.4), 12px); text-decoration: none; }

.of-pop { width: 270px; transform: translate(-50%, calc(-100% - 6px)); z-index: 6; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 14px 12px; box-shadow: 0 14px 36px rgba(15, 23, 42, .28); }
.of-pop.below { transform: translate(-50%, 6px); }
.of-pop.left { transform: translate(-82%, calc(-100% - 6px)); }
.of-pop.left.below { transform: translate(-82%, 6px); }
.of-pop.in { animation: of-in .22s ease-out; }
.of-pop-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 22px; }
.of-pop p { margin: 8px 0 0; font-size: .88rem; color: var(--ink-2); line-height: 1.4; }
.of-pop .of-pop-last { display: flex; gap: 6px; color: var(--muted); font-size: .82rem; }
.of-pop .of-pop-last .ico { flex: none; margin-top: 2px; }
.of-pop .btn { margin-top: 12px; display: inline-flex; align-items: center; gap: 4px; }
.of-pop-x { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; display: grid; }
.of-pop-x:hover { background: var(--surface-2); color: var(--ink); }

/* Статусы */
.of-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; white-space: nowrap; flex: none; }
.of-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.of-pill.ok { color: #15803D; background: rgba(22, 163, 74, .12); }
.of-pill.live { color: #15803D; background: rgba(22, 163, 74, .14); }
.of-pill.live i { animation: of-pulse 1.6s infinite; background: #16A34A; }
.of-pill.muted { color: var(--muted); background: var(--surface-2); }
.of-pill.soon { color: #B45309; background: rgba(245, 158, 11, .14); }
html[data-theme="dark"] .of-pill.ok, html[data-theme="dark"] .of-pill.live { color: #6EE7B7; }
html[data-theme="dark"] .of-pill.soon { color: #FCD34D; }
html[data-theme="dark"] .of-live { color: #6EE7B7; }

/* Карточки и лента */
.of-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; margin-top: 16px; align-items: start; }
.of-agents { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.of-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.of-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--of-c, var(--line)); }
.of-card.k-seller { --of-c: var(--of-seller); --of-soft: rgba(47, 111, 237, .10); }
.of-card.k-marketer { --of-c: var(--of-marketer); --of-soft: rgba(229, 71, 106, .10); }
.of-card.k-boss { --of-c: #E0A526; --of-soft: rgba(224, 165, 38, .14); }
.of-card.k-boss.st-soon { --of-c: #94A3B8; --of-soft: rgba(100, 116, 139, .10); border-style: dashed; cursor: pointer; }
.of-card.st-off .of-ava, .of-card.st-locked .of-ava, .of-card.st-noaccess .of-ava, .of-card.st-soon .of-ava { filter: grayscale(.7); opacity: .8; }
.of-card-h { display: flex; align-items: center; gap: 12px; }
.of-ava { width: 56px; height: 56px; border-radius: 16px; background: var(--of-soft); display: grid; place-items: center; overflow: hidden; flex: none; }
.of-ava-cv { image-rendering: pixelated; margin-top: 6px; }
.of-card-n { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.of-card-n b { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-card-n span { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-doing { margin: 0; display: flex; align-items: flex-start; gap: 7px; color: var(--ink-2); font-size: .88rem; line-height: 1.4; min-height: 2.5em; }
.of-doing > .ico, .of-doing > .of-dots { flex: none; margin-top: 2px; color: var(--of-c); }
.of-dots { display: inline-flex; gap: 2px; align-items: center; height: 14px; }
.of-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.of-kpi div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.of-kpi b { font-size: 1.2rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.of-kpi span { color: var(--muted); font-size: .76rem; line-height: 1.25; }
.of-boss-l { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .86rem; display: flex; flex-direction: column; gap: 4px; }
.of-card-f { margin-top: auto; display: flex; }
.of-card-f .btn { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.of-soon-note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .84rem; }

.of-feed { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 6px; position: sticky; top: 12px; }
.of-feed-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.of-feed-h h3 { margin: 0; font-size: 1rem; display: inline-flex; align-items: center; gap: 7px; }
.of-chips { display: flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 10px; }
.of-chips button { border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 600; padding: 5px 9px; border-radius: 8px; cursor: pointer; }
.of-chips button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.of-feed-l { max-height: 560px; overflow: auto; margin: 0 -6px; padding: 0 6px; }
.of-ev { display: flex; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--line); }
.of-ev:first-child { border-top: 0; }
.of-ev-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.of-ev div { min-width: 0; }
.of-ev p { margin: 0; font-size: .86rem; line-height: 1.38; color: var(--ink); overflow-wrap: anywhere; }
.of-ev span { color: var(--muted); font-size: .76rem; }
.of-ev.new { animation: of-new 2.4s ease-out; border-radius: 10px; }
@keyframes of-new { from { background: var(--accent-soft, rgba(91, 76, 230, .12)); } to { background: transparent; } }
.of-empty { text-align: center; color: var(--muted); padding: 26px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.of-empty p { margin: 0; font-size: .88rem; max-width: 280px; }

/* Во весь экран */
.of-stagewrap:fullscreen { display: flex; align-items: center; justify-content: center; border-radius: 0; border: 0; background: #0F1320; }
.of-stagewrap:fullscreen .of-stage { width: min(100vw, calc(100vh * 448 / 240)); }

@media (max-width: 1200px) { .of-grid { grid-template-columns: 1fr; } .of-feed { position: static; } .of-feed-l { max-height: 420px; } }
@media (max-width: 700px) {
  .of-title h1 { font-size: 1.2rem; } .of-title p { font-size: .84rem; }
  .of-head-r .of-help span { display: none; }
  .of-stagewrap { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border-radius: 14px; }
  .of-stage { min-width: 720px; }
  .of-pop { width: 240px; }
  .of-agents { grid-template-columns: 1fr; }
}
.of-card-n .of-pill { align-self: flex-start; margin-top: 5px; font-size: .74rem; overflow: visible; }
.of-swipe { display: none; }
@media (max-width: 700px) { .of-swipe { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: .8rem; } }
.of-locked { inset: 0; pointer-events: none; }
.of-locked .of-lock { position: absolute; pointer-events: auto; }
.of-bub.below { transform: translate(-50%, 0); } .of-bub.below.left { transform: translate(-86%, 0); } .of-bub.below.right { transform: translate(-14%, 0); }
.of-bub.below::after { bottom: auto; top: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: #fff; }

/* Вход в разделы AI-сотрудников (плитки под шапкой офиса) */
.of-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 14px; }
.of-quick:empty { display: none; }
.of-q { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0;
  transition: border-color .15s, box-shadow .15s, transform .15s; position: relative; overflow: hidden; }
.of-q::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--of-c, var(--line)); }
.of-q.k-seller { --of-c: var(--of-seller); --of-soft: rgba(47, 111, 237, .10); }
.of-q.k-marketer { --of-c: var(--of-marketer); --of-soft: rgba(229, 71, 106, .10); }
.of-q.k-boss { --of-c: #E0A526; --of-soft: rgba(224, 165, 38, .14); }
.of-q.k-meet { --of-c: var(--accent); --of-soft: var(--accent-soft); }
/* «Планёрка»: значок разговора в цвете бренда */
.of-q-meet { color: var(--accent); }
.of-q:hover { border-color: var(--of-c); box-shadow: 0 8px 22px -14px rgba(15, 23, 42, .35); transform: translateY(-1px); }
.of-q:focus-visible { outline: 2px solid var(--of-c); outline-offset: 2px; }
.of-q-ava { width: 44px; height: 44px; border-radius: 12px; background: var(--of-soft); display: grid; place-items: center; overflow: hidden; flex: none; }
.of-q-ava canvas { image-rendering: pixelated; margin-top: 5px; }
.of-q.is-lock .of-q-ava { filter: grayscale(.8); opacity: .75; }
/* Плитка: аватар | название, описание, статус (в три строки — ничего не сжимается и не переносится по буквам) | стрелка */
.of-q { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "a t g" "a s g" "a c g"; column-gap: 12px; row-gap: 2px; }
.of-q-ava { grid-area: a; align-self: center; }
.of-q-t { display: contents; }
.of-q-t b { grid-area: t; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-q-t small { grid-area: s; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-q-go { grid-area: g; align-self: center; }
.of-q-chip { grid-area: c; justify-self: start; margin-top: 4px; flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 99px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.of-q-chip.hot { background: #DC2626; color: #fff; }
.of-q-chip.warn { background: rgba(245, 158, 11, .16); color: #B45309; }
.of-q-chip.new { background: #E0A526; color: #1A1406; }
.of-q-chip.ok { background: rgba(22, 163, 74, .12); color: #15803D; }
.of-q-chip.mute, .of-q-chip.lock { background: var(--surface-2); color: var(--muted); }
html[data-theme="dark"] .of-q-chip.ok { color: #6EE7B7; } html[data-theme="dark"] .of-q-chip.warn { color: #FCD34D; }
.of-q-go { color: var(--muted); flex: none; display: grid; }
@media (max-width: 700px) { .of-quick { grid-template-columns: 1fr; gap: 8px; } .of-q { padding: 8px 12px; } .of-q-t small { display: none; } }   /* телефон: плитки компактные — название и статус */

/* Вкладки AI-сотрудников над их страницами (AI-продавец, AI-маркетолог, Главный менеджер): в меню их нет — вход через AI-офис */
.ai-crumbs { display: flex; align-items: center; gap: 4px; margin: 0 0 12px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; width: max-content; max-width: 100%; }
.ai-crumbs::-webkit-scrollbar { display: none; }
.ai-crumbs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: .86rem; text-decoration: none; white-space: nowrap; flex: none; }
.ai-crumbs a:hover { color: var(--ink); background: var(--surface-2); }
.ai-crumbs a.on { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ai-crumbs a.ai-back { color: var(--ink); }
.ai-crumbs a.ai-back .ico { color: var(--muted); }
.ai-crumbs .ai-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; flex: none; }
.ai-crumbs em { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #DC2626; color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.ai-crumbs em[hidden] { display: none; }
.ai-crumbs .crm-nb { display: none; }
.ai-crumbs .ai-lk { display: inline-flex; color: var(--muted); }
/* Чаты AI-продавца на телефоне рассчитаны на высоту окна — вкладки сверху занимают ~46px (на компьютере страница — flex, вкладки просто не сжимаются) */
.ai-crumbs { flex: none; }
/* Страницы без верхнего отступа (AI-продавец: шапка со своим отступом) — вкладки не прилипают к верху */
.dz-page > .ai-crumbs { margin-top: 20px; }
.dz-page.has-ai-crumbs:not(.ai-inhead) .dz-ph { padding-top: 4px; }
@media (max-width: 900px) { .has-ai-crumbs .ab-chats { height: calc(100dvh - 276px); } }

/* Широкий экран (≥ 1500 px): офис на всю ширину, без пустого места справа.
   Слева — плитки сотрудников, офис и карточки; справа — лента офиса той же высоты, что левая колонка (события прокручиваются внутри). */
@media (min-width: 1500px) {
  .of-page { max-width: none; }
  .of-root:has(> .of-head) { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 23vw, 480px); column-gap: 18px; align-items: start;
    grid-template-areas: "head head" "quick feed" "stage feed" "agents feed"; }
  .of-root > .of-head { grid-area: head; }
  .of-root > .of-quick { grid-area: quick; }
  .of-root > .of-stagewrap { grid-area: stage; }
  .of-root > .of-swipe { display: none; }
  .of-root > .of-grid { display: contents; }
  .of-root .of-agents { grid-area: agents; margin-top: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Лента не растягивает колонку своими событиями (contain: size) — её высоту задаёт левая колонка */
  .of-root .of-feed { grid-area: feed; align-self: stretch; position: static; contain: size; min-height: 0; display: flex; flex-direction: column; }
  .of-root .of-feed-l { flex: 1 1 auto; min-height: 0; max-height: none; }
}

/* Вкладки AI-сотрудников в строке заголовка (app.js aiHead): «AI-продавец | ← AI-офис · вкладки | статус бота, О странице» */
.page-head.ai-head { flex-wrap: nowrap; align-items: center; justify-content: flex-start; column-gap: 16px; }
.ai-head > :first-child { flex: none; min-width: 0; }
.ai-head > :first-child > p { display: none; }   /* описание — в «О странице», строка остаётся компактной */
.ai-head > .ai-crumbs { margin: 0; flex: none; max-width: 100%; }
.ai-head > .ai-crumbs ~ * { margin-left: auto; flex: none; }
.ai-head > .ai-crumbs ~ * ~ * { margin-left: 0; }
/* Чуть не помещается — компактно: «О странице» только значком, у вкладок без значков */
.ai-head.ai-tight .av-info > span:last-child { display: none; }
.ai-head.ai-tight .av-info { padding-left: 10px; padding-right: 10px; }
.ai-head.ai-tight .ai-crumbs [data-ai] > .ico { display: none; }
.ai-head.ai-tight .ai-crumbs a { padding-left: 10px; padding-right: 10px; }
/* Не помещается — вкладки строкой выше, под ними заголовок и кнопки */
.page-head.ai-head.ai-2row { flex-wrap: wrap; row-gap: 6px; }
.ai-head.ai-2row > .ai-crumbs { order: -2; }
.ai-head.ai-2row::before { content: ''; order: -1; flex: 0 0 100%; height: 0; }
.ai-head.ai-2row > :first-child { flex: 1 1 auto; }

/* ---------- Шапка страниц AI-сотрудников: включатель в строке заголовка (AI-маркетолог, главный менеджер) ---------- */
.ai-pw { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: .84rem; font-weight: 800; color: var(--muted); white-space: nowrap; cursor: pointer; user-select: none; transition: border-color .15s, color .15s; }
.ai-pw:hover { border-color: color-mix(in srgb, #22C55E 45%, var(--line)); }
.ai-pw.on { color: var(--ink); }
.ai-pw input { position: absolute; opacity: 0; pointer-events: none; }
.ai-pw-t { position: relative; flex: none; width: 38px; height: 22px; border-radius: 22px; background: var(--line); transition: background .2s; }
.ai-pw-t i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .2s; }
.ai-pw input:checked + .ai-pw-t { background: #22C55E; }
.ai-pw input:checked + .ai-pw-t i { transform: translateX(16px); }
.ai-pw input:focus-visible + .ai-pw-t { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-pw input:disabled + .ai-pw-t { opacity: .6; }
.ai-pw.ro { cursor: default; padding-left: 12px; }
.ai-pw-d { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.ai-pw.on .ai-pw-d { background: #22C55E; box-shadow: 0 0 0 3px color-mix(in srgb, #22C55E 25%, transparent); }
