* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: #1f2329;
  background: #f2f4f7;
}
.layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: 210px; flex: 0 0 210px; background: #fff; border-right: 1px solid #e5e6eb;
  display: flex; flex-direction: column; padding: 14px 0;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 16px 16px; border-bottom: 1px solid #f0f1f3; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px; background: #1677ff; color: #fff;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.brand-title { font-weight: 600; font-size: 14px; }
.brand-sub { font-size: 12px; color: #8a9099; }
.menu { padding: 10px 8px; flex: 1; }
.menu-group { font-size: 12px; color: #a5a9b0; padding: 12px 10px 6px; }
.menu-item {
  display: block; padding: 9px 12px; border-radius: 6px; color: #4e5969; cursor: pointer;
  font-size: 13px; margin-bottom: 2px;
}
.menu-item:hover { background: #f2f4f7; }
.menu-item.active { background: #e8f1ff; color: #1677ff; font-weight: 500; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid #f0f1f3; }
.foot-row { display: flex; justify-content: space-between; font-size: 12px; color: #8a9099; }
.foot-row strong { color: #1677ff; }

/* 主区域 */
.main { flex: 1; min-width: 0; }
.topbar {
  height: 48px; background: #fff; border-bottom: 1px solid #e5e6eb;
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}
.crumb { font-size: 13px; color: #8a9099; }
.crumb-org { color: #4e5969; }
.topbar-right { font-size: 12px; color: #4e5969; display: flex; align-items: center; gap: 6px; }
.dot-ok { width: 8px; height: 8px; border-radius: 50%; background: #00b42a; display: inline-block; }

.tabs { display: flex; gap: 4px; padding: 12px 20px 0; }
.tab {
  border: 1px solid #e5e6eb; background: #fff; padding: 8px 16px; border-radius: 6px 6px 0 0;
  font-size: 13px; color: #4e5969; cursor: pointer; border-bottom: none;
}
.tab.active { background: #e8f1ff; border-color: #bcd7ff; color: #1677ff; font-weight: 500; }

.panel { padding: 0 20px 24px; }
.card { background: #fff; border: 1px solid #e5e6eb; border-radius: 8px; padding: 16px; margin-top: 12px; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.hint { font-size: 12px; color: #8a9099; margin: 0 0 10px; }
.hint code, .copyline code { background: #f2f4f7; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.field { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.field > span { flex: 0 0 120px; color: #4e5969; text-align: right; }
.field input, .field select {
  flex: 1; height: 34px; border: 1px solid #dcdfe6; border-radius: 6px; padding: 0 10px;
  font-size: 13px; color: #1f2329; background: #fff; outline: none;
}
.field input:focus, .field select:focus { border-color: #1677ff; }
textarea {
  width: 100%; border: 1px solid #dcdfe6; border-radius: 6px; padding: 10px; font-size: 13px;
  font-family: inherit; outline: none; resize: vertical;
}
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4e5969; margin: 12px 0; }

.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn {
  height: 34px; padding: 0 16px; border: 1px solid #dcdfe6; background: #fff; color: #1f2329;
  border-radius: 6px; font-size: 13px; cursor: pointer;
}
.btn:hover { border-color: #1677ff; color: #1677ff; }
.btn.primary { background: #1677ff; border-color: #1677ff; color: #fff; }
.btn.primary:hover { background: #0e63e0; color: #fff; }
.btn.ghost { color: #8a9099; }
.btn.small { height: 26px; padding: 0 10px; font-size: 12px; }

/* 统计卡片 */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: #f0f1f3; border: 1px solid #f0f1f3; border-radius: 6px; overflow: hidden; }
.stat { background: #fff; padding: 12px 14px; }
.stat-label { font-size: 12px; color: #8a9099; }
.stat-value { font-size: 20px; font-weight: 600; margin-top: 6px; color: #1f2329; }
.stat-value.up { color: #f53f3f; }
.stat-value.down { color: #00b42a; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 500; color: #4e5969; background: #fafbfc;
  padding: 10px 12px; border-bottom: 1px solid #e5e6eb; white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid #f0f1f3; color: #1f2329; white-space: nowrap; }
.table tr:hover td { background: #fafcff; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.badge.blue { color: #1677ff; border: 1px solid #bcd7ff; background: #f2f8ff; }
.badge.green { color: #00b42a; border: 1px solid #b8f0c4; background: #f2fdf4; }
.badge.orange { color: #ff7d00; border: 1px solid #ffd8a8; background: #fff8ef; }
.badge.purple { color: #722ed1; border: 1px solid #d8c6f5; background: #f8f4ff; }
.badge.gray { color: #8a9099; border: 1px solid #e5e6eb; background: #fafbfc; }
.link { color: #1677ff; cursor: pointer; font-size: 12px; }
.link.danger { color: #f53f3f; }
.muted { color: #c9cdd4; font-size: 12px; }
.pager { display: flex; gap: 6px; justify-content: flex-end; padding-top: 12px; align-items: center; font-size: 12px; color: #8a9099; }
.pager button { min-width: 30px; height: 28px; border: 1px solid #dcdfe6; background: #fff; border-radius: 4px; cursor: pointer; font-size: 12px; }
.pager button.active { background: #1677ff; border-color: #1677ff; color: #fff; }

/* 弹层 */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-box { background: #fff; border-radius: 10px; width: 560px; max-width: 92vw; max-height: 86vh; display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #f0f1f3; font-weight: 600; }
.modal-head .x { border: none; background: none; font-size: 20px; color: #8a9099; cursor: pointer; line-height: 1; }
.modal-body { padding: 18px; overflow: auto; }
.qr-box { display: flex; gap: 20px; align-items: flex-start; }
.qr-box img { width: 220px; height: 220px; border: 1px solid #f0f1f3; border-radius: 8px; }
.qr-meta { font-size: 13px; line-height: 1.9; color: #4e5969; }
.qr-meta b { color: #1f2329; }
.result { margin-top: 16px; padding: 12px; border: 1px solid #bcd7ff; background: #f2f8ff; border-radius: 8px; font-size: 13px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin: 12px 0 4px; }
.bar { flex: 1; background: #1677ff; border-radius: 2px 2px 0 0; min-height: 2px; position: relative; }
.bar.u { background: #ffb3b3; }
.bar-axis { display: flex; font-size: 11px; color: #8a9099; gap: 3px; }
.bar-axis span { flex: 1; text-align: center; overflow: hidden; }
.copyline { display: flex; align-items: center; gap: 10px; }
.toast {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%); background: #1f2329; color: #fff;
  padding: 9px 18px; border-radius: 6px; font-size: 13px; z-index: 99;
}
.hidden { display: none !important; }

/* ---- 生成二维码：回复配置区 ---- */
.form-vertical { display: flex; flex-direction: column; gap: 14px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 0 2px; }
.radio-row .radio { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #303133; cursor: pointer; }
.tool-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row input { flex: 1; }
