/* ============================================================
   域链仓 · 大厂级深蓝科技风管理后台主题
   参考：大厂可视化大屏（金属边框、玻璃质感、数字翻牌、SVG图表、实时时间）
   ============================================================ */

/* ---------- 全局基础：锁外层滚动，内部自适应 + 单滚动条 ---------- */
html, body { height: 100%; }
body.dash-dark {
  position: fixed; inset: 0;     /* 锁屏，body 不参与滚动 */
  display: flex; flex-direction: column;
  background:
    radial-gradient(circle at 20% 10%, rgba(56, 189, 248, .12) 0, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(99, 102, 241, .12) 0, transparent 40%),
    linear-gradient(180deg, #020617 0, #0a1426 60%, #0d1b3a 100%);
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  overflow: hidden;             /* 禁止双滚动条 */
}
/* admin-layout 占满 body 剩余高度且内部 flex 排版（登录后 JS 设置 display:flex 生效，未登录时 HTML 内联 display:none 遮挡后台） */
body.dash-dark #adminPage { display: flex; flex: 1; min-height: 0; flex-direction: column; }
body.dash-dark .admin-layout {
  flex: 1; min-height: 0;
  display: flex; width: 100%; max-width: none;
  margin: 0; background: transparent;
  overflow: hidden;
  grid-template-columns: none;
  height: 100%;
}

/* ---------- 顶部品牌栏（金属边框 + 标题 + 装饰能量条） ---------- */
.dash-header {
  position: relative;
  flex: 0 0 76px;             /* flex item 固定高度 */
  width: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, .95) 0, rgba(15, 23, 42, .85) 100%);
  border-bottom: 1px solid rgba(56, 189, 248, .35);
  box-shadow: 0 4px 24px rgba(2, 132, 199, .2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 50;
  flex-shrink: 0;
}
.dash-header::before, .dash-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, #6366f1, #38bdf8, transparent);
  filter: blur(1px);
  animation: dashEnergyBar 6s linear infinite;
}
.dash-header::before { left: 0; right: 50%; }
.dash-header::after { right: 0; left: 50%; animation-delay: 3s; }
@keyframes dashEnergyBar {
  0%   { transform: translateX(-30%); opacity: .6; }
  50%  { opacity: 1; }
  100% { transform: translateX(30%);  opacity: .6; }
}
.dash-header-title {
  display: flex; align-items: center; gap: 14px;
  font-size: 22px; font-weight: 800; letter-spacing: 2px;
  color: #e0f2fe;
  background: linear-gradient(90deg, #7dd3fc, #38bdf8 40%, #818cf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dash-header-title .icon-hex {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  border-radius: 8px; display: grid; place-items: center;
  font-size: 20px; -webkit-text-fill-color: initial;
  box-shadow: 0 0 16px rgba(56, 189, 248, .55);
}
.dash-header-meta {
  display: flex; align-items: center; gap: 20px;
  font-size: 13px; color: #94a3b8;
}
.dash-header-meta .meta-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: rgba(15, 23, 42, .6);
  border: 1px solid rgba(56, 189, 248, .3);
  border-radius: 18px;
}
.dash-header-meta .meta-item b { color: #e0f2fe; font-weight: 700; }
.dash-clock {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 18px; font-weight: 700; color: #7dd3fc;
  letter-spacing: 1px;
}
.dash-clock small { color: #64748b; font-size: 11px; margin-left: 6px; }

/* ---------- 侧边栏分组菜单 ---------- */
.dash-sidebar {
  width: 240px;
  flex: 0 0 240px;           /* 固定宽度 flex item */
  background: linear-gradient(180deg, rgba(15, 23, 42, .85), rgba(7, 14, 30, .95));
  border-right: 1px solid rgba(56, 189, 248, .25);
  padding: 14px 0 24px;
  overflow-y: auto; overflow-x: hidden;
  height: 100%; min-height: 0;     /* 充满父容器高度 */
  position: static;
  top: auto;
}
.dash-sidebar::-webkit-scrollbar { width: 6px; }
.dash-sidebar::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, .3); border-radius: 3px; }
/* 分组标题 sticky 顶部（滚动时保持可见） */
.dash-sidebar .dash-sidebar-group {
  position: sticky; top: 0;
  background: linear-gradient(180deg, rgba(7, 14, 30, .98), rgba(7, 14, 30, .92));
  backdrop-filter: blur(6px);
  z-index: 2;
  padding: 8px 20px;
  margin: 0 0 6px;
}
.dash-sidebar-group {
  margin: 8px 0 6px;
  padding: 6px 20px 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: #64748b;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.dash-sidebar-group::before { content: '▎'; color: #38bdf8; }
.dash-nav {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; margin: 2px 8px;
  font-size: 14px; color: #cbd5e1; cursor: pointer;
  border-radius: 10px;
  position: relative;
  transition: all .2s;
}
.dash-nav:hover { background: rgba(56, 189, 248, .12); color: #e0f2fe; transform: translateX(2px); }
.dash-nav.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, .25), rgba(99, 102, 241, .15));
  color: #fff;
  border-left: 3px solid #38bdf8;
  box-shadow: inset 0 0 12px rgba(56, 189, 248, .2);
}
.dash-nav .icon { font-size: 16px; }
.dash-nav.logout { color: #fca5a5; margin-top: 24px; border-top: 1px solid rgba(248, 113, 113, .2); padding-top: 16px; }
.dash-nav.logout:hover { background: rgba(248, 113, 113, .12); color: #fee2e2; }

/* ---------- 主区 ---------- */
.dash-main {
  flex: 1; min-height: 0;          /* 关键：占满剩余、内部独立滚动 */
  margin-left: 0;
  padding: 14px 28px 80px;        /* 减少顶部 padding，给内容更多空间 */
  overflow-y: auto; overflow-x: hidden;
  height: 100%;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, .3) transparent;
}
.dash-main::-webkit-scrollbar { width: 10px; }
.dash-main::-webkit-scrollbar-track { background: transparent; }
.dash-main::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, .3); border-radius: 5px; }
.dash-main::-webkit-scrollbar-thumb:hover { background: rgba(56, 189, 248, .5); }
.dash-section { display: none; }
.dash-section.active { display: block; animation: dashFade .4s ease; }
@keyframes dashFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dash-page-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(56, 189, 248, .25);
  padding-bottom: 8px;
}
.dash-page-title h2 {
  margin: 0; font-size: 20px; font-weight: 800; color: #f0f9ff;
  background: linear-gradient(90deg, #7dd3fc, #38bdf8 50%, #818cf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dash-page-title .crumb { font-size: 12px; color: #64748b; }
.dash-page-title .crumb a { color: #38bdf8; text-decoration: none; }

/* ---------- 数据大屏卡片 ---------- */
.dash-cards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.dash-card {
  position: relative;
  padding: 18px 18px 16px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .85), rgba(30, 41, 59, .6));
  border: 1px solid rgba(56, 189, 248, .25);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: all .3s;
}
.dash-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--c1, #38bdf8), var(--c2, #6366f1));
}
.dash-card:hover { transform: translateY(-3px); border-color: rgba(56, 189, 248, .5); box-shadow: 0 8px 24px rgba(2, 132, 199, .25); }
.dash-card .label { font-size: 12.5px; color: #94a3b8; letter-spacing: 1px; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.dash-card .value {
  font-size: 30px; font-weight: 800;
  background: linear-gradient(180deg, #fff 0, #93c5fd 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-family: 'Consolas', monospace;
  letter-spacing: 1px;
  line-height: 1.2;
}
.dash-card .value small { font-size: 14px; font-weight: 500; color: #64748b; margin-left: 4px; }
.dash-card .delta { font-size: 12px; margin-top: 6px; }
.dash-card .delta.up { color: #34d399; }
.dash-card .delta.down { color: #fb7185; }
.dash-card .icon-big {
  position: absolute; right: -6px; bottom: -10px;
  font-size: 60px; opacity: .12;
  filter: drop-shadow(0 0 8px var(--c1, #38bdf8));
}

/* 顶部 5 卡（核心指标，渐变描边突出） */
.dash-hero {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 16px;
}
.dash-hero .dash-card { padding: 20px 16px; }
.dash-hero .dash-card .value { font-size: 34px; }

/* ---------- 图表区 ---------- */
.dash-grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 980px) { .dash-grid-2 { grid-template-columns: 1fr; } }
.dash-grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1100px) { .dash-grid-3 { grid-template-columns: 1fr; } }

.dash-panel {
  background: linear-gradient(135deg, rgba(15, 23, 42, .8), rgba(7, 14, 30, .65));
  border: 1px solid rgba(56, 189, 248, .25);
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.dash-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #38bdf8, #6366f1, transparent);
}
.dash-panel .panel-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 700; color: #e0f2fe;
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(56, 189, 248, .2);
  padding-bottom: 8px;
}
.dash-panel .panel-title .tag {
  font-size: 11px; padding: 2px 8px;
  background: rgba(56, 189, 248, .15); color: #7dd3fc;
  border-radius: 10px; font-weight: 500;
}
.dash-svg-chart { width: 100%; height: 220px; }
.dash-svg-chart.h220 { height: 220px; }
.dash-svg-chart.h160 { height: 160px; }

/* 实时滚动条目 */
.dash-live-list { max-height: 220px; overflow-y: auto; padding-right: 4px; }
.dash-live-list::-webkit-scrollbar { width: 4px; }
.dash-live-list::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, .3); border-radius: 4px; }
.dash-live-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px dashed rgba(56, 189, 248, .15);
  font-size: 12.5px;
  animation: dashLiveIn .4s ease;
}
@keyframes dashLiveIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.dash-live-item .who { color: #e0f2fe; font-weight: 600; }
.dash-live-item .time { color: #64748b; font-size: 11px; }
.dash-live-item .amount { font-family: 'Consolas', monospace; color: #34d399; font-weight: 700; }
.dash-live-item .amount.warn { color: #fb7185; }

/* ---------- 翻牌器（核心大数字） ---------- */
.dash-flip-num {
  display: inline-flex; gap: 4px; align-items: center;
  font-family: 'Consolas', 'Monaco', monospace;
}
.dash-flip-num .digit {
  display: inline-block; min-width: 26px; padding: 4px 6px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .9), rgba(2, 6, 23, .95));
  border: 1px solid rgba(56, 189, 248, .4);
  border-radius: 6px;
  font-size: 28px; font-weight: 800; color: #f0f9ff;
  text-align: center;
  box-shadow: inset 0 0 8px rgba(56, 189, 248, .2), 0 2px 8px rgba(0, 0, 0, .4);
  animation: dashFlipIn .5s ease;
}
@keyframes dashFlipIn { from { transform: rotateX(-90deg); opacity: 0; } to { transform: rotateX(0); opacity: 1; } }

/* ---------- 通用组件深色化（覆盖原 styles.css 的浅色组件） ---------- */
.dash-section .admin-card, .dash-section .form-row, .dash-section .btn,
.dash-section input, .dash-section select, .dash-section textarea {
  font-family: inherit;
}
.dash-section .admin-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, .85), rgba(7, 14, 30, .65)) !important;
  border: 1px solid rgba(56, 189, 248, .25) !important;
  color: #e2e8f0 !important;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.dash-section .admin-card h3 { color: #f0f9ff; border-bottom: 1px dashed rgba(56, 189, 248, .25); padding-bottom: 10px; }
.dash-section .admin-card p { color: #cbd5e1 !important; }
.dash-section .form-row label { color: #94a3b8 !important; }
.dash-section input, .dash-section select, .dash-section textarea,
.dash-section .admin-card input, .dash-section .admin-card select, .dash-section .admin-card textarea {
  background: rgba(2, 6, 23, .7) !important;
  border: 1px solid rgba(56, 189, 248, .25) !important;
  color: #e0f2fe !important;
  border-radius: 8px;
  padding: 9px 12px;
}
.dash-section input::placeholder, .dash-section textarea::placeholder {
  color: #64748b !important;
  opacity: 1;
}
.dash-section input:focus, .dash-section select:focus, .dash-section textarea:focus {
  border-color: #38bdf8 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .15);
}
.dash-section select option { background: #0f172a; color: #e0f2fe; }
.dash-section select {
  background-image: linear-gradient(45deg, transparent 50%, #7dd3fc 50%), linear-gradient(135deg, #7dd3fc 50%, transparent 50%) !important;
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px) !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px !important;
}
/* 黄色提示块（兼容旧 styles.css 的 .notice/alerts/yellow 背景） */
.dash-section .notice, .dash-section .alert, .dash-section .warning,
.dash-section [style*="background:#fef3c7"], .dash-section [style*="background:#fefce8"], .dash-section [style*="background:#fef2f2"], .dash-section [style*="background:#fff7ed"], .dash-section [style*="background:#f8fafc"], .dash-section [style*="background:#f1f5f9"], .dash-section [style*="background:#fff"] {
  background: rgba(56, 189, 248, .08) !important;
  border-color: rgba(56, 189, 248, .25) !important;
  color: #e0f2fe !important;
}
.dash-section [style*="background:#fef3c7"] { background: rgba(250, 204, 21, .12) !important; border-color: rgba(250, 204, 21, .35) !important; color: #facc15 !important; }
.dash-section [style*="background:#facc15"] { background: rgba(250, 204, 21, .12) !important; border-color: rgba(250, 204, 21, .35) !important; color: #facc15 !important; }
.dash-section [style*="background:#fefce8"], .dash-section [style*="background:#fef9c3"] { background: rgba(250, 204, 21, .12) !important; color: #facc15 !important; }
.dash-section [style*="background:#fef2f2"] { background: rgba(251, 113, 133, .12) !important; border-color: rgba(251, 113, 133, .35) !important; color: #fca5a5 !important; }
.dash-section [style*="background:#fee2e2"], .dash-section [style*="background:#fecaca"] { background: rgba(251, 113, 133, .12) !important; color: #fca5a5 !important; }
.dash-section [style*="background:#dbeafe"], .dash-section [style*="background:#eff6ff"] { background: rgba(56, 189, 248, .1) !important; color: #7dd3fc !important; }
.dash-section [style*="background:#f0fdf4"], .dash-section [style*="background:#dcfce7"], .dash-section [style*="background:#bbf7d0"] { background: rgba(52, 211, 153, .12) !important; color: #34d399 !important; }
.dash-section [style*="background:#f8fafc"], .dash-section [style*="background:#f1f5f9"], .dash-section [style*="background:#fafafa"] { background: rgba(15, 23, 42, .55) !important; color: #e2e8f0 !important; }
.dash-section [style*="background:#fff"], .dash-section [style*="background:#ffffff"] { background: rgba(15, 23, 42, .65) !important; color: #e2e8f0 !important; }
.dash-section [style*="color:#b91c1c"] { color: #fca5a5 !important; }
.dash-section [style*="color:#92400e"], .dash-section [style*="color:#a16207"] { color: #facc15 !important; }
.dash-section [style*="color:#94a3b8"] { color: #cbd5e1 !important; }
.dash-section [style*="color:#64748b"] { color: #94a3b8 !important; }
.dash-section [style*="color:#334155"], .dash-section [style*="color:#475569"], .dash-section [style*="color:#1e293b"] { color: #cbd5e1 !important; }
.dash-section [style*="color:#dc2626"] { color: #fb7185 !important; }
.dash-section [style*="color:#2563eb"], .dash-section [style*="color:#1d4ed8"] { color: #7dd3fc !important; }
.dash-section [style*="color:#16a34a"], .dash-section [style*="color:#15803d"] { color: #34d399 !important; }

.dash-section .btn-blue { background: linear-gradient(135deg, #38bdf8, #6366f1); border: none; color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 600; }
.dash-section .btn-green { background: linear-gradient(135deg, #34d399, #38bdf8); border: none; color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 600; }
.dash-section .btn-red { background: linear-gradient(135deg, #fb7185, #f59e0b); border: none; color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 600; }
.dash-section .btn-light { background: rgba(15, 23, 42, .6); border: 1px solid rgba(56, 189, 248, .25); color: #cbd5e1; padding: 9px 16px; border-radius: 8px; }
.dash-section .btn { cursor: pointer; transition: all .2s; }
.dash-section .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(56, 189, 248, .25); }
.dash-section table { color: #e2e8f0; width: 100%; }
.dash-section table th {
  background: linear-gradient(180deg, rgba(56, 189, 248, .12), rgba(56, 189, 248, .06)) !important;
  color: #cbd5e1 !important;
  padding: 10px 12px !important;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid rgba(56, 189, 248, .25) !important;
}
.dash-section table td {
  border-color: rgba(56, 189, 248, .15) !important;
  padding: 10px 12px !important;
  color: #e2e8f0;
}
.dash-section table tr:hover td { background: rgba(56, 189, 248, .05); }
.dash-section .badge { font-weight: 700; padding: 3px 8px; border-radius: 6px; font-size: 11.5px; display: inline-block; }
.dash-section .badge.green { background: rgba(52, 211, 153, .15); color: #34d399; border: 1px solid rgba(52, 211, 153, .3); }
.dash-section .badge.red { background: rgba(251, 113, 133, .15); color: #fb7185; border: 1px solid rgba(251, 113, 133, .3); }
.dash-section .badge.yellow { background: rgba(250, 204, 21, .15); color: #facc15; border: 1px solid rgba(250, 204, 21, .3); }
.dash-section .badge.blue { background: rgba(56, 189, 248, .15); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, .3); }
.dash-section .badge.gray { background: rgba(148, 163, 184, .15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, .3); }
.dash-section a { color: #7dd3fc; }
.dash-section a:hover { color: #38bdf8; text-decoration: underline; }
.dash-section p, .dash-section li { color: #cbd5e1; }
.dash-section hr { border-color: rgba(56, 189, 248, .15); }
.dash-section .table-wrap { overflow-x: auto; border-radius: 10px; }
.dash-section .table-wrap::-webkit-scrollbar { height: 6px; }
.dash-section .table-wrap::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, .3); border-radius: 3px; }

/* panel 标题点击（实时客户对话 / 实时事件流） */
.dash-section .dash-panel .panel-title.clickable { cursor: pointer; user-select: none; }
.dash-section .dash-panel .panel-title.clickable:hover { color: #7dd3fc; }
.dash-section .dash-panel .panel-title .pulse-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #fb7185; margin-right: 6px;
  animation: pulseDot 1.4s infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); box-shadow: 0 0 8px #fb7185; } }
.dash-live-item { cursor: pointer; transition: background .2s; padding: 8px 10px; }
.dash-live-item:hover { background: rgba(56, 189, 248, .08); }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  body.dash-dark { position: static; overflow: auto; height: auto; min-height: 100vh; }
  body.dash-dark .admin-layout { display: block; }
  body.dash-dark .dash-header { padding: 0 14px; height: 64px; flex: 0 0 64px; }
  body.dash-header-title { font-size: 16px; }
  body.dash-header-meta { display: none; }
  .dash-sidebar { position: fixed; top: 64px; left: -240px; height: calc(100vh - 64px); transition: left .3s; z-index: 60; }
  .dash-sidebar.open { left: 0; }
  .dash-main { padding: 14px 16px 40px; height: auto; }
}
/* ---------- admin-section（总后台）同款覆盖 ---------- */
.admin-section [style*="background:#fef3c7"], .admin-section [style*="background:#fefce8"], .admin-section [style*="background:#fef2f2"], .admin-section [style*="background:#fff7ed"], .admin-section [style*="background:#f8fafc"], .admin-section [style*="background:#f1f5f9"], .admin-section [style*="background:#fff"] {
  background: rgba(56, 189, 248, .08) !important;
  border-color: rgba(56, 189, 248, .25) !important;
  color: #e0f2fe !important;
}
.admin-section [style*="background:#fef3c7"] { background: rgba(250, 204, 21, .12) !important; border-color: rgba(250, 204, 21, .35) !important; color: #facc15 !important; }
.admin-section [style*="background:#facc15"] { background: rgba(250, 204, 21, .12) !important; border-color: rgba(250, 204, 21, .35) !important; color: #facc15 !important; }
.admin-section [style*="background:#fefce8"], .admin-section [style*="background:#fef9c3"] { background: rgba(250, 204, 21, .12) !important; color: #facc15 !important; }
.admin-section [style*="background:#fef2f2"] { background: rgba(251, 113, 133, .12) !important; border-color: rgba(251, 113, 133, .35) !important; color: #fca5a5 !important; }
.admin-section [style*="background:#fee2e2"], .admin-section [style*="background:#fecaca"] { background: rgba(251, 113, 133, .12) !important; color: #fca5a5 !important; }
.admin-section [style*="background:#dbeafe"], .admin-section [style*="background:#eff6ff"] { background: rgba(56, 189, 248, .1) !important; color: #7dd3fc !important; }
.admin-section [style*="background:#f0fdf4"], .admin-section [style*="background:#dcfce7"], .admin-section [style*="background:#bbf7d0"] { background: rgba(52, 211, 153, .12) !important; color: #34d399 !important; }
.admin-section [style*="background:#f8fafc"], .admin-section [style*="background:#f1f5f9"], .admin-section [style*="background:#fafafa"] { background: rgba(15, 23, 42, .55) !important; color: #e2e8f0 !important; }
.admin-section [style*="background:#fff"], .admin-section [style*="background:#ffffff"] { background: rgba(15, 23, 42, .65) !important; color: #e2e8f0 !important; }
.admin-section [style*="color:#b91c1c"] { color: #fca5a5 !important; }
.admin-section [style*="color:#92400e"], .admin-section [style*="color:#a16207"] { color: #facc15 !important; }
.admin-section [style*="color:#94a3b8"] { color: #cbd5e1 !important; }
.admin-section [style*="color:#64748b"] { color: #94a3b8 !important; }
.admin-section [style*="color:#334155"], .admin-section [style*="color:#475569"], .admin-section [style*="color:#1e293b"] { color: #cbd5e1 !important; }
.admin-section [style*="color:#dc2626"] { color: #fb7185 !important; }
.admin-section [style*="color:#2563eb"], .admin-section [style*="color:#1d4ed8"] { color: #7dd3fc !important; }
.admin-section [style*="color:#16a34a"], .admin-section [style*="color:#15803d"] { color: #34d399 !important; }

.admin-section .btn-blue { background: linear-gradient(135deg, #38bdf8, #6366f1); border: none; color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 600; }
.admin-section .btn-green { background: linear-gradient(135deg, #34d399, #38bdf8); border: none; color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 600; }
.admin-section .btn-red { background: linear-gradient(135deg, #fb7185, #f59e0b); border: none; color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 600; }
.admin-section .btn-light { background: rgba(15, 23, 42, .6); border: 1px solid rgba(56, 189, 248, .25); color: #cbd5e1; padding: 9px 16px; border-radius: 8px; }
.admin-section .btn { cursor: pointer; transition: all .2s; }
.admin-section .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(56, 189, 248, .25); }
.admin-section table { color: #e2e8f0; width: 100%; }
.admin-section table th {
  background: linear-gradient(180deg, rgba(56, 189, 248, .12), rgba(56, 189, 248, .06)) !important;
  color: #cbd5e1 !important;
  padding: 10px 12px !important;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid rgba(56, 189, 248, .25) !important;
}
.admin-section table td {
  border-color: rgba(56, 189, 248, .15) !important;
  padding: 10px 12px !important;
  color: #e2e8f0;
}
.admin-section table tr:hover td { background: rgba(56, 189, 248, .05); }
.admin-section .badge { font-weight: 700; padding: 3px 8px; border-radius: 6px; font-size: 11.5px; display: inline-block; }
.admin-section .badge.green { background: rgba(52, 211, 153, .15); color: #34d399; border: 1px solid rgba(52, 211, 153, .3); }
.admin-section .badge.red { background: rgba(251, 113, 133, .15); color: #fb7185; border: 1px solid rgba(251, 113, 133, .3); }
.admin-section .badge.yellow { background: rgba(250, 204, 21, .15); color: #facc15; border: 1px solid rgba(250, 204, 21, .3); }
.admin-section .badge.blue { background: rgba(56, 189, 248, .15); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, .3); }
.admin-section .badge.gray { background: rgba(148, 163, 184, .15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, .3); }
.admin-section a { color: #7dd3fc; }
.admin-section a:hover { color: #38bdf8; text-decoration: underline; }
.admin-section p, .admin-section li { color: #cbd5e1; }
.admin-section hr { border-color: rgba(56, 189, 248, .15); }
.admin-section .table-wrap { overflow-x: auto; border-radius: 10px; }
.admin-section .table-wrap::-webkit-scrollbar { height: 6px; }
.admin-section .table-wrap::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, .3); border-radius: 3px; }

/* panel 标题点击（实时客户对话 / 实时事件流） */
.admin-section .dash-panel .panel-title.clickable { cursor: pointer; user-select: none; }
.admin-section .dash-panel .panel-title.clickable:hover { color: #7dd3fc; }
.admin-section .dash-panel .panel-title .pulse-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #fb7185; margin-right: 6px;
  animation: pulseDot 1.4s infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); box-shadow: 0 0 8px #fb7185; } }
.dash-live-item { cursor: pointer; transition: background .2s; padding: 8px 10px; }
.dash-live-item:hover { background: rgba(56, 189, 248, .08); }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  body.dash-dark { position: static; overflow: auto; height: auto; min-height: 100vh; }
  body.dash-dark .admin-layout { display: block; }
  body.dash-dark .dash-header { padding: 0 14px; height: 64px; flex: 0 0 64px; }
  body.dash-header-title { font-size: 16px; }
  body.dash-header-meta { display: none; }
  .dash-sidebar { position: fixed; top: 64px; left: -240px; height: calc(100vh - 64px); transition: left .3s; z-index: 60; }
  .dash-sidebar.open { left: 0; }
  .dash-main { padding: 14px 16px 40px; height: auto; }
}