/* ==========================================================================
   腾龙发科 AI 元宇宙 · V61 前端通用组件样式  fe61-core.css
   供 V61 各前端升级页复用：KPI 卡 / 标签页 / 数据表 / 条形 / 迷你折线 / 徽标 /
   模态框 / 时间轴 / 热力图 / 步骤条。前缀 fe61- ，深色玻璃科技风，零依赖。
   ========================================================================== */

.fe61-wrap { color: #d7e3ff; }
.fe61-wrap * { box-sizing: border-box; }

.fe61-grid { display: grid; gap: 14px; }
.fe61-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fe61-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fe61-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fe61-g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fe61-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.fe61-card {
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(28, 36, 70, .82), rgba(14, 19, 42, .82));
  border: 1px solid rgba(96, 150, 255, .20);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .30);
}
.fe61-card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.fe61-card-hd h3 { margin: 0; font-size: 15px; color: #eaf1ff; font-weight: 600; }
.fe61-card-hd .fe61-sub { font-size: 12px; color: #8fa0c8; }

.fe61-kpi {
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(34, 44, 88, .9), rgba(16, 22, 48, .9));
  border: 1px solid rgba(96, 150, 255, .20);
  position: relative;
  overflow: hidden;
}
.fe61-kpi::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 140, 255, .35), transparent 70%);
}
.fe61-kpi .fe61-kv { font-size: 26px; font-weight: 700; color: #fff; line-height: 1.1; }
.fe61-kpi .fe61-kl { margin-top: 6px; font-size: 12.5px; color: #93a4cc; }
.fe61-kpi .fe61-kd { margin-top: 4px; font-size: 11.5px; color: #34d399; }
.fe61-kpi.up .fe61-kv { color: #5eead4; }
.fe61-kpi.warm .fe61-kv { color: #fbbf24; }
.fe61-kpi.hot .fe61-kv { color: #fb7185; }

.fe61-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(10, 14, 32, .6);
  border: 1px solid rgba(96, 150, 255, .16);
}
.fe61-tab {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13px;
  color: #a9b7d8;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: .18s;
  white-space: nowrap;
}
.fe61-tab:hover { color: #fff; background: rgba(91, 140, 255, .14); }
.fe61-tab.on {
  color: #fff;
  background: linear-gradient(135deg, rgba(91, 140, 255, .34), rgba(160, 107, 255, .30));
  border-color: rgba(140, 180, 255, .45);
}

.fe61-panel { display: none; }
.fe61-panel.on { display: block; }

.fe61-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid rgba(96, 150, 255, .28);
  background: rgba(91, 140, 255, .14);
  color: #dbe6ff;
  font-size: 13px;
  cursor: pointer;
  transition: .18s;
  text-decoration: none;
}
.fe61-btn:hover { background: rgba(91, 140, 255, .26); border-color: rgba(140, 180, 255, .55); }
.fe61-btn.pri { background: linear-gradient(135deg, #5b8cff, #a06bff); border: none; color: #fff; font-weight: 600; }
.fe61-btn.pri:hover { box-shadow: 0 8px 24px rgba(91, 140, 255, .40); }
.fe61-btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }

.fe61-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fe61-table th, .fe61-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(96, 150, 255, .12); }
.fe61-table th { color: #8fa0c8; font-weight: 500; font-size: 12px; white-space: nowrap; }
.fe61-table td { color: #cfdaf5; }
.fe61-table tr:hover td { background: rgba(91, 140, 255, .07); }
.fe61-table .num { color: #5eead4; font-variant-numeric: tabular-nums; }

.fe61-bar { height: 8px; border-radius: 5px; background: rgba(148, 163, 184, .16); overflow: hidden; }
.fe61-bar > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #5b8cff, #22d3ee); }
.fe61-bar.w0 > i { width: 0; } .fe61-bar.w1 > i { width: 10%; } .fe61-bar.w2 > i { width: 20%; }
.fe61-bar.w3 > i { width: 30%; } .fe61-bar.w4 > i { width: 40%; } .fe61-bar.w5 > i { width: 50%; }
.fe61-bar.w6 > i { width: 60%; } .fe61-bar.w7 > i { width: 70%; } .fe61-bar.w8 > i { width: 80%; }
.fe61-bar.w9 > i { width: 90%; } .fe61-bar.w10 > i { width: 100%; }

.fe61-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  background: rgba(91, 140, 255, .14);
  color: #b9c9ff;
  border: 1px solid rgba(96, 150, 255, .22);
}
.fe61-chip.ok { background: rgba(52, 211, 153, .15); color: #6ee7b7; border-color: rgba(52, 211, 153, .3); }
.fe61-chip.warn { background: rgba(251, 191, 36, .15); color: #fcd34d; border-color: rgba(251, 191, 36, .3); }
.fe61-chip.err { background: rgba(251, 113, 133, .15); color: #fda4af; border-color: rgba(251, 113, 133, .3); }
.fe61-chip.new { background: linear-gradient(135deg, #5b8cff, #a06bff); color: #fff; border: none; }

.fe61-spark { width: 100%; height: 54px; display: block; }
.fe61-spark polyline { fill: none; stroke: #22d3ee; stroke-width: 2; }
.fe61-spark .area { fill: rgba(34, 211, 238, .14); stroke: none; }

.fe61-heat { display: grid; gap: 3px; }
.fe61-heat span { width: 14px; height: 14px; border-radius: 3px; background: rgba(148, 163, 184, .14); }
.fe61-heat .h1 { background: rgba(91, 140, 255, .30); } .fe61-heat .h2 { background: rgba(91, 140, 255, .55); }
.fe61-heat .h3 { background: rgba(34, 211, 238, .72); } .fe61-heat .h4 { background: #22d3ee; }

.fe61-step { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fe61-step i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-style: normal;
  background: rgba(148, 163, 184, .18); color: #a9b7d8;
}
.fe61-step.on i { background: linear-gradient(135deg, #5b8cff, #a06bff); color: #fff; }
.fe61-step span { font-size: 12.5px; color: #93a4cc; }

.fe61-tl { position: relative; padding-left: 18px; }
.fe61-tl::before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: rgba(96, 150, 255, .22); }
.fe61-tl div { position: relative; padding: 6px 0; font-size: 13px; color: #cfdaf5; }
.fe61-tl div::before { content: ''; position: absolute; left: -17px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: #5b8cff; box-shadow: 0 0 0 3px rgba(91, 140, 255, .18); }

.fe61-mask { position: fixed; inset: 0; background: rgba(4, 7, 18, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.fe61-modal { width: 520px; max-width: 100%; max-height: 84vh; overflow: auto; border-radius: 16px; background: linear-gradient(160deg, #1b2346, #10152e); border: 1px solid rgba(96, 150, 255, .28); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.fe61-modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid rgba(96, 150, 255, .16); }
.fe61-modal-hd h3 { margin: 0; font-size: 16px; color: #fff; }
.fe61-modal-hd button { border: none; background: transparent; color: #93a4cc; font-size: 20px; cursor: pointer; line-height: 1; }
.fe61-modal-bd { padding: 18px 20px; color: #cfdaf5; font-size: 13.5px; }
.fe61-modal-ft { padding: 14px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid rgba(96, 150, 255, .16); }

.fe61-toast {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%);
  padding: 11px 22px; border-radius: 10px; font-size: 13.5px; color: #fff; z-index: 1500;
  background: rgba(59, 130, 246, .96); box-shadow: 0 12px 36px rgba(0, 0, 0, .45);
  transition: opacity .25s; max-width: 84vw; text-align: center;
}
.fe61-toast.ok { background: rgba(16, 185, 129, .96); }
.fe61-toast.err { background: rgba(239, 68, 68, .96); }

.fe61-tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px;
  background: rgba(148, 163, 184, .16); color: #b6c3e0;
}

/* 表单控件 */
.fe61-inp {
  width: 100%; height: 36px; margin-top: 6px; padding: 0 12px;
  border-radius: 9px; background: rgba(9, 13, 30, .72);
  border: 1px solid rgba(96, 150, 255, .24); color: #dbe6ff;
  font-size: 13px; font-family: inherit; outline: none; transition: .18s;
}
.fe61-inp:focus { border-color: rgba(140, 180, 255, .62); box-shadow: 0 0 0 3px rgba(91, 140, 255, .14); }
.fe61-inp::placeholder { color: #6d7ea6; }
textarea.fe61-inp { height: auto; min-height: 84px; padding: 10px 12px; line-height: 1.65; resize: vertical; }
select.fe61-inp { cursor: pointer; }
select.fe61-inp option { background: #141b3a; color: #dbe6ff; }
.fe61-inp[type="range"] { height: 26px; padding: 0; background: transparent; border: none; accent-color: #5b8cff; }
.fe61-inp[type="checkbox"] { width: auto; height: auto; margin: 0; accent-color: #5b8cff; }
.fe61-sub label, label.fe61-sub { font-size: 12.5px; color: #93a4cc; }

/* 条形图行（替代内联样式） */
.fe61-barrow { margin-bottom: 12px; }
.fe61-barhd { display: flex; justify-content: space-between; font-size: 12.5px; color: #a9b7d8; margin-bottom: 5px; }

/* 标签容器 / 弹窗关闭按钮 */
.fe61-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fe61-chips .fe61-chip { cursor: pointer; transition: .16s; }
.fe61-chips .fe61-chip:hover { background: rgba(91, 140, 255, .28); color: #eaf1ff; }
.fe61-chips .fe61-chip.ok:hover { background: rgba(52, 211, 153, .3); }
.fe61-x {
  background: none; border: none; padding: 0 4px; cursor: pointer;
  color: #93a4cc; font-size: 20px; line-height: 1; transition: .16s;
}
.fe61-x:hover { color: #fff; }

.fe61-soon { opacity: .55; }

@media (max-width: 1024px) {
  .fe61-g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fe61-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .fe61-g2, .fe61-g3, .fe61-g4, .fe61-g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fe61-kpi .fe61-kv { font-size: 21px; }
}
@media (max-width: 480px) {
  .fe61-g2, .fe61-g3, .fe61-g4, .fe61-g5, .fe61-auto { grid-template-columns: 1fr; }
}

/* ---------------- 共享对话组件（数字人弹幕 / 智能体调试，多页复用） ---------------- */
.dh61-chat {
  height: 300px; overflow-y: auto; padding: 12px 14px; border-radius: 12px;
  background: rgba(6, 10, 24, .72); border: 1px solid rgba(96, 150, 255, .18);
  display: flex; flex-direction: column; gap: 8px;
}
.dh61-chat::-webkit-scrollbar { width: 6px; }
.dh61-chat::-webkit-scrollbar-thumb { background: rgba(91, 140, 255, .4); border-radius: 4px; }
.dh61-msg {
  padding: 8px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.7; color: #cfdaf5;
  background: rgba(30, 40, 78, .62); border: 1px solid rgba(96, 150, 255, .14); word-break: break-word;
}
.dh61-msg b { color: #7dd3fc; }
.dh61-msg.me { background: rgba(91, 140, 255, .2); border-color: rgba(91, 140, 255, .34); align-self: flex-end; }
.dh61-msg.me b { color: #a5f3fc; }
.dh61-inp { display: flex; gap: 10px; margin-top: 12px; }
.dh61-inp input {
  flex: 1; height: 38px; padding: 0 14px; border-radius: 10px;
  background: rgba(9, 13, 30, .72); border: 1px solid rgba(96, 150, 255, .24);
  color: #dbe6ff; font-size: 13px; font-family: inherit; outline: none;
}
.dh61-inp input:focus { border-color: rgba(140, 180, 255, .62); }
.dh61-inp input::placeholder { color: #6d7ea6; }
.dh61-inp .fe61-btn { height: 38px; }

/* 弹窗按钮统一最小宽度 */
.fe61-ok, .fe61-cancel { min-width: 74px; justify-content: center; }
