/* =====================================================================
   Панель helper v2 — «Тихий Linear».
   Настоящий CSS панели: классы hx-*, токены --hx-*. Подключается рядом
   со старым panel.css и включается обёрткой .hx — так переезд идёт
   по одному экрану. Тема: data-theme="light|dark|auto" на .hx.
   ===================================================================== */

@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 900;font-display:swap;src:url(fonts/golos-text-cyrillic-wght-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 900;font-display:swap;src:url(fonts/golos-text-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+20BD,U+2122,U+2190-21FF,U+2212,U+2215,U+2318,U+FEFF,U+FFFD}

/* ---------- токены ---------- */
.hx{
  --hx-font:'Golos Text',system-ui,-apple-system,'Segoe UI',sans-serif;
  --hx-bg:#FBFBFA; --hx-surface:#FFFFFF; --hx-sidebar:#F5F5F3; --hx-raised:#F6F6F4;
  --hx-line:#ECECE9; --hx-line-strong:#E1E1DD;
  --hx-text:#18181B; --hx-text-2:#5E5E66; --hx-text-3:#94949C;
  --hx-accent:#5160D6; --hx-accent-soft:#EEF0FC; --hx-accent-text:#3F4CB8;
  --hx-hover:#F0F0ED; --hx-selected:#F2F2EF;
  --hx-bubble-in:#F3F3F1; --hx-bubble-bot:#EEF0FC; --hx-me:#ECECEA;
  --hx-ok:#2F8F55; --hx-ok-soft:#EAF5EE; --hx-success:#2F8F55;
  --hx-warn:#C9761C; --hx-warn-soft:#FCF3E6;
  --hx-danger:#CC4B4B; --hx-danger-soft:#FCEEEE;
  --hx-hot:#D9473F; --hx-move:#8462D4; --hx-idle:#A0A0A6;
  --hx-bot-elena:#0284C7; --hx-bot-maria:#7C3AED; --hx-bot-irina:#0D9488; --hx-bot-anna:#D97706;
  --hx-bot-yulia:#C026D3; --hx-bot-olga:#4D7C0F; --hx-bot-ekaterina:#BE185D; --hx-bot-alina:#2563EB;
  --hx-r-sm:6px; --hx-r-md:8px; --hx-r-lg:12px; --hx-r-xl:16px;
  --hx-s1:4px; --hx-s2:8px; --hx-s3:12px; --hx-s4:16px; --hx-s5:20px; --hx-s6:24px;
  --hx-t-xs:11.5px; --hx-t-sm:12.5px; --hx-t-md:13.5px; --hx-t-lg:15px; --hx-t-xl:19px; --hx-t-num:22px;
  --hx-shadow-pop:0 8px 28px rgba(20,20,30,.10),0 1px 3px rgba(20,20,30,.06);
  --hx-scrim:rgba(15,15,20,.28);
  font:400 var(--hx-t-md)/1.5 var(--hx-font); color:var(--hx-text); background:var(--hx-bg);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
.hx[data-theme="dark"]{
  --hx-bg:#0F0F11; --hx-surface:#141416; --hx-sidebar:#0B0B0D; --hx-raised:#18181B;
  --hx-line:#232327; --hx-line-strong:#2E2E33;
  --hx-text:#ECECEF; --hx-text-2:#A0A0A8; --hx-text-3:#6A6A72;
  --hx-accent:#7F89F2; --hx-accent-soft:#23253C; --hx-accent-text:#A9B0FF;
  --hx-hover:#1B1B1F; --hx-selected:#1C1C20;
  --hx-bubble-in:#1D1D21; --hx-bubble-bot:#262844; --hx-me:#26262B;
  --hx-ok:#52B87A; --hx-ok-soft:#16271D; --hx-success:#3FA567;
  --hx-warn:#E09A4A; --hx-warn-soft:#2B2116;
  --hx-danger:#E07070; --hx-danger-soft:#2D1818;
  --hx-hot:#E46A62; --hx-move:#A48BF0; --hx-idle:#6E6E76;
  --hx-bot-elena:#38BDF8; --hx-bot-maria:#A78BFA; --hx-bot-irina:#2DD4BF; --hx-bot-anna:#FBBF24;
  --hx-bot-yulia:#E879F9; --hx-bot-olga:#A3E635; --hx-bot-ekaterina:#F472B6; --hx-bot-alina:#60A5FA;
  --hx-shadow-pop:0 8px 28px rgba(0,0,0,.5); --hx-scrim:rgba(0,0,0,.5);
  color-scheme:dark;
}
@media (prefers-color-scheme: dark){
  .hx[data-theme="auto"]{
    --hx-bg:#0F0F11; --hx-surface:#141416; --hx-sidebar:#0B0B0D; --hx-raised:#18181B;
    --hx-line:#232327; --hx-line-strong:#2E2E33; --hx-text:#ECECEF; --hx-text-2:#A0A0A8; --hx-text-3:#6A6A72;
    --hx-accent:#7F89F2; --hx-accent-soft:#23253C; --hx-accent-text:#A9B0FF; --hx-hover:#1B1B1F; --hx-selected:#1C1C20;
    --hx-bubble-in:#1D1D21; --hx-bubble-bot:#262844; --hx-me:#26262B; --hx-ok:#52B87A; --hx-ok-soft:#16271D; --hx-success:#3FA567;
    --hx-warn:#E09A4A; --hx-warn-soft:#2B2116; --hx-danger:#E07070; --hx-danger-soft:#2D1818; --hx-hot:#E46A62; --hx-move:#A48BF0; --hx-idle:#6E6E76;
    --hx-shadow-pop:0 8px 28px rgba(0,0,0,.5); --hx-scrim:rgba(0,0,0,.5); color-scheme:dark;
  }
}
.hx *,.hx *::before,.hx *::after{box-sizing:border-box}
:where(.hx) button{font:inherit;color:inherit}
:where(.hx) a{color:inherit;text-decoration:none}
.hx-num{font-variant-numeric:tabular-nums}
.hx-muted{color:var(--hx-text-2)}
.hx-faint{color:var(--hx-text-3)}
.hx-spacer{flex:1}

/* ---------- каркас ---------- */
.hx-app{display:grid;grid-template-columns:216px minmax(0,1fr);height:100%;min-height:0}
.hx-app--rail{grid-template-columns:56px minmax(0,1fr)}
.hx-page{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--hx-surface)}
.hx-split{display:grid;min-height:0;height:100%}
.hx-pagehead{display:flex;align-items:center;gap:var(--hx-s2);min-height:54px;padding:0 var(--hx-s6);border-bottom:1px solid var(--hx-line)}
.hx-pagehead__title{font-size:var(--hx-t-lg);font-weight:600;margin:0}

/* сайдбар */
.hx-sidebar{background:var(--hx-sidebar);border-right:1px solid var(--hx-line);padding:12px 10px;display:flex;flex-direction:column;gap:1px;min-height:0}
.hx-ws{display:flex;align-items:center;gap:9px;padding:6px 8px 14px;font-weight:600;font-size:14px}
.hx-ws__mark{width:22px;height:22px;border-radius:7px;background:var(--hx-accent);flex:none}
.hx-search{display:flex;align-items:center;gap:8px;margin:0 0 10px;padding:6px 9px;border:1px solid var(--hx-line-strong);border-radius:var(--hx-r-md);color:var(--hx-text-3);background:var(--hx-surface);white-space:nowrap}
.hx-kbd{margin-left:auto;font:500 11px var(--hx-font);color:var(--hx-text-3);border:1px solid var(--hx-line-strong);border-radius:4px;padding:0 4px}
.hx-nav__section{font-size:var(--hx-t-xs);color:var(--hx-text-3);padding:14px 8px 4px}
.hx-nav__item{display:flex;align-items:center;gap:9px;padding:6px 8px;border-radius:7px;color:var(--hx-text-2);white-space:nowrap}
.hx-nav__item svg{flex:none}
.hx-nav__item>span:not(.hx-nav__count){min-width:0;overflow:hidden;text-overflow:ellipsis}
.hx-nav__item:hover{background:var(--hx-hover)}
.hx-nav__item.is-active{background:var(--hx-hover);color:var(--hx-text);font-weight:500}
.hx-nav__count{margin-left:auto;font-size:var(--hx-t-xs);color:var(--hx-text-3);font-variant-numeric:tabular-nums}
.hx-nav__count.is-hot{color:#fff;background:var(--hx-hot);border-radius:9px;padding:0 6px;font-weight:600}
.hx-rail{background:var(--hx-sidebar);border-right:1px solid var(--hx-line);display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px 0}
.hx-rail__mark{width:24px;height:24px;border-radius:7px;background:var(--hx-accent);margin-bottom:12px}
.hx-rail__item{width:36px;height:34px;border-radius:var(--hx-r-md);display:flex;align-items:center;justify-content:center;color:var(--hx-text-3);position:relative}
.hx-rail__item.is-active{background:var(--hx-hover);color:var(--hx-text)}
.hx-rail__badge{position:absolute;top:2px;right:1px;min-width:15px;height:15px;border-radius:8px;background:var(--hx-hot);color:#fff;font-size:9.5px;font-weight:600;display:flex;align-items:center;justify-content:center;padding:0 3px}

/* ---------- кнопки ---------- */
.hx-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 11px;border:1px solid var(--hx-line-strong);border-radius:var(--hx-r-md);background:var(--hx-surface);color:var(--hx-text);font-weight:500;font-size:var(--hx-t-sm);white-space:nowrap;cursor:pointer}
.hx-btn:hover{background:var(--hx-hover)}
.hx-btn:disabled{opacity:.45;cursor:not-allowed}
.hx-btn:focus-visible{outline:2px solid var(--hx-accent);outline-offset:1px}
.hx-btn--sm{height:28px;padding:0 10px}
.hx-btn--lg{height:40px;padding:0 16px;font-size:var(--hx-t-md)}
.hx-btn--primary{background:var(--hx-accent);border-color:var(--hx-accent);color:#fff}
.hx-btn--primary:hover{background:var(--hx-accent);filter:brightness(1.06)}
.hx-btn--ghost{border-color:transparent;background:transparent;color:var(--hx-text-2);padding:0 8px}
.hx-btn--take{border-color:var(--hx-accent);color:var(--hx-accent-text);background:var(--hx-accent-soft)}
.hx-btn--success{background:var(--hx-success);border-color:var(--hx-success);color:#fff}
.hx-btn--success:hover{background:var(--hx-success);filter:brightness(1.06)}
.hx-btn--flag{color:var(--hx-danger)}
.hx-btn--flag.is-done{color:var(--hx-ok)}
.hx-btn--icon{width:30px;padding:0}
.hx-btn--sm.hx-btn--icon{width:28px}

/* ---------- статусы и метки ---------- */
.hx-dot{width:7px;height:7px;border-radius:50%;background:var(--hx-idle);flex:none;display:inline-block}
.hx-dot--ok{background:var(--hx-ok)}.hx-dot--lead,.hx-dot--new{background:var(--hx-accent)}.hx-dot--lock{background:var(--hx-warn)}
.hx-dot--off{background:var(--hx-danger)}.hx-dot--move{background:var(--hx-move)}.hx-dot--hot{background:var(--hx-hot)}
.hx-status{display:inline-flex;align-items:center;gap:6px;font-size:var(--hx-t-sm);color:var(--hx-text-2);white-space:nowrap}
.hx-status--strong{color:var(--hx-text)}
.hx-bot{font-size:var(--hx-t-sm);font-weight:500;white-space:nowrap}
.hx-bot--elena{color:var(--hx-bot-elena)}.hx-bot--maria{color:var(--hx-bot-maria)}.hx-bot--irina{color:var(--hx-bot-irina)}.hx-bot--anna{color:var(--hx-bot-anna)}
.hx-bot--yulia{color:var(--hx-bot-yulia)}.hx-bot--olga{color:var(--hx-bot-olga)}.hx-bot--ekaterina{color:var(--hx-bot-ekaterina)}.hx-bot--alina{color:var(--hx-bot-alina)}
.hx-msgr{font-size:var(--hx-t-xs);color:var(--hx-text-3);font-weight:500}
.hx-unread{min-width:17px;height:17px;border-radius:9px;background:var(--hx-accent);color:#fff;font-size:10.5px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;padding:0 5px;font-variant-numeric:tabular-nums}
.hx-avatar{width:20px;height:20px;border-radius:50%;background:#C9CDEB;color:#2B3170;font-size:10px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;flex:none}
.hx[data-theme="dark"] .hx-avatar{background:#33375E;color:#C9CDEB}
.hx-avatar--other{background:#E6DCCB;color:#6B4E1F}
.hx[data-theme="dark"] .hx-avatar--other{background:#4A3F2C;color:#E6DCCB}
.hx-sep{color:var(--hx-text-3)}

/* ---------- вкладки, фильтры, счётчики ---------- */
.hx-tabs{display:flex;gap:2px;align-items:center}
.hx-tab{padding:3px 8px;border-radius:var(--hx-r-sm);color:var(--hx-text-2);font-size:var(--hx-t-sm);white-space:nowrap;cursor:pointer}
.hx-tab.is-active{background:var(--hx-hover);color:var(--hx-text);font-weight:500}
.hx-tab__count{color:var(--hx-text-3);margin-left:4px;font-variant-numeric:tabular-nums}
.hx-filter{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 9px;border:1px solid var(--hx-line-strong);border-radius:7px;font-size:var(--hx-t-sm);color:var(--hx-text-2);white-space:nowrap;background:var(--hx-surface)}
.hx-counters{display:flex;gap:10px;flex-wrap:wrap}
.hx-counter{flex:none;min-width:150px;border:1px solid var(--hx-line);border-radius:10px;padding:9px 14px;background:var(--hx-surface)}
.hx-counter__value{font-size:var(--hx-t-num);font-weight:600;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.hx-counter__label{font-size:var(--hx-t-sm);color:var(--hx-text-2)}
.hx-counter--late .hx-counter__value{color:var(--hx-hot)}
.hx-input{height:32px;width:100%;border:1px solid var(--hx-line-strong);border-radius:var(--hx-r-md);padding:0 10px;background:var(--hx-surface);color:var(--hx-text);font:inherit}
.hx-input::placeholder{color:var(--hx-text-3)}
.hx-input:focus{outline:2px solid var(--hx-accent-soft);border-color:var(--hx-accent)}

/* ---------- список чатов ---------- */
.hx-chatlist{border-right:1px solid var(--hx-line);display:flex;flex-direction:column;background:var(--hx-surface);min-width:0;min-height:0;overflow:hidden}
.hx-listhead{display:flex;align-items:center;gap:8px;height:50px;padding:0 16px;border-bottom:1px solid var(--hx-line);font-weight:600;font-size:14px}
.hx-listtabs{padding:8px 12px;border-bottom:1px solid var(--hx-line)}
.hx-chatrow{padding:11px 16px;border-bottom:1px solid var(--hx-line);display:grid;grid-template-columns:8px minmax(0,1fr) auto;column-gap:10px;row-gap:1px;cursor:pointer}
.hx-chatrow:hover{background:var(--hx-selected)}
.hx-chatrow.is-active{background:var(--hx-selected)}
.hx-chatrow .hx-dot{margin-top:7px}
.hx-chatrow__name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hx-chatrow__time{font-size:var(--hx-t-xs);color:var(--hx-text-3);font-variant-numeric:tabular-nums}
.hx-chatrow__meta{grid-column:2/4;font-size:var(--hx-t-sm);color:var(--hx-text-2);display:flex;gap:5px;align-items:center;white-space:nowrap;overflow:hidden}
.hx-chatrow__preview{grid-column:2/4;font-size:var(--hx-t-sm);color:var(--hx-text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------- диалог ---------- */
.hx-thread{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--hx-bg);position:relative}
.hx-threadhead{display:flex;align-items:center;gap:6px;min-height:56px;padding:8px 12px 8px 18px;border-bottom:1px solid var(--hx-line);flex-wrap:wrap;background:var(--hx-bg)}
.hx-who{display:flex;align-items:baseline;gap:8px;min-width:0}
.hx-who__name{font-weight:600;font-size:var(--hx-t-lg);white-space:nowrap}
.hx-who__num{color:var(--hx-text-3);font-variant-numeric:tabular-nums}
.hx-phone{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 8px;margin-left:4px;border-radius:7px;background:var(--hx-hover);font-weight:500;color:var(--hx-text);font-variant-numeric:tabular-nums;white-space:nowrap;cursor:copy}
.hx-phone__copy{color:var(--hx-text-3);display:inline-flex}
.hx-crmlink{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 9px;border-radius:7px;color:var(--hx-accent-text);font-weight:500;white-space:nowrap}
.hx-crmlink:hover{background:var(--hx-accent-soft)}
.hx-props{display:flex;gap:14px;padding:9px 18px;border-bottom:1px solid var(--hx-line);font-size:var(--hx-t-sm);color:var(--hx-text-2);align-items:center;flex-wrap:wrap}
.hx-props__item{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.hx-props__item svg{color:var(--hx-text-3)}
.hx-props__item.is-changed>span{background:var(--hx-warn-soft);color:var(--hx-text);border-radius:5px;padding:0 5px}
.hx-stage{display:inline-flex;gap:2px}
.hx-stage i{width:8px;height:4px;border-radius:2px;background:var(--hx-line-strong)}
.hx-stage i.is-done{background:var(--hx-accent)}
.hx-feed{flex:1;min-height:0;overflow:hidden;padding:16px 18px 8px;display:flex;flex-direction:column;gap:9px;justify-content:flex-end;max-width:780px;width:100%;margin:0 auto}
.hx-day{align-self:center;font-size:var(--hx-t-xs);color:var(--hx-text-3);margin:4px 0}
.hx-msg{max-width:76%;display:flex;flex-direction:column;gap:3px;align-self:flex-start;align-items:flex-start}
.hx-msg__bubble{padding:8px 12px;border-radius:13px;background:var(--hx-bubble-in);font-size:14px;line-height:1.45}
.hx-msg--bot,.hx-msg--manager{align-self:flex-end;align-items:flex-end}
.hx-msg--bot .hx-msg__bubble{background:var(--hx-bubble-bot)}
.hx-msg--manager .hx-msg__bubble{background:var(--hx-surface);border:1px solid var(--hx-line-strong)}
.hx-msg__time{font-size:var(--hx-t-xs);color:var(--hx-text-3);font-variant-numeric:tabular-nums}
.hx-attach{display:flex;align-items:center;gap:10px;padding:8px;border-radius:12px;background:var(--hx-bubble-in)}
.hx-attach__thumb{width:84px;height:60px;border-radius:8px;background:linear-gradient(135deg,#C9D3E6,#E9E4D8);flex:none}
.hx-attach__name{font-size:var(--hx-t-sm);color:var(--hx-text-2)}.hx-attach__name b{display:block;color:var(--hx-text);font-weight:500}
.hx-sysline{align-self:center;font-size:var(--hx-t-sm);color:var(--hx-text-2);display:flex;align-items:center;gap:6px}
.hx-sysline svg{color:var(--hx-ok)}
.hx-sysline--history{background:var(--hx-hover);padding:4px 10px;border-radius:999px}
.hx-sysline--history svg{color:var(--hx-text-3)}
.hx-remind{align-self:center;display:inline-flex;align-items:center;gap:7px;font-size:var(--hx-t-sm);color:var(--hx-warn);background:var(--hx-warn-soft);padding:4px 10px;border-radius:999px}
.hx-banner{margin:10px 18px 0;padding:8px 12px;border-radius:9px;display:flex;align-items:center;gap:8px;font-size:var(--hx-t-sm)}
.hx-banner--qa{background:var(--hx-danger-soft);color:var(--hx-danger)}
.hx-banner--taken{margin:0;background:var(--hx-accent-soft);color:var(--hx-accent-text)}

/* поле ответа */
.hx-dock{max-width:780px;width:calc(100% - 36px);margin:0 auto 14px;display:flex;flex-direction:column;gap:8px;position:relative}
.hx-unreadbar{display:flex;align-items:center;gap:8px;font-size:var(--hx-t-sm);color:var(--hx-text-2)}
.hx-unreadbar b{color:var(--hx-accent-text);font-weight:600}
.hx-composer{position:static}
.hx-composer__box{border:1px solid var(--hx-line-strong);border-radius:12px;background:var(--hx-surface);padding:10px 12px}
.hx-composer__text{min-height:20px;color:var(--hx-text)}
.hx-composer__text.is-empty{color:var(--hx-text-3)}
.hx-composer__bar{display:flex;align-items:center;gap:4px;margin-top:8px}
.hx-composer__hint{font-size:var(--hx-t-xs);color:var(--hx-text-3);margin-right:8px}
.hx-filechip{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:7px;background:var(--hx-hover);font-size:12px;color:var(--hx-text-2);margin-bottom:6px}
.hx-slash{position:absolute;left:0;right:120px;bottom:calc(100% + 6px);z-index:5;background:var(--hx-surface);border:1px solid var(--hx-line-strong);border-radius:11px;box-shadow:var(--hx-shadow-pop);overflow:hidden}
.hx-slash__head{font-size:var(--hx-t-xs);color:var(--hx-text-3);padding:8px 12px 4px;display:flex;justify-content:space-between}
.hx-slash__item{padding:7px 12px;display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px;align-items:baseline}
.hx-slash__item.is-active{background:var(--hx-accent-soft)}
.hx-slash__item b{font-weight:500}.hx-slash__item.is-active b{color:var(--hx-accent-text)}
.hx-slash__item span{font-size:var(--hx-t-sm);color:var(--hx-text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------- агент ---------- */
.hx-agent{background:var(--hx-raised);border-left:1px solid var(--hx-line);display:flex;flex-direction:column;min-height:0;overflow:hidden}
.hx-agent__head{padding:12px 14px 10px;border-bottom:1px solid var(--hx-line)}
.hx-agent__title{display:flex;align-items:center;gap:7px;font-weight:600}
.hx-agent__title svg{color:var(--hx-text-2)}
.hx-agent__ctx{margin-top:3px;font-size:var(--hx-t-sm);color:var(--hx-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hx-agent__ctx b{color:var(--hx-text);font-weight:500}
.hx-agent__feed{flex:1;min-height:0;overflow:hidden;padding:14px;display:flex;flex-direction:column;gap:10px;justify-content:flex-end}
.hx-agent__foot{padding:10px 12px 12px;border-top:1px solid var(--hx-line)}
.hx-agentmsg--me{align-self:flex-end;max-width:86%;background:var(--hx-me);border-radius:12px;padding:7px 11px}
.hx-agentmsg--me small{display:block;font-size:11px;color:var(--hx-text-3);margin-top:2px}
.hx-agentmsg--agent{align-self:flex-start;max-width:96%;display:flex;gap:8px}
.hx-agentmsg__icon{flex:none;width:22px;height:22px;border-radius:7px;border:1px solid var(--hx-line-strong);background:var(--hx-surface);display:flex;align-items:center;justify-content:center;color:var(--hx-text-2)}
.hx-plan{margin-top:7px;background:var(--hx-surface);border:1px solid var(--hx-line-strong);border-radius:11px;overflow:hidden}
.hx-plan__head{display:flex;align-items:center;gap:7px;padding:9px 11px;font-weight:600;font-size:13px;border-bottom:1px solid var(--hx-line);white-space:nowrap}
.hx-plan__state{margin-left:auto;font-weight:500;font-size:12px;color:var(--hx-text-3)}
.hx-plan__state.is-done{color:var(--hx-ok)}
.hx-plan__row{display:grid;grid-template-columns:78px minmax(0,1fr);gap:8px;padding:6px 11px;font-size:var(--hx-t-sm)}
.hx-plan__row>span:first-child{color:var(--hx-text-3)}
.hx-plan__new{font-weight:600}
.hx-plan__ok{color:var(--hx-ok)}
.hx-plan__actions{display:flex;gap:6px;padding:9px 11px 11px}
.hx-thinking{display:flex;align-items:center;gap:8px;font-size:var(--hx-t-sm);color:var(--hx-text-3)}
.hx-thinking i{width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.4;animation:hx-pulse 1.2s infinite}
.hx-thinking i:nth-child(2){animation-delay:.2s}.hx-thinking i:nth-child(3){animation-delay:.4s}
@keyframes hx-pulse{50%{opacity:1}}
@media (prefers-reduced-motion:reduce){.hx-thinking i{animation:none;opacity:.7}}
.hx-agentnote{border:1px solid var(--hx-line-strong);border-radius:10px;padding:8px 10px;font-size:var(--hx-t-sm);color:var(--hx-text-2);background:var(--hx-surface);display:flex;gap:8px;align-items:flex-start}
.hx-agentnote svg{flex:none;margin-top:2px;color:var(--hx-warn)}
.hx-agentnote--noaccess svg{color:var(--hx-text-3)}
.hx-chips{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px}
.hx-chip{height:24px;padding:0 9px;border-radius:999px;border:1px solid var(--hx-line-strong);background:var(--hx-surface);font-size:12px;color:var(--hx-text-2);display:inline-flex;align-items:center;white-space:nowrap;cursor:pointer}
.hx-agentinput{display:flex;align-items:flex-end;gap:6px;background:var(--hx-surface);border:1px solid var(--hx-line-strong);border-radius:11px;padding:8px 8px 8px 11px}
.hx-agentinput__text{flex:1;color:var(--hx-text-3);font-size:13px;line-height:1.4}
.hx-agentinput__send{width:28px;height:28px;border-radius:var(--hx-r-md);border:1px solid var(--hx-line-strong);display:flex;align-items:center;justify-content:center;color:var(--hx-text-2);flex:none}
.hx-hint{margin-top:7px;font-size:11px;color:var(--hx-text-3);display:inline-flex;gap:4px;align-items:center;cursor:help}

/* ---------- задачи «Требуют внимания» ---------- */
.hx-taskrow{display:grid;grid-template-columns:30px minmax(0,1fr) 92px 190px 168px;align-items:center;gap:14px;padding:11px 24px;border-bottom:1px solid var(--hx-line);background:var(--hx-surface)}
.hx-taskrow:hover{background:var(--hx-selected)}
.hx-taskrow.is-fresh{background:var(--hx-accent-soft)}
.hx-taskrow.is-muted .hx-taskrow__title,.hx-taskrow.is-muted .hx-taskrow__sub{color:var(--hx-text-3)}
.hx-taskrow.is-muted .hx-taskicon{opacity:.55}
.hx-taskicon{width:30px;height:30px;border-radius:var(--hx-r-md);background:var(--hx-hover);display:flex;align-items:center;justify-content:center;font-size:15px;flex:none}
.hx-taskrow__title{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hx-taskrow__sub{font-size:var(--hx-t-sm);color:var(--hx-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}
.hx-taskrow__actions{display:flex;gap:6px;justify-content:flex-end}
.hx-taskrow__result{grid-column:4/6;font-size:12px;color:var(--hx-text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hx-taskrow__result b{color:var(--hx-text-2);font-weight:500}
.hx-taskrow--compact{grid-template-columns:28px minmax(0,1fr) auto;gap:4px 10px;padding:11px 16px}
.hx-taskrow--compact>.hx-typeicon{grid-row:1/3;grid-column:1}
.hx-taskrow--compact .hx-taskrow__title,.hx-taskrow--compact .hx-taskrow__sub{grid-column:2}
.hx-taskrow--compact .hx-taskrow__aside{grid-row:1/3;grid-column:3;display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.hx-taskrow--compact.is-active{background:var(--hx-selected);box-shadow:inset 2px 0 0 var(--hx-accent)}
.hx-wait{display:inline-flex;align-items:center;gap:6px;font-size:var(--hx-t-sm);color:var(--hx-text-2);white-space:nowrap;font-variant-numeric:tabular-nums}
.hx-wait::before{content:'';width:7px;height:7px;border-radius:50%;background:var(--hx-line-strong)}
.hx-wait--late{color:var(--hx-hot);font-weight:500}
.hx-wait--late::before{background:var(--hx-hot)}
.hx-auto{display:inline-flex;align-items:center;gap:5px;font-size:var(--hx-t-xs);color:var(--hx-text-3);border:1px dashed var(--hx-line-strong);border-radius:6px;padding:1px 6px}
.hx-taskbar{margin:10px 18px 0;border:1px solid var(--hx-line-strong);border-radius:11px;background:var(--hx-surface)}
.hx-taskbar__main{display:flex;align-items:center;gap:10px;padding:9px 12px}
.hx-taskbar__icon{font-size:16px}
.hx-taskbar__title{font-weight:600}
.hx-taskbar__meta{font-size:var(--hx-t-sm);color:var(--hx-text-2)}
.hx-taskbar__resolve{display:flex;align-items:center;gap:8px;padding:0 12px 10px}
.hx-taskbar__comment{flex:1;height:30px;border:1px solid var(--hx-line-strong);border-radius:var(--hx-r-md);padding:0 10px;display:flex;align-items:center;font-size:13px;color:var(--hx-text);background:var(--hx-surface)}
.hx-taskbar__comment.is-empty{color:var(--hx-text-3)}
.hx-taskbar__req{font-size:var(--hx-t-xs);color:var(--hx-text-3);white-space:nowrap}
.hx-taskbar.is-done{background:var(--hx-hover);border-color:transparent}
.hx-taskbar.is-done .hx-taskbar__title{color:var(--hx-text-2);font-weight:500}
.hx-taskbar__done{color:var(--hx-ok);display:inline-flex;align-items:center;gap:5px;font-weight:500}

/* ---------- обзор ---------- */
.hx-periods{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.hx-period{border:1px solid var(--hx-line);border-radius:var(--hx-r-lg);padding:12px 14px;background:var(--hx-surface)}
.hx-period__title{font-size:var(--hx-t-sm);color:var(--hx-text-2)}
.hx-period__nums{display:flex;gap:22px;margin:4px 0 10px}
.hx-period__num{font-size:var(--hx-t-num);font-weight:600;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.hx-period__lab{font-size:var(--hx-t-xs);color:var(--hx-text-2)}
.hx-period.is-muted .hx-period__num{color:var(--hx-text-2)}
.hx-bar{height:4px;border-radius:2px;background:var(--hx-hover);overflow:hidden}
.hx-bar>span{display:block;height:100%;background:var(--hx-accent);border-radius:2px}
.hx-period.is-muted .hx-bar>span{opacity:.5}
.hx-section{border:1px solid var(--hx-line);border-radius:var(--hx-r-lg);background:var(--hx-surface)}
.hx-section__head{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--hx-line)}
.hx-section__title{font-weight:600}
.hx-section__aside{margin-left:auto;font-size:var(--hx-t-sm);color:var(--hx-text-2)}
.hx-funnelrow{display:grid;grid-template-columns:160px minmax(0,1fr) 230px;gap:14px;align-items:center;padding:8px 16px;font-size:var(--hx-t-sm)}
.hx-funnelrow+.hx-funnelrow{border-top:1px solid var(--hx-line)}
.hx-funnelrow__num{text-align:right;color:var(--hx-text-2);font-variant-numeric:tabular-nums;white-space:nowrap}
.hx-funnelrow.is-total{font-weight:600}.hx-funnelrow.is-total .hx-funnelrow__num{color:var(--hx-text)}
.hx-toggle{display:inline-flex;align-items:center;gap:8px;font-size:var(--hx-t-sm)}
.hx-toggle__track{width:30px;height:18px;border-radius:9px;background:var(--hx-line-strong);position:relative}
.hx-toggle__track::after{content:'';position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.hx-toggle.is-on .hx-toggle__track{background:var(--hx-ok)}
.hx-toggle.is-on .hx-toggle__track::after{left:14px}

/* ---------- шаблоны ---------- */
.hx-tplrow{display:grid;grid-template-columns:160px minmax(0,1fr) 140px 60px;gap:14px;align-items:center;padding:10px 24px;border-bottom:1px solid var(--hx-line);background:var(--hx-surface)}
.hx-tplrow.is-active{background:var(--hx-selected);box-shadow:inset 2px 0 0 var(--hx-accent)}
.hx-tplrow__name{font-weight:500;color:var(--hx-accent-text)}
.hx-tplrow__text{font-size:var(--hx-t-sm);color:var(--hx-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hx-tplrow__uses{font-size:var(--hx-t-sm);color:var(--hx-text-3);font-variant-numeric:tabular-nums;white-space:nowrap}
.hx-editor{border:1px solid var(--hx-line-strong);border-radius:var(--hx-r-lg);background:var(--hx-surface);padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.hx-editor__label{font-size:var(--hx-t-xs);color:var(--hx-text-3)}
.hx-editor__area{border:1px solid var(--hx-line-strong);border-radius:var(--hx-r-md);padding:10px 12px;white-space:pre-line;line-height:1.5;min-height:140px}
.hx-var{background:var(--hx-accent-soft);color:var(--hx-accent-text);border-radius:4px;padding:0 4px;font-size:12.5px}

/* ---------- телефон ---------- */
.hx-mobile{position:relative;height:100%;overflow:hidden;background:var(--hx-surface);display:flex;flex-direction:column}
.hx-mobilehead{display:flex;align-items:center;gap:8px;padding:12px 14px 8px}
.hx-mobilehead__title{font-size:var(--hx-t-xl);font-weight:600;margin:0}
.hx-mobileacts{display:flex;gap:6px;padding:8px 12px;border-bottom:1px solid var(--hx-line)}
.hx-tabbar{position:absolute;left:0;right:0;bottom:0;height:62px;border-top:1px solid var(--hx-line);background:var(--hx-surface);display:flex;justify-content:space-around;align-items:center;font-size:10.5px;color:var(--hx-text-3)}
.hx-tabbar__item{display:flex;flex-direction:column;align-items:center;gap:3px;position:relative}
.hx-tabbar__item.is-active{color:var(--hx-text)}
.hx-tabbar__badge{position:absolute;top:-4px;right:2px;min-width:15px;height:15px;border-radius:8px;background:var(--hx-hot);color:#fff;font-size:9.5px;display:flex;align-items:center;justify-content:center;padding:0 3px}
.hx-scrim{position:absolute;inset:0;background:var(--hx-scrim)}
.hx-sheet{position:absolute;left:0;right:0;bottom:0;background:var(--hx-surface);border-radius:var(--hx-r-xl) var(--hx-r-xl) 0 0;box-shadow:0 -8px 30px rgba(0,0,0,.16);display:flex;flex-direction:column;overflow:hidden}
.hx-sheet--raised{background:var(--hx-raised)}
.hx-sheet__grab{width:36px;height:4px;border-radius:2px;background:var(--hx-line-strong);margin:8px auto 4px;flex:none}
.hx-toast{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);background:var(--hx-text);color:var(--hx-surface);border-radius:10px;padding:9px 14px;font-size:13px;display:flex;gap:14px;align-items:center;box-shadow:var(--hx-shadow-pop);white-space:nowrap}
.hx-toast__action{font-weight:600;opacity:.85;cursor:pointer}

/* ---------- типы задач: иконка на тихой плитке ---------- */
.hx-typeicon{width:30px;height:30px;border-radius:var(--hx-r-md);display:inline-flex;align-items:center;justify-content:center;flex:none;background:var(--hx-hover);color:var(--hx-text-2)}
.hx-typeicon--sm{width:28px;height:28px}
.hx-typeicon--xs{width:22px;height:22px;border-radius:6px}
.hx-typeicon--red{background:var(--hx-danger-soft);color:var(--hx-danger)}
.hx-typeicon--amber{background:var(--hx-warn-soft);color:var(--hx-warn)}
.hx-typeicon--violet{background:color-mix(in srgb,var(--hx-move) 12%,transparent);color:var(--hx-move)}
.hx-typeicon--blue{background:var(--hx-accent-soft);color:var(--hx-accent-text)}
.hx-typeicon--green{background:var(--hx-ok-soft);color:var(--hx-ok)}
.hx-typeicon--slate{background:var(--hx-hover);color:var(--hx-text-2)}
.hx-taskrow.is-muted .hx-typeicon{opacity:.5;filter:saturate(.4)}

/* ---------- уведомления ---------- */
.hx-notice{display:flex;align-items:flex-start;gap:9px;padding:9px 12px;border-radius:10px;font-size:var(--hx-t-sm);line-height:1.45;border:1px solid transparent}
.hx-notice svg{flex:none;margin-top:1px}
.hx-notice__body{flex:1;min-width:0}
.hx-notice__title{font-weight:600;color:var(--hx-text)}
.hx-notice__text{color:var(--hx-text-2)}
.hx-notice__actions{display:flex;gap:6px;align-self:center}
.hx-notice--info{background:var(--hx-accent-soft)}.hx-notice--info svg{color:var(--hx-accent-text)}
.hx-notice--success{background:var(--hx-ok-soft)}.hx-notice--success svg{color:var(--hx-ok)}
.hx-notice--warning{background:var(--hx-warn-soft)}.hx-notice--warning svg{color:var(--hx-warn)}
.hx-notice--danger{background:var(--hx-danger-soft)}.hx-notice--danger svg{color:var(--hx-danger)}
.hx-notice--neutral{background:var(--hx-surface);border-color:var(--hx-line-strong)}.hx-notice--neutral svg{color:var(--hx-text-3)}
.hx-toast--success svg{color:#6FD59A}.hx-toast--error svg{color:#F28B84}
.hx-toast svg{flex:none}
.hx-pop{width:340px;background:var(--hx-surface);border:1px solid var(--hx-line-strong);border-radius:var(--hx-r-lg);box-shadow:var(--hx-shadow-pop);padding:12px;display:flex;gap:10px}
.hx-pop__body{flex:1;min-width:0}
.hx-pop__eyebrow{font-size:var(--hx-t-xs);color:var(--hx-text-3);display:flex;align-items:center;gap:6px}
.hx-pop__eyebrow .hx-dot{width:6px;height:6px}
.hx-pop__title{font-weight:600;margin-top:1px}
.hx-pop__sub{font-size:var(--hx-t-sm);color:var(--hx-text-2);margin-top:1px}
.hx-pop__actions{display:flex;gap:6px;margin-top:9px}
.hx-pop__close{color:var(--hx-text-3);align-self:flex-start}

.hx-mobile .hx-counter{min-width:0;padding:8px 10px}
.hx-mobile .hx-counter__value{font-size:19px}
.hx-mobile .hx-counter__label{font-size:11.5px;line-height:1.25}

/* ---------- подсказки при наведении (data-tip на кнопке) ---------- */
.hx [data-tip]{position:relative}
.hx [data-tip]::after{content:attr(data-tip);position:absolute;top:calc(100% + 6px);left:50%;transform:translateX(-50%);z-index:20;
  background:var(--hx-text);color:var(--hx-surface);font:500 12px/1.3 var(--hx-font);padding:5px 8px;border-radius:6px;white-space:nowrap;
  pointer-events:none;opacity:0;transition:opacity .12s ease .25s;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.hx [data-tip]:hover::after,.hx [data-tip]:focus-visible::after,.hx [data-tip].is-tip::after{opacity:1;transition-delay:0s}
.hx [data-tip][data-tip-pos="top"]::after{top:auto;bottom:calc(100% + 6px)}
.hx [data-tip][data-tip-pos="left"]::after{left:auto;right:0;transform:none}
@media (prefers-reduced-motion:reduce){.hx [data-tip]::after{transition:none}}

/* ---------- окно постановки напоминания ---------- */
.hx-popover{width:360px;background:var(--hx-surface);border:1px solid var(--hx-line-strong);border-radius:var(--hx-r-lg);box-shadow:var(--hx-shadow-pop);padding:14px;display:flex;flex-direction:column;gap:12px}
.hx-popover__title{display:flex;align-items:center;gap:8px;font-weight:600}
.hx-popover__title svg{color:var(--hx-text-2)}
.hx-popover__sub{font-size:var(--hx-t-sm);color:var(--hx-text-2);margin-top:-8px}
.hx-field__label{font-size:var(--hx-t-xs);color:var(--hx-text-3);margin-bottom:5px}
.hx-choice{display:flex;flex-wrap:wrap;gap:6px}
.hx-choice span{height:28px;padding:0 10px;border-radius:7px;border:1px solid var(--hx-line-strong);display:inline-flex;align-items:center;font-size:var(--hx-t-sm);color:var(--hx-text-2);cursor:pointer;font-variant-numeric:tabular-nums}
.hx-choice span.is-active{border-color:var(--hx-accent);background:var(--hx-accent-soft);color:var(--hx-accent-text);font-weight:500}
.hx-check{display:flex;gap:9px;align-items:flex-start;font-size:var(--hx-t-sm);padding:6px 0}
.hx-check+.hx-check{border-top:1px solid var(--hx-line)}
.hx-check__box{width:16px;height:16px;border-radius:4px;border:1px solid var(--hx-line-strong);flex:none;margin-top:1px;display:flex;align-items:center;justify-content:center;color:#fff}
.hx-check.is-on .hx-check__box{background:var(--hx-accent);border-color:var(--hx-accent)}
.hx-check__text b{display:block;font-weight:500;color:var(--hx-text)}
.hx-check__text span{color:var(--hx-text-2)}
.hx-popover__note{font-size:var(--hx-t-xs);color:var(--hx-text-3)}
.hx-popover__actions{display:flex;gap:8px;justify-content:flex-end}

/* ---------- сотрудник в сайдбаре ---------- */
.hx-userfoot{margin-top:auto;display:flex;align-items:center;gap:9px;padding:10px 8px 2px;border-top:1px solid var(--hx-line)}
.hx-userfoot .hx-avatar{width:26px;height:26px;font-size:11px}
.hx-userfoot__name{font-weight:500;font-size:var(--hx-t-sm);line-height:1.2}
.hx-userfoot__role{font-size:var(--hx-t-xs);color:var(--hx-text-3)}

/* ---------- сотрудники ---------- */
.hx-staffrow{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,2fr) 130px 120px;gap:14px;align-items:center;padding:11px 24px;border-bottom:1px solid var(--hx-line);background:var(--hx-surface)}
.hx-staffrow.is-active{background:var(--hx-selected);box-shadow:inset 2px 0 0 var(--hx-accent)}
.hx-staffrow__who{display:flex;gap:10px;align-items:center;min-width:0}
.hx-staffrow__who .hx-avatar{width:28px;height:28px;font-size:11px}
.hx-staffrow__name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hx-staffrow__phone{font-size:var(--hx-t-sm);color:var(--hx-text-3);font-variant-numeric:tabular-nums}
.hx-staffhead{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,2fr) 130px 120px;gap:14px;padding:8px 24px;font-size:var(--hx-t-xs);color:var(--hx-text-3);border-bottom:1px solid var(--hx-line)}
.hx-tags{display:flex;flex-wrap:wrap;gap:5px}
.hx-tag{height:22px;padding:0 8px;border-radius:6px;background:var(--hx-hover);font-size:12px;color:var(--hx-text-2);display:inline-flex;align-items:center;white-space:nowrap}
.hx-tag--admin{background:var(--hx-accent-soft);color:var(--hx-accent-text)}
.hx-access{display:flex;flex-direction:column}
.hx-access__sub{font-size:var(--hx-t-xs);color:var(--hx-text-3)}
.hx-secret{display:flex;align-items:center;gap:10px;font:600 17px/1 ui-monospace,'SF Mono',Menlo,monospace;letter-spacing:1px;color:var(--hx-text);background:var(--hx-surface);border:1px dashed var(--hx-line-strong);border-radius:8px;padding:8px 10px;margin-top:6px}

/* ---------- таблица сводки ---------- */
.hx-table{width:100%;border-collapse:collapse;font-size:var(--hx-t-sm)}
.hx-table th{font-weight:500;color:var(--hx-text-3);font-size:var(--hx-t-xs);text-align:right;padding:8px 16px;border-bottom:1px solid var(--hx-line);white-space:nowrap}
.hx-table th:first-child,.hx-table td:first-child{text-align:left}
.hx-table td{padding:10px 16px;border-bottom:1px solid var(--hx-line);text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.hx-table tr:last-child td{border-bottom:none}
.hx-table td b{font-weight:500}
.hx-table .hx-sub{display:block;font-size:var(--hx-t-xs);color:var(--hx-text-3)}
.hx-table .is-late{color:var(--hx-hot);font-weight:500}
