/* Вкладка «Сообщения» */
.bc-card { max-width: 880px; }
.bc-card > h3 { font-size: 1.1rem; font-weight: 800; color: var(--ink); }

.bc-audience {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin: 1rem 0 1.15rem;
}
.bc-option {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.bc-option:hover { background: #fff; border-color: #cfd4de; }
.bc-option input { margin-top: .25rem; flex-shrink: 0; accent-color: var(--ink); }
.bc-option > span { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.bc-option strong { font-size: .9rem; color: var(--ink); line-height: 1.25; }
.bc-option small { color: var(--muted); font-size: .74rem; font-weight: 600; line-height: 1.3; }
.bc-option.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  background: #fff;
}

.bc-panel { margin-bottom: .25rem; }

.bc-selected {
  margin: 0 0 .85rem;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}
.bc-selected-empty {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
}
.bc-selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .65rem;
}
.bc-selected-head strong {
  font-size: .88rem;
  color: var(--ink);
}
.bc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.bc-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  max-width: 100%;
  padding: .35rem .55rem .35rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.bc-chip:hover { border-color: var(--danger, #e11d48); color: var(--danger, #e11d48); }
.bc-chip span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.bc-chip-x {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  font-size: .95rem;
  line-height: 1;
  color: var(--muted);
}
.bc-chip:hover .bc-chip-x { background: var(--danger-soft, #ffe4ea); color: var(--danger, #e11d48); }

.bc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .65rem;
}
.bc-toolbar input[type=search] {
  flex: 1 1 220px;
  min-width: 180px;
  padding: .55rem .9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-size: .88rem;
  background: #fff;
}
.bc-toolbar input[type=search]:focus {
  outline: 2px solid var(--primary-soft, #ffe4ee);
  border-color: var(--primary, #e8437a);
}
.bc-toolbar .list-meta { margin: 0; margin-left: auto; font-size: .8rem; }

.bc-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 1rem;
}
.bc-list .empty {
  margin: 0;
  padding: 1.5rem 1rem;
  border: none;
  background: transparent;
}

.bc-contact {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  margin: 0;
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  font: inherit;
  background: transparent;
  box-sizing: border-box;
}
.bc-contact:last-child { border-bottom: none; }
.bc-contact:hover { background: var(--bg-soft); }
.bc-contact.hidden { display: none; }
.bc-contact.muted { opacity: .7; cursor: default; }

.bc-contact input.bc-cb {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--ink);
}

.bc-contact-body {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  min-width: 0;
  flex: 1 1 auto;
}
.bc-contact-body strong {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.bc-contact-body small {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bc-contact .badge { flex: 0 0 auto; margin-left: auto; }

.bc-form { margin-top: .35rem; }
.bc-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 140px;
}

/* Реестр сообщений */
.bc-log-card { max-width: none; margin-top: 1.25rem; }
.bc-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .35rem;
}
.bc-log-head h3 { margin: 0 0 .25rem; font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.bc-log-toolbar { margin: .85rem 0 .65rem; }
.bc-log-toolbar select {
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-size: .88rem;
  background: #fff;
  min-width: 140px;
}
.bc-log-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.bc-log-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.bc-log-table th,
.bc-log-table td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.bc-log-table th {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  background: var(--bg-soft);
  white-space: nowrap;
}
.bc-log-table tr:last-child td { border-bottom: none; }
.bc-log-row { cursor: pointer; }
.bc-log-row:hover td { background: var(--bg-soft); }
.bc-log-when { white-space: nowrap; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-log-text {
  max-width: 320px;
  color: var(--ink);
  line-height: 1.35;
}
.bc-log-aud {
  max-width: 220px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.35;
}
.bc-log-full {
  width: 100%;
  resize: vertical;
  min-height: 180px;
  font: inherit;
  font-size: .88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 800px) {
  .bc-audience { grid-template-columns: 1fr; }
  .bc-toolbar .list-meta { margin-left: 0; width: 100%; }
  .bc-log-head { flex-direction: column; }
  .bc-log-text { max-width: 200px; }
}
