/* 龙脉温泉新媒体收入系统 —— 视觉规范参照 xs.lmwq.net（Apple 风格设计令牌） */

:root {
  /* 融媒体行业配色：主色科技蓝，辅色青，强调色橙 */
  --brand-50: #eaf1ff;
  --brand-100: #d6e5ff;
  --brand-200: #adc9ff;
  --brand-300: #7ba6ff;
  --brand-400: #4a83ff;
  --brand-500: #1d6eff;
  --brand-600: #0b52d6;
  --brand-700: #083a9e;
  --cyan-300: #67e8f9;
  --cyan-400: #22d3ee;
  --cyan-500: #00b8d4;
  --accent-orange: #ff7a45;
  --accent-violet: #7c5cff;
  --grad-brand: linear-gradient(135deg, #083a9e 0%, #0b52d6 38%, #1d6eff 70%, #00c2ff 100%);
  --grad-bar: linear-gradient(90deg, #1d6eff, #22d3ee);
  --ink-900: #1d1d1f;
  --ink-700: #48484d;
  --ink-600: #6e6e73;
  --ink-400: #a1a1a6;
  --line: rgba(210, 210, 215, .62);
  --line-strong: rgba(210, 210, 215, .9);
  --bg: #f2f5fb;
  --muted: #f5f5f7;
  --danger: #e30000;
  --danger-soft: #fdecec;
  --success: #22c55e;
  --radius: 14px;
  --radius-lg: 16px;
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, .035), 0 1px 1px rgba(0, 0, 0, .02), 0 8px 24px -14px rgba(29, 29, 31, .09);
  --shadow-card-hover: 0 0 0 1px rgba(0, 113, 227, .08), 0 2px 4px rgba(0, 0, 0, .03), 0 16px 36px -16px rgba(29, 29, 31, .16);
  --shadow-pop: 0 24px 64px -24px rgba(29, 29, 31, .22), 0 0 0 1px rgba(0, 0, 0, .04);
  --c-douyin: #1d6eff;
  --c-ota: #ff7a45;
  --c-miniapp: #7c5cff;
  --sidebar-w: 248px;

  /* 可换肤令牌：默认=清爽蓝青（当前风格） */
  --card-bg: #ffffff;
  --surface: rgba(255, 255, 255, .92);
  --input-bg: #ffffff;
  --thead-bg: rgba(245, 245, 247, .92);
  --body-bg: #f2f5fb;
  --glow-1: rgba(29, 110, 255, .07);
  --glow-2: rgba(0, 194, 255, .06);
  --kpi-sheen: rgba(255, 255, 255, .55);

  /* 图表配色（随主题变化） */
  --chart-1: #1d6eff;
  --chart-2: #ff7a45;
  --chart-3: #7c5cff;
  --chart-primary: #1d6eff;
  --chart-accent: #7c5cff;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1400px 620px at 85% -12%, var(--glow-1), transparent 62%),
    radial-gradient(1000px 520px at -8% 108%, var(--glow-2), transparent 58%),
    var(--body-bg);
  background-attachment: fixed;
  color: var(--ink-900);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
:focus-visible { outline: 2px solid rgba(0, 113, 227, .5); outline-offset: 1px; }

/* ---------------- 布局骨架 ---------------- */
.shell { min-height: 100vh; }
@media (min-width: 1025px) { .shell { padding-left: var(--sidebar-w); } }

.sidebar {
  position: fixed;
  inset-block: 0;
  left: 0;
  z-index: 40;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  backdrop-filter: saturate(160%) blur(20px);
  border-right: 1px solid var(--line-strong);
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 20px 16px 16px; }
.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--grad-brand);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 8px 20px -10px rgba(11, 82, 214, .55);
}
.brand-name { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.brand-sub { font-size: 11.5px; color: var(--ink-600); margin-top: 1px; }

.nav { flex: 1; padding: 0 10px 12px; }
.nav-group-title {
  padding: 0 10px;
  margin: 14px 0 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
  color: var(--ink-400);
}
.nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 11px;
  margin-bottom: 1px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-700);
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.nav-link:hover { color: var(--ink-900); background: var(--muted); }
.nav-link.active {
  color: var(--brand-600);
  background: linear-gradient(90deg, rgba(29, 110, 255, .11), rgba(0, 194, 255, .05));
  box-shadow: inset 3px 0 var(--brand-500);
  font-weight: 620;
}

.sidebar-foot { padding: 12px 16px 18px; border-top: 1px solid var(--line); }
.identity { display: flex; flex-direction: column; gap: 6px; }
.identity label { font-size: 11.5px; font-weight: 600; color: var(--ink-600); }
.identity select { width: 100%; }
.sidebar-note { margin-top: 8px; font-size: 11px; color: var(--ink-400); }

.sidebar-mask { display: none; }

.topbar:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad-brand);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: saturate(180%) blur(20px);
}
.topbar-title {
  font-size: 14px; font-weight: 650; letter-spacing: -.01em;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink-600);
}
.topbar-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-400); }
.spacer { flex: 1; }

.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card-bg); cursor: pointer; font-size: 15px; line-height: 1;
}

.content { padding: 18px 32px 88px; }
.view { display: none; }
.view.active { display: block; animation: tab-slide .22s cubic-bezier(.16, 1, .3, 1) both; }

/* ---------------- 页头 ---------------- */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.page-header-text { min-width: 0; flex: 1; }
.kicker {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(29, 110, 255, .1), rgba(0, 194, 255, .08));
  font-size: 11px; font-weight: 650; letter-spacing: .02em;
  color: var(--brand-700);
}
.kicker-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(29, 110, 255, .16);
}
.page-title {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.022em;
  color: var(--ink-900);
}
.page-subtitle { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-600); }
.page-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- 卡片 ---------------- */
.ui-card {
  position: relative;
  min-width: 0;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: float-in .32s cubic-bezier(.16, 1, .3, 1) both;
}
.ui-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .82), transparent);
  pointer-events: none;
}
.ui-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--line);
}
.ui-card-heading { min-width: 0; }
.ui-card-title {
  display: flex; align-items: center; gap: 9px;
  margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--ink-900);
}
.ui-card-title:before {
  content: "";
  flex: none;
  width: 3px; height: 15px;
  border-radius: 2px;
  background: var(--grad-bar);
}
.ui-card-subtitle { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-600); }
.ui-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: none; }
.ui-card-body { padding: 18px; }
.ui-card-body.no-pad { padding: 0; }

.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > .ui-card { margin-bottom: 0; }
/* 单列时占满宽度（例如渠道页没有平台构成卡片） */
.grid.single { grid-template-columns: minmax(0, 1fr); }

/* ---------------- 指标卡 ---------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.kpi {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--kpi-sheen)), var(--card-bg);
  box-shadow: var(--shadow-card);
  animation: float-in .32s cubic-bezier(.16, 1, .3, 1) both;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), box-shadow .24s cubic-bezier(.2, .8, .2, 1), border-color .24s ease;
}
.kpi:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
  pointer-events: none;
}
.kpi:after {
  content: "";
  position: absolute;
  right: -32px; top: -42px;
  width: 132px; height: 132px;
  border-radius: 50%;
  background: rgba(29, 110, 255, .06);
  filter: blur(28px);
  pointer-events: none;
}
.kpi:not(.accent):before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad-bar);
  opacity: .85;
}
.kpi:hover { border-color: rgba(0, 113, 227, .16); box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }

.kpi .label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 620; color: var(--ink-600);
}
.kpi .label:before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--success);
  animation: pulse 1.8s infinite;
}
.kpi .value {
  margin-top: 9px;
  font-size: clamp(23px, 1.8vw, 28px);
  font-weight: 760;
  line-height: 1.22;
  letter-spacing: -.018em;
  color: var(--ink-900);
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.kpi .foot { margin-top: 9px; font-size: 12px; line-height: 1.45; color: var(--ink-600); }

.kpi.accent {
  border-color: transparent;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 16px 38px -20px rgba(11, 82, 214, .7);
}
.kpi.accent:after { background: rgba(255, 255, 255, .16); }
.kpi.accent .label, .kpi.accent .foot, .kpi.accent .value { color: #fff; }
.kpi.accent .label:before { background: rgba(255, 255, 255, .85); }

/* ---------------- 表单控件 ---------------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12px; font-weight: 560; color: var(--ink-600); }
.field .hint { font-size: 11.5px; line-height: 1.45; color: var(--ink-400); }
.req { color: #e30000; font-weight: 600; }

input[type="text"], input[type="number"], input[type="date"], input[type="month"], select, textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--input-bg);
  font-size: 13.5px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { min-height: 68px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, .14);
}
input[readonly] { background: var(--muted); color: var(--ink-700); }
input[type="checkbox"] { width: auto; min-height: 0; accent-color: var(--brand-500); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line);
}

.check-row {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-700); cursor: pointer;
  padding-bottom: 9px;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--ink-900);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { background: var(--muted); border-color: rgba(210, 210, 215, 1); }
.btn.primary {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 8px 20px -14px rgba(0, 113, 227, .8);
}
.btn.primary:hover { background: #0077ed; border-color: #0077ed; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-600); }
.btn.ghost:hover { background: var(--muted); color: var(--ink-900); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: rgba(227, 0, 0, .35); background: var(--danger-soft); }
.btn.sm { min-height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 14px;
}
.toolbar .field { min-width: 138px; }
.toolbar .field.grow { flex: 1; min-width: 190px; }

/* ---------------- 分段控件 / 快捷筛选 ---------------- */
.chips {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(210, 210, 215, .7);
  border-radius: 10px;
  background: rgba(120, 120, 128, .08);
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-600);
  font-size: 12.5px;
  font-weight: 620;
  white-space: nowrap;
  cursor: pointer;
  transition: all .18s ease;
}
.chip:hover { color: var(--ink-900); }
.chip.active {
  color: var(--ink-900);
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 12px -6px rgba(0, 0, 0, .1);
}

/* ---------------- 表格 ---------------- */
.table-wrap {
  max-width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; min-width: 680px; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 16px;
  background: var(--thead-bg);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-600);
  font-size: 11.5px;
  font-weight: 680;
  letter-spacing: .015em;
  text-align: left;
  white-space: nowrap;
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(210, 210, 215, .45);
  vertical-align: middle;
  white-space: nowrap;
  transition: background .15s ease;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(0, 113, 227, .035); }
tbody tr.missing td { background: rgba(255, 149, 0, .05); }
tbody tr.missing:hover td { background: rgba(255, 149, 0, .09); }
tfoot td {
  padding: 12px 16px;
  background: var(--thead-bg);
  border-top: 1px solid var(--line-strong);
  font-weight: 680;
  color: var(--ink-900);
}
th.num, td.num, .numeric { text-align: right; font-feature-settings: "tnum" 1, "lnum" 1; letter-spacing: -.015em; }
td.wrap { white-space: normal; min-width: 180px; }
td strong { font-weight: 700; color: var(--ink-900); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(0, 113, 227, .1);
  color: var(--brand-700);
  font-size: 11.5px;
  font-weight: 620;
  white-space: nowrap;
}
.tag.dy { background: rgba(29, 110, 255, .12); color: #0b52d6; }
.tag.ota { background: rgba(255, 122, 69, .14); color: #c2410c; }
.tag.mp { background: rgba(124, 92, 255, .13); color: #5b21b6; }
.tag.amber { background: rgba(255, 149, 0, .14); color: #a35c00; }
.tag.grey { background: rgba(120, 120, 128, .14); color: var(--ink-600); }
.tag.red { background: rgba(227, 0, 0, .1); color: #b30000; }

.note { font-size: 12px; line-height: 1.6; color: var(--ink-600); }
.note code { padding: 1px 5px; border-radius: 5px; background: var(--muted); font-size: 11.5px; }

.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.empty { padding: 44px 16px; text-align: center; color: var(--ink-400); font-size: 13px; }
.empty .big { display: block; margin-bottom: 8px; font-size: 28px; }

/* ---------------- 图形 ---------------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 152px minmax(60px, 1fr) 168px; gap: 14px; align-items: center; }
.bar-row .name { font-size: 13px; color: var(--ink-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .name.strong { color: var(--ink-900); font-weight: 700; }
.bar-track { height: 18px; background: var(--muted); border-radius: 6px; overflow: hidden; }
.bar-fill {
  height: 100%; min-width: 2px; border-radius: 6px;
  background: var(--grad-bar);
}
.bar-fill.amber { background: linear-gradient(90deg, #ff7a45, #ffa06b); }
/* 跨渠道对比：按渠道配色，当前渠道高亮、其他淡化 */
.bar-fill.dy { background: linear-gradient(90deg, #1d6eff, #4a83ff); }
.bar-fill.ota { background: linear-gradient(90deg, #ff7a45, #ffa06b); }
.bar-fill.mp { background: linear-gradient(90deg, #7c5cff, #a48bff); }
.bar-fill.on { box-shadow: 0 0 0 2px rgba(11, 82, 214, .18); }
.bar-fill.dim { opacity: .34; }
.bar-row .val { text-align: right; font-size: 13px; font-weight: 620; white-space: nowrap; font-feature-settings: "tnum" 1; }

.trend { display: flex; align-items: flex-end; justify-content: flex-start; gap: 8px; height: 178px; padding: 8px 2px 0; overflow-x: auto; }
.trend .col {
  flex: 1 0 auto; min-width: 24px; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px;
}
.trend .stack { width: 100%; max-width: 58px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.trend .seg { width: 100%; }
.trend .seg.dy { background: var(--c-douyin); }
.trend .seg.ota { background: var(--c-ota); }
.trend .seg.mp { background: var(--c-miniapp); }
.trend .seg:first-child { border-radius: 5px 5px 0 0; }
.trend .col .cap { font-size: 11px; color: var(--ink-600); white-space: nowrap; }

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; font-size: 12px; color: var(--ink-600); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; }
.legend .dy i { background: var(--c-douyin); }
.legend .ota i { background: var(--c-ota); }
.legend .mp i { background: var(--c-miniapp); }
.legend .cur i { background: var(--brand-500); }
.legend .prev i { background: #c9d4d0; }

.cmp-row { display: grid; grid-template-columns: 152px minmax(80px, 1fr) 210px; gap: 14px; align-items: center; }
.cmp-row .name { font-size: 13px; color: var(--ink-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-bars { display: flex; flex-direction: column; gap: 3px; }
.cmp-bar { display: flex; align-items: center; }
.cmp-bar .track { flex: 1; height: 9px; background: var(--muted); border-radius: 4px; overflow: hidden; }
.cmp-bar .fill { height: 100%; min-width: 2px; border-radius: 4px; }
.cmp-bar .fill.cur { background: var(--grad-bar); }
.cmp-bar .fill.prev { background: #c9d4d0; }
.cmp-row .val { text-align: right; font-size: 13px; font-weight: 620; white-space: nowrap; font-feature-settings: "tnum" 1; }
.cmp-row .val .delta { display: block; font-size: 11.5px; font-weight: 600; }

.delta.up { color: #1a7f4b; }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--ink-400); }

/* ---------------- 填报进度 ---------------- */
.dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; }
.dot.ok { background: var(--success); }
.dot.no { background: #ff9500; }

.progress-track { height: 8px; margin-top: 4px; border-radius: 999px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.kpi:not(.accent) .progress-track { background: var(--muted); }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #fff, #a8e9ff); transition: width .3s ease; }
.kpi:not(.accent) .progress-fill { background: var(--grad-bar); }

/* ---------------- 提示 / 弹窗 ---------------- */
.notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 16px; padding: 11px 14px;
  border: 1px solid rgba(255, 149, 0, .3);
  border-radius: 12px;
  background: rgba(255, 149, 0, .07);
  color: #8a5b12;
  font-size: 12.5px;
  line-height: 1.55;
}
.notice .check-row { color: #8a5b12; padding-bottom: 0; }

.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(29, 29, 31, .34);
  backdrop-filter: blur(4px);
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 580px; max-height: 88vh;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow-pop);
  animation: modal-in .22s cubic-bezier(.16, 1, .3, 1) both;
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.modal-close {
  margin-left: auto;
  width: 30px; height: 30px;
  border: 1px solid transparent; border-radius: 9px;
  background: var(--muted); color: var(--ink-600);
  cursor: pointer; font-size: 13px; line-height: 1;
}
.modal-close:hover { color: var(--ink-900); background: #ebebed; }
.modal-body { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-body .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: rgba(245, 245, 247, .55);
}

.copybox {
  width: 100%; min-height: 200px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  z-index: 200;
  padding: 11px 18px;
  border-radius: 12px;
  background: rgba(29, 29, 31, .92);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 13px;
  font-weight: 550;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 门店多选 ---------------- */
.pick-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pick-head .note { margin-left: auto; }
.picklist {
  display: grid; gap: 2px;
  max-height: 232px; overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--muted);
}
.picklist label {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}
.picklist label:hover { background: rgba(0, 113, 227, .06); }
.picklist .who { margin-left: auto; font-size: 11.5px; color: var(--ink-600); white-space: nowrap; }
.picklist .empty { padding: 20px; }

/* ---------------- 动效 ---------------- */
@keyframes float-in { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tab-slide { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 rgba(34, 197, 94, .58); } 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 rgba(34, 197, 94, 0); } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.16, 1, .3, 1);
    box-shadow: 0 24px 64px -24px rgba(29, 29, 31, .3);
    width: 276px;
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-mask {
    display: block;
    position: fixed; inset: 0; z-index: 35;
    background: rgba(29, 29, 31, .34);
    backdrop-filter: blur(3px);
  }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .topbar { padding: 10px 16px; }
  .content { padding: 16px 16px 72px; }
  .page-title { font-size: 22px; }
}

@media (max-width: 640px) {
  /* 顶部信息栏收起，标题单行显示，避免顶栏占掉三行高度 */
  .topbar { padding: 8px 14px; min-height: 56px; gap: 10px; }
  .topbar-meta { display: none; }
  .mode-badge { flex: none; }
  .page-header { margin-bottom: 16px; }
  .page-header-actions { width: 100%; }
  .page-header-actions .btn { flex: 1; }

  /* KPI 两列排布，一屏能看到更多信息 */
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .kpi { padding: 14px; }
  .kpi .label { font-size: 11.5px; gap: 5px; }
  /* 数字随视口缩放，保证「¥38,367,045.10」这类长金额不折行 */
  .kpi .value { margin-top: 6px; font-size: clamp(12px, 4.2vw, 24px); line-height: 1.2; white-space: nowrap; }
  .kpi .foot { margin-top: 6px; font-size: 11px; line-height: 1.4; }

  /* 图表：缩小环形图与轴宽，给数据留出空间 */
  .donut-wrap { gap: 16px; }
  .donut-chart { width: 132px; height: 132px; }
  .donut-legend { min-width: 150px; }
  .donut-item { grid-template-columns: 10px minmax(48px, 1fr) auto 46px; gap: 8px; font-size: 12px; }
  .area-axis-y { width: 40px; height: 170px; }
  .area-canvas { height: 170px; }
  .area-x-row { margin-left: 50px; }
  .stack-canvas, .stack-plot { height: auto; }
  .area-chart .axis-y-tick, .stack-chart .axis-y-tick { font-size: 10px; }
  .stack-canvas { height: 170px; }
  .stack-bar { max-width: 30px; }

  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: span 1; }
  .bar-row { grid-template-columns: 96px minmax(40px, 1fr) 118px; gap: 8px; }
  .bar-row.ranked { grid-template-columns: 20px minmax(0, 1fr) minmax(36px, 1fr) 112px; }
  .cmp-row { grid-template-columns: 88px minmax(50px, 1fr) 150px; }
  .modal-body .form-grid { grid-template-columns: minmax(0, 1fr); }
  .toolbar { gap: 10px; }
  .toolbar .field { min-width: 0; flex: 1 1 calc(50% - 5px); }
  .toolbar .field.grow { flex: 1 1 100%; }
  .date-filter { width: 100%; }
  .select-wrap, .select-wrap select { width: 100%; }
  .date-range-box { width: 100%; justify-content: space-between; }
  .date-cell { flex: 1; min-width: 0; }
  .date-apply-btn { width: 100%; }
  .ui-card-head { padding: 13px 14px 11px; }
  .ui-card-body { padding: 14px; }
  .ui-card-body.no-pad { padding: 0; }
  .content { padding: 14px 14px 64px; }
}

@media print {
  .sidebar, .topbar, .ui-card-actions, .page-header-actions, .toolbar, .btn { display: none !important; }
  .shell { padding-left: 0; }
  .ui-card { box-shadow: none; }
}

.table-more { display: flex; justify-content: center; padding: 16px; border-top: 1px solid var(--line); background: rgba(245, 245, 247, .4); }

/* ---------------- 日期筛选器（参照 xs.lmwq.net：快捷下拉 + 区间框 + 应用） ---------------- */
.date-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select {
  width: auto;
  min-width: 118px;
  height: 38px;
  padding: 0 34px 0 12px;
  font-size: 13px;
  font-weight: 550;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.select-caret {
  position: absolute;
  right: 11px;
  pointer-events: none;
  color: var(--ink-600);
}

.date-range-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border: 1px solid rgba(210, 210, 215, .72);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
}

.date-cell { position: relative; height: 32px; min-width: 106px; }
.date-cell-text {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -.01em;
  pointer-events: none;
}
.date-cell-text.placeholder { color: var(--ink-400); font-weight: 550; }
input[type="date"].date-native-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.date-sep { flex: none; font-size: 12px; color: var(--ink-400); }
.date-apply-btn { height: 38px; min-width: 56px; }

@media (max-width: 640px) {
  .date-filter { width: 100%; }
  .select-wrap, .select-wrap select { width: 100%; }
  .date-range-box { width: 100%; justify-content: space-between; }
  .date-cell { flex: 1; min-width: 0; }
  .date-apply-btn { width: 100%; }
}

/* ---------------- 登录 / 服务端模式 ---------------- */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(1200px 620px at 50% -10%, rgba(0, 113, 227, .16), transparent),
    linear-gradient(180deg, #f5f5f7, #fff);
}
.login-screen[hidden] { display: none; }

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 34px 28px 28px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 24px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px -35px rgba(15, 23, 42, .38);
  text-align: center;
}
.login-mark {
  width: 54px; height: 54px;
  margin: 0 auto 16px;
  border-radius: 16px;
  font-size: 24px;
  box-shadow: 0 20px 45px -22px rgba(0, 113, 227, .75);
}
.login-card h1 { margin: 0 0 6px; font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.login-card p { margin: 0 0 20px; font-size: 13px; color: var(--ink-600); line-height: 1.6; }
.login-actions { display: grid; gap: 10px; }
.login-actions .btn { width: 100%; }

.sidebar-user { margin-bottom: 12px; }
.sidebar-user .who { font-size: 13px; font-weight: 650; color: var(--ink-900); }
.sidebar-user .role { font-size: 11px; color: var(--ink-600); margin-top: 1px; }
.sidebar-user .out {
  margin-top: 8px; width: 100%; height: 30px;
  border: 1px solid rgba(0, 113, 227, .18);
  border-radius: 9px;
  background: rgba(255, 255, 255, .9);
  color: var(--brand-700);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.sidebar-user .out:hover { background: var(--card-bg); }

.mode-badge[hidden] { display: none; }

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 149, 0, .14);
  color: #a35c00;
  font-size: 11px;
  font-weight: 620;
}

/* ---------------- 空数据引导 ---------------- */
.onboard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  margin-bottom: 20px;
  border: 1px dashed rgba(29, 110, 255, .35);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(29, 110, 255, .06), rgba(0, 194, 255, .05));
  animation: float-in .32s cubic-bezier(.16, 1, .3, 1) both;
}
.onboard-text { flex: 1; min-width: 260px; }
.onboard-text h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--ink-900); }
.onboard-text p { margin: 0 0 6px; font-size: 13px; line-height: 1.6; color: var(--ink-700); }
.onboard-text .note { color: var(--ink-600); }
.onboard-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ================= 图表组件 ================= */
:root { --grid-line: rgba(210, 210, 215, .45); }

/* ---------- 环形图：构成 / 占比 ---------- */
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.donut-chart { position: relative; width: 168px; height: 168px; flex: none; }
.donut-chart svg { width: 100%; height: 100%; display: block; }
.donut-chart circle { transition: stroke-dasharray .5s cubic-bezier(.16, 1, .3, 1); }
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
}
.donut-center-value {
  font-size: 17px; font-weight: 760; letter-spacing: -.02em; color: var(--ink-900);
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.donut-center-label { margin-top: 2px; font-size: 11.5px; color: var(--ink-600); }

.donut-legend { flex: 1; min-width: 210px; display: flex; flex-direction: column; gap: 10px; }
.donut-item {
  display: grid; grid-template-columns: 10px minmax(60px, 1fr) auto 52px;
  align-items: center; gap: 10px;
  font-size: 13px;
}
.donut-dot { width: 10px; height: 10px; border-radius: 3px; }
.donut-name { color: var(--ink-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-val { color: var(--ink-900); font-weight: 620; font-feature-settings: "tnum" 1; white-space: nowrap; }
.donut-pct {
  text-align: right; color: var(--ink-600); font-size: 12px;
  font-feature-settings: "tnum" 1; white-space: nowrap;
}

/* ---------- 面积折线图：趋势 ---------- */
.area-chart { width: 100%; }
.area-plot { display: flex; gap: 10px; }
.area-axis-y { position: relative; width: 52px; height: 200px; flex: none; }
.axis-y-tick {
  position: absolute; right: 0; transform: translateY(50%);
  font-size: 11px; color: var(--ink-600); white-space: nowrap;
  font-feature-settings: "tnum" 1;
}
.area-canvas { position: relative; flex: 1; min-width: 0; height: 200px; }
.area-canvas svg { width: 100%; height: 100%; display: block; overflow: visible; }
.area-dots { position: absolute; inset: 0; }
.area-dot {
  position: absolute; width: 7px; height: 7px; margin: 0 0 -3.5px -3.5px;
  border-radius: 50%; box-shadow: 0 0 0 2px var(--card-bg);
}
.area-x-row {
  display: flex; margin-left: 62px; margin-top: 8px;
  border-top: 1px solid var(--grid-line); padding-top: 6px;
}
.area-x {
  flex: 1 1 0; min-width: 0; text-align: center;
  font-size: 11px; color: var(--ink-600); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 堆叠柱图 ---------- */
.stack-chart { width: 100%; }
.stack-plot { display: flex; gap: 10px; }
.stack-canvas { position: relative; flex: 1; min-width: 0; height: 200px; overflow-x: auto; }
.stack-grid { position: absolute; inset: 0; pointer-events: none; }
.stack-grid span {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 1px dashed var(--grid-line);
}
.stack-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 8px; }
.stack-col {
  flex: 1 1 0; min-width: 26px; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
}
.stack-bar {
  width: 100%; max-width: 46px; flex: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.stack-seg { width: 100%; transition: height .5s cubic-bezier(.16, 1, .3, 1); }
.stack-seg:first-child { border-radius: 4px 4px 0 0; }
.stack-cap {
  margin-top: 7px; font-size: 11px; color: var(--ink-600); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

/* ---------- 排行条形 ---------- */
.bar-row.ranked { grid-template-columns: 24px minmax(0, 1fr) minmax(60px, 1.4fr) 168px; }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--muted); color: var(--ink-600);
  font-size: 11px; font-weight: 700; font-feature-settings: "tnum" 1;
}
.rank-badge.top1 { background: linear-gradient(135deg, #ffd166, #f5a623); color: #7a4a00; }
.rank-badge.top2 { background: linear-gradient(135deg, #dfe4ea, #b9c2cc); color: #4a5560; }
.rank-badge.top3 { background: linear-gradient(135deg, #f3c9a8, #d99a6c); color: #6b3d16; }

@media (max-width: 640px) {
  .donut-chart { width: 140px; height: 140px; }
  .bar-row.ranked { grid-template-columns: 20px minmax(0, 1fr) minmax(40px, 1fr) 118px; }
}

/* 单数据点的趋势占位 */
.area-single {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 170px; text-align: center;
}
.area-single-value {
  font-size: 28px; font-weight: 760; letter-spacing: -.02em; color: var(--ink-900);
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.area-single-label { font-size: 12.5px; color: var(--ink-600); }
.area-single .note { margin-top: 6px; }

/* 超窄屏（320px）：再收一点内边距，保证长金额不溢出 */
@media (max-width: 360px) {
  .kpi { padding: 12px; }
  .kpi .foot { font-size: 10.5px; }
  .content { padding: 12px 12px 60px; }
  .stat-grid { gap: 10px; }
}

/* ---------------- 全局日期栏（吸顶，数据看板 / 渠道分析 / 数据明细） ---------------- */
:root { --topbar-h: 68px; }
@media (max-width: 1024px) { :root { --topbar-h: 56px; } }
@media (max-width: 640px) { :root { --topbar-h: 56px; } }

.topbar { height: var(--topbar-h); min-height: 0; }

.date-bar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 25;
  padding: 10px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: saturate(180%) blur(20px);
  animation: float-in .22s cubic-bezier(.16, 1, .3, 1) both;
}
.date-bar[hidden] { display: none; }
.date-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.date-bar-label { font-size: 12px; font-weight: 620; color: var(--ink-600); }
.date-bar .note { margin-left: 4px; }

@media (max-width: 1024px) {
  .date-bar { padding: 9px 16px; }
}
@media (max-width: 640px) {
  .date-bar { padding: 8px 14px; }
  .date-bar-inner { gap: 8px; }
  .date-bar-label { display: none; }
  .date-bar .note { display: none; }
  .date-bar .date-filter { width: 100%; }
}

/* 日期栏内的筛选器在手机上保持单行紧凑，不占三行 */
@media (max-width: 640px) {
  .date-bar .date-filter { width: auto; flex: 1; flex-wrap: nowrap; gap: 6px; }
  .date-bar .select-wrap,
  .date-bar .select-wrap select { width: auto; }
  .date-bar .select-wrap select { min-width: 74px; height: 34px; padding: 0 22px 0 8px; font-size: 12px; }
  .date-bar .select-caret { right: 7px; }
  .date-bar .date-range-box { width: auto; flex: 1; min-width: 0; padding: 2px 8px; gap: 4px; }
  .date-bar .date-cell { min-width: 0; height: 30px; }
  .date-bar .date-cell-text { font-size: 12px; }
  .date-bar .date-apply-btn { width: auto; min-width: 48px; height: 34px; padding: 0 10px; font-size: 12px; }
}

/* ---------------- 填报提醒 ---------------- */
.remind-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px;
}
.remind-item { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }
.remind-k { flex: none; width: 92px; color: var(--ink-600); font-size: 12px; }
.remind-v { color: var(--ink-900); font-weight: 550; }
.remind-preview {
  margin: 0; padding: 12px 14px; max-height: 260px; overflow: auto;
  border: 1px solid var(--line); border-radius: 10px; background: var(--muted);
  font-family: inherit; font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}

/* ================= 图表悬停提示 ================= */
.chart-tip {
  position: fixed;
  z-index: 400;
  top: 0; left: 0;
  min-width: 120px;
  max-width: 260px;
  padding: 9px 12px;
  border: 1px solid rgba(210, 210, 215, .5);
  border-radius: 11px;
  background: rgba(22, 28, 36, .95);
  backdrop-filter: blur(12px);
  color: #fff;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .55);
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .12s ease, transform .12s ease;
}
.chart-tip.show { opacity: 1; transform: translateY(0); }
.chart-tip-head { display: flex; align-items: center; gap: 7px; }
.chart-tip-dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.chart-tip-label {
  font-size: 12.5px; font-weight: 620; color: rgba(255, 255, 255, .92);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chart-tip-value {
  margin-top: 4px;
  font-size: 17px; font-weight: 760; letter-spacing: -.01em;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.chart-tip-extra { margin-top: 3px; font-size: 11.5px; color: rgba(255, 255, 255, .62); line-height: 1.45; }

/* 悬停高亮 */
.bar-row { border-radius: 9px; transition: background .14s ease; }
.bar-row.hot { background: rgba(29, 110, 255, .06); }
.bar-row.hot .name { color: var(--ink-900); font-weight: 620; }
.bar-row.hot .bar-fill { filter: saturate(1.15) brightness(1.04); }

.donut-seg { transition: stroke-width .16s ease, opacity .16s ease; }
.donut-seg.hot { stroke-width: 26; }
.donut-item { border-radius: 8px; transition: background .14s ease; padding: 2px 6px; margin: -2px -6px; }
.donut-item.hot { background: rgba(29, 110, 255, .07); }

.stack-seg { transition: filter .14s ease, opacity .14s ease; }
.stack-seg.hot { filter: brightness(1.12) saturate(1.1); }
.stack-bar.hot .stack-seg:not(.hot) { opacity: .45; }
.stack-col.hot .stack-cap { color: var(--ink-900); font-weight: 650; }

.area-dot { transition: transform .14s ease, box-shadow .14s ease; }
.area-dot.hot { transform: scale(1.9); box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 3px currentColor; }
.area-cursor {
  position: absolute; top: 0; bottom: 0; width: 1px;
  border-left: 1px dashed rgba(29, 110, 255, .5);
  pointer-events: none;
}

.cmp-row { border-radius: 9px; transition: background .14s ease; }
.cmp-row.hot { background: rgba(29, 110, 255, .06); }
.cmp-row.hot .name { color: var(--ink-900); font-weight: 620; }

/* 触屏设备没有悬停，改为点按同样能看到提示 */
@media (hover: none) {
  .chart-tip { max-width: 200px; padding: 8px 11px; }
  .chart-tip-value { font-size: 15px; }
}


/* ================= 主题：深色数据大屏 ================= */
html[data-theme="dark"] {
  --brand-50: #12233c;
  --brand-100: #16304f;
  --brand-200: #1d4472;
  --brand-300: #2f6fb5;
  --brand-400: #46a3e8;
  --brand-500: #2ee6c5;
  --brand-600: #22c9ac;
  --brand-700: #9df3e4;

  --ink-900: #eaf0fb;
  --ink-700: #b9c4da;
  --ink-600: #8b98b3;
  --ink-400: #5d6a85;

  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .14);
  --muted: rgba(255, 255, 255, .06);
  --grid-line: rgba(255, 255, 255, .10);

  --card-bg: #141b2e;
  --surface: rgba(16, 22, 38, .88);
  --input-bg: #1a2238;
  --thead-bg: rgba(255, 255, 255, .045);
  --body-bg: #0a0f1d;
  --glow-1: rgba(46, 230, 197, .10);
  --glow-2: rgba(108, 140, 255, .10);
  --kpi-sheen: rgba(255, 255, 255, .03);

  --grad-brand: linear-gradient(135deg, #0f8f7a 0%, #22c9ac 45%, #6c8cff 100%);
  --grad-bar: linear-gradient(90deg, #22c9ac, #6c8cff);
  --c-douyin: #4a9dff;
  --c-ota: #ff9a5c;
  --c-miniapp: #a78bfa;
  --chart-1: #4a9dff;
  --chart-2: #ff9a5c;
  --chart-3: #a78bfa;
  --chart-primary: #2ee6c5;
  --chart-accent: #6c8cff;
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, .05), 0 10px 30px -18px rgba(0, 0, 0, .8);
  --shadow-card-hover: 0 0 0 1px rgba(46, 230, 197, .22), 0 16px 40px -18px rgba(0, 0, 0, .9);
}
html[data-theme="dark"] .brand-mark { box-shadow: 0 10px 26px -12px rgba(46, 230, 197, .7); }
html[data-theme="dark"] .kpi.accent { box-shadow: 0 18px 44px -22px rgba(46, 230, 197, .55); }
html[data-theme="dark"] .topbar:before { opacity: .9; }
html[data-theme="dark"] .chart-tip { background: rgba(10, 15, 29, .96); border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .chip.active { box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .login-screen {
  background: radial-gradient(1200px 620px at 50% -10%, rgba(46, 230, 197, .16), transparent), #0a0f1d;
}

/* ================= 主题：潮流品牌（紫粉渐变） ================= */
html[data-theme="vibrant"] {
  --brand-50: #f6f0ff;
  --brand-100: #ede2ff;
  --brand-200: #dcc8ff;
  --brand-300: #c4a2ff;
  --brand-400: #a374ff;
  --brand-500: #7c3aed;
  --brand-600: #6d28d9;
  --brand-700: #5b21b6;

  --card-bg: #ffffff;
  --surface: rgba(255, 255, 255, .9);
  --input-bg: #ffffff;
  --thead-bg: rgba(250, 247, 255, .92);
  --body-bg: #f7f4fd;
  --glow-1: rgba(124, 58, 237, .10);
  --glow-2: rgba(236, 72, 153, .09);
  --kpi-sheen: rgba(250, 245, 255, .6);

  --grad-brand: linear-gradient(135deg, #6d28d9 0%, #a855f7 45%, #ec4899 100%);
  --grad-bar: linear-gradient(90deg, #7c3aed, #ec4899);
  --c-douyin: #7c3aed;
  --c-ota: #f97316;
  --c-miniapp: #ec4899;
  --chart-1: #7c3aed;
  --chart-2: #f97316;
  --chart-3: #ec4899;
  --chart-primary: #7c3aed;
  --chart-accent: #ec4899;
  --radius: 16px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 2px rgba(76, 29, 149, .05), 0 12px 30px -18px rgba(76, 29, 149, .35);
  --shadow-card-hover: 0 2px 6px rgba(124, 58, 237, .10), 0 20px 44px -18px rgba(124, 58, 237, .45);
}
html[data-theme="vibrant"] .kpi:not(.accent):before {
  height: 3px;
}
html[data-theme="vibrant"] .ui-card,
html[data-theme="vibrant"] .kpi {
  border-color: rgba(124, 58, 237, .14);
}
html[data-theme="vibrant"] .kpi.accent {
  box-shadow: 0 18px 44px -22px rgba(124, 58, 237, .8);
}

/* ---------------- 界面风格选择 ---------------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.theme-card {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  padding: 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card-bg); color: var(--ink-900);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.theme-card:hover { border-color: var(--brand-500); transform: translateY(-1px); box-shadow: var(--shadow-card-hover); }
.theme-card.on { border-color: var(--brand-500); box-shadow: 0 0 0 2px rgba(29, 110, 255, .18); }
html[data-theme="vibrant"] .theme-card.on { box-shadow: 0 0 0 2px rgba(124, 58, 237, .22); }
html[data-theme="dark"] .theme-card.on { box-shadow: 0 0 0 2px rgba(46, 230, 197, .28); }
.theme-swatch { display: flex; gap: 6px; }
.theme-swatch i { width: 26px; height: 26px; border-radius: 8px; display: block; }
.swatch-clean i:nth-child(1) { background: #1d6eff; }
.swatch-clean i:nth-child(2) { background: #22d3ee; }
.swatch-clean i:nth-child(3) { background: #f2f5fb; border: 1px solid var(--line); }
.swatch-dark i:nth-child(1) { background: #0a0f1d; border: 1px solid rgba(255,255,255,.14); }
.swatch-dark i:nth-child(2) { background: #2ee6c5; }
.swatch-dark i:nth-child(3) { background: #6c8cff; }
.swatch-vibrant i:nth-child(1) { background: #7c3aed; }
.swatch-vibrant i:nth-child(2) { background: #ec4899; }
.swatch-vibrant i:nth-child(3) { background: #f7f4fd; border: 1px solid var(--line); }
.theme-name { font-size: 14px; font-weight: 700; }
.theme-desc { font-size: 12px; line-height: 1.5; color: var(--ink-600); }

/* ================= 主题：深色侧栏 + 浅色内容（运营后台主流） ================= */
html[data-theme="duotone"] {
  --brand-500: #0f9d8a;
  --brand-600: #0b7f70;
  --brand-700: #0a6a5e;
  --chart-1: #0ea5e9;
  --chart-2: #f97316;
  --chart-3: #8b5cf6;
  --chart-primary: #0f9d8a;
  --chart-accent: #8b5cf6;
  --c-douyin: #0ea5e9;
  --c-ota: #f97316;
  --c-miniapp: #8b5cf6;
  --body-bg: #f4f7f9;
  --glow-1: rgba(15, 157, 138, .08);
  --glow-2: rgba(14, 165, 233, .07);
  --kpi-sheen: rgba(240, 253, 250, .7);
  --grad-brand: linear-gradient(135deg, #0a6a5e 0%, #0f9d8a 55%, #14b8a6 100%);
  --grad-bar: linear-gradient(90deg, #0f9d8a, #14b8a6);
}
html[data-theme="duotone"] .sidebar {
  background: linear-gradient(180deg, #0d1526 0%, #101c33 100%);
  border-right: 1px solid rgba(255, 255, 255, .08);
}
html[data-theme="duotone"] .sidebar .brand-name { color: #fff; }
html[data-theme="duotone"] .sidebar .brand-sub { color: rgba(255, 255, 255, .5); }
html[data-theme="duotone"] .sidebar .nav-group-title { color: rgba(255, 255, 255, .34); }
html[data-theme="duotone"] .sidebar .nav-link { color: rgba(255, 255, 255, .74); }
html[data-theme="duotone"] .sidebar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
html[data-theme="duotone"] .sidebar .nav-link.active {
  color: #5eead4;
  background: linear-gradient(90deg, rgba(94, 234, 212, .18), rgba(94, 234, 212, .04));
  box-shadow: inset 3px 0 #2ee6c5;
}
html[data-theme="duotone"] .sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .1); }
html[data-theme="duotone"] .identity label { color: rgba(255, 255, 255, .62); }
html[data-theme="duotone"] .identity select {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .18);
  color: #eaf2ff;
}
html[data-theme="duotone"] .sidebar-note { color: rgba(255, 255, 255, .34); }
html[data-theme="duotone"] .sidebar-user .who { color: #fff; }
html[data-theme="duotone"] .sidebar-user .role { color: rgba(255, 255, 255, .55); }
html[data-theme="duotone"] .sidebar-user .out {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .16);
  color: #7ff0dd;
}
html[data-theme="duotone"] .sidebar-user .out:hover { background: rgba(255, 255, 255, .14); }
.swatch-duotone i:nth-child(1) { background: #0d1526; border: 1px solid rgba(255,255,255,.14); }
.swatch-duotone i:nth-child(2) { background: #2ee6c5; }
.swatch-duotone i:nth-child(3) { background: #f4f7f9; border: 1px solid var(--line); }
