/* ============================================================
   Memphis Style - Minimalist
   零性能优化 CSS，零动画，零嵌套滚动
   ============================================================ */

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

:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-alt: #ede9e1;
  --text: #1a1a1a;
  --text-soft: #4a4a4a;
  --text-muted: #888888;
  --line: #1a1a1a;
  --line-soft: #d5d0c6;
  --primary: #ff5722;
  --primary-dark: #e64a19;
  --accent: #00bcd4;
  --accent-2: #ffd54f;
  --accent-3: #e91e63;
  --success: #4caf50;
  --fail: #f44336;
  --radius: 12px;
  --radius-sm: 8px;
  --border-w: 3px;
  --shadow: 4px 4px 0 #1a1a1a;
  --shadow-sm: 2px 2px 0 #1a1a1a;
}

html, body {
  width: 100%;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a { color: var(--primary); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ============================================================
   Login Page
   ============================================================ */
#loginPage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.login-wrap {
  width: 100%;
  max-width: 380px;
  padding: 28px 22px 24px;
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-logo {
  text-align: center;
  margin-bottom: 12px;
}
.login-logo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: var(--border-w) solid var(--line);
  object-fit: cover;
}

.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.login-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.login-tabs {
  position: relative;
  display: flex;
  background: var(--surface-alt);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 20px;
}

.login-tab {
  flex: 1;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  transition: background .15s, color .15s;
}

.login-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.login-form { display: none; }
.login-form.active { display: block; }

.form-group { margin-bottom: 16px; }

.form-control {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s;
}
.form-control:focus { border-color: var(--primary); }
.form-control::placeholder { color: var(--text-muted); }

.form-error {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  color: var(--fail);
  font-weight: 600;
}
.form-error.show { display: block; }

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
}

.remember-label { user-select: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}

.btn:active { transform: translate(2px, 2px); box-shadow: none !important; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-block { width: 100%; }

.btn-confirm-ghost {
  background: var(--surface);
  color: var(--text);
}
.btn-confirm-danger {
  background: var(--fail);
  color: #fff;
}

/* ============================================================
   App Layout
   ============================================================ */
#app {
  min-height: 100vh;
  padding-top: 10px;
  padding-bottom: 20px;
}

#app.home-enter { opacity: 1; }

.page {
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

#page-home > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 12px;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.top-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-sub .refresh-btn,
.top-sub .logout-btn {
  min-height: 32px;
  font-size: 12px;
  padding: 4px 14px;
}

/* ============================================================
   Section Headers (原大框标题，现在框删了只保留标题)
   ============================================================ */
.bot-info, .lex-info, .group-info {
  margin-bottom: 18px;
}
.group-block { margin-bottom: 14px; }

.bot-info-header, .lex-info-header, .group-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}

.bot-info-header .title,
.lex-info-header .title,
.group-info-header .title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.loading-hint {
  text-align: center;
  color: var(--text-muted);
  padding: 16px;
  font-size: 13px;
}

/* ============================================================
   Bot Section
   ============================================================ */
.bot-list { display: flex; flex-direction: column; gap: 10px; }

.bot-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-alt);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
}

.bot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

.bot-main { flex: 1; min-width: 0; }
.bot-name { font-size: 14px; font-weight: 700; color: var(--text); }
.bot-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   Lex Section
   ============================================================ */
.lex-list { display: flex; flex-direction: column; gap: 10px; }

.lex-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lex-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 6px;
}

.lex-main { flex: 1; min-width: 0; }
.lex-name { font-size: 13px; font-weight: 600; color: var(--text); }
.lex-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   Group Section
   ============================================================ */
.group-list { display: flex; flex-direction: column; gap: 10px; }

.group-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface-alt);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
}

.group-item.clickable { cursor: pointer; }

.group-avatar-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 2px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

/* ============ V3 Layout ============ */
.group-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-main-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.group-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Owner row (群主行) */
.owner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.go-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}
.owner-nick {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-item-arrow { font-size: 18px; color: var(--text-muted); font-weight: 700; flex-shrink: 0; }

.group-switch-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.group-switch-badge.on { background: var(--success); color: #fff; }
.group-switch-badge.off { background: var(--surface); color: var(--text-muted); }
.gs-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

.group-counts {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.gc-count {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.gc-count.on { background: var(--success); color: #fff; }
.gc-count.off { background: var(--surface-alt); }
.gc-num { font-weight: 800; }

/* ============================================================
   Status Dots
   ============================================================ */
.dot-green, .dot-red, .dot-gray {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--line);
}
.dot-green { background: var(--success); }
.dot-red { background: var(--fail); }
.dot-gray { background: var(--text-muted); }
.dot-green.small, .dot-red.small { width: 6px; height: 6px; }

/* ============================================================
   Switch Track（首页机器人上下线开关 / 词库开关）
   这是 JS 中 switchCapsuleHtml 使用的实际类名
   ============================================================ */
.switch-track {
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 26px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface-alt);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .15s, box-shadow .1s;
}
.switch-track:active { transform: translate(1px, 1px); box-shadow: none; }
.switch-track.on { background: var(--success); }
.switch-track .switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 50%;
  transition: transform .15s;
}
.switch-track.on .switch-thumb {
  transform: translateX(22px);
  background: #fff;
  border-color: #fff;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,0.1);
}

/* ============================================================
   Switch Capsule（群详情弹窗里的群开关 / 词库开关）
   由 switchCapsuleHtml 渲染时 group 类型使用
   ============================================================ */
.switch-capsule {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  background: var(--surface);
  transition: background .15s;
}
.switch-capsule.on { background: var(--success); color: #fff; }
.switch-capsule.off { background: var(--surface-alt); }

/* ============================================================
   Buttons (General)
   ============================================================ */
.refresh-btn, .logout-btn, .btn-ghost, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.refresh-btn {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.logout-btn {
  background: var(--fail);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-danger { background: var(--fail); color: #fff; }

/* ============================================================
   FAB Menu
   ============================================================ */
.fab-menu {
  position: fixed;
  right: 16px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  z-index: 90;
  transition: transform .1s;
}
.fab-menu:active { transform: translate(2px, 2px); box-shadow: none; }

.fab-menu span {
  width: 20px; height: 2.5px;
  background: #fff;
  border-radius: 2px;
}

.menu-popup {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  pointer-events: none;
}
.menu-popup.open { visibility: visible; pointer-events: auto; }

.menu-popup-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.menu-popup-panel {
  position: absolute;
  right: 16px;
  bottom: 80px;
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 140px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-radius: 8px;
  transition: background .15s;
}
.menu-item:hover { background: var(--surface-alt); }

.menu-icon {
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.menu-label { flex: 1; text-align: left; }

/* ============================================================
   Modal
   ============================================================ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  overflow-y: auto;
  padding: 18px;
}
.modal-mask.show { display: block; }

.modal {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 2px solid var(--line);
}
.modal-header h3 { font-size: 16px; font-weight: 800; }

.modal-close {
  width: 32px; height: 32px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-alt);
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: transform .1s;
}
.modal-close:active { transform: translate(2px, 2px); }

.modal-body {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text);
}

.modal-footer {
  padding: 12px 18px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 2px solid var(--line-soft);
}

.modal-confirm-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

.modal-confirm-footer {
  padding: 12px 18px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 2px solid var(--line-soft);
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--text);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  z-index: 500;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ============================================================
   Log List
   ============================================================ */
.log-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.log-filter-bar input,
.log-filter-bar select {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
}
.log-filter-bar input:focus,
.log-filter-bar select:focus { border-color: var(--primary); }

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

.log-item {
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.log-item.fail { border-color: var(--fail); }

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

.log-action-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
}

.log-result-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  border: 2px solid var(--line);
}
.log-result-badge.success { background: var(--success); color: #fff; }
.log-result-badge.fail { background: var(--fail); color: #fff; }

.log-time { font-size: 12px; color: var(--text-muted); }

.log-meta { color: var(--text-soft); font-size: 12px; line-height: 1.7; }
.log-meta-row { display: flex; gap: 4px; flex-wrap: wrap; }
.log-meta-label { color: var(--text-muted); min-width: 48px; font-weight: 600; }
.log-empty { text-align: center; color: var(--text-muted); padding: 24px; font-size: 14px; }

.log-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px solid var(--line-soft);
}

.log-pager button {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform .1s;
}
.log-pager button:active { transform: translate(2px, 2px); }
.log-pager button:disabled { opacity: 0.4; cursor: not-allowed; }

.log-pager-info { font-size: 13px; color: var(--text-muted); font-weight: 600; }

/* ============================================================
   Settings Form
   ============================================================ */
.settings-form { display: flex; flex-direction: column; gap: 14px; }

.settings-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  padding: 4px 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 6px;
}

.settings-form .form-group { margin-bottom: 0; }

/* ============================================================
   Group Modal
   ============================================================ */
.group-modal-body { display: flex; flex-direction: column; gap: 10px; }

.group-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.gm-label { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.gm-value { font-size: 13px; font-weight: 600; color: var(--text); }

.group-modal-stat-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  padding: 8px 0 4px;
  border-bottom: 2px solid var(--line);
  margin-top: 4px;
}

.group-stat-row { display: flex; gap: 10px; flex-wrap: wrap; }

.group-admin-area { display: flex; flex-direction: column; gap: 8px; }

.admin-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-alt);
  color: var(--text-muted);
}
.admin-role-badge.owner { background: var(--accent-2); color: var(--text); }
.admin-role-badge.admin { background: #f0f0f0; color: var(--text); }

/* 群主卡片与管理员网格之间的间距 */
.admin-item-owner { margin-bottom: 12px; }

/* 群员页面管理员列表：每项之间有间距 */
#memberAdminList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#memberAdminList > :last-child {
  margin-bottom: 0;
}

.admin-section { margin-bottom: 12px; }
.admin-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}

.admin-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface-alt);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
}

.admin-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

.admin-info { flex: 1; min-width: 0; }
.admin-nick { font-size: 12px; font-weight: 700; color: var(--text); }
.admin-qq { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   Group Summary Bar
   ============================================================ */
.group-summary-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.group-error {
  padding: 12px;
  font-size: 12px;
  color: var(--fail);
  background: var(--surface-alt);
  border: 2px dashed var(--fail);
  border-radius: var(--radius-sm);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 520px) {
  html { font-size: 14px; }
  .fab-menu { right: 12px; bottom: 16px; width: 48px; height: 48px; }
  .menu-popup-panel { right: 12px; bottom: 72px; min-width: 130px; }
  .modal { border-width: 2px; }
}

@media (min-width: 768px) {
  #page-home > .container { max-width: 900px; padding: 0 24px 16px; }
  #page-member > .container { max-width: 720px; padding: 0 24px 16px; }
  .modal { max-width: 640px; }
}

/* ============================================================
   Member Page Layout (群员面板)
   ============================================================ */
#memberApp {
  min-height: 100vh;
  padding-top: 10px;
  padding-bottom: 20px;
}

#page-member {
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

#page-member > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 12px;
}

/* ============================================================
   Neu Checkbox (登录页记住群号 checkbox)
   ============================================================ */
.neu-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: background .15s;
  vertical-align: middle;
}
.neu-checkbox:checked {
  background: var(--primary);
  border-color: var(--line);
}
.neu-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* ============================================================
   Bot Status Badge (群员页机器人列表右侧状态)
   ============================================================ */
.bot-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  flex-shrink: 0;
}
.bot-status-badge.on { background: var(--success); color: #fff; }
.bot-status-badge.off { background: var(--surface-alt); color: var(--text-muted); }

.bot-not-ingroup {
  opacity: 0.55;
}

.bot-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface-alt);
  flex-shrink: 0;
}

/* ============================================================
   Group Stat Cell (群员页消息统计)
   ============================================================ */
.group-stat-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.group-stat-row.mini { margin-top: 4px; }

/* 群详情弹窗里的消息统计：强制两排两列 */
.modal .group-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-wrap: nowrap;
}
.modal .group-stat-row .group-stat-cell {
  flex: none;
  min-width: 0;
}

.group-stat-cell {
  flex: 1;
  min-width: 110px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.group-stat-cell .gs-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}
.group-stat-cell .gs-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.group-stat-cell.recv { background: #e0f2f1; }
.group-stat-cell.send { background: #fff3e0; }
.group-stat-cell.recv.today { background: #e8f5e9; }
.group-stat-cell.send.today { background: #fce4ec; }
