/* ============================================================
 * JYC 统计决策分析平台 · 样式系统
 * 色彩严格沿用 www.adjyc.com 官网设计体系
 * 深色科技风 + 电光青主色，自适应 PC / 平板 / 手机
 * ============================================================ */

/* 全局隐藏类（所有 JS 动态 classList.toggle('hidden') 依赖此规则；
   之前只有 .ai-panel/.cw-panel 等作用域前缀规则，裸 div 加 hidden 不生效） */
.hidden { display: none !important; }

/* === 本地字体 @font-face（替代 Google Fonts CDN）=== */
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoSansSC-w400.ttf') format('truetype');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/NotoSansSC-w500.ttf') format('truetype');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/NotoSansSC-w700.ttf') format('truetype');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('fonts/NotoSansSC-w900.ttf') format('truetype');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/SpaceMono-w400.ttf') format('truetype');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/SpaceMono-w700.ttf') format('truetype');
}

:root {
  --black: #080a0f;
  --dark: #0d1117;
  --panel: #111827;
  --panel2: #14202f;
  --border: #1e2a3a;
  --accent: #00e5ff;
  --accent2: #7c3aed;
  --accent3: #10b981;
  --danger: #f43f5e;
  --warn: #f59e0b;
  --text: #e2e8f0;
  --muted: #9ca3af;
  --white: #f8fafc;
  --bg: #0c1420; /* v282：原未定义 → var(--bg,#f8fafc) 全部 fallback 浅色（AI 页白底根因） */
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --mono: 'Space Mono', Consolas, 'Courier New', monospace;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --glow: 0 0 24px rgba(0, 229, 255, 0.25);
  --sidebar-w: 232px;
  --topbar-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--black);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
/* 背景氛围：青色微光网格 + 顶部光晕（延续官网 hero） */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(rgba(0, 229, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.022) 1px, transparent 1px);
  background-size: 44px 44px;
}
body::after {
  content: '';
  position: fixed; top: -320px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 640px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse, rgba(0, 229, 255, 0.07) 0%, rgba(124, 58, 237, 0.04) 45%, transparent 70%);
}

a { color: var(--accent); text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #22304a; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 登录页 ============ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
}
.login-card {
  width: 100%; max-width: 420px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border);
  position: relative;
  border-radius: 20px;
  padding: 44px 36px 36px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: rise .5s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.login-logo-img { flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: 14px; }
.login-logo-img .sub { font-size: 13px; color: var(--muted); }
.login-logo .logo-badge {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; color: #08131a; box-shadow: var(--glow);
}
.login-card h1 { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.login-card .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%; height: 46px; padding: 0 14px;
  background: var(--dark); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 14px; font-family: var(--font);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 600; font-family: var(--font); cursor: pointer;
  transition: all .2s; white-space: nowrap;
  background: #233042; color: var(--text); /* v282：默认深色底（原生 button 灰 #efefef 透出是"白按钮"根因） */
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: #08131a; }
.btn-primary:hover { background: var(--white); box-shadow: var(--glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 8px; }
.btn-sm svg { width: 15px; height: 15px; flex: none; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #f87171; box-shadow: 0 0 0 4px rgba(239,68,68,0.18); }
.login-err {
  display: none; margin-bottom: 16px; padding: 10px 14px;
  background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af; border-radius: 10px; font-size: 12.5px;
}
.login-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 24px; }
.login-foot a { color: var(--accent); cursor: pointer; text-decoration: none; }
.login-foot a:hover { text-decoration: underline; }
.login-foot .dot { color: var(--muted); margin: 0 8px; }
.login-tip {
  margin-top: 18px; padding: 12px 14px; border-radius: 10px;
  background: rgba(0, 229, 255, 0.05); border: 1px dashed rgba(0, 229, 255, 0.3);
  color: var(--muted); font-size: 12px;
}
.login-tip b { color: var(--accent); font-family: var(--mono); }

/* 注册 / 找回密码 弹层 */
.login-modal-mask {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(3, 5, 9, 0.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-modal-mask[hidden] { display: none; }
.login-modal {
  width: 400px; max-width: 100%; max-height: 92vh; overflow: auto;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid var(--border); border-radius: 18px; padding: 30px 28px 26px;
  box-shadow: var(--shadow); position: relative; animation: rise .25s ease both;
}
.login-modal-close {
  position: absolute; top: 14px; right: 16px; background: transparent; border: 0;
  color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer;
}
.login-modal-close:hover { color: var(--text); }
.login-modal-title { font-size: 19px; font-weight: 700; margin-bottom: 18px; }
.auth-hint {
  font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-bottom: 16px;
  background: rgba(0, 229, 255, 0.06); border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 10px; padding: 10px 12px;
}
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-box { margin-bottom: 12px; }
.code-box textarea {
  width: 100%; background: #0c1220; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: 'Space Mono', monospace; font-size: 12px; padding: 10px;
  resize: vertical; margin-bottom: 8px;
}
.auth-note { font-size: 12px; color: var(--muted); line-height: 1.7; }
.verify-tip { font-size: 12px; margin-top: 6px; min-height: 16px; }
.verify-tip.ok { color: #86efac; }
.verify-tip.err { color: #fda4af; }
.privacy-body { font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 4px; }
.privacy-body p { margin: 0 0 12px; }

/* ============ 主布局 ============ */
.app { display: none; min-height: 100vh; }
.app.show { display: block; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: rgba(13, 17, 23, 0.92); border-right: 1px solid var(--border);
  padding: 15px 14px 12px; z-index: 100; display: flex; flex-direction: column;
  backdrop-filter: blur(10px);
}
.side-logo { display: flex; align-items: center; gap: 10px; padding: 0 10px 14px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.side-logo .brand-img { height: 18px; width: auto; max-width: 100%; display: block; filter: drop-shadow(0 1px 6px rgba(0,0,0,.4)); transition: filter .2s; }
.side-logo:hover .brand-img { filter: drop-shadow(0 2px 10px rgba(0,229,255,.25)); }
/* 侧栏收起/展开按钮（logo 行最右，参考 Hermes 风格） */
.side-toggle {
  margin-left: auto; flex: none; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 8px;
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  cursor: pointer; transition: all .15s; padding: 0;
}
.side-toggle:hover { color: var(--accent); border-color: var(--accent); background: rgba(0, 229, 255, 0.08); }
.side-logo .logo-badge {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #08131a;
}
.side-logo .t { font-weight: 700; font-size: 15px; line-height: 1.2; }
.side-logo .s { font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.side-menu { flex: 1; overflow-y: auto; }
.menu-group { font-size: 10.5px; color: #5b6b85; letter-spacing: .12em; margin: 8px 10px 4px; font-family: var(--mono); }
.menu-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin: 2px 0; border-radius: 10px;
  color: var(--muted); cursor: pointer; font-size: 13.5px;
  transition: all .18s; border: 1px solid transparent;
}
.menu-item svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.menu-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.menu-item.active {
  color: var(--accent); background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.22);
}
.menu-item.active svg { opacity: 1; }
.side-foot { padding: 6px 10px 0; border-top: 1px solid var(--border); font-size: 10px; color: #5b6b85; text-align: center; }

/* 侧边栏可折叠：.app.sidebar-collapsed → 64px 纯图标窄条 */
.sidebar { transition: width .22s ease; overflow: hidden; }
.side-logo { transition: padding .22s ease; }
.menu-item { justify-content: flex-start; white-space: nowrap; }
.main { transition: margin-left .22s ease; }
:root { --sidebar-w-collapsed: 64px; }
.app.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); padding: 15px 10px 12px; }
.app.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
.app.sidebar-collapsed .side-logo { padding: 0 10px 14px; flex-direction: row; gap: 0; align-items: center; justify-content: center; }
.app.sidebar-collapsed .side-logo .brand-img { display: none; }
.app.sidebar-collapsed .side-toggle { margin-left: 0; }
.app.sidebar-collapsed .stat-switch.side-stat { display: none !important; }
.app.sidebar-collapsed .menu-group { text-align: center; margin: 12px 0 4px; font-size: 0; letter-spacing: 0; }
.app.sidebar-collapsed .menu-group::before { content: '·'; font-size: 10px; color: #5b6b85; }
.app.sidebar-collapsed .menu-item { justify-content: center; padding: 10px 0; gap: 0; }
.app.sidebar-collapsed .menu-item > span { display: none; }
.app.sidebar-collapsed .side-foot { display: none; }
/* 折叠时图标 tooltip */
.app.sidebar-collapsed .menu-item { position: relative; }
.app.sidebar-collapsed .menu-item > span[hidden] { display: none; }
.app.sidebar-collapsed .menu-item[title]:hover::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: var(--panel, #0f1626); border: 1px solid var(--border, #26304a); color: var(--text);
  padding: 5px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; z-index: 300; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  pointer-events: none;
}

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 90; height: var(--topbar-h);
  display: flex; align-items: center; gap: 6px; padding: 0 26px;
  background: rgba(8, 10, 15, 0.82); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.topbar .crumb { font-size: 15px; font-weight: 600; }
.topbar .crumb small { color: var(--muted); font-weight: 400; margin-left: 8px; font-size: 12px; }
.topbar .spacer { flex: 1; }
.data-mode { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 100px; white-space: nowrap; margin-right: 10px; }
.data-mode.live { color: #10b981; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); }
.data-mode.mock { color: #f59e0b; background: rgba(245, 158, 11, 0.10); border: 1px solid rgba(245, 158, 11, 0.3); }
.stat-switch { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; color: var(--muted); }
.stat-switch select { background: rgba(255,255,255,0.05); color: var(--fg); border: 1px solid var(--border,#26304a); border-radius: 8px; padding: 5px 8px; font-size: 12px; max-width: 220px; cursor: pointer; outline: none; }
.stat-switch select:hover { border-color: var(--accent); }

/* 「我的统计」入口按钮（注册用户） */
.myorder-tab { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.05); color: var(--fg); border: 1px solid var(--border,#26304a); border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; margin-right: 0; transition: all .15s; }
.myorder-tab:hover { border-color: var(--accent); color: var(--accent); }

/* 侧栏统计ID下拉（驾驶舱上方；无外层容器，紧凑贴合） */
.sidebar .stat-switch.side-stat { display: block; margin: -4px 0 10px; }
.sidebar .stat-switch.side-stat select { display: block; width: 100%; max-width: none; padding: 6px 9px; }

@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,.5); } 50% { opacity: .6; box-shadow: 0 0 0 5px rgba(16,185,129,0); } }
.top-user { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 4px; border-radius: 10px; transition: background .2s; }
.top-user:hover { background: rgba(255,255,255,0.06); }
.avatar {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #34d399, #0ea5e9); color: #06211a;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none;
}
.top-user .nm { font-size: 13px; }
.top-user .rl { font-size: 11px; color: var(--muted); }
/* 悬停用户名 → 下拉菜单（个人信息/修改密码/退出） */
.top-user { position: relative; }
.um-caret { color: var(--muted); transition: transform .18s; }
.top-user:hover .um-caret { transform: rotate(180deg); }
.user-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 108px;
  background: rgba(20, 27, 41, 0.98); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px; box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .18s; z-index: 60;
}
.top-user:hover .user-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.um-item {
  display: flex; align-items: center; gap: 7px; padding: 6px 9px;
  font-size: 13px; color: var(--text); border-radius: 8px; cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.um-item svg { flex: none; color: var(--muted); }
.um-item:hover { background: rgba(56, 189, 248, 0.12); color: #fff; }
.um-item:hover svg { color: var(--accent); }
.um-item.um-danger:hover { background: rgba(239, 68, 68, 0.16); color: #fda4af; }
.um-item.um-danger:hover svg { color: #f87171; }
.um-sep { height: 1px; background: var(--border); margin: 5px 8px; }
.lang-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 26px; margin-right: 0; flex: none;
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
  color: var(--muted); background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); border-radius: 7px; cursor: pointer;
  transition: all .2s;
}
.lang-btn:hover { color: var(--white); border-color: var(--accent); box-shadow: var(--glow); }
.lang-btn-login { position: absolute; top: 14px; right: 14px; }
.hamburger { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; border-radius: 8px; }
.hamburger:hover { background: rgba(255,255,255,.05); color: var(--accent); }

.content { padding: 24px 26px 40px; flex: 1; }

/* ============ 页面切换 ============ */
.page { display: none; animation: fadeIn .3s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ 卡片 ============ */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  transition: background .2s;
}
.card:hover { background: var(--panel2); }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-h h3 { font-size: 14.5px; font-weight: 600; flex: 1; display: flex; align-items: center; gap: 9px; }
.card-h h3 svg { width: 17px; height: 17px; color: var(--accent); }
.card-h .more { font-size: 12px; color: var(--muted); cursor: pointer; }
.card-h .more:hover { color: var(--accent); }
.card-sub { font-size: 11.5px; color: var(--muted); }

/* KPI 卡片 */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi-card {
  position: relative; overflow: hidden;
  background: rgba(17, 24, 39, 0.9); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px 16px;
}
.kpi-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); box-shadow: 0 0 14px rgba(0, 229, 255, 0.6);
}
.kpi-card:nth-child(2)::before { background: var(--accent2); box-shadow: 0 0 14px rgba(124, 58, 237, 0.6); }
.kpi-card:nth-child(3)::before { background: var(--accent3); box-shadow: 0 0 14px rgba(16, 185, 129, 0.6); }
.kpi-card:nth-child(4)::before { background: var(--warn); box-shadow: 0 0 14px rgba(245, 158, 11, 0.6); }
.kpi-card:nth-child(5)::before { background: var(--danger); box-shadow: 0 0 14px rgba(244, 63, 94, 0.6); }
.kpi-card:nth-child(6)::before { background: var(--accent2); box-shadow: 0 0 14px rgba(124, 58, 237, 0.6); }
.kpi-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-label svg { width: 13px; height: 13px; }
.kpi-value { font-family: var(--mono); font-size: 26px; font-weight: 700; margin: 6px 0 2px; letter-spacing: .5px; }
.kpi-value small { font-size: 13px; color: var(--muted); font-weight: 400; }
.kpi-delta { font-size: 11.5px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 100px; font-family: var(--mono); }
.kpi-delta.up { color: var(--accent3); background: rgba(16, 185, 129, 0.1); }
.kpi-delta.down { color: var(--danger); background: rgba(244, 63, 94, 0.1); }
.kpi-delta.flat { color: var(--muted); background: rgba(156, 163, 175, 0.08); }
.kpi-yest { font-size: 11.5px; color: #9fb3c8; background: rgba(120, 160, 200, 0.1); padding: 2px 8px; border-radius: 100px; font-family: var(--mono); border: 1px solid rgba(120, 160, 200, 0.18); }

/* 栅格 */
.grid { display: grid; gap: 14px; margin-bottom: 14px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-1 { grid-template-columns: 1fr; }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-1-2 { grid-template-columns: 1fr 2fr; }
.chart { width: 100%; height: 300px; max-width: 100%; }
.chart-sm { height: 240px; }
.chart-xs { height: 200px; }
.chart-lg { height: 420px; }
.chart-mid { height: 340px; }
/* 地图容器高度按地理宽高比匹配：中国偏高瘦→高盒，世界/时区偏宽扁→矮盒，contain-fit 后双向充满 */
.chart-map-cn { height: 620px; }
.chart-map-world { height: 400px; }
/* 分时流量分析 */
.tf-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 16px 4px; }
.tf-tab {
  padding: 9px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 13px; cursor: pointer;
  transition: all .15s; font-family: inherit;
}
.tf-tab:hover { color: var(--text); border-color: var(--accent); }
.tf-tab.active {
  background: linear-gradient(135deg, rgba(94,162,255,.18), rgba(109,91,208,.16));
  border-color: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(47,111,214,.25);
}
.tf-legend { display: flex; gap: 18px; justify-content: center; padding: 6px 0 2px; font-size: 12px; color: var(--muted); }
.tf-lg { display: inline-flex; align-items: center; gap: 6px; }
.tf-lg i { width: 12px; height: 8px; border-radius: 2px; display: inline-block; }
.tf-tot { display: flex; gap: 26px; justify-content: center; padding: 4px 0 12px; font-size: 12px; color: var(--muted); }
.tf-tot b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.tf-spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(94,162,255,.25); border-top-color: var(--accent);
  animation: tfspin .8s linear infinite;
}
@keyframes tfspin { to { transform: rotate(360deg); } }
.tf-sel { width: auto; min-width: 130px; padding: 5px 10px; font-size: 12px; }
.tf-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tf-bar { position: relative; height: 16px; background: rgba(120,140,180,.1); border-radius: 4px; overflow: hidden; min-width: 120px; }
.tf-bar > div { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.tf-bar > span {
  position: absolute; right: 6px; top: 0; line-height: 16px; font-size: 11px;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.55); font-variant-numeric: tabular-nums;
}
@media (max-width: 767px) { .chart-lg { height: 340px; } .chart-mid { height: 260px; } .chart-map-cn { height: 380px; } .chart-map-world { height: 340px; } .tf-tab { padding: 8px 12px; font-size: 12px; } }

/* 表格 */
.tbl-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }

/* ==================== 输入框全局基准（2026-08-18 定稿，同日修正：select/textarea 不居中）====================
   统一对齐「访问明细」查询条件样式：深色底 var(--dark) + 1px var(--border) 边框 +
   圆角 9px + 聚焦 var(--accent) 高亮。:where() 特异性为 0 —— 只给"没写样式"
   的控件打底，不覆盖任何已有具体规则（.dr-input/.inp/.field 等保持不变）。
   文字居中：用户要求"所有输入框文字居中显示，排除 select 和 textarea"（2026-08-18 原话）
   —— 仅 input 文本框居中；下拉框 select 与文本域 textarea 保持浏览器默认对齐（不居中）。
   排除 checkbox/radio/file（控件自身样式由 accent-color 控制）。 */
:where(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) {
  background: var(--dark); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font); border-radius: 9px; outline: none;
  transition: border-color .15s;
}
:where(input:not([type=checkbox]):not([type=radio]):not([type=file])) {
  text-align: center;   /* 仅 input 文本框居中；select / textarea 保持默认对齐 */
}
:where(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea):focus {
  border-color: var(--accent);
}

table.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
table.tbl.visits-tbl { min-width: 860px; }
.tbl thead th {
  background: var(--dark); color: var(--muted); font-weight: 600;
  text-align: left; padding: 11px 13px; white-space: nowrap;
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
  font-size: 12px; letter-spacing: .03em;
}
.tbl tbody td { padding: 10px 13px; border-bottom: 1px solid rgba(30, 42, 58, 0.55); vertical-align: middle; }
.tbl tbody tr { transition: background .16s ease; cursor: pointer; }
/* —— 统一列表基准（访客明细样式同步给所有功能列表，2026-08-18 定稿）：奇偶行区分 + 悬停行变色
   ⚠️ hover 选择器特异性必须 > 斑马纹（:not() 里的每个类都计入特异性），否则 hover 变色被斑马纹压制 —— */
.tbl tbody tr:not(.empty):nth-child(odd) { background: rgba(255, 255, 255, 0.015); }
.tbl tbody tr:not(.empty):nth-child(even) { background: rgba(13, 17, 23, 0.55); }
.tbl tbody tr:not(.empty):not(.visit-detail):hover { background: rgba(0, 229, 255, 0.065); box-shadow: inset 3px 0 0 var(--accent); }
.tbl tfoot tr, .tbl tfoot td { background: transparent !important; }
/* —— 访客明细：奇偶行区分（行对：主行在 4n+1 / 4n+3 位置）—— */
.visits-tbl tbody tr.visit-main:nth-child(4n+1) { background: rgba(255, 255, 255, 0.015); }
.visits-tbl tbody tr.visit-main:nth-child(4n+3) { background: rgba(13, 17, 23, 0.55); }
.visits-tbl tbody tr.visit-main { box-shadow: inset 3px 0 0 transparent; }
.visits-tbl tbody tr.visit-main:hover {
  background: rgba(0, 229, 255, 0.065);
  box-shadow: inset 3px 0 0 var(--accent);
}
.visits-tbl tbody tr.visit-main.open { background: rgba(0, 229, 255, 0.085); box-shadow: inset 3px 0 0 var(--accent); }
.visits-tbl tbody tr.visit-main.online { box-shadow: inset 3px 0 0 var(--accent3); }
.visits-tbl tbody tr.visit-main.online:hover { box-shadow: inset 3px 0 0 var(--accent3); }
.tbl tr.visit-detail { display: none; }
.tbl tr.visit-main.open + tr.visit-detail { display: table-row; }
.tbl tr.visit-detail > td { background: rgba(13, 17, 23, 0.72); padding: 14px 16px; cursor: default; border-bottom: 1px solid rgba(30, 42, 58, 0.8); }
.visits-tbl tbody tr.empty td { background: transparent; }
.tbl .mono { font-family: var(--mono); font-size: 12px; }
.tbl .num { font-family: var(--mono); text-align: right; }
.tbl th.num { text-align: right; }
.tbl .empty td { text-align: center; color: var(--muted); padding: 40px; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 100px; font-size: 11px; font-weight: 500;
  background: rgba(0, 229, 255, 0.1); color: var(--accent);
  border: 1px solid rgba(0, 229, 255, 0.2); white-space: nowrap;
}
.badge.purple { background: rgba(124, 58, 237, 0.12); color: #a78bfa; border-color: rgba(124, 58, 237, 0.3); }
.badge.green { background: rgba(16, 185, 129, 0.1); color: var(--accent3); border-color: rgba(16, 185, 129, 0.25); }
.badge.red { background: rgba(244, 63, 94, 0.1); color: #fda4af; border-color: rgba(244, 63, 94, 0.3); }
.badge.warn { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.badge.gray { background: rgba(156, 163, 175, 0.08); color: var(--muted); border-color: var(--border); }

/* 筛选栏 */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
}
.filter-bar select, .filter-bar input {
  height: 36px; padding: 0 12px; background: var(--dark);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  font-size: 12.5px; font-family: var(--font); outline: none;
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--accent); }
.filter-bar input[type="date"] { color-scheme: dark; }
.filter-bar label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* 全局日期范围控件 */
.date-range-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px;
}
.date-range-bar .dr-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.date-range-bar .dr-today,
.topbar .dr-today { font-size: 11px; color: #7d90ad; font-weight: 600; letter-spacing: .2px; border: 1px solid rgba(148,163,184,.25); background: rgba(148,163,184,.07); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.date-range-bar .dr-input { height: 34px; padding: 0 10px; background: var(--dark); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 12.5px; font-family: var(--font); outline: none; color-scheme: dark; }
.date-range-bar .dr-input:focus { border-color: var(--accent); }
.date-range-bar .dr-sep { color: var(--muted); }
.date-range-bar .dr-btn { height: 34px; padding: 0 12px; background: var(--dark); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 12.5px; cursor: pointer; transition: all .15s; }
.date-range-bar .dr-btn:hover { border-color: var(--accent); }
.date-range-bar .dr-btn.active { background: var(--accent); border-color: var(--accent); color: #04121f; font-weight: 600; }
.date-range-bar .dr-apply { background: var(--accent); border-color: var(--accent); color: #04121f; font-weight: 600; }
.date-range-bar .dr-presets { display: inline-flex; gap: 6px; margin-left: 4px; }

/* 列表项 */
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid rgba(30, 42, 58, 0.5); }
.list-row:last-child { border-bottom: none; }
.list-rank {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; background: rgba(255, 255, 255, 0.05); color: var(--muted);
}
.list-rank.r1 { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.list-rank.r2 { background: rgba(156, 163, 175, 0.15); color: #d1d5db; }
.list-rank.r3 { background: rgba(124, 58, 237, 0.18); color: #a78bfa; }
.list-body { flex: 1; min-width: 0; }
.list-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.list-val { font-family: var(--mono); font-size: 13.5px; font-weight: 600; }
.bar-track { height: 5px; background: rgba(255, 255, 255, 0.05); border-radius: 5px; overflow: hidden; margin-top: 6px; }
.bar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent), rgba(0, 229, 255, 0.3)); transition: width .6s ease; }

/* 在线访客流 */
.online-flow { display: flex; flex-direction: column; }
.online-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 4px;
  border-bottom: 1px solid rgba(30, 42, 58, 0.45); animation: fadeIn .4s ease;
}
.online-item:last-child { border-bottom: none; }
.oi-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent3); flex: none; box-shadow: 0 0 8px rgba(16, 185, 129, .7); animation: pulse 1.8s infinite; }
.oi-dot.spider { background: var(--warn); box-shadow: 0 0 8px rgba(245, 158, 11, .7); }
.oi-body { flex: 1; min-width: 0; }
.oi-ip { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.oi-region { font-size: 11px; color: var(--muted); }
.oi-page { font-size: 11.5px; color: var(--accent); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oi-time { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; flex: none; }
/* v241 在线访客一键发起沟通 */
.oi-chat {
  flex: none; font-size: 11.5px; padding: 4px 10px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(0, 229, 255, .5); background: rgba(0, 229, 255, .1); color: var(--accent);
  transition: all .15s ease; white-space: nowrap;
}
.oi-chat:hover { background: rgba(0, 229, 255, .22); box-shadow: 0 0 10px rgba(0, 229, 255, .35); transform: translateY(-1px); }
/* v434 在线访客鼠标轨迹回放（同沟通按钮风格，绿调） */
.oi-replay { flex: none; font-size: 11.5px; padding: 4px 10px; border-radius: 14px; cursor: pointer; border: 1px solid rgba(16, 185, 129, .5); background: rgba(16, 185, 129, .1); color: #34d399; transition: all .15s ease; white-space: nowrap; }
.oi-replay:hover { background: rgba(16, 185, 129, .22); box-shadow: 0 0 10px rgba(16, 185, 129, .35); transform: translateY(-1px); }
/* v435 在线访客鼠标热点图（橙调，同沟通/回放按钮风格） */
.oi-heat { flex: none; font-size: 11.5px; padding: 4px 10px; border-radius: 14px; cursor: pointer; border: 1px solid rgba(251, 146, 60, .5); background: rgba(251, 146, 60, .1); color: #fb923c; transition: all .15s ease; white-space: nowrap; }
.oi-heat:hover { background: rgba(251, 146, 60, .22); box-shadow: 0 0 10px rgba(251, 146, 60, .35); transform: translateY(-1px); }

/* 洞察卡片 */
.insight {
  display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px;
  border: 1px solid var(--border); background: rgba(13, 17, 23, 0.6);
  margin-bottom: 12px; position: relative; overflow: hidden;
}
.insight::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.insight.good::before { background: var(--accent3); }
.insight.warn::before { background: var(--warn); }
.insight.danger::before { background: var(--danger); }
.insight.info::before { background: var(--accent, #00e5ff); }
.insight-ico { width: 38px; height: 38px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.insight.good .insight-ico { background: rgba(16, 185, 129, 0.12); color: var(--accent3); }
.insight.warn .insight-ico { background: rgba(245, 158, 11, 0.12); color: var(--warn); }
.insight.danger .insight-ico { background: rgba(244, 63, 94, 0.12); color: var(--danger); }
.insight.info .insight-ico { background: rgba(0, 229, 255, 0.1); color: var(--accent, #00e5ff); }
.insight.info { border-color: rgba(0, 229, 255, .25); }
.insight-body { flex: 1; min-width: 0; }
.insight-tag { font-size: 10.5px; font-family: var(--mono); letter-spacing: .08em; color: var(--muted); }
.insight-title { font-size: 14px; font-weight: 600; margin: 2px 0 4px; }
.insight-desc { font-size: 12.5px; color: var(--muted); }
.insight-action { margin-top: 7px; font-size: 12px; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; }

/* 详细访客面板 */
.detail-panel {
  background: rgba(13, 17, 23, 0.8); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px;
}
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 20px; }
.detail-item { display: flex; justify-content: space-between; gap: 12px; font-size: 12.3px; padding: 5px 0; border-bottom: 1px dashed rgba(30, 42, 58, 0.5); }
.detail-item dt { color: var(--muted); flex: none; }
.detail-item dd { font-family: var(--mono); text-align: right; word-break: break-all; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pager .info { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.pager .btns { display: flex; gap: 8px; }
.pager button {
  height: 32px; padding: 0 14px; background: var(--dark); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; cursor: pointer; font-size: 12.5px; font-family: var(--font);
  transition: all .15s;
}
.pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pager button:disabled { opacity: .35; cursor: not-allowed; }

/* 分段切换 */
.seg { display: inline-flex; background: var(--dark); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  border: none; background: transparent; color: var(--muted); font-family: var(--font);
  font-size: 12.5px; padding: 6px 16px; border-radius: 8px; cursor: pointer; transition: all .18s;
}
.seg button.active { background: rgba(0, 229, 255, 0.12); color: var(--accent); }
.trend-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* 告警 */
.alert-item {
  display: flex; gap: 13px; padding: 14px 16px; border-radius: 13px;
  border: 1px solid var(--border); margin-bottom: 10px; background: rgba(13, 17, 23, 0.6);
  transition: background .2s;
}
.alert-item:hover { background: rgba(20, 32, 47, 0.7); }
.alert-ico { width: 36px; height: 36px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.alert-ico.red { background: rgba(244, 63, 94, 0.12); }
.alert-ico.warn { background: rgba(245, 158, 11, 0.12); }
.alert-ico.green { background: rgba(16, 185, 129, 0.12); }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alert-desc { font-size: 12.3px; color: var(--muted); margin-top: 3px; }
.alert-time { font-family: var(--mono); font-size: 11px; color: var(--muted); flex: none; text-align: right; }

/* 报告 */
.report-head { padding: 22px 24px; background: linear-gradient(120deg, rgba(0, 229, 255, 0.07), rgba(124, 58, 237, 0.07)); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.report-head h2 { font-size: 20px; }
.report-head p { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.rule-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid rgba(30, 42, 58, 0.5); }
.rule-row:last-child { border-bottom: none; }
.rule-row .nm { flex: 1; font-size: 13px; }
.rule-row .nm small { display: block; color: var(--muted); font-size: 11.5px; }

/* Toast */
#toast {
  position: fixed; left: 50%; top: 80px; transform: translateX(-50%);
  background: rgba(211, 47, 47, 0.95); border: 1px solid #f44336; color: #fff;
  padding: 11px 22px; border-radius: 100px; font-size: 13px; z-index: 999;
  opacity: 0; pointer-events: none; transition: all .3s; box-shadow: var(--glow); white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 确认弹层 */
.modal-mask {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(3, 5, 9, 0.66); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask[hidden] { display: none; }
.modal-box {
  width: 340px; max-width: 100%;
  background: linear-gradient(180deg, #151b28, #0d1117);
  border: 1px solid #223047; border-radius: 16px; padding: 28px 26px 22px;
  text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,.55);
  animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-ico {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(239,68,68,.14); color: #f87171; font-size: 20px;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--text); }
.modal-desc { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 8px 0 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-actions .btn { flex: 1; }

/* ============ 移动端底部导航 ============ */
.mobile-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: rgba(13, 17, 23, 0.92); border-top: 1px solid var(--border);
  backdrop-filter: blur(12px); padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav .nav-inner { display: flex; }
.mnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 8px; color: var(--muted); font-size: 10.5px; cursor: pointer;
  transition: color .15s; border: none; background: none; font-family: var(--font);
}
.mnav-item svg { width: 21px; height: 21px; }
.mnav-item.active { color: var(--accent); }

/* ============ 响应式 ============ */
@media (max-width: 1199px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .app.sidebar-collapsed .main { margin-left: 0; } /* 折叠态在移动端不占边距 */
  .hamburger { display: block; }
  .content { padding: 16px 14px 90px; }
  .topbar { padding: 0 14px; height: 54px; }
  .top-user .nm, .top-user .rl { display: none; }
  .topbar .data-mode { display: none; }
  .topbar .crumb small { display: none; }
  .crumb { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
  .grid-2, .grid-3, .grid-4, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-value { font-size: 20px; }
  .kpi-card { padding: 14px 15px 12px; }
  .chart { height: 240px; }
  .mobile-nav { display: block; }
  .card { padding: 16px; border-radius: 14px; }
  /* 手机端侧滑抽屉菜单 */
  .drawer-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 200;
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .drawer-mask.show { opacity: 1; pointer-events: auto; }
  .drawer {
    position: fixed; top: 0; left: 0; bottom: 0; width: 268px; z-index: 210;
    background: rgba(13, 17, 23, 0.97); border-right: 1px solid var(--border);
    transform: translateX(-100%); transition: transform .28s ease; padding: 20px 14px;
    overflow-y: auto;
  }
  .drawer.show { transform: none; }
  .filter-bar { padding: 12px; }
  .filter-bar select, .filter-bar input { flex: 1 1 45%; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 34px 24px 28px; }
}
@media (min-width: 768px) {
  .drawer, .drawer-mask { display: none; }
}
/* 访客在线趋势：历史最高/平均统计条 */
.trend-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 10px; }
.trend-stats .ts-item { flex: 1 1 0; min-width: 130px; background: rgba(255,255,255,0.03); border: 1px solid var(--border, #26304a); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.trend-stats .ts-k { font-size: 11px; color: var(--muted, #8a93a6); }
.trend-stats .ts-v { font-size: 22px; font-weight: 700; color: var(--accent, #00e5ff); font-family: var(--mono, monospace); }
.trend-stats .ts-t { font-size: 11px; color: var(--muted, #8a93a6); }

/* ==================== AI 智能问数聊天浮窗（v274：可拖动/缩放/最大化/改色/开通开关） ==================== */
#aiChatFAB { position: fixed; right: 22px; bottom: 22px; z-index: 9990; --ai-c: #22c07a; }
.ai-fab-btn {
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--ai-c), color-mix(in srgb, var(--ai-c) 55%, #1e3a8a)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--ai-c) 35%, transparent); transition: transform .15s ease, box-shadow .15s ease;
}
.ai-fab-btn:hover { transform: scale(1.07); box-shadow: 0 8px 26px color-mix(in srgb, var(--ai-c) 50%, transparent); }
.ai-fab-btn.ai-fab-active { background: #1e293b; }
.ai-panel {
  position: fixed; right: 22px; bottom: 88px; width: 380px; height: 560px; max-width: calc(100vw - 32px); max-height: calc(100vh - 110px);
  background: var(--panel, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(15,23,42,.22); display: flex; flex-direction: column; overflow: hidden;
}
.ai-panel.hidden { display: none; }
.ai-panel.ai-max { left: 8px !important; top: 8px !important; right: 8px !important; bottom: 8px !important; width: auto !important; height: auto !important; }
.ai-panel.ai-drag { user-select: none; }
.ai-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--ai-c) 32%, #0f172a), var(--ai-c)); color: #fff;
  cursor: move; touch-action: none; flex: none;
}
.ai-head-title { font-size: 13.5px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.ai-head-title .ai-star { flex: none; }
.ai-head-actions { display: flex; gap: 5px; align-items: center; }
.ai-colors { display: inline-flex; gap: 4px; align-items: center; margin-right: 3px; }
.ai-head-btn {
  width: 26px; height: 26px; border-radius: 7px; border: none; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s; flex: none;
}
.ai-head-btn:hover { background: rgba(255,255,255,.28); }
.ai-resize {
  position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 0 50%, color-mix(in srgb, var(--ai-c) 70%, #94a3b8) 50% 100%);
  border-bottom-right-radius: 14px; touch-action: none;
}
.ai-panel.ai-max .ai-resize { display: none; }
.ai-body { flex: 1; overflow-y: auto; padding: 12px 12px 4px; background: #0c1420; min-height: 0; }
.ai-msg { margin-bottom: 10px; display: flex; flex-direction: column; }
.ai-msg.user { align-items: flex-end; }
.ai-msg.ai { align-items: flex-start; }
.ai-msg-role { font-size: 10.5px; color: var(--muted, #94a3b8); margin-bottom: 3px; padding: 0 4px; }
.ai-msg-text {
  max-width: 84%; padding: 9px 12px; font-size: 12.5px; line-height: 1.75; border-radius: 12px; word-break: break-word;
}
.ai-msg.user .ai-msg-text { background: var(--ai-c); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.ai .ai-msg-text { background: #182335; border: 1px solid #26364c; color: #dce6f2; border-bottom-left-radius: 4px; }
.ai-range { margin-top: 6px; font-size: 10.5px; color: var(--muted, #94a3b8); }
/* v282：访客明细表（AI 回答内嵌，气泡里横向滚动） */
.ai-vtab { margin-top: 8px; }
.ai-vtab-h { font-size: 11px; font-weight: 600; color: #8fb8d8; margin-bottom: 4px; }
.ai-vtab-t { font-size: 11px; min-width: 0; }
.ai-vtab-t th, .ai-vtab-t td { padding: 4px 6px; }
.ai-vtab-real { color: var(--muted, #9ca3af); font-size: 10px; }
.ai-vtab-page { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v282：当天历史会话的时间戳（问题行右侧灰字） */
.ai-hist-time { float: right; margin-left: 8px; font-size: 10px; color: var(--muted, #9ca3af); }
.ai-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: aiBlink 1.2s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: .18s; }
.ai-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes aiBlink { 0%,80%,100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 4px; background: #0c1420; flex: none; }
.ai-sugg-chip {
  font-size: 11px; color: #0e7490; background: color-mix(in srgb, var(--ai-c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ai-c) 35%, transparent);
  padding: 3px 9px; border-radius: 999px; cursor: pointer; transition: background .15s;
}
.ai-sugg-chip:hover { background: color-mix(in srgb, var(--ai-c) 24%, transparent); }
.ai-foot { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border, #1e2a3a); background: #0c1420; flex: none; align-items: flex-end; }
.ai-input-wrap { flex: 1; min-width: 0; position: relative; }
.ai-textarea { width: 100%; resize: none; font-size: 12.5px; line-height: 1.5; min-height: 40px; max-height: 96px; padding: 8px 40px 8px 10px; box-sizing: border-box; overflow-y: auto; }
.ai-count { position: absolute; right: 6px; bottom: 6px; font-size: 10px; color: var(--muted); pointer-events: none; }
.ai-count.warn { color: var(--danger, #f44); }
.ai-foot-btns { display: flex; gap: 6px; align-items: center; flex: none; }
.ai-send { white-space: nowrap; padding: 8px 14px; font-size: 12.5px; }
/* 麦克风按钮（语音输入） */
.ai-mic { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border, #e2e8f0); background: color-mix(in srgb, var(--ai-c) 10%, transparent); color: var(--ai-c); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.ai-mic:hover { background: color-mix(in srgb, var(--ai-c) 22%, transparent); }
.ai-mic.rec { background: #ef4444; border-color: #ef4444; color: #fff; animation: aiMicPulse 1.2s ease-in-out infinite; }
.ai-mic.busy { background: color-mix(in srgb, var(--ai-c) 22%, transparent); border-color: var(--ai-c); color: var(--ai-c); cursor: wait; animation: aiMicSpin 1s linear infinite; }
@keyframes aiMicSpin { 50% { opacity: .45; } }
@keyframes aiMicPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); } 50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } }
.ai-tip { font-size: 11.5px; color: var(--ai-c); padding: 0 12px 8px; background: #0c1420; flex: none; }
.ai-tip.hidden { display: none; }
/* 颜色面板（🎨 弹出） */
.ai-colorpick { position: fixed; z-index: 10001; width: 282px; background: #0f172a; border: 1px solid #334155; border-radius: 12px; padding: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.ai-colorpick.hidden { display: none; }
/* 开通开关（配置页） */
.ai-switch { display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
.ai-sw-track { width: 40px; height: 22px; border-radius: 999px; background: #94a3b8; position: relative; transition: background .2s; flex: none; }
.ai-sw-track.on { background: #22c07a; }
.ai-sw-dot { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ai-sw-track.on .ai-sw-dot { left: 20px; }
@media (max-width: 640px) {
  #aiChatFAB { right: 14px; bottom: 14px; }
  .ai-panel { right: 14px; bottom: 78px; width: calc(100vw - 28px); height: calc(100vh - 90px); }
}
/* ==================== 客服实时会话悬浮窗（左下角，与 AI 智能问数右下角互不干扰）==================== */
#cwWin { position: fixed; left: 22px; bottom: 22px; z-index: 9995; }
/* FAB 必须 fixed：保存/恢复的是视口绝对坐标；若用 relative 会在自然位置基础上再偏移，导致气泡被顶出屏幕外（用户"气泡不见了"根因） */
#cwFAB { position: fixed; left: 22px; bottom: 22px; z-index: 9995; }
#cwFabBtn {
  position: relative; width: 52px; height: 52px; border-radius: 50%; border: none; cursor: grab;
  background: linear-gradient(135deg, var(--accent, #00e5ff), color-mix(in srgb, var(--accent, #00e5ff) 55%, #1e3a8a));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent, #00e5ff) 35%, transparent);
  transition: transform .15s ease, box-shadow .15s ease; touch-action: none;
}
#cwFabBtn:active { cursor: grabbing; }
#cwFabBtn:hover { transform: scale(1.07); box-shadow: 0 8px 26px color-mix(in srgb, var(--accent, #00e5ff) 50%, transparent); }
.cw-badge {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(239,68,68,.5);
}
.cw-badge.hidden, .cw-blink.hidden, .cw-pharsebar.hidden { display: none; }
.cw-blink {
  position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(239,68,68,.8); animation: cwPulse 1.5s ease-out infinite;
}
@keyframes cwPulse { 0% { opacity: .9; transform: scale(.82); } 70% { opacity: 0; transform: scale(1.5); } 100% { opacity: 0; transform: scale(1.5); } }
.cw-panel {
  position: fixed; left: 22px; bottom: 90px; width: 558px; height: 540px; z-index: 9995;
  max-width: calc(100vw - 32px); max-height: calc(100vh - 110px);
  background: var(--panel, #111827); border: 1px solid var(--border, #1e2a3a); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45); display: flex; flex-direction: column; overflow: hidden;
}
.cw-panel.hidden { display: none; }
.cw-panel.cw-max { left: 8px !important; top: 8px !important; right: 8px !important; bottom: 8px !important; width: auto !important; height: auto !important; }
.cw-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #00e5ff) 30%, #0f172a), color-mix(in srgb, var(--accent, #00e5ff) 70%, #155e75));
  color: #fff; cursor: move; touch-action: none; flex: none;
}
.cw-state { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,.7); overflow: hidden; }
.cw-statetxt { font-size: 11px; font-weight: 700; flex: none; color: #4ade80; }
.cw-stbtn {
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; border: none; cursor: pointer;
  background: rgba(255,255,255,.14); font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s; flex: none;
}
.cw-stbtn:hover { background: rgba(255,255,255,.28); }
.cw-title { font-size: 13px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; }
.cw-hbtns { margin-left: auto; display: flex; gap: 4px; }
.cw-hbtns button {
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; border: none; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s; flex: none;
}
.cw-hbtns button:hover { background: rgba(255,255,255,.28); }
.cw-body { flex: 1; display: flex; min-height: 0; background: var(--bg, #0b1220); }
.cw-body #cwConvos { width: 208px; flex: none; overflow-y: auto; border-right: 1px solid var(--border, #1e2a3a); padding: 6px; }
.cw-body #cwMain { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
/* 顶部第一行：访客信息 + 正在浏览网址（整行宽度，网址可换行/省略） */
.cw-topctx { padding: 8px 10px; border-bottom: 1px solid var(--border, #1e2a3a); flex: none; line-height: 1.7; font-size: 12px; }
/* 顶部第二行：在线三态 + 自动回复设置（对齐主窗口 chatPharseBar 行尾，按钮靠右） */
.cw-bar { display: flex; gap: 6px; align-items: center; padding: 6px 10px; background: var(--panel, #111827); flex: none; }
.cw-bar .cw-statebox { display: inline-flex; gap: 5px; align-items: center; margin-left: auto; }
/* 访客正在输入行（输入框上方，唯一一处显示；持续显示直到访客提交/清空） */
.cw-wr { padding: 2px 10px 4px; font-size: 10.5px; color: #fbbf24; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cwMsgs { flex: 1; overflow-y: auto; padding: 10px; min-height: 0; }
.cw-pharsebar { display: flex; gap: 5px; flex-wrap: wrap; padding: 6px 10px; border-top: 1px solid var(--border, #1e2a3a); background: var(--panel, #111827); flex: none; }
.cw-pharsebar button { font-size: 10.5px; padding: 2px 8px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--accent, #00e5ff) 40%, transparent); background: color-mix(in srgb, var(--accent, #00e5ff) 10%, transparent); color: var(--accent, #00e5ff); cursor: pointer; }
.cw-pharsebar button:hover { background: color-mix(in srgb, var(--accent, #00e5ff) 22%, transparent); }
.cw-foot {
  display: flex; gap: 6px; align-items: flex-end; padding: 8px 10px; flex: none;
  border-top: 1px solid var(--border, #1e2a3a); background: var(--panel, #111827); position: relative;
}
.cw-foot textarea {
  flex: 1; min-width: 0; resize: none; font-size: 12px; line-height: 1.5; padding: 7px 9px;
  background: rgba(15,23,42,.6); border: 1px solid var(--border, #1e2a3a); border-radius: 8px; color: #e2e8f0; outline: none;
}
.cw-foot textarea:focus { border-color: color-mix(in srgb, var(--accent, #00e5ff) 55%, transparent); }
.cw-cnt { position: absolute; right: 118px; bottom: 8px; font-size: 10px; color: var(--muted, #94a3b8); pointer-events: none; }
.cw-cnt.warn { color: #f87171; }
.cw-foot button { flex: none; height: 32px; border-radius: 8px; border: 1px solid var(--border, #1e2a3a); background: rgba(148,163,184,.1); color: #cbd5e1; cursor: pointer; font-size: 12px; }
.cw-foot .cw-send { padding: 0 14px; border: none; background: var(--accent, #00e5ff); color: #0b1220; font-weight: 700; }
.cw-foot .cw-send:hover { filter: brightness(1.1); }
/* 语音输入按钮（客服主窗口/气泡窗共用，与 AI 助手 .ai-mic 同款三态） */
.cw-mic { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border, #1e2a3a); background: rgba(148,163,184,.1); color: #cbd5e1; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.cw-mic:hover { background: rgba(148,163,184,.22); }
.cw-mic.rec { background: #ef4444; border-color: #ef4444; color: #fff; animation: aiMicPulse 1.2s ease-in-out infinite; }
.cw-mic.busy { background: rgba(0,229,255,.16); border-color: var(--accent, #00e5ff); color: var(--accent, #00e5ff); cursor: wait; animation: aiMicSpin 1s linear infinite; }
.chat-mic { width: 38px; height: 38px; align-self: flex-end; }
.cw-resize {
  position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 0 50%, color-mix(in srgb, var(--accent, #00e5ff) 60%, #94a3b8) 50% 100%);
  border-bottom-right-radius: 14px;
}
.cw-panel.cw-max .cw-resize { display: none; }
@media (max-width: 640px) {
  #cwFAB { left: 14px; bottom: 14px; }
  .cw-panel { left: 14px; bottom: 80px; width: calc(100vw - 28px); height: calc(100vh - 96px); }
  .cw-body #cwConvos { width: 118px; }
}
/* ==================== 访客实时沟通（chat_showlist.asp 对齐） ==================== */
/* ==================== 访客明细（show_all_today 对齐 · 美化）==================== */
.visits-filter { flex-wrap: wrap; gap: 8px; }
.visits-filter select, .visits-filter input[type="text"] {
  height: 34px; background: var(--dark); border: 1px solid var(--border);
  color: var(--text); border-radius: 9px; font-size: 12.5px; font-family: var(--font); padding: 0 10px;
}
.visits-filter select:focus, .visits-filter input[type="text"]:focus { border-color: var(--accent); outline: none; }
.vchk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--border); background: var(--dark); border-radius: 9px; height: 34px; padding: 0 12px;
  cursor: pointer; user-select: none; transition: all .15s; }
.vchk:has(input:checked) { color: var(--accent); border-color: rgba(0, 229, 255, .45); background: rgba(0, 229, 255, .08); }
.vchk input { width: auto; height: auto; accent-color: var(--accent); }
.vis-hint { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
  padding: 7px 12px; margin: 0 0 12px; border-radius: 10px;
  background: rgba(124, 58, 237, .07); border: 1px solid rgba(124, 58, 237, .22); }
.vis-hint svg { width: 14px; height: 14px; color: #a78bfa; flex: none; }
/* 状态图标 */
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent3); flex: none;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: onlinePulse 1.8s infinite; }
@keyframes onlinePulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.vis-chip { display: inline-flex; align-items: center; padding: 1.5px 8px; border-radius: 100px;
  font-size: 10.5px; line-height: 1.6; border: 1px solid; white-space: nowrap; flex: none; }
.chip-new { color: var(--accent3); border-color: rgba(16, 185, 129, .4); background: rgba(16, 185, 129, .1); }
.chip-old { color: var(--muted); border-color: rgba(156, 163, 175, .3); background: rgba(156, 163, 175, .08); }
.chip-member { color: #c4b5fd; border-color: rgba(124, 58, 237, .45); background: rgba(124, 58, 237, .14); cursor: pointer; transition: all .15s; }
.chip-member:hover { background: rgba(124, 58, 237, .28); }
/* 单元格内容 */
.vt-time { font-size: 12px; color: var(--text); }
.ip-link { color: var(--accent); text-decoration: none; font-size: 12px; transition: text-shadow .15s; }
.ip-link:hover { text-shadow: 0 0 10px rgba(0, 229, 255, .7); }
.ip-host, .sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.visits-tbl td a { color: var(--text); text-decoration: none; }
.visits-tbl td a:hover { color: var(--accent); }
.kw-pill { display: inline-block; padding: 1.5px 9px; border-radius: 100px; font-size: 11px;
  background: rgba(245, 158, 11, .12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, .3); }
.pg-name { color: var(--text); font-size: 12px; }
.pg-title { font-size: 10.5px; color: var(--muted); margin-top: 1px; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* v235：受访页面列 · 单访客热点/回放图标按钮 */
.vt-ms-btns { display: inline-flex; gap: 5px; margin-top: 5px; }
.vt-ms-btn { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; cursor: pointer;
  background: rgba(0, 229, 255, .07); border: 1px solid rgba(0, 229, 255, .32); color: #7dd3fc;
  border-radius: 7px; padding: 1px 8px 1px 5px; line-height: 18px; transition: all .14s; }
.vt-ms-btn i { font-style: normal; font-size: 10.5px; color: #94a3b8; }
.vt-ms-btn:hover { background: rgba(0, 229, 255, .16); border-color: rgba(0, 229, 255, .6); color: #e0f2fe; }
.vt-ms-btn:hover i { color: #cbd5e1; }
.ref-txt, .out-txt { display: block; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.8px; }
/* 延时三档配色（原版 #FF0000 / #FFCC00 / #1DBB33 的深色适配） */
.ot-red { color: #f87171; text-shadow: 0 0 8px rgba(248, 113, 113, .35); }
.ot-warn { color: #fbbf24; }
.ot-ok { color: #34d399; }
/* 已存查询浮层 */
.vsave-wrap { position: relative; }
.vsave-pop { position: absolute; top: 40px; right: 0; z-index: 60; width: 300px;
  background: linear-gradient(180deg, #161d2c, #0e1420); border: 1px solid #2a3852; border-radius: 13px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55); overflow: hidden; }
.vsave-item { padding: 10px 14px; border-bottom: 1px solid rgba(30, 42, 58, .7); cursor: pointer; transition: background .14s; }
.vsave-item:hover { background: rgba(0, 229, 255, .07); }
.vsave-item .nm { font-size: 12.5px; font-weight: 600; color: var(--text); display: block; }
.vsave-item .desc { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.vsave-del { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none;
  color: var(--muted); cursor: pointer; font-size: 12px; opacity: 0; transition: all .14s; padding: 4px; }
.vsave-item { position: relative; }
.vsave-item:hover .vsave-del { opacity: 1; }
.vsave-del:hover { color: var(--danger); }
.vsave-empty { padding: 22px 16px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.8; }
/* 行为轨迹弹层 */
.vt-mask { z-index: 999; }
.vt-box { width: 640px; max-width: calc(100vw - 32px); max-height: 86vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #131a28, #0d1117); border: 1px solid #26344e; border-radius: 16px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .6); animation: modalIn .22s ease; overflow: hidden; }
.vt-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid rgba(38, 52, 78, .8); font-size: 14px; font-weight: 600; flex: none; }
.vt-x { background: none; border: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: all .14s; }
.vt-x:hover { color: var(--danger); background: rgba(244, 63, 94, .1); }
.vt-bd { padding: 16px 18px 20px; overflow-y: auto; }
.vt-meta { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; font-size: 12.5px; color: var(--muted);
  padding: 9px 13px; border-radius: 10px; background: rgba(0, 229, 255, .05); border: 1px solid rgba(0, 229, 255, .14); }
.vt-meta b { color: var(--accent); }
.vt-list { position: relative; }
.vt-step { display: flex; gap: 13px; position: relative; padding-bottom: 14px; }
.vt-step::before { content: ''; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px;
  background: linear-gradient(180deg, rgba(0, 229, 255, .45), rgba(0, 229, 255, .08)); }
.vt-step:last-child::before { display: none; }
.vt-node { width: 29px; height: 29px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #1c2c40, #0d1420); border: 2px solid rgba(0, 229, 255, .6);
  color: var(--accent); font-size: 12px; font-weight: 700; font-family: var(--mono); box-shadow: 0 0 12px rgba(0, 229, 255, .25); }
.vt-card { flex: 1; background: rgba(17, 24, 39, .75); border: 1px solid rgba(30, 42, 58, .9); border-radius: 12px;
  padding: 10px 13px; transition: all .16s; }
.vt-step:hover .vt-card { border-color: rgba(0, 229, 255, .4); background: rgba(20, 30, 46, .9); }
.vt-row1 { display: flex; gap: 12px; align-items: center; font-size: 11.5px; margin-bottom: 5px; }
.vt-row1 .vt-time { color: var(--muted); }
.vt-stay { color: var(--text); }
.vt-dly { margin-left: auto; font-family: var(--mono); font-size: 11px; }
.vt-row2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11.5px; margin-bottom: 4px; }
.vt-ref { color: var(--muted); text-decoration: none; }
.vt-ref:hover { color: var(--accent); }
.vt-page { display: flex; flex-direction: column; gap: 1px; }
.vt-title { font-size: 12.5px; color: var(--text); font-weight: 500; }
.vt-url { font-size: 11px; color: var(--accent); text-decoration: none; }
.vt-url:hover { text-shadow: 0 0 8px rgba(0, 229, 255, .5); }
.vt-clicks { margin-top: 8px; padding: 8px 10px; border-radius: 9px; background: rgba(124, 58, 237, .08);
  border: 1px dashed rgba(124, 58, 237, .3); }
.vt-click { display: flex; gap: 8px; align-items: center; font-size: 11.5px; padding: 3px 0; flex-wrap: wrap; }
.vt-click a { color: var(--accent); text-decoration: none; word-break: break-all; }
.vt-ck-img { max-width: 90px; max-height: 26px; border-radius: 4px; border: 1px solid var(--border); }
/* 保存查询表单 */
.svl { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; }
.svl-check { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.inp { width: 100%; height: 36px; background: var(--dark); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 0 12px; font-size: 13px; font-family: var(--font); }
.inp:focus { border-color: var(--accent); outline: none; }
.sv-cond { margin-top: 14px; font-size: 11.5px; color: var(--muted); padding: 9px 12px; border-radius: 9px;
  background: rgba(13, 17, 23, .7); border: 1px solid var(--border); line-height: 1.7; }
@media (max-width: 760px) {
  .vt-box { max-height: 80vh; }
  .vt-meta { flex-wrap: wrap; gap: 8px; }
  .vsave-pop { width: 260px; }
}

/* ===== 经营总览 v2：开始统计条 + TOP 昨日对比 ===== */
.stat-strip { display:flex; align-items:center; gap:22px; flex-wrap:wrap; background:var(--panel,#131c2b); border:1px solid var(--border,#1e2a3a); border-radius:12px; padding:10px 16px; margin-bottom:16px; }
.stat-strip .ss-item { display:flex; align-items:baseline; gap:7px; }
.stat-strip .ss-k { font-size:11.5px; color:var(--muted,#9ca3af); }
.stat-strip .ss-v { font-size:13.5px; font-weight:650; color:#e2e8f0; font-family:var(--mono,monospace); }
.stat-strip .ss-v.red { color:#f43f5e; }
.stat-strip .ss-v.dim { color:var(--muted,#9ca3af); font-weight:400; font-size:11.5px; }
.list-yv { font-size:10.5px; color:var(--muted,#9ca3af); font-weight:400; margin-left:4px; }


/* ===== 体验指标仪表行（速度表盘/跳出率环/停留时间条） ===== */
.exp-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:14px; }
@media (max-width:1200px){ .exp-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px){ .exp-grid { grid-template-columns:1fr; } }
.exp-card { padding:16px 18px 14px; }
.exp-loading { color:var(--muted,#9ca3af); font-size:12px; padding:30px 0; text-align:center; }
.exp-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.exp-title { font-size:13px; font-weight:650; color:#e2e8f0; letter-spacing:.3px; }
.exp-badge { font-size:11px; font-weight:700; padding:2px 8px; border-radius:10px; border:1px solid #334; font-family:var(--mono,monospace); }
.exp-gauge { text-align:center; }
.gauge-svg { width:100%; max-width:250px; height:auto; }
.gauge-arc-live { filter:drop-shadow(0 0 6px rgba(59,130,246,.45)); }
.gauge-dot { filter:drop-shadow(0 0 5px rgba(255,255,255,.7)); }
.exp-foot { margin-top:2px; font-size:11px; color:var(--muted,#9ca3af); font-family:var(--mono,monospace); }
/* 停留时长条 */
.exp-stay { padding:14px 2px 2px; }
.stay-track { position:relative; height:14px; background:#1c2942; border-radius:7px; overflow:visible; margin:10px 6px 4px; }
.stay-fill { position:absolute; left:0; top:0; bottom:0; border-radius:7px; background:linear-gradient(90deg,#0ea5e9,#22d3ee,#34d399); box-shadow:0 0 10px rgba(34,211,238,.35); }
.stay-mark { position:absolute; top:-5px; bottom:-5px; width:2.5px; border-radius:2px; }
.stay-mark-y { background:#f59e0b; box-shadow:0 0 6px rgba(245,158,11,.6); }
.stay-mark-y::after { content:'昨日'; position:absolute; top:-16px; left:50%; transform:translateX(-50%); font-size:9.5px; color:#f59e0b; white-space:nowrap; }
.stay-scale { display:flex; justify-content:space-between; margin:8px 6px 10px; font-size:10px; color:var(--muted,#9ca3af); font-family:var(--mono,monospace); }
.stay-rows { border-top:1px dashed #24344f; padding-top:10px; }
.stay-row { display:flex; align-items:center; gap:7px; font-size:12px; color:#cbd5e1; padding:3px 6px; }
.stay-row b { margin-left:auto; font-family:var(--mono,monospace); color:#fff; font-size:12.5px; }
.sr-dot { width:8px; height:8px; border-radius:50%; flex:none; }
.stay-hint { margin-top:6px; font-size:10.5px; color:var(--muted,#9ca3af); padding:0 6px; }

/* 访问延时 mini 分布柱 */
.dl-bars { display:flex; align-items:flex-end; gap:6px; height:44px; margin:6px 10px 0; padding:0 4px; }
.dl-bar-col { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; gap:3px; }
.dl-bar { width:100%; max-width:22px; border-radius:3px 3px 1px 1px; min-height:3px; }
.dl-bar-l { font-size:8.5px; color:var(--muted,#9ca3af); white-space:nowrap; }

/* ===== 目标转化漏斗 / 页面轨迹（v193） ===== */
.goal-steprow { display:flex; align-items:center; gap:10px; padding:10px 8px; border-bottom:1px solid rgba(148,163,184,.1); }
.goal-steprow:last-child { border-bottom:none; }
.goal-steprow .gsr-l { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
.goal-steprow .gsr-idx { width:22px; height:22px; border-radius:50%; background:linear-gradient(135deg,#3b82f6,#22d3ee); color:#fff; font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; flex:none; }
.goal-steprow .gsr-name { font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.goal-steprow .gsr-url { font-size:11px; color:var(--muted,#64748b); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:260px; }
.goal-steprow .gsr-m { display:flex; gap:14px; flex:none; }
.goal-steprow .gsr-cell { text-align:right; }
.goal-steprow .gsr-cell b { display:block; font-size:14px; }
.goal-steprow .gsr-cell span { font-size:10px; color:var(--muted,#64748b); }
.goal-steprow .gsr-r { width:170px; flex:none; }
.goal-steprow .gsr-drop { font-size:12px; text-align:right; }
@media (max-width:1180px){ .goal-steprow .gsr-m{display:none;} .goal-steprow .gsr-r{width:auto;} }
/* 洞察行（目标转化页） */
.insight-row { display:flex; gap:12px; padding:12px 10px; border-bottom:1px solid rgba(148,163,184,.1); border-left:3px solid transparent; }
.insight-row:last-child { border-bottom:none; }
.insight-row[data-lv="bad"] { border-left-color:#f87171; background:rgba(248,113,113,.05); }
.insight-row[data-lv="warn"] { border-left-color:#fbbf24; background:rgba(251,191,36,.05); }
.insight-row[data-lv="good"] { border-left-color:#34d399; background:rgba(52,211,153,.05); }
.insight-row[data-lv="info"] { border-left-color:#3b82f6; }
.insight-row .insight-dot { width:8px; height:8px; border-radius:50%; margin-top:6px; flex:none; }
.insight-row[data-lv="bad"] .insight-dot { background:#f87171; box-shadow:0 0 8px #f8717188; }
.insight-row[data-lv="warn"] .insight-dot { background:#fbbf24; box-shadow:0 0 8px #fbbf2488; }
.insight-row[data-lv="good"] .insight-dot { background:#34d399; box-shadow:0 0 8px #34d39988; }
.insight-row[data-lv="info"] .insight-dot { background:#3b82f6; }
/* 页面轨迹 */
.tk-tabs { display:flex; gap:8px; margin-bottom:12px; }
.tk-tab { padding:7px 14px; border-radius:8px; border:1px solid rgba(148,163,184,.18); background:transparent; color:var(--muted,#64748b); font-size:13px; cursor:pointer; transition:all .15s; }
.tk-tab.active { background:linear-gradient(135deg,rgba(59,130,246,.18),rgba(34,211,238,.14)); border-color:rgba(59,130,246,.4); color:#dbeafe; font-weight:600; }
.tk-mid { padding:12px 14px; border-radius:10px; background:rgba(59,130,246,.08); border:1px solid rgba(59,130,246,.22); margin-bottom:12px; }
.tk-mid-title { font-size:14px; font-weight:700; margin-bottom:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tk-mid-metrics { display:flex; gap:18px; flex-wrap:wrap; }
.tk-mid-m b { display:block; font-size:17px; }
.tk-mid-m span { font-size:11px; color:var(--muted,#64748b); }
.tk-mid-m.ok b { color:#34d399; } .tk-mid-m.warn b { color:#fbbf24; } .tk-mid-m.bad b { color:#f87171; }
.tk-row { display:flex; align-items:center; gap:10px; padding:7px 4px; }
.tk-row-idx { width:20px; height:20px; border-radius:6px; background:rgba(148,163,184,.14); color:var(--muted,#64748b); font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; flex:none; }
.tk-row-l { display:flex; align-items:center; gap:8px; width:200px; flex:none; }
.tk-row-name { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tk-row-bar { flex:1; height:8px; border-radius:4px; background:rgba(148,163,184,.1); overflow:hidden; }
.tk-bar { height:100%; border-radius:4px; background:linear-gradient(90deg,#3b82f6,#22d3ee); }
.tk-bar.top { background:linear-gradient(90deg,#3b82f6,#22d3ee); box-shadow:0 0 8px rgba(34,211,238,.4); }
.tk-bar.bounce { background:linear-gradient(90deg,#f87171,#fb923c); }
.tk-row-num { width:130px; flex:none; font-size:12px; text-align:right; color:var(--muted,#64748b); }
.tk-row-num b { color:#e2e8f0; }
@media (max-width:900px){ .tk-row-l{width:130px;} .tk-row-num{width:100px;} }
.tk-tiao-sum { margin-top:10px; padding:10px 12px; border-radius:8px; background:rgba(52,211,153,.06); border:1px dashed rgba(52,211,153,.3); font-size:13px; }
.chart-md { width:100%; height:320px; }

/* v339：经营总览页世界地图 + 中国地图浮窗（页面/大屏共用，z-index 须>大屏 99999） */
#ovWorldMap { width:100%; height:420px; min-height:320px; }
#bsOvCnModal { position:fixed; left:50%; top:50%; transform:translate(-50%,-52%); width:46%; min-width:420px; height:62%; min-height:340px; z-index:100000; background:rgba(2,6,23,.95); border:1px solid rgba(0,229,255,.55); border-radius:14px; box-shadow:0 12px 60px rgba(0,0,0,.6); display:flex; flex-direction:column; backdrop-filter:blur(4px); }
#bsOvCnHead { display:flex; align-items:center; gap:8px; padding:10px 14px 6px; cursor:move; user-select:none; flex:0 0 auto; }
#bsOvCnHead b { color:#7dd3fc; font-size:14px; }
#bsOvCnHead .sub { font-size:11px; color:#64748b; flex:1; }
#bsOvCnClose { font-size:11px; padding:3px 10px; border-radius:8px; border:1px solid rgba(248,113,113,.5); background:rgba(248,113,113,.08); color:#fca5a5; cursor:pointer; }
#bsOvCnMap { flex:1; min-height:0; margin:0 10px 10px; }
#bsOvCnGrip { position:absolute; right:4px; bottom:4px; width:16px; height:16px; cursor:nwse-resize; border-right:3px solid rgba(125,211,252,.6); border-bottom:3px solid rgba(125,211,252,.6); border-radius:0 0 8px 0; }

/* v368：智能决策 tab 加载进度条（不定长滑动：查询耗时不定，不伪造百分比） */
.dec-loadbar { width:260px; max-width:80%; height:5px; border-radius:3px; background:rgba(148,163,184,.15); overflow:hidden; position:relative; }
.dec-loadbar-i { position:absolute; top:0; left:0; height:100%; width:36%; border-radius:3px; background:linear-gradient(90deg, rgba(0,229,255,.25), #00e5ff 60%, rgba(0,229,255,.25)); animation:decSlide 1.15s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes decSlide { 0% { transform:translateX(-110%); } 100% { transform:translateX(360%); } }

/* v437 后台功能开通申请审核 — 查询条件水平对齐 */
.fa-q { display:flex; align-items:center; gap:8px; flex-wrap:nowrap; margin-bottom:12px; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--dark); }
.fa-ql { display:inline-flex; align-items:center; gap:5px; height:34px; color:var(--muted); font-size:12.5px; white-space:nowrap; cursor:pointer; }
.fa-ql > input[type="checkbox"] { width:15px; height:15px; margin:0; accent-color:var(--accent); }
.fa-ql-end { margin-left:auto; flex:0 0 auto; }
.fa-qin { height:34px; padding:0 8px; background:var(--dark); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:13px; outline:none; flex:0 0 auto; }
.fa-qin:focus { border-color:var(--accent); }
.fa-qin[type="date"] { width:138px; }
.fa-ql:first-child .fa-qin, .fa-ql:nth-child(2) .fa-qin { width:138px; }
.fa-qkw { width:190px; flex:1 1 160px; min-width:140px; }
#faQFeat { width:120px; }
#faQSt { width:104px; }
.fa-qb { height:34px; padding:0 14px; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; border:1px solid var(--border); flex:0 0 auto; white-space:nowrap; }
.fa-qb-pri { background:var(--accent); border-color:var(--accent); color:#fff; }
.fa-qb-pri:hover { filter:brightness(1.08); }
.fa-qb-ghost { background:transparent; color:var(--text); }
.fa-qb-ghost:hover { border-color:var(--accent); color:var(--accent); }
@media (max-width:1180px){ .fa-q { flex-wrap:wrap; } .fa-ql-end { margin-left:0; } }
