:root {
  --bg: #f4f7fc;
  --bg-2: #edf3fc;
  --surface: #ffffff;
  --surface-2: #fbfdff;
  --text: #0f1f3d;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e4ebf5;
  --line-strong: #d7e2f2;
  --primary: #1d6ff2;
  --primary-2: #00b8d9;
  --primary-soft: #eaf2ff;
  --success: #12b76a;
  --success-soft: #e8fbf1;
  --warning: #f79009;
  --warning-soft: #fff6e6;
  --danger: #f04438;
  --danger-soft: #feeceb;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(16, 42, 84, 0.07);
  --shadow-soft: 0 2px 10px rgba(16, 42, 84, 0.04);
  --sidebar-w: 236px;
  --font: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui,
    -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
a {
  color: var(--primary);
  text-decoration: none;
}
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
.hidden {
  display: none !important;
}

/* ---------------- 登录 ---------------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--bg);
}
.login-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 64px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 216, 255, 0.28), transparent 42%),
    radial-gradient(circle at 88% 88%, rgba(85, 170, 255, 0.35), transparent 45%),
    linear-gradient(135deg, #08224f 0%, #1152b6 48%, #0aa6c9 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 40% 40%, #000 20%, transparent 78%);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #ffffff 0%, #d9f6ff 100%);
  color: #0b4fae;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.brand-mark svg {
  width: 26px;
  height: 26px;
}
.login-title {
  position: relative;
  z-index: 2;
  max-width: 520px;
}
.login-title h1 {
  font-size: 40px;
  line-height: 1.2;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
}
.login-title p {
  color: rgba(235, 247, 255, 0.82);
  font-size: 15px;
  line-height: 1.9;
  margin: 0;
}
.login-features {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  margin-top: 36px;
}
.login-feature {
  display: flex;
  gap: 12px;
  align-items: center;
  color: rgba(240, 250, 255, 0.92);
  font-size: 13px;
}
.login-feature i {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-style: normal;
  color: #9fe9ff;
  font-size: 12px;
}
.login-foot {
  position: relative;
  z-index: 2;
  color: rgba(220, 240, 255, 0.55);
  font-size: 12px;
  letter-spacing: 0.3px;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 40px 28px;
}
.login-card {
  width: min(380px, 100%);
}
.login-card h2 {
  font-size: 24px;
  margin: 0 0 8px;
}
.login-card .sub {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 13px;
}
.login-card form {
  display: grid;
  gap: 16px;
}
.field {
  display: grid;
  gap: 7px;
}
.field label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.2px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: box-shadow 0.18s, border-color 0.18s;
}
.field textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.6;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #79b0ff;
  box-shadow: 0 0 0 3px rgba(29, 111, 242, 0.12);
}
.field .hint {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.6;
}
.login-tip {
  margin-top: 18px;
  padding: 10px 12px;
  background: #f2f7ff;
  border: 1px dashed #c7dcfa;
  border-radius: 10px;
  color: #47678f;
  font-size: 12px;
  line-height: 1.7;
}
.form-error {
  color: var(--danger);
  font-size: 12.5px;
  min-height: 18px;
}

/* ---------------- 布局 ---------------- */
.app {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.sidebar-close {
  display: none;
}
.sidebar-backdrop {
  display: none;
}
.sidebar-brand {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.sidebar-brand .mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(29, 111, 242, 0.28);
  flex: 0 0 auto;
}
.sidebar-brand .mark svg {
  width: 22px;
  height: 22px;
}
.sidebar-brand .name {
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.2px;
  line-height: 1.25;
}
.sidebar-brand .tag {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 2px;
  letter-spacing: 0.4px;
}
.nav-group-label {
  padding: 12px 22px 6px;
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nav {
  padding: 0 10px;
  display: grid;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  color: #334963;
  font-size: 13.5px;
  text-align: left;
  transition: background 0.16s, color 0.16s;
  position: relative;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  opacity: 0.72;
  flex: 0 0 auto;
}
.nav-item:hover {
  background: #f1f6ff;
  color: #0b4fae;
}
.nav-item.active {
  background: linear-gradient(90deg, #e9f2ff, #f5faff);
  color: #0b57c2;
  font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
}
.sidebar-foot {
  margin-top: auto;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--line);
}
.sidebar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  background: #f8fbff;
  border: 1px solid var(--line);
  padding: 9px 10px;
  border-radius: 10px;
}
.sidebar-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.12);
}
.sidebar-status .dot.off {
  background: var(--muted-2);
  box-shadow: none;
}
.sidebar-status .dot.warn {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(247, 144, 9, 0.12);
}
.sidebar-version {
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--muted-2);
  text-align: center;
  letter-spacing: 0.3px;
}

.main-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 28px;
  background: rgba(244, 247, 252, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 235, 245, 0.8);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.menu-btn {
  display: none;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 9px;
  width: 36px;
  height: 36px;
  cursor: pointer;
}
.page-eyebrow {
  font-size: 11px;
  letter-spacing: 0.8px;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.3;
}
.page-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 99px;
  font-size: 11.5px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.conn-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}
.conn-pill.off .dot {
  background: var(--muted-2);
}
.conn-pill.warn .dot {
  background: var(--warning);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 99px;
  background: #fff;
  border: 1px solid var(--line);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dceaff, #e7fbff);
  color: #0b57c2;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
}
.user-chip span {
  font-size: 12px;
  color: var(--muted);
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: 0.16s;
}
.icon-btn:hover {
  border-color: #bfd6f7;
  color: var(--primary);
  background: #f7fbff;
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}
.page-body {
  padding: 22px 28px 40px;
  flex: 1;
}

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.card-title {
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .accent {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
}
.card-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.card-body {
  padding: 16px 18px 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #2c4260;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.16s;
  white-space: nowrap;
}
.btn:hover {
  border-color: #b9d2f5;
  background: #f8fbff;
}
.btn svg {
  width: 15px;
  height: 15px;
}
.btn-primary {
  border: 0;
  background: linear-gradient(135deg, #1d6ff2, #0a9fe0);
  color: #fff;
  box-shadow: 0 6px 16px rgba(29, 111, 242, 0.25);
}
.btn-primary:hover {
  filter: brightness(1.05);
  background: linear-gradient(135deg, #1d6ff2, #0a9fe0);
}
.btn-danger {
  border-color: #f7c5c1;
  color: #c02a20;
  background: #fff7f6;
}
.btn-danger:hover {
  background: #feeceb;
  border-color: #f0a49d;
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding: 7px 9px;
}
.btn-ghost:hover {
  background: #f1f6ff;
  color: var(--primary);
}
.btn-sm {
  padding: 6px 10px;
  font-size: 11.5px;
  border-radius: 7px;
}
.btn-icon {
  padding: 6px;
  width: 28px;
  height: 28px;
}
.link-btn {
  border: 0;
  background: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}
.link-btn.danger {
  color: var(--danger);
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  background: #f1f5fb;
  color: var(--muted);
  white-space: nowrap;
}
.pill.on {
  background: var(--success-soft);
  color: #067647;
}
.pill.off {
  background: #f2f5fa;
  color: #7a8aa3;
}
.pill.warn {
  background: var(--warning-soft);
  color: #b76e00;
}
.pill.danger {
  background: var(--danger-soft);
  color: #b42318;
}
.pill.info {
  background: var(--primary-soft);
  color: #0b57c2;
}
.pill .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.2px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
  white-space: nowrap;
}
td {
  padding: 12px;
  border-bottom: 1px solid #f1f5fb;
  font-size: 12.5px;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfdff;
}
.cell-main {
  font-weight: 600;
  color: #1c3252;
}
.cell-sub {
  color: var(--muted-2);
  font-size: 11px;
  margin-top: 2px;
}
.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #35506f;
}
input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

/* 开关 */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 21px;
  flex: 0 0 auto;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch span {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #dfe8f4;
  transition: 0.2s;
  border-radius: 99px;
}
.switch span::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}
.switch input:checked + span {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.switch input:checked + span::before {
  transform: translateX(17px);
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed #edf2f9;
}
.toggle-row:last-child {
  border-bottom: 0;
}
.toggle-row .label {
  font-size: 12.5px;
  color: #2b4260;
}
.toggle-row .desc {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 2px;
}

/* ---------------- 概览 ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(0, 184, 217, 0.14), transparent 42%),
    radial-gradient(circle at 68% 120%, rgba(29, 111, 242, 0.16), transparent 52%),
    linear-gradient(120deg, #ffffff 0%, #f4f9ff 58%, #effbff 100%);
  border: 1px solid #dfeaf9;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.hero::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(29, 111, 242, 0.14);
  box-shadow: 0 0 0 20px rgba(29, 111, 242, 0.04), 0 0 0 60px rgba(0, 184, 217, 0.03);
  pointer-events: none;
}
.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}
.hero-left {
  min-width: 260px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #0b57c2;
  background: rgba(29, 111, 242, 0.08);
  border: 1px solid rgba(29, 111, 242, 0.12);
  padding: 4px 9px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.hero h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.3px;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.bot-state-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e0ebf9;
  border-radius: 12px;
  padding: 9px 12px;
  backdrop-filter: blur(8px);
}
.bot-state-card .avatar-bot {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d6ff2, #00b8d9);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}
.bot-state-card .name {
  font-size: 12.5px;
  font-weight: 600;
}
.bot-state-card .sub {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 15px 13px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  opacity: 0.85;
}
.stat-card .stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 10px;
}
.stat-card .stat-icon svg {
  width: 16px;
  height: 16px;
}
.stat-card .stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2px;
}
.stat-card .stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.stat-card .stat-hint {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 3px;
}
.stat-card.cyan .stat-icon {
  background: #e6fbff;
  color: #0891b2;
}
.stat-card.cyan::before {
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
}
.stat-card.green .stat-icon {
  background: var(--success-soft);
  color: var(--success);
}
.stat-card.green::before {
  background: linear-gradient(90deg, #12b76a, #33d69f);
}
.stat-card.orange .stat-icon {
  background: var(--warning-soft);
  color: var(--warning);
}
.stat-card.orange::before {
  background: linear-gradient(90deg, #f79009, #fdb022);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.two-col-even {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.chart-box {
  padding: 4px 2px 0;
  min-height: 210px;
}
.chart-svg {
  width: 100%;
  height: 210px;
  display: block;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.chart-legend i {
  width: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  display: inline-block;
  border-radius: 2px;
}

.log-list {
  display: grid;
  gap: 0;
}
.log-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed #edf2f9;
}
.log-row:last-child {
  border-bottom: 0;
}
.log-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: #f2f6fd;
  color: #5d7ca3;
  font-size: 10px;
  font-weight: 700;
}
.log-icon.warn {
  background: var(--warning-soft);
  color: #b76e00;
}
.log-icon.error {
  background: var(--danger-soft);
  color: #b42318;
}
.log-body {
  flex: 1;
  min-width: 0;
}
.log-msg {
  font-size: 12px;
  color: #2b4260;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.log-meta {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 2px;
}
.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12.5px;
}
.empty svg {
  width: 34px;
  height: 34px;
  opacity: 0.5;
  display: block;
  margin: 0 auto 8px;
}

/* 模拟测试台 */
.sim-box {
  display: grid;
  gap: 10px;
}
.sim-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sim-chip {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 99px;
  padding: 5px 10px;
  font-size: 11.5px;
  cursor: pointer;
  color: #3c587a;
  transition: 0.15s;
}
.sim-chip:hover {
  background: var(--primary-soft);
  border-color: #b7d3f9;
  color: #0b57c2;
}
.sim-row {
  display: flex;
  gap: 8px;
}
.sim-row input {
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 9px 11px;
  outline: none;
}
.sim-row input:focus {
  border-color: #79b0ff;
  box-shadow: 0 0 0 3px rgba(29, 111, 242, 0.12);
}
.chat-stream {
  margin-top: 4px;
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding-right: 2px;
}
.bubble {
  max-width: 92%;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.6;
  background: #f4f8ff;
  border: 1px solid #e3edfb;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble.user {
  margin-left: auto;
  background: #eef9ff;
  border-color: #d5f1fb;
}
.bubble.bot {
  margin-right: auto;
}
.bubble-meta {
  font-size: 10px;
  color: var(--muted-2);
  margin-bottom: 3px;
}

/* 群组卡片 */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.group-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}
.group-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.group-avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, #e6f0ff, #e2fbff);
  color: #0b57c2;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  flex: 0 0 auto;
}
.group-card-title {
  min-width: 0;
}
.group-card-title .name {
  font-size: 13.5px;
  font-weight: 700;
}
.group-card-title .id {
  font-size: 10.5px;
  color: var(--muted-2);
  font-family: var(--mono);
  margin-top: 3px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.group-metric {
  background: #f8fbff;
  border: 1px solid #edf3fb;
  border-radius: 9px;
  padding: 8px;
  text-align: center;
}
.group-metric b {
  display: block;
  font-size: 14px;
  color: #17345c;
}
.group-metric span {
  font-size: 10px;
  color: var(--muted-2);
}
.group-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

/* 指令卡片 */
.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.cmd-card {
  padding: 15px;
  display: grid;
  gap: 10px;
}
.cmd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cmd-name {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}
.cmd-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f1f5fb;
  color: var(--muted);
  font-weight: 400;
}
.cmd-usage {
  font-family: var(--mono);
  font-size: 11px;
  color: #47678f;
  background: #f5f9ff;
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid #edf3fb;
}
.cmd-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
  min-height: 36px;
}
.cmd-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 7px;
  align-items: end;
}
.cmd-controls .field {
  gap: 4px;
}
.cmd-controls label {
  font-size: 10px;
}
.cmd-controls select,
.cmd-controls input {
  padding: 7px 8px;
  font-size: 11.5px;
  border-radius: 7px;
}

.cmd-reply-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 9px;
  border-top: 1px dashed #e7eef9;
}
.cmd-reply-row .btn-sm {
  padding: 5px 9px;
  font-size: 10.5px;
}

/* 筛选栏 */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar .field {
  gap: 0;
}
.toolbar select,
.toolbar input {
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 12px;
  outline: none;
}
.toolbar select:focus,
.toolbar input:focus {
  border-color: #79b0ff;
  box-shadow: 0 0 0 3px rgba(29, 111, 242, 0.1);
}
.toolbar .spacer {
  flex: 1;
}

/* 设置页 */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.settings-section {
  display: grid;
  gap: 13px;
}
.settings-section h3 {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.4px;
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
}
.settings-section h3::before {
  content: "";
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
}
.intent-grid {
  display: grid;
  gap: 8px;
  background: #f8fbff;
  border: 1px solid #edf3fb;
  border-radius: 10px;
  padding: 11px;
}
.intent-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: #35506f;
}
.intent-item .mono {
  font-size: 10.5px;
  color: var(--muted-2);
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #edf2f9;
  font-size: 12px;
}
.kv:last-child {
  border-bottom: 0;
}
.kv .k {
  color: var(--muted);
}
.kv .v {
  font-weight: 600;
  color: #213a5c;
  text-align: right;
}

/* 日志页 */
.log-table td {
  vertical-align: top;
}
.level-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
}
.level-badge.info {
  background: var(--primary-soft);
  color: #0b57c2;
}
.level-badge.warn {
  background: var(--warning-soft);
  color: #b76e00;
}
.level-badge.error {
  background: var(--danger-soft);
  color: #b42318;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 14px;
  font-size: 11.5px;
  color: var(--muted);
}

/* 模态框 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(11, 30, 61, 0.38);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.16s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(9, 30, 66, 0.24);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from {
    transform: translateY(12px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0;
  font-size: 16px;
}
.modal-head .sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}
.modal-close {
  border: 0;
  background: #f4f7fc;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.modal-body {
  padding: 18px 20px;
  overflow: auto;
  display: grid;
  gap: 14px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid .full {
  grid-column: 1 / -1;
}
.tabs {
  display: flex;
  gap: 4px;
  background: #f5f9ff;
  padding: 4px;
  border-radius: 9px;
  width: fit-content;
}
.tab-btn {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.tab-btn.active {
  background: #fff;
  color: #0b57c2;
  font-weight: 600;
  box-shadow: 0 1px 5px rgba(16, 42, 84, 0.08);
}
.tab-panel {
  display: grid;
  gap: 13px;
}
.definition-list {
  display: grid;
  gap: 8px;
}
.section-title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.section-title::before {
  content: "";
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
}
.alert {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 1.7;
  background: #f2f7ff;
  border: 1px solid #d9e8ff;
  color: #3d5f8a;
}
.alert.warn {
  background: #fffaeb;
  border-color: #fde9be;
  color: #8a5a00;
}
.alert.danger {
  background: #fef3f2;
  border-color: #fbd9d5;
  color: #a13228;
}
.leaderboard {
  display: grid;
  gap: 7px;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 9px;
  background: #fbfdff;
  border: 1px solid #edf3fb;
}
.rank-row .rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: #eff5ff;
  color: #0b57c2;
}
.rank-row .rank.top {
  background: linear-gradient(135deg, #1d6ff2, #00b8d9);
  color: #fff;
}
.rank-row .who {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-row .pts {
  font-size: 12px;
  font-weight: 700;
  color: #17345c;
}

/* Toast */
.toast-root {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 36px));
}
.toast {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 11px 13px;
  box-shadow: var(--shadow);
  font-size: 12.5px;
  color: #24395a;
  animation: toastIn 0.22s ease;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.toast.error {
  border-left-color: var(--danger);
}
.toast.success {
  border-left-color: var(--success);
}
.toast.warn {
  border-left-color: var(--warning);
}
.toast .t-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}
.toast.error .t-icon {
  background: var(--danger-soft);
  color: var(--danger);
}
.toast.success .t-icon {
  background: var(--success-soft);
  color: var(--success);
}
@keyframes toastIn {
  from {
    transform: translateY(-6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 骨架/加载 */
.loading {
  display: grid;
  place-items: center;
  padding: 60px 0;
  color: var(--muted-2);
  gap: 10px;
}
.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #dbe8fa;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 响应式 */
@media (max-width: 1280px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1080px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 16px 50px rgba(9, 30, 66, 0.18);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close {
    display: grid;
    place-items: center;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(9, 30, 66, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }
  body.sidebar-lock {
    overflow: hidden;
  }
  .main-wrap {
    margin-left: 0;
  }
  .menu-btn {
    display: grid;
    place-items: center;
  }
  .two-col,
  .two-col-even,
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-body {
    padding: 18px 18px 32px;
  }
  .topbar {
    padding: 12px 18px;
  }
}
@media (max-width: 720px) {
  .login-wrap {
    grid-template-columns: 1fr;
  }
  .login-hero {
    display: none;
  }
  .login-panel {
    min-height: 100vh;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .page-title {
    font-size: 17px;
  }
  .user-chip span {
    display: none;
  }
  .hero h2 {
    font-size: 19px;
  }
  .hero-actions {
    width: 100%;
  }
  .modal {
    max-height: calc(100vh - 24px);
  }
  .modal-mask {
    padding: 12px;
  }
  .cmd-controls {
    grid-template-columns: 1fr 1fr;
  }
  .cmd-controls .switch {
    grid-column: 1 / -1;
  }
}

/* 细节修正：hero 徽标内图标尺寸与文字不换行 */
.hero-eyebrow { white-space: nowrap; }
.hero-eyebrow svg { width: 14px; height: 14px; flex: 0 0 auto; }
.login-feature i { font-style: normal; }

.two-col { align-items: start; }

/* ---------------- 回复模板 ---------------- */
.toolbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.tpl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tpl-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}
.tpl-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.tpl-card-preview {
  margin: 0 18px;
  padding: 14px;
  min-height: 150px;
  max-height: 290px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f2f3f5;
}
.tpl-text-preview {
  color: #36527a;
  font-size: 12.5px;
  line-height: 1.8;
  white-space: normal;
  word-break: break-word;
}
.tpl-card-foot {
  margin-top: auto;
  padding: 14px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.tpl-card-foot > .muted {
  white-space: nowrap;
}
.tpl-card-foot .row-actions {
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tpl-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
  margin-top: 14px;
  align-items: start;
}
.tpl-editor-form {
  min-width: 0;
}
.tpl-editor-preview {
  position: sticky;
  top: 8px;
  min-width: 0;
}
.tpl-preview-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}
#tpl-preview {
  padding: 12px;
  border-radius: 12px;
  background: #f2f3f5;
}
.qq-card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg, #fff);
  color: var(--card-text, #0b1f33);
  border: 1px solid rgba(15, 31, 61, 0.1);
  box-shadow: 0 14px 30px rgba(20, 50, 100, 0.12);
  font-size: 12.5px;
  line-height: 1.65;
  word-break: break-word;
}
.qq-card-accent {
  height: 4px;
  background: var(--card-accent, #1d6ff2);
}
.qq-card-inner {
  padding: 16px 17px 17px;
}
.qq-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.qq-card-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--card-accent, #1d6ff2);
  background: color-mix(in srgb, var(--card-accent, #1d6ff2) 12%, white);
  border: 1px solid color-mix(in srgb, var(--card-accent, #1d6ff2) 30%, white);
}
.qq-card-brand {
  font-size: 10px;
  font-weight: 700;
  color: var(--card-text, #0b1f33);
  opacity: 0.42;
  letter-spacing: 1px;
}
.qq-card-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--card-text, #0b1f33);
  letter-spacing: 0.2px;
}
.qq-card-subtitle {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--card-text, #0b1f33);
  opacity: 0.55;
}
.qq-card-image {
  display: block;
  width: calc(100% + 2px);
  max-height: 170px;
  margin: 12px -1px 0;
  object-fit: cover;
  border-radius: 9px;
  background: #eef4ff;
}
.qq-card-body {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--card-text, #0b1f33);
  opacity: 0.86;
  white-space: normal;
}
.qq-card-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 31, 61, 0.1);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--card-text, #0b1f33);
  opacity: 0.48;
}
.qq-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--card-accent, #1d6ff2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.qq-md-card {
  background: #fff;
  color: #111;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(20, 35, 60, 0.08);
  padding: 16px 17px 17px;
  font-size: 13px;
  line-height: 1.75;
  word-break: break-word;
}
.qq-md-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.2px;
  color: #111;
}
.qq-md-subtitle {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #8b9099;
}
.qq-md-image {
  display: block;
  width: 100%;
  max-height: 180px;
  margin-top: 12px;
  object-fit: cover;
  border-radius: 7px;
  background: #f2f5f9;
}
.qq-md-body {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: #2f3338;
  white-space: normal;
}
.qq-md-divider {
  margin: 14px 0 10px;
  border-top: 1px solid #e5e7eb;
}
.qq-md-footer {
  font-size: 12px;
  line-height: 1.7;
  color: #8b9099;
}
.qq-md-keyboard {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.qq-md-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #f7f8fa;
  color: #1f2329;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
}
.qq-md-button-style-0 {
  border-color: #d9dee7;
  background: #f7f8fa;
  color: #1f2329;
}
.qq-md-button-style-1 {
  border-color: #1d6ff2;
  background: #f3f8ff;
  color: #1d6ff2;
}
.qq-md-button-style-3 {
  border-color: #efc7c3;
  background: #fff;
  color: #c62828;
}
.qq-md-button-style-4 {
  border-color: #1d6ff2;
  background: #1d6ff2;
  color: #fff;
}
.icon-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.icon-pick {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #36527a;
  font-size: 18px;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  cursor: pointer;
}
.icon-pick:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f2f7ff;
}
.button-editor {
  margin-top: 6px;
}
.button-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 116px 34px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.button-row input,
.button-row select {
  min-width: 0;
}
.button-row-remove {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #f0c9c9;
  border-radius: 8px;
  background: #fff7f7;
  color: #c62828;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.button-row-remove:hover {
  border-color: #d93025;
  background: #fff0f0;
}
.button-empty {
  padding: 11px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
@media (max-width: 760px) {
  .button-row {
    grid-template-columns: 1fr 1fr;
  }
  .button-row .button-target {
    grid-column: 1 / 3;
  }
  .button-row .button-style {
    grid-column: 1 / 2;
  }
  .button-row .button-row-remove {
    grid-column: 2 / 3;
    justify-self: start;
  }
}
.color-input {
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-input input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}
.color-input input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}
@media (max-width: 760px) {
  .tpl-editor-layout {
    grid-template-columns: 1fr;
  }
  .tpl-editor-preview {
    position: static;
  }
}

/* ---------------- 租户自助绑定群 ---------------- */
.bind-card {
  margin-bottom: 14px;
  border: 1px solid #d8e8ff;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(0, 184, 217, 0.10), transparent 55%),
    linear-gradient(135deg, #f5f9ff 0%, #f2fcff 100%);
  box-shadow: 0 12px 28px rgba(20, 86, 170, 0.08);
}
.bind-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.bind-head .muted {
  font-size: 12px;
  line-height: 1.6;
}
.bind-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.bind-code-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d2748 0%, #0f3d66 100%);
  box-shadow: 0 8px 20px rgba(13, 39, 72, 0.18);
}
.bind-code {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #e9fbff;
  text-shadow: 0 0 18px rgba(0, 216, 255, 0.35);
}
.bind-code-box .btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}
.bind-code-box .btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.bind-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.bind-steps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2ecfa;
  color: #46617f;
  font-size: 11.5px;
}
.bind-steps b {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e7f1ff;
  color: #1d6ff2;
  font-size: 10.5px;
}
.bind-steps code {
  font-family: var(--mono);
  color: #0b57c2;
  background: #eef6ff;
  padding: 2px 5px;
  border-radius: 5px;
}
@media (max-width: 760px) {
  .bind-head {
    display: block;
  }
  .bind-head .pill {
    margin-top: 8px;
  }
  .bind-code {
    font-size: 19px;
    letter-spacing: 2px;
  }
}
