* { box-sizing: border-box; margin: 0; padding: 0; }

html, body, #app { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: #fff;
  color: #1a1a1a;
  -webkit-tap-highlight-color: transparent;
}

.app { display: flex; height: 100%; }

/* ---------- Панель чатов ---------- */
.panel {
  width: 340px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #e5e7eb;
}

.panel-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.panel-title { font-size: 20px; font-weight: 700; }

.icon-btn {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #5b6472;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: #eef1f5; }

.chats { flex: 1; overflow-y: auto; }

.chat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f2f4f7;
}
.chat:hover { background: #f5f7fa; }
.chat.on { background: #e9f2ff; }
.chat.on:hover { background: #dfeaff; }

.avatar {
  position: relative;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 17px;
}

.chat .dot {
  position: absolute;
  left: 47px; bottom: 7px;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: #aab2bd;
  z-index: 1;
}
.dot.online { background: #34c759; }

.chat-body { flex: 1; min-width: 0; }

.row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.row2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }

.cname {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}

.ctime {
  flex: none;
  font-size: 12px;
  color: #8a94a3;
}

.csub {
  font-size: 13.5px;
  color: #6b7280;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.members {
  flex: none;
  font-size: 11px;
  color: #8a94a3;
  border: 1px solid #d7dce3;
  padding: 0 6px;
  border-radius: 20px;
  font-weight: 500;
}
.members.pin { color: #4f81ff; border-color: #b9d1ff; background: #eef4ff; }

.unread {
  flex: none;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  background: #4f81ff;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.divider {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #8a94a3;
  background: #f8fafc;
  border-bottom: 1px solid #f2f4f7;
}

/* ---------- Беседа ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #f7f9fc; }

.chat-empty {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  color: #9aa3af;
  font-size: 15px;
}

.chat-view { display: flex; flex-direction: column; height: 100%; }

.head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.back-btn { display: none; }

.head-titles { flex: 1; min-width: 0; }
.head-title {
  font-weight: 650; font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 8px;
}
.head-status { font-size: 12.5px; color: #8a94a3; }

.head .avatar { width: 40px; height: 40px; font-size: 15px; }

.thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thread > :first-child { margin-top: auto; }

.load-bar {
  align-self: center;
  margin: 2px 0 10px;
}
.load-more {
  border: 0;
  background: #eef1f5;
  color: #4f81ff;
  font-size: 13px;
  font-family: inherit;
  border-radius: 15px;
  padding: 7px 15px;
  cursor: pointer;
  transition: background .12s;
}
.load-more:hover { background: #e0e7f3; }

.day {
  align-self: center;
  font-size: 12px;
  color: #8a94a3;
  background: #eef1f5;
  border-radius: 14px;
  padding: 3px 12px;
  margin: 8px 0;
}

.msg { max-width: 66%; display: flex; align-items: flex-end; gap: 8px; animation: pop .12s ease-out; }
.msg.mine { align-self: flex-start; }
.msg.theirs { align-self: flex-start; }

@keyframes pop { from { transform: translateY(4px); opacity: .55; } to { transform: none; opacity: 1; } }

.bubble {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 8px 12px 6px;
  max-width: 100%;
  box-shadow: 0 1px 1px rgba(16,24,40,.04);
}
.msg.mine .bubble { background: #d3ecff; border-color: #c0e1ff; }

.msg-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }

.msg-text { font-size: 14.5px; line-height: 1.35; word-wrap: break-word; }
.msg-text a { color: #1a73e8; text-decoration: underline; word-break: break-all; }
.msg-text a:hover { text-decoration: none; }

.msg-ts {
  font-size: 11px;
  color: #8a94a3;
  text-align: right;
  margin-top: 2px;
}
.msg.mine .msg-ts { color: #5f8fc7; }

.photo { border-radius: 12px; overflow: hidden; max-width: 260px; cursor: pointer; }
.photo img { display: block; width: 100%; height: auto; }
.msg-file { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; word-break: break-all; }
.file-ico { flex-shrink: 0; }
.file-link { color: #1c7ed6; text-decoration: underline; word-break: break-all; }

/* ----------  Markdown в ответах ИИ ---------- */
.msg-text > :first-child { margin-top: 0; }
.msg-text > :last-child { margin-bottom: 0; }
.msg-text .md-h { margin: 8px 0 4px; line-height: 1.3; }
.msg-text h2.md-h { font-size: 16px; }
.msg-text h3.md-h { font-size: 15px; }
.msg-text h4.md-h { font-size: 14px; }
.msg-text .md-p { margin: 4px 0 6px; }
.msg-text code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: #eef1f5; border-radius: 6px; padding: 1px 5px; }
.msg.mine .msg-text code { background: #c9e6ff; }
.md-table { border-collapse: collapse; margin: 6px 0; font-size: 13px; max-width: 100%; }
.md-table th, .md-table td { border: 1px solid #dce3ec; padding: 3px 8px; vertical-align: top; text-align: left; }
.md-table th { background: rgba(79, 129, 255, .08); font-weight: 600; }
.md-list { margin: 4px 0 6px; padding-left: 20px; }
.md-list li { margin: 2px 0; }
.md-q { margin: 6px 0; padding: 4px 10px; border-left: 3px solid #c8d0da; color: #5b6472; }
.md-code { background: #f6f8fa; border: 1px solid #e5e7eb; border-radius: 10px; margin: 6px 0 8px; overflow: hidden; }
.md-code-head { font-size: 11px; color: #8a94a3; padding: 2px 10px; border-bottom: 1px solid #eef1f5; text-transform: lowercase; letter-spacing: .3px; }
.md-code pre { margin: 0; padding: 8px 10px; font-size: 12px; line-height: 1.45; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; white-space: pre; }

/* ----------  служебные сообщения (агрегаты) ---------- */
.agg {
  align-self: flex-start;
  width: 100%;
  max-width: 92%;
  display: flex;
  flex-direction: column;
  margin: 2px 0;
}
.agg-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  border: 1px dashed #d7dce3;
  background: #f4f6f9;
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-family: inherit;
  color: #6b7280;
  cursor: pointer;
  text-align: left;
}
.agg-toggle:hover { background: #eef1f5; border-color: #c3cad4; }
.agg-chev { flex: none; display: inline-block; font-size: 13px; color: #9aa3af; line-height: 1; transition: transform .15s ease; }
.agg.open .agg-chev { transform: rotate(90deg); }
.agg-sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agg-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 2px 4px;
  padding-left: 10px;
  border-left: 2px solid #e7ebf1;
}
.svc {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 6px 10px 8px;
  font-size: 13px;
}
.svc-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #6b7280; margin-bottom: 4px; }
.svc-head b { font-weight: 650; }
.svc-ts { margin-left: auto; flex: none; font-size: 11px; color: #aab2bd; font-weight: 400; }
.svc-status { flex: none; font-size: 11px; border-radius: 10px; padding: 1px 8px; background: #eef4ff; color: #4f81ff; }
.svc-status.err { background: #fdecec; color: #e03131; }
.svc-status.run { background: #fff4e5; color: #b26a00; }
.svc-text { white-space: pre-wrap; word-wrap: break-word; font-size: 13px; color: #374151; line-height: 1.45; }
.svc.tool .svc-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f6f8fa;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #3b4654;
}
.svc.reasoning .svc-text { color: #6a4f9c; font-style: italic; }
.svc.compaction .svc-text, .svc.summary .svc-text { color: #7a6a3a; font-size: 12px; }
.svc-files { display: flex; flex-wrap: wrap; gap: 4px; }
.svc-file { font-size: 11.5px; background: #eef7ee; color: #2b6b34; border: 1px solid #d5ead6; border-radius: 8px; padding: 2px 8px; }

/* ---------- Комposer ---------- */
.composer {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.composer textarea {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 14.5px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.35;
}
.composer textarea:focus { border-color: #4f81ff; }

.send-btn {
  border: 0;
  background: #4f81ff;
  color: #fff;
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 17px;
  cursor: pointer;
  flex: none;
}
.send-btn:hover { background: #3f6fff; }

/* ---------- Лайтбокс ---------- */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: zoom-out;
}
.lightbox img { max-width: 92%; max-height: 92%; border-radius: 8px; }

/* ---------- Мобильная версия ---------- */
@media (max-width: 767px) {
  .panel {
    width: 100%;
    min-width: 0;
    position: fixed;
    inset: 0;
    z-index: 10;
    border-right: 0;
  }
  .app.chat-open .panel { display: none; }
  .main { width: 100%; height: 100%; }
  .app:not(.chat-open) .main { display: none; }
  .app.chat-open .main { display: flex; }
  .back-btn { display: inline-flex; }
  .msg { max-width: 100%; width: 100%; }
  .msg .bubble { flex: 1; }
  .agg { max-width: 100%; }
}

/* ---------- Онбординг / модалка / меню / тост ---------- */
.dimmed #main, .dimmed .panel { filter: blur(3px); pointer-events: none; }

.overlay, .onboard, .modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 33, .38);
  z-index: 200;
}
.onboard, .modal { background: rgba(20, 24, 33, .45); }
.onboard[hidden], .modal[hidden], .toast[hidden], .menu[hidden] { display: none; }

.card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  width: 320px;
  max-width: 92vw;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.card h2 { font-size: 19px; margin-bottom: 6px; }
.card .mnote {
  font-size: 13px;
  color: #8a94a3;
  text-align: left;
  margin: 4px 0 12px;
  background: #fff4e5;
  color: #b26a00;
  border-radius: 10px;
  padding: 9px 12px;
}
.card h3 { font-size: 16px; margin-bottom: 12px; }
.card .hint { font-size: 12.5px; color: #8a94a3; margin-bottom: 12px; line-height: 1.4; }
.card input, .card select {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 12px;
  outline: none;
}
.card input:focus, .card select:focus { border-color: #4f81ff; }

.colors { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.col {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  padding: 0;
}
.col.on { border-color: #1a1a1a; }

.mrow { display: flex; gap: 10px; justify-content: flex-end; }
.mrow button, .card button.primary {
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.mrow button { background: #eef1f5; color: #1a1a1a; }
.mrow button.primary, .card button.primary { background: #4f81ff; color: #fff; }
#bgo { display: block; width: 100%; margin-top: 2px; }
.mrow button:hover, .card button.primary:hover { filter: brightness(.96); }

.menu {
  position: fixed;
  z-index: 150;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  min-width: 200px;
  padding: 6px;
}
.menu-item {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.menu-item:hover { background: #f2f4f7; }
.menu-item.disabled { opacity: .45; cursor: default; }
.menu-item.disabled:hover { background: transparent; }
.menu-item.logout { margin-top: 6px; border-top: 1px solid #eef1f5; border-radius: 0 0 8px 8px; color: #e03131; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  font-size: 13.5px;
  border-radius: 20px;
  padding: 9px 18px;
  z-index: 300;
  opacity: 1;
  transition: opacity .3s;
}

.offline-banner {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: #f08c00;
  color: #fff;
  font-size: 13px;
  border-radius: 0 0 10px 10px;
  padding: 6px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.offline-banner[hidden] { display: none; }

/* ---------- Профиль ---------- */
.linky { cursor: pointer; }
.ava-wrap { display: inline-flex; }

.profile[hidden] { display: none; }
.profile {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 33, .45);
  z-index: 210;
}
.profile .card { width: 380px; position: relative; text-align: center; padding: 26px 24px 20px; max-height: 88vh; overflow-y: auto; }

.fio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.fio label { min-width: 0; }

.close {
  position: absolute;
  top: 10px; right: 12px;
  border: 0;
  background: #eef1f5;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  color: #5b6472;
}
.close:hover { background: #e2e6ec; }

.ph { display: flex; justify-content: center; margin-bottom: 12px; }
.p-name { font-size: 19px; margin: 4px 0 2px; }

.p-online { font-size: 12.5px; color: #aab2bd; margin-bottom: 12px; }
.p-online.on { color: #2f9e44; }

.p-info { text-align: left; margin: 6px 0 16px; }
.p-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 2px;
  border-bottom: 1px solid #f2f4f7;
  font-size: 14px;
}
.p-row span { color: #8a94a3; }
.p-row b { font-weight: 600; }

.profile .card h3 { margin-bottom: 16px; }
.profile .card label {
  display: block;
  text-align: left;
  font-size: 12.5px;
  color: #6b7280;
  margin: 10px 0 2px;
}
.profile .card input { margin-bottom: 0; }
.profile .card .mrow { margin-top: 16px; }

.ghost {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: #5b6472;
  margin-bottom: 6px;
}
.ghost:hover { background: #f5f7fa; }

/* ---------- Привязка устройств (QR) ---------- */
.pair-sep { text-align: center; color: #aab2bd; font-size: 12.5px; margin: 4px 0 10px; }
.pair-link { display: block; width: 100%; margin-top: 2px; }
.pair-back {
  border: 0;
  background: none;
  color: #4f81ff;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  margin-bottom: 10px;
}
.pair-row { display: flex; gap: 8px; align-items: flex-end; }
.pair-row input { margin-bottom: 0; flex: 1; text-transform: uppercase; letter-spacing: 1px; text-align: center; }
.pair-row button { margin-bottom: 0; width: auto; display: inline-block; flex: none; white-space: nowrap; }
.pair-err { color: #e03131; font-size: 12.5px; margin: 10px 0 0; }
.scan-box {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #111827;
}
.scan-box video { width: 100%; display: block; max-height: 260px; }
.pair-card { width: 340px; position: relative; text-align: center; }
.pair-card .close { position: absolute; }
.pair-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 3px;
  background: #f2f4f7;
  border-radius: 12px;
  padding: 12px;
  margin: 4px 0 14px;
  cursor: pointer;
  user-select: all;
}
.pair-code:hover { background: #e9edf3; }
.pair-qr {
  width: 240px;
  height: 240px;
  image-rendering: pixelated;
  border: 8px solid #fff;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}
.card .hint { text-align: left; }

/* ---------- Ссылка на чат ---------- */
.link-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  word-break: break-all;
  background: #f2f4f7;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0 12px;
  cursor: pointer;
  user-select: all;
  text-align: left;
}
.link-box:hover { background: #e9edf3; }
.link-label { display: block; text-align: left; font-size: 13px; color: #4b5563; margin-bottom: 2px; }
.link-label input { margin-top: 4px; }
.link-hint { font-size: 12px; color: #8a94a3; margin: 6px 0 12px; text-align: left; }

/* ---------- Поиск собеседника ---------- */
.search-card { width: 380px; text-align: left; padding: 22px 22px 14px; }
.search-row { display: flex; gap: 8px; }
.search-row input { margin-bottom: 0; flex: 1; min-width: 0; }
.search-row button { margin-bottom: 0; width: auto; display: inline-block; flex: none; }
.results { margin-top: 12px; max-height: 46vh; overflow-y: auto; }
.res-empty { color: #8a94a3; font-size: 13px; text-align: center; padding: 18px 0; }
.res {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-top: 1px solid #f2f4f7;
}
.res:first-child { border-top: 0; }
.res-info { flex: 1; min-width: 0; }
.res-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-meta { font-size: 12px; color: #8a94a3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-write { width: auto; display: inline-block; flex: none; margin: 0; padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.empty-hint { color: #8a94a3; font-size: 13px; line-height: 1.55; text-align: center; padding: 40px 18px; }

/* ----------  вопрос-опрос (question-тул opencode) ---------- */
.msg.qmsg { max-width: 82%; }
.bubble.poll { border-color: #d9d2f5; background: #fbfaff; }
.poll-body { display: flex; flex-direction: column; gap: 12px; }
.poll-q { display: flex; flex-direction: column; gap: 6px; }
.poll-header { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #6741d9; }
.poll-question { font-size: 14.5px; line-height: 1.35; }
.poll-question > :first-child { margin-top: 0; }
.poll-question > :last-child { margin-bottom: 0; }
.poll-opts { display: flex; flex-direction: column; gap: 6px; }
.poll-opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: #fff;
  border: 1px solid #e0ddf0;
  border-radius: 11px;
  padding: 8px 11px;
  color: #1f2430;
  transition: border-color .12s, background .12s;
}
.poll-opt:hover { border-color: #b9aef0; background: #f6f3ff; }
.poll-opt.on { border-color: #6741d9; background: #efeaff; }
.poll-mark {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border: 2px solid #c3cbda;
  border-radius: 50%;
  position: relative;
  box-sizing: border-box;
}
.poll-opts[data-multiple="1"] .poll-mark { border-radius: 5px; }
.poll-opt.on .poll-mark { border-color: #6741d9; background: #6741d9; }
.poll-opt.on .poll-mark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.poll-label { font-size: 14px; font-weight: 600; }
.poll-desc { display: block; font-size: 12.5px; color: #6b7280; margin-top: 2px; line-height: 1.35; }
.poll-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #eee9fb; }
.poll-status { font-size: 12px; color: #8a94a3; }
.bubble.poll.answered .poll-status { color: #2f9e44; font-weight: 600; }
.poll-send {
  border: 0;
  background: #6741d9;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 10px;
  cursor: pointer;
}
.poll-send:hover { background: #5a35c4; }
.poll-send:disabled { opacity: .6; cursor: default; }
.bubble.poll.answered .poll-opt { cursor: default; }
.bubble.poll.answered .poll-opt:not(.on) { opacity: .5; }
.bubble.poll.answered .poll-opt.on { border-color: #2f9e44; background: #eefaf0; }
.bubble.poll.answered .poll-opt.on .poll-mark { background: #2f9e44; border-color: #2f9e44; }

/* ----------  запросы разрешений opencode (permission) ---------- */

.perm-title { font-size: 13px; font-weight: 700; color: #e8590c; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 6px; }
.perm-text { font-size: 14px; line-height: 1.4; word-break: break-word; }
.perm-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: #f5f3fa;
  border: 1px solid #e6e0f5;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 4px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.perm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.perm-btn {
  border: 1px solid;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 10px;
  cursor: pointer;
}
.perm-btn:disabled { opacity: .6; cursor: default; }
.perm-btn.once { border-color: #b9aef0; color: #6741d9; background: #f6f3ff; }
.perm-btn.once:hover { background: #efeaff; }
.perm-btn.always { border-color: #6741d9; color: #fff; background: #6741d9; }
.perm-btn.always:hover { background: #5a35c4; }
.perm-btn.reject { border-color: #f2c3c3; color: #d6391d; background: #fef3f2; }
.perm-btn.reject:hover { background: #fee9e7; }
.perm-why {
  flex: 1 1 180px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}
.bubble.poll.perm.answered .perm-actions { display: none; }
.bubble.poll.perm.answered .poll-status { color: #2f9e44; font-weight: 600; }
.bubble.poll.perm.answered .perm-title { color: #2f9e44; }