/* «Мои чаты и боты» (v522–v523, 07.11.2026): карточки чатов и каналов, рассылки, окно подключения. */
.bc-list { display: grid; gap: 14px; }
.bc-group { margin: 10px 0 0; font-size: 15px; }
.bc-card { display: grid; gap: 10px; padding: 16px 18px; min-width: 0; }
.bc-card > * { min-width: 0; }
.bc-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bc-card header h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.bc-card header small { color: var(--muted); font-size: 12.5px; }
.bc-card.is-removed { opacity: .72; }
.bc-card.is-idle { padding-block: 12px; }
.bc-idle-side { flex: none; display: flex; align-items: center; gap: 10px; }
.bc-status { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-hover, #f3f7fb); color: var(--muted); white-space: nowrap; }
.bc-status.is-ok { background: var(--state-ok-bg, #e7f6ec); color: var(--state-ok, #1c7a3e); }
.bc-status.is-wait { background: var(--state-warn-bg, #fdf3e0); color: var(--state-warn, #96660d); }
.bc-status.is-crit { background: var(--state-crit-bg, #fdecec); color: var(--state-crit, #b42318); }
.bc-who { margin: 0; font-size: 13px; color: var(--text-soft, #51627e); overflow-wrap: anywhere; }
.bc-note { margin: 0; padding: 8px 10px; border-radius: 10px; font-size: 13px; line-height: 1.4; }
.bc-note.is-warn { background: var(--state-warn-bg, #fdf3e0); color: var(--state-warn, #96660d); }
.bc-note.is-wait { margin-bottom: 14px; background: var(--surface-hover, #f3f7fb); color: var(--text-soft, #51627e); }
.bc-centers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13.5px; }
.bc-centers > span { color: var(--muted); }
.bc-centers label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bc-centers input { width: auto; margin: 0; }
.bc-rows { display: grid; border-top: 1px solid var(--line, #e4e9f0); }
.bc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 9px 0; border-bottom: 1px solid var(--line, #e4e9f0); }
.bc-check { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; cursor: pointer; font-size: 14px; }
.bc-check input { width: 16px; height: 16px; margin: 2px 0 0; }
.bc-check b { display: block; font-weight: 700; }
.bc-check small { display: block; margin-top: 1px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.bc-check small.is-error { color: var(--state-crit, #b42318); }
.bc-row.is-off .bc-check b { font-weight: 600; color: var(--text-soft, #51627e); }
.bc-row-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; font-size: 13px; }
.bc-time { width: 104px; height: 34px; padding: 0 8px; box-sizing: border-box; font-size: 13.5px; }
.bc-auto { display: inline-block; width: 104px; text-align: center; color: var(--muted); font-size: 12.5px; }
.bc-lead { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; }
.bc-lead select { width: auto; height: 30px; padding: 0 6px; font-size: 13px; }
.bc-link { padding: 0; border: 0; background: none; color: var(--accent, #2d6cdf); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.bc-link[disabled] { color: var(--muted); cursor: default; text-decoration: none; }
.bc-card footer { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-who-pub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; }
.bc-who-pub > span { color: var(--muted); }
.bc-who-pub select { width: auto; max-width: 100%; height: 32px; padding: 0 8px; font-size: 13.5px; }
.bc-channel-note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.bc-net { height: 34px; width: auto; padding: 0 6px; font-size: 13px; }
.bc-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-tabs button { padding: 6px 12px; border: 1px solid var(--line, #e4e9f0); border-radius: 999px; background: none; color: var(--text-soft, #51627e); font: inherit; font-size: 13px; cursor: pointer; }
.bc-tabs button.is-on { border-color: transparent; background: var(--accent-soft, #efe3e7); color: var(--accent, #7b1d3a); font-weight: 700; }
.bc-connect-body { display: grid; gap: 12px; min-width: 0; }
.bc-tg-link { justify-self: start; text-decoration: none; }
.bc-command { display: block; padding: 8px 10px; border-radius: 8px; background: var(--surface-hover, #f3f7fb); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; user-select: all; }

dialog:has(.bc-form) { width: min(560px, 94vw); }
.bc-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: 100%; padding: 20px 22px; box-sizing: border-box; }
dialog form.bc-form { padding: 20px 22px; }
.bc-form > * { min-width: 0; }
.bc-form h2, .bc-form .hint { margin: 0; }
.bc-form select { width: 100%; }
.bc-blocks { display: grid; gap: 8px; font-size: 14px; }
.bc-blocks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.bc-blocks input { width: auto; margin: 0; }
.bc-bubble { max-height: 56vh; overflow: auto; padding: 12px 14px; border-radius: 12px; background: var(--surface-hover, #f3f7fb); font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bc-steps { display: grid; gap: 6px; margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.45; }
.bc-code-box { display: grid; gap: 8px; justify-items: start; padding: 12px 14px; border: 1px solid var(--line, #e4e9f0); border-radius: 12px; }
.bc-code-box p { margin: 0; font-size: 13px; color: var(--text-soft, #51627e); }
.bc-code-box small { color: var(--muted); font-size: 12px; }
.bc-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 17px; font-weight: 700; letter-spacing: .02em; user-select: all; overflow-wrap: anywhere; }
.bc-history ul { display: grid; gap: 8px; max-height: 56vh; overflow: auto; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.bc-history li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.bc-history li.is-error span { color: var(--state-crit, #b42318); }
.bc-history time { color: var(--muted); }
.bc-history em { color: var(--muted); font-style: normal; }

@media (max-width: 640px) {
  .bc-card { padding: 14px; }
  .bc-row { grid-template-columns: minmax(0, 1fr); }
  .bc-row-side { justify-content: flex-start; padding-left: 28px; }
  .bc-history li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
