/* L4r — редизайн консоли «Проверка агента» по макету hr-bot-console.html,
   адаптированный под бело-синюю тему Транс-Цем. ТОЛЬКО оформление —
   разметку и функции (hr-bot-admin.js) не трогаем. Скоуп: .agent-tab3 + .agent-preview. */

/* токены консоли (синий акцент на слоистом светлом фоне) */
.agent-tab3,
.agent-preview{
  --c-canvas:#ffffff;
  --c-surface:#ffffff;
  --c-surface-2:#f6f9fe;
  --c-line:#e3ecf7;
  --c-line-soft:#eef3fa;
  --c-accent:#1f73e0;
  --c-accent-deep:#075ecb;
  --c-accent-soft:#eaf3ff;
  --c-accent-line:#cfe0f9;
  --c-ink:#0d1b3e;
  --c-ink-soft:#46587a;
  --c-ink-faint:#8595b5;
  --c-active:#16a34a;
  --c-ease:cubic-bezier(.2,.75,.2,1);
  --c-r-card:16px;
  --c-r-mid:12px;
  --c-shadow-sm:0 1px 2px rgba(20,50,100,.05),0 1px 1px rgba(20,50,100,.03);
  --c-shadow-md:0 10px 26px -14px rgba(20,50,100,.28),0 2px 6px -2px rgba(20,50,100,.08);
}

/* ---------- общий каркас: слоистый светлый фон вместо плоского белого ---------- */
.bot-tab-content:has(.agent-tab3){background:var(--c-canvas)}
.agent-tab3{
  background:var(--c-canvas)!important;
  border-top:1px solid var(--c-line);
}
.agent-rail{background:transparent!important;border-right:1px solid var(--c-line)!important}
.agent-editor{background:transparent!important;border-right:0!important}

/* заголовки — выразительный дисплейный шрифт как в макете */
.agent-tab3 .ag-rail-head b,
.agent-tab3 .ag-block-head b,
.agent-tab3 .ag-acc-head,
.agent-tab3 .ag-acc-d>summary,
.agent-preview .ag-chat-head h3,
.agent-preview h3{
  font-family:'Bricolage Grotesque',Manrope,sans-serif;
  letter-spacing:-.01em;
  color:var(--c-ink);
}

/* «источник из backend» — мелкий моно-чип справа, как .src в макете */
.agent-tab3 .ag-src{
  font-family:'JetBrains Mono',ui-monospace,Consolas,monospace;
  font-size:10.5px;font-weight:500;color:var(--c-ink-faint);
}

/* ---------- левый рейл: поиск + карточки ботов ---------- */
.agent-tab3 .ag-search{
  background:var(--c-surface)!important;border:1px solid var(--c-line)!important;
  border-radius:var(--c-r-mid);box-shadow:var(--c-shadow-sm);
}
.agent-tab3 .ag-search:focus-within{border-color:var(--c-accent-line)!important;box-shadow:0 0 0 3px var(--c-accent-soft)}
.agent-tab3 .ag-search span{color:var(--c-accent)}

.agent-tab3 .ag-bot{
  border:1px solid var(--c-line)!important;background:var(--c-surface)!important;
  border-radius:var(--c-r-mid)!important;box-shadow:var(--c-shadow-sm);
}
.agent-tab3 .ag-bot.is-active{
  border-color:var(--c-accent)!important;background:var(--c-accent-soft)!important;
  box-shadow:0 0 0 3px rgba(31,115,224,.10)!important;
}
.agent-tab3 .ag-bot__name{color:var(--c-ink)}
.agent-tab3 .ag-bot__chev{color:var(--c-accent)}

/* пульсирующая точка статуса «активный» — beat из макета */
.agent-tab3 .ag-dot.on{background:var(--c-active);box-shadow:0 0 0 0 rgba(22,163,74,.5);animation:ac-beat 2.4s infinite}

.agent-tab3 .ag-rail-add,
.agent-tab3 .ag-add-bot{
  border:1.5px dashed var(--c-accent-line)!important;background:var(--c-surface)!important;color:var(--c-accent)!important;
  border-radius:var(--c-r-mid)!important;
}
.agent-tab3 .ag-rail-add:hover,
.agent-tab3 .ag-add-bot:hover{border-color:var(--c-accent)!important;background:var(--c-accent-soft)!important}

/* ---------- карточки-блоки редактора ---------- */
.agent-tab3 .ag-block,
.agent-tab3 .ag-acc,
.agent-tab3 .ag-acc-d,
.agent-tab3 .ag-name{
  border:1px solid var(--c-line)!important;border-radius:var(--c-r-card)!important;
  background:var(--c-surface)!important;box-shadow:var(--c-shadow-sm);
  overflow:hidden;
}
.agent-tab3 .ag-block-head,
.agent-tab3 .ag-acc-head,
.agent-tab3 .ag-acc-d>summary{
  background:var(--c-surface)!important;border-bottom:1px solid var(--c-line-soft)!important;
  color:var(--c-ink);
}
.agent-tab3 .ag-acc.open .ag-acc-head,
.agent-tab3 .ag-acc-d[open]>summary{border-bottom:1px solid var(--c-line-soft)!important}
.agent-tab3 .ag-block textarea,
.agent-tab3 .ag-kb-block textarea,
.agent-tab3 .ag-test-form textarea,
.agent-tab3 .ag-params input,
.agent-tab3 .ag-rule select,
.agent-tab3 .ag-rule input{
  background:var(--c-surface-2)!important;border-color:var(--c-line)!important;color:var(--c-ink)!important;
}
.agent-tab3 .ag-block textarea:focus,
.agent-tab3 .ag-kb-block textarea:focus,
.agent-tab3 .ag-params input:focus,
.agent-tab3 .ag-rule select:focus,
.agent-tab3 .ag-rule input:focus{
  background:var(--c-surface)!important;border-color:var(--c-accent-line)!important;
  box-shadow:0 0 0 3px var(--c-accent-soft)!important;
}

/* счётчики и подписи */
.agent-tab3 .ag-counter,
.agent-tab3 .ag-kb-count{color:var(--c-ink-faint)}
.agent-tab3 .ag-acc-meta{color:var(--c-accent)!important;font-weight:700}

/* ---------- темы знаний (knowledge) ---------- */
.agent-tab3 .ag-kb-block{border:1px solid var(--c-line)!important;border-radius:var(--c-r-mid)!important;background:var(--c-surface)!important}
.agent-tab3 .ag-kb-block[open]{border-color:var(--c-accent-line)!important;box-shadow:0 0 0 3px rgba(31,115,224,.06)}
.agent-tab3 .ag-kb-ic{background:var(--c-accent-soft)!important;color:var(--c-accent)!important;border-radius:9px}
.agent-tab3 .ag-kb-block.is-forbidden .ag-kb-ic{background:#fdeef0!important;color:#c2410c!important}
.agent-tab3 .ag-kb-add{border:1.5px dashed var(--c-accent-line)!important;color:var(--c-accent)!important}
.agent-tab3 .ag-kb-add:hover{border-color:var(--c-accent)!important;background:var(--c-accent-soft)!important}

/* запрещённые темы — мягкая красная плашка */
.agent-tab3 .ag-forbidden-panel{
  border:1px solid #f6d4d4!important;background:#fdf2f2!important;border-radius:var(--c-r-mid)!important;color:#b3261e!important;
}
.agent-tab3 .ag-forbidden-panel b{color:#9a1f1a!important}
.agent-tab3 .ag-forbidden-panel span{background:#fff!important;border:1px solid #f6d4d4!important;color:#b3261e!important}

/* ---------- правила работы бота ---------- */
.agent-tab3 .ag-group-label{color:var(--c-accent)!important}
.agent-tab3 .ag-rule{border:1px solid var(--c-line)!important;border-radius:var(--c-r-mid)!important;background:var(--c-surface)!important}
.agent-tab3 .ag-rule__icon{background:var(--c-accent-soft)!important;color:var(--c-accent)!important}
.agent-tab3 .ag-refresh{background:var(--c-accent)!important;color:#fff!important;border-radius:9px}

/* успех сохранения */
.agent-tab3 .ag-save-ok{background:#e7f7ee!important;color:#0f7a45!important;border-radius:var(--c-r-mid)!important}

/* ---------- правый дровер: проверка агента (фиксирован справа во всю высоту, у робота) ---------- */
.agent-preview{
  position:fixed!important;top:24px;right:24px;bottom:24px;z-index:50;
  width:496px;max-width:calc(100vw - 48px);box-sizing:border-box;
  display:flex!important;flex-direction:column;
  overflow:visible!important;                 /* visible — чтобы неон-кольцо (inset:-2px) не обрезалось; скролл — внутри ленты */
  border:1px solid var(--c-line)!important;border-radius:var(--c-r-card)!important;
  background:var(--c-surface)!important;box-shadow:0 24px 60px -20px rgba(20,50,100,.4),var(--c-shadow-md)!important;
}
.agent-preview .ag-chat-thread{flex:1 1 auto;min-height:0;overflow-y:auto}
/* резерв справа под фиксированный дровер (шире окно → шире резерв, чтобы не наезжать на редактор) */
.agent-tab3{padding-right:544px!important}
@media(max-width:1440px){ .agent-tab3{padding-right:488px!important} .agent-preview{width:440px} }
/* на узких экранах дровер встраивается в поток (мобильная раскладка) */
@media(max-width:1180px){
  .agent-tab3{padding-right:0!important}
  .agent-preview{position:static!important;inset:auto!important;width:auto!important;max-width:none!important}
  .agent-preview::after{display:none}
}
/* L6b — плавное появление дровера (из правого нижнего угла, от FAB-робота) */
.agent-preview.is-entering{animation:ac-drawer-in .36s var(--c-ease) both;transform-origin:bottom right}
@keyframes ac-drawer-in{from{opacity:0;transform:translateY(16px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
/* плавный уход дровера при сворачивании (затем возвращается FAB-баббл) */
.agent-preview.is-leaving{animation:ac-drawer-out .26s var(--c-ease) forwards;transform-origin:bottom right;pointer-events:none}
@keyframes ac-drawer-out{from{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(14px) scale(.95)}}
/* L6b — бегущий сине-фиолетовый неон по квадратной рамке в раскрытом состоянии */
@property --ac-neon{syntax:'<angle>';initial-value:0deg;inherits:false}
.agent-preview::after{
  content:"";position:absolute;inset:-2px;border-radius:calc(var(--c-r-card) + 2px);padding:2px;
  background:conic-gradient(from var(--ac-neon,0deg),#2f7bf6,#6a4dff,#b14dff,#6a4dff,#2f7bf6);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;
  pointer-events:none;z-index:2;opacity:.9;filter:drop-shadow(0 0 4px rgba(106,77,255,.45));
  animation:ac-neon-run 3.6s linear infinite;
}
@keyframes ac-neon-run{to{--ac-neon:360deg}}
@media(prefers-reduced-motion:reduce){
  .agent-preview.is-entering{animation:none}
  .agent-preview::after{animation:none}
}
/* спарк-звёздочки у заголовка панели (стиль логотипа Gemini) */
.agent-preview .ag-chat-head h3{display:flex;align-items:center;gap:9px}
.agent-preview .ag-chat-head h3::before{
  content:"";width:24px;height:24px;flex:none;border-radius:0;box-shadow:none;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%234f8bf0'/><stop offset='1' stop-color='%231f4fc9'/></linearGradient></defs><path fill='url(%23g)' d='M9.5 4c.4 4.8 3.7 8.1 8.5 8.5-4.8.4-8.1 3.7-8.5 8.5-.4-4.8-3.7-8.1-8.5-8.5 4.8-.4 8.1-3.7 8.5-8.5z'/><path fill='url(%23g)' d='M19 1.4c.15 2 1.5 3.35 3.5 3.5-2 .15-3.35 1.5-3.5 3.5-.15-2-1.5-3.35-3.5-3.5 2-.15 3.35-1.5 3.5-3.5z'/></svg>") center/contain no-repeat;
}
.agent-preview .ag-chat-clear{border-color:var(--c-line)!important;color:var(--c-ink-soft)!important;border-radius:9px}
.agent-preview .ag-chat-clear:hover{border-color:var(--c-accent-line)!important;color:var(--c-accent)!important;background:var(--c-accent-soft)!important}
.agent-preview .ag-preview-close{color:var(--c-ink-soft)!important}
.agent-preview .ag-preview-close:hover{color:var(--c-accent)!important}

/* пузыри диалога с плавным появлением */
.agent-preview .ag-bubble{animation:ac-bubble .32s var(--c-ease) both}
.agent-preview .ag-msg.candidate .ag-bubble{background:var(--c-accent)!important;color:#fff!important}
.agent-preview .ag-msg.bot .ag-bubble{background:var(--c-surface-2)!important;border:1px solid var(--c-line)!important;color:var(--c-ink)!important}

/* «Агент думает…» → орб + три мигающих точки (thinking из макета) */
.agent-preview .ag-typing{
  display:inline-flex;align-items:center;gap:11px;font-style:normal!important;color:var(--c-ink-faint)!important;
  background:var(--c-surface-2)!important;border:1px solid var(--c-line)!important;border-radius:14px;
  border-bottom-left-radius:5px;padding:10px 14px 10px 12px;font-size:0!important;
}
.agent-preview .ag-typing::before{
  content:"";width:22px;height:22px;border-radius:50%;flex:none;
  background:radial-gradient(circle at 35% 30%,#6ea2f5,#1f4fc9);
}
.agent-preview .ag-typing::after{
  content:"● ● ●";font-size:9px;letter-spacing:3px;color:var(--c-accent);
  animation:ac-blink 1.3s infinite;
}

/* шаги рассуждения — таймлайн в синем/зелёном */
.agent-preview .ag-step.ok .ag-step-no{background:#e7f7ee;color:var(--c-active);border-color:var(--c-active)}
.agent-preview .ag-why summary{color:var(--c-accent)!important}

/* поле ввода */
.agent-preview .ag-chat-input textarea{background:var(--c-surface-2)!important;border-color:var(--c-line)!important}
.agent-preview .ag-chat-input textarea:focus{background:var(--c-surface)!important;border-color:var(--c-accent-line)!important;box-shadow:0 0 0 3px var(--c-accent-soft)!important}

/* кнопка «Проверка агента» (свёрнутый дровер) */
.ag-preview-open{border-color:var(--c-accent-line)!important;color:var(--c-accent)!important}

/* ---------- L6: панель «Проверка обхода запретных тем» ---------- */
/* инлайн-поле часов в тумблере «Запрашивать статус после передачи менеджеру» */
.agent-tab3 .ag-fu-handoff-h{width:52px;margin:0 2px;padding:2px 6px;border:1px solid var(--c-line);border-radius:6px;font:inherit;text-align:center;color:var(--c-ink)}
.agent-tab3 .ag-fu-handoff-h:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft)}
/* галочка «Передать заявку в телеграм, если кандидат готов» */
.agent-preview .ag-alert-toggle{display:flex;align-items:center;gap:9px;margin-top:10px;font-size:13px;color:var(--c-ink-soft);cursor:pointer;user-select:none}
.agent-preview .ag-alert-toggle input{width:17px;height:17px;flex:none;accent-color:var(--c-accent);cursor:pointer}
.agent-preview .fb-panel{margin-top:12px;border:1px solid var(--c-line);border-radius:var(--c-r-mid,10px);background:var(--c-surface-2);padding:10px 12px}
.agent-preview .fb-panel>summary{cursor:pointer;font-weight:700;color:var(--c-ink);list-style:none;user-select:none}
.agent-preview .fb-panel>summary::-webkit-details-marker{display:none}
.agent-preview .fb-hint{margin:8px 0;font-size:12px;color:var(--c-ink-soft)}
.agent-preview .fb-panel textarea{width:100%;box-sizing:border-box;background:var(--c-surface);border:1px solid var(--c-line);border-radius:8px;padding:8px 10px;font:inherit;color:var(--c-ink);resize:vertical}
.agent-preview .fb-panel textarea:focus{border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);outline:none}
.agent-preview .fb-panel [data-fb-run]{margin-top:8px}
.agent-preview .fb-summary{margin-top:10px;font-weight:700;color:var(--c-ink)}
.agent-preview .fb-rows{margin-top:8px;display:flex;flex-direction:column;gap:8px}
.agent-preview .fb-row{border:1px solid var(--c-line);border-radius:8px;background:var(--c-surface);padding:8px 10px}
.agent-preview .fb-row.is-bad{border-color:#e0746a;background:rgba(224,116,106,.07)}
.agent-preview .fb-row__head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.agent-preview .fb-phrase{font-weight:600;color:var(--c-ink)}
.agent-preview .fb-row__reply{margin-top:6px;font-size:13px;color:var(--c-ink-soft)}
.agent-preview .fb-row__why{margin-top:4px;font-size:12px;color:var(--c-ink-faint)}
.fb-vd{flex:none;font-size:12px;font-weight:700;white-space:nowrap}
.fb-vd--ok{color:#2e8b57}
.fb-vd--bad{color:#d2493b}
.fb-vd--err{color:#b8860b}

/* ---------- современный кастом-дропдаун селектора ботов (L4s) ---------- */
.ag-cs{position:relative;display:inline-block;min-width:240px}
.ag-head .ag-cs{width:100%;min-width:0}
.ag-cs__native{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;clip:rect(0 0 0 0)!important}
.ag-cs__btn{
  display:flex;align-items:center;gap:10px;width:100%;height:48px;
  border:1px solid var(--c-line);border-radius:10px;background:var(--c-surface);
  padding:0 14px;font:inherit;font-weight:700;color:var(--c-ink);cursor:pointer;
  box-shadow:var(--c-shadow-sm);transition:border-color .18s var(--c-ease),box-shadow .18s var(--c-ease);
}
.ag-cs__btn:hover{border-color:var(--c-accent-line)}
.ag-cs.is-open .ag-cs__btn{border-color:var(--c-accent);box-shadow:0 0 0 3px var(--c-accent-soft)}
.ag-cs__val{flex:1;min-width:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ag-cs__chev{width:18px;height:18px;flex:none;fill:none;stroke:var(--c-ink-soft);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s var(--c-ease)}
.ag-cs.is-open .ag-cs__chev{transform:rotate(180deg);stroke:var(--c-accent)}
.ag-cs__menu{
  position:absolute;top:calc(100% + 8px);left:0;min-width:100%;width:max-content;max-width:360px;
  padding:8px;border:1px solid var(--c-line);border-radius:12px;background:var(--c-surface);
  box-shadow:var(--c-shadow-md);z-index:60;animation:ac-pop .16s var(--c-ease) both;
}
.ag-cs__menu[hidden]{display:none}
.ag-cs__opt{
  position:relative;display:flex;align-items:center;gap:10px;width:100%;min-height:42px;
  border:0;border-radius:9px;background:transparent;padding:0 40px 0 12px;
  font:inherit;font-weight:600;color:var(--c-ink);cursor:pointer;text-align:left;
  transition:background-color .14s var(--c-ease),color .14s var(--c-ease);
}
.ag-cs__opt:hover,.ag-cs__opt.is-active{background:var(--c-accent-soft);color:var(--c-accent)}
.ag-cs__lbl{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ag-cs__check{
  position:absolute;right:10px;width:22px;height:22px;border-radius:50%;
  background:var(--c-accent);color:#fff;display:none;place-items:center;
}
.ag-cs__opt.is-active .ag-cs__check{display:grid}
.ag-cs__check svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
@keyframes ac-pop{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}

/* ---------- keyframes ---------- */
@keyframes ac-beat{0%{box-shadow:0 0 0 0 rgba(22,163,74,.45)}70%{box-shadow:0 0 0 6px rgba(22,163,74,0)}100%{box-shadow:0 0 0 0 rgba(22,163,74,0)}}
@keyframes ac-bubble{from{opacity:0;transform:translateY(7px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes ac-blink{0%,100%{opacity:.35}50%{opacity:1}}

/* ---------- панель «Темы и ответы агента» (L4w): разрешённые/запрещённые группы ---------- */
.agent-tab3 .ag-kb-panel{border:1px solid var(--c-line);border-radius:var(--c-r-card);background:var(--c-surface);box-shadow:var(--c-shadow-sm);padding:20px;display:flex;flex-direction:column;gap:16px}
.agent-tab3 .ag-kb-phead{display:flex;align-items:flex-start;gap:14px}
.agent-tab3 .ag-kb-pic{width:40px;height:40px;flex:none;border-radius:11px;background:#eaf3ff;color:var(--c-accent);display:grid;place-items:center}
.agent-tab3 .ag-kb-pic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-kb-phead h3{font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:21px;margin:0;color:var(--c-ink);letter-spacing:-.02em}
.agent-tab3 .ag-kb-phead p{margin:5px 0 0;color:var(--c-ink-soft);font-size:13.5px;line-height:1.5}
.agent-tab3 .ag-kb-phead .ag-fu-badge{margin-left:auto}
/* группа */
.agent-tab3 .ag-kb-group{border:1px solid var(--c-line);border-radius:var(--c-r-card);background:var(--c-surface);overflow:visible}
.agent-tab3 .ag-kb-group>.ag-kb-gsum{border-radius:var(--c-r-card)}
.agent-tab3 .ag-kb-group[open]>.ag-kb-gsum{border-radius:var(--c-r-card) var(--c-r-card) 0 0}
.agent-tab3 .ag-kb-group.allowed{border-color:#bfe6cd}
.agent-tab3 .ag-kb-group.forbidden{border-color:#f3cccc}
.agent-tab3 .ag-kb-gsum{display:flex;align-items:center;gap:13px;padding:16px 18px;cursor:pointer;list-style:none}
.agent-tab3 .ag-kb-group.allowed .ag-kb-gsum{background:#eef8f1}
.agent-tab3 .ag-kb-group.forbidden .ag-kb-gsum{background:#fdeeee}
.agent-tab3 .ag-kb-gsum::-webkit-details-marker{display:none}
.agent-tab3 .ag-kb-save{border:0;background:transparent;color:var(--c-accent);font:inherit;font-weight:700;font-size:14px;cursor:pointer;padding:4px 8px;border-radius:7px}
.agent-tab3 .ag-kb-save:hover{background:rgba(31,115,224,.10)}
.agent-tab3 .ag-kb-sticker{width:38px;height:38px;flex:none;border-radius:11px;display:grid;place-items:center}
.agent-tab3 .ag-kb-sticker svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-kb-sticker.green{background:#dff3e6;color:#16a34a}
.agent-tab3 .ag-kb-sticker.red{background:#fde0e0;color:#e04747}
.agent-tab3 .ag-kb-gmeta{flex:1;min-width:0}
.agent-tab3 .ag-kb-gmeta b{display:block;font-size:16px;color:var(--c-ink)}
.agent-tab3 .ag-kb-group.allowed .ag-kb-gmeta b{color:#15803d}
.agent-tab3 .ag-kb-group.forbidden .ag-kb-gmeta b{color:#c2362e}
.agent-tab3 .ag-kb-gmeta small{display:block;color:var(--c-ink-soft);font-size:12.5px;margin-top:2px}
.agent-tab3 .ag-kb-gchev{color:var(--c-ink-faint);display:grid;place-items:center}
.agent-tab3 .ag-kb-gchev svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-kb-group[open] .ag-kb-gchev svg{transform:rotate(180deg)}
.agent-tab3 .ag-kb-gbody{padding:0 14px 14px;display:flex;flex-direction:column;gap:10px}
/* display:flex выше перебивает нативное сворачивание <details> — скрываем тело закрытой группы явно */
.agent-tab3 .ag-kb-group:not([open])>.ag-kb-gbody{display:none}
.agent-tab3 .ag-kb-empty{margin:4px 4px 0;color:var(--c-ink-faint)}
/* карточка темы */
/* overflow:visible — иначе выпадающее меню кебаба (⋮) клипается рамкой карточки и кажется некликабельным */
.agent-tab3 .ag-kb-topic{border:1px solid var(--c-line);border-radius:12px;background:var(--c-surface);overflow:visible}
.agent-tab3 .ag-kb-topic>.ag-kb-tsum{border-radius:12px}
.agent-tab3 .ag-kb-topic[open]>.ag-kb-tsum{border-radius:12px 12px 0 0}
.agent-tab3 .ag-kb-tsum{position:relative;display:flex;align-items:center;gap:12px;padding:14px 14px;cursor:pointer;list-style:none}
.agent-tab3 .ag-kb-tsum::-webkit-details-marker{display:none}
.agent-tab3 .ag-kb-dot{width:10px;height:10px;flex:none;border-radius:50%}
.agent-tab3 .ag-kb-dot.green{background:#16a34a}
.agent-tab3 .ag-kb-dot.red{background:#e04747}
.agent-tab3 .ag-kb-tmeta{flex:1;min-width:0}
.agent-tab3 .ag-kb-tmeta b{display:block;font-size:14.5px;color:var(--c-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agent-tab3 .ag-kb-topic.forbidden .ag-kb-tmeta b{color:#c2362e}
.agent-tab3 .ag-kb-tmeta small{display:block;color:var(--c-ink-faint);font-size:12px;margin-top:2px}
.agent-tab3 .ag-kb-tchev{color:var(--c-ink-faint);display:grid;place-items:center}
.agent-tab3 .ag-kb-tchev svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-kb-topic[open] .ag-kb-tchev svg{transform:rotate(180deg)}
.agent-tab3 .ag-kb-kebab{width:30px;height:30px;flex:none;border:0;background:transparent;color:var(--c-ink-faint);font-size:18px;line-height:1;cursor:pointer;border-radius:8px}
.agent-tab3 .ag-kb-kebab:hover{background:var(--c-surface-2);color:var(--c-ink-soft)}
.agent-tab3 .ag-kb-menu{position:absolute;top:46px;right:10px;z-index:30;min-width:190px;background:var(--c-surface);border:1px solid var(--c-line);border-radius:10px;box-shadow:var(--c-shadow-md);padding:6px;display:none;flex-direction:column}
.agent-tab3 .ag-kb-menu.is-open{display:flex;animation:ac-pop .14s var(--c-ease) both}
.agent-tab3 .ag-kb-menu button{border:0;background:transparent;text-align:left;font:inherit;font-weight:600;color:var(--c-ink);padding:9px 11px;border-radius:7px;cursor:pointer}
.agent-tab3 .ag-kb-menu button:hover{background:var(--c-accent-soft);color:var(--c-accent)}
.agent-tab3 .ag-kb-menu button.danger{color:#e04747}
.agent-tab3 .ag-kb-menu button.danger:hover{background:#fdecec;color:#c2362e}
.agent-tab3 .ag-kb-tbody{padding:0 14px 14px;display:flex;flex-direction:column;gap:6px}
.agent-tab3 .ag-kb-titleinput{border:1px solid var(--c-line);border-radius:9px;background:var(--c-surface-2);padding:10px 12px;font:inherit;font-weight:700;color:var(--c-ink)}
.agent-tab3 .ag-kb-titleinput:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);background:var(--c-surface)}
.agent-tab3 .ag-kb-tbody textarea{border:1px solid var(--c-line);border-radius:9px;background:var(--c-surface-2);padding:10px 12px;font:inherit;line-height:1.5;color:var(--c-ink);resize:vertical}
.agent-tab3 .ag-kb-tbody textarea:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);background:var(--c-surface)}
.agent-tab3 .ag-kb-count{color:var(--c-ink-faint);font-size:11.5px}
/* подтвердить/отменить тему (✓ / ×) */
.agent-tab3 .ag-kb-tbottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:2px}
.agent-tab3 .ag-kb-foot{display:flex;align-items:center;gap:8px}
.agent-tab3 .ag-kb-ok,
.agent-tab3 .ag-kb-cancel{width:36px;height:36px;flex:none;border:1px solid var(--c-line);border-radius:9px;background:var(--c-surface);display:grid;place-items:center;cursor:pointer;transition:all .15s var(--c-ease)}
.agent-tab3 .ag-kb-ok svg,
.agent-tab3 .ag-kb-cancel svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-kb-ok{background:var(--c-accent);border-color:var(--c-accent);color:#fff}
.agent-tab3 .ag-kb-ok:hover{background:var(--c-accent-deep);border-color:var(--c-accent-deep)}
.agent-tab3 .ag-kb-cancel{color:var(--c-ink-soft)}
.agent-tab3 .ag-kb-cancel:hover{background:#fdecec;border-color:#f3cccc;color:#e04747}
/* добавить тему */
.agent-tab3 .ag-kb-addtopic{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:1.5px dashed;border-radius:12px;background:transparent;padding:13px 14px;font:inherit;font-weight:700;font-size:14px;cursor:pointer;transition:background .15s var(--c-ease)}
.agent-tab3 .ag-kb-addtopic span{font-size:18px;line-height:1}
.agent-tab3 .ag-kb-addtopic.green{border-color:#bfe6cd;color:#16a34a}
.agent-tab3 .ag-kb-addtopic.green:hover{background:#e8f7ee}
.agent-tab3 .ag-kb-addtopic.red{border-color:#f3cccc;color:#e04747}
.agent-tab3 .ag-kb-addtopic.red:hover{background:#fdecec}

/* ---------- панель «Шаблоны ответов, если ИИ отключится» (fallback без LLM) ---------- */
.agent-tab3 .ag-ft-panel{border:1px solid var(--c-line);border-radius:var(--c-r-card);background:var(--c-surface);box-shadow:var(--c-shadow-sm);padding:20px;display:flex;flex-direction:column;gap:16px}
.agent-tab3 .ag-ft-phead{display:flex;align-items:flex-start;gap:14px;cursor:pointer}
.agent-tab3 .ag-ft-pic{width:40px;height:40px;flex:none;border-radius:11px;background:#fff4e0;color:#d97706;display:grid;place-items:center}
.agent-tab3 .ag-ft-pic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-ft-phead h3{font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:21px;margin:0;color:var(--c-ink);letter-spacing:-.02em}
.agent-tab3 .ag-ft-phead p{margin:5px 0 0;color:var(--c-ink-soft);font-size:13.5px;line-height:1.5}
.agent-tab3 .ag-ft-phead .ag-fu-badge{margin-left:auto}
.agent-tab3 .ag-ft-pchev{color:var(--c-ink-faint);display:grid;place-items:center;align-self:center}
.agent-tab3 .ag-ft-pchev svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-ft-panel:not(.is-collapsed) .ag-ft-pchev svg{transform:rotate(180deg)}
.agent-tab3 .ag-ft-panel.is-collapsed .ag-ft-pbody{display:none}
.agent-tab3 .ag-ft-pbody{display:flex;flex-direction:column;gap:10px}
.agent-tab3 .ag-ft-note{margin:0 0 4px;padding:11px 13px;border-radius:10px;background:#fff7ea;border:1px solid #f4dca8;color:#92600f;font-size:13px;line-height:1.5}
.agent-tab3 .ag-ft-empty{margin:4px 4px 0;color:var(--c-ink-faint)}
/* карточка темы */
.agent-tab3 .ag-ft-topic{border:1px solid var(--c-line);border-radius:12px;background:var(--c-surface);overflow:visible}
.agent-tab3 .ag-ft-topic>.ag-ft-tsum{border-radius:12px}
.agent-tab3 .ag-ft-topic[open]>.ag-ft-tsum{border-radius:12px 12px 0 0}
.agent-tab3 .ag-ft-tsum{position:relative;display:flex;align-items:center;gap:12px;padding:14px 14px;cursor:pointer;list-style:none}
.agent-tab3 .ag-ft-tsum::-webkit-details-marker{display:none}
.agent-tab3 .ag-ft-dot{width:10px;height:10px;flex:none;border-radius:50%}
.agent-tab3 .ag-ft-dot.blue{background:var(--c-accent)}
.agent-tab3 .ag-ft-dot.green{background:#16a34a}
.agent-tab3 .ag-ft-tmeta{flex:1;min-width:0}
.agent-tab3 .ag-ft-tmeta b{display:block;font-size:14.5px;color:var(--c-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agent-tab3 .ag-ft-tmeta small{display:block;color:var(--c-ink-faint);font-size:12px;margin-top:2px}
.agent-tab3 .ag-ft-tchev{color:var(--c-ink-faint);display:grid;place-items:center}
.agent-tab3 .ag-ft-tchev svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-ft-topic[open] .ag-ft-tchev svg{transform:rotate(180deg)}
.agent-tab3 .ag-ft-del{width:30px;height:30px;flex:none;border:0;background:transparent;color:var(--c-ink-faint);font-size:20px;line-height:1;cursor:pointer;border-radius:8px}
.agent-tab3 .ag-ft-del:hover{background:#fdecec;color:#e04747}
.agent-tab3 .ag-ft-tbody{padding:0 14px 14px;display:flex;flex-direction:column;gap:6px}
.agent-tab3 .ag-ft-topicinput,.agent-tab3 .ag-ft-kwinput{border:1px solid var(--c-line);border-radius:9px;background:var(--c-surface-2);padding:10px 12px;font:inherit;color:var(--c-ink)}
.agent-tab3 .ag-ft-topicinput{font-weight:700}
.agent-tab3 .ag-ft-topicinput[readonly]{background:var(--c-surface-2);color:var(--c-ink-soft);cursor:default}
.agent-tab3 .ag-ft-topicinput:focus,.agent-tab3 .ag-ft-kwinput:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);background:var(--c-surface)}
.agent-tab3 .ag-ft-tbody textarea{border:1px solid var(--c-line);border-radius:9px;background:var(--c-surface-2);padding:10px 12px;font:inherit;line-height:1.5;color:var(--c-ink);resize:vertical}
.agent-tab3 .ag-ft-tbody textarea:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);background:var(--c-surface)}
.agent-tab3 .ag-ft-addtopic{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:1.5px dashed var(--c-accent-line);border-radius:12px;background:transparent;color:var(--c-accent);padding:13px 14px;font:inherit;font-weight:700;font-size:14px;cursor:pointer;transition:background .15s var(--c-ease)}
.agent-tab3 .ag-ft-addtopic span{font-size:18px;line-height:1}
.agent-tab3 .ag-ft-addtopic:hover{background:var(--c-accent-soft)}

/* ---------- follow-up панель «Напоминания кандидату» (L4v) ---------- */
.agent-tab3 .ag-fu-panel{border:1px solid var(--c-line);border-radius:var(--c-r-card);background:var(--c-surface);box-shadow:var(--c-shadow-sm);padding:22px 22px 18px;display:flex;flex-direction:column;gap:16px}
.agent-tab3 .ag-fu-phead{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.agent-tab3 .ag-fu-phead h3{font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:22px;color:var(--c-ink);margin:0;letter-spacing:-.02em}
.agent-tab3 .ag-fu-phead p{margin:6px 0 0;color:var(--c-ink-soft);font-size:13.5px;line-height:1.5;max-width:62ch}
.agent-tab3 .ag-fu-badge{flex:none;background:#eaf3ff;color:var(--c-accent);font-weight:800;font-size:12.5px;padding:7px 14px;border-radius:999px}
/* тумблер */
.agent-tab3 .ag-fu-enable-row{display:flex;align-items:center;gap:14px}
.agent-tab3 .ag-switch{position:relative;display:inline-block;width:42px;height:24px;flex:none}
.agent-tab3 .ag-switch input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer;z-index:1}
.agent-tab3 .ag-switch-track{position:absolute;inset:0;border-radius:999px;background:#cfd8e6;transition:background .2s var(--c-ease)}
.agent-tab3 .ag-switch-track::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(20,50,100,.25);transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-switch input:checked + .ag-switch-track{background:var(--c-accent)}
.agent-tab3 .ag-switch input:checked + .ag-switch-track::after{transform:translateX(18px)}
.agent-tab3 .ag-fu-enable-txt b{display:block;font-size:15px;color:var(--c-ink)}
.agent-tab3 .ag-fu-enable-txt span{display:block;color:var(--c-ink-soft);font-size:13px;margin-top:2px;line-height:1.45}
/* шаги */
.agent-tab3 .ag-fu-steps{display:flex;flex-direction:column;gap:14px}
.agent-tab3 .ag-fu-step{border:1px solid var(--c-line);border-radius:14px;background:var(--c-surface)}
.agent-tab3 .ag-fu-step.is-open{padding:16px;display:flex;flex-direction:column;gap:10px;box-shadow:var(--c-shadow-sm)}
.agent-tab3 .ag-fu-step.is-collapsed{display:flex;align-items:center;gap:14px;padding:14px}
.agent-tab3 .ag-fu-no{width:30px;height:30px;flex:none;border-radius:9px;background:#eaf3ff;color:var(--c-accent);display:grid;place-items:center;font-weight:800;font-size:14px}
.agent-tab3 .ag-fu-collapsed{flex:1;min-width:0}
.agent-tab3 .ag-fu-ctitle{color:var(--c-ink);font-size:14px}
.agent-tab3 .ag-fu-ctitle b{font-weight:800}
.agent-tab3 .ag-fu-csub{color:var(--c-ink-faint);font-size:12.5px;margin-top:3px}
.agent-tab3 .ag-fu-when{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.agent-tab3 .ag-fu-when-act{margin-left:auto;display:flex;align-items:center;gap:6px}
.agent-tab3 .ag-fu-lbl{color:var(--c-ink);font-size:14px}
.agent-tab3 .ag-fu-delay{width:64px;height:38px;text-align:center;border:1px solid var(--c-line);border-radius:9px;background:var(--c-surface);font:inherit;font-weight:700;color:var(--c-ink)}
.agent-tab3 .ag-fu-delay:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft)}
.agent-tab3 .ag-fu-info{width:18px;height:18px;border-radius:50%;border:1.5px solid var(--c-ink-faint);color:var(--c-ink-faint);display:inline-grid;place-items:center;font-size:11px;font-style:italic;font-weight:700;cursor:help}
.agent-tab3 .ag-fu-textlabel{font-size:12.5px;color:var(--c-ink-soft);font-weight:600;margin-top:2px}
.agent-tab3 .ag-fu-text{width:100%;box-sizing:border-box;border:1px solid var(--c-line);border-radius:12px;background:var(--c-surface-2);padding:12px 14px;font:inherit;line-height:1.5;color:var(--c-ink);resize:vertical;min-height:92px}
.agent-tab3 .ag-fu-text:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);background:var(--c-surface)}
.agent-tab3 .ag-fu-counter{align-self:flex-end;color:var(--c-ink-faint);font-size:11.5px;margin-top:-4px}
.agent-tab3 .ag-fu-gen-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.agent-tab3 .ag-fu-gen{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--c-accent-line);background:var(--c-accent-soft);color:var(--c-accent);font:inherit;font-weight:700;font-size:13px;padding:11px 16px;border-radius:12px;cursor:pointer;transition:background .15s var(--c-ease)}
.agent-tab3 .ag-fu-gen:hover{background:#dfeeff}
.agent-tab3 .ag-fu-spark{font-size:14px}
.agent-tab3 .ag-fu-gen-hint{color:var(--c-ink-faint);font-size:12.5px;max-width:240px;line-height:1.4}
/* generated-режим шага follow-up */
.agent-tab3 .ag-fu-genbox{display:flex;align-items:flex-start;gap:12px;justify-content:space-between;background:var(--c-accent-soft);border:1px solid var(--c-accent-line);border-radius:12px;padding:12px 14px;margin:2px 0 6px}
.agent-tab3 .ag-fu-genon{color:var(--c-ink);font-size:13px;line-height:1.45}
.agent-tab3 .ag-fu-genon .ag-fu-spark{color:var(--c-accent);margin-right:4px}
.agent-tab3 .ag-fu-gen-off{flex:none;border:1px solid var(--c-line);background:var(--c-surface);color:var(--c-ink-soft);font:inherit;font-weight:700;font-size:12.5px;padding:8px 12px;border-radius:10px;cursor:pointer;white-space:nowrap}
.agent-tab3 .ag-fu-gen-off:hover{border-color:var(--c-accent-line);color:var(--c-accent)}
.agent-tab3 .ag-fu-then{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:2px}
/* Реанимация старой базы */
.agent-tab3 .ag-rn-grid{display:grid;grid-template-columns:minmax(160px,200px) 1fr;gap:14px 18px;align-items:center;margin-top:12px}
.agent-tab3 .ag-rn-lbl{font-size:13px;font-weight:700;color:var(--c-ink-soft)}
.agent-tab3 .ag-rn-days{display:flex;gap:6px;flex-wrap:wrap}
.agent-tab3 .ag-rn-day{width:40px;height:36px;border:1px solid var(--c-line);background:var(--c-surface);border-radius:10px;font:inherit;font-weight:700;font-size:13px;color:var(--c-ink-soft);cursor:pointer}
.agent-tab3 .ag-rn-day.on{background:var(--c-accent);border-color:var(--c-accent);color:#fff}
.agent-tab3 .ag-rn-times{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.agent-tab3 .ag-rn-time{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--c-line);border-radius:10px;padding:2px 4px 2px 8px}
.agent-tab3 .ag-rn-time input{border:0;background:transparent;font:inherit;color:var(--c-ink)}
.agent-tab3 .ag-rn-time-del{border:0;background:transparent;cursor:pointer;color:var(--c-ink-faint);display:grid;place-items:center;width:24px;height:24px}
.agent-tab3 .ag-rn-time-del svg{width:14px;height:14px;stroke:currentColor;fill:none}
.agent-tab3 .ag-rn-time-add{border:1px dashed var(--c-accent-line);background:var(--c-accent-soft);color:var(--c-accent);border-radius:10px;padding:8px 12px;font:inherit;font-weight:700;font-size:12.5px;cursor:pointer}
.agent-tab3 .ag-rn-statuses,.agent-tab3 .ag-rn-limits{display:flex;gap:14px;flex-wrap:wrap;align-items:center}
.agent-tab3 .ag-rn-chk{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--c-ink-soft)}
.agent-tab3 .ag-rn-limits input{width:64px;border:1px solid var(--c-line);border-radius:8px;padding:6px 8px;font:inherit;color:var(--c-ink)}
.agent-tab3 .ag-rn-limits span{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--c-ink-soft)}
.agent-tab3 .ag-rn-msg{min-width:0}
@media(max-width:720px){.agent-tab3 .ag-rn-grid{grid-template-columns:1fr;gap:8px 0}}
/* кастомные селекты с шевроном */
.agent-tab3 .ag-sel{position:relative;display:inline-flex;align-items:center}
.agent-tab3 .ag-sel select{appearance:none;-webkit-appearance:none;border:1px solid var(--c-line);border-radius:9px;background:var(--c-surface);height:38px;padding:0 34px 0 12px;font:inherit;font-weight:600;color:var(--c-ink);cursor:pointer}
.agent-tab3 .ag-sel--status select{padding-left:30px}
.agent-tab3 .ag-sel select:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft)}
.agent-tab3 .ag-sel .ag-chev{position:absolute;right:10px;width:16px;height:16px;pointer-events:none;fill:none;stroke:var(--c-ink-soft);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-stat-dot{position:absolute;left:11px;width:9px;height:9px;border-radius:50%;pointer-events:none}
.agent-tab3 .ag-stat-dot.amber{background:#f3a21b}
.agent-tab3 .ag-stat-dot.red{background:#e04747}
.agent-tab3 .ag-stat-dot.blue{background:var(--c-accent)}
.agent-tab3 .ag-stat-dot.none{background:#cbd5e1}
/* свернуть/развернуть + удалить */
.agent-tab3 .ag-fu-toggle{width:34px;height:34px;flex:none;border:0;background:transparent;color:var(--c-ink-soft);display:grid;place-items:center;cursor:pointer}
.agent-tab3 .ag-fu-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-fu-step.is-open .ag-fu-toggle svg{transform:rotate(180deg)}
.agent-tab3 .ag-fu-del{width:38px;height:38px;flex:none;border:0;border-radius:10px;background:#fdecec;color:#e04747;display:grid;place-items:center;cursor:pointer;transition:background .15s var(--c-ease)}
.agent-tab3 .ag-fu-del:hover{background:#fbd5d5}
.agent-tab3 .ag-fu-del svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* добавить шаг + футер */
.agent-tab3 .ag-fu-addcard{display:flex;align-items:center;gap:14px;width:100%;text-align:left;border:1.5px dashed var(--c-accent-line);border-radius:14px;background:var(--c-surface);padding:16px 18px;cursor:pointer;transition:border-color .15s var(--c-ease),background .15s var(--c-ease)}
.agent-tab3 .ag-fu-addcard:hover{border-color:var(--c-accent);background:var(--c-accent-soft)}
.agent-tab3 .ag-fu-plus{width:36px;height:36px;flex:none;border-radius:10px;background:#eaf3ff;color:var(--c-accent);display:grid;place-items:center;font-size:22px;font-weight:700}
.agent-tab3 .ag-fu-addtxt b{display:block;color:var(--c-accent);font-size:15px}
.agent-tab3 .ag-fu-addtxt small{display:block;color:var(--c-ink-faint);font-size:12.5px;margin-top:2px}
.agent-tab3 .ag-fu-foot{display:flex;align-items:center;gap:8px;color:var(--c-ink-faint);font-size:12.5px;margin:2px 0 0}
.agent-tab3 .ag-fu-foot .ag-fu-info{width:16px;height:16px;font-size:10px}

/* L4y-1 — сворачивание панели «Напоминания кандидату» */
.agent-tab3 .ag-fu-phead{cursor:pointer}
.agent-tab3 .ag-fu-phead>div:first-child{flex:1;min-width:0}
.agent-tab3 .ag-fu-pchev{flex:none;align-self:center;color:var(--c-ink-faint);display:grid;place-items:center}
.agent-tab3 .ag-fu-pchev svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-fu-panel.is-collapsed{gap:0}
.agent-tab3 .ag-fu-panel.is-collapsed .ag-fu-pchev svg{transform:rotate(-90deg)}
.agent-tab3 .ag-fu-panel.is-collapsed .ag-fu-pbody{display:none}

/* L4y-4 — темы без рамок по умолчанию, рамка+подсветка при наведении/раскрытии */
.agent-tab3 .ag-kb-topic{border-color:transparent;background:transparent;transition:border-color .15s var(--c-ease),box-shadow .15s var(--c-ease),background .15s var(--c-ease)}
.agent-tab3 .ag-kb-group.allowed .ag-kb-topic:hover,.agent-tab3 .ag-kb-group.allowed .ag-kb-topic[open]{background:var(--c-surface);border-color:#bfe6cd;box-shadow:0 0 0 3px rgba(22,163,74,.08)}
.agent-tab3 .ag-kb-group.forbidden .ag-kb-topic:hover,.agent-tab3 .ag-kb-group.forbidden .ag-kb-topic[open]{background:var(--c-surface);border-color:#f3cccc;box-shadow:0 0 0 3px rgba(224,71,71,.08)}

/* L4y-2 — follow-up в тесте: тег и системная заметка */
.agent-preview .ag-msg.note{justify-content:center;padding:0 6px}
.agent-preview .ag-note{font-size:11.5px;color:var(--c-ink-faint);background:var(--c-surface-2);border:1px solid var(--c-line);border-radius:14px;padding:5px 12px;max-width:100%;box-sizing:border-box;white-space:normal;text-align:center;line-height:1.4}
.agent-preview .ag-fu-tag{display:inline-block;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--c-accent);background:var(--c-accent-soft);border-radius:6px;padding:2px 7px;margin-bottom:5px}
.agent-preview .ag-msg.bot.is-followup .ag-bubble{border-left:3px solid var(--c-accent)}
.agent-preview .ag-fu-running{margin-top:8px;font-size:12.5px;color:var(--c-accent-deep,#075ecb);background:var(--c-accent-soft,#eaf3ff);border:1px solid var(--c-accent-line,#cfe0f9);border-radius:9px;padding:8px 12px}

/* L4y-6 — FAB-робот «Проверка агента» (свёрнутое состояние) */
/* свёрнутый FAB: обёртка с подписью-бабблом над круглым роботом */
.ag-fab-wrap{position:fixed;right:24px;bottom:60px;z-index:48;display:flex;flex-direction:column;align-items:flex-end;gap:12px}
.ag-fab-wrap.is-appearing{animation:ac-fab-in .34s var(--c-ease) both}
@keyframes ac-fab-in{from{opacity:0;transform:translateY(14px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}
.ag-fab-label{position:relative;border:1px solid var(--c-accent-line);background:var(--c-surface);color:var(--c-accent);font:inherit;font-weight:700;font-size:13.5px;border-radius:14px;padding:9px 15px;cursor:pointer;box-shadow:var(--c-shadow-md);white-space:nowrap;transition:border-color .15s var(--c-ease),background .15s var(--c-ease)}
.ag-fab-label:hover{background:var(--c-accent-soft);border-color:var(--c-accent)}
/* «хвостик» баббла к роботу (внизу справа) */
.ag-fab-label::after{content:"";position:absolute;right:18px;bottom:-6px;width:12px;height:12px;background:var(--c-surface);border-right:1px solid var(--c-accent-line);border-bottom:1px solid var(--c-accent-line);transform:rotate(45deg)}
.ag-preview-fab{position:static;flex:none;width:60px;height:60px;border-radius:50%;border:0;background:linear-gradient(150deg,#4f8bf0,#1f4fc9);color:#fff;display:grid;place-items:center;cursor:pointer;box-shadow:0 14px 30px -8px rgba(31,115,224,.6);transition:transform .15s cubic-bezier(.2,.75,.2,1),box-shadow .15s ease}
.ag-preview-fab:hover{transform:translateY(-2px);box-shadow:0 18px 38px -8px rgba(31,115,224,.7)}
.ag-preview-fab:active{transform:translateY(0)}
.ag-preview-fab svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* L4z-2 — сворачивание панели «Темы и ответы агента» */
.agent-tab3 .ag-kb-phead{cursor:pointer}
.agent-tab3 .ag-kb-phead>div{flex:1;min-width:0}
.agent-tab3 .ag-kb-pchev{flex:none;align-self:center;color:var(--c-ink-faint);display:grid;place-items:center}
.agent-tab3 .ag-kb-pchev svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-kb-pbody{display:flex;flex-direction:column;gap:16px}
.agent-tab3 .ag-kb-panel.is-collapsed{gap:0}
.agent-tab3 .ag-kb-panel.is-collapsed .ag-kb-pchev svg{transform:rotate(-90deg)}
.agent-tab3 .ag-kb-panel.is-collapsed .ag-kb-pbody{display:none}

/* L6f — нижние кнопки: Сохранить черновик (белая рамка) / Удалить (красная) / Активировать (синяя) */
.agent-tab3 .ag-actions{display:flex!important;flex-wrap:wrap;gap:14px;grid-template-columns:none!important;padding-top:26px}
.agent-tab3 .ag-actions button{height:auto;border-width:1.5px;border-style:solid;border-radius:10px;padding:13px 22px;font-weight:800;background:#fff;cursor:pointer;min-width:0;transition:all .15s var(--c-ease)}
.agent-tab3 .ag-actions button:disabled{opacity:.55;cursor:default}
.agent-tab3 .ag-btn-draft{border-color:var(--c-line);color:var(--c-ink)}
.agent-tab3 .ag-btn-draft:hover{border-color:var(--c-ink-faint);background:var(--c-surface-2)}
.agent-tab3 .ag-btn-delete{border-color:#e0746a;color:#d2493b}
.agent-tab3 .ag-btn-delete:hover{background:#fdecec;border-color:#d2493b}
.agent-tab3 .ag-btn-activate{border-color:var(--c-accent);color:var(--c-accent)}
.agent-tab3 .ag-btn-activate:hover{background:var(--c-accent-soft)}
/* Приостановить работу — янтарная (для активного бота вместо «Активировать») */
.agent-tab3 .ag-btn-pause{border-color:#e8a13c;color:#b56a10}
.agent-tab3 .ag-btn-pause:hover{background:#fdf1df;border-color:#d98e22}

/* ---------- L7m: модалка подтверждения активации (плавное появление) ---------- */
/* Рендерится в <body> (вне перерисовываемой панели) → стили НЕ под .agent-tab3 */
.ag-confirm-overlay{position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;padding:24px;
  background:rgba(15,23,42,.46);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
  opacity:0;transition:opacity .24s cubic-bezier(.2,.8,.2,1);
  font-family:'Manrope',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.ag-confirm-overlay.is-open{opacity:1}
.ag-confirm-overlay.is-closing{opacity:0}
.ag-cf-card{position:relative;width:min(560px,100%);background:#fff;border-radius:22px;padding:34px 34px 26px;
  box-shadow:0 30px 70px -24px rgba(15,40,90,.45),0 8px 24px -14px rgba(15,40,90,.22);
  transform:translateY(18px) scale(.955);opacity:.35;
  transition:transform .30s cubic-bezier(.18,.86,.26,1),opacity .26s ease}
.ag-confirm-overlay.is-open .ag-cf-card{transform:none;opacity:1}
.ag-cf-x{position:absolute;top:18px;right:18px;width:34px;height:34px;border:0;background:transparent;border-radius:9px;
  color:#90a0bd;cursor:pointer;display:grid;place-items:center;transition:background .15s,color .15s}
.ag-cf-x:hover{background:#f1f5fb;color:#46587a}
.ag-cf-x svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.ag-cf-head{display:flex;gap:18px;align-items:flex-start;padding-right:28px}
.ag-cf-badge{flex:none;width:52px;height:52px;border-radius:15px;display:grid;place-items:center}
.ag-cf-badge svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
.ag-cf-badge.warn{background:#fff3df;color:#e8920f}
.ag-cf-badge.blue{background:#e8eefc;color:#2f6fe0;border-radius:50%}
.ag-cf-badge.green{background:#e6f7ee;color:#1f9d57}
/* info-callout (серый бокс с «i») — как на макете подтверждения режима */
.ag-cf-info{display:flex;gap:13px;align-items:flex-start;margin:22px 0 26px;background:#f4f7fb;border:1px solid #e9eef6;border-radius:14px;padding:16px 18px}
.ag-cf-info-ic{flex:none;color:#2f6fe0;display:inline-flex;align-items:center;justify-content:center}
.ag-cf-info-ic svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ag-cf-info p{margin:0;font-size:14.5px;line-height:1.55;color:#5a6b8c}
.ag-cf-htext h3{margin:6px 0 0;font-family:'Bricolage Grotesque','Manrope',sans-serif;font-size:24px;font-weight:700;letter-spacing:-.02em;color:#0d1b3e}
.ag-cf-htext p{margin:9px 0 0;font-size:14.5px;line-height:1.5;color:#5a6b8c}
.ag-cf-rows{margin:22px 0 26px;border-top:1px solid #eef2f8;padding-top:21px;display:flex;flex-direction:column;gap:19px}
.ag-cf-row{display:flex;gap:15px;align-items:flex-start}
.ag-cf-ic{flex:none;width:42px;height:42px;border-radius:12px;display:grid;place-items:center}
.ag-cf-ic svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ag-cf-ic.blue{background:#eaf2ff;color:#2f6fe0}
.ag-cf-ic.green{background:#e6f7ee;color:#1f9d57}
.ag-cf-ic.slate{background:#eef1f6;color:#7585a0}
.ag-cf-ic.red{background:#fdecec;color:#d2493b}
.ag-cf-rtext b{display:block;font-size:15px;font-weight:700;color:#16233f;line-height:1.3}
.ag-cf-rtext p{margin:3px 0 0;font-size:13.5px;line-height:1.45;color:#65769a}
.ag-cf-actions{display:flex;justify-content:flex-end;gap:12px}
.ag-cf-btn{border-radius:12px;padding:12px 24px;font:inherit;font-weight:700;font-size:15px;cursor:pointer;
  transition:transform .12s var(--c-ease,cubic-bezier(.2,.8,.2,1)),background .15s,border-color .15s,box-shadow .15s}
.ag-cf-btn.ghost{background:#fff;border:1.5px solid #dce3ee;color:#42536f}
.ag-cf-btn.ghost:hover{border-color:#b9c5d8;background:#f7f9fc}
.ag-cf-btn.primary{border:1.5px solid transparent;background:#2563eb;color:#fff;box-shadow:0 9px 20px -9px rgba(37,99,235,.75)}
.ag-cf-btn.primary:hover{background:#1d56cf}
.ag-cf-btn.primary:active{transform:translateY(1px)}
.ag-cf-btn.danger{border:1.5px solid transparent;background:#e0533f;color:#fff;box-shadow:0 9px 20px -9px rgba(224,83,63,.7)}
.ag-cf-btn.danger:hover{background:#cf4530}
.ag-cf-btn.danger:active{transform:translateY(1px)}
/* блокирующий режим: одна надпись вместо кнопок (нельзя удалить единственного бота) */
.ag-cf-card.is-blocked .ag-cf-head{padding-bottom:2px}
.ag-cf-actions.blocked{margin-top:24px;border-top:1px solid #eef2f8;padding-top:20px;justify-content:center}
.ag-cf-notice{display:inline-flex;align-items:center;gap:9px;font-size:14.5px;font-weight:700;color:#b56a10;
  background:#fdf3e0;border:1px solid #f3dcae;border-radius:12px;padding:13px 22px;text-align:center}
@media(max-width:520px){.ag-cf-card{padding:26px 22px 20px}.ag-cf-actions{flex-direction:column-reverse}.ag-cf-btn{width:100%}}
@media(prefers-reduced-motion:reduce){.ag-confirm-overlay,.ag-cf-card{transition:opacity .01s}.ag-cf-card{transform:none}}

/* ---------- L7g: редизайн раздела «Расходы» по макету ---------- */
/* .exp-* НЕ под .agent-tab3 (вкладка «Расходы» не обёрнута) → панель несёт свои токены */
.exp-panel{
  --c-accent:#1f73e0;--c-accent-deep:#075ecb;--c-accent-soft:#eaf3ff;--c-accent-line:#cfe0f9;
  --c-ink:#0d1b3e;--c-ink-soft:#46587a;--c-ink-faint:#8595b5;
  --c-line:#e3ecf7;--c-line-soft:#eef3fa;--c-surface:#ffffff;--c-surface-2:#f6f9fe;
  --c-r-card:16px;--c-shadow-sm:0 1px 2px rgba(20,50,100,.05),0 1px 1px rgba(20,50,100,.03);--c-ease:cubic-bezier(.2,.75,.2,1);
  padding:24px 26px 28px;display:flex;flex-direction:column;gap:18px;width:100%;box-sizing:border-box}
.exp-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap}
.exp-head h2{margin:0;font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:30px;font-weight:700;letter-spacing:-.02em;color:var(--c-ink)}
.exp-head p{margin:6px 0 0;color:var(--c-ink-soft);font-size:14px}
.exp-period{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}
/* пресеты периода (Сегодня / 7 дней / Месяц / Всё время) */
.exp-presets{display:flex;gap:6px;flex-wrap:wrap;align-self:center}
.exp-preset{border:1px solid var(--c-line);background:var(--c-surface);border-radius:9px;padding:8px 14px;font:inherit;font-size:12.5px;font-weight:700;color:var(--c-ink-soft);cursor:pointer;transition:all .15s var(--c-ease)}
.exp-preset:hover{border-color:var(--c-accent-line);color:var(--c-accent)}
.exp-preset.on{background:var(--c-accent);border-color:var(--c-accent);color:#fff}
.exp-period label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;color:var(--c-ink-soft)}
.exp-period label{cursor:pointer}
.exp-period input{border:1px solid var(--c-line);border-radius:10px;padding:9px 12px;font:inherit;color:var(--c-ink);background:var(--c-surface);cursor:pointer}
.exp-period input::-webkit-calendar-picker-indicator{cursor:pointer}
.exp-period input:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft)}
.exp-apply{border:0;border-radius:10px;background:var(--c-accent);color:#fff;font:inherit;font-weight:700;padding:10px 20px;cursor:pointer;transition:background .15s var(--c-ease)}
.exp-apply:hover{background:var(--c-accent-deep)}
/* KPI */
.exp-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.exp-kpi{display:flex;align-items:flex-start;gap:13px;border:1px solid var(--c-line);border-radius:var(--c-r-card);background:var(--c-surface);box-shadow:var(--c-shadow-sm);padding:16px 16px}
.exp-kpi-ic{width:44px;height:44px;flex:none;border-radius:12px;display:grid;place-items:center}
.exp-kpi-ic svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.exp-kpi-ic.calls{background:#eaf3ff;color:#1f73e0}
.exp-kpi-ic.tokens{background:#efeaff;color:#6a4dff}
.exp-kpi-ic.rub{background:#fff1e6;color:#f5921e}
.exp-kpi-main{display:flex;flex-direction:column;gap:3px;min-width:0;flex:none;max-width:34%}
.exp-kpi-label{font-size:13px;font-weight:700;color:var(--c-ink-soft)}
.exp-kpi-val{font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:24px;font-weight:700;color:var(--c-ink);letter-spacing:-.01em;line-height:1.05;white-space:nowrap}
.exp-kpi-sub{font-size:11px;color:var(--c-ink-faint)}
.exp-kpi-split{flex:1;min-width:0;display:flex;flex-direction:column;gap:7px;padding-left:6px}
.exp-kpi-srow{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:7px}
.exp-kpi-sk{font-size:11.5px;color:var(--c-ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exp-kpi-srow b{font-size:13px;font-weight:800;color:var(--c-ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.exp-kpi-trend{flex:none;align-self:center;display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right}
.exp-kpi-trend small{font-size:10px;color:var(--c-ink-faint);line-height:1.1}
.exp-trend{font-style:normal;font-size:12px;font-weight:800;padding:2px 8px;border-radius:999px}
.exp-trend.up{color:#16834f;background:#e7f8ee}
.exp-trend.down{color:#d2493b;background:#fdecec}
/* строки карточек: каждая карточка на своей строке (полная ширина) — таблицы не режутся */
.exp-row{display:grid;grid-template-columns:1fr;gap:16px}
.exp-card{border:1px solid var(--c-line);border-radius:var(--c-r-card);background:var(--c-surface);box-shadow:var(--c-shadow-sm);padding:18px 20px;display:flex;flex-direction:column;gap:14px;min-width:0;overflow:hidden}
.exp-card-head h3{margin:0;font-size:16px;font-weight:700;color:var(--c-ink)}
/* «Расходы за <период>» + сумма в оранжевом контейнере */
.exp-card-head--period{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.exp-sum-pill{flex:none;font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:18px;font-weight:700;color:#b56a10;background:#fdf1df;border:1px solid #f3dcae;border-radius:11px;padding:6px 14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.exp-chart-row{display:grid;grid-template-columns:minmax(120px,28%) minmax(0,1fr);gap:14px;align-items:center}
.exp-line{width:100%;height:auto;max-height:150px;display:block}
.exp-line polyline{fill:none;stroke:var(--c-accent);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.exp-line .exp-pt-dot{fill:var(--c-accent);transition:r .12s var(--c-ease)}
.exp-line .exp-pt-hit{fill:transparent;cursor:pointer}
.exp-line .exp-pt:hover .exp-pt-dot{r:5.5}
.exp-line .exp-grid line{stroke:var(--c-line);stroke-width:1}
.exp-line .exp-axl text{fill:var(--c-ink-faint);font-size:9px}
.exp-donut{width:120px;height:120px;flex:none;justify-self:center}
.exp-donut circle{fill:none;stroke-width:14}
.exp-donut .exp-donut-bg{stroke:var(--c-surface-2)}
.exp-donut-pct{fill:var(--c-ink);font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:20px;font-weight:700}
.exp-donut-sub{fill:var(--c-ink-faint);font-size:7.5px}
.exp-mini{min-width:0;overflow:hidden}
/* таблицы (без скролла: table-layout:fixed + colgroup проценты) */
.exp-tbl{width:100%;border-collapse:collapse;font-size:13px}
.exp-tbl th{text-align:left;color:var(--c-ink-faint);font-weight:700;font-size:12px;padding:7px 10px;border-bottom:1px solid var(--c-line)}
.exp-tbl td{padding:9px 10px;color:var(--c-ink);border-bottom:1px solid var(--c-line-soft)}
.exp-tbl th.num,.exp-tbl td.num{text-align:right;font-variant-numeric:tabular-nums}
.exp-tbl tbody tr:last-child td{border-bottom:0}
/* сплит Тестовые/Рабочие */
.exp-split{table-layout:fixed}
.exp-split th,.exp-split td{padding:6px 6px;font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exp-split thead tr:first-child th{text-align:center;border-bottom:0;padding-bottom:2px;color:var(--c-ink-soft)}
.exp-split thead tr:first-child th.exp-first{text-align:left;vertical-align:bottom}
.exp-split th.sub{text-align:center;font-size:10px;font-weight:700;color:var(--c-ink-faint);padding-top:0}
.exp-split td.num,.exp-split th.sub{text-align:right}
.exp-split td.exp-first{text-align:left;color:var(--c-ink);font-weight:600}
/* лёгкий разделитель между группами Вызовы|Токены|RUB */
.exp-split thead tr:first-child th:not(.exp-first){border-left:1px solid var(--c-line-soft)}
.exp-split thead tr:last-child th:nth-child(odd){border-left:1px solid var(--c-line-soft)}
.exp-split td:nth-child(2),.exp-split td:nth-child(4),.exp-split td:nth-child(6){border-left:1px solid var(--c-line-soft)}
.exp-empty{color:var(--c-ink-faint);text-align:center;padding:14px}
.exp-more{margin-top:4px;border:0;background:transparent;color:var(--c-accent);font:inherit;font-weight:700;font-size:13px;cursor:pointer;align-self:center;display:inline-flex;align-items:center;gap:6px;padding:8px}
.exp-more:hover{color:var(--c-accent-deep)}
.exp-more span{transition:transform .15s var(--c-ease)}
.exp-more:hover span{transform:translateX(3px)}
/* usage */
.exp-usage{display:flex;flex-direction:column;gap:12px}
.exp-usage-bar{height:12px;border-radius:999px;background:var(--c-surface-2);overflow:hidden}
.exp-usage-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#4f8bf0,#1f4fc9)}
.exp-usage small{color:var(--c-ink-soft);font-size:12.5px}
/* L7w — редизайн под макет: 2 KPI, столбцы, группы моделей, детализация */
.exp-kpis--2{grid-template-columns:repeat(2,1fr)}
.exp-kpi-pct{font-size:11px;font-weight:700;color:var(--c-ink-faint)}
.exp-row--2{grid-template-columns:1fr 1fr}
.exp-bars-wrap{width:100%;overflow-x:auto;overflow-y:hidden;padding-bottom:2px}
.exp-bars{display:block;max-width:none}
.exp-bars-grid line{stroke:var(--c-line-soft);stroke-width:1}
.exp-bars-grid text{fill:var(--c-ink-faint);font-size:9px;font-variant-numeric:tabular-nums}
.exp-bars rect{fill:var(--c-accent);fill-opacity:.9;transition:fill-opacity .15s var(--c-ease)}
.exp-bars .exp-bar:hover rect{fill-opacity:1}
.exp-bars text{fill:var(--c-ink-faint);font-size:9.5px}
.exp-mgroup{display:flex;flex-direction:column;gap:11px}
.exp-mgroup+.exp-mgroup{margin-top:18px;padding-top:16px;border-top:1px solid var(--c-line-soft)}
.exp-mgroup-t{font-size:13px;font-weight:800;color:var(--c-ink-soft);margin-bottom:2px}
.exp-mrow{display:grid;grid-template-columns:minmax(86px,1.1fr) minmax(60px,2fr) auto 46px;align-items:center;gap:12px}
.exp-mname{font-size:13px;font-weight:600;color:var(--c-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exp-mbar{height:10px;border-radius:999px;background:var(--c-surface-2);overflow:hidden}
.exp-mbar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#6a4dff,#4f8bf0)}
.exp-mval{font-size:13px;font-weight:800;color:var(--c-ink);font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right}
.exp-mpct{font-size:12px;font-weight:700;color:var(--c-ink-faint);text-align:right;font-variant-numeric:tabular-nums}
.exp-detail th,.exp-detail td{padding:9px 10px;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exp-detail td.exp-first{font-weight:600;color:var(--c-ink)}
/* L7x — 4 KPI без иконок, 4-карточный ряд, пончик «по критериям» */
.exp-kpis--4{grid-template-columns:repeat(4,1fr)}
.exp-row--4{grid-template-columns:1.5fr 1fr 1fr 1.25fr;align-items:stretch}
.exp-kpi--plain{flex-direction:column;align-items:stretch;gap:9px;position:relative;padding:18px 18px}
.exp-kpi-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.exp-kpi-arrow{color:var(--c-ink-faint);font-size:15px;line-height:1}
.exp-kpi--plain .exp-kpi-val{font-size:24px;max-width:none}
.exp-kpi--plain .exp-kpi-split{flex:none;padding-left:0;width:100%;margin-top:1px}
.exp-kpi--plain .exp-kpi-trend{flex-direction:row;align-items:center;align-self:flex-start;gap:7px}
.exp-kpi--plain .exp-kpi-trend small{text-align:left}
.exp-card--chart{min-width:0}
.exp-cat{display:flex;flex-direction:row;flex-wrap:wrap;gap:16px;align-items:center;justify-content:center}
.exp-cat-ring{flex:none}
.exp-cat-donut{width:124px;height:124px;display:block}
.exp-cat-c1{fill:var(--c-ink);font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:13px;font-weight:700}
.exp-cat-c2{fill:var(--c-ink-faint);font-size:8px}
.exp-cat-legend{flex:1;min-width:130px;display:flex;flex-direction:column;gap:9px}
.exp-cat-leg{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px;font-size:12.5px}
.exp-cat-dot{width:9px;height:9px;border-radius:50%;flex:none}
.exp-cat-name{color:var(--c-ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exp-cat-leg b{font-weight:800;color:var(--c-ink);font-variant-numeric:tabular-nums}
@media(max-width:1340px){
  .exp-kpis--4{grid-template-columns:repeat(2,1fr)}
  .exp-row--4{grid-template-columns:1fr 1fr}
}
@media(max-width:1180px){
  .exp-kpis,.exp-kpis--2{grid-template-columns:1fr}
  .exp-row,.exp-row--2{grid-template-columns:1fr}
  .exp-chart-row{grid-template-columns:1fr}
}
@media(max-width:720px){
  .exp-kpis--4,.exp-row--4{grid-template-columns:1fr}
}
/* L8a — «премиум»-сводка расходов (scoped под .exp-panel.expp, классы expp-*) */
.exp-panel.expp{padding:6px 2px 24px;gap:0;max-width:1360px;margin:0 auto}
.expp-head{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap;align-items:flex-start;margin-bottom:18px}
.expp-title h2{margin:0;font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:32px;font-weight:700;letter-spacing:-.03em;color:#111735}
.expp-title p{margin:8px 0 0;color:#68708c;font-size:15px}
.expp-summary{background:radial-gradient(circle at 4% 5%,rgba(109,93,252,.06),transparent 33%),#fff;border:1px solid #e5e8f4;border-radius:24px;box-shadow:0 18px 55px rgba(24,29,64,.055);padding:34px 34px 26px;display:grid;grid-template-columns:1.1fr 1.35fr .9fr;gap:40px;align-items:start;margin-bottom:18px}
.expp-sum-label{margin:0 0 16px;color:#242b49;font-size:15px;font-weight:800}
.expp-sum-value{margin:0;font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:42px;line-height:1;letter-spacing:-.04em;font-weight:700;color:#111735}
.expp-sum-delta{margin-top:16px;color:#27304d;font-size:14px;font-weight:700}
.expp-sum-delta b.up{color:#ea6b25}.expp-sum-delta b.down{color:#2e8f56}
.expp-status-line{display:flex;align-items:center;gap:10px;margin-bottom:14px;font-size:20px;font-weight:800;letter-spacing:-.02em}
.expp-status-line.ok{color:#2e8f56}.expp-status-line.warn{color:#ea6b25}
.expp-status-line svg{width:26px;height:26px;flex:none}
.expp-sum-copy{margin:0;max-width:460px;color:#49516d;font-size:15px;line-height:1.55}
.expp-sum-keys{display:flex;flex-direction:column;gap:14px}
.expp-key{display:flex;flex-direction:column;gap:3px}
.expp-key span{color:#8a91aa;font-size:12.5px;font-weight:700}
.expp-key b{font-size:17px;font-weight:800;color:#111735;font-variant-numeric:tabular-nums}
.expp-rec{grid-column:1/-1;display:flex;align-items:center;gap:12px;padding:14px 20px;border-radius:14px;border:1px solid rgba(46,143,86,.14);background:linear-gradient(90deg,#eefaf2,#f9fdfa);color:#1d2a3f;font-size:14px;font-weight:600}
.expp-rec-ic{color:#2e8f56;display:inline-flex}.expp-rec-ic svg{width:20px;height:20px}
.expp-rec b{font-weight:800}
.expp-insight{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:22px;align-items:center;background:radial-gradient(circle at 3% 10%,rgba(109,93,252,.055),transparent 40%),#fff;border:1px solid rgba(109,93,252,.2);border-radius:22px;box-shadow:0 10px 30px rgba(24,29,64,.045);padding:24px 26px;margin-bottom:18px}
.expp-insight-ic{width:62px;height:62px;border-radius:999px;background:radial-gradient(circle at 35% 30%,#b6a9ff,#7a68f7);display:grid;place-items:center;color:#fff;box-shadow:0 0 0 9px rgba(109,93,252,.12)}
.expp-insight-ic svg{width:30px;height:30px}
.expp-kicker{margin:0 0 8px;color:#2e3654;font-size:13.5px;font-weight:800}
.expp-insight-txt h3{margin:0;font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:22px;line-height:1.3;letter-spacing:-.025em;font-weight:700;color:#111735}
.expp-insight-txt p{margin:12px 0 0;color:#68708c;font-size:15px}
.expp-link{min-height:46px;padding:0 22px;border:1px solid #dbe0ef;border-radius:12px;background:#fff;color:#6d5dfc;font-size:14px;font-weight:800;display:inline-flex;align-items:center;gap:12px;cursor:pointer;white-space:nowrap;transition:.18s ease}
.expp-link:hover{border-color:rgba(109,93,252,.4);background:#f7f4ff;transform:translateY(-1px)}
.expp-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.expp-panel{background:#fff;border:1px solid #e5e8f4;border-radius:22px;box-shadow:0 18px 55px rgba(24,29,64,.055);padding:26px 24px 22px;min-width:0;display:flex;flex-direction:column;min-height:386px}
.expp-panel-foot{display:flex;justify-content:flex-end;margin-top:auto;padding-top:22px}
.expp-table-foot{display:flex;justify-content:center;margin-top:18px}
.expp-panel h3{margin:0 0 26px;font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:19px;font-weight:700;letter-spacing:-.02em;color:#111735}
.expp-cands{display:flex;flex-direction:column;gap:20px}
.expp-cand-row{display:grid;grid-template-columns:minmax(84px,116px) minmax(70px,1fr) auto 50px;gap:16px;align-items:center;color:#27304d;font-size:14px;font-weight:650}
.expp-cand-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.expp-bar-track{height:10px;border-radius:999px;background:#edf0f8;overflow:hidden}
.expp-bar-fill{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,rgba(109,93,252,.38),rgba(109,93,252,.68))}
.expp-cand-sum{text-align:right;color:#111735;font-size:14px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
.expp-cand-pct{text-align:right;color:#7c849d;font-size:13px;font-weight:700;white-space:nowrap}
.expp-chart-wrap{height:250px;margin-top:8px}
.expp-chart{width:100%;height:100%;display:block;overflow:visible}
.expp-cgrid{stroke:#e6e9f2;stroke-width:1;stroke-dasharray:2 4}
.expp-axl{fill:#65708f;font-size:12px;font-weight:650}
.expp-line{fill:none;stroke:#6d5dfc;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.expp-area{fill:url(#exppArea)}
.expp-pt{fill:#fff;stroke:#6d5dfc;stroke-width:3}
.expp-tablecard{background:#fff;border:1px solid #e5e8f4;border-radius:22px;box-shadow:0 18px 55px rgba(24,29,64,.055);padding:26px 18px 28px;margin-bottom:18px}
.expp-tablecard h3{margin:0 0 16px;padding:0 6px;font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:19px;font-weight:700;letter-spacing:-.02em;color:#111735}
.expp-tablewrap{border:1px solid #e5e8f4;border-radius:13px;overflow:hidden}
.expp-table{width:100%;border-collapse:collapse}
.expp-table thead{background:#fafbff}
.expp-table th{padding:13px 18px;text-align:left;color:#7a829c;font-size:12.5px;font-weight:700;border-bottom:1px solid #e5e8f4}
.expp-table td{padding:14px 18px;border-bottom:1px solid #eef0f8;color:#222a48;font-size:14px;font-weight:650;vertical-align:middle}
.expp-table tbody tr:last-child td{border-bottom:0}
.expp-table tbody tr:hover{background:#fbfaff}
.expp-cellname{display:flex;align-items:center;gap:14px;font-weight:750}
.expp-letter{width:32px;height:32px;border-radius:999px;display:grid;place-items:center;color:#6d5dfc;background:#efeaff;font-size:13px;font-weight:800;flex:none}
.expp-share{display:grid;grid-template-columns:50px minmax(70px,120px);align-items:center;gap:12px}
.expp-share-track{height:6px;border-radius:999px;background:#edf0f8;overflow:hidden}
.expp-share-track span{display:block;height:100%;border-radius:inherit;background:#6d5dfc}
.expp-status{display:inline-flex;align-items:center;justify-content:center;min-height:26px;padding:0 12px;border-radius:8px;font-size:12.5px;font-weight:800;white-space:nowrap}
.expp-status.active{color:#c9551c;background:#fff0e7}
.expp-status.moderate{color:#2e8f56;background:#eefaf2}
.expp-tech{background:radial-gradient(circle at 2% 20%,rgba(109,93,252,.05),transparent 28%),#fff;border:1px solid rgba(109,93,252,.2);border-radius:22px;box-shadow:0 10px 30px rgba(24,29,64,.045);padding:22px 26px}
.expp-tech-head{display:grid;grid-template-columns:54px minmax(0,1fr) auto;gap:20px;align-items:center;cursor:pointer}
.expp-tech-ic{width:52px;height:52px;border-radius:999px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,#b5a9ff,#7a68f7);box-shadow:0 0 0 8px rgba(109,93,252,.1)}
.expp-tech-ic svg{width:24px;height:24px}
.expp-tech-title{margin:0;font-size:18px;font-weight:800;letter-spacing:-.02em;color:#111735}
.expp-tech-sub{margin:6px 0 0;color:#68708c;font-size:14px}
.expp-chevron{width:40px;height:40px;border:0;background:transparent;color:#151b38;display:grid;place-items:center;border-radius:12px;cursor:pointer;transition:.18s ease}
.expp-chevron svg{width:22px;height:22px}
.expp-tech-body{display:none;padding:16px 0 2px 74px;color:#68708c;font-size:14px;line-height:1.65}
.expp-tech-body p{margin:0 0 8px}
.expp-tech.open .expp-tech-body{display:block}
.expp-tech.open .expp-chevron{transform:rotate(180deg)}
/* L8b — упрощённая сводка: плитки-метрики + аккордеон «На что потрачены деньги» (как на макете) */
.expp-tech-ic{width:46px;height:46px;border-radius:13px;background:#efeaff;box-shadow:none;color:#6d5dfc}
.expp-tech-ic svg{width:22px;height:22px}
.expp-tiles{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.expp-tile{display:flex;flex-direction:column;gap:9px;padding:16px 16px 18px;border:1px solid #eef0f8;border-radius:16px;background:#fff;min-width:0}
.expp-tile-ic{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;color:#6d5dfc;background:#efeaff}
.expp-tile-ic svg{width:20px;height:20px}
.expp-tile span{color:#8a91aa;font-size:12.5px;font-weight:700}
.expp-tile b{font-size:18px;font-weight:850;color:#111735;letter-spacing:-.02em;font-variant-numeric:tabular-nums;white-space:nowrap}
.expp-acc-spend{margin-bottom:18px}
.expp-tech-body--wide{padding:18px 2px 4px}
.expp-tech-body--wide .expp-panel{min-height:auto;box-shadow:none;border-radius:18px}
.expp-tech-body--wide .expp-grid{margin-bottom:18px}
.expp-tablecard--flush{padding:0;border:0;box-shadow:none;background:transparent;margin-bottom:0}
.expp-tablecard--flush h3{margin:0 0 14px;padding:0 2px}
@media(max-width:1180px){
  .expp-summary{grid-template-columns:1fr;gap:24px}
  .expp-insight{grid-template-columns:56px 1fr}
  .expp-insight .expp-link{grid-column:2;justify-self:start}
  .expp-grid{grid-template-columns:1fr}
}

/* L4z-3 — единый стиль заголовков секций (панели и аккордеоны одинаковы) */
.agent-tab3 .ag-fu-phead h3,
.agent-tab3 .ag-kb-phead h3{font-size:20px}
.agent-tab3 .ag-acc-d>summary>span:first-child,
.agent-tab3 .ag-acc-head,
.agent-tab3 .ag-block-head b{
  font-family:'Bricolage Grotesque',Manrope,sans-serif!important;
  font-size:20px!important;font-weight:600!important;letter-spacing:-.01em!important;color:var(--c-ink)!important;
}

/* L5 — единые сворачиваемые подразделы редактора (как на макете) */
.agent-tab3 .ag-block>summary,
.agent-tab3 .ag-acc-d>summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none}
.agent-tab3 .ag-block>summary::-webkit-details-marker,
.agent-tab3 .ag-acc-d>summary::-webkit-details-marker{display:none}
.agent-tab3 .ag-block-head>b,
.agent-tab3 .ag-acc-d>summary>span:first-child{flex:1;min-width:0}
.agent-tab3 .ag-sec-chev{flex:none;color:var(--c-ink-faint);display:grid;place-items:center}
.agent-tab3 .ag-sec-chev svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-block[open] .ag-sec-chev svg,
.agent-tab3 .ag-acc-d[open] .ag-sec-chev svg{transform:rotate(180deg)}
/* «Обновить» — в теле правил, появляется при раскрытии */
.agent-tab3 .ag-rules-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:4px}
/* панели Темы/Напоминания → единый ряд: без иконки и подзаголовка в шапке, ровные отступы */
.agent-tab3 .ag-kb-panel,
.agent-tab3 .ag-fu-panel{padding:0}
.agent-tab3 .ag-kb-phead,
.agent-tab3 .ag-fu-phead{padding:16px 20px;align-items:center;gap:12px}
/* Иконки-бейджи в шапках секций (как на макете) */
.agent-tab3 .ag-acc-d>summary .ag-sec-l{display:flex;align-items:center;gap:12px;min-width:0}
.agent-tab3 .ag-acc-d>summary .ag-sec-r{display:flex;align-items:center;gap:12px;flex:0 0 auto}
.agent-tab3 .ag-sec-ico{width:38px;height:38px;border-radius:11px;background:#eceefb;color:#5b6cff;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.agent-tab3 .ag-sec-ico svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* Иконки-бейджи у ПОЛЕЙ (как на макете) */
.agent-tab3 .ag-fld-ico{width:48px;height:48px;border-radius:14px;background:#eef0fb;color:#5b6cff;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.agent-tab3 .ag-fld-ico svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* Параметры генерации — строки с иконкой слева */
.agent-tab3 .ag-gen{padding:6px 22px 20px}
.agent-tab3 .ag-gen-row{display:flex;gap:18px;align-items:flex-start;padding:16px 0}
.agent-tab3 .ag-gen-sep{border-top:1px dashed #e2e7f3}
.agent-tab3 .ag-gen-main{flex:1;min-width:0}
.agent-tab3 .ag-gen-h{font-weight:800;font-size:18px;color:#0b1736;letter-spacing:-.01em}
.agent-tab3 .ag-gen-d{color:#8a96ad;font-size:14px;margin:7px 0 14px;line-height:1.5}
.agent-tab3 .ag-gen-main input{width:96px;border:1px solid #e4ebf6;border-radius:12px;padding:11px 14px;font:inherit;font-weight:700;color:#172033;background:#fff}
/* Реанимация — иконка у каждой метки */
.agent-tab3 .ag-rn-lbl{display:flex;align-items:center;gap:13px}
.agent-tab3 .ag-rn-lbl .ag-fld-ico{width:42px;height:42px;border-radius:12px}
.agent-tab3 .ag-rn-lbl .ag-fld-ico svg{width:21px;height:21px}
/* Уведомления — инпут паузы с часами и суффиксом «сек» */
.agent-tab3 .ag-bhv-pause{display:inline-flex;align-items:center;gap:12px;border:1px solid #e4ebf6;border-radius:15px;padding:9px 14px;background:#fff;width:max-content;box-shadow:0 1px 0 rgba(11,23,54,.02)}
.agent-tab3 .ag-bhv-pause input{border:0;outline:0;width:64px;font:inherit;font-weight:800;font-size:18px;color:#0b1736;background:transparent;padding:0 2px}
.agent-tab3 .ag-bhv-suf{color:#8a96ad;font-weight:700;font-size:14px}
.agent-tab3 .ag-bhv-pause .ag-fld-ico{width:40px;height:40px;border-radius:11px}
.agent-tab3 .ag-bhv-pause .ag-fld-ico svg{width:21px;height:21px}
/* «Сообщение бота на отклик кандидата» — крупная просторная вёрстка как на макете */
.agent-tab3 .ag-appreply>summary>span:first-child{font-size:20px;font-weight:800;color:#0b1736;letter-spacing:-.01em}
.agent-tab3 .ag-appreply>summary{padding:18px 24px}
.agent-tab3 .ag-appreply .ag-fu-pbody{padding:24px 28px 26px;gap:0}
.agent-tab3 .ag-appreply .ag-fu-enable-row{display:flex;gap:14px;align-items:flex-start;margin-bottom:24px}
.agent-tab3 .ag-appreply .ag-fu-enable-txt b{display:block;font-size:17px;font-weight:800;color:#0b1736;margin-bottom:5px}
.agent-tab3 .ag-appreply .ag-fu-enable-txt span{display:block;font-size:14.5px;color:#8a96ad;line-height:1.55;max-width:none}
.agent-tab3 .ag-appreply .ag-rn-lbl{display:block;font-size:15px;font-weight:700;color:#26344f;margin:0 0 5px}
.agent-tab3 .ag-appreply textarea{width:100%;box-sizing:border-box;border:1px solid #e4ebf6;border-radius:14px;padding:15px 17px;font:inherit;font-size:15px;color:#172033;line-height:1.5;min-height:104px;resize:vertical;background:#fff;margin-bottom:20px}
.agent-tab3 .ag-appreply .ag-ar-pause{display:inline-flex;align-items:center;gap:6px;border:1.5px solid #e3e9f4;border-radius:14px;padding:5px 16px 5px 6px;background:#fff;box-shadow:0 1px 2px rgba(20,50,100,.05);transition:border-color .15s,box-shadow .15s;width:max-content;margin-bottom:22px}
.agent-tab3 .ag-appreply .ag-ar-pause:focus-within{border-color:#6b5cff;box-shadow:0 0 0 3px rgba(107,92,255,.13)}
.agent-tab3 .ag-appreply .ag-ar-pause input{border:0!important;outline:0;width:54px;font:inherit;font-weight:800;font-size:18px;color:#0b1736;background:transparent;padding:9px 8px;margin:0!important;text-align:center;-moz-appearance:textfield}
.agent-tab3 .ag-appreply .ag-ar-pause input::-webkit-outer-spin-button,.agent-tab3 .ag-appreply .ag-ar-pause input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.agent-tab3 .ag-appreply .ag-ar-suf{color:#8a96ad;font-weight:700;font-size:14px}
.agent-tab3 .ag-appreply .ag-ar-check{display:flex;align-items:center;gap:12px;font-size:15px;font-weight:600;color:#26344f;margin:0 0 8px;cursor:pointer}
.agent-tab3 .ag-appreply .ag-ar-check input{width:20px;height:20px;flex:0 0 auto;accent-color:#6b5cff}
.agent-tab3 .ag-appreply .ag-ar-check small{color:#8a96ad;font-weight:500}
.agent-tab3 .ag-appreply .ag-fu-foot{display:flex;align-items:center;gap:13px;background:#f5f7fb;border:1px solid #eef2f8;border-radius:15px;padding:16px 18px;margin-top:6px;color:#8a96ad;font-size:14px;line-height:1.5;font-style:normal}
.agent-tab3 .ag-appreply .ag-fu-info{flex:0 0 auto;width:25px;height:25px;border:1.5px solid #c3cde0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#9aa6bd;font-style:normal;font-weight:700;font-size:13px}
.agent-tab3 .ag-kb-pic{display:none}
.agent-tab3 .ag-kb-phead>div>p,
.agent-tab3 .ag-fu-phead>div>p{display:none}
.agent-tab3 .ag-kb-pbody{padding:0 16px 16px}
.agent-tab3 .ag-fu-pbody{padding:0 20px 18px;display:flex;flex-direction:column;gap:16px}
.agent-tab3 .ag-fu-panel.is-collapsed .ag-fu-pbody{display:none}

/* «Передача менеджеру (Telegram)» — тело точь-в-точь по макету; радио идут плотно */
.agent-tab3 .ag-handoff .ag-fu-pbody{padding:20px 24px 24px;gap:0}
.agent-tab3 .ag-handoff .ag-rn-lbl{display:block;font-size:15px;font-weight:600;color:#5a6886;margin:0 0 12px}
.agent-tab3 .ag-handoff .ag-ho-radios{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}
.agent-tab3 .ag-handoff .ag-ho-radio{display:flex;align-items:flex-start;gap:12px;cursor:pointer;padding:2px 0}
.agent-tab3 .ag-handoff .ag-ho-radio input{width:20px;height:20px;flex:0 0 auto;accent-color:#6b5cff;margin-top:1px;cursor:pointer}
.agent-tab3 .ag-handoff .ag-ho-radio b{font-weight:700;color:#26344f;font-size:15px}
.agent-tab3 .ag-handoff .ag-ho-radio small{color:#8a96ad;font-weight:500;font-size:15px}
.agent-tab3 .ag-handoff .ag-ar-check{display:flex;align-items:center;gap:12px;font-size:15px;font-weight:600;color:#26344f;margin:0 0 18px;cursor:pointer}
.agent-tab3 .ag-handoff .ag-ar-check input{width:20px;height:20px;flex:0 0 auto;accent-color:#6b5cff;cursor:pointer}
.agent-tab3 .ag-handoff .ag-ho-note{display:flex;gap:13px;align-items:flex-start;background:#f3f1fd;border:1px solid #e8e4fb;border-radius:15px;padding:16px 18px}
.agent-tab3 .ag-handoff .ag-ho-note p{margin:0;color:#6a6f86;font-size:14px;line-height:1.55}
.agent-tab3 .ag-handoff .ag-ho-note-ic{flex:0 0 auto;width:25px;height:25px;border:1.5px solid #b9aef0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#7c6cf0;font-weight:700;font-size:13px;font-style:normal}
.agent-tab3 .ag-handoff .ag-ho-note code{font-family:'JetBrains Mono',ui-monospace,Consolas,monospace;font-size:12.5px;background:#e7e2fb;color:#5b4fd0;padding:2px 7px;border-radius:6px}

/* Тумблер «Тестовый / Рабочий режим» — карточка вверху редактора бота */
.agent-tab3 .ag-runmode{border:1px solid var(--c-line);border-radius:var(--c-r-card);background:var(--c-surface);box-shadow:var(--c-shadow-sm);padding:18px 20px;margin:0 0 18px}
.agent-tab3 .ag-rm-top{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.agent-tab3 .ag-rm-ic{width:42px;height:42px;flex:0 0 auto;border-radius:12px;background:#eceefb;color:#5b6cff;display:inline-flex;align-items:center;justify-content:center}
.agent-tab3 .ag-rm-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-rm-id{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.agent-tab3 .ag-rm-id b{font-size:17px;font-weight:800;color:#0b1736;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agent-tab3 .ag-rm-id span{font-size:13px;color:#8a96ad;font-weight:600}
.agent-tab3 .ag-rm-seg{display:inline-flex;flex:0 0 auto;background:#f1f4fa;border:1px solid #e4ebf6;border-radius:13px;padding:4px}
.agent-tab3 .ag-rm-pill{appearance:none;border:0;background:transparent;font:inherit;font-weight:700;font-size:14px;color:#5a6886;padding:9px 18px;border-radius:10px;cursor:pointer;transition:all .15s var(--c-ease);white-space:nowrap}
.agent-tab3 .ag-rm-pill:hover{color:#0b1736}
.agent-tab3 .ag-rm-pill.is-on{background:var(--c-surface);color:#1f73e0;box-shadow:0 1px 3px rgba(20,50,100,.12)}
.agent-tab3 .ag-rm-pill--work.is-on{color:#15834f;box-shadow:0 1px 3px rgba(16,131,79,.18)}
.agent-tab3 .ag-rm-hint{margin:13px 0 0;font-size:13.5px;line-height:1.5;color:#8a96ad}
.agent-tab3 .ag-rm-warn{display:flex;gap:11px;align-items:flex-start;margin-top:13px;background:#fff7ed;border:1px solid #fde4c8;border-radius:13px;padding:13px 15px;font-size:13.5px;line-height:1.5;color:#9a5a25}
.agent-tab3 .ag-rm-warn-ic{flex:0 0 auto;width:22px;height:22px;border-radius:50%;background:#f5a35a;color:#fff;font-weight:800;font-size:13px;display:inline-flex;align-items:center;justify-content:center}
.agent-tab3 .ag-rm-warn code{font-family:'JetBrains Mono',ui-monospace,Consolas,monospace;font-size:12px;background:#f7e3cc;color:#8a4d1c;padding:1px 6px;border-radius:5px}

/* Блок «Тест-данные кандидата» — сворачиваемый, внутри тест-дровера «Проверка агента» */
.agent-tab3 .ag-sb-drawer{border:1px solid var(--c-line);border-radius:14px;background:var(--c-surface);margin:12px 0 0;overflow:hidden}
.agent-tab3 .ag-sb-dtoggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;background:none;border:0;cursor:pointer;padding:13px 15px;font:inherit;font-weight:700;font-size:14px;color:#26344f}
.agent-tab3 .ag-sb-dtoggle>span{display:inline-flex;align-items:center;gap:10px;min-width:0}
.agent-tab3 .ag-sb-dtoggle .ag-sec-ico{width:30px;height:30px;border-radius:9px}
.agent-tab3 .ag-sb-dtoggle .ag-sec-ico svg{width:17px;height:17px}
.agent-tab3 .ag-sb-chev{width:18px;height:18px;flex:none;fill:none;stroke:#90a0bd;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-sb-drawer.is-open .ag-sb-chev{transform:rotate(180deg)}
.agent-tab3 .ag-sb-body{padding:2px 15px 16px;border-top:1px solid var(--c-line-soft)}
.agent-tab3 .ag-sb-body .ag-sb-reset,.agent-tab3 .ag-sb-body .ag-sb-seed{width:100%}
.agent-tab3 .ag-sb-hint{margin:12px 0 12px;font-size:12.5px;line-height:1.5;color:#8a96ad}
/* «Настройки тестов» — сворачиваемый контейнер настроек теста (чтобы чат влезал без скролла) */
.agent-tab3 .ag-test-settings{border:1px solid var(--c-line);border-radius:14px;background:var(--c-surface);margin:12px 0 0;overflow:hidden;display:flex;flex-direction:column;min-height:0}
/* Раскрытый блок — ОВЕРЛЕЙ на весь диалог проверки агента: перекрывает чат, забирает всю высоту
   fixed-панели .agent-preview (position:fixed => контейнер для absolute), контент влезает без
   скролла страницы. Свернуть — тот же тумблер (шеврон). */
.agent-tab3 .ag-test-settings.is-open{position:absolute;inset:0;z-index:6;margin:0;border:0;border-radius:10px;background:var(--c-surface);display:flex;flex-direction:column;box-shadow:0 10px 30px rgba(32,54,86,.12)}
.agent-tab3 .ag-test-settings-sum{flex-shrink:0;width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;background:none;border:0;cursor:pointer;padding:13px 15px;font:inherit;font-weight:700;font-size:14px;color:#26344f}
.agent-tab3 .ag-test-settings-sum>span{display:inline-flex;align-items:center;gap:10px;min-width:0}
.agent-tab3 .ag-test-settings-sum .ag-sec-ico{width:30px;height:30px;border-radius:9px}
.agent-tab3 .ag-test-settings-sum .ag-sec-ico svg{width:17px;height:17px}
.agent-tab3 .ag-test-settings-chev{width:18px;height:18px;flex:none;fill:none;stroke:#90a0bd;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s var(--c-ease)}
.agent-tab3 .ag-test-settings.is-open .ag-test-settings-chev{transform:rotate(180deg)}
.agent-tab3 .ag-test-settings-body{flex:1 1 auto;min-height:0;overflow:auto;padding:6px 15px 14px;border-top:1px solid var(--c-line-soft)}
.agent-tab3 .ag-test-settings-body .ag-alert-toggle{margin:10px 0}
.agent-tab3 .ag-test-settings-body .ag-sb-drawer{margin-top:10px}
.agent-tab3 .ag-sb-reset{appearance:none;border:1.5px solid #f0cfca;background:#fff;color:#c0432f;font:inherit;font-weight:700;font-size:14px;padding:10px 18px;border-radius:12px;cursor:pointer;transition:all .15s var(--c-ease)}
.agent-tab3 .ag-sb-reset:hover{background:#fdf1ef;border-color:#e7b3aa}
.agent-tab3 .ag-sb-reset:disabled{opacity:.5;cursor:default}
.agent-tab3 .ag-sb-lbl{display:block;font-size:14px;font-weight:600;color:#5a6886;margin:18px 0 10px}
.agent-tab3 .ag-sb-lbl small{display:block;font-weight:500;color:#9aa6bd;font-size:12px;margin-top:4px;line-height:1.45}
.agent-tab3 .ag-sb-facts{display:grid;grid-template-columns:1fr;gap:8px;margin:0 0 12px}
.agent-tab3 .ag-sb-facts input{border:1px solid #e4ebf6;border-radius:11px;padding:10px 13px;font:inherit;font-size:14px;color:#172033;background:#fff}
.agent-tab3 .ag-sb-facts input:focus{outline:none;border-color:#6b5cff;box-shadow:0 0 0 3px rgba(107,92,255,.13)}
.agent-tab3 .ag-sb-seed{appearance:none;border:1.5px solid transparent;background:#2563eb;color:#fff;font:inherit;font-weight:700;font-size:14px;padding:10px 18px;border-radius:12px;cursor:pointer;box-shadow:0 8px 18px -10px rgba(37,99,235,.7);transition:all .15s var(--c-ease)}
.agent-tab3 .ag-sb-seed:hover{background:#1d56cf}
.agent-tab3 .ag-sb-seed:disabled{opacity:.5;cursor:default}
.agent-tab3 .ag-sb-msg{margin-top:13px;font-size:13.5px;line-height:1.5;border-radius:12px;padding:11px 14px}
.agent-tab3 .ag-sb-msg.is-ok{background:#e7f8ee;color:#16834f;border:1px solid #c7ecd6}
.agent-tab3 .ag-sb-msg.is-err{background:#fdecec;color:#c0432f;border:1px solid #f3d2cc}
.agent-tab3 .ag-sb-foot{margin:14px 0 0;font-size:12.5px;line-height:1.5;color:#9aa6bd}

/* L5b — шапка-идентичность бота (аватар + имя + статус + карандаш) */
.agent-tab3 .ag-head{display:flex!important;align-items:center;gap:14px;flex-wrap:wrap;grid-template-columns:none!important}
.agent-tab3 .ag-head-av{width:44px;height:44px;flex:none;border-radius:12px;background:#eaf3ff;color:var(--c-accent);display:grid;place-items:center}
.agent-tab3 .ag-head-av svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-head-id{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;flex:1}
.agent-tab3 .ag-head-nameline{display:flex;align-items:center;gap:10px;min-width:0;width:100%}
.agent-tab3 .ag-head-nameline.editing{gap:8px}
.agent-tab3 .ag-head-nameline.editing .ag-head-input{flex:1;min-width:0}
.agent-tab3 .ag-head-id .ag-badge{margin:0}
/* бейдж статуса: по умолчанию серый («черновик»/«неактивный»), зелёный только для активного */
.agent-tab3 .ag-badge{background:#eef1f5;color:#7d8998}
.agent-tab3 .ag-badge.on{background:#e7f8ee;color:#16834f}
.agent-tab3 .ag-head-name{font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:24px;font-weight:700;color:var(--c-ink);letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agent-tab3 .ag-head-input{font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:22px;font-weight:700;color:var(--c-ink);border:1px solid var(--c-accent-line);border-radius:10px;padding:6px 12px;background:var(--c-surface);min-width:240px;max-width:100%}
.agent-tab3 .ag-head-input:focus{outline:none;box-shadow:0 0 0 3px var(--c-accent-soft)}
.agent-tab3 .ag-head-edit{display:flex;align-items:center;gap:8px;margin-left:auto}
.agent-tab3 .ag-head-lbl{color:var(--c-ink-faint);font-size:12px}
.agent-tab3 .ag-head-pencil{width:34px;height:34px;flex:none;border:1px solid var(--c-line);border-radius:9px;background:var(--c-surface);color:var(--c-accent);display:grid;place-items:center;cursor:pointer;transition:all .15s var(--c-ease)}
.agent-tab3 .ag-head-pencil:hover{border-color:var(--c-accent-line);background:var(--c-accent-soft)}
.agent-tab3 .ag-head-pencil svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-head-new{flex:none;border:1px solid var(--c-line);background:var(--c-surface);border-radius:9px;padding:9px 14px;font:inherit;font-weight:700;color:var(--c-ink-soft);cursor:pointer;transition:all .15s var(--c-ease)}
.agent-tab3 .ag-head-new:hover{border-color:var(--c-accent-line);color:var(--c-accent);background:var(--c-accent-soft)}
/* Режим работы — две кнопки вверху справа в шапке (по макету) */
.agent-tab3 .ag-head{flex-wrap:nowrap}
.agent-tab3 .ag-head-id{min-width:0}
.agent-tab3 .ag-head-modes{display:inline-flex;gap:10px;flex:0 0 auto;margin-left:auto}
.agent-tab3 .ag-head-mode{appearance:none;border:1.5px solid transparent;background:#eef1f7;color:#46587a;font:inherit;font-weight:700;font-size:14px;padding:10px 20px;border-radius:11px;cursor:pointer;white-space:nowrap;transition:all .15s var(--c-ease)}
.agent-tab3 .ag-head-mode:hover{background:#e6eaf2;color:#28344c}
.agent-tab3 .ag-head-mode.is-on{background:#fff;border-color:#bcd4f6;color:#1f73e0;box-shadow:0 1px 2px rgba(20,50,100,.06)}
.agent-tab3 .ag-head-fdr{display:flex;align-items:center;gap:10px;margin:12px 0 0;background:#fff7ed;border:1px solid #fde4c8;border-radius:12px;padding:11px 14px;font-size:13px;line-height:1.45;color:#9a5a25}
.agent-tab3 .ag-head-fdr-ic{flex:0 0 auto;width:20px;height:20px;border-radius:50%;background:#f5a35a;color:#fff;font-weight:800;font-size:12px;display:inline-flex;align-items:center;justify-content:center}
.agent-tab3 .ag-head-fdr code{font-family:'JetBrains Mono',ui-monospace,Consolas,monospace;font-size:12px;background:#f7e3cc;color:#8a4d1c;padding:1px 6px;border-radius:5px}

/* L5b — крестик удаления у нового бота (черновик) в списке слева */
.agent-tab3 .ag-bot.is-draft{position:relative}
.agent-tab3 .ag-bot-x{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:24px;height:24px;border-radius:50%;background:#fdecec;color:#e04747;display:grid;place-items:center;font-size:17px;line-height:1;cursor:pointer;transition:background .15s var(--c-ease)}
.agent-tab3 .ag-bot-x:hover{background:#f7c2c2}

/* L5c — редактирование имени: подпись над линией, инпут-линия, галочка/крестик */
.agent-tab3 .ag-head-namewrap{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.agent-tab3 .ag-head-input{border:0!important;border-bottom:2px solid var(--c-accent-line)!important;border-radius:0!important;padding:4px 0!important;background:transparent!important;font-family:'Bricolage Grotesque',Manrope,sans-serif;font-size:22px;font-weight:700;color:var(--c-ink);width:100%}
.agent-tab3 .ag-head-input:focus{outline:none!important;border-bottom-color:var(--c-accent)!important;box-shadow:none!important}
.agent-tab3 .ag-head-ok,
.agent-tab3 .ag-head-cancel{width:34px;height:34px;flex:none;border:1px solid var(--c-line);border-radius:9px;background:var(--c-surface);display:grid;place-items:center;cursor:pointer;transition:all .15s var(--c-ease)}
.agent-tab3 .ag-head-ok{color:#16a34a}
.agent-tab3 .ag-head-ok:hover{background:#e8f7ee;border-color:#bfe6cd}
.agent-tab3 .ag-head-cancel{color:var(--c-ink-soft)}
.agent-tab3 .ag-head-cancel:hover{background:var(--c-surface-2)}
.agent-tab3 .ag-head-ok svg,
.agent-tab3 .ag-head-cancel svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}

/* L5d — запланированный follow-up в тесте = системная карточка (не похожа на реальный ответ) */
/* Запланированный follow-up в тесте: серое центр-уведомление без рамки, оранжевый круг у «follow-up» */
.agent-preview .ag-msg.sysnote{justify-content:center}
.agent-preview .ag-sysnote{max-width:82%;text-align:center;color:var(--c-ink-faint);font-size:11.5px;line-height:1.5}
.agent-preview .ag-sysnote-meta{display:block}
.agent-preview .ag-sysnote-text{margin-top:3px;color:var(--c-ink-faint)}
.agent-preview .ag-fu-odot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#f59e0b;margin-right:5px;vertical-align:middle}

@media(prefers-reduced-motion:reduce){
  .agent-tab3 .ag-dot.on,
  .agent-preview .ag-bubble,
  .agent-preview .ag-typing::after{animation:none!important}
}

/* Кнопка «Запустить вручную» в секции реанимации */
.agent-tab3 .ag-rn-runrow{display:flex;align-items:center;gap:12px;margin-top:12px;flex-wrap:wrap}
.agent-tab3 .ag-rn-runrow>button{height:auto;border:0;border-radius:10px;padding:11px 20px;font-weight:800;
  background:var(--c-accent,#1f73e0);color:#fff;cursor:pointer;transition:background .15s ease}
.agent-tab3 .ag-rn-runrow>button:hover{background:var(--c-accent-deep,#0b62c9)}
.agent-tab3 .ag-rn-runrow .ag-src{flex:1;min-width:220px;margin:0}

/* Подсветка заголовков подразделов при наведении — точь-в-точь как строка кандидата
   в «Найм водителей» (.candidate-live-row:hover): светло-синий фон + левый акцент-бар. */
.agent-tab3 .ag-acc-d>summary,
.agent-tab3 .ag-block>.ag-block-head,
.agent-tab3 .ag-kb-phead{
  transition:background-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.agent-tab3 .ag-acc-d>summary:hover,
.agent-tab3 .ag-block>.ag-block-head:hover,
.agent-tab3 .ag-kb-phead:hover{
  background:#f1f7ff;
  box-shadow:inset 3px 0 0 #2f6bed;
}

/* ===== Хаб разделов «Управление HR-ботом» (как на макете) ===== */
.agent-tab3 .ag-head-badges{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.agent-tab3 .ag-badge.mode{font-weight:700}
.agent-tab3 .ag-badge.mode.test{background:#fde7d3;color:#d98512}
.agent-tab3 .ag-badge.mode.work{background:#e8f0fe;color:#2f6fed}
/* dry-run баннер */
.agent-tab3 .ag-fdr-banner{display:flex;gap:13px;background:#fff6e9;border:1px solid #f7e3c2;border-radius:15px;padding:15px 18px;margin:14px 0 0}
.agent-tab3 .ag-fdr-warn{width:26px;height:26px;flex:none;border-radius:50%;background:#f59e0b;color:#fff;display:grid;place-items:center;font-weight:800;font-size:15px;margin-top:1px}
.agent-tab3 .ag-fdr-banner p{margin:0;color:#5d5340;font-size:13.5px;line-height:1.6}
.agent-tab3 .ag-fdr-banner b{color:#3f3a30;font-weight:800}
.agent-tab3 .ag-fdr-chip{font-family:'JetBrains Mono',ui-monospace,Consolas,monospace;font-size:12px;background:#f3e2c2;color:#7a5a1e;padding:2px 7px;border-radius:6px}
/* группа-карточка */
.agent-tab3 .ag-hub-card{background:var(--c-surface);border:1px solid var(--c-line);border-radius:18px;box-shadow:var(--c-shadow-sm);padding:20px 20px 10px;margin-top:20px}
.agent-tab3 .ag-hub-head{margin:2px 6px 14px}
.agent-tab3 .ag-hub-head h2{margin:0;font-size:17px;font-weight:800;color:var(--c-ink);letter-spacing:-.01em}
.agent-tab3 .ag-hub-head p{margin:4px 0 0;color:var(--c-ink-soft);font-size:13px}
.agent-tab3 .ag-hub-rows{display:flex;flex-direction:column}
/* строка */
.agent-tab3 .ag-hubrow{display:flex;align-items:center;gap:15px;width:100%;text-align:left;padding:14px 8px;border:0;border-top:1px solid var(--c-line-soft,#eef1f6);background:transparent;border-radius:10px;cursor:pointer;font:inherit;transition:background .14s var(--c-ease)}
.agent-tab3 .ag-hub-rows .ag-hubrow:first-child{border-top:0}
.agent-tab3 .ag-hubrow:hover{background:#f8fafd}
.agent-tab3 .ag-hubrow-ic{width:40px;height:40px;flex:none;border-radius:11px;display:grid;place-items:center}
.agent-tab3 .ag-hubrow-ic svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-hubrow-ic.blue{background:#e8f0fe;color:#2f6fed}
.agent-tab3 .ag-hubrow-ic.indigo{background:#ece7fb;color:#7c5cdb}
.agent-tab3 .ag-hubrow-ic.amber{background:#fdeccf;color:#ef9a1e}
.agent-tab3 .ag-hubrow-ic.slate{background:#eaeef4;color:#74809a}
.agent-tab3 .ag-hubrow-ic.teal{background:#ddf1eb;color:#13a085}
.agent-tab3 .ag-hubrow-ic.orange{background:#fde6d6;color:#f3792b}
.agent-tab3 .ag-hubrow-meta{flex:1;min-width:0}
.agent-tab3 .ag-hubrow-meta b{display:block;font-size:15px;font-weight:700;color:var(--c-ink)}
.agent-tab3 .ag-hubrow-meta small{display:block;color:var(--c-ink-soft);font-size:13px;margin-top:3px}
.agent-tab3 .ag-hubrow-badge{flex:none;font-size:12px;font-weight:700;color:#71809b;background:#eef2fb;padding:5px 11px;border-radius:999px;white-space:nowrap}
.agent-tab3 .ag-hubrow-badge.on{color:#3a9b6c;background:#e4f5ec}
.agent-tab3 .ag-hubrow-chev{flex:none;width:18px;height:18px;color:var(--c-ink-faint)}
/* деталь раздела */
.agent-tab3 .ag-detail-back{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--c-accent);font:inherit;font-weight:700;font-size:14px;cursor:pointer;padding:6px 4px;margin:18px 0 4px;border-radius:8px}
.agent-tab3 .ag-detail-back:hover{background:var(--c-accent-soft)}
.agent-tab3 .ag-detail-back svg{width:18px;height:18px}
.agent-tab3 .ag-detail-head{display:flex;align-items:center;gap:13px;margin:6px 2px 14px}
.agent-tab3 .ag-detail-head h2{margin:0;font-size:20px;font-weight:800;color:var(--c-ink);letter-spacing:-.01em}
.agent-tab3 .ag-detail-field{display:flex;flex-direction:column;gap:6px}
.agent-tab3 .ag-detail-field textarea{border:1px solid var(--c-line);border-radius:12px;background:var(--c-surface-2);padding:12px 14px;font:inherit;line-height:1.5;color:var(--c-ink);resize:vertical}
.agent-tab3 .ag-detail-field textarea:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);background:var(--c-surface)}

/* ===== «Реанимация заявок» — редизайн по макету (ag-rn2) ===== */
.agent-tab3 .ag-rn2-panel .ag-fu-pbody{overflow:visible}
.agent-tab3 .ag-rn2-row{display:flex;align-items:flex-start;gap:14px;padding:16px 2px;border-top:1px solid var(--c-line-soft,#eef1f6)}
.agent-tab3 .ag-rn2-ic{flex:none}
.agent-tab3 .ag-rn2-ic .ag-fld-ico{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#eef2f9;color:#6b7a93;margin:0}
.agent-tab3 .ag-rn2-ic .ag-fld-ico svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-rn2-l{flex:1;min-width:0;padding-top:7px}
.agent-tab3 .ag-rn2-l b{display:block;font-size:14.5px;font-weight:700;color:var(--c-ink)}
.agent-tab3 .ag-rn2-l small{display:block;color:var(--c-ink-soft);font-size:12.5px;margin-top:3px;line-height:1.45;max-width:44ch}
.agent-tab3 .ag-rn2-c{margin-left:auto;display:flex;flex-direction:column;gap:8px;align-items:flex-end;padding-top:2px}
.agent-tab3 .ag-rn2-row--wide{flex-wrap:wrap}
.agent-tab3 .ag-rn2-row--wide .ag-rn2-c{margin-left:0;flex-basis:100%;align-items:stretch;margin-top:8px}
/* дни */
.agent-tab3 .ag-rn2-days{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.agent-tab3 .ag-rn2-day{width:48px;height:40px;border:1.5px solid #cdddf7;background:#fff;color:#2f6fed;font:inherit;font-weight:700;font-size:14px;border-radius:11px;cursor:pointer;transition:all .14s ease}
.agent-tab3 .ag-rn2-day:hover{background:#f5f9ff}
.agent-tab3 .ag-rn2-day.on{background:#2f6fed;border-color:#2f6fed;color:#fff}
/* время */
.agent-tab3 .ag-rn2-times{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:flex-end}
.agent-tab3 .ag-rn2-time{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--c-line);border-radius:11px;padding:4px 4px 4px 12px;background:#fff}
.agent-tab3 .ag-rn2-time input[type=time]{border:0;font:inherit;font-weight:700;color:var(--c-ink);background:transparent;width:66px}
.agent-tab3 .ag-rn2-time input[type=time]:focus{outline:none}
.agent-tab3 .ag-rn2-clock,.agent-tab3 .ag-rn2-trash{width:34px;height:34px;flex:none;border:1px solid var(--c-line);border-radius:9px;background:#fff;display:grid;place-items:center;cursor:pointer}
.agent-tab3 .ag-rn2-clock{color:#6b7a93}
.agent-tab3 .ag-rn2-clock svg{width:18px;height:18px}
.agent-tab3 .ag-rn2-clock:hover{background:var(--c-surface-2)}
.agent-tab3 .ag-rn2-trash{color:#e24b4a;border-color:#f3cccc}
.agent-tab3 .ag-rn2-trash svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-rn2-trash:hover{background:#fdecec}
.agent-tab3 .ag-rn2-timeadd{border:1px dashed #cdddf7;background:#fff;color:#2f6fed;font:inherit;font-weight:700;border-radius:11px;padding:9px 16px;cursor:pointer}
.agent-tab3 .ag-rn2-timeadd:hover{background:#f5f9ff}
/* степпер +/− */
.agent-tab3 .ag-rn2-step{display:inline-flex;align-items:center;border:1px solid var(--c-line);border-radius:11px;overflow:hidden;background:#fff}
.agent-tab3 .ag-rn2-stepbtn{width:42px;height:42px;border:0;background:#f4f6fb;color:#46587a;font-size:20px;line-height:1;cursor:pointer}
.agent-tab3 .ag-rn2-stepbtn:hover{background:#e9eef7}
.agent-tab3 .ag-rn2-step input{width:64px;height:42px;border:0;border-left:1px solid var(--c-line);border-right:1px solid var(--c-line);text-align:center;font:inherit;font-weight:700;color:var(--c-ink);background:#fff}
.agent-tab3 .ag-rn2-step input:focus{outline:none}
.agent-tab3 .ag-rn2-step input::-webkit-outer-spin-button,.agent-tab3 .ag-rn2-step input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
/* мультивыбор статусов */
.agent-tab3 .ag-rn2-msel{position:relative;min-width:260px}
.agent-tab3 .ag-rn2-mselbtn{display:flex;align-items:center;gap:8px;width:100%;border:1px solid var(--c-line);border-radius:11px;background:#fff;padding:11px 14px;font:inherit;color:var(--c-ink);cursor:pointer;text-align:left}
.agent-tab3 .ag-rn2-mselbtn>span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agent-tab3 .ag-rn2-mselbtn:hover{border-color:var(--c-accent-line)}
.agent-tab3 .ag-rn2-mselbtn .ag-chev{width:18px;height:18px;color:var(--c-ink-faint);transition:transform .15s ease}
.agent-tab3 .ag-rn2-msel.open .ag-rn2-mselbtn .ag-chev{transform:rotate(180deg)}
.agent-tab3 .ag-rn2-mselpop{display:none;position:absolute;z-index:40;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1px solid var(--c-line);border-radius:12px;box-shadow:var(--c-shadow-md);padding:6px;max-height:300px;overflow:auto}
.agent-tab3 .ag-rn2-msel.open .ag-rn2-mselpop{display:block}
.agent-tab3 .ag-rn2-opt{display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:8px;cursor:pointer;font-size:14px;color:var(--c-ink)}
.agent-tab3 .ag-rn2-opt:hover{background:var(--c-accent-soft)}
.agent-tab3 .ag-rn2-opt input{width:16px;height:16px;flex:none;accent-color:var(--c-accent)}
/* текст сообщения */
.agent-tab3 .ag-rn2-msg{width:100%}
.agent-tab3 .ag-rn2-textarea{width:100%;box-sizing:border-box;border:1px solid var(--c-line);border-radius:12px;background:var(--c-surface-2);padding:12px 14px;font:inherit;line-height:1.5;color:var(--c-ink);resize:vertical;min-height:84px}
.agent-tab3 .ag-rn2-textarea:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);background:#fff}
.agent-tab3 .ag-rn2-genbtn{align-self:flex-start;margin-top:10px;display:inline-flex;align-items:center;gap:7px;border:1px solid var(--c-accent-line);background:var(--c-accent-soft);color:var(--c-accent);font:inherit;font-weight:700;font-size:13px;padding:10px 16px;border-radius:11px;cursor:pointer}
.agent-tab3 .ag-rn2-genbtn span{font-size:16px;line-height:1}
.agent-tab3 .ag-rn2-genbtn:hover{background:#dfeeff}
/* лимит */
.agent-tab3 .ag-rn2-limit{display:inline-flex;align-items:center;gap:14px;flex-wrap:wrap}
.agent-tab3 .ag-rn2-limlbl{color:var(--c-ink-soft);font-size:14px}
.agent-tab3 .ag-rn2-hint{margin:12px 0 0;color:var(--c-ink-soft);font-size:12.5px;line-height:1.55}
/* инфо-плашка */
.agent-tab3 .ag-rn2-info{display:flex;align-items:flex-start;gap:10px;margin-top:18px;background:#eef4fb;border:1px solid #d9e6f6;border-radius:12px;padding:13px 15px;color:#5a6b86;font-size:13px;line-height:1.55}
.agent-tab3 .ag-rn2-info-ic{flex:none;width:20px;height:20px;border-radius:50%;border:1.5px solid #9bb6dd;color:#5b7aa8;font-size:12px;font-style:italic;font-weight:700;display:grid;place-items:center;margin-top:1px}
/* запустить вручную */
.agent-tab3 .ag-rn2-runrow{display:flex;align-items:center;gap:16px;margin-top:18px;flex-wrap:wrap}
.agent-tab3 .ag-rn2-run{display:inline-flex;align-items:center;gap:9px;border:0;background:var(--c-accent);color:#fff;font:inherit;font-weight:700;font-size:15px;padding:13px 24px;border-radius:12px;cursor:pointer;box-shadow:0 6px 16px rgba(47,111,237,.28)}
.agent-tab3 .ag-rn2-run:hover{background:#2660d8}
.agent-tab3 .ag-rn2-run svg{width:18px;height:18px}
.agent-tab3 .ag-rn2-runhint{flex:1;min-width:220px;color:var(--c-ink-soft);font-size:12.5px;line-height:1.5}

/* ===== #1 время не клипается; #2 этапы со стикерами как в «Найм водителей» ===== */
.agent-tab3 .ag-rn2-time{padding:4px 6px 4px 12px}
.agent-tab3 .ag-rn2-time input[type=time]{width:104px;min-width:104px}
.agent-tab3 .ag-rn2-opt{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:6px 12px 6px 10px;border-radius:10px;cursor:pointer;font-size:15px;color:var(--c-ink)}
.agent-tab3 .ag-rn2-opt:hover{background:#eef5ff;color:#1166ff}
.agent-tab3 .ag-rn2-opt.is-on{background:#eef5ff}
.agent-tab3 .ag-rn2-optlbl{flex:1;min-width:0}
.agent-tab3 .ag-rn2-sti{flex:none;width:24px;height:24px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center}
.agent-tab3 .ag-rn2-sti svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.agent-tab3 .ag-rn2-sti--purple{background:#f0e9ff;color:#8b5cf6}
.agent-tab3 .ag-rn2-sti--green{background:#e9f8f0;color:#18a968}
.agent-tab3 .ag-rn2-sti--blue{background:#eaf1ff;color:#2b6dff}
.agent-tab3 .ag-rn2-sti--orange{background:#fff1df;color:#f59e0b}
.agent-tab3 .ag-rn2-sti--gray{background:#f1f5f9;color:#64748b}
.agent-tab3 .ag-rn2-sti--red{background:#fff1f1;color:#ef4444}
.agent-tab3 .ag-rn2-optck{flex:none;width:18px;height:18px;color:var(--c-accent);display:none}
.agent-tab3 .ag-rn2-opt.is-on .ag-rn2-optck{display:block}

/* ===== «Критерии выбора кандидатов» (04) — детали ===== */
.agent-tab3 .ag-sc{display:flex;flex-direction:column;gap:16px}
.agent-tab3 .ag-sc-grid{display:flex;gap:24px;flex-wrap:wrap}
.agent-tab3 .ag-sc-field{display:flex;flex-direction:column;gap:8px}
.agent-tab3 .ag-sc-lbl{font-size:13.5px;font-weight:700;color:var(--c-ink)}
.agent-tab3 .ag-sc-lbl small{display:block;font-weight:500;color:var(--c-ink-soft);font-size:12px;margin-top:3px}
.agent-tab3 .ag-sc-num{display:inline-flex;align-items:center;gap:10px}
.agent-tab3 .ag-sc-num input{width:120px;height:42px;border:1px solid var(--c-line);border-radius:11px;background:var(--c-surface-2);padding:0 12px;font:inherit;font-weight:700;color:var(--c-ink)}
.agent-tab3 .ag-sc-num input:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);background:#fff}
.agent-tab3 .ag-sc-suf{color:var(--c-ink-soft);font-size:14px}
.agent-tab3 .ag-sc-tags{display:flex;flex-wrap:wrap;gap:8px;min-height:10px}
.agent-tab3 .ag-sc-tag{display:inline-flex;align-items:center;gap:8px;background:#eef2fb;color:#42506b;border-radius:999px;padding:6px 8px 6px 13px;font-size:13px;font-weight:600}
.agent-tab3 .ag-sc-tag button{border:0;background:transparent;color:#8b93a6;font-size:16px;line-height:1;cursor:pointer;padding:0 2px}
.agent-tab3 .ag-sc-tag button:hover{color:#e24b4a}
.agent-tab3 .ag-sc-empty{color:var(--c-ink-faint);font-size:13px}
.agent-tab3 .ag-sc-addrow{display:flex;gap:10px}
.agent-tab3 .ag-sc-cinput{flex:1;max-width:320px;border:1px solid var(--c-line);border-radius:11px;background:var(--c-surface-2);padding:10px 13px;font:inherit;color:var(--c-ink)}
.agent-tab3 .ag-sc-cinput:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);background:#fff}
.agent-tab3 .ag-sc-addbtn{border:1px solid var(--c-accent-line);background:var(--c-accent-soft);color:var(--c-accent);font:inherit;font-weight:700;border-radius:11px;padding:0 18px;cursor:pointer}
.agent-tab3 .ag-sc-addbtn:hover{background:#dfeeff}
.agent-tab3 .ag-sc-err{color:#e24b4a;font-size:12.5px;min-height:14px}
.agent-tab3 .ag-sc-chips{display:flex;flex-wrap:wrap;gap:8px}
.agent-tab3 .ag-sc-chip{min-width:48px;height:40px;border:1.5px solid var(--c-line);background:#fff;color:var(--c-ink-soft);font:inherit;font-weight:700;border-radius:11px;cursor:pointer;padding:0 14px}
.agent-tab3 .ag-sc-chip:hover{border-color:var(--c-accent-line)}
.agent-tab3 .ag-sc-chip.on{background:var(--c-accent);border-color:var(--c-accent);color:#fff}
