/** 通用组件：头像、角标、列表单元、开关、按钮、弹层、菜单、Toast */

/* ---------------- 头像 ---------------- */

.avatar {
  --s: 48px;
  position: relative;
  flex: none;
  width: var(--s);
  height: var(--s);
  border-radius: 30%;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-weight: 600;
  font-size: calc(var(--s) * 0.38);
  line-height: 1;
  letter-spacing: 0.5px;
  user-select: none;
  background: #c8ced8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.avatar-sm { --s: 32px; }
.avatar-md { --s: 40px; }
.avatar-lg { --s: 56px; }
.avatar-xl { --s: 68px; }
.avatar-round { border-radius: 50%; }

.avatar .av-text {
  transform: translateY(-0.5px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.avatar .av-emoji {
  font-size: calc(var(--s) * 0.52);
  line-height: 1;
  text-shadow: none;
}

/* 群头像：2×2 拼图 */
.avatar-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.5px;
  padding: 0;
  background: var(--bg-elev);
}

.avatar-group i {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.avatar .av-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26%;
  height: 26%;
  min-width: 10px;
  min-height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg-elev);
  box-sizing: content-box;
}

.avatar .av-badge.is-busy { background: var(--warn); }
.avatar .av-badge.is-off { background: var(--text-4); }

/* 头像右下角的小型“在线”圆点（列表用） */
.avatar .state-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg-elev);
}

/* ---------------- 角标 ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  animation: badge-pop 0.28s var(--ease-out) both;
}

.badge.is-dot {
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
}

.badge.is-soft {
  background: var(--brand-soft);
  color: var(--brand);
}

.badge.is-vip {
  background: linear-gradient(135deg, #ffcf5c, #ffb020);
  color: #6b3b00;
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-soft);
  transition: transform 0.12s var(--ease), opacity 0.15s, background 0.15s;
  user-select: none;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 6px 16px rgba(10, 132, 255, 0.28);
}

.btn-ghost {
  background: var(--brand-ghost);
  color: var(--brand);
  border: 1px solid var(--brand);
}

.btn-ghost.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-soft {
  background: var(--brand-soft);
  color: var(--brand);
}

.btn-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.btn-block { width: 100%; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }

.icon-btn {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--text);
  transition: background 0.15s, transform 0.12s;
}

.icon-btn:active {
  background: var(--bg-press);
  transform: scale(0.94);
}

.icon-btn .ic { width: 24px; height: 24px; }

/* ---------------- 列表 ---------------- */

.list {
  background: var(--bg-elev);
  overflow: hidden;
}

.list + .list { margin-top: 10px; }

.group-title {
  padding: 16px 16px 8px;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.2px;
}

.cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 9px 16px;
  background: var(--bg-elev);
  transition: background 0.15s;
}

.cell:active { background: var(--bg-hover); }

.cell + .cell::before {
  content: "";
  position: absolute;
  left: 52px;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
  transform: scaleY(0.5);
}

.cell.is-plain + .cell.is-plain::before { left: 16px; }

.cell-ic {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
}

.cell-ic .ic { width: 20px; height: 20px; }
.cell-ic.is-soft { background: var(--brand-soft); color: var(--brand); }

.cell-main { flex: 1 1 auto; min-width: 0; }
.cell-title { font-size: 15.5px; color: var(--text); line-height: 1.3; }
.cell-sub { margin-top: 3px; font-size: 12.5px; color: var(--text-3); line-height: 1.35; }
.cell-value {
  flex: none;
  font-size: 13.5px;
  color: var(--text-3);
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-chev { flex: none; color: var(--text-4); }
.cell-chev .ic { width: 18px; height: 18px; }

.cell.is-danger .cell-title { color: var(--danger); }

/* 添加机器人：独立虚线框按钮 */
.add-bot-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-right: auto;
  min-height: 44px;
  padding: 10px 16px;
  margin-bottom: 12px;
  border: 1px dashed var(--brand);
  border-radius: var(--r-sm);
  background: var(--brand-ghost);
  font: inherit;
  color: var(--brand);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.add-bot-btn .cell-title,
.add-bot-btn .pc-set-row-main > div { color: var(--brand); }

.add-bot-btn .cell-chev { color: var(--brand); }

.add-bot-btn:active { background: var(--brand-soft); }

/* ---------------- 开关 ---------------- */

.switch {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  display: inline-block;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.switch i {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  transition: background 0.22s var(--ease);
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s var(--ease);
}

.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------------- 标签 / 芯片 ---------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.chip:active { background: var(--bg-press); }
.chip.on { background: var(--brand-soft); color: var(--brand); font-weight: 500; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------------- 分段控件 ---------------- */

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg-soft);
}

.seg-item {
  height: 28px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}

.seg-item.on {
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 500;
  box-shadow: var(--shadow-1);
}

/* ---------------- 弹层基座 ---------------- */

.overlay {
  position: absolute;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--scrim);
  animation: fade-in 0.22s var(--ease-out) both;
}

.overlay.is-closing { animation: fade-out 0.2s var(--ease) both; }

.overlay.is-center {
  align-items: center;
  justify-content: center;
  padding: 32px;
}

/* ---------------- 底部动作面板 ---------------- */

.sheet {
  width: 100%;
  max-height: 78%;
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border-radius: 18px 18px 0 0;
  padding-bottom: var(--safe-b);
  animation: sheet-in 0.3s var(--ease) both;
  box-shadow: var(--shadow-sheet);
}

.overlay.is-closing .sheet { animation: sheet-out 0.22s var(--ease) both; }

.sheet-head {
  position: relative;
  padding: 16px 20px 10px;
  text-align: center;
}

.sheet-title {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
}

.sheet-body { padding: 0 12px 12px; overflow-y: auto; }

.sheet-actions { padding: 8px; }

.sheet-action {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 16px;
  color: var(--text);
  text-align: left;
  transition: background 0.15s;
}

.sheet-action:active { background: var(--bg-hover); }
.sheet-action .ic { width: 22px; height: 22px; color: var(--text-2); }
.sheet-action.is-danger { color: var(--danger); }
.sheet-action.is-danger .ic { color: var(--danger); }
.sheet-action .sa-badge { margin-left: auto; }

.sheet-sep {
  height: 8px;
  margin: 4px -8px;
  background: var(--bg-sunken);
}

.sheet-cancel {
  padding: 6px 8px calc(6px + var(--safe-b));
}

/* ---------------- 切换账号（WAP，贴 QQ） ---------------- */

.account-sheet .sheet-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.account-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 4px 8px;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  color: var(--text);
  transition: background 0.15s;
}

.account-row:active { background: var(--bg-hover); }

.account-row .avatar { --s: 48px; flex-shrink: 0; }

.account-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-title {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-sub {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-check {
  flex-shrink: 0;
  color: var(--brand);
  display: inline-flex;
}

.account-check .ic { width: 22px; height: 22px; }

/* ---------------- QQ 风表单 sheet（编辑资料感） ---------------- */

.form-sheet {
  max-height: 88%;
}

/* PC：同套表单行，居中弹层而不是贴底 */
.form-sheet--modal {
  width: 100%;
  max-width: 420px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: var(--bg-elev);
  overflow: hidden;
  animation: pop-in 0.22s var(--ease-out) both;
  box-shadow: var(--shadow-3);
}

.form-sheet--modal .form-sheet-body {
  padding-bottom: 16px;
}

.form-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 8px 8px;
}

.form-sheet-head-btn {
  min-width: 64px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-2);
  transition: background 0.15s;
}

.form-sheet-head-btn:active {
  background: var(--bg-hover);
}

.form-sheet-head-btn.is-done {
  color: var(--brand);
  font-weight: 600;
}

.form-sheet-head-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-sheet-body {
  padding: 4px 12px calc(12px + var(--safe-b));
  overflow-y: auto;
}

.form-sheet-group {
  border-radius: 12px;
  background: var(--bg-sunken);
  overflow: hidden;
}

.form-sheet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.form-sheet-row:last-child {
  border-bottom: none;
}

.form-sheet-label {
  flex-shrink: 0;
  width: 76px;
  font-size: 15px;
  color: var(--text);
}

.form-sheet-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  text-align: right;
  outline: none;
  padding: 0;
}

.form-sheet-input::placeholder {
  color: var(--text-4);
}

.form-sheet-input:disabled {
  color: var(--text-3);
  opacity: 1;
}

/* Secret 等长串：左对齐方便看全 */
.form-sheet-input.is-start {
  text-align: left;
}

.form-sheet-row:has(.form-sheet-textarea) {
  align-items: flex-start;
}

.form-sheet-textarea {
  flex: 1;
  min-width: 0;
  resize: vertical;
  border: 1px solid var(--line);
  background: var(--bg-2, transparent);
  color: var(--text);
  font-size: 15px;
  text-align: left;
  outline: none;
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.5;
}

.form-sheet-textarea::placeholder {
  color: var(--text-4);
}

.form-sheet-textarea:disabled {
  color: var(--text-3);
  opacity: 1;
}

.form-sheet-tip {
  display: none;
  margin-top: 10px;
  padding: 0 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--danger);
}

.form-sheet-tip.is-on {
  display: block;
}

/* ---------------- 居中对话框 ---------------- */

.dialog {
  width: 100%;
  max-width: 300px;
  border-radius: 18px;
  background: var(--bg-elev);
  overflow: hidden;
  animation: pop-in 0.22s var(--ease-out) both;
  box-shadow: var(--shadow-3);
}

.dialog-body { padding: 24px 22px 20px; text-align: center; }
.dialog-title { font-size: 17px; font-weight: 600; }
.field-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.field-input:focus { border-color: var(--brand); }
.dialog-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  white-space: pre-wrap;
}

.dialog-actions {
  display: flex;
  border-top: 1px solid var(--line);
}

.dialog-btn {
  flex: 1;
  height: 50px;
  font-size: 16px;
  color: var(--brand);
  transition: background 0.15s;
}

.dialog-btn:active { background: var(--bg-hover); }
.dialog-btn + .dialog-btn { border-left: 1px solid var(--line); }
.dialog-btn.is-primary { font-weight: 600; }
.dialog-btn.is-danger { color: var(--danger); }
.dialog-btn.is-muted { color: var(--text-2); }

/* ---------------- 上下文菜单 ---------------- */

.ctxmenu {
  position: absolute;
  z-index: var(--z-modal);
  min-width: 168px;
  padding: 6px;
  border-radius: 14px;
  background: var(--bg-elev);
  box-shadow: var(--shadow-3);
  animation: pop-in 0.16s var(--ease-out) both;
  transform-origin: top left;
}

.ctxmenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  transition: background 0.12s;
}

.ctxmenu-item:active { background: var(--bg-hover); }
.ctxmenu-item .ic { width: 18px; height: 18px; color: var(--text-2); }
.ctxmenu-item.is-danger { color: var(--danger); }
.ctxmenu-item.is-danger .ic { color: var(--danger); }
.ctxmenu-sep { height: 1px; margin: 4px 6px; background: var(--line); }

/* ---------------- Toast ---------------- */

.toast {
  position: absolute;
  left: 50%;
  bottom: 96px;
  z-index: var(--z-toast);
  transform: translateX(-50%);
  max-width: 78%;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(20, 22, 26, 0.88);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
  backdrop-filter: blur(12px);
  animation: toast-in 0.24s var(--ease-out) both;
  pointer-events: none;
}

.toast.is-out { animation: toast-out 0.24s var(--ease) both; }

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, -4px); }
}

/* ---------------- 空状态 ---------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 64px 32px;
  color: var(--text-3);
  text-align: center;
}

.empty .ic { width: 46px; height: 46px; opacity: 0.5; }
.empty-text { font-size: 14px; line-height: 1.6; }

/* ---------------- 加载 ---------------- */

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

/* ---------------- 图片占位（SVG data-uri 生成） ---------------- */

.photo {
  background-size: cover;
  background-position: center;
  background-color: var(--bg-sunken);
}

/* 气泡大图占位：裁掉溢出，避免子图淡入时顶破圆角 */
.ph {
  overflow: hidden;
  position: relative;
  background-color: rgba(0, 0, 0, 0.06);
}

/* 图片占位里的真图：不占位就不发请求，加载完淡入，避免骨架突变成图那一下闪 */
.ph-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.ph-img.is-loaded { opacity: 1; }
.ph-img.is-broken { visibility: hidden; }

/* 视频气泡：内联播放，限高避免顶破会话 */
.ph-video {
  display: block;
  width: 100%;
  max-width: 280px;
  max-height: 240px;
  border-radius: 8px;
  background-color: #000;
  object-fit: contain;
}
.ph-video.is-broken { opacity: 0.4; }

/* 视频下载栏 */
.ph-video-bar {
  margin-top: 6px;
  display: flex;
  justify-content: flex-start;
}
.ph-video-dl {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.ph-video-dl:active { opacity: 0.7; }

/* 同条消息附图 + 指令按钮 */
.msg-imgs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
}
.msg-imgs.is-one { grid-template-columns: 1fr; }
.msg-imgs .ph {
  aspect-ratio: var(--ar, 1.333);
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: rgba(0, 0, 0, 0.06);
  overflow: hidden;
  cursor: zoom-in;
  max-height: 220px;
}
/* 气泡与按钮同宽：有 keyboard 才拉最小宽；短文本「ok」别被 220px 撑成长条 */
.msg-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 100%;
  width: fit-content;
}
.msg-stack:has(.msg-kb) {
  min-width: min(220px, 100%);
}
.msg-stack > .bubble {
  width: 100%;
  box-sizing: border-box;
}
.msg-kb {
  margin-top: 6px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}
.msg-kb-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
}
.msg-kb-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: #fff;
  color: #0a84ff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
/* 按钮在气泡外、贴在聊天底上：左右气泡都用白底蓝字，别用半透明白字 */
.msg.self .msg-kb-btn {
  background: #fff;
  color: #0a84ff;
  border-color: rgba(0, 0, 0, 0.08);
}
.msg-kb-btn:hover {
  background: #f3f8ff;
}
.msg-kb-btn:active {
  background: #e8f1ff;
}

/* ---------------- 机器人 Markdown 气泡 ---------------- */

.bubble.md {
  max-width: min(78vw, 420px);
  line-height: 1.35;
  word-break: break-word;
}
.bubble.md .md-body { display: block; }
.bubble.md .md-h {
  font-weight: 600;
  font-size: 1.05em;
  margin: 0 0 2px;
  line-height: 1.3;
}
.bubble.md .md-quote {
  border-left: 3px solid rgba(0, 0, 0, 0.15);
  padding-left: 8px;
  opacity: 0.85;
  margin: 2px 0;
}
.msg.self .bubble.md .md-quote { border-left-color: rgba(255, 255, 255, 0.45); }
.bubble.md .md-link {
  color: #1677ff;
  text-decoration: underline;
  word-break: break-all;
}
.msg.self .bubble.md .md-link { color: #fff; }
.bubble.md .md-cmd {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #1677ff;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
  word-break: break-word;
}
.msg.self .bubble.md .md-cmd { color: #fff; }
.bubble.md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
}
.msg.self .bubble.md code { background: rgba(255, 255, 255, 0.18); }
.bubble.md .md-avatar {
  display: inline-block;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 4px;
  object-fit: cover;
}
.bubble.md .md-photo {
  display: block;
  max-width: 100%;
  max-height: 240px;
  margin: 6px 0;
  border-radius: 8px;
  object-fit: cover;
  cursor: zoom-in;
}

/* ---------------- 转发聊天记录（摘要卡 → 点开滚动） ---------------- */

.bubble.forward {
  padding: 10px 12px 8px;
  min-width: 200px;
  max-width: min(280px, 72vw);
  background: #f3f3f3;
  color: #1a1a1a;
  cursor: pointer;
  user-select: none;
}
.msg.self .bubble.forward {
  background: rgba(255, 255, 255, 0.92);
  color: #1a1a1a;
}
.bubble.forward .fwd-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
  line-height: 1.3;
}
.bubble.forward .fwd-preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bubble.forward .fwd-line {
  font-size: 12px;
  line-height: 1.45;
  color: #8a8a8a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bubble.forward .fwd-foot {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 12px;
  color: #8a8a8a;
}

/* 点开后的查看面板 */
.fwd-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: min(86%, 720px);
  max-height: 86%;
  background: #ebeff5;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  animation: sheet-in 0.28s var(--ease) both;
  box-shadow: var(--shadow-sheet, 0 -8px 28px rgba(0, 0, 0, 0.18));
}
.overlay.is-center .fwd-panel {
  width: min(420px, 92vw);
  height: min(640px, 82vh);
  max-height: 82vh;
  border-radius: 12px;
  animation: pop-in 0.2s var(--ease-out) both;
}
.overlay.is-closing .fwd-panel { animation: sheet-out 0.22s var(--ease) both; }

.fwd-panel-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 48px;
  padding: 0 44px;
  background: #d6e6f7;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.fwd-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}
.fwd-panel-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #555;
}
.fwd-panel-close:hover { background: rgba(0, 0, 0, 0.06); }

.fwd-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px 20px;
  -webkit-overflow-scrolling: touch;
}

.fwd-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}
.fwd-msg.is-self {
  flex-direction: row-reverse;
}
.fwd-msg .avatar {
  flex: none;
  width: 34px;
  height: 34px;
  --s: 34px;
  border-radius: 8px;
}

.fwd-msg-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: min(240px, 68%);
  gap: 4px;
}
.fwd-msg.is-self .fwd-msg-col { align-items: flex-end; }

.fwd-msg-name {
  font-size: 11px;
  color: #8a8a8a;
  padding: 0 2px;
  line-height: 1.2;
}

.fwd-msg-bubble {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
  color: #1a1a1a;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
.fwd-msg.is-self .fwd-msg-bubble {
  background: #cce4f7;
}

.fwd-msg-img {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.06);
  cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.fwd-msg-img.is-broken {
  width: 180px;
  height: 120px;
  object-fit: none;
  padding: 12px;
  font-size: 12px;
  color: #888;
  background: #e8e8e8;
}

/* ---------------- @ 提醒 ---------------- */

.bubble .at {
  color: #0079d6;
  font-weight: 500;
}

.msg.self .bubble .at {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mention-overlay {
  justify-content: flex-end;
}

.mention-panel {
  width: 100%;
  max-height: 62%;
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border-radius: 18px 18px 0 0;
  padding-bottom: var(--safe-b);
  animation: sheet-in 0.24s var(--ease) both;
}

.mention-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}

.mention-head .icon-btn {
  width: 32px;
  height: 32px;
  color: var(--text-3);
}

.mention-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 8px 12px;
}

.mention-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
}

.mention-row:hover,
.mention-row:active {
  background: var(--bg-hover);
}

.mention-row .avatar {
  --s: 32px;
  border-radius: 10px;
}

.mention-name {
  font-size: 14px;
  color: var(--text);
}

.mention-role {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
}

.mention-all-ic {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}

.mention-pop {
  position: absolute;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-2);
  animation: pop-in 0.14s var(--ease-out) both;
}

.pc-draft {
  color: var(--danger);
}

/* 扫码绑定机器人面板 */
.connect-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 4px;
}

.connect-qr-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.connect-qr-box img {
  width: 100%;
  height: 100%;
  display: block;
}

.connect-qr-status {
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
  line-height: 1.5;
}

/* 欢迎词多段编辑器（PC / 手机共用） */
.welcome-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.welcome-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--bg-2, transparent);
}

.welcome-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.welcome-item-type {
  font-size: 12px;
  color: var(--text-3);
}

.welcome-item-ops {
  display: flex;
  gap: 4px;
}

.welcome-op {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  border-radius: 8px;
  cursor: pointer;
}

.welcome-op:hover { background: var(--bg-hover); }
.welcome-op.is-danger { color: var(--danger); }

.welcome-media {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-media-name {
  font-size: 13px;
  color: var(--text-2);
  word-break: break-all;
}

.welcome-add {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  flex-wrap: wrap;
}

.welcome-add .btn {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

/* 机器人卡片（PC / 手机共用） */
.bot-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--bg-elev);
  margin-bottom: 14px;
}

/* PC：一行两个卡片；窄屏回退单列 */
.bot-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bot-card-grid .bot-card {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .bot-card-grid {
    grid-template-columns: 1fr;
  }
}

.bot-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-card-id { min-width: 0; }

.bot-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.bot-card-desc {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.bot-card-cb {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--bg-sunken);
  border-radius: 10px;
}

.bot-card-cb-label {
  font-size: 12px;
  color: var(--text-3);
}

.bot-card-cb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.bot-card-cb-url {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-2);
  word-break: break-all;
}

.bot-card-copy {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  flex: none;
}

.bot-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.bot-card-actions .btn {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.bot-card-actions .is-danger { color: var(--danger); }

/* ===== 快捷回复面板 ===== */
.quick-panel {
  width: 100%;
  max-width: 420px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: var(--bg-elev);
  overflow: hidden;
  box-shadow: var(--shadow-3);
  animation: pop-in 0.22s var(--ease-out) both;
}

.quick-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 8px;
}

.quick-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.quick-head-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--brand);
  background: var(--bg-sunken);
}

.quick-list {
  overflow-y: auto;
  padding: 4px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}

.quick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-sunken);
  cursor: pointer;
  transition: background 0.15s;
}

.quick-item:active { background: var(--bg-hover); }

.quick-item-body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.quick-item-media {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.quick-item-textbox { flex: 1; min-width: 0; }

.quick-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-item-text {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

.quick-item-ops {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.quick-op {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
}

.quick-op:active { background: var(--bg-hover); }
.quick-op.is-danger { color: var(--danger); }

/* 编辑弹窗：字段纵向排布 */
.quick-editor .form-sheet-row {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.quick-editor .form-sheet-label { width: auto; }

.quick-editor-media {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-editor-img {
  max-width: 140px;
  max-height: 110px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.quick-editor-media-ops {
  display: flex;
  align-items: center;
  gap: 10px;
}


/* ---------------- 群发消息 / 定时任务 ---------------- */

.hd-action-text {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 500;
}
.hd-action-text:active { background: var(--brand-ghost); }

.bc-wrap { padding: 12px 14px 0; }
.bc-wrap.is-editor { padding-bottom: 8px; }

.bc-hero {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 15px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #0099ff 0%, #56c2ff 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 153, 255, 0.22);
}
.bc-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}
.bc-hero-title { font-size: 20px; font-weight: 700; letter-spacing: -0.2px; }
.bc-hero-desc { margin-top: 5px; font-size: 12.5px; opacity: 0.92; }
.bc-hero-stats { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.bc-hero-stats span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.2);
  font-size: 11.5px;
}

.bc-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.55;
}
.bc-note.is-warn { background: var(--danger-soft); color: var(--danger); }

.bc-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
}

.bc-section-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.bc-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.bc-section-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.bc-meta { margin-top: 5px; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.bc-dot { margin-left: 4px; }

.bc-badge {
  flex: none;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  line-height: 1.5;
  background: var(--bg-soft);
  color: var(--text-3);
}
.bc-badge.is-pending { background: var(--brand-soft); color: var(--brand); }
.bc-badge.is-running { background: var(--brand); color: #fff; }
.bc-badge.is-done { background: rgba(52, 199, 89, 0.14); color: var(--success); }
.bc-badge.is-failed { background: var(--danger-soft); color: var(--danger); }
.bc-badge.is-paused,
.bc-badge.is-canceled { background: var(--bg-soft); color: var(--text-3); }

.bc-task-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bc-task-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.bc-progress {
  height: 6px;
  margin-top: 10px;
  border-radius: var(--r-pill);
  background: var(--bg-sunken);
  overflow: hidden;
}
.bc-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%);
  transition: width 0.3s ease;
}

.bc-statline { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.bc-statline .is-bad { color: var(--danger); }

.bc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bc-actions .btn { height: 32px; padding: 0 12px; font-size: 13px; }

.bc-link {
  margin-top: 10px;
  padding: 0;
  background: none;
  color: var(--brand);
  font-size: 12.5px;
}

.bc-results { margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.bc-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
  color: var(--text-2);
}
.bc-result.is-fail { color: var(--danger); }
.bc-result-icon { flex: none; width: 14px; text-align: center; font-weight: 600; }
.bc-result-main { flex: 1 1 140px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-result-time { flex: none; font-size: 11px; color: var(--text-4); }
.bc-result-err { width: 100%; margin-left: 22px; font-size: 11.5px; line-height: 1.45; color: var(--danger); word-break: break-all; }

.bc-groups { margin-top: 6px; max-height: 340px; overflow-y: auto; }
.bc-group-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 6px;
  margin: 2px 0;
  border-radius: 10px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.bc-group-row.is-on { background: var(--brand-ghost); border-bottom-color: transparent; }
.bc-check { flex: none; width: 18px; height: 18px; accent-color: var(--brand); }
.bc-group-icon {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text-2);
}
.bc-group-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.bc-group-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  color: var(--text);
}
.bc-group-sub {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--text-4);
}
.bc-mini {
  flex: none;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.4;
}
.bc-mini:active { background: var(--bg-press); }
.bc-mini.is-danger { color: var(--danger); background: var(--danger-soft); }

.bc-empty-sm { padding: 16px 6px; color: var(--text-3); font-size: 12.5px; line-height: 1.6; text-align: center; }

.bc-items { margin-top: 4px; }
.bc-item {
  margin-top: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-soft);
}
.bc-item-head { display: flex; align-items: center; gap: 8px; }
.bc-chip {
  flex: none;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
}
.bc-chip.is-image { background: rgba(52, 199, 89, 0.14); color: var(--success); }
.bc-item-ops { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.bc-item-ops .bc-mini { padding: 4px 6px; background: var(--bg-elev); }
.bc-textarea {
  margin-top: 8px;
  min-height: 72px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.55;
  background: var(--bg-elev);
}
.bc-item-foot { margin-top: 4px; text-align: right; font-size: 11px; color: var(--text-4); }
.bc-counter { font-family: var(--font-num); }
.bc-item-img {
  display: block;
  margin-top: 8px;
  max-width: 100%;
  max-height: 150px;
  border-radius: 10px;
  object-fit: cover;
}
.bc-item-name { word-break: break-all; }

.bc-sched { margin-top: 10px; }
.bc-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-seg-btn {
  flex: 1 1 0;
  min-width: 58px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 13px;
}
.bc-seg-btn.is-on { background: var(--brand); color: #fff; font-weight: 500; }
.bc-form-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.bc-form-row label { flex: none; width: 46px; font-size: 12.5px; color: var(--text-3); }
.bc-form-row .field-input { flex: 1 1 auto; min-width: 0; }

.bc-sticky {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 0 12px;
  background: var(--bg);
  z-index: 5;
}
.bc-sticky .btn { flex: 1 1 0; height: 44px; font-size: 15px; }
.bc-sticky .btn:not(.btn-primary) { background: var(--card); border: 1px solid var(--line); }
.bc-sticky .btn-primary { flex: 1.5 1 0; }

.bc-empty-card { padding: 30px 16px; text-align: center; }
.bc-empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand);
}
.bc-empty-title { font-size: 15px; font-weight: 600; color: var(--text); }
.bc-empty-desc { margin-top: 6px; font-size: 12.5px; line-height: 1.6; color: var(--text-3); }

.bc-empty { padding: 44px 12px; text-align: center; color: var(--text-3); font-size: 13px; }

/* 群发编辑器：目标 → 内容 → 立即发送 / 定时 */
.bc-target-card .bc-section-head { margin-bottom: 4px; }
.bc-target-count { margin-top: 2px; color: var(--text-3); font-size: 12px; }
.bc-all-row { display: flex; align-items: center; gap: 18px; margin: 10px 0 8px; }
.bc-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
}
.bc-all .bc-check { width: 19px; height: 19px; border-radius: 5px; }
.bc-selected-text { margin: 8px 0 2px; }
.bc-targets { margin-top: 2px; }
.bc-target-sec {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}
.bc-target-sec-head {
  padding: 8px 11px;
  background: #f2edff;
  color: #6b4fd8;
  font-size: 12.5px;
  font-weight: 600;
}
.bc-target-sec.is-single .bc-target-sec-head { background: rgba(52, 199, 89, 0.12); color: #1f9c52; }
.bc-target-sec .bc-group-row {
  margin: 0;
  padding: 9px 10px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
.bc-target-sec .bc-group-row:last-child { border-bottom: 0; }
.bc-target-sec .bc-group-row.is-on { background: var(--brand-ghost); border-bottom-color: transparent; }
.bc-main-wrap { position: relative; margin-top: 8px; }
.bc-main-input {
  height: auto;
  min-height: 150px;
  padding: 12px 12px 28px;
  line-height: 1.65;
  font-size: 14.5px;
  background: var(--bg-elev);
  resize: vertical;
}
.bc-main-wrap .bc-counter {
  position: absolute;
  right: 12px;
  bottom: 9px;
  font-size: 11px;
  color: var(--text-4);
}
.bc-send-now { margin-top: 12px; height: 46px; font-size: 16px; border-radius: 12px; }
.bc-msg-hint { margin-top: 8px; text-align: center; }
.bc-field-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.bc-sched-row { margin: 8px 0 2px; }
.bc-field-block { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.bc-interval-row { display: flex; gap: 12px; }
.bc-interval-row .bc-field-block { flex: 1 1 0; }
.bc-editor-actions { display: flex; gap: 10px; margin-top: 16px; }
.bc-editor-actions .btn { flex: 1 1 0; height: 44px; }
.bc-editor-actions .btn:not(.btn-primary) { background: var(--card); border: 1px solid var(--line); }
