/* 炫联综合指令中心 - 浅色毛玻璃主题（明亮极光） */

:root {
  /* 明亮极光配色 */
  --bee-primary: #6c5ce7;
  --bee-honey:  #00b8d9;
  --bee-dark:    #1e293b;
  --bee-accent:       #00b8d9;
  --bee-accent-light: rgba(0, 184, 217, .12);
  --bee-accent-dark:  #0099b8;
  --bee-success:       #10b981;
  --bee-success-light: rgba(16, 185, 129, .13);
  --bee-danger:        #ef4444;
  --bee-danger-light:  rgba(239, 68, 68, .12);
  --bee-warning:       #f59e0b;
  --bee-warning-light: rgba(245, 158, 11, .14);
  --bee-info:          #0ea5e9;
  --bee-text:          #1e293b;
  --bee-text-muted:    #64748b;
  --bee-border:        rgba(15, 23, 42, .08);
  --bee-bg:            #eef1f8;
  --bee-card-radius:   16px;
  --bee-shadow:        0 8px 24px rgba(99, 102, 241, .10);
  --bee-shadow-hover:  0 14px 34px rgba(99, 102, 241, .18);
  --bee-transition:    all .2s ease;
  /* 毛玻璃卡片 */
  --bee-glass-bg:        rgba(255, 255, 255, .62);
  --bee-glass-bg-strong: rgba(255, 255, 255, .82);
  --bee-glass-border:    rgba(255, 255, 255, .9);
  --bee-glass-blur:      18px;
}

/* ============ 全局：明亮极光背景 ============ */
body {
  background-color: #eef1f8;
  background-image:
    radial-gradient(1000px 720px at 12% -4%, rgba(139, 123, 255, .20), transparent 60%),
    radial-gradient(920px 660px at 90% -6%, rgba(0, 210, 255, .16), transparent 55%),
    radial-gradient(820px 820px at 80% 112%, rgba(168, 85, 247, .12), transparent 62%),
    radial-gradient(680px 620px at 16% 108%, rgba(45, 212, 191, .12), transparent 56%);
  background-attachment: fixed;
  color: var(--bee-text);
  font-size: 14px;
  min-height: 100vh;
}

/* ============ 卡片：毛玻璃 ============ */
.bee-card {
  border: 1px solid var(--bee-glass-border);
  border-radius: var(--bee-card-radius);
  background: var(--bee-glass-bg);
  backdrop-filter: blur(var(--bee-glass-blur));
  -webkit-backdrop-filter: blur(var(--bee-glass-blur));
  box-shadow: var(--bee-shadow);
  transition: var(--bee-transition);
}
.bee-card:hover {
  box-shadow: var(--bee-shadow-hover);
  border-color: rgba(139, 123, 255, .3);
  transform: translateY(-2px);
}

/* ============ 主按钮：蓝紫→青渐变 ============ */
.bee-btn-primary {
  background: linear-gradient(135deg, #6c5ce7, #00b8d9);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(108, 92, 231, .32);
  transition: var(--bee-transition);
}
.bee-btn-primary:hover {
  background: linear-gradient(135deg, #7d6ef0, #0cc8ea);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 184, 217, .38);
}

/* ============ 统计块 ============ */
.bee-stat {
  background: var(--bee-glass-bg);
  border: 1px solid var(--bee-glass-border);
  backdrop-filter: blur(var(--bee-glass-blur));
  -webkit-backdrop-filter: blur(var(--bee-glass-blur));
  border-radius: var(--bee-card-radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--bee-shadow);
  transition: var(--bee-transition);
}
.bee-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--bee-shadow-hover);
  border-color: rgba(0, 184, 217, .28);
}
.bee-stat-num {
  font-size: 26px;
  font-weight: 700;
  color: #5b4bd6;
  background: linear-gradient(135deg, #6c5ce7, #00b8d9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bee-stat-label { font-size: 12px; color: var(--bee-text-muted); margin-top: 2px; }

/* ============ 密钥展示框 ============ */
.bee-key-box {
  background: var(--bee-glass-bg);
  border: 1px dashed rgba(108, 92, 231, .35);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
  backdrop-filter: blur(var(--bee-glass-blur));
  -webkit-backdrop-filter: blur(var(--bee-glass-blur));
}
.bee-key-box:hover {
  border-color: var(--bee-primary);
  background: rgba(108, 92, 231, .06);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, .12);
}
.bee-key-val {
  font-family: Consolas, Monaco, monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #5b4bd6;
  user-select: all;
}
.bee-key-hint { font-size: 12px; color: var(--bee-text-muted); margin-top: 6px; }

/* ============ 徽章 ============ */
.bee-badge-public  { background: rgba(14, 165, 233, .12); color: #0284c7; }
.bee-badge-private { background: rgba(168, 85, 247, .13); color: #7c3aed; }
.bee-badge-main   { background: rgba(108, 92, 231, .13); color: #5b4bd6; }
.bee-badge-sub    { background: rgba(16, 185, 129, .13); color: #059669; }
.bee-badge-gray   { background: rgba(100, 116, 139, .12); color: #64748b; }
.bee-badge-ok     { background: rgba(16, 185, 129, .13); color: #059669; }
.bee-badge-warn   { background: rgba(245, 158, 11, .14); color: #b45309; }

/* 版本号渐变高亮（与 bee-stat-num 同款渐变文字） */
.bee-ver {
  background: linear-gradient(135deg, #6c5ce7, #00b8d9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ 可视化流程卡片 ============ */
.flow-card {
  background: var(--bee-glass-bg);
  border: 1px solid var(--bee-glass-border);
  border-left: 4px solid #0ea5e9;
  border-radius: 12px;
  margin-bottom: 0;
  position: relative;
  transition: box-shadow .15s, transform .15s;
  cursor: pointer;
  backdrop-filter: blur(var(--bee-glass-blur));
  -webkit-backdrop-filter: blur(var(--bee-glass-blur));
}
.flow-card:hover {
  box-shadow: var(--bee-shadow-hover);
  border-color: rgba(14, 165, 233, .4);
}
.flow-card[draggable="true"]:active { cursor: grabbing; opacity: .7; }
.flow-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; user-select: none;
}
.flow-card-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.flow-card-icon { font-size: 18px; flex-shrink: 0; }
.flow-card-label { font-weight: 600; font-size: 14px; flex-shrink: 0; }
.flow-card-summary {
  font-size: 12px; margin-left: 4px; color: var(--bee-text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px;
}
.flow-card-toggle { margin-left: auto; color: #b6bcc8; font-size: 12px; flex-shrink: 0; }
.flow-card-actions { position: absolute; top: 8px; right: 34px; display: flex; gap: 2px; }
.flow-card-actions .btn { font-size: 12px; line-height: 1; }
.flow-card-body {
  padding: 0 14px 12px;
  border-top: 1px dashed rgba(15, 23, 42, .1);
  padding-top: 10px; margin-top: 4px;
}
.flow-arrow { text-align: center; color: #b6bcc8; font-size: 14px; margin: 2px 0; line-height: 1; }
.flow-connector { display: flex; flex-direction: column; align-items: center; padding: 4px 0 2px; }
.flow-data {
  font-size: 11px;
  color: #5b4bd6;
  background: rgba(108, 92, 231, .08);
  border: 1px dashed rgba(108, 92, 231, .35);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 2px;
  font-family: Consolas, monospace;
  display: inline-block;
  white-space: nowrap;
}
.flow-var-badge {
  font-size: 10px;
  background: rgba(108, 92, 231, .1);
  color: #5b4bd6;
  border: 1px solid rgba(108, 92, 231, .25);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 4px;
  font-family: Consolas, monospace;
  flex-shrink: 0;
}
.flow-final {
  border: 1px solid #91d5ff;
  border-radius: 12px;
  margin-top: 2px;
  box-shadow: var(--bee-shadow);
}
.flow-final-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; user-select: none;
}
.flow-final-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #1890ff; color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.flow-final-icon { font-size: 18px; flex-shrink: 0; }
.flow-final-label { font-weight: 600; font-size: 14px; color: #1890ff; flex-shrink: 0; }
.flow-final-hint { font-size: 12px; color: var(--bee-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-final-body { padding: 0 14px 14px; }
.flow-branch-hint { padding: 0 14px 8px; font-size: 11px; display: flex; gap: 10px; }
.flow-card-drag-over { box-shadow: 0 0 0 2px var(--bee-primary) !important; }

/* ============ 测试结果 ============ */
.test-status-ok  { color: #059669; font-weight: 600; }
.test-status-err { color: #dc2626; font-weight: 600; }
.test-body {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px; padding: 12px;
  font-family: Consolas, monospace; font-size: 12px;
  max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-all;
}
.test-parsed {
  background: rgba(16, 185, 129, .08);
  border: 1px solid rgba(16, 185, 129, .3);
  border-radius: 8px; padding: 10px 14px;
}

/* ============ 页脚 ============ */
.bee-footer { border-top: 1px solid var(--bee-border); background: rgba(255, 255, 255, .45); }

/* ============================================================
   侧边栏布局
   ============================================================ */

.bee-body { background: transparent; }
.bee-layout { display: flex; min-height: 100vh; }
.bee-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ---- 侧边栏：白色毛玻璃 ---- */
.bee-sidebar {
  width: 232px; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .58);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-right: 1px solid var(--bee-border);
  padding: 16px 12px 14px;
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(15,23,42,.2) transparent;
}
.bee-sidebar-brand {
  color: #5b4bd6; font-weight: 700; font-size: 15px;
  text-decoration: none; padding: 4px 10px 12px; display: block;
  border-bottom: 1px solid var(--bee-border); margin-bottom: 6px;
  white-space: normal; line-height: 1.4; overflow-wrap: break-word;
}
.bee-sidebar-brand:hover { color: #7d6ef0; }
.bee-sidebar-group {
  font-size: 11px; color: #94a3b8;
  padding: 12px 10px 4px; letter-spacing: 2px;
}
.bee-nav-item {
  display: flex; align-items: center; gap: 10px;
  color: #475569; text-decoration: none;
  padding: 8px 10px; border-radius: 8px; font-size: 14px; margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.bee-nav-item:hover { background: rgba(108, 92, 231, .08); color: #1e293b; }
.bee-nav-item.active {
  background: linear-gradient(90deg, rgba(108, 92, 231, .16), rgba(0, 184, 217, .06));
  color: #5b4bd6;
  box-shadow: inset 3px 0 0 #6c5ce7;
  font-weight: 600;
}
.bee-nav-icon { width: 22px; text-align: center; flex-shrink: 0; }
.bee-nav-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bee-nav-admin { color: #0284c7; }
.bee-nav-admin:hover { color: #0369a1; }

.bee-sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--bee-border); }
.bee-sidebar-user { display: flex; align-items: center; gap: 8px; padding: 0 6px 6px; min-width: 0; }
.bee-sidebar-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #6c5ce7, #00b8d9);
  color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.bee-sidebar-username { color: #334155; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bee-sidebar-logout { display: block; color: #94a3b8; font-size: 12px; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.bee-sidebar-logout:hover { color: #dc2626; background: rgba(239, 68, 68, .08); }

/* ---- 管理后台侧边栏：同浅色毛玻璃，品牌色偏青 ---- */
.bee-sidebar-admin { background: rgba(248, 251, 255, .66); }
.bee-sidebar-admin-sub { font-size: 11px; color: #94a3b8; padding: 4px 10px 0; margin-top: -4px; }
.bee-sidebar-admin .bee-sidebar-brand { color: #0284c7; }
.bee-sidebar-admin .bee-sidebar-brand:hover { color: #0369a1; }
.bee-sidebar-admin .bee-nav-item.active {
  background: linear-gradient(90deg, rgba(0, 184, 217, .16), rgba(0, 184, 217, .05));
  color: #0284c7;
  box-shadow: inset 3px 0 0 #00b8d9;
}
.bee-sidebar-admin .bee-sidebar-avatar { background: linear-gradient(135deg, #0ea5e9, #00b8d9); color: #fff; }
.bee-admin-mark { font-size: 15px; }

/* ---- 顶栏：白色毛玻璃 ---- */
.bee-topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 14px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bee-border);
  padding: 13px 24px;
}
.bee-topbar-title { font-size: 17px; font-weight: 700; color: var(--bee-text); }
.bee-topbar-name { font-size: 13px; color: var(--bee-text-muted); }
.bee-topbar-admin { background: rgba(255, 255, 255, .6); }
.bee-badge-admin { background: linear-gradient(135deg, #0ea5e9, #00b8d9); color: #fff; font-weight: 600; }

/* ---- 内容区 ---- */
.bee-content { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 22px 24px; }

@media (min-width: 1600px) {
  .bee-content { max-width: 1480px; padding: 26px 32px; }
  .bee-sidebar { width: 248px; }
}

/* ---- 汉堡按钮 ---- */
.bee-burger { display: none; border: none; background: none; padding: 6px; flex-direction: column; gap: 4px; cursor: pointer; }
.bee-burger span { width: 20px; height: 2px; background: #334155; border-radius: 2px; display: block; }

/* ---- 登录/注册页：拆分式响应式布局 ---- */
.bee-auth-body { background: transparent; min-height: 100vh; }
.bee-auth-wrap { display: flex; min-height: 100vh; width: 100%; }

.bee-auth-wrap > .alert {
  position: fixed; top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 1200; min-width: min(420px, 90vw);
  box-shadow: 0 8px 28px rgba(99, 102, 241, .2);
}

/* 左侧品牌区：明亮极光渐变 */
.bee-auth-hero {
  flex: 0 0 46%;
  background: linear-gradient(150deg, #e4e7ff 0%, #dbeafe 30%, #dcf2ff 68%, #ccfbf1 100%);
  color: #1e293b;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  position: relative; overflow: hidden;
}
.bee-auth-hero::after {
  content: ""; position: absolute;
  width: 620px; height: 620px; right: -190px; top: -190px;
  background: radial-gradient(circle, rgba(0, 184, 217, .28), transparent 62%);
  pointer-events: none;
}
.bee-auth-hero::before {
  content: ""; position: absolute;
  width: 520px; height: 520px; left: -180px; bottom: -180px;
  background: radial-gradient(circle, rgba(139, 123, 255, .28), transparent 60%);
  pointer-events: none;
}
.bee-auth-hero-inner { position: relative; z-index: 1; max-width: 440px; width: 100%; }
.bee-auth-brand { font-size: 20px; font-weight: 800; color: #5b4bd6; margin-bottom: 30px; letter-spacing: 1px; }
.bee-auth-title { font-size: clamp(26px, 3.2vw, 40px); font-weight: 800; line-height: 1.25; margin: 0 0 14px; color: #1e293b; }
.bee-auth-sub { color: #475569; font-size: 15px; margin: 0 0 30px; line-height: 1.7; }
.bee-auth-feats { list-style: none; padding: 0; margin: 0 0 26px; }
.bee-auth-feats li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; color: #334155; font-size: 14px;
  border-top: 1px solid rgba(15, 23, 42, .08);
}
.bee-auth-feats li:first-child { border-top: none; }
.bee-auth-feats li span { flex-shrink: 0; font-size: 16px; }
.bee-auth-foot { color: #64748b; font-size: 13px; }

/* 右侧表单区：透明（透出极光背景） */
.bee-auth-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 32px 24px; background: transparent;
}
.bee-auth-panel-inner { width: 100%; max-width: 440px; }
.bee-auth-logo-m { display: none; text-align: center; color: #5b4bd6; font-weight: 800; font-size: 20px; margin-bottom: 18px; letter-spacing: 1px; }

@media (max-width: 991.98px) {
  .bee-auth-wrap { display: block; }
  .bee-auth-hero { display: none; }
  .bee-auth-panel { padding: 28px 16px; }
  .bee-auth-logo-m { display: block; }
  .bee-auth-panel-inner { max-width: 460px; }
}

/* ---- 卡密档位选择（pill 按钮组） ---- */
.bee-plan-group { display: flex; flex-wrap: wrap; gap: 8px; }
.bee-plan-pill { position: relative; }
.bee-plan-pill input { position: absolute; opacity: 0; pointer-events: none; }
.bee-plan-pill label {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 7px 16px; border-radius: 999px;
  border: 1.5px solid rgba(15, 23, 42, .1); background: rgba(255, 255, 255, .6);
  font-size: 13px; cursor: pointer; margin: 0; color: var(--bee-text);
  transition: all .15s; user-select: none;
}
.bee-plan-pill label:hover { border-color: var(--bee-primary); }
.bee-plan-pill input:checked + label {
  background: linear-gradient(135deg, #6c5ce7, #00b8d9);
  color: #fff; border-color: transparent; font-weight: 700;
  box-shadow: 0 2px 10px rgba(108, 92, 231, .35);
}
.bee-plan-pill small { opacity: .72; font-size: 11px; }
.bee-plan-pill input:checked + label small { opacity: .92; }

/* ---- 移动端适配 ---- */
@media (max-width: 991.98px) {
  .bee-sidebar {
    position: fixed; left: 0; top: 0; z-index: 1050;
    transform: translateX(-100%);
    transition: transform .22s ease;
  }
  .bee-sidebar.open { transform: translateX(0); box-shadow: 0 0 44px rgba(0,0,0,.25); }
  .bee-sidebar-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(15, 23, 42, .35); z-index: 1040;
  }
  .bee-sidebar-backdrop.show { display: block; }
  .bee-burger { display: inline-flex; }
  .bee-topbar { padding: 10px 14px; }
  .bee-topbar-title { font-size: 15px; }
  .bee-content { padding: 14px; }
}

@media (max-width: 576px) {
  .bee-key-val { font-size: 20px; letter-spacing: 2px; }
}

/* ============================================================
   紧凑化 + 全端适配
   ============================================================ */

.bee-content .table { font-size: 13px; }
.bee-content .table > :not(caption) > * > * { padding: .4rem .5rem; }
.bee-content .table thead th { white-space: nowrap; color: #64748b; font-weight: 600; font-size: 12px; }
.bee-content .card > .card-body { padding: 14px 16px; }
.bee-content .card-body h5 { font-size: 15px; margin-bottom: 10px; }
.bee-content .alert { margin-bottom: 10px; }
.bee-content .btn-sm { --bs-btn-padding-y: .18rem; --bs-btn-padding-x: .6rem; font-size: 12px; }
.bee-content .form-control-sm, .bee-content .form-select-sm { font-size: 12px; }
.bee-content .form-label { margin-bottom: .2rem; }
.bee-content hr { margin: 10px 0; opacity: .12; }

.bee-stat { padding: 12px 10px; }
.bee-stat-num { font-size: 21px; }
.bee-stat-label { font-size: 11px; }

.bee-key-box { padding: 12px 14px; }
.bee-key-val { font-size: 21px; letter-spacing: 3px; word-break: break-all; }

.bee-content .row { --bs-gutter-x: 12px; }
.bee-content .row.g-4 { --bs-gutter-y: 14px; }

@media (min-width: 577px) and (max-width: 991.98px) {
  .bee-content { padding: 16px; }
}

@media (max-width: 576px) {
  body { font-size: 13px; }
  .bee-content { padding: 10px; }
  .bee-content .card > .card-body { padding: 11px 12px; }
  .bee-content .card-body h5 { font-size: 14px; }
  .bee-content .table { font-size: 12px; }
  .bee-content .table > :not(caption) > * > * { padding: .32rem .38rem; }
  .bee-content .alert { --bs-alert-padding-y: .45rem; --bs-alert-padding-x: .65rem; }
  .bee-stat { padding: 10px 6px; border-radius: 10px; }
  .bee-stat-num { font-size: 18px; }
  .bee-stat-label { font-size: 10px; }
  .bee-key-box { padding: 10px 12px; }
  .bee-key-val { font-size: 15px; letter-spacing: 1px; }
  .bee-topbar-name { display: none; }
  .bee-topbar { gap: 10px; }
  .bee-footer { padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); }
  .bee-content .btn-sm { --bs-btn-padding-y: .22rem; --bs-btn-padding-x: .55rem; }
  .bee-content form.d-flex { flex-wrap: wrap; }
  .bee-content form.d-flex .form-control,
  .bee-content form.d-flex .form-select { width: auto !important; flex: 1 1 130px; min-width: 0; }
  .bee-content form.d-flex .btn { flex-shrink: 0; }
  .nav-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-tabs .nav-link { white-space: nowrap; }
}

/* ============ 表格浅色增强 ============ */
.bee-content .table tbody tr:nth-child(even) { background: rgba(15, 23, 42, .02); }
.bee-content .table tbody tr:hover { background: rgba(108, 92, 231, .06); }
.bee-content .table thead th {
  background: rgba(139, 123, 255, .06);
  color: #5b4bd6;
  border-bottom: 1px solid rgba(108, 92, 231, .25);
}

/* ============ 表单 focus ============ */
.form-control:focus,
.form-select:focus {
  border-color: var(--bee-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, .14);
}

/* ============ 点击复制 ============ */
.bee-copy {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px dashed transparent;
  transition: background .15s, border-color .15s;
  user-select: none;
}
.bee-copy:hover {
  background: rgba(16, 185, 129, .1);
  border-color: rgba(16, 185, 129, .4);
  color: #059669;
}
.bee-copy:active { background: rgba(16, 185, 129, .18); }

/* ============ 可折叠说明组件 ============ */
.bee-hint {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .45);
}
.bee-hint summary {
  cursor: pointer;
  padding: 7px 12px;
  font-size: 12.5px;
  color: #64748b;
  user-select: none;
  list-style: none;
  display: flex; align-items: center; gap: 5px;
}
.bee-hint summary::-webkit-details-marker { display: none; }
.bee-hint summary::after {
  content: '▾'; margin-left: auto;
  color: #b6bcc8; font-size: 11px; transition: transform .15s;
}
.bee-hint[open] summary::after { content: '▴'; }
.bee-hint summary:hover { color: #334155; }
.bee-hint .bee-hint-body {
  padding: 2px 12px 12px;
  font-size: 12.5px; line-height: 1.8;
  color: #64748b;
  border-top: 1px dashed rgba(15, 23, 42, .08);
}
.bee-hint .bee-hint-body b { color: #334155; }

/* ============ 接入文档代码块 ============ */
.bee-pre {
  background: rgba(15, 23, 42, .04);
  border: 1px solid var(--bee-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px; line-height: 1.65;
  color: #334155;
  overflow-x: auto;
}

/* ============ CodeMirror 浅色适配 ============ */
.CodeMirror {
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 6px;
  font-size: 12.5px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  line-height: 1.6;
  height: auto; min-height: 220px;
  background: #ffffff;
  color: #1e293b;
}
.CodeMirror-focused {
  border-color: var(--bee-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, .12);
}
.CodeMirror-scroll { min-height: 220px; }
.CodeMirror-gutters { background: #f8fafc; border-right: 1px solid rgba(15, 23, 42, .08); }
.dropdown-menu .dropdown-item.small { padding: 4px 12px; font-size: 12.5px; }

/* ============ Toast 动画 ============ */
.bee-toast { animation: beeToastIn .3s ease; }
@keyframes beeToastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.bee-toast.hiding { animation: beeToastOut .3s ease forwards; }
@keyframes beeToastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* ============ 变量选择器 ============ */
.var-picker-wrap { position: relative; display: inline-block; margin-top: 6px; }
.var-picker-btn {
  padding: 4px 10px; font-size: 12px;
  color: #5b4bd6;
  background: rgba(108, 92, 231, .07);
  border: 1px solid rgba(108, 92, 231, .25);
  border-radius: 4px; cursor: pointer; transition: all 0.15s;
}
.var-picker-btn:hover { background: rgba(108, 92, 231, .14); color: #4c3dd6; }
.var-picker-dropdown {
  display: none; position: absolute; top: 100%; left: 0; z-index: 1000;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, .16);
  padding: 8px 0; min-width: 280px; max-height: 300px; overflow-y: auto;
}
.var-picker-dropdown.show { display: block; }
.var-picker-category {
  padding: 6px 14px; font-size: 11px; font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.var-picker-item {
  padding: 6px 14px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: background 0.1s;
}
.var-picker-item:hover { background: rgba(108, 92, 231, .07); }
.var-picker-item code {
  background: rgba(108, 92, 231, .1);
  color: #5b4bd6;
  padding: 2px 6px; border-radius: 3px; font-size: 12px;
}
.var-picker-item .var-desc { color: #94a3b8; font-size: 11px; }

/* ============ Bootstrap 浅色微调 ============ */
.card { background: var(--bee-glass-bg); border: 1px solid var(--bee-glass-border); border-radius: var(--bee-card-radius); }
.card-header, .card-footer { background: rgba(255, 255, 255, .4); border-color: var(--bee-border); }
.nav-tabs { border-bottom-color: var(--bee-border); }
.nav-tabs .nav-link.active { background: rgba(255, 255, 255, .7); border-color: var(--bee-border); color: #5b4bd6; }
.nav-tabs .nav-link { color: #64748b; }
.nav-tabs .nav-link:hover { color: #1e293b; }
.badge { font-weight: 500; }
.text-muted { color: var(--bee-text-muted) !important; }
.modal-content { background: rgba(255, 255, 255, .96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--bee-border); }

/* ============================================================
   移动端全端适配（补齐搜索表单 / 表格滚动 / 触摸体验）
   ============================================================ */

/* ---- 表格容器：平滑滚动 + 移动端滚动提示 ---- */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
/* 给宽表格一个右侧渐隐提示，暗示可横向滑动 */
@media (max-width: 991.98px) {
  .bee-content .table-responsive {
    position: relative;
    border-radius: 8px;
  }
}

/* ---- 搜索/筛选表单：窄屏忽略内联固定宽度，自适应等分换行 ---- */
@media (max-width: 767.98px) {
  .bee-content form.d-flex,
  .bee-content .d-flex.gap-2:has(> .form-control),
  .bee-content .d-flex.gap-2:has(> .form-select) {
    flex-wrap: wrap;
  }
  /* 覆盖页面里 style="width:XXXpx" 的内联固定宽度 */
  .bee-content form.d-flex .form-control,
  .bee-content form.d-flex .form-select,
  .bee-content .d-flex.gap-2 > .form-control,
  .bee-content .d-flex.gap-2 > .form-select {
    width: auto !important;
    flex: 1 1 160px;
    min-width: 0;
    max-width: 100%;
  }
  .bee-content form.d-flex .btn,
  .bee-content .d-flex.gap-2 > .btn {
    flex-shrink: 0;
  }
  /* 模态框内的固定宽度输入控件也改为自适应换行 */
  .modal-body .d-flex.gap-2 .form-control,
  .modal-body .d-flex.gap-2 .form-select {
    width: auto !important;
    flex: 1 1 130px;
    min-width: 0;
    max-width: 100%;
  }
  .modal-body .d-flex.gap-2 { flex-wrap: wrap; }
  /* 指令大全搜索框等 min-width 容器在窄屏占满 */
  .bee-content .d-flex[style*="min-width"] {
    min-width: 0 !important;
    flex: 1 1 100% !important;
  }
}

/* ---- 窄屏：表单提交/主按钮全宽，便于点按 ---- */
@media (max-width: 575.98px) {
  .bee-content .card-body > form > button[type="submit"].bee-btn-primary,
  .bee-content form > button[type="submit"].bee-btn-primary:last-child {
    width: 100%;
  }
  /* 顶栏标题超长省略 */
  .bee-topbar-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  /* 统计块在极窄屏两列仍偏挤时收内边距 */
  .bee-stat { padding: 9px 4px; }
  /* 模态框留出安全边距，避免贴边 */
  .modal-dialog { margin: .5rem; }
  .modal-content { border-radius: 12px; }
}

/* ---- 触摸设备：禁用 hover 位移（避免粘滞/跳动） ---- */
@media (hover: none) {
  .bee-card:hover,
  .bee-stat:hover,
  .flow-card:hover {
    transform: none;
    box-shadow: var(--bee-shadow);
  }
  .bee-btn-primary:hover { transform: none; }
}

/* ---- 表格操作按钮组：窄屏更紧凑，避免换行撑高 ---- */
@media (max-width: 991.98px) {
  .bee-content .table td .d-flex.gap-1,
  .bee-content .table td .d-flex.flex-wrap {
    gap: 4px !important;
  }
  .bee-content .table .btn-sm {
    --bs-btn-padding-y: .16rem;
    --bs-btn-padding-x: .5rem;
    font-size: 11.5px;
  }
}
