/* Broadcast / 群发 */
.app.view-broadcast {
  grid-template-columns: var(--sidebar-w) 1fr !important;
  grid-template-areas:
    "sidebar top"
    "sidebar broadcast" !important;
}

.app.view-broadcast .inbox-panel,
.app.view-broadcast .chat-panel,
.app.view-broadcast .profile-panel,
.app.view-broadcast .iam-panel,
.app.view-broadcast .templates-panel,
.app.view-broadcast .team-panel,
.app.view-broadcast .internal-panel,
.app.view-broadcast .archive-panel,
.app.view-broadcast .kb-panel,
.app.view-broadcast .skills-panel,
.app.view-broadcast .agents-panel,
.app.view-broadcast .routing-panel,
.app.view-broadcast .autoreply-panel,
.app.view-broadcast .insights-panel,
.app.view-broadcast .col-resizer {
  display: none !important;
}

.broadcast-panel {
  grid-area: broadcast;
  display: none;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  background: #f0f2f5;
  overflow: auto;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.app.view-broadcast .broadcast-panel {
  display: block !important;
}

.app.view-broadcast .broadcast-panel[hidden] {
  display: none !important;
}

.bc-page {
  padding: 20px 24px 32px;
  max-width: 920px;
}

.bc-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 22px 24px 20px;
  min-height: calc(100% - 8px);
}

.bc-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.bc-card-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.bc-card-head .muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
  max-width: 640px;
}

.bc-card-head > a.btn,
.bc-head-actions {
  flex-shrink: 0;
}

.bc-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bc-card-head a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.bc-page-create,
.bc-page-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bc-page-create[hidden],
.bc-page-list[hidden],
#bc-create-pane[hidden],
#bc-list-pane[hidden] {
  display: none !important;
}

.bc-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #fafbfc;
}

.bc-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.bc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bc-section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bc-section textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  background: #fff;
  color: #0f172a;
  box-sizing: border-box;
}

.bc-section textarea:focus,
.bc-schedule-row input:focus {
  outline: none;
  border-color: #99f6e4;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.bc-field-hint {
  font-size: 12px;
  color: #94a3b8;
  text-align: right;
}

.bc-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 720px) {
  .bc-mode-row {
    grid-template-columns: 1fr;
  }
}

.bc-mode-opt {
  display: block;
  cursor: pointer;
}

.bc-mode-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bc-mode-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.bc-mode-card strong {
  font-size: 14px;
  color: #0f172a;
  font-weight: 650;
}

.bc-mode-card small {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.bc-mode-opt input:checked + .bc-mode-card {
  border-color: #0d9488;
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.bc-mode-opt:hover .bc-mode-card {
  border-color: #cbd5e1;
}

.bc-schedule-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.bc-schedule-row label {
  font-size: 13px;
  color: #64748b;
}

.bc-schedule-row input[type="datetime-local"] {
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
}

.bc-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.bc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 18px;
}

.bc-meta {
  font-size: 13px;
  color: #64748b;
}

.bc-meta:empty {
  display: none;
}

.bc-audience {
  max-height: 300px;
  overflow: auto;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fff;
}

.bc-audience:empty {
  display: none;
}

.bc-audience table,
.bc-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bc-audience th,
.bc-audience td,
.bc-list th,
.bc-list td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: middle;
}

.bc-audience th,
.bc-list th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-weight: 600;
  font-size: 12px;
  color: #64748b;
  z-index: 1;
}

.bc-audience tbody tr:hover,
.bc-list tbody tr:hover {
  background: #f8fffd;
}

.bc-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.bc-footer .btn.primary {
  min-width: 120px;
  height: 38px;
  padding: 0 18px;
}

.bc-list {
  border: 1px solid #eef2f7;
  border-radius: 8px;
  overflow: auto;
  background: #fff;
}

.bc-list .bc-meta {
  padding: 28px 14px;
  text-align: center;
  display: block;
  color: #94a3b8;
}

.bc-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e5e7eb;
  color: #475569;
}

.bc-status.running { background: #ccfbf1; color: #0f766e; }
.bc-status.scheduled { background: #fef3c7; color: #b45309; }
.bc-status.completed { background: #d1fae5; color: #047857; }
.bc-status.cancelled,
.bc-status.aborted { background: #f1f5f9; color: #64748b; }

.bc-content-preview {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #64748b;
}

.bc-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.bc-row-actions .btn {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.bc-detail {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #fafbfc;
  font-size: 13px;
}

.bc-detail h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #0f172a;
}

.bc-detail pre {
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 10px;
  color: #334155;
  line-height: 1.5;
}
