/* go7.uz — «Планёрка» (assets/js/meet.js): чат владельца с AI-командой и задачи */
.mt-root { --mt-boss: #D99A1E; --mt-marketer: #E5476A; --mt-seller: #2F6FED; --mt-me: var(--accent); }
.mt-load { display: grid; place-items: center; padding: 80px 0; }
.mt-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }

/* ---------- Чат ---------- */
.mt-chat { display: flex; flex-direction: column; height: calc(100dvh - 150px); min-height: 520px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.has-ai-crumbs .mt-chat { height: calc(100dvh - 200px); }
.mt-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex: none; }
.mt-faces { display: flex; flex: none; }
.mt-face { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; border: 2px solid var(--surface-2); background: var(--mt-soft, var(--bg-2)); }
.mt-face + .mt-face { margin-left: -10px; }
.mt-face canvas, .mt-ava canvas, .mt-hello-faces canvas { image-rendering: pixelated; margin-top: 5px; }
.k-boss { --mt-c: var(--mt-boss); --mt-soft: rgba(217, 154, 30, .16); }
.k-marketer { --mt-c: var(--mt-marketer); --mt-soft: rgba(229, 71, 106, .12); }
.k-seller { --mt-c: var(--mt-seller); --mt-soft: rgba(47, 111, 237, .12); }
.mt-ht { min-width: 0; flex: 1; }
.mt-ht h1 { margin: 0; font-size: 18px; line-height: 1.2; letter-spacing: -.01em; }
.mt-ht p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-hr { display: flex; gap: 6px; flex: none; }
.mt-hr .btn { gap: 6px; }
.mt-sidebtn { display: none; position: relative; }
.mt-sidebtn em { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.mt-sidebtn em[hidden] { display: none; }

.mt-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; scroll-behavior: smooth; }
.mt-day { display: flex; justify-content: center; }
.mt-day span { padding: 3px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; font-weight: 700; }

/* Сообщения */
.mt-m { display: flex; gap: 8px; align-items: flex-end; max-width: min(720px, 92%); }
.mt-m.me { align-self: flex-end; }
.mt-m.ag { align-self: flex-start; }
.mt-ava { width: 34px; height: 34px; border-radius: 11px; background: var(--mt-soft); display: grid; place-items: center; overflow: hidden; flex: none; }
.mt-b { position: relative; padding: 8px 12px 7px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.mt-m.ag .mt-b { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: inset 3px 0 0 var(--mt-c); }
.mt-m.me .mt-b { background: var(--mt-me); color: #fff; border-bottom-right-radius: 6px; }
.mt-m.me.pend .mt-b { opacity: .72; }
.mt-who { display: flex; align-items: baseline; gap: 6px; margin-bottom: 1px; flex-wrap: wrap; }
.mt-who b { font-size: 13px; color: var(--mt-c); }
.mt-who small { font-size: 11.5px; color: var(--muted); }
.mt-tx b { font-weight: 800; }
.mt-at { display: block; text-align: right; font-size: 10.5px; margin-top: 2px; color: var(--muted); }
.mt-m.me .mt-at { color: rgba(255, 255, 255, .78); }
.mt-to-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: rgba(255, 255, 255, .9); margin-bottom: 2px; }
.mt-sys { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 1px; max-width: min(620px, 94%); text-align: center; }
.mt-sys span { padding: 6px 12px; border-radius: 12px; background: rgba(22, 163, 74, .1); color: #15803D; font-size: 13px; font-weight: 600; line-height: 1.45; }
.mt-sys.warn span { background: rgba(245, 158, 11, .14); color: #A15C07; }
.mt-sys em { font-style: normal; font-size: 10.5px; color: var(--muted); }
html[data-theme="dark"] .mt-sys span { color: #6EE7B7; } html[data-theme="dark"] .mt-sys.warn span { color: #FCD34D; }

/* «Команда обсуждает…» */
.mt-typing { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; padding-left: 2px; }
.mt-typing .mt-ava { width: 26px; height: 26px; border-radius: 9px; }
.mt-typing .mt-ava + .mt-ava { margin-left: -12px; border: 2px solid var(--surface); }
.mt-typing .mt-ava canvas { width: 24px !important; height: 24px !important; }
.mt-dots { display: inline-flex; gap: 3px; padding: 0 4px; }
.mt-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: mtDot 1.2s infinite ease-in-out; }
.mt-dots i:nth-child(2) { animation-delay: .15s; } .mt-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes mtDot { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }

/* Пусто: команда в сборе + идеи */
.mt-hello { margin: auto; max-width: 620px; text-align: center; padding: 18px 6px; }
.mt-hello-faces { display: flex; justify-content: center; margin-bottom: 8px; }
.mt-hello-faces span { width: 54px; height: 54px; border-radius: 16px; background: var(--mt-soft); display: grid; place-items: center; overflow: hidden; border: 3px solid var(--surface); }
.mt-hello-faces span + span { margin-left: -12px; }
.mt-hello h2 { margin: 4px 0 6px; font-size: 20px; }
.mt-hello > p { margin: 0 auto 14px; color: var(--ink-2); font-size: 14px; line-height: 1.55; max-width: 540px; }
.mt-ideas { display: grid; gap: 8px; text-align: left; }
.mt-idea { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.mt-idea:hover { border-color: var(--accent); background: var(--sel-bg); }
.mt-idea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mt-idea-to { flex: none; padding: 3px 8px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); font-size: 11.5px; font-weight: 800; }
.mt-hello-note { display: flex; align-items: center; justify-content: center; gap: 6px; text-wrap: balance; margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }
.mt-empty { margin: auto; text-align: center; max-width: 440px; display: grid; justify-items: center; gap: 8px; color: var(--muted); padding: 30px 10px; }
.mt-empty b { color: var(--ink); font-size: 16px; } .mt-empty p { margin: 0 0 6px; }

/* Ввод */
.mt-form { flex: none; border-top: 1px solid var(--line); padding: 8px 12px 8px; background: var(--surface); }
.mt-to { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.mt-to::-webkit-scrollbar { display: none; }
.mt-to-l { font-size: 12.5px; color: var(--muted); font-weight: 700; flex: none; }
.mt-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.mt-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--mt-c); }
.mt-chip:hover { border-color: var(--line-2); color: var(--ink); }
.mt-chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.mt-chip.on i { box-shadow: 0 0 0 2px var(--surface); }
.mt-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mt-in { display: flex; gap: 8px; align-items: flex-end; }
.mt-in textarea { flex: 1; min-width: 0; resize: none; max-height: 168px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit; font-size: 14.5px; line-height: 1.45; outline: none; }
.mt-in textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mt-send { width: 44px; height: 44px; padding: 0; border-radius: 14px; flex: none; display: grid; place-items: center; }
.mt-send.busy .ico { animation: mtPulse 1s infinite; }
@keyframes mtPulse { 50% { opacity: .35; } }
.mt-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.mt-cnt.over { color: var(--danger); font-weight: 700; }

/* ---------- Задачи ---------- */
.mt-tasks { align-self: flex-start; margin-left: 42px; width: min(520px, calc(100% - 42px)); }
.mt-task { border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 10px 12px; box-shadow: inset 3px 0 0 var(--mt-c); }
.mt-task.s-proposed { border-color: color-mix(in srgb, var(--mt-c) 45%, var(--line)); background: color-mix(in srgb, var(--mt-c) 5%, var(--surface)); }
.mt-task.s-cancelled, .mt-task.s-expired { opacity: .68; }
.mt-task-h { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.mt-task-ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--mt-soft); color: var(--mt-c); flex: none; }
.mt-task-h b { font-size: 13px; }
.mt-task-who { margin-left: auto; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mt-task-t { margin: 6px 0 0; font-size: 14px; line-height: 1.45; font-weight: 600; }
.mt-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; font-size: 12.5px; color: var(--ink-2); }
.mt-meta span { display: inline-flex; align-items: center; gap: 4px; }
.mt-meta .ico { color: var(--muted); flex: none; }
.mt-pre { margin-top: 6px; font-size: 13px; }
.mt-pre summary { cursor: pointer; color: var(--accent-ink); font-weight: 700; }
.mt-pre div { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--ink-2); max-height: 180px; overflow: auto; }
.mt-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.mt-acts .btn { gap: 6px; }
.mt-acts .btn.busy { pointer-events: none; opacity: .7; }
.mt-acts small { color: var(--muted); font-size: 11.5px; }
.mt-st { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.mt-st .ico { flex: none; margin-top: 1px; }
.mt-st.ok { color: #15803D; } .mt-st.bad { color: var(--danger); } .mt-st.mute { color: var(--muted); }
.mt-st.run { color: var(--ink-2); align-items: center; }
.mt-st.run .spinner { width: 14px; height: 14px; }
html[data-theme="dark"] .mt-st.ok { color: #6EE7B7; }
.mt-warn { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; padding: 7px 9px; border-radius: 10px; background: rgba(245, 158, 11, .12); color: #A15C07; font-size: 12.5px; font-weight: 600; }
html[data-theme="dark"] .mt-warn { color: #FCD34D; }
.mt-lnk { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--accent-ink); text-decoration: none; }
.mt-lnk:hover { text-decoration: underline; }

/* ---------- Панель «Задачи и договорённости» ---------- */
.mt-side { position: sticky; top: 12px; max-height: calc(100dvh - 150px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.has-ai-crumbs .mt-side { max-height: calc(100dvh - 200px); }
.mt-side-h { display: none; }
.mt-sec { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mt-sec h3 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.mt-sec h3 em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; }
.mt-sec.wait h3 em { background: var(--accent); color: #fff; }
.mt-jump { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--sel-bg); color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; }
.mt-jump span { flex: 1; }
.mt-jump:hover { border-style: solid; }
html[data-theme="dark"] .mt-jump { color: #FFB59E; }
.mt-task.flash { animation: mtFlash 1.4s ease; }
@keyframes mtFlash { 0%, 60% { box-shadow: inset 3px 0 0 var(--mt-c), 0 0 0 3px color-mix(in srgb, var(--mt-c) 45%, transparent); } 100% { box-shadow: inset 3px 0 0 var(--mt-c); } }
.mt-none { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.mt-task.side { padding: 9px 10px; }
.mt-task.side .mt-task-t { font-size: 13px; }

/* ---------- Планшет и телефон: панель задач — выезжает справа ---------- */
@media (max-width: 1100px) {
  .mt-wrap { grid-template-columns: minmax(0, 1fr); }
  .mt-sidebtn { display: inline-flex; }
  .mt-side { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(380px, 92vw); max-height: none; padding: 12px; background: var(--bg); box-shadow: var(--shadow-lg);
    transform: translateX(105%); transition: transform .22s ease; visibility: hidden; }
  .mt-side.open { transform: none; visibility: visible; }
  .mt-side-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: -12px; margin: -12px -12px 0; padding: 12px; background: var(--bg); z-index: 1; }
  .mt-side-x { border: 0; background: var(--surface); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink); cursor: pointer; }
}
@media (max-width: 700px) {
  .mt-chat { height: calc(100dvh - 128px); min-height: 420px; border-radius: 16px; }
  .has-ai-crumbs .mt-chat { height: calc(100dvh - 176px); }
  .mt-head { padding: 8px 10px; gap: 8px; }
  .mt-face { width: 30px; height: 30px; border-radius: 10px; }
  .mt-face:nth-child(n+2) { display: none; }
  .mt-ht p { display: none; }
  .mt-hr .btn span { display: none; }
  .mt-hr .btn { padding: 8px 10px; }
  .mt-sidebtn em { position: absolute; top: -6px; right: -6px; }
  .mt-list { padding: 10px 10px 4px; }
  .mt-m { max-width: 96%; }
  .mt-ava { width: 28px; height: 28px; border-radius: 9px; }
  .mt-tasks { margin-left: 0; width: 100%; }
  .mt-b { font-size: 14px; }
  .mt-form { padding: 6px 8px 8px; }
  .mt-foot { font-size: 11px; }
  .mt-hello { padding: 8px 2px; }
  .mt-hello h2 { font-size: 18px; }
  .mt-idea { padding: 9px 10px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { .mt-dots i, .mt-send.busy .ico { animation: none; } .mt-list { scroll-behavior: auto; } .mt-side { transition: none; } }

/* ---------- Шапка как у AI-продавца: «Планёрка | вкладки AI-сотрудников | команда, Задачи, Новая планёрка» ---------- */
.mt-ph .mt-hr { align-items: center; gap: 8px; }
.mt-ph .mt-faces { margin-right: 4px; }
.mt-ph .mt-face { width: 34px; height: 34px; border-radius: 11px; border-color: var(--bg, var(--surface)); }
.mt-page.ai-inhead .mt-chat { height: calc(100dvh - 118px); }
.mt-page.ai-inhead .mt-side { max-height: calc(100dvh - 118px); }
@media (min-width: 701px) { .mt-page.ai-inhead:has(.ai-2row) .mt-chat, .mt-page.ai-inhead:has(.ai-2row) .mt-side { height: calc(100dvh - 170px); } .mt-page.ai-inhead:has(.ai-2row) .mt-side { height: auto; max-height: calc(100dvh - 170px); } }
@media (max-width: 700px) { .mt-page.ai-inhead .mt-chat { height: calc(100dvh - 176px); } }
@media (max-width: 900px) {
  .mt-ph .mt-hr .btn span { display: none; }
  .mt-ph .mt-hr .btn { padding: 8px 10px; }
  .mt-ph .mt-face:nth-child(n+2) { display: none; }
  .mt-ph .mt-sidebtn em { position: absolute; top: -6px; right: -6px; }
}
