/* ==================================================================
 * 统一控制台 · 设计系统 v4「Clean」
 * ------------------------------------------------------------------
 * 布局：浅色左侧导航（总览 + 双产品切换 + 分组菜单）+ 白色顶栏 + 内容区
 * 基调：白侧栏 × 浅雾灰内容区 × 单一主色（CDN 蓝 / AI 紫）
 *   主色   #2563eb      AI 强调 #7c3aed
 *   正文   #0f172a      次级 #475569      弱化 #8494a9
 *   页面   #f6f8fb      卡片 #ffffff      描边 #e8edf5
 * 圆角：卡片 12 / 控件 8 / 标签胶囊 999
 * 原则：去渐变、去玻璃拟态、信息密度优先，视觉语言统一
 * ================================================================== */

:root {
  /* 品牌 */
  --brand: #2563eb;
  --brand-hover: #3b76f0;
  --brand-active: #1d4ed8;
  --brand-weak: #eef4ff;
  --brand-weak-hover: #f5f8ff;
  --brand-soft: #f8fbff;
  --brand-2: #7c3aed;
  --brand-3: #0891b2;
  --brand-grad: linear-gradient(135deg, #2563eb 0%, #4f7cf7 100%);

  /* 文字 */
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #8494a9;
  --text-4: #b3c0d1;
  --text-breadcrumb: #8494a9;

  /* 线与面 */
  --line: #e8edf5;
  --line-2: #eff3f9;
  --line-3: #dde5ef;
  --bg-page: #f6f8fb;
  --bg-card: #ffffff;
  --bg-soft: #f6f8fc;

  /* 语义色 */
  --danger: #dc2626;
  --success: #059669;
  --warning: #d97706;
  --gold: #b8873a;

  /* 圆角 / 阴影 */
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .03);
  --shadow-pop: 0 10px 28px -10px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .04);

  /* 骨架 */
  --aside-w: 248px;
  --header-h: 56px;
  --aside-bg: #ffffff;

  --font: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

* { box-sizing: border-box; }

html, body, #app { margin: 0; padding: 0; width: 100%; height: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5715;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

::selection { background: rgba(47, 92, 246, .16); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfd8e6; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #aebbcd; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ==================================================================
 * 骨架：aside + main
 * ================================================================== */

.scaffold {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-page);
}

/* ---------- 左侧导航 ---------- */

.app-aside {
  flex: 0 0 var(--aside-w);
  width: var(--aside-w);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid var(--line);
  position: relative;
  z-index: 20;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
}
.app-aside[data-area="ai"] {
  --accent: #7c3aed;
  --accent-soft: #f5f0ff;
}

.aside-brand {
  flex: 0 0 auto;
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 白色 logo PNG 通过 mask 染成品牌蓝渐变（登录页 / 侧栏共用） */
.brand-mask {
  display: inline-block;
  background: linear-gradient(115deg, #1d4ed8 20%, #3b82f6 100%);
  -webkit-mask: url('/assets/ljylogo.png') no-repeat left center / contain;
  mask: url('/assets/ljylogo.png') no-repeat left center / contain;
}
.ab-logo { width: 84px; height: 30px; flex: 0 0 auto; }
.aside-brand { justify-content: flex-start; }
.aside-brand .ab-tag { margin-left: auto; }
/* 品牌 Title 右侧的端别标记（平台管理端 / 客户端） */
.ab-tag {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  color: #64748b;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px #e2e8f0;
  white-space: nowrap;
}
.ab-tag.plat {
  color: #2563eb;
  background: #eff4ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .22);
}
.ab-text b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #0f172a;
  line-height: 22px;
}

.aside-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 10px 14px;
}
.aside-scroll::-webkit-scrollbar { width: 6px; }
.aside-scroll::-webkit-scrollbar-thumb { background: #e2e8f2; border: none; }

/* 总览入口 */
.side-home {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  margin: 2px 2px 10px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.side-home:hover { background: #f4f7fb; color: #0f172a; }
.side-home.on { background: #f1f5f9; color: #0f172a; font-weight: 600; }

/* 产品切换器 */
.prod-switch {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px;
  margin: 0 0 12px;
  background: #f7f9fc;
  border: 1px solid #eef2f8;
  border-radius: 12px;
}
.prod-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 9px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .16s, box-shadow .16s, color .16s;
}
.prod-item:hover { background: #fdfefe; }
.prod-item .pi-mark {
  width: 26px; height: 26px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--pc);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
  transition: all .16s;
}
.prod-item .pi-text { flex: 1 1 auto; min-width: 0; }
.prod-item .pi-text b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  line-height: 17px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prod-item .pi-text small {
  display: block;
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prod-item .pi-count {
  flex: 0 0 auto;
  font-size: 10.5px;
  color: #94a3b8;
  background: #eef2f8;
  border-radius: 999px;
  padding: 1px 6px;
  font-variant-numeric: tabular-nums;
}
.prod-item.on {
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), inset 0 0 0 1px var(--pc);
}
.prod-item.on .pi-mark {
  color: #fff;
  background: var(--pc);
  box-shadow: none;
}
.prod-item.on .pi-text b { color: #0f172a; font-weight: 600; }
.prod-item.on .pi-count { color: var(--pc); background: #fff; box-shadow: inset 0 0 0 1px rgba(15,23,42,.06); }

/* 分组菜单 */
.side-menu { display: flex; flex-direction: column; }
.side-gtitle {
  padding: 12px 10px 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  color: #9aa8bd;
}
.side-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 10px;
  margin-bottom: 1px;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  user-select: none;
  transition: background .13s, color .13s;
}
.side-item svg { flex: 0 0 auto; color: #9aa8bd; transition: color .13s; }
.side-item .si-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item:hover { background: #f4f7fb; color: #0f172a; }
.side-item:hover svg { color: #64748b; }
.side-item.on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.side-item.on svg { color: var(--accent); }
.side-item.on::before {
  content: ' ';
  position: absolute;
  left: 0; top: 9px; bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.side-item.sm { height: 31px; font-size: 12.5px; }
.side-item .si-dot {
  width: 6px; height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .14);
  flex: 0 0 auto;
}

/* 平台与系统（底部折叠区） */
.side-sys {
  margin: 14px 0 0;
  padding-top: 8px;
  border-top: 1px solid #eef2f8;
}
.side-sys-head {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12.5px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  transition: background .13s, color .13s;
}
.side-sys-head:hover { background: #f4f7fb; color: #0f172a; }
.side-sys-head .mla { margin-left: auto; }
.side-sys-body { padding-top: 2px; }
.side-sys.open .side-gtitle { padding-top: 8px; }

.aside-foot {
  flex: 0 0 auto;
  padding: 11px 16px 13px;
  border-top: 1px solid #eef2f8;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #94a3b8;
  letter-spacing: .2px;
}
.aside-foot .af-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
  flex: 0 0 auto;
}
.aside-foot .af-ver { margin-left: auto; font-family: var(--mono); font-size: 10.5px; opacity: .9; }

/* ---------- 主区域 ---------- */

.app-main {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-header {
  flex: 0 0 var(--header-h);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  z-index: 30;
}
.hd-burger {
  display: none;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-3);
  border-radius: 9px;
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  flex: 0 0 auto;
}
.hd-burger:hover { color: var(--brand); border-color: #bfd1fb; }

/* 顶栏「费用」入口（CDN + AI Token 账单合并页）：选中时按当前产品色点亮 */
.hd-fee.on {
  color: var(--accent, #2563eb);
  background: var(--accent-soft, #eff4ff);
  border-color: transparent;
}
.hd-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; margin-left: auto; }
.hd-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.hd-title b { font-size: 14.5px; font-weight: 700; color: #0f172a; letter-spacing: -.2px; }
.hd-title span { font-size: 12px; color: #97a5b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .16s;
}
.user-chip:hover { background: var(--bg-soft); }
.user-chip .uc-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px -2px rgba(76, 116, 255, .7);
  flex: 0 0 auto;
}
.user-chip .uc-name {
  font-size: 13px;
  color: var(--text);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip svg { color: var(--text-3); }

.app-header .btn.ghost-dark {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--line-3);
  border-radius: 999px;
}
.app-header .btn.ghost-dark:hover { color: var(--brand); border-color: #bfd1fb; background: #f8fbff; }

/* ---------- 内容区 ---------- */

.content-area {
  flex: 1 1 auto;
  overflow-y: auto;
  background: #f6f8fb;
}
.view-host { padding: 22px 24px 44px; }

/* 页头 */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 16px;
}
.page-head .ph-main { flex: 1 1 auto; min-width: 0; }
.page-head h1 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -.2px;
  color: #0f172a;
}
.page-head .ph-desc {
  margin-top: 5px;
  font-size: 13px;
  line-height: 19px;
  color: #8494a9;
}
.page-head .ph-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding-top: 2px; }

.page-body { padding: 0; }

/* ==================================================================
 * 栅格
 * ================================================================== */

.row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.col { padding: 0 8px; min-width: 0; }
.col-3 { width: 25%; }
.col-4 { width: 33.3333%; }
.col-5 { width: 41.6667%; }
.col-6 { width: 50%; }
.col-7 { width: 58.3333%; }
.col-8 { width: 66.6667%; }
.col-9 { width: 75%; }
.col-12 { width: 100%; }
@media (max-width: 1240px) {
  .col-3, .col-4, .col-5, .col-7 { width: 50%; }
}
@media (max-width: 860px) {
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 { width: 100%; }
}

/* ==================================================================
 * 卡片
 * ================================================================== */

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.card-head {
  min-height: 54px;
  padding: 0 20px;
  border-bottom: 1px solid #f1f5fb;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-head.plain { border-bottom: none; padding-bottom: 2px; }
.card-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: .1px;
}
.card-title::before {
  content: ' ';
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--brand-grad);
  align-self: center;
  margin-right: 1px;
}
.card-head.plain .card-title::before { display: none; }
.card-title .ct-sub {
  margin-left: 10px;
  padding-left: 11px;
  border-left: 1px solid #e8eef7;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: .1px;
}
.card-extra { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.card-extra .ce-link { color: var(--brand); cursor: pointer; font-size: 13px; }
.card-extra .ce-link:hover { color: var(--brand-hover); }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
.tb-scroll { overflow-x: auto; }
.tb-scroll .tb { min-width: 1040px; }

/* 同一行内的卡片等高拉伸，消除左右卡片高度差在下方留出的空白 */
.row > .col { display: flex; flex-direction: column; }
.row > .col > .card:only-child,
.row > .col > .product-card:only-child { flex: 1; }
.row > .col > .card:only-child { display: flex; flex-direction: column; }
.row > .col > .card:only-child > .card-body { flex: 1; }

/* 客户计费的 CDN / AI 分组标识 */
.ftag {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1px 6px; border-radius: 4px;
  font-size: 11px; font-weight: 600; line-height: 16px;
  margin-right: 6px; flex: 0 0 auto;
}
.ftag.cdn { color: #2563eb; background: #eef4ff; }
.ftag.ai  { color: #7c3aed; background: #f5f0ff; }
.fee-sep {
  display: flex; align-items: center; gap: 8px;
  margin: 2px 0 14px; padding-bottom: 8px;
  border-bottom: 1px dashed #e8eef7;
  font-size: 13px; font-weight: 600; color: #0f172a;
}
.fee-sep .ftag { margin-right: 0; }
.fee-sep .fs-tip { font-size: 12px; font-weight: 400; color: var(--text-3); }
.fee-line { display: flex; align-items: center; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
.section-title .st-line { width: 3px; height: 14px; border-radius: 2px; background: var(--brand-grad); }
.section-title .st-tip { font-size: 12px; font-weight: 400; color: var(--text-3); }

/* ==================================================================
 * 统计卡
 * ================================================================== */

.stat-grid { display: grid; gap: 14px; }
.stat-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat {
  position: relative;
  width: auto;
  min-width: 0;
  padding: 18px 20px 16px;
  background: #fff;
  border: 1px solid #e9eff8;
  border-radius: var(--r-lg);
  box-shadow: none;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.stat::after {
  content: ' ';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
}
.stat:hover { border-color: #d7e2f3; box-shadow: 0 8px 22px -16px rgba(23, 43, 77, .5); }
.stat .stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.stat .stat-label svg {
  width: 24px; height: 24px;
  padding: 4px;
  border-radius: 7px;
  box-sizing: border-box;
  color: var(--brand);
  background: #eef3ff;
  flex: 0 0 auto;
}
.stat .stat-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 12px;
  font-size: 27px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -.6px;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.stat .stat-value small { font-size: 13px; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.stat .stat-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.stat.is-brand::after { background: var(--brand-grad); }
.stat.is-brand .stat-label svg { color: #3b76f0; background: #eef3ff; }
.stat.is-brand .stat-value { color: var(--brand); }
.stat.is-danger::after { background: linear-gradient(180deg, #ff8b8e, #e5484d); }
.stat.is-danger .stat-label svg { color: var(--danger); background: #fdeeee; }
.stat.is-danger .stat-value { color: var(--danger); }

@media (max-width: 1240px) {
  .stat-grid.cols-4, .stat-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .stat-grid.cols-4, .stat-grid.cols-5, .stat-grid.cols-3, .stat-grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
}

/* 统计卡独占一张卡片体时，剥掉外层容器，让它们直接排在页面上 */
.card:has(> .card-body > .stat-grid:only-child) {
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 4px;
}
.card:has(> .card-body > .stat-grid:only-child) > .card-body { padding: 0; }
.card:has(> .card-body > .stat-grid:only-child) > .card-head {
  padding: 0 2px;
  min-height: 40px;
  border-bottom: none;
}

.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 500; }
.delta.up { color: var(--danger); }
.delta.down { color: var(--success); }
.delta.flat { color: var(--text-3); }

/* ==================================================================
 * 按钮
 * ================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  color: #31435c;
  background: #fff;
  border: 1px solid var(--line-3);
  border-radius: var(--r);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: color .16s, border-color .16s, background .16s, box-shadow .16s;
}
.btn:hover { color: var(--brand); border-color: #b9cdfb; background: #f9fbff; }
.btn:active { color: var(--brand-active); border-color: var(--brand-active); }
.btn:disabled, .btn.disabled {
  color: var(--text-4);
  background: #f7f9fc;
  border-color: var(--line);
  cursor: not-allowed;
  box-shadow: none;
}
.btn:disabled:hover { color: var(--text-4); border-color: var(--line); background: #f7f9fc; }

.btn.primary {
  color: #fff;
  background: linear-gradient(180deg, #3b76f0 0%, #2563eb 100%);
  border-color: #2563eb;
  box-shadow: 0 1px 2px rgba(47, 92, 246, .3), 0 6px 16px -8px rgba(47, 92, 246, .7);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #5b7ff9 0%, #3d68f7 100%);
  border-color: #3d68f7;
  color: #fff;
}
.btn.primary:active { background: var(--brand-active); border-color: var(--brand-active); color: #fff; }
.btn.primary:disabled, .btn.primary.disabled {
  color: #fff;
  background: #aebffb;
  border-color: #aebffb;
  box-shadow: none;
}

.btn.danger { color: var(--danger); border-color: #f4c3c5; background: #fff; }
.btn.danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn.danger.solid { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn.danger.solid:hover { background: #d93a3f; border-color: #d93a3f; }

.btn.ghost { color: var(--brand); border-color: #c6d6fd; background: transparent; }
.btn.ghost:hover { color: #fff; background: var(--brand); border-color: var(--brand); }

.btn.text { height: auto; padding: 0 4px; border-color: transparent; background: transparent; color: var(--brand); }
.btn.text:hover { color: var(--brand-hover); background: transparent; border-color: transparent; }
.btn.text.plain { color: var(--text-2); }
.btn.text.plain:hover { color: var(--brand); }
.btn.text.danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn.text.danger:hover { color: #f26065; background: transparent; }

.btn.dashed { border-style: dashed; }
.btn.block { width: 100%; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.lg { height: 42px; padding: 0 22px; font-size: 14px; border-radius: 10px; }
.btn svg { flex: 0 0 auto; }

/* ==================================================================
 * 标签 / 厂商
 * ================================================================== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-2);
  background: #f2f5fa;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
}
.tag.plain { border-color: transparent; background: transparent; padding: 0; height: auto; line-height: inherit; }
.tag.blue { color: #2563eb; background: #edf2ff; }
.tag.green { color: #0b8a57; background: #e8f9f1; }
.tag.red { color: #d33a3f; background: #fdeeef; }
.tag.orange { color: #b3690a; background: #fff4e4; }
.tag.purple { color: #6446e0; background: #f1eeff; }
.tag.gray { color: #6b7d96; background: #f1f4fa; }
.tag.dot::before {
  content: ' ';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex: 0 0 auto;
}

.vn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}
.vn i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: block; flex: 0 0 auto; }
.vn-aliyun { color: #cf5b12; background: #fff3ea; }
.vn-tencent { color: #1664ff; background: #eef4ff; }
.vn-volcano { color: #6d3ce0; background: #f4f0ff; }
.vn-qiniu { color: #0b82b8; background: #eefaff; }
.vn-none { color: #94a3b8; background: #f1f5f9; }
/* 图标模式：只显示厂商字标，悬停出全名，避免表格里出现「阿里云/腾讯云」长文案 */
.vn.vn-ico {
  width: 24px; height: 24px; padding: 0;
  border-radius: 7px;
  justify-content: center;
  font-weight: 600;
  user-select: none;
}
.vn.vn-ico b { font-size: 12px; line-height: 1; font-weight: 600; }
.vn.vn-ico:hover { filter: brightness(.96); }

/* ==================================================================
 * 表格
 * ================================================================== */

.table-wrap { width: 100%; overflow-x: auto; }
.table-wrap::-webkit-scrollbar { height: 8px; }

.ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vendor-set { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.td-nowrap, table.tb td.td-nowrap, table.tb th.td-nowrap { white-space: nowrap; }

table.tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.tb.fixed { table-layout: fixed; }
table.tb.fixed th, table.tb.fixed td { overflow: hidden; }

table.tb th {
  padding: 11px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #6b7d96;
  background: #fafcff;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tb th:first-child { border-top-left-radius: 10px; }
table.tb th:last-child { border-top-right-radius: 10px; }

table.tb td {
  padding: 12px 16px;
  color: #2b3c56;
  border-bottom: 1px solid #f2f5fb;
  vertical-align: middle;
}
table.tb tbody tr { transition: background .14s; }
table.tb tbody tr:hover td { background: #f7faff; }
table.tb tbody tr.selected td { background: var(--brand-weak); }
table.tb tbody tr:last-child td { border-bottom: none; }

table.tb td.mono, table.tb .mono { font-family: var(--mono); font-size: 12.5px; }
table.tb .td-strong { color: #0f172a; font-weight: 600; }
table.tb .td-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
table.tb .td-actions > * { flex: 0 0 auto; white-space: nowrap; }
table.tb .tag-list { flex-wrap: wrap; }
table.tb .tag-list > * { flex: 0 0 auto; }
table.tb td .code-inline { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
table.tb .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tb th.num { text-align: right; }
/* 用量统计明细数据表（CDN / AI）：数据列左对齐 */
table.tb.dt-left th.num, table.tb.dt-left td.num { text-align: left; }
table.tb.compact th, table.tb.compact td { padding: 9px 12px; }
table.tb.compact th { font-size: 11.5px; }

.tb-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5fb;
}
.tb-toolbar .spacer { flex: 1 1 auto; }

.tb-selected-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  background: var(--brand-weak);
  border-bottom: 1px solid #e2eaff;
  font-size: 13px;
  color: var(--brand);
}
/* 卡片头部里的紧凑版（域名管理批量操作条） */
.tb-selected-tip.inline {
  padding: 4px 10px;
  gap: 8px;
  font-size: 12.5px;
  border: 1px solid #e2eaff;
  border-bottom: 1px solid #e2eaff;
  border-radius: 8px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 14px 20px;
  font-size: 13px;
  color: var(--text-2);
}
.pagination .pg-total { margin-right: auto; color: var(--text-3); font-size: 12.5px; }
.pagination .pg-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-3);
  border-radius: 8px;
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  transition: all .15s;
}
.pagination .pg-btn:hover { border-color: #b9cdfb; color: var(--brand); background: #f9fbff; }
.pagination .pg-btn.active { border-color: var(--brand); color: #fff; background: var(--brand); font-weight: 600; }
.pagination .pg-btn:disabled { color: var(--text-4); border-color: var(--line); cursor: not-allowed; background: #fafbfe; }
.pagination .pg-cur { color: var(--text-2); font-size: 12.5px; padding: 0 4px; white-space: nowrap; }
.pagination .pg-jump,
.pager .pg-jump { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12.5px; margin-left: 6px; white-space: nowrap; }
.pagination .pg-jump-input,
.pager .pg-jump-input {
  width: 52px; height: 32px; padding: 0 8px; text-align: center;
  border: 1px solid var(--line-3); border-radius: 8px; background: #fff;
  font-size: 13px; color: var(--text-1); outline: none; transition: border-color .15s;
  -moz-appearance: textfield; appearance: textfield;
}
.pagination .pg-jump-input::-webkit-outer-spin-button,
.pagination .pg-jump-input::-webkit-inner-spin-button,
.pager .pg-jump-input::-webkit-outer-spin-button,
.pager .pg-jump-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pagination .pg-jump-input:focus,
.pager .pg-jump-input:focus { border-color: #b9cdf6; box-shadow: var(--ctl-ring); }

/* ==================================================================
 * 表单
 * ================================================================== */

.field { margin-bottom: 18px; }
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #3b4d68;
  line-height: 20px;
}
.field-label .fl-main { display: inline-flex; align-items: center; }
.field-label .fl-extra { display: inline-flex; align-items: center; gap: 8px; }
.field-label .req { color: var(--danger); margin-right: 4px; }
.field-label .opt { color: var(--text-4); font-size: 12px; font-weight: 400; margin-left: 6px; }
.field-hint { margin-top: 6px; font-size: 12px; color: var(--text-3); line-height: 18px; }
.field-error { margin-top: 6px; font-size: 12px; color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  min-height: 36px;
  padding: 6px 11px;
  font-size: 13.5px;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-3);
  border-radius: var(--r);
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: #c8d6ea; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 92, 246, .14);
}
.input:disabled, .select:disabled, .textarea:disabled {
  background: #f6f8fc;
  color: var(--text-4);
  cursor: not-allowed;
}
.input.mono { font-family: var(--mono); font-size: 12.5px; }
.textarea { min-height: 80px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%238697ae' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1 1 auto; }

.input-affix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-3);
  border-radius: var(--r);
  overflow: hidden;
  background: #fff;
}
.input-affix .input { border: none; box-shadow: none; border-radius: 0; }
.input-affix .input:focus { box-shadow: none; }
.input-affix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 92, 246, .14); }

.search-box { position: relative; display: inline-flex; align-items: center; }
.search-box svg { position: absolute; left: 11px; color: var(--text-4); pointer-events: none; }
.search-box .input { padding-left: 32px; }

.cb, .rd {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  line-height: 22px;
}
.cb input, .rd input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin: 3px 0 0;
  border: 1px solid #c9d5e6;
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  position: relative;
  transition: all .16s;
}
.cb input { border-radius: 4px; }
.rd input { border-radius: 50%; }
.cb input:hover, .rd input:hover { border-color: var(--brand); }
.cb input:checked, .rd input:checked { background: var(--brand); border-color: var(--brand); }
.cb input:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 1.5px;
  width: 4px; height: 8px;
  border: 2px solid #fff;
  border-top: 0; border-left: 0;
  transform: rotate(45deg);
}
.rd input:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
}
.cb input:disabled, .rd input:disabled { background: #f2f5fa; border-color: var(--line-3); cursor: not-allowed; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.switch .sw-track {
  width: 38px; height: 21px;
  border-radius: 999px;
  background: #ccd7e6;
  position: relative;
  transition: background .2s;
  flex: 0 0 auto;
}
.switch .sw-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #fff;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(16, 32, 64, .28);
}
.switch.on .sw-track { background: var(--brand); }
.switch.on .sw-thumb { left: 19px; }
.switch.disabled { cursor: not-allowed; color: var(--text-4); }
.switch.disabled .sw-track { background: var(--line-3); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: #f2f5fa; border-radius: 10px; }
.seg .seg-item {
  padding: 5px 14px;
  font-size: 13px;
  color: var(--text-2);
  border-radius: 8px;
  cursor: pointer;
  transition: all .16s;
  white-space: nowrap;
}
.seg .seg-item:hover { color: var(--text); }
.seg .seg-item.active {
  color: var(--brand);
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 32, 64, .1);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  font-size: 13px;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--line-3);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: all .16s;
}
.chip:hover { color: var(--brand); border-color: #bfd1fb; }
.chip.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 4px 12px -6px rgba(47, 92, 246, .8);
}

/* ==================================================================
 * 弹层
 * ================================================================== */

.mask {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 16px;
  overflow-y: auto;
  background: rgba(12, 21, 38, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.modal {
  width: 600px;
  max-width: 100%;
  margin: auto 0;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: 0 32px 80px -24px rgba(9, 17, 34, .5);
  animation: pop .18s ease-out;
  overflow: hidden;
}
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.99); } to { opacity: 1; transform: none; } }
.modal.sm { width: 420px; }
.modal.lg { width: 760px; }
.modal.xl { width: 960px; }
.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px 14px;
}
.modal-title { flex: 1 1 auto; font-size: 16px; font-weight: 600; color: #0f172a; letter-spacing: -.1px; }
.modal-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: all .15s;
}
.modal-close:hover { color: var(--text); background: var(--bg-soft); }
.modal-body { padding: 4px 24px 20px; max-height: 62vh; overflow-y: auto; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid #f1f5fb;
  background: #fbfcfe;
}

.drawer-mask { position: fixed; inset: 0; z-index: 900; background: rgba(12, 21, 38, .48); backdrop-filter: blur(2px); }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 560px;
  max-width: 100%;
  z-index: 901;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -24px 0 64px -32px rgba(9, 17, 34, .5);
  animation: slidein .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slidein { from { transform: translateX(24px); opacity: .3; } to { transform: none; opacity: 1; } }
.drawer.wide { width: 880px; }
.drawer.xwide { width: 1180px; }
.drawer-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5fb;
}
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 20px 24px; }
.drawer-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid #f1f5fb;
  background: #fbfcfe;
}

.dd {
  position: absolute;
  min-width: 168px;
  padding: 6px;
  z-index: 950;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  animation: pop .14s ease-out;
}
.dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: background .14s, color .14s;
}
.dd-item:hover { background: var(--brand-weak); color: var(--brand); }
.dd-item.danger { color: var(--danger); }
.dd-item.danger:hover { background: #fdeeef; color: var(--danger); }
.dd-item.disabled { color: var(--text-4); cursor: not-allowed; }
.dd-item.disabled:hover { background: transparent; color: var(--text-4); }
.dd-divider { height: 1px; margin: 5px 4px; background: var(--line-2); }
/* 顶栏客户筛选（平台管理端）：搜索 + 全选 + 多选列表 */
.hd-cust-btn { gap: 5px; }
.hd-cust-n {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: #2f5cf6; color: #fff; font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.pf-dd { right: 0; top: 38px; width: 280px; padding: 8px; }
.pf-search {
  display: flex; align-items: center; gap: 6px; padding: 0 8px; margin-bottom: 6px;
  height: 30px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-3);
}
.pf-search input { border: 0; outline: 0; flex: 1; font-size: 12.5px; background: transparent; }
.pf-all { background: #f7faff; font-weight: 600; color: #2f5cf6; margin-bottom: 4px; }
.pf-list { max-height: 264px; overflow-y: auto; }
.pf-chk {
  width: 15px; height: 15px; border-radius: 4px; border: 1.4px solid #c9d4e5;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto;
  transition: all .12s;
}
.pf-chk.on { background: #2f5cf6; border-color: #2f5cf6; }
.pf-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.pf-code { font-size: 11px; color: var(--text-4); font-family: var(--mono); }
.pf-empty { padding: 14px 0; text-align: center; color: var(--text-4); font-size: 12.5px; }

.toast-wrap {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 520px;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  animation: pop .18s ease-out;
}
.toast .t-icon { flex: 0 0 auto; }
.toast.ok .t-icon { color: var(--success); }
.toast.err .t-icon { color: var(--danger); }
.toast.warn .t-icon { color: var(--warning); }
.toast.info .t-icon { color: var(--brand); }

/* ==================================================================
 * Tabs / Steps / Alert / Empty
 * ================================================================== */

.tabs { display: flex; align-items: center; gap: 26px; border-bottom: 1px solid var(--line); }
.tab {
  position: relative;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: color .16s;
}
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); font-weight: 600; }
.tab.active::after {
  content: ' ';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--brand);
}
.tabs.card-tabs { padding: 0 20px; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 21px;
  border: 1px solid transparent;
  border-radius: 11px;
}
.alert .al-icon { flex: 0 0 auto; margin-top: 2px; }
.alert .al-body { flex: 1 1 auto; min-width: 0; }
.alert .al-title { margin-bottom: 2px; font-weight: 600; }
.alert.info { color: #24467e; background: #eff4ff; border-color: #e0e9ff; }
.alert.info .al-icon { color: var(--brand); }
.alert.warn { color: #8a4d00; background: #fff8ec; border-color: #fbe9c8; }
.alert.warn .al-icon { color: var(--warning); }
.alert.err { color: #a32b30; background: #fdf0f0; border-color: #f9dcdc; }
.alert.err .al-icon { color: var(--danger); }
.alert.ok { color: #0a6b45; background: #ecfaf3; border-color: #d3f2e3; }
.alert.ok .al-icon { color: var(--success); }

.empty { padding: 56px 24px; text-align: center; }
.empty .em-icon {
  width: 76px; height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #b3c3da;
  background: radial-gradient(circle at 34% 28%, #f7faff, #e9eefa);
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px -12px rgba(23, 43, 77, .3);
}
.empty .em-title { font-size: 14px; font-weight: 500; color: var(--text-2); }
.empty .em-desc { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.empty .em-actions { margin-top: 18px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================================================================
 * 描述列表
 * ================================================================== */

.desc { display: flex; flex-wrap: wrap; }
.desc .desc-item { width: 50%; display: flex; gap: 12px; padding: 10px 0; min-width: 0; }
.desc.cols-3 .desc-item { width: 33.3333%; }
.desc .di-label { flex: 0 0 96px; font-size: 13px; line-height: 22px; color: var(--text-3); }
.desc .di-value { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 22px; color: var(--text); word-break: break-all; }
@media (max-width: 900px) { .desc .desc-item { width: 100%; } }

/* ==================================================================
 * 图表
 * ================================================================== */

.chart-box { position: relative; width: 100%; }
.chart-box svg { display: block; width: 100%; overflow: visible; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 12px;
  font-size: 12px;
  color: var(--text-2);
}
.chart-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .lg-item.clickable { cursor: pointer; user-select: none; transition: opacity .15s, color .15s; }
.chart-legend .lg-item.clickable:hover { color: var(--text); }
.chart-legend .lg-item.off { opacity: .38; }
.chart-legend .lg-item.off .lg-dot { background: #c3ccdb !important; }
.chart-legend .lg-dot { width: 8px; height: 8px; border-radius: 2px; }
.chart-empty {
  padding: 64px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-4);
}
.chart-empty::before {
  content: '◍';
  display: block;
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  line-height: 56px;
  border-radius: 50%;
  font-size: 24px;
  color: #b3c3da;
  background: radial-gradient(circle at 34% 28%, #f7faff, #e9eefa);
}
/* 图表悬停提示：位置由 JS 逐帧缓动跟随（略有延迟拖尾），此处只管外观与翻面过渡 */
.chart-tipv {
  position: absolute;
  z-index: 6;
  min-width: 148px;
  max-width: 280px;
  padding: 8px 11px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid #e3eaf5;
  box-shadow: 0 12px 28px -14px rgba(15, 23, 42, .5), 0 1px 3px rgba(15, 23, 42, .06);
  backdrop-filter: blur(6px);
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
  pointer-events: none;
  transform: translate(14px, -50%);
  transition: transform .18s cubic-bezier(.22, .61, .36, 1);
  animation: tip-in .15s ease-out;
}
.chart-tipv.flip { transform: translate(calc(-100% - 14px), -50%); }
@keyframes tip-in { from { opacity: 0; } to { opacity: 1; } }
.chart-tipv .ct-time {
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f0f4fa;
  font-size: 11.5px;
  font-weight: 600;
  color: #16233a;
  white-space: nowrap;
}
.chart-tipv .ct-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-tipv .ct-row + .ct-row { margin-top: 2px; }
.chart-tipv .ct-name { flex: 1 1 auto; padding-right: 10px; color: #7c8ba3; }
.chart-tipv .ct-row b { font-weight: 600; color: #16233a; font-variant-numeric: tabular-nums; }
.chart-tipv .ct-row b.ct-pct { font-weight: 700; color: #16233a; }
.chart-tipv .ct-row .ct-val { color: #7c8ba3; font-size: 11.5px; margin-left: 1px; }
/* 带占比的提示框（状态码图）：紧凑连排——名称对齐后，占比与数值紧贴，无撑开空白 */
.chart-tipv.has-pct { min-width: 0; padding: 6px 9px 7px; font-size: 11.5px; }
.chart-tipv.has-pct .ct-time { margin-bottom: 3px; padding-bottom: 3px; font-size: 11px; }
.chart-tipv.has-pct .ct-row { gap: 3px; }
.chart-tipv.has-pct .ct-row + .ct-row { margin-top: 1px; }
.chart-tipv.has-pct .ct-name { flex: 0 0 auto; padding-right: 0; }
.chart-tipv.has-pct .ct-pct { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.chart-tipv.has-pct .ct-val { flex: 0 0 auto; font-size: 11px; font-variant-numeric: tabular-nums; }
/* 深色提示框（状态码图，参照经典 CDN 控制台样式） */
.chart-tipv.dark {
  background: rgba(22, 30, 46, .94);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 14px 32px -12px rgba(15, 23, 42, .55);
}
.chart-tipv.dark .ct-time { color: #fff; border-bottom-color: rgba(255, 255, 255, .14); }
.chart-tipv.dark .ct-name { color: rgba(255, 255, 255, .72); padding-right: 8px; }
.chart-tipv.dark .ct-row b { color: #fff; }
.chart-tipv.dark .ct-row b.ct-pct { color: #fff; }
.chart-tipv.dark .ct-row .ct-val { color: rgba(255, 255, 255, .72); }

.lg-dot { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; display: inline-block; }

/* 环形图横向布局：圆环+图例靠左留白区，数据表独立右移（hover 联动高亮） */
.donut-h { display: flex; align-items: center; gap: 40px; padding-left: 88px; }
.donut-h .donut-svg { flex: 0 0 auto; }
.donut-h .donut-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 92px;
}
.donut-h .ds-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: #475569;
  cursor: default;
  transition: color .15s;
}
.donut-h .ds-item .lg-dot { width: 9px; height: 9px; border-radius: 50%; transition: box-shadow .15s; }
.donut-h .ds-item.on { color: #0f172a; font-weight: 600; }
.donut-h .ds-item.on .lg-dot { box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
/* 图例超 10 项分两列（第一列最多 10 个，剩余进第二列） */
.donut-h .donut-side.two { display: flex; flex-direction: row; gap: 38px; }
.donut-h .donut-side.two .ds-col { display: flex; flex-direction: column; gap: 11px; }
/* 数据表：固定紧凑宽度，与图例间留大空白 */
.donut-h .donut-tbl2 { flex: 0 0 auto; width: 372px; margin-left: 84px; }
.donut-h .dtt-h {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: #93a3bb;
  padding: 0 10px 8px;
  border-bottom: 1px solid #eef2f7;
}
/* 三列：名称定宽紧贴数量列，比例列与数量列拉开间距 */
.donut-h .dtt-h span:first-child { flex: 0 0 96px; }
.donut-h .dtt-h .num { flex: 0 0 124px; text-align: right; }
.donut-h .dtt-h .num.pct { flex: 0 0 84px; margin-left: 26px; }
.donut-h .dtt-r {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  font-size: 12.5px;
  color: #1e293b;
  border-bottom: 1px solid #f4f7fb;
  border-radius: 6px;
  cursor: default;
  transition: background .15s;
}
.donut-h .dtt-r:hover, .donut-h .dtt-r.on { background: #f8fafc; }
.donut-h .dtt-r span:first-child { flex: 0 0 96px; }
.donut-h .dtt-r .num { flex: 0 0 124px; text-align: right; font-variant-numeric: tabular-nums; color: #5b6b82; }
.donut-h .dtt-r .num b { font-weight: 600; color: #0f172a; }
.donut-h .dtt-r .num.pct { flex: 0 0 84px; margin-left: 26px; }
/* 数据表分页（复用 AI 排行 tk-pager 样式，居表格右下） */
.donut-h .dn-pager { margin-top: auto; padding: 8px 8px 0; }
.donut-seg { cursor: pointer; transition: opacity .15s; }
/* 悬停数值提示（teleport 到 body，fixed 定位防卡片裁剪；与 chart-tipv 同风格浅色） */
.dn-tip {
  position: fixed;
  z-index: 990;
  pointer-events: none;
  min-width: 150px;
  padding: 8px 12px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid #e3eaf5;
  box-shadow: 0 12px 28px -14px rgba(15, 23, 42, .5), 0 1px 3px rgba(15, 23, 42, .06);
  backdrop-filter: blur(6px);
  color: #334155;
}
.dn-tip .t-name { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #0f172a; }
.dn-tip .t-name i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.dn-tip .t-val { margin-top: 3px; font-size: 12px; color: #64748b; font-variant-numeric: tabular-nums; }
.dn-tip .t-val b { color: #0f172a; font-weight: 600; }
@media (max-width: 900px) { .donut-h { flex-direction: column; gap: 18px; padding-left: 0; } .donut-h .donut-tbl2 { width: 100%; margin-left: 0; } }


.donut-wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.donut-legend { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 11px; }
.donut-legend .dl-item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.donut-legend .dl-item span { flex: 1 1 auto; min-width: 0; }
.donut-legend .dl-item b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.donut-legend .dl-item small { width: 50px; text-align: right; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.legend-note {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 10px;
  font-size: 12px;
  color: var(--text-3);
}
.legend-note .ln-item { display: inline-flex; align-items: center; gap: 6px; }

/* ==================================================================
 * 业务小组件
 * ================================================================== */

.kv-list { display: flex; flex-direction: column; }
.kv-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--line-2);
}
.kv-item:last-child { border-bottom: none; }
.kv-item .kv-k { flex: 0 0 108px; color: var(--text-3); }
.kv-item .kv-v { flex: 1 1 auto; min-width: 0; color: var(--text); word-break: break-all; }

.dom-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dom-cell .dc-name { display: flex; align-items: center; gap: 6px; font-weight: 500; color: #0f172a; }
.dom-cell .dc-name .dom-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 域名管理工具栏：单行「添加域名 + 导出(左) … 状态/业务/客户/搜索/刷新(右)」 */
.dom-head-bar { padding-left: 0; padding-right: 0; }
/* 客户列：过长省略 */
.cust-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* CNAME：点击即复制，悬停给可点反馈 */
/* CNAME 解析状态：绿色=已配置（已解析到 CDN）、橙色=未配置（未解析）、灰色=未分配 CNAME */
.cn-tag {
  display: inline-flex; align-items: center; justify-content: center;
  height: 24px; padding: 0 9px;
  border-radius: 6px; border: 1px solid transparent;
  font-size: 12.5px; font-weight: 500; line-height: 1;
  white-space: nowrap; cursor: copy;
  transition: background .14s, border-color .14s, color .14s;
}
.cn-tag.ok { color: #057a55; background: #ecfdf5; border-color: #b7f0d6; }
.cn-tag.fail { color: #b45309; background: #fff7ed; border-color: #fed7aa; }
.cn-tag.none { color: #64748b; background: #f4f6fa; border-color: #e5eaf3; }
.cn-tag:hover { border-color: currentColor; }
.cn-tag.ok:hover { background: #d7f7e8; }
.cn-tag.fail:hover { background: #ffedd5; }
.cn-tag.none:hover { background: #eef2f7; }

/* CNAME 悬停卡片（fixed 定位，不会被表格滚动容器裁剪） */
.cn-tip {
  position: fixed; z-index: 3000;
  transform: translate(-50%, -100%);
  min-width: 170px; max-width: 340px;
  padding: 9px 11px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e3eaf5;
  box-shadow: 0 14px 32px -16px rgba(15, 23, 42, .45), 0 2px 6px rgba(15, 23, 42, .06);
  pointer-events: none;
}
.cn-tip::after {
  content: ''; position: absolute; left: 50%; bottom: -5px;
  width: 9px; height: 9px; margin-left: -4.5px;
  background: #fff; border-right: 1px solid #e3eaf5; border-bottom: 1px solid #e3eaf5;
  transform: rotate(45deg);
}
.cn-tip-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.cn-tip-h b { font-weight: 600; }
.cn-tip.ok .cn-tip-h b { color: #059669; }
.cn-tip.fail .cn-tip-h b { color: #d97706; }
.cn-tip.none .cn-tip-h b { color: #64748b; }
.cn-tip-c { margin-top: 5px; font-size: 12px; color: #0f172a; word-break: break-all; line-height: 1.45; }
.cn-tip-f { margin-top: 5px; font-size: 11px; color: #94a3b8; }

/* 厂商品牌图标（域名管理表格） */
.vn-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid transparent; transition: background .14s, border-color .14s;
}
.vn-logo svg { display: block; }
.vn-logo-aliyun { color: #cf5b12; }
.vn-logo-tencent { color: #1664ff; }
.vn-logo-volcano { color: #6d3ce0; }
.vn-logo:hover { background: #f5f8fd; border-color: #e6edf9; }
.vn-logo-none { color: #94a3b8; font-size: 12px; font-weight: 700; background: #f1f5f9; }
.vn-logo-none b { line-height: 1; }

/* 域名管理卡片：标题下不再留大段空白，正文字号整体放大两号 */
.dom-card .card-body { padding-top: 0; }
.dom-card .tb-toolbar { padding-top: 12px; }
.dom-card table.tb { font-size: 15px; min-width: 960px; }
/* 操作列右对齐贴表格右缘 */
.dom-card thead th.th-act { text-align: right; }
.dom-card td.col-act { min-width: 185px; }
.dom-card td.col-act .td-actions { justify-content: flex-end; }
.dom-card table.tb th { font-size: 13.5px; }
.dom-card table.tb.compact th, .dom-card table.tb.compact td { padding: 11px 12px; }
.dom-card .fs12 { font-size: 14px; }
.dom-card .tag { font-size: 13px; height: 24px; padding: 0 8px; }
.dom-card .dom-cell .dc-cname { font-size: 13.5px; }
.dom-card .dom-cell .dc-remark-input { font-size: 14px; height: 30px; max-width: 260px; }
.dom-card .vendor-set { gap: 4px; }
.dom-card .vn-logo { width: 30px; height: 30px; border-radius: 9px; }
.dom-card .vn-logo svg { width: 19px; height: 19px; }
.dom-card .cn-tag { height: 26px; font-size: 13px; padding: 0 10px; }
.dom-card .td-actions { gap: 10px; }

/* 小屏笔记本（≤1440）：字号与内边距回落一档，避免域名列被挤到看不见 */
@media (max-width: 1440px) {
  .dom-card table.tb { font-size: 14px; }
  .dom-card table.tb th { font-size: 13px; }
  .dom-card table.tb.compact th, .dom-card table.tb.compact td { padding: 10px 10px; }
  .dom-card .fs12 { font-size: 13px; }
  .dom-card .tag { font-size: 12.5px; height: 23px; padding: 0 7px; }
  .dom-card .td-actions { gap: 9px; }
  .dom-card .vn-logo { width: 27px; height: 27px; border-radius: 8px; }
  .dom-card .vn-logo svg { width: 17px; height: 17px; }
  .dom-card .dc-remark-input { max-width: 190px; }
}
@media (max-width: 1180px) {
  .dom-head-bar { gap: 8px; }
  .dom-card .tb-toolbar .search-box .input { width: 140px !important; }
}

/* 手机端（≤760px）：域名列表改为卡片式堆叠布局，无横向滚动 */
@media (max-width: 760px) {
  .dom-card .card-head { padding: 13px 14px; }
  .dom-card .tb-toolbar { padding: 10px 12px; gap: 8px; }
  .dom-head-bar .csel { width: calc(50% - 4px) !important; }
  .dom-head-bar .search-box { flex: 1 1 54%; min-width: 0; }
  .dom-head-bar .search-box .input { width: 100% !important; }

  .dom-card .table-wrap { overflow-x: visible; }
  .dom-card table.tb { display: block; table-layout: auto; width: 100%; }
  .dom-card table.tb thead { display: none; }
  .dom-card table.tb tbody { display: block; }
  .dom-card tbody tr {
    display: block;
    padding: 12px 14px 10px;
    border-bottom: 1px solid #eef2f8;
  }
  .dom-card tbody tr:last-child { border-bottom: 0; }
  .dom-card tbody td {
    display: flex; align-items: center; gap: 10px;
    padding: 3px 0 !important;
    border: 0 !important;
    font-size: 13.5px;
    line-height: 1.45;
  }
  .dom-card tbody td[data-l]::before {
    content: attr(data-l);
    flex: 0 0 52px;
    font-size: 12px;
    color: var(--text-3);
  }
  .dom-card td.col-check { display: none; }
  .dom-card td.col-domain { display: block; padding-bottom: 7px !important; }
  .dom-card td.col-domain .dom-link { font-size: 15px; font-weight: 600; }
  .dom-card td.col-act { flex-wrap: wrap; padding-top: 8px !important; }
  .dom-card td.col-act .td-actions { gap: 4px 12px; }
  .pager-dom { flex-wrap: wrap; }
  .pager-dom .pg-size { padding-left: 14px; }
  .pager-dom .pagination { padding: 12px 14px; flex-wrap: wrap; }

  /* 全局：禁止横向滚动（任何残留溢出都不再把页面带跑） */
  html, body { overflow-x: hidden; }

  /* 顶栏下拉（客户筛选/账号菜单）改为贴边固定，不再被锚点挤出屏幕 */
  .dd {
    position: fixed !important;
    left: 10px !important; right: 10px !important; top: 58px !important;
    min-width: 0; width: auto;
    max-height: 68vh; overflow-y: auto;
  }
  .pf-dd { width: auto; }

  /* 抽屉（域名配置/详情）：头部紧凑、左侧分组收成图标列，点击图标切换 */
  .drawer-head { padding: 12px 14px; }
  .drawer-head .modal-title { font-size: 14.5px; word-break: break-all; }
  .drawer-head .muted.fs12 { word-break: break-all; }
  .drawer-foot { padding: 10px 14px; }
  .cfg-nav { width: 54px !important; padding: 8px 6px !important; }
  .cfg-nav .ap-label { display: none; }
  .cfg-nav .ap-item { justify-content: center; padding: 11px 0; }
  .cfg-nav .ap-item .ap-idx { width: auto; }
  .cfg-body { padding: 16px 14px !important; }

  /* 抽屉内编辑表格（源站/缓存规则）卡片化：每个字段一行，不再横向滚动 */
  .cfg-body table.tb thead { display: none; }
  .cfg-body table.tb, .cfg-body table.tb tbody, .cfg-body table.tb tr, .cfg-body table.tb td { display: block; width: 100%; }
  .cfg-body table.tb tr {
    padding: 9px 12px; margin-bottom: 8px;
    border: 1px solid var(--line); border-radius: 10px;
  }
  .cfg-body table.tb td { display: flex; align-items: center; gap: 10px; padding: 4px 0 !important; border: 0 !important; }
  .cfg-body table.tb td[data-l]::before { content: attr(data-l); flex: 0 0 46px; font-size: 12px; color: var(--text-3); }
  .cfg-body table.tb td .input { flex: 1 1 auto; min-width: 0; width: auto !important; }
  .cfg-body table.tb td .csel { flex: 1 1 auto; min-width: 0; }
  .cfg-body table.tb td.src-act { justify-content: flex-end; }
  .cfg-body table.tb td.muted { justify-content: center; font-size: 12.5px; }
}
.dom-cell .dc-cname { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
/* 备注行内编辑：默认看着是普通文字，悬停出现铅笔感，点击变输入框 */
.dom-cell .dc-remark {
  font-family: inherit; cursor: text; border-radius: 5px;
  padding: 1px 6px; margin-left: -6px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background .12s, color .12s;
}
.dom-cell .dc-remark:hover { background: #f1f5fd; color: #2f5cf6; }
.dom-cell .dc-remark-input {
  height: 26px; font-size: 12px; max-width: 240px;
  padding: 0 8px; border-radius: 6px;
}
/* 域名本身即入口：点击直接打开域名配置 */
.dom-link {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--accent, #2563eb);
  cursor: pointer;
  border-radius: 4px;
  padding: 1px 2px;
  margin-left: -2px;
  transition: background .15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dom-link:hover { background: var(--accent-soft, #eff4ff); text-decoration: underline; }

/* 分页条（域名管理：条/页选择 + 统一分页组件，样式与费用明细一致） */
.pager-dom {
  display: flex; align-items: center;
  border-top: 1px solid var(--line);
}
.pager-dom .pg-size { margin-right: auto; padding-left: 20px; }
.pager-dom .pagination { padding-right: 20px; }

/* 黑白名单批量编辑 */
.bulk-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; font-size: 12.5px; color: var(--text-2);
}
.rule-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 158px; overflow-y: auto; padding: 2px;
}
.rule-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 4px 0 9px;
  border-radius: 6px; background: #f1f5f9; color: #334155;
  font-size: 12px; line-height: 1;
}
.rule-chip i {
  cursor: pointer; width: 16px; height: 16px; line-height: 15px;
  text-align: center; border-radius: 4px; color: #94a3b8; font-style: normal;
}
.rule-chip i:hover { background: #e2e8f0; color: #e5484d; }

/* 源站表格内联编辑 */
.src-table td { padding: 6px 8px; vertical-align: middle; }
.src-table .input, .src-table .select { height: 32px; padding: 0 8px; font-size: 12.5px; }
.src-table .input.mono { font-size: 12px; }

/* 页面顶部配额小字 */
.quota-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px;
  margin: -2px 0 14px;
  font-size: 12px; color: var(--text-3);
}
.quota-line .ql-title {
  font-weight: 600; color: var(--text-2);
  padding-right: 12px; border-right: 1px solid var(--line);
}
.quota-line .ql-item { font-variant-numeric: tabular-nums; }
.quota-line .ql-item b { color: var(--text); font-weight: 600; }
.quota-line .ql-item em { font-style: normal; margin-left: 2px; color: var(--accent); }
.quota-line .ql-hint { margin-left: auto; color: var(--text-3); }

/* 刷新预取：刷新 / 预热切换（分段控件，拉开间距、选中态更明确） */
.rf-seg { margin-bottom: 18px; }
.rf-seg .vs-seg { padding: 3px; gap: 3px; }
.rf-seg .vs-item { height: 32px; padding: 0 22px; font-size: 13px; }
.rf-seg .vs-item.on { color: var(--brand); }
.rf-hit { color: #0b8a57; }
.rf-miss { color: #b3690a; }
.fb-group .btn.icon-btn {
  width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn.icon-btn { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.spin { display: inline-block; animation: spin .9s linear infinite; }

/* 证书自动解析结果 */
.cert-parsed {
  border: 1px solid #d7f0e2;
  background: #f4fdf8;
  border-radius: 10px;
  padding: 14px 16px;
}
.cert-parsed .cp-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: #0f766e;
  margin-bottom: 12px;
}
.cert-parsed .cp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
}
.cert-parsed .cp-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cert-parsed .cp-item span { font-size: 11.5px; color: var(--text-3); }
.cert-parsed .cp-item b { font-size: 13px; font-weight: 600; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cert-parsed .cp-sans { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* 排行榜（横向条形列表，窄卡片里比 SVG 柱状图更清晰） */
.rank-list { display: flex; flex-direction: column; gap: 14px; }
.rank-item { display: flex; align-items: flex-start; gap: 10px; }
.rk-idx {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin-top: 1px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  background: #f2f5fa;
}
.rank-item:nth-child(1) .rk-idx { color: var(--brand); background: #eef3ff; }
.rank-item:nth-child(2) .rk-idx { color: #6b4ee6; background: #f2efff; }
.rank-item:nth-child(3) .rk-idx { color: #0f9d63; background: #e9f9f1; }
.rk-main { flex: 1 1 auto; min-width: 0; }
.rk-top { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.rk-name { flex: 1 1 auto; min-width: 0; color: #2b3c56; }
.rk-top b { font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; }
.rk-top small { font-size: 11px; color: var(--text-3); }
.rk-track { height: 6px; margin-top: 6px; border-radius: 999px; background: #eef2f9; overflow: hidden; }
.rk-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b76f0, #7c9bff); }

.progress { display: flex; align-items: center; gap: 8px; min-width: 118px; }
.progress .pg-track {
  display: block;
  flex: 1 1 auto;
  height: 8px;
  min-width: 40px;
  border-radius: 999px;
  background: #edf1f8;
  overflow: hidden;
}
.progress .pg-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b76f0, #7c9bff);
  transition: width .3s;
}
.progress .pg-fill.ok { background: linear-gradient(90deg, #12b981, #34d399); }
.progress .pg-fill.err { background: linear-gradient(90deg, #e5484d, #ff8b8e); }
.progress .pg-text {
  flex: 0 0 auto;
  width: 46px;
  text-align: right;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* 源站列表：删除按钮（幽灵图标钮，悬停变红；仅剩一个源站时禁用） */
.src-table .src-act { text-align: center; }
.src-table .src-del {
  width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 8px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3); cursor: pointer; vertical-align: middle;
  transition: background .14s, color .14s;
}
.src-table .src-del:hover:not(:disabled) { background: #fef2f2; color: #e5484d; }
.src-table .src-del:disabled { color: #b7c2d3; cursor: not-allowed; }
/* 证书剩余天数：天数数字 + 迷你进度条（ok 绿 / 30-60 琥珀 / err 红） */
.cert-left { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cert-left .cl-top { display: flex; align-items: baseline; gap: 3px; }
.cert-left .cl-num { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: #b45309; line-height: 1; }
.cert-left .cl-unit { font-size: 11px; color: var(--text-3); }
.cert-left .cl-bar { height: 4px; border-radius: 999px; background: #eef2f8; overflow: hidden; }
.cert-left .cl-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #fbbf24); transition: width .3s; }
.cert-left.ok .cl-num { color: #0f9d58; }
.cert-left.ok .cl-bar span { background: linear-gradient(90deg, #12b981, #34d399); }
.cert-left.err .cl-num { color: #e5484d; }
.cert-left.err .cl-bar span { background: linear-gradient(90deg, #e5484d, #ff8b8e); }

.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all .18s;
}
.tile:hover { border-color: #c6d6fd; box-shadow: 0 8px 22px -14px rgba(23, 43, 77, .4); transform: translateY(-1px); }
.tile .tile-icon {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  background: #eef3ff;
}
.tile .tile-main { flex: 1 1 auto; min-width: 0; }
.tile .tile-main b { display: block; font-size: 13.5px; font-weight: 600; color: #0f172a; }
.tile .tile-main small { display: block; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.tile .tile-right { flex: 0 0 auto; color: var(--text-4); }
.tile.on { border-color: var(--brand); background: var(--brand-weak); }

.code-inline {
  padding: 1px 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: #3f5b80;
  background: #f4f7fc;
  border: 1px solid #e8eef7;
  border-radius: 5px;
}
.ap-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid transparent;
  border-radius: 9px;
}
.ap-item:hover { background: var(--bg-soft); }
.ap-item.on { color: var(--brand); background: var(--brand-weak); border-color: #dbe6ff; font-weight: 500; }
.ap-item .ap-idx { width: 22px; text-align: center; font-size: 12px; color: var(--text-4); }
.ap-item.on .ap-idx { color: var(--brand); }

/* 域名配置抽屉：左侧分组导航 + 右侧内容（类名化，便于手机端收成图标列） */
.cfg-nav {
  width: 190px; flex: 0 0 auto;
  border-right: 1px solid var(--line);
  overflow-y: auto; padding: 8px 0;
}
.cfg-body { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 20px 24px; }

.grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 600;
}
.grade.a { color: #0b8a57; background: #e8f9f1; }
.grade.b { color: #2563eb; background: #edf2ff; }
.grade.c { color: #b3690a; background: #fff4e4; }
.grade.d { color: #d33a3f; background: #fdeeef; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.split-line { height: 1px; margin: 20px 0; background: var(--line-2); }

/* ==================================================================
 * 权限格子
 * ================================================================== */

.perm-cell {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  height: 100%;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all .16s;
}
.perm-cell:hover { border-color: #c6d6fd; background: #fbfcff; }
.perm-cell.on { border-color: #b9cdfb; background: var(--brand-weak); }
.perm-cell input {
  appearance: none;
  -webkit-appearance: none;
  width: 15px; height: 15px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  position: relative;
  background: #fff;
  border: 1px solid #c9d5e6;
  border-radius: 4px;
  cursor: pointer;
}
.perm-cell input:checked { background: var(--brand); border-color: var(--brand); }
.perm-cell input:checked::after {
  content: '';
  position: absolute;
  left: 4.5px; top: 1px;
  width: 3.5px; height: 7px;
  border: 2px solid #fff;
  border-top: 0; border-left: 0;
  transform: rotate(45deg);
}
.perm-cell .pc-icon { flex: 0 0 auto; margin-top: 1px; color: var(--text-3); }
.perm-cell.on .pc-icon { color: var(--brand); }
.perm-cell .pc-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.perm-cell .pc-main b { font-size: 13px; font-weight: 600; line-height: 18px; color: #24344d; }
.perm-cell .pc-main small { font-size: 11px; color: var(--text-3); }

/* ==================================================================
 * 登录页
 * ================================================================== */

.login-page {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  overflow: hidden;
  background: #f6f8fb;
}
.login-page::before {
  content: ' ';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(37, 99, 235, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(720px 520px at 50% 44%, #000 20%, transparent 76%);
  -webkit-mask-image: radial-gradient(720px 520px at 50% 44%, #000 20%, transparent 76%);
}
.login-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: 880px;
  max-width: 100%;
  min-height: 520px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px -34px rgba(15, 23, 42, .35);
}

.login-left {
  position: relative;
  flex: 1 1 46%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 44px;
  overflow: hidden;
  color: #0f172a;
  background: linear-gradient(165deg, #f5f9ff 0%, #eaf1ff 52%, #dfeaff 100%);
}
.login-left::before {
  content: '';
  position: absolute;
  right: -120px; top: -130px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(59, 130, 246, .16), transparent);
  pointer-events: none;
}
.login-left::after {
  content: '';
  position: absolute;
  left: -90px; bottom: -130px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(124, 58, 237, .12), transparent);
  pointer-events: none;
}
.login-left .ll-logo { width: 150px; height: 53px; display: block; }
.login-left .ll-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding: 34px 0; }
.login-left h1 {
  margin: 0;
  font-size: 30px;
  line-height: 42px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #0f172a;
}
.login-left .ll-line { width: 44px; height: 3px; border-radius: 999px; margin: 22px 0 26px; background: linear-gradient(90deg, #2563eb, rgba(37, 99, 235, .18)); }
.login-left .ll-feats { display: flex; flex-direction: column; gap: 10px; max-width: 300px; }
.login-left .ll-feat {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #dfe8fb;
  box-shadow: 0 4px 14px -10px rgba(37, 99, 235, .35);
  font-size: 13px;
  letter-spacing: .5px;
  color: #334155;
}
.login-left .ll-feat i {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: #eff4ff;
  color: #2563eb;
}
.login-left .ll-copy { font-size: 11px; letter-spacing: .5px; color: #94a3b8; }
.login-right { flex: 1 1 54%; display: flex; flex-direction: column; justify-content: center; padding: 46px 48px; }
.login-right .lr-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.3px;
  color: #0f172a;
}
.login-right .lr-sub { margin-top: 8px; font-size: 13px; color: var(--text-3); }
.login-right .field { margin-bottom: 16px; }
.login-right .field-label { font-size: 12.5px; color: var(--text-2); }
.login-right .input { height: 44px; border-radius: 10px; font-size: 14px; }
.login-right .btn.primary.lg { margin-top: 8px; }
.login-foot {
  margin-top: 30px;
  padding-top: 0;
  font-size: 12px;
  line-height: 20px;
  color: var(--text-4);
}

@media (max-width: 900px) {
  .login-panel { flex-direction: column; min-height: 0; }
  .login-left { padding: 30px 26px; }
  .login-left h1 { margin-top: 22px; font-size: 24px; line-height: 32px; }
    .login-right { padding: 30px 26px; }
}

/* ==================================================================
 * 工具类
 * ================================================================== */

.flex { display: flex; }
.flex1 { flex: 1 1 auto; min-width: 0; }
.ain { align-items: center; }
.jcb { justify-content: space-between; }
.jce { justify-content: flex-end; }
.wrap { flex-wrap: wrap; } .g6 { gap: 6px; } .g8 { gap: 8px; } .g16 { gap: 16px; } .mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; } .mb4 { margin-bottom: 4px; } .mb8 { margin-bottom: 8px; }
.mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.muted { color: var(--text-3); }
.strong { color: #0f172a; font-weight: 600; }
.fs12 { font-size: 12px; } .fs13 { font-size: 13px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.divider { height: 1px; margin: 16px 0; background: var(--line-2); }
.divider.v { width: 1px; height: 14px; margin: 0 4px; background: var(--line); }
.link { color: var(--brand); cursor: pointer; transition: color .15s; }
.link:hover { color: var(--brand-hover); }
.link.danger { color: var(--danger); }
.link.disabled { color: var(--text-4); cursor: not-allowed; }
.dot-split { margin: 0 8px; color: var(--text-4); }

/* ==================================================================
 * 响应式骨架
 * ================================================================== */

@media (max-width: 1180px) {
  :root { --aside-w: 216px; }
  .view-host { padding: 20px 20px 40px; }
  .app-header { padding: 0 20px; }
}
@media (max-width: 900px) {
  .app-aside { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .24s; z-index: 320; }
  .app-aside.open { transform: none; box-shadow: 24px 0 64px -32px rgba(9, 17, 34, .45); }
  /* 抽屉遮罩：点击空白处关闭侧栏 */
  .nav-mask {
    position: fixed; inset: 0; z-index: 310;
    background: rgba(12, 21, 38, .42);
    animation: navmask .2s ease-out;
  }
  @keyframes navmask { from { opacity: 0; } to { opacity: 1; } }
  .hd-burger { display: inline-flex; }
  .view-host { padding: 16px 14px 40px; }
  .app-header { padding: 0 14px; gap: 10px; }
  .user-chip .uc-name { display: none; }
}

/* ==================================================================
 * 时间筛选器
 * ================================================================== */

.tf {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
}
.tf-gran { display: inline-flex; padding: 2px; background: #f2f5fa; border-radius: 8px; flex: 0 0 auto; }
.tf-g {
  min-width: 38px;
  height: 28px;
  padding: 0 12px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 12.5px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  transition: background .14s, color .14s;
}
.tf-g:hover { color: #0f172a; }
.tf-g.on {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .1);
}
.tf-range { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.tf-sep { font-size: 12px; color: #9aa8bd; }
.tf-quick { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.tf-q {
  height: 26px;
  padding: 0 10px;
  display: inline-flex; align-items: center;
  border-radius: 999px;
  font-size: 12px;
  color: #64748b;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background .14s, color .14s;
}
.tf-q:hover { background: #f4f7fb; color: #0f172a; }
.tf-q.on { color: var(--brand); background: var(--brand-weak); border-color: #d8e4ff; font-weight: 500; }

/* ---- 明细数据折叠 ---- */
.dt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  background: #fff;
  border: 1px solid #e4ebf5;
  border-radius: 7px;
  font-size: 12px;
  color: #55657d;
  cursor: pointer;
  user-select: none;
  transition: border-color .14s, color .14s;
}
.dt-toggle:hover { border-color: #c8d6ea; color: #22314a; }
.dt-toggle svg { transition: transform .16s; }
.dt-toggle.on svg { transform: rotate(180deg); }
.dt-fold {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  border: 1px dashed #e3eaf4;
  border-radius: 9px;
  background: #fafcff;
  font-size: 12.5px;
  color: #8b9ab0;
  cursor: pointer;
  transition: color .14s, border-color .14s, background .14s;
}
.dt-fold:hover { color: var(--brand); border-color: #cfdefd; background: #f7fbff; }


/* ---- 访问用量 / 回源统计：顶部轻量切换（分段控件） ---- */
.view-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.vs-seg { display: inline-flex; padding: 3px; background: #eaeff8; border-radius: 10px; }
.vs-item {
  height: 30px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s, box-shadow .15s;
}
.vs-item:hover { color: #0f172a; }
.vs-item.on {
  background: #fff;
  color: #16233a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .13);
}
.vs-item.visit.on { color: var(--brand); }
.vs-item.origin.on { color: #c2410c; }

/* KPI 网格与下方卡片留白 */
.stat-top { margin-bottom: 16px; }
/* 回源组的首卡换成橙色，避免和访问组一样都是蓝色主色 */
.stat-grid.grp-origin .stat.is-brand::after { background: linear-gradient(180deg, #fb923c, #ea580c); }
.stat-grid.grp-origin .stat.is-brand .stat-label svg { color: #ea580c; background: #fff2e8; }
.stat-grid.grp-origin .stat.is-brand .stat-value { color: #ea580c; }

/* 趋势图指标 chips 行（随标签页切换）：指标按钮在左，概览数值紧跟其后 */
.metric-row {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding-bottom: 0; margin-bottom: 2px;
  border-bottom: 0;
}
.metric-row .fb-label { flex: 0 0 auto; align-self: center; }
/* 指标按钮：只留文字，全部指标统一用趋势图主色（紫），不再一指标一色 */
.metric-row .chip {
  height: 28px;
  padding: 0 14px;
  gap: 0;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e7edf6;
  font-size: 12.5px;
  color: #5b6b83;
  box-shadow: none;
}
.metric-row .chip:hover { border-color: #cfdefd; background: #fbfdff; color: #2f5cf6; }
.metric-row .chip.active {
  font-weight: 600;
  box-shadow: none;
  color: #2563eb;
  background: #eef3ff;
  border-color: #d8e4fd;
}

/* 指标概览：跟随当前指标展示关键值（峰值 / 总量 / 状态码占比 / 命中构成），紧跟在指标按钮右侧 */
.m-sum {
  margin-left: 6px;
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding-left: 16px;
  min-width: 0;
}
.m-sum .ms-item { min-width: 0; }
.m-sum .ms-item + .ms-item { border-left: 1px solid #eef3fa; padding-left: 24px; }
.m-sum .ms-k {
  font-size: 11.5px; color: #8494ab; line-height: 1.2;
  white-space: nowrap; margin-bottom: 4px;
}
.m-sum .ms-dot { width: 7px; height: 7px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: middle; }
.m-sum .ms-v {
  font-size: 17px; font-weight: 600; line-height: 1.1; color: #1f3350;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.m-sum .ms-v small { font-size: 11px; font-weight: 500; color: #8494ab; margin-left: 3px; }
.m-sum .ms-mag {
  font-style: normal; font-size: 11px; font-weight: 500;
  color: #8494ab; margin-left: 2px;
}
.m-sum .ms-sub {
  font-size: 11px; color: #9aa9be; line-height: 1.2;
  margin-top: 4px; white-space: nowrap; font-variant-numeric: tabular-nums;
}

@media (max-width: 1240px) {
  .m-sum { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 14px 20px; padding-left: 0; padding-top: 0; }
  .m-sum .ms-item + .ms-item { border-left: 0; padding-left: 0; }
}

/* 筛选条（与时间筛选器同风格的第二行） */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
}
.fb-group { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fb-group.fb-grow { flex: 1 1 auto; }
.fb-label { font-size: 12.5px; color: #8494a9; white-space: nowrap; flex: 0 0 auto; }
.fb-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }

/* 区块标题 */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 6px 2px 12px;
}
.sec-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: .1px;
}
.sec-head .sh-tip { font-size: 12px; color: #9aa8bd; }

/* ==================================================================
 * 分布列表（统一横向比例条）
 * ================================================================== */

.dist { display: flex; flex-direction: column; gap: 13px; }
.dist-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dist-name {
  display: flex; align-items: center; gap: 6px;
  min-width: 0;
  font-size: 13px;
  color: #334155;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dist-dot { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }
.dist-val {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: #8494a9;
  font-variant-numeric: tabular-nums;
}
.dist-val b { font-size: 12.5px; font-weight: 600; color: #0f172a; }
.dist-val small { font-size: 11px; color: #9aa8bd; }
.dist-val em { font-style: normal; width: 46px; text-align: right; }
.dist-track { height: 6px; margin-top: 6px; border-radius: 999px; background: #eef2f8; overflow: hidden; }
.dist-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #5b8bf5);
  transition: width .35s ease;
}
.dist.clickable .dist-row { cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; transition: background .14s; }
.dist.clickable .dist-row:hover { background: #f7f9fd; }
.dist-empty { padding: 20px 0; text-align: center; font-size: 12.5px; color: #b3c0d1; }

.dist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1080px) { .dist-grid { grid-template-columns: 1fr; } }

/* 分布卡片头部的小汇总 */
.dist-sum { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: #8494a9; }
.dist-sum b { font-size: 13px; font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; }

/* 堆叠比例条（状态码概览） */
.stack-row { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; background: #eef2f8; margin-bottom: 16px; }
.stack-row span { display: block; height: 100%; transition: width .3s; }

/* 分布分析卡片切换（地域/运营商/域名/状态码，同一时刻只展示一块，避免长列表堆叠） */
.dist-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.dist-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  transition: background .14s, color .14s, border-color .14s, box-shadow .14s;
}
.dist-tab:hover { color: #0f172a; border-color: #d5dfee; background: #fafcff; }
.dist-tab.on {
  color: var(--brand);
  border-color: #cfdefd;
  background: var(--brand-weak);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .08);
}
.dist-tab svg { flex: 0 0 auto; }

/* 长列表双列（34 个省级区域 / 域名 TOP 50），单屏可读更多行；
   用多栏布局而非 grid，保证排名沿列自上而下连续，不会左右交错 */
.dist-2col > .dist {
  display: block;
  columns: 2;
  column-gap: 34px;
}
.dist-2col > .dist > .dist-row { break-inside: avoid; margin-bottom: 13px; }
.dist-2col > .dist > .dist-row:last-child { margin-bottom: 0; }
@media (max-width: 1240px) {
  .dist-2col > .dist { columns: 1; }
}
.model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1440px) { .model-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .model-grid { grid-template-columns: 1fr; } }
.model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .16s, box-shadow .18s, transform .18s;
}
.model-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--pc, #2563eb);
  opacity: .8;
}
.model-card:hover { border-color: #d0dcf0; box-shadow: 0 12px 26px -16px rgba(37, 99, 235, .35); transform: translateY(-2px); }
.model-card .mc-head { display: flex; align-items: flex-start; gap: 10px; }
.model-card .mc-logo {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  letter-spacing: -.3px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12);
}
.model-card .mc-logo img { width: 21px; height: 21px; display: block; }
.model-card .mc-name { min-width: 0; flex: 1 1 auto; }
.model-card .mc-name b { display: block; font-size: 13.5px; font-weight: 600; color: #0f172a; line-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-card .mc-name small { display: block; font-size: 11.5px; color: #8494a9; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-card .mc-body { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.model-card .mc-remark {
  margin-top: 9px;
  font-size: 12px; line-height: 18px; color: #8494a9;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 36px;
}
.model-card .mc-stats {
  display: flex;
  margin-top: 12px; padding-top: 11px;
  border-top: 1px solid var(--line-2, #eef2f8);
}
.model-card .mcs { flex: 1 1 0; min-width: 0; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.model-card .mcs + .mcs { border-left: 1px solid var(--line-2, #eef2f8); }
.model-card .mcs small { font-size: 10.5px; color: #97a5b8; line-height: 14px; }
.model-card .mcs b { font-size: 12.5px; font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.model-card .mcs b.free { color: #0b8a57; }
.model-card.off { background: #fbfcfe; }
.model-card.off::before { opacity: .25; }
.model-card.off .mc-name b { color: #64748b; }
.model-card.off .mcs b { color: #94a3b8; }

/* ---------------- 启动加载画面 ---------------- */
.boot-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; background: #f6f8fb; }
.boot-logo { width: 190px; height: 67px; display: block; animation: bootFloat 1.6s ease-in-out infinite; }
.boot-name { margin-top: 18px; font-size: 16px; font-weight: 700; color: #0f172a; letter-spacing: .5px; }
.boot-bar { width: 168px; height: 4px; border-radius: 999px; background: #e6ebf3; overflow: hidden; margin-top: 16px; }
.boot-bar i { display: block; width: 40%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #7c3aed); animation: bootSlide 1.1s ease-in-out infinite; }
.boot-tip { margin-top: 12px; font-size: 12px; color: #97a5b8; }
@keyframes bootFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes bootSlide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* ---------------- AI 模型体验（TokenHub 式居中布局） ---------------- */
.exp-page { position: relative; max-width: 960px; margin: 0 auto; padding-top: 92px; display: flex; flex-direction: column; }
.exp-page > .exp-hero { order: 1; }
.exp-page > .exp-row, .exp-page > .exp-params { order: 2; }
.exp-page > .exp-composer { order: 3; }
.exp-page > .exp-thread, .exp-page > .exp-sug, .exp-page > .exp-gen, .exp-page > .exp-meta, .exp-page > .exp-wave, .exp-page > .exp-answer { order: 4; }
.exp-page.chatting { padding-top: 26px; }
.exp-page.chatting > .exp-thread { order: 3; max-height: none; overflow: visible; flex: 1 1 auto; margin-top: 20px; border-top: none; padding: 2px 0 8px; }
.exp-page.chatting > .exp-composer { order: 4; position: sticky; bottom: 0; z-index: 4; box-shadow: 0 -1px 0 var(--line-2, #eef2f7), 0 -14px 28px -22px rgba(15, 23, 42, .3); }
.view-host:has(.exp-page.chatting) { padding-bottom: 20px; }
.exp-page::before { content: ''; position: absolute; top: -70px; right: -110px; width: 440px; height: 320px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(124, 58, 237, .10), transparent 72%), radial-gradient(closest-side, rgba(59, 130, 246, .09), transparent 70%); }
.exp-hero h2 { font-size: 23px; font-weight: 700; color: #0f172a; letter-spacing: -.3px; }
.exp-row { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.exp-tab { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: #5b6b82; font-size: 13px; cursor: pointer; transition: .15s; font-family: inherit; }
.exp-tab:hover { color: var(--accent, #7c3aed); background: var(--accent-soft, #f5f0ff); }
.exp-tab.on { background: var(--accent-soft, #f5f0ff); color: var(--accent, #7c3aed); font-weight: 600; }
.exp-msel { position: relative; }
.exp-mpill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #0f172a; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.exp-mpill:hover { border-color: var(--accent, #7c3aed); box-shadow: 0 0 0 3px var(--accent-soft, #f5f0ff); }
.exp-mlogo { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.exp-mlogo.sm { width: 18px; height: 18px; }
.exp-mlogo img { width: 12px; height: 12px; display: block; }
.exp-mmenu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px; max-height: 320px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px -14px rgba(15, 23, 42, .28); padding: 6px; z-index: 40; }
.exp-mitem { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #1e293b; }
.exp-mitem:hover { background: #f4f7fc; }
.exp-mitem.on { background: var(--accent-soft, #f5f0ff); color: var(--accent, #7c3aed); font-weight: 600; }
.exp-mitem small { margin-left: auto; font-size: 11px; color: #97a5b8; font-weight: 400; }
.exp-swap { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: #5b6b82; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s; }
.exp-swap:hover { color: var(--accent, #7c3aed); border-color: var(--accent, #7c3aed); }
.exp-params { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 14px; margin-top: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.exp-pcol { display: flex; flex-direction: column; gap: 8px; }
.exp-plabel { font-size: 12px; color: #8494a9; display: flex; justify-content: space-between; }
.exp-plabel b { color: #0f172a; font-variant-numeric: tabular-nums; }
.exp-pcol input[type=range] { accent-color: var(--accent, #7c3aed); width: 100%; }
.exp-composer { margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 12px; box-shadow: 0 10px 30px -22px rgba(15, 23, 42, .25); }
.exp-cinput { display: block; width: 100%; border: none; outline: none; resize: none; background: transparent; font-size: 14px; line-height: 24px; color: #0f172a; font-family: inherit; padding: 4px 2px; min-height: 96px; }
.exp-cinput::placeholder { color: #a8b4c6; }
.exp-cfoot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.exp-ctag { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #5b6b82; font-size: 12px; cursor: pointer; user-select: none; transition: .15s; white-space: nowrap; }
.exp-ctag:hover { color: var(--accent, #7c3aed); border-color: var(--accent, #7c3aed); }
.exp-ctag.on { background: var(--accent-soft, #f5f0ff); border-color: var(--accent, #7c3aed); color: var(--accent, #7c3aed); font-weight: 500; }
.exp-ctag.up { cursor: pointer; }
.exp-count { margin-left: auto; font-size: 12px; color: #9aa8bb; font-variant-numeric: tabular-nums; }
.exp-go { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; border: none; cursor: pointer; color: #fff; display: flex; align-items: center; justify-content: center; background: var(--accent, #7c3aed); box-shadow: 0 6px 14px -8px rgba(124, 58, 237, .5); transition: .15s; }
.exp-go:hover:not(:disabled) { transform: translateY(-1px); }
.exp-go:disabled { opacity: .4; cursor: not-allowed; }
.exp-gen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.exp-gen .exp-genimg { min-height: 200px; }
.exp-gen:has(.exp-genimg:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.exp-gen:has(.exp-genimg:nth-child(4)) .exp-genimg { min-height: 170px; }
.exp-gen:has(.exp-genimg:only-child) { grid-template-columns: 1fr; }
.exp-gen:has(.exp-genimg:only-child) .exp-genimg { min-height: 300px; }
.exp-genimg { position: relative; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; display: flex; align-items: flex-end; animation: genIn .4s ease both; }
.exp-genimg.g0 { background: radial-gradient(120% 130% at 18% 12%, #c4b5fd 0%, transparent 52%), radial-gradient(130% 120% at 88% 30%, #93c5fd 0%, transparent 55%), radial-gradient(140% 130% at 55% 95%, #f0abfc 0%, transparent 60%), linear-gradient(150deg, #eef2ff, #fdf4ff); }
.exp-genimg.g1 { background: radial-gradient(120% 130% at 80% 10%, #6ee7b7 0%, transparent 55%), radial-gradient(130% 120% at 12% 40%, #67e8f9 0%, transparent 55%), radial-gradient(140% 130% at 60% 100%, #a5b4fc 0%, transparent 60%), linear-gradient(150deg, #ecfeff, #f0fdfa); }
.exp-genimg.g2 { background: radial-gradient(120% 130% at 20% 15%, #fda4af 0%, transparent 52%), radial-gradient(130% 120% at 85% 45%, #fcd34d 0%, transparent 55%), radial-gradient(140% 130% at 50% 100%, #c4b5fd 0%, transparent 60%), linear-gradient(150deg, #fff7ed, #fef2f2); }
.exp-genimg.g3 { background: radial-gradient(120% 130% at 78% 12%, #a5b4fc 0%, transparent 55%), radial-gradient(130% 120% at 15% 55%, #7dd3fc 0%, transparent 55%), radial-gradient(140% 130% at 55% 100%, #6ee7b7 0%, transparent 60%), linear-gradient(150deg, #f5f3ff, #eff6ff); }
.exp-genimg.skel { border-style: dashed; background: #f8fafc; align-items: stretch; }
.exp-gshim { display: block; flex: 1 1 auto; border-radius: 13px; background: linear-gradient(100deg, #eef2f7 40%, #f8fafc 50%, #eef2f7 60%); background-size: 200% 100%; animation: shimMove 1.1s linear infinite; }
.exp-gtag { margin: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(15, 23, 42, .5); color: #fff; font-size: 11px; backdrop-filter: blur(4px); }
@keyframes genIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes shimMove { from { background-position: 130% 0; } to { background-position: -70% 0; } }
@media (max-width: 1100px) { .exp-params { grid-template-columns: 1fr; } .exp-sug { grid-template-columns: 1fr; } }
.exp-voices { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 6px; }
.exp-thread { margin-top: 20px; display: flex; flex-direction: column; gap: 22px; max-height: 480px; overflow-y: auto; padding: 10px 14px 6px 6px; border-top: 1px solid var(--line-2, #eef2f7); scrollbar-width: thin; scrollbar-color: #d6dfee transparent; }
.exp-thread::-webkit-scrollbar { width: 5px; }
.exp-thread::-webkit-scrollbar-thumb { background: #d6dfee; border-radius: 999px; }
.exp-thread::-webkit-scrollbar-track { background: transparent; }
.exp-sug { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.exp-sugc { display: flex; gap: 9px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font-size: 12.5px; line-height: 19px; color: #334155; cursor: pointer; transition: .15s; }
.exp-sugc:hover { border-color: #d6dfee; box-shadow: 0 8px 20px -14px rgba(15, 23, 42, .35); transform: translateY(-2px); }
.exp-sugc i { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft, #f5f0ff); color: var(--accent, #7c3aed); font-style: normal; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.exp-msg { display: flex; gap: 12px; align-items: flex-start; }
.exp-msg.user { justify-content: flex-end; }
.exp-avatar { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px -3px rgba(15, 23, 42, .25); }
.exp-avatar img { width: 18px; height: 18px; display: block; }
.exp-main { min-width: 0; max-width: 800px; padding-top: 5px; }
.exp-bubble { max-width: 72%; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--accent-soft, #f5f0ff); color: #3b2a68; }
.exp-msg.user .exp-bubble { font-size: 13px; line-height: 21px; white-space: pre-wrap; word-break: break-word; }
.exp-text { font-size: 13px; line-height: 22px; color: #1e293b; white-space: pre-wrap; word-break: break-word; }
.exp-main .exp-text { padding: 2px 0; }
.exp-meta { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #97a5b8; background: #f6f8fb; border-radius: 999px; padding: 3px 10px; }
.exp-mdot { width: 5px; height: 5px; border-radius: 50%; background: #34c98e; }
.exp-msep { color: #cbd5e1; }
.exp-dots { display: inline-flex; gap: 4px; padding: 8px 2px; }
.exp-dots i { width: 6px; height: 6px; border-radius: 50%; background: #b6c2d4; animation: expBlink 1.1s infinite; }
.exp-dots i:nth-child(2) { animation-delay: .18s; }
.exp-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes expBlink { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
.exp-answer { margin-top: 14px; padding: 13px 15px; border-radius: 12px; background: #f4f7fc; }
.exp-atop { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.exp-atop b { font-size: 12.5px; color: #0f172a; }
.exp-rec2 { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 14px 0 4px; }
.exp-mic { width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--accent, #7c3aed); box-shadow: 0 10px 22px -10px rgba(124, 58, 237, .55); transition: transform .15s; }
.exp-mic:hover { transform: scale(1.05); }
.exp-mic.on { background: linear-gradient(135deg, #f87171, #dc2626); animation: expPulse 1.2s infinite; }
@keyframes expPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .35); } 50% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); } }
.exp-rec-tip { font-size: 12.5px; color: #8494a9; }
.exp-wave { display: flex; align-items: center; gap: 3px; height: 64px; margin-top: 14px; padding: 0 8px; border-radius: 10px; background: #f4f7fc; }
.exp-wave span { flex: 1 1 0; min-width: 0; border-radius: 2px; background: linear-gradient(180deg, #a78bfa, #7c3aed); }
.exp-wave.playing span { animation: expBounce 1s ease-in-out infinite; }
@keyframes expBounce { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
@media (max-width: 1100px) { .exp-params { grid-template-columns: 1fr; } .exp-sug { grid-template-columns: 1fr; } }

.callout {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f9fd;
  border: 1px solid var(--line-2);
  font-size: 12.5px;
  line-height: 19px;
  color: #55657d;
}
.callout .co-icon { flex: 0 0 auto; color: #7c3aed; margin-top: 1px; }

.key-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.key-mask {
  font-family: var(--mono);
  font-size: 12px;
  color: #475569;
  letter-spacing: .2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================================================================
 * 总览：产品入口卡片 / 待处理
 * ================================================================== */

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color .16s, box-shadow .16s;
}
.product-card:hover { border-color: #d9e2ef; box-shadow: 0 10px 26px -20px rgba(15, 23, 42, .5); }
.product-card.cd { --pc: #2563eb; --pcs: #eff4ff; }
.product-card.ai { --pc: #7c3aed; --pcs: #f5f0ff; }
.product-card::before {
  content: ' ';
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 3px;
  background: var(--pc);
  opacity: .85;
}
.pc-head { display: flex; align-items: center; gap: 10px; }
.pc-icon {
  width: 32px; height: 32px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--pcs);
  color: var(--pc);
}
.pc-title { min-width: 0; flex: 1 1 auto; }
.pc-title b { display: block; font-size: 14.5px; font-weight: 600; color: #0f172a; line-height: 20px; }
.pc-title small { display: block; font-size: 11.5px; color: #8494a9; line-height: 15px; }
.pc-tag {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .6px;
  color: var(--pc);
  background: var(--pcs);
  padding: 2px 7px;
  border-radius: 5px;
}
.pc-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.pc-m b {
  display: block;
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.3px;
}
.pc-m small { font-size: 11.5px; color: #8494a9; }
.pc-spark { margin-top: 12px; height: 42px; }
.pc-spark svg { width: 100%; height: 42px; display: block; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }

.todo-list { display: flex; flex-direction: column; gap: 1px; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .14s;
}
.todo-item:hover { background: #f7f9fd; }
.todo-item .ti-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.todo-item .ti-dot.warn { background: #f59e0b; }
.todo-item .ti-dot.danger { background: #ef4444; }
.todo-item .ti-main { flex: 1 1 auto; min-width: 0; }
.todo-item .ti-main b { display: block; font-size: 13px; font-weight: 500; color: #0f172a; line-height: 19px; }
.todo-item .ti-main small { display: block; font-size: 11.5px; color: #8494a9; line-height: 16px; }
.todo-item svg { color: #c2cddb; flex: 0 0 auto; }

/* ==================================================================
 * 统一控件层（v4）
 * 按钮 / 输入框 / 下拉 / 时间筛选 全站一套尺度：高 32、圆角 9、
 * 细边 #e2e9f4、hover 描边加深、focus 3px 蓝环
 * ================================================================== */
:root {
  --ctl-h: 32px;
  --ctl-h-sm: 28px;
  --ctl-r: 9px;
  --ctl-line: #e2e9f4;
  --ctl-line-h: #c5d6ee;
  --ctl-ink: #33445e;
  --ctl-ink-soft: #6b7d96;
  --ctl-ph: #a6b2c6;
  --ctl-soft: #f6f9fd;
  --ctl-trough: #f1f5fb;
  --ctl-shadow: 0 1px 2px rgba(16, 32, 56, .04);
  --ctl-ring: 0 0 0 3px rgba(37, 99, 235, .12);
  --ctl-pop-shadow: 0 18px 40px -22px rgba(15, 23, 42, .5), 0 2px 8px -2px rgba(15, 23, 42, .08);
}

/* ---------------- 按钮 ---------------- */
.btn {
  height: var(--ctl-h);
  padding: 0 13px;
  border-color: var(--ctl-line);
  border-radius: var(--ctl-r);
  color: var(--ctl-ink);
  box-shadow: var(--ctl-shadow);
  letter-spacing: .1px;
  transition: color .16s, border-color .16s, background .16s, box-shadow .16s, transform .1s;
}
.btn:hover {
  color: var(--brand);
  border-color: var(--ctl-line-h);
  background: #f8fbff;
  box-shadow: 0 2px 8px -4px rgba(37, 99, 235, .45);
}
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--ctl-ring); }
.btn:disabled, .btn.disabled { box-shadow: none; }
.btn.sm { height: var(--ctl-h-sm); padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn.lg { height: 40px; padding: 0 20px; border-radius: 10px; }
.btn.text { height: auto; box-shadow: none; }
.btn.primary { border-color: transparent; box-shadow: 0 1px 2px rgba(37, 99, 235, .28), 0 8px 18px -10px rgba(37, 99, 235, .85); }
.btn.primary:hover { box-shadow: 0 1px 2px rgba(37, 99, 235, .3), 0 10px 22px -10px rgba(37, 99, 235, .9); }

/* ---------------- 输入框 / 选择器 ---------------- */
.input, .select, .textarea {
  min-height: var(--ctl-h);
  height: var(--ctl-h);
  padding: 0 11px;
  font-size: 13px;
  color: var(--ctl-ink);
  border-color: var(--ctl-line);
  border-radius: var(--ctl-r);
  box-shadow: var(--ctl-shadow);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--ctl-line-h); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: var(--ctl-ring); }
.input::placeholder, .textarea::placeholder { color: var(--ctl-ph); }
.input:disabled, .select:disabled, .textarea:disabled { background: #f5f8fc; color: var(--ctl-ph); }
.textarea { height: auto; min-height: 84px; padding: 8px 11px; line-height: 1.6; }
.select { padding-right: 30px; background-position: right 10px center; cursor: pointer; }

/* 日期 / 月份输入：隐藏原生日历按钮，换成统一的细线日历图标 */
.input[type="date"], .input[type="month"] {
  position: relative;
  padding-right: 30px;
  cursor: pointer;
  font-size: 12.5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2393a3ba' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='16' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px 14px;
}
.input[type="date"]:hover, .input[type="month"]:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='16' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E");
}
.input[type="date"]::-webkit-calendar-picker-indicator,
.input[type="month"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0;
  top: 0;
  width: 34px;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.input[type="date"]::-webkit-datetime-edit,
.input[type="month"]::-webkit-datetime-edit { color: var(--ctl-ink); }
.input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }

/* ---------------- 分段控件（日/月/年、访问/回源…） ---------------- */
.seg, .vs-seg, .tf-gran {
  padding: 2px;
  background: var(--ctl-trough);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(226, 233, 244, .85);
}
.seg .seg-item, .vs-item, .tf-g {
  height: 28px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--ctl-ink-soft);
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg .seg-item:hover, .vs-item:hover, .tf-g:hover { color: var(--brand); background: rgba(255, 255, 255, .6); }
.seg .seg-item.active, .vs-item.on, .tf-g.on {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 32, 56, .14);
}
.vs-item.visit.on { color: var(--brand); }
.vs-item.origin.on { color: #c2410c; }
.tf-g { min-width: 40px; padding: 0 12px; }

/* ---------------- 时间筛选条 ---------------- */
.tf {
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--ctl-line);
  border-radius: 12px;
  box-shadow: var(--ctl-shadow);
  margin-bottom: 14px;
}
.tf .tf-gran { flex: 0 0 auto; }
/* 起止日期合成一个胶囊：内部输入框去边框，整体给一个聚焦环 */
.tf-range {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: var(--ctl-h);
  padding: 0 6px 0 2px;
  background: #fff;
  border: 1px solid var(--ctl-line);
  border-radius: var(--ctl-r);
  box-shadow: var(--ctl-shadow);
  transition: border-color .16s, box-shadow .16s;
}
.tf-range:hover { border-color: var(--ctl-line-h); }
.tf-range:focus-within { border-color: var(--brand); box-shadow: var(--ctl-ring); }
.tf-range .tf-sep { padding: 0 3px; font-size: 11.5px; color: #aab6c8; }
.tf-quick { gap: 6px; }
.tf-q {
  height: 26px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ctl-ink-soft);
  border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.tf-q:hover { color: var(--brand); background: #f2f7ff; }
.tf-q.on { color: var(--brand); background: #eef4ff; border-color: #d8e4fd; font-weight: 600; }

/* ---------------- 自定义下拉（popsel）：域名多选 / 粒度 ---------------- */
.popsel { position: relative; display: inline-flex; max-width: 100%; }
.popsel-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: var(--ctl-h);
  min-width: 0;
  padding: 0 9px 0 11px;
  background: #fff;
  border: 1px solid var(--ctl-line);
  border-radius: var(--ctl-r);
  box-shadow: var(--ctl-shadow);
  font-size: 12.5px;
  color: var(--ctl-ink);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.popsel-trigger:hover { border-color: var(--ctl-line-h); background: #fbfdff; }
.popsel.open .popsel-trigger { border-color: #b9cdf6; background: #fff; box-shadow: var(--ctl-ring); }
.popsel-trigger .ps-ico { flex: 0 0 auto; color: #93a3ba; }
.popsel-trigger .ps-text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popsel-trigger .ps-arrow { flex: 0 0 auto; color: #93a3ba; transition: transform .18s; }
.popsel.open .ps-arrow { transform: rotate(180deg); }
/* 月份选择器（计费周期）：popse 触发器 + 年导航 + 12 月网格 */
.mpick { position: relative; display: inline-block; }
.mpick > .popsel-trigger { width: 100%; justify-content: space-between; }
.mp-panel { width: 252px; padding: 10px 12px 12px; }
.mp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 4px 8px; border-bottom: 1px solid #f0f4fa; margin-bottom: 8px;
}
.mp-year { font-size: 13.5px; font-weight: 600; color: #0f172a; letter-spacing: .3px; }
.mp-nav {
  width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--text-2); user-select: none; transition: background .15s;
}
.mp-nav:hover { background: #f4f7fd; color: #2563eb; }
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mp-m {
  position: relative; height: 34px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--text-1); user-select: none; transition: background .15s, color .15s;
}
.mp-m:hover { background: #eff4ff; color: #2563eb; }
.mp-m.on { background: #2563eb; color: #fff; font-weight: 600; }
.mp-m.on:hover { background: #2563eb; }
.mp-m.off { color: #c3ccdb; cursor: default; }
.mp-m.off:hover { background: transparent; color: #c3ccdb; }
.mp-m.now::after {
  content: ' '; position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: #2563eb;
}
.mp-m.on.now::after { background: #fff; }

.popsel-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  padding: 6px;
  background: #fff;
  border: 1px solid #e6ecf5;
  border-radius: 11px;
  box-shadow: var(--ctl-pop-shadow);
  animation: psPop .14s ease-out;
}
.popsel-menu.right { left: auto; right: 0; }
@keyframes psPop { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.popsel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ctl-ink);
  cursor: pointer;
  white-space: nowrap;
}
.popsel-item:hover { background: #f5f9ff; }
.popsel-item.on { background: var(--brand-weak); color: var(--brand); font-weight: 600; }
.popsel-item.dis { color: #c3cedd; cursor: default; pointer-events: none; }
.popsel-item .ps-check { margin-left: auto; color: var(--brand); opacity: 0; transition: opacity .12s; }
.popsel-item.on .ps-check { opacity: 1; }
/* 粒度触发器固定宽度，避免切换文案时抖动 */
.popsel.gran .popsel-trigger { min-width: 122px; justify-content: flex-start; }

/* ---------------- 统一下拉 c-select（替代原生 select，外观同 popsel） ---------------- */
.csel { position: relative; display: inline-flex; width: 100%; max-width: 100%; vertical-align: middle; }
.csel > .popsel-trigger { width: 100%; }
.csel .ps-text.ph { color: var(--ctl-ph); }
.csel.disabled > .popsel-trigger { background: #f5f8fc; color: var(--ctl-ph); cursor: not-allowed; }
.csel-menu { max-height: 296px; overflow-y: auto; z-index: 2000; }
.csel-menu .popsel-item .ellipsis { flex: 1 1 auto; }
/* 多选 + 搜索模式 */
.csel-menu.csel-multi { min-width: 200px; padding-top: 0; }
.csel-search {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; gap: 7px;
  margin: 0 -6px 4px; padding: 8px 10px;
  background: #fff; border-bottom: 1px solid #eef2f8;
  color: #a6b3c6;
}
.csel-search input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-size: 12.5px; color: var(--ctl-ink); min-width: 0;
}
.csel-search input::placeholder { color: var(--ctl-ph); }
.csel-ck {
  flex: 0 0 auto; width: 15px; height: 15px; border-radius: 4.5px;
  border: 1.5px solid #c9d4e3; background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; transition: background .12s, border-color .12s;
}
.csel-ck.on { background: var(--brand); border-color: var(--brand); }
.csel-none { padding: 18px 0 14px; text-align: center; font-size: 12px; color: var(--ctl-ph); }
/* 年份下拉：内嵌在时间筛选胶囊里，去边框贴合容器 */
.tf-range .csel { width: 100px; }
.tf-range .csel > .popsel-trigger {
  height: 30px; width: 100%; border: 0; background: transparent; box-shadow: none;
  font-size: 12.5px; padding: 0 8px 0 9px;
}
.tf-range .csel > .popsel-trigger:hover { background: #f7faff; }
/* 表格内的下拉收窄高度 */
.src-table .csel > .popsel-trigger { height: 30px; font-size: 12.5px; }

/* ---------------- 日期区间选择（双月日历，点开即见起止） ---------------- */
.popsel.dr .popsel-trigger { width: 232px; justify-content: flex-start; }
.dr-trigger .dr-text {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ctl-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: .1px;
  white-space: nowrap;
}
.dr-trigger .dr-text b { font-weight: 600; }
.dr-trigger .dr-sep { font-style: normal; font-size: 11px; color: #b7c3d4; }
.dr-trigger .dr-ph { color: var(--ctl-ph); }
.dr-trigger .ps-arrow { margin-left: auto; }

.dr-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  left: 0;
  padding: 11px 12px 10px;
  background: #fff;
  border: 1px solid #e6ecf5;
  border-radius: 13px;
  box-shadow: var(--ctl-pop-shadow);
  animation: psPop .14s ease-out;
}
.dr-menu.right { left: auto; right: 0; }
.dr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 8px;
}
.dr-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #7c8ba3;
  transition: color .14s;
}
.dr-hint svg { color: #9dacc1; transition: color .14s; }
.dr-hint.to { color: var(--brand); }
.dr-hint.to svg { color: var(--brand); }
.dr-nav { display: inline-flex; gap: 3px; }
.dr-navbtn {
  width: 25px; height: 25px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px;
  color: #7c8ba3;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.dr-navbtn:hover { background: #f1f6ff; color: var(--brand); }
.dr-body { display: flex; gap: 14px; }
.dr-month { width: 214px; }
.dr-mtitle {
  margin-bottom: 7px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #24344d;
  font-variant-numeric: tabular-nums;
}
.dr-week, .dr-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dr-week span {
  padding-bottom: 4px;
  text-align: center;
  font-size: 11px;
  color: #a6b3c7;
}
.dr-grid { row-gap: 2px; }
.dr-day {
  position: relative;
  height: 29px;
  line-height: 29px;
  text-align: center;
  font-size: 12.5px;
  color: #33445e;
  border-radius: 8px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background .12s, color .12s;
}
.dr-day:hover { background: #eef4ff; color: var(--brand); }
.dr-day.is-future { color: #c4cedb; }
.dr-day.is-today::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--brand);
  opacity: .7;
}
.dr-day.in-range { background: #ebf2ff; border-radius: 0; color: #1d4ed8; }
.dr-day.is-from, .dr-day.is-to {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 5px 12px -7px rgba(37, 99, 235, .95);
}
.dr-day.is-from { border-radius: 8px 0 0 8px; }
.dr-day.is-to { border-radius: 0 8px 8px 0; }
.dr-day.is-from.is-to { border-radius: 8px; }
.dr-day.is-from.is-today::after, .dr-day.is-to.is-today::after { background: #fff; opacity: .9; }
.dr-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #f1f5fb;
}
.dr-quicks { display: inline-flex; gap: 6px; }
.dr-quicks .tf-q { height: 24px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }
.dr-sum { margin-left: auto; font-size: 11.5px; color: #93a3ba; font-variant-numeric: tabular-nums; }

/* 明细表时间列：等宽数字、不换行 */
.td-time { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 域名多选面板 */
.popsel-menu.ds-menu { width: 296px; padding: 8px; }
.ds-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  background: var(--ctl-soft);
  border: 1px solid #e9f0f9;
  border-radius: 8px;
  transition: border-color .15s, background .15s;
}
.ds-search:focus-within { border-color: #bfd3f5; background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .09); }
.ds-search svg { color: #93a3ba; flex: 0 0 auto; }
.ds-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--ctl-ink);
}
.ds-input::placeholder { color: var(--ctl-ph); }
.ds-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 4px 5px;
  font-size: 11.5px;
  color: #93a3ba;
}
.ds-link { color: var(--brand); cursor: pointer; }
.ds-link:hover { text-decoration: underline; }
.ds-list { max-height: 238px; overflow: auto; }
.ds-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--ctl-ink);
  cursor: pointer;
  transition: background .12s;
}
.ds-opt:hover { background: #f5f9ff; }
.ds-opt.on { background: var(--brand-weak); color: #1d4ed8; font-weight: 500; }
.ds-box {
  width: 15px; height: 15px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #d3ddec;
  border-radius: 4px;
  background: #fff;
  color: transparent;
  transition: background .12s, border-color .12s;
}
.ds-opt:hover .ds-box { border-color: #b8cdf0; }
.ds-opt.on .ds-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.ds-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-none { padding: 16px 8px; text-align: center; font-size: 12px; color: var(--ctl-ph); }

/* ---------------- 用量统计：时间 + 域名 筛选条 ---------------- */
.u-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--ctl-line);
  border-radius: 12px;
  box-shadow: var(--ctl-shadow);
  margin-bottom: 14px;
}
.u-filter .uf-time, .u-filter .uf-dom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.u-filter .uf-time { flex-wrap: wrap; }
.u-filter .tf-quick { margin-left: 0; }
.u-filter .uf-div { width: 1px; height: 20px; background: #eaeff8; margin: 0 2px; flex: 0 0 auto; }
.u-filter .uf-export { margin-left: auto; }
.u-filter .popsel.dom .popsel-trigger { width: 208px; }
@media (max-width: 1240px) {
  .u-filter .uf-export { margin-left: 0; }
}

/* ---------------- 卡片右上角小工具 ---------------- */
.card-extra .tag { line-height: 22px; }
.dt-toggle {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--ctl-line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--ctl-ink-soft);
  background: #fff;
  transition: color .14s, border-color .14s, background .14s;
}
.dt-toggle:hover { color: var(--brand); border-color: var(--ctl-line-h); background: #f8fbff; }

/* ---------------- chips（筛选标签）统一描边 ---------------- */
.chip { border-color: var(--ctl-line); box-shadow: var(--ctl-shadow); }
.chip:hover { border-color: var(--ctl-line-h); box-shadow: 0 2px 8px -4px rgba(37, 99, 235, .35); }
.metric-row .chip { height: 28px; border-radius: 8px; }

/* ==================================================================
 * 打印
 * ================================================================== */

@media print {
  .app-aside, .app-header, .page-head .ph-actions, .btn { display: none !important; }
  .scaffold { display: block; height: auto; }
  .content-area { overflow: visible; background: #fff; }
  .view-host { padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}

/* ================= 第十三轮（2026.10.26a）：月选择面板 / 访问回源切换 / 域名全选 / 侧栏字号 ================= */

/* 月模式：两年面板 + 12 月格 */
.dr-ymgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dr-ym {
  height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--ctl-ink);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.dr-ym:hover { background: #eef4ff; color: var(--brand); }
.dr-ym.is-future { color: #c4cedb; }
.dr-ym.in-range { background: #ebf2ff; border-radius: 0; color: #1d4ed8; }
.dr-ym.is-from, .dr-ym.is-to {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
.dr-ym.is-from { border-radius: 8px 0 0 8px; }
.dr-ym.is-to { border-radius: 0 8px 8px 0; }
.dr-ym.is-from.is-to { border-radius: 8px; }

/* 访问用量 / 回源统计 切换：激活侧整块填色，蓝橙区分更明显 */
.vs-item { gap: 7px; }
.vs-dot {
  width: 7px; height: 7px; flex: 0 0 auto;
  border-radius: 50%;
  background: #c3cede;
  transition: background .15s;
}
.vs-item.visit.on { background: var(--brand); color: #fff; }
.vs-item.origin.on { background: #ea580c; color: #fff; }
.vs-item.visit.on .vs-dot, .vs-item.origin.on .vs-dot { background: rgba(255, 255, 255, .95); }
.vs-item.visit.on:hover, .vs-item.origin.on:hover { color: #fff; }

/* 费用合并页：CDN / AI Token 两块账单同页上下排列 */
.fee-sec + .fee-sec { margin-top: 8px; }
.fee-sec .sec-head { margin-bottom: 12px; }
.fee-sec h3 { display: inline-flex; align-items: center; gap: 8px; }
.fee-sec .vs-dot { background: #2563eb; }
.fee-sec .vs-dot.ai { background: #7c3aed; }

/* 费用页·账单概览（左汇总卡 + 右月账单柱状图，柱子加宽版） */
.bc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bc-month { font-size: 17px; }
.bc-pay {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.bc-label { font-size: 12.5px; color: var(--text-3); }
.bc-val { font-size: 24px; font-weight: 700; }
.bc-line { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; }
.bc-line > span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.bc-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: 0 0 auto; }
.bc-dot.cdn { background: #2563eb; }
.bc-dot.ai { background: #7c3aed; }
.bc-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 12.5px; color: var(--text-3);
}
.bc-legend { display: inline-flex; gap: 12px; font-size: 12.5px; color: var(--text-3); }
.bc-legend span { display: inline-flex; align-items: center; gap: 5px; }

/* 月账单总览 · 精修堆叠柱状图（左侧金额刻度 + 网格线 + 渐变柱 + 总额标签 + 可点击切换账期） */
.bc-chart2 { padding: 6px 4px 0; }
.bc-plot { position: relative; height: 246px; margin-left: 54px; }
.bc-frame { position: absolute; left: 0; right: 0; bottom: 0; height: 220px; border-bottom: 1px solid #d8e0ec; }
.bc-gline { position: absolute; left: 0; right: 0; border-top: 1px dashed #e6ecf5; pointer-events: none; }
.bc-gline em {
  position: absolute; left: -50px; top: -8px; width: 44px; text-align: right;
  font-style: normal; font-size: 11px; color: var(--text-4); white-space: nowrap;
}
.bc-bars {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  display: flex; align-items: flex-end; justify-content: space-around;
}
.bc-col2 {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  width: 84px; height: 100%; padding-top: 4px;
}
.bc-col2.is-empty { cursor: default; }
/* 悬停浮层：复用用量分析 .chart-tipv 卡片风格，仅覆写定位（柱顶居中上方） */
.bc-tipv { transform: translate(-50%, calc(-100% - 8px)); z-index: 30; min-width: 168px; }
.bc-tipv .ct-row.total { margin-top: 4px; padding-top: 5px; border-top: 1px solid #f0f4fa; }
.bc-tipv .ct-row.total .ct-name { color: #16233a; font-weight: 600; }
.bc-bar2 { width: 60px; display: flex; flex-direction: column; }
.bc-seg2 { display: block; transition: height .3s; }
.bc-seg2.cdn { background: linear-gradient(180deg, #5b9cf8, #2563eb); }
.bc-seg2.cdn.top { border-radius: 5px 5px 0 0; }
.bc-seg2.ai { background: linear-gradient(180deg, #a78bfa, #7c3aed); border-radius: 5px 5px 0 0; }
.bc-months { display: flex; justify-content: space-around; margin: 8px 0 0 54px; }
.bc-mlabel { font-size: 12.5px; color: var(--text-3); }
.bc-mlabel.is-empty { color: var(--text-4); }

/* 账单概览 · 月账单概览 / 费用分析汇总 标签页 */
.ov-tabs {
  display: inline-flex; gap: 4px; margin-bottom: 14px; padding: 3px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
}
.ov-tab { padding: 6px 18px; font-size: 13px; color: var(--text-2); border-radius: 6px; cursor: pointer; transition: all .15s; }
.ov-tab:hover { color: #2563eb; }
.ov-tab.on { color: #2563eb; background: #eff4ff; font-weight: 600; }

/* 域名多选：顶部「全部域名」行 + 全选/清空链接 */
.ds-links { display: inline-flex; align-items: center; gap: 5px; }
.ds-sep { color: #c9d3e0; }
.ds-all {
  height: 34px;
  margin-bottom: 3px;
  border-bottom: 1px solid #eef2f8;
  border-radius: 7px 7px 0 0;
  font-weight: 500;
}
.ds-list .ds-all + .ds-opt { margin-top: 2px; }

/* 侧栏功能列表字号加大 */
.side-home, .side-item { font-size: 14px; height: 36px; }
.side-item.on::before { top: 10px; bottom: 10px; }

/* ================= 第十四轮（2026.10.26b）：产品切换填色 / 状态码对数轴 ================= */
/* 侧栏 CDN 加速 / AI Token 切换：激活项整块填充产品主色，白字 */
.prod-item.on { background: var(--pc); box-shadow: 0 2px 8px rgba(15, 23, 42, .16); }
.prod-item.on .pi-mark { color: #fff; background: rgba(255, 255, 255, .22); box-shadow: none; }
.prod-item.on .pi-text b { color: #fff; font-weight: 600; }
.prod-item.on .pi-text small { color: rgba(255, 255, 255, .78); }
.prod-item.on .pi-count { color: #fff; background: rgba(255, 255, 255, .22); box-shadow: none; }

/* ---------- 图标旋转动画 ---------- */
@keyframes icon-spin { to { transform: rotate(360deg); } }
/* 页头「刷新数据」：请求期间按钮图标旋转 */
.btn.refreshing svg { animation: icon-spin .8s linear infinite; }
/* 通用：图标加 .spin 旋转（如刷新记录按钮的 reloading 态） */
.spin { animation: icon-spin .8s linear infinite; }

/* ---- AI 用量统计：TokenHub 式组合卡（排行 + KPI 图标盒 + 分组柱图） ---- */
.tk-wrap { display: flex; align-items: stretch; }
.tk-rank { width: 248px; flex: 0 0 auto; border-right: 1px solid #eef2f7; padding-right: 14px; display: flex; flex-direction: column; }
.tk-rank-head { font-size: 12px; font-weight: 600; color: #64748b; padding: 2px 8px 8px; }
.tk-rank-tip { font-weight: 400; color: #b6c2d4; margin-left: 4px; }
.tk-rank-empty { font-size: 12px; color: #94a3b8; padding: 8px; }
.tkr { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.tkr:hover { background: #f6f8fb; }
.tkr.on { background: var(--accent-soft, #eff4ff); }
.tkr-i { font-size: 11px; font-weight: 700; color: #b6c2d4; width: 16px; font-variant-numeric: tabular-nums; }
.tkr.on .tkr-i { color: var(--accent, #2563eb); }
.tkr-name { flex: 1; min-width: 0; font-size: 13px; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkr.on .tkr-name { color: var(--accent, #2563eb); font-weight: 600; }
.tkr-val { font-size: 12.5px; font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; }
.tk-main { flex: 1; min-width: 0; padding-left: 16px; }
.tk-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.tk-kpi { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #eef2f7; border-radius: 10px; min-width: 0; }
.tkk-icon { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.tkk-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tkk-label { font-size: 12px; color: #64748b; white-space: nowrap; }
.tkk-value { font-size: 19px; font-weight: 700; color: #0f172a; letter-spacing: -.3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tkk-value small { font-size: 12px; font-weight: 600; color: #64748b; margin-left: 2px; }
.tkk-foot { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #94a3b8; }
@media (max-width: 1100px) {
  .tk-wrap { flex-direction: column; }
  .tk-rank { width: 100%; border-right: 0; border-bottom: 1px solid #eef2f7; padding: 0 0 10px; }
  .tk-main { padding-left: 0; padding-top: 12px; }
  .tk-kpis { grid-template-columns: repeat(2, 1fr); }
}
/* 图例居中（堆叠柱图专用） */
.chart-legend.center { justify-content: center; }
/* 排行面板内的紧凑翻页（‹ 1/3 ›），固定右下角 */
.tk-pager { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: auto; padding: 10px 8px 2px; }
.tkp-btn { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; color: #8fa0b5; cursor: pointer; }
.tkp-btn:hover { background: #f1f5f9; color: #475569; }
.tkp-btn.dis { color: #d5deea; cursor: default; pointer-events: none; }
.tkp-cur { font-size: 12px; color: #64748b; font-variant-numeric: tabular-nums; min-width: 26px; text-align: center; }
/* 提示框「其他 N 个模型」行 */
.chart-tipv .ct-more { color: #93a3bb; font-size: 11px; }
/* 下拉置灰项（如粒度受跨度限制时不可选） */
.popsel-item.off { color: #c3cedd; cursor: not-allowed; pointer-events: auto; }
.popsel-item.off:hover { background: transparent; }
