/* ============================================================
   设计令牌（Design Tokens）
   配色取自「腾讯营销」Logo：主蓝 #286BF0 / 浅蓝 #8ED2FF / 活力橙 #FFA600
   辅助色（文字、小图标、示意图形）参考 WorkBuddy 界面的柔和调性
   说明：本文件只做视觉呈现，不改变任何 DOM 结构、id、class 与交互逻辑
   ============================================================ */
:root {
  /* —— 品牌色 —— */
  --brand: #286bf0;          /* 腾讯营销 主蓝 */
  --brand-600: #1f5bd9;
  --brand-700: #1749b3;
  --brand-050: #eef4ff;
  --brand-100: #dde9ff;
  --sky: #8ed2ff;            /* 腾讯营销 浅蓝 */
  --sky-050: #f0f9ff;
  --amber: #ffa600;          /* 腾讯营销 活力橙 */
  --amber-050: #fff8ec;

  /* —— 语义色 —— */
  --bg: #f4f7fc;
  --bg-grad-1: #f7faff;
  --bg-grad-2: #f1f6fd;
  --surface: #ffffff;
  --surface-2: #f5f8fd;
  --surface-3: #eef3fb;
  --border: #e4ebf5;
  --border-strong: #d3dded;
  --text: #1b2534;
  --text-muted: #6b7a90;
  --text-faint: #93a1b5;

  --primary: #286bf0;
  --primary-dark: #1f5bd9;
  --primary-soft: #eef4ff;
  --danger: #e5484d;
  --danger-soft: #fdeeee;
  --warning: #e08600;
  --warning-soft: #fff6e6;
  --success: #12a06a;
  --success-soft: #e8f8f1;
  --info: #2f8ef0;

  /* —— 阴影 / 圆角 / 动效 —— */
  --shadow-xs: 0 1px 2px rgba(23, 43, 77, .05);
  --shadow: 0 1px 2px rgba(23, 43, 77, .04), 0 6px 18px -8px rgba(23, 43, 77, .10);
  --shadow-md: 0 2px 6px rgba(23, 43, 77, .06), 0 16px 32px -16px rgba(23, 43, 77, .18);
  --shadow-lg: 0 24px 64px -24px rgba(15, 32, 63, .35);
  --ring: 0 0 0 3px rgba(40, 107, 240, .16);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* 字体：优先系统 UI 无衬线，数字与英文走 UI 字体，接近 WorkBuddy 的克制感 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
          "Helvetica Neue", Arial, sans-serif;
  --font-num: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont,
              "PingFang SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* 图表配色随主题切换（由 JS 读取后注入 Chart.js） */
  --chart-grid: #e8eef7;
  --chart-tick: #6b7a90;
  --chart-imp: #286bf0;
  --chart-clk: #12a06a;
  --chart-cost: #e5484d;
  --chart-conv: #ffa600;
  --chart-ctr: #7b6cf6;
  --chart-cpc: #2f8ef0;
}

/* ===== 暗色主题 ===== */
[data-theme="dark"] {
  --brand: #4a86ff;
  --brand-600: #3d78f5;
  --brand-700: #2f66e0;
  --brand-050: #16233d;
  --brand-100: #1c2c4c;
  --sky: #7cc4f5;
  --sky-050: #142235;
  --amber: #ffb733;
  --amber-050: #2a2113;

  --bg: #0e1319;
  --bg-grad-1: #101720;
  --bg-grad-2: #0d1319;
  --surface: #161d26;
  --surface-2: #1c242e;
  --surface-3: #222c38;
  --border: #27313d;
  --border-strong: #33404e;
  --text: #e6edf5;
  --text-muted: #93a2b3;
  --text-faint: #6e7d8f;

  --primary: #4a86ff;
  --primary-dark: #3d78f5;
  --primary-soft: #182642;
  --danger: #ff6b70;
  --danger-soft: #331b1d;
  --warning: #f5b544;
  --warning-soft: #2e2614;
  --success: #2ec48a;
  --success-soft: #102a21;
  --info: #4ea6ff;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 20px -10px rgba(0, 0, 0, .5);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, .4), 0 18px 34px -18px rgba(0, 0, 0, .6);
  --shadow-lg: 0 26px 60px -26px rgba(0, 0, 0, .75);
  --ring: 0 0 0 3px rgba(74, 134, 255, .24);

  --chart-grid: #27313d;
  --chart-tick: #93a2b3;
  --chart-imp: #4a86ff;
  --chart-clk: #2ec48a;
  --chart-cost: #ff6b70;
  --chart-conv: #ffb733;
  --chart-ctr: #9a8cfa;
  --chart-cpc: #4ea6ff;
}

/* 暗色下部分固定浅色元素需反色 */
[data-theme="dark"] .badge-blue { background: #16233d; color: #8fb4ff; }
[data-theme="dark"] .badge-green { background: #102a21; color: #4dd9a2; }
[data-theme="dark"] .badge-red { background: #331b1d; color: #ff8f93; }
[data-theme="dark"] .badge-orange { background: #2e2214; color: #ffb35c; }
[data-theme="dark"] .banner { background: #331b1d; border-color: #4d2629; }
[data-theme="dark"] .toast { background: #e6edf5; color: #0e1319; }

/* 主题切换动画（避免闪烁） */
body { transition: background-color .24s var(--ease), color .24s var(--ease); }

* { box-sizing: border-box; }
/* 必须保证 hidden 属性优先级最高：否则 .modal/.realtime-bar/.login-view
   里声明的 display:flex 会覆盖浏览器默认的 [hidden]{display:none}，
   导致元素「看起来关不掉」。 */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

::selection { background: rgba(40, 107, 240, .18); }

/* 细滚动条（视觉层，不影响滚动行为） */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }

/* ===== 登录 ===== */
.login-view {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(142, 210, 255, .55), transparent 60%),
    radial-gradient(760px 460px at 88% 14%, rgba(40, 107, 240, .28), transparent 62%),
    radial-gradient(700px 520px at 78% 92%, rgba(255, 166, 0, .16), transparent 62%),
    linear-gradient(150deg, #f2f7ff 0%, #eef4ff 46%, #e9f0fd 100%);
}
/* 背景装饰：柔和的品牌斜纹（纯装饰，不拦截点击） */
.login-view::before,
.login-view::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 44px;
  filter: blur(.2px);
  opacity: .9;
}
.login-view::before {
  width: 300px; height: 300px;
  left: -80px; bottom: -110px;
  background: linear-gradient(140deg, rgba(40, 107, 240, .13), rgba(142, 210, 255, .05));
  transform: rotate(-18deg);
}
.login-view::after {
  width: 220px; height: 220px;
  right: -70px; top: -70px;
  background: linear-gradient(140deg, rgba(255, 166, 0, .12), rgba(255, 255, 255, 0));
  transform: rotate(16deg);
}
[data-theme="dark"] .login-view {
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(40, 107, 240, .26), transparent 60%),
    radial-gradient(760px 460px at 88% 14%, rgba(142, 210, 255, .12), transparent 62%),
    radial-gradient(700px 520px at 78% 92%, rgba(255, 166, 0, .08), transparent 62%),
    linear-gradient(150deg, #101823 0%, #0e1319 60%, #0b1015 100%);
}
[data-theme="dark"] .login-view::before,
[data-theme="dark"] .login-view::after { opacity: .5; }

.login-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  width: 100%;
  max-width: 404px;
  border-radius: 22px;
  padding: 40px 34px 32px;
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow:
    0 1px 1px rgba(23, 43, 77, .04),
    0 30px 70px -30px rgba(23, 60, 130, .38),
    0 8px 24px -14px rgba(23, 60, 130, .18);
  text-align: center;
  animation: login-in .5s var(--ease) both;
}
[data-theme="dark"] .login-card { border-color: var(--border); }
@keyframes login-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
/* 登录页 Logo：用 CSS 画一个腾讯营销风格的品牌标记，替换原先的 emoji 加粗观感 */
.login-logo {
  font-size: 0;
  width: 60px; height: 60px;
  margin: 0 auto 16px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #eef4ff, #e1ecff);
  box-shadow: inset 0 0 0 1px rgba(40, 107, 240, .10), 0 10px 22px -14px rgba(40, 107, 240, .55);
  position: relative;
  color: transparent;
  overflow: hidden;
}
.login-logo::before,
.login-logo::after {
  content: "";
  position: absolute;
  border-radius: 3px;
  transform: rotate(-34deg);
}
/* 三条品牌斜条：#286BF0 主蓝 / #8ED2FF 浅蓝 / #FFA600 活力橙 */
.login-logo::before {
  width: 8px; height: 30px;
  left: 20px; top: 15px;
  background: var(--brand, #286bf0);
  box-shadow: 12px 0 0 #8ed2ff;
}
.login-logo::after {
  width: 8px; height: 18px;
  left: 14px; top: 34px;
  background: #ffa600;
  box-shadow: 24px -14px 0 #286bf0;
  opacity: .95;
}
[data-theme="dark"] .login-logo { background: linear-gradient(145deg, #1d2b44, #16233d); }

.login-card h1 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.2px;
  margin: 6px 0 4px;
}
.login-sub { color: var(--text-muted); margin: 0 0 26px; font-size: 13px; }
.login-card label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.login-card input {
  width: 100%;
  margin-top: 7px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background-color .16s;
}
.login-card input::placeholder { color: var(--text-faint); }
.login-card input:hover { border-color: var(--brand-100); }
.login-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
  background: var(--surface);
}
.login-card .btn-block { margin-top: 6px; padding: 12px 16px; border-radius: 10px; font-weight: 600; letter-spacing: .3px; }
.login-hint { color: var(--text-muted); font-size: 12px; margin-top: 16px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 8px 0 0; }

/* ===== 应用布局 ===== */
.app-view {
  min-height: 100dvh;
  background:
    radial-gradient(1200px 400px at 60% -160px, rgba(40, 107, 240, .06), transparent 70%),
    var(--bg);
}
.topbar {
  height: 60px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-title {
  font-weight: 650;
  font-size: 15.5px;
  letter-spacing: -.1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 顶栏左侧小品牌标（纯装饰，用伪元素，不新增 DOM） */
.topbar-title::before {
  content: "";
  width: 22px; height: 22px;
  border-radius: 7px;
  background: linear-gradient(140deg, #286bf0 0%, #4a86ff 55%, #8ed2ff 100%);
  box-shadow: 0 4px 10px -4px rgba(40, 107, 240, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
  flex: 0 0 auto;
}
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 13px; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

.layout { display: flex; min-height: calc(100dvh - 60px); }
.sidebar {
  width: 212px;
  flex: 0 0 212px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 12px 12px;
}
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  position: relative;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease);
  letter-spacing: .1px;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: linear-gradient(100deg, var(--brand-050) 0%, var(--sky-050) 100%);
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(40, 107, 240, .10);
}
.nav-item.active::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 3px; height: 16px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
  transform: translateY(-50%);
}

.content {
  flex: 1;
  min-width: 0;
  padding: 22px 26px 40px;
  overflow-x: hidden;
}
/* 视图入场动画只做淡入，绝不能带 transform：
   animation-fill-mode: both 会让 .view 在整个生命周期保留一个 transform 合成层，
   从而成为内部 position:fixed 弹窗的「包含块」。这样一来弹窗不再相对视口居中，
   而是相对 .view（高度=内容高度）居中 —— 团队页内容矮时弹窗就会贴到页面顶部，
   用户页表格撑高了看似正常。去掉 transform 后，所有 .view 内弹窗与 body 顶层弹窗
   统一相对视口居中，位置一致。上移的入场手感用 .modal-card 自身的动画补偿即可。 */
.view { animation: view-in .28s var(--ease) both; }
@keyframes view-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.view-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid transparent;
}
.view-head h2 {
  margin: 0;
  margin-right: auto;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.3px;
  color: var(--text);
}

/* ===== 按钮 ===== */
.btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-xs);
  transition: background-color .16s var(--ease), border-color .16s var(--ease),
              color .16s var(--ease), box-shadow .16s var(--ease), transform .12s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
  background: linear-gradient(180deg, #3a79f5 0%, var(--primary) 55%, var(--brand-600) 100%);
  border-color: var(--brand-600);
  color: #fff;
  box-shadow: 0 1px 1px rgba(23, 43, 77, .06), 0 8px 18px -10px rgba(40, 107, 240, .75);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--primary) 0%, var(--brand-600) 55%, var(--brand-700) 100%);
  border-color: var(--brand-700);
  color: #fff;
}
.btn-ghost { background: transparent; border-color: var(--border); box-shadow: none; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-block { width: 100%; }
.btn-danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  background: transparent;
  box-shadow: none;
}
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn.ghost.danger, .pc-card .btn-ghost.danger { color: var(--danger); }
.btn.ghost.danger:hover, .pc-card .btn-ghost.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-soft); }
.btn-sm { padding: 4px 10px; font-size: 12px; margin-left: 8px; border-radius: 8px; }

/* ===== 表单控件 ===== */
.select {
  padding: 8px 30px 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background-color: var(--surface);
  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.6 4.4 6 7.8l3.4-3.4' fill='none' stroke='%236b7a90' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  max-width: 220px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.select:hover { border-color: var(--brand-100); }
.select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.select[multiple], .select[size] { background-image: none; padding-right: 11px; cursor: default; }

.form-card, .table-card, .chart-card, .kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.form-card { margin-bottom: 18px; }
.form-card label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 12px; }
.form-card input, .form-card textarea, .form-card select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.form-card input:focus, .form-card textarea:focus, .form-card select:focus,
.modal-body input:focus, .modal-body textarea:focus, .modal-body select:focus,
.input-search:focus, .text-input:focus, .sync-input:focus, .setting-label input:focus,
.setting-label textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* 居中弹窗里的表单复用 form-card 的排版（弹窗不在 .form-card 内，需单独兜底） */
.modal-body label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 12px; }
.modal-body input, .modal-body textarea, .modal-body select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.modal-body .chk-block input { width: 15px; height: 15px; margin-top: 0; }
.modal-body .form-row .chk-block { align-self: end; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.saved-tip { color: var(--success); font-size: 13px; }

/* ===== KPI ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-card {
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.kpi-card::after {
  content: "";
  position: absolute; inset: 0 auto auto 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--brand-100), transparent 70%);
  opacity: .9;
}
.kpi-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.kpi-card .kpi-label { font-size: 12.5px; color: var(--text-muted); letter-spacing: .1px; }
.kpi-card .kpi-value {
  font-size: 22px;
  font-weight: 680;
  margin-top: 6px;
  letter-spacing: -.6px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}
.kpi-card.kpi-editable { cursor: pointer; position: relative; }
.kpi-card.kpi-editable:hover { border-color: var(--primary); transform: translateY(-1px); }
.kpi-edit { font-size: 11px; color: var(--primary); margin-top: 4px; opacity: .85; }

/* 重点指标强调：成本类数据是优化师最关心的，放大并上色 */
.kpi-card.kpi-accent { border-width: 1px; }
.kpi-card.kpi-accent::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: currentColor;
  opacity: .75;
}
.kpi-card.kpi-accent .kpi-value { font-size: 27px; letter-spacing: -.8px; }
.kpi-card.kpi-accent-cost { border-color: rgba(229, 72, 77, .28); background: linear-gradient(180deg, rgba(229, 72, 77, .045), transparent 70%); color: var(--danger); }
.kpi-card.kpi-accent-cost .kpi-value { color: var(--danger); }
.kpi-card.kpi-accent-warn { border-color: rgba(224, 134, 0, .3); background: linear-gradient(180deg, rgba(255, 166, 0, .07), transparent 70%); color: var(--warning); }
.kpi-card.kpi-accent-warn .kpi-value { color: var(--warning); }
.kpi-card.kpi-accent-strong { border-color: rgba(18, 160, 106, .3); background: linear-gradient(180deg, rgba(18, 160, 106, .07), transparent 70%); color: var(--success); }
.kpi-card.kpi-accent-strong .kpi-value { color: var(--success); font-size: 29px; }

/* ===== 设置页：已授权账户 / 折叠区 ===== */
.setting-block { margin: 8px 0 12px; }
.setting-block-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.mkt-accounts { display: flex; flex-direction: column; gap: 8px; }
.mkt-empty { font-size: 13px; color: var(--text-muted); }
.mkt-acc {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  background: var(--surface-2);
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.mkt-acc:hover { border-color: var(--border-strong); background: var(--surface); }
.mkt-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(18, 160, 106, .12); }
.mkt-dot-on { background: var(--success); }
.mkt-dot-off { background: var(--warning); box-shadow: 0 0 0 3px rgba(255, 166, 0, .14); }
.mkt-acc-name { font-weight: 600; }
.mkt-acc-id { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.mkt-acc-owner { color: var(--text-muted); }
.mkt-acc-tail { margin-left: auto; color: var(--text-muted); font-size: 12px; }
.setting-fold {
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--surface-2);
  transition: background-color .16s var(--ease);
}
.setting-fold[open] { background: var(--surface); }
.setting-fold > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.setting-fold > summary::-webkit-details-marker { display: none; }
.setting-fold > summary::before {
  content: "›";
  color: var(--text-faint);
  font-size: 15px;
  line-height: 1;
  transition: transform .18s var(--ease);
}
.setting-fold[open] > summary::before { transform: rotate(90deg); }
.setting-fold[open] > summary { margin-bottom: 8px; }

/* ===== 数据看板：时间筛选栏 ===== */
.dash-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  margin-bottom: 14px;
}
.dash-toolbar .toolbar-hint { margin-left: auto; }
/* 分段控件：今天 / 昨天 / 过去7天 … */
.seg-group {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.seg-item {
  border: none; background: transparent; cursor: pointer;
  padding: 5px 12px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  font-family: inherit; white-space: nowrap;
  transition: background-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.seg-item:hover { color: var(--text); }
.seg-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.seg-item.is-active {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 10px -4px rgba(40, 107, 240, .9);
}
/* 自定义区间 */
.dash-range { display: inline-flex; align-items: center; gap: 6px; }
.dash-range .select { width: auto; }
.dash-range-sep { font-size: 12px; color: var(--text-faint); }

/* ===== 账户看板（横向一览） ===== */
.acct-board-section { margin: 4px 0 18px; }
.acct-board-section .section-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.acct-board-section .section-head h3 {
  margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.1px;
}
.acct-board-section .section-hint {
  font-size: 12px; color: var(--text-muted); margin-right: auto;
}
.acct-board-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.acct-board { border-collapse: separate; border-spacing: 0; min-width: 100%; white-space: nowrap; }
.acct-board th, .acct-board td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: right; }
.acct-board th:first-child, .acct-board td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.acct-board th:nth-child(2), .acct-board td:nth-child(2) { text-align: left; }
.acct-board thead th {
  font-size: 12px; color: var(--text-muted); font-weight: 600;
  background: var(--surface-2); letter-spacing: .2px;
  position: sticky; top: 0; z-index: 1;
}
.acct-board tbody tr { transition: background-color .14s var(--ease); }
.acct-board tbody tr:hover td { background: var(--surface-2); }
.acct-board tbody tr:hover td:first-child { background: var(--surface-2); }
.acct-board tbody tr:last-child td { border-bottom: none; }
.acct-board .acct-cost { font-size: 17px; font-weight: 700; color: var(--danger); font-family: var(--font-num); letter-spacing: -.3px; }
.acct-board .acct-lead-cost { font-size: 17px; font-weight: 700; color: var(--success); font-family: var(--font-num); letter-spacing: -.3px; }
.acct-board .acct-form-cost { font-size: 16px; font-weight: 700; color: var(--warning); font-family: var(--font-num); letter-spacing: -.3px; }
.acct-board .acct-name { font-weight: 600; }
.acct-board .acct-id { color: var(--text-muted); font-size: 12px; font-family: var(--font-mono); }
.acct-board tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--border-strong);
  border-bottom: none;
  background: var(--surface-2);
  font-family: var(--font-num);
}
.acct-board tfoot td:first-child { background: var(--surface-2); }

/* ===== 图表 ===== */
.chart-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.chart-card { min-height: 260px; }
.chart-card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 650; letter-spacing: -.1px; }
.chart-card canvas { max-height: 220px; }

/* ===== 表格 ===== */
.table-card { margin-top: 4px; padding: 6px; overflow: hidden; }
.table-card h3 { margin: 12px 12px 10px; font-size: 15px; font-weight: 650; }
.table-scroll { overflow-x: auto; border-radius: 10px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th {
  color: var(--text-muted);
  font-weight: 600;
  background: var(--surface-2);
  font-size: 12px;
  letter-spacing: .2px;
  position: sticky;
  top: 0;
  z-index: 1;
}
th:first-child { border-radius: 10px 0 0 0; }
th:last-child { border-radius: 0 10px 0 0; }
tbody tr { transition: background-color .14s var(--ease); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
.row-actions { display: flex; gap: 8px; align-items: center; }
.link-btn {
  background: none; border: none; color: var(--primary); cursor: pointer;
  padding: 2px 4px; font-size: 13px; border-radius: 6px; font-family: inherit;
  transition: background-color .14s var(--ease), color .14s var(--ease);
}
.link-btn:hover { background: var(--brand-050); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: var(--danger-soft); }

/* ===== 附件 ===== */
.attach-list { list-style: none; padding: 0; margin: 10px 0 0; }
.attach-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
}
.attach-list a { color: var(--primary); text-decoration: none; }
.attach-list a:hover { text-decoration: underline; }
.upload-area { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.upload-area > .btn { align-self: flex-start; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #17212e;
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  z-index: 100;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in .24s var(--ease) both;
  max-width: min(90vw, 520px);
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .content { padding: 18px 18px 36px; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .topbar { height: 56px; padding: 0 12px; }
  .sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 232px;
    transform: translateX(-100%);
    transition: transform .24s var(--ease);
    z-index: 30;
    box-shadow: var(--shadow-md);
  }
  .sidebar.open { transform: translateX(0); }
  .layout { min-height: calc(100dvh - 56px); }
  .form-row { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .view-head { gap: 8px; }
  .view-head h2 { font-size: 18px; }
  .select { max-width: 100%; }
  .content { padding: 14px 12px 32px; }
  .login-card { padding: 32px 22px 26px; }
}

/* ===== 维度秩行面板（横向条形图，需更高） ===== */
.chart-grid-1 { grid-template-columns: 1fr; }
#dim-panels .chart-card { min-height: 380px; }
#dim-panels .chart-card canvas { max-height: 340px; }

/* ===== 数据源切换 Segment ===== */
.seg {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 2px;
  gap: 2px;
  overflow: hidden;
}
.seg-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: background-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.seg-btn + .seg-btn { border-left: none; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-xs); }

/* ===== 实时工具条 / 徽标 / 横幅 ===== */
.realtime-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
  vertical-align: middle;
}
.badge-gray { background: var(--surface-3); color: var(--text-muted); }
.badge-blue { background: var(--brand-050); color: var(--primary); }
.badge-green { background: var(--success-soft); color: var(--success); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-orange { background: var(--warning-soft); color: #c06a00; }
.badge-yellow { background: #fff8e0; color: #a97a00; }
[data-theme="dark"] .badge-yellow { background: #332a10; color: #f7c948; }
[data-theme="dark"] .badge-orange { background: #2e2214; color: #ffb35c; }
.banner {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent);
  border-left: 3px solid var(--danger);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ===== 设置弹窗 ===== */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(17, 28, 45, .42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: mask-in .2s ease both;
}
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative;
  background: var(--surface);
  width: calc(100% - 32px);
  max-width: 480px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-height: 90dvh;
  overflow-y: auto;
  animation: modal-in .24s var(--ease) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: -.1px; }
.modal-head .btn-ghost {
  width: 30px; height: 30px; padding: 0; border-radius: 8px;
  color: var(--text-muted); font-size: 14px; border-color: transparent;
}
.modal-body { padding: 20px; }
.setting-desc { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; line-height: 1.65; }
.setting-desc code {
  background: var(--surface-2); padding: 1px 6px; border-radius: 5px;
  font-size: 12px; font-family: var(--font-mono); color: var(--text);
  border: 1px solid var(--border);
}
.setting-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.setting-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); }
.setting-label textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  font-size: 13px; font-family: var(--font-mono); resize: vertical;
  background: var(--surface); color: var(--text);
}
.setting-label input {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text);
}
.setting-steps {
  margin: 6px 0 14px; padding-left: 20px;
  font-size: 13px; color: var(--text-muted); line-height: 1.8;
}
.setting-steps a { color: var(--primary); text-decoration: none; }
.setting-steps a:hover { text-decoration: underline; }
.setting-steps li { margin-bottom: 4px; }
.setting-hr { border: none; border-top: 1px solid var(--border); margin: 22px 0 16px; }
.setting-h4 { margin: 0 0 8px; font-size: 14px; font-weight: 650; }
.setting-status { font-size: 13px; color: var(--text-muted); margin: 10px 0 0; }
.empty-tip { text-align: center; color: var(--text-muted); padding: 22px 12px; font-size: 13px; }

/* ===== 日报工具栏 ===== */
.rep-toolbar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin: 10px 0 14px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.rep-toolbar-tip { font-size: 12px; color: var(--text-muted); }
.select-sm { padding: 4px 26px 4px 8px; font-size: 12px; border-radius: 8px; }

/* ===== 日期区间 / 自动刷新 ===== */
.custom-range { display: flex; align-items: center; gap: 6px; }
.input-date {
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.range-sep { color: var(--text-faint); font-size: 13px; }
.auto-refresh {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  cursor: pointer; white-space: nowrap; user-select: none;
}
.auto-refresh input { accent-color: var(--primary); cursor: pointer; }
.auto-hint {
  font-size: 12px; color: var(--text-muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* 暗色下让日期选择器弹层也跟着变深 */
[data-theme="dark"] .input-date { color-scheme: dark; }

.sync-input {
  flex: 1;
  max-width: 220px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

/* ===== 用户管理（多用户账号体系） ===== */
.view-tip {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: linear-gradient(100deg, var(--brand-050), var(--sky-050));
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.75;
}

.field-hint {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
}

/* ===== 问号释义提示 =====
   冗长的规则/功能说明统一收进这个小圆圈，hover 或键盘聚焦时以浮层显示原文，
   界面保持清爽；问号本身可聚焦（tabindex），保证键盘用户也能看到释义。 */
.hint-q {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 4px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 10px; font-weight: 700; line-height: 1;
  vertical-align: middle;
  cursor: help; user-select: none;
  transition: background-color .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease);
}
.hint-q:hover, .hint-q:focus {
  background: var(--primary); color: #fff; border-color: var(--primary);
  outline: none;
}
h2 .hint-q, h3 .hint-q { width: 17px; height: 17px; font-size: 11px; }
.hint-tip {
  position: fixed; z-index: 9999;
  max-width: 300px; padding: 9px 12px;
  border-radius: 9px;
  background: var(--text); color: var(--surface);
  font-size: 12.5px; line-height: 1.6; font-weight: 400;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

/* ===== 复选框选择器（取代 select[multiple]）=====
   姓名前打钩、可随时取消、允许一个都不选；名单长则内部滚动。 */
.pick-field { margin-bottom: 14px; }
.pick-label {
  display: flex; align-items: center; gap: 2px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  margin-bottom: 7px;
}
.pick-count { margin-left: auto; font-size: 11.5px; color: var(--primary); font-weight: 600; }
.pick-list {
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface);
  max-height: 176px; overflow-y: auto; padding: 4px;
}
.pick-list.is-locked { background: var(--surface-2); }
.pick-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: 7px;
  font-size: 13px; color: var(--text);
  cursor: pointer;
  transition: background-color .12s var(--ease);
}
.pick-item:hover { background: var(--surface-2); }
.pick-item.is-checked { background: var(--brand-050); }
.pick-item input {
  width: 15px; height: 15px; margin: 0; flex: 0 0 auto;
  accent-color: var(--primary); cursor: pointer;
}
.pick-item input:disabled { cursor: not-allowed; }
.pick-list.is-locked .pick-item { cursor: default; }
.pick-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-item.is-checked .pick-name { color: var(--primary); font-weight: 600; }
.pick-sub { flex: 0 0 auto; font-size: 11px; color: var(--text-faint); }
.pick-empty { padding: 16px; text-align: center; font-size: 12px; color: var(--text-muted); }

/* ===== 账户管理工具栏 ===== */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.input-search {
  flex: 1; min-width: 200px; max-width: 320px;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6.2' cy='6.2' r='4.3' fill='none' stroke='%2393a1b5' stroke-width='1.5'/%3E%3Cpath d='M9.5 9.5 12.4 12.4' stroke='%2393a1b5' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.input-search::placeholder { color: var(--text-faint); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.chk input { accent-color: var(--primary); width: 14px; height: 14px; }
.chk-block { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.toolbar-hint { font-size: 12px; color: var(--text-faint); margin-left: auto; }

/* 个人中心：公网地址 */
.pub-url-box { display: flex; gap: 8px; margin-top: 8px; }
.text-input {
  flex: 1; min-width: 0; padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  font-family: var(--font-mono);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}

/* 可见成员多选 */
#acc-members {
  width: 100%; margin-top: 6px; padding: 8px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 13px;
}

/* 拖拽排序 */
.drag-handle { cursor: grab; color: var(--text-faint); user-select: none; font-size: 16px; }
tr.dragging { opacity: .5; background: var(--brand-050); }
tbody tr[draggable="true"]:hover .drag-handle { color: var(--primary); }

/* ===== 个人中心 ===== */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.pc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.pc-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
/* 直播间组件上架：独占一整行的板块 */
.pc-card-wide { grid-column: 1 / -1; }
.pc-card-wide h3 { margin: 0 0 10px; }
.pc-card h3 { margin: 0 0 14px; font-size: 14.5px; font-weight: 650; letter-spacing: -.1px; }

/* ===== 个人中心 · 审批管理板块 ===== */
.pc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-card-head h3 { margin: 0 0 14px; }
.approval-badge {
  flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700;
  box-shadow: 0 4px 10px -4px rgba(229, 72, 77, .9);
}
.pc-approval-summary {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.6;
  padding: 10px 12px; margin-bottom: 12px;
  border-radius: var(--radius-sm); background: var(--surface-2);
}
.approval-modal-count { margin-left: auto; margin-right: 12px; font-size: 12px; color: var(--text-muted); }
.approval-guide { font-size: 12.5px; color: var(--text-muted); margin: 0 0 14px; line-height: 1.6; }
.approval-list { display: flex; flex-direction: column; gap: 10px; }

/* ===== 审批消息卡（铃铛面板与个人中心弹窗共用）===== */
.am-item {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 13px;
  background: var(--surface);
  cursor: pointer;
  transition: background-color .14s var(--ease), border-color .14s var(--ease), opacity .14s var(--ease);
}
.am-item:hover { background: var(--surface-2); }
.am-item.is-pending { border-left-color: var(--warning); background: color-mix(in srgb, var(--warning) 5%, var(--surface)); }
/* 「我发起的申请」用蓝色左边条，与橙色「待我审批」在视觉上区分开 */
.am-item.is-mine { border-left-color: var(--primary); }
.am-item.is-mine.is-pending { background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.am-item.is-done { opacity: .62; border-left-color: var(--border-strong); }
.am-item.is-done.is-mine { border-left-color: color-mix(in srgb, var(--primary) 45%, var(--border-strong)); }
.am-item.is-done:hover { opacity: .85; }
.am-head { display: flex; align-items: center; gap: 8px; }
.am-subject { font-size: 13px; font-weight: 650; }
.am-time { margin-left: auto; font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.am-status {
  flex: 0 0 auto; padding: 1px 8px; border-radius: var(--radius-pill);
  font-size: 10.5px; font-weight: 600;
}
.am-pending { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.am-approved { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.am-rejected { background: var(--danger-soft); color: var(--danger); }
.am-body { font-size: 12.5px; color: var(--text); line-height: 1.6; margin-top: 6px; }
.am-result { font-size: 11px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.am-actions { display: flex; gap: 8px; margin-top: 10px; }
.am-actions .btn-sm { padding: 5px 14px; font-size: 12px; }
.notify-list .am-item { border-radius: 9px; padding: 10px 11px; }
.notify-list .am-actions { margin-top: 8px; }

.pc-card .pc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.pc-card .pc-row:last-child { border-bottom: none; padding-bottom: 0; }
.pc-card .pc-row:first-of-type { padding-top: 0; }
.pc-card .pc-row > span { font-size: 13px; color: var(--text-muted); }
.pc-avatar {
  width: 54px; height: 54px; border-radius: 16px;
  background: linear-gradient(145deg, #3a79f5, #286bf0 55%, #1f5bd9);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 650;
  flex: 0 0 auto;
  box-shadow: 0 8px 20px -10px rgba(40, 107, 240, .9), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.pc-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pc-name { font-size: 17px; font-weight: 650; letter-spacing: -.2px; }
.pc-sub { font-size: 12px; color: var(--text-muted); }

/* 个人中心：头像设置 —— 头像 + 姓名横排，点头像即可换图 */
.pc-avatar-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-050) 0%, var(--sky-050) 100%);
  border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
}
.pc-avatar {
  cursor: pointer;
  padding: 0;
  border: none;
  overflow: hidden;
  font-family: inherit;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.pc-avatar:hover { transform: translateY(-1px); }
.pc-avatar:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-txt { line-height: 1; }

/* 个人中心：局域网固定地址列表 */
.lan-url-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.lan-url-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; flex-wrap: wrap;
  padding-bottom: 6px; border-bottom: 1px dashed var(--border);
}
.lan-url-list li:last-child { border-bottom: none; padding-bottom: 0; }
.lan-tag {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--brand-050); color: var(--primary);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.lan-url-list a { color: var(--primary); text-decoration: none; word-break: break-all; }
.lan-url-list a:hover { text-decoration: underline; }

/* ===== 模板管理 ===== */
.modal-card-lg { max-width: 720px; }
.tpl-head { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.tpl-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.tpl-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  transition: background-color .16s var(--ease), border-color .16s var(--ease);
}
.tpl-item:hover { background: var(--surface); border-color: var(--border-strong); }
.tpl-item-info { font-size: 13.5px; }
.tpl-editor h4 { margin: 18px 0 8px; font-size: 14px; font-weight: 650; }
.tpl-row { display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 8px; margin-bottom: 8px; align-items: start; }
.tpl-row select, .tpl-sec-title, .tpl-sec-body, .tpl-rule-label, .tpl-rule-text {
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.tpl-row select:focus, .tpl-sec-title:focus, .tpl-sec-body:focus,
.tpl-rule-label:focus, .tpl-rule-text:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.tpl-sec-body { resize: vertical; min-height: 48px; }
.tpl-rule-text { grid-column: 1 / -1; }

/* ===== 直播板块 ===== */
.live-section { margin-bottom: 18px; }
.live-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.live-head h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.1px; }
.live-updated { font-size: 12px; color: var(--text-faint); }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.live-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.live-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-1px); }
.live-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.live-acct-name { font-size: 14px; font-weight: 650; letter-spacing: -.1px; }
.live-acct-id { font-size: 12px; color: var(--text-muted); margin-top: 3px; font-family: var(--font-mono); }
/* 判定依据：说明「直播中/未开播」是按腾讯实时信号还是妙问兜底算出来的 */
.live-basis { font-size: 11px; color: var(--text-faint); margin-top: 6px; letter-spacing: .1px; }

/* 直播中：呼吸红点 */
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); white-space: nowrap; }
.live-badge-on { background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(229, 72, 77, .18); }
.live-badge-off { background: var(--surface-3); color: var(--text-muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

.live-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin: 14px 0;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 10px;
}
.live-metric { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 2px; }
.live-metric b { color: var(--text); font-size: 14px; font-weight: 650; font-family: var(--font-num); letter-spacing: -.2px; }
.live-ads { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.live-ads span { display: inline-block; margin-right: 10px; }
.live-error {
  font-size: 12px; color: var(--danger);
  background: var(--danger-soft);
  border-radius: 8px;
  padding: 6px 9px;
  margin-top: 10px;
}

/* 组件挂载按钮：未挂载=红，已挂载=绿 */
.btn-mount {
  width: 100%; padding: 9px 12px; border-radius: 10px; font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
  cursor: pointer;
  font-family: inherit; font-weight: 600;
  transition: filter .16s var(--ease), box-shadow .16s var(--ease);
}
.btn-mount:hover { filter: brightness(.98); box-shadow: 0 6px 16px -10px rgba(229, 72, 77, .9); }
.btn-mounted {
  width: 100%; padding: 9px 12px; border-radius: 10px; font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
  background: var(--success-soft);
  color: var(--success);
  cursor: pointer;
  font-family: inherit; font-weight: 600;
  transition: filter .16s var(--ease), box-shadow .16s var(--ease);
}
.btn-mounted:hover { filter: brightness(.98); box-shadow: 0 6px 16px -10px rgba(18, 160, 106, .9); }
/* 不满足上架条件时按钮灰显：文案仍是「组件挂载」，点开弹窗直接看到原因与接入指引 */
.btn-mount-blocked {
  width: 100%; padding: 9px 12px; border-radius: 10px; font-size: 13px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.btn-mount-blocked:hover { border-color: var(--danger); color: var(--danger); }
.live-mounted-tip { font-size: 12px; color: var(--success); margin-top: 8px; line-height: 1.5; }
.live-block-tip { font-size: 12px; color: var(--danger); margin-top: 8px; line-height: 1.5; }

/* 组件选择弹窗 */
.modal-foot {
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  bottom: 0;
}
/* 「开播自动上架」复选框靠左，和右侧按钮分开 */
.modal-foot .comp-auto-publish {
  display: flex; align-items: center; gap: 6px; margin-right: auto;
  font-size: 13px; color: var(--text-muted); cursor: pointer;
}
.modal-foot .comp-auto-publish input { width: 15px; height: 15px; accent-color: var(--primary); }
/* 组件多时弹窗会超高：卡片改弹性布局，头/底固定，只有中间列表滚动。
   否则底部「确认挂载」会被挤出可视区，点击落到遮罩层上而点不动。 */
#live-modal .modal-card { display: flex; flex-direction: column; overflow: hidden; }
#live-modal .modal-body { flex: 1 1 auto; overflow-y: auto; }
.comp-list { display: flex; flex-direction: column; gap: 8px; }
.comp-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.comp-item:hover { border-color: var(--border-strong); background: var(--surface); }
.comp-item.checked { border-color: var(--primary); background: var(--brand-050); box-shadow: 0 0 0 1px var(--primary) inset; }
.comp-item input { margin-top: 2px; accent-color: var(--primary); }
.comp-name { font-size: 13px; font-weight: 650; }
.comp-desc { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.comp-cat {
  font-size: 11px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0 6px; margin-left: 6px;
  background: var(--surface);
}
/* 不可选的组件（未过审 / 当前不可上架）整行灰掉并说明原因 */
.comp-item.disabled { opacity: .55; cursor: not-allowed; }
.comp-tag {
  font-size: 11px; border-radius: 6px; padding: 0 6px; margin-left: 6px;
  border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap;
}
.comp-tag.ok { border-color: color-mix(in srgb, var(--success) 45%, transparent); color: var(--success); background: var(--success-soft); }
.comp-tag.warn { border-color: color-mix(in srgb, var(--warning) 45%, transparent); color: #c06a00; background: var(--warning-soft); }
.comp-tag.danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); background: var(--danger-soft); }
.comp-tag.mounted { border-color: var(--success); color: #fff; background: var(--success); }
.comp-block { font-size: 11px; color: var(--danger); margin-top: 4px; line-height: 1.45; }
.comp-loading, .comp-empty { font-size: 13px; color: var(--text-muted); padding: 22px 4px; text-align: center; line-height: 1.7; }
.live-notice {
  font-size: 12px; line-height: 1.65; padding: 10px 13px; margin-bottom: 10px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: 8px;
  background: var(--warning-soft);
  color: var(--text-muted);
}


/* ===== 侧边栏左下角：用户区 + 通知 ===== */
.sidebar { display: flex; flex-direction: column; }
.sidebar nav { flex: 1 1 auto; }
.sidebar-foot { position: relative; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.foot-row { display: flex; align-items: center; gap: 6px; }

.user-chip {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none; color: var(--text);
  cursor: pointer; text-align: left;
  font-family: inherit;
  transition: background-color .16s var(--ease), border-color .16s var(--ease);
}
.user-chip:hover { background: var(--surface-2); }
.user-chip.open { background: var(--surface-2); border-color: var(--border); }
.user-meta { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-avatar {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(145deg, #3a79f5, #286bf0 60%, #1f5bd9);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
  /* 头像图片按圆角裁切（未设置头像时显示名字首字，不受影响） */
  overflow: hidden;
}
.user-caret { margin-left: auto; font-size: 10px; color: var(--text-faint); }

.notify-btn {
  position: relative; flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer; font-size: 15px;
  transition: background-color .16s var(--ease), border-color .16s var(--ease);
}
.notify-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.notify-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: var(--radius-pill);
  background: var(--danger); color: #fff;
  font-size: 10px; line-height: 17px; text-align: center; font-weight: 600;
  box-shadow: 0 0 0 2px var(--surface);
}

/* 弹出菜单：向上展开，避免被页面底部裁掉 */
.user-menu, .notify-panel {
  position: absolute; left: 0; bottom: calc(100% + 8px); width: 244px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 40;
  overflow: hidden;
  animation: pop-in .18s var(--ease) both;
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(6px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.user-menu-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.um-id { min-width: 0; }
.um-name { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.user-menu-items { padding: 6px; }
.um-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: none; border-radius: 9px;
  background: none; color: var(--text);
  font-size: 13px; font-family: inherit; cursor: pointer; text-align: left;
  transition: background-color .14s var(--ease), color .14s var(--ease);
}
.um-item:hover { background: var(--surface-2); }
.um-item.danger { color: var(--danger); }
.um-item.danger:hover { background: var(--danger-soft); }
.um-item > span:first-child { width: 18px; text-align: center; font-size: 13px; }
.um-right { margin-left: auto; font-size: 11px; color: var(--text-muted); }

.notify-panel { width: 308px; }
.notify-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px; font-weight: 650;
}
.notify-list { max-height: 330px; overflow-y: auto; padding: 6px; }
.notify-item {
  padding: 10px 11px; border-radius: 9px; cursor: pointer;
  transition: background-color .14s var(--ease);
}
.notify-item:hover { background: var(--surface-2); }
.notify-item + .notify-item { margin-top: 2px; }
.notify-title { font-size: 13px; font-weight: 600; }
.notify-body { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.notify-time { font-size: 11px; color: var(--text-faint); margin-top: 5px; }
.notify-item.notify-warn { border-left: 3px solid var(--warning); }
.notify-item.notify-danger { border-left: 3px solid var(--danger); }
.notify-empty { padding: 26px 10px; text-align: center; font-size: 12px; color: var(--text-muted); }

/* ===== 团队管理 ===== */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.team-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.team-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.team-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.team-card-head h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.1px; }
.team-line { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--border); font-size: 13px; }
.team-label { flex: 0 0 62px; color: var(--text-muted); }
.team-line > div { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.team-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 12px 0; }
.team-role-box { border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; background: var(--surface-2); }
.team-role-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.team-role-row select {
  margin-left: auto; padding: 4px 6px;
  border: 1px solid var(--border-strong); border-radius: 7px;
  background: var(--surface); color: var(--text); font-size: 12px; font-family: inherit;
}

/* ===== 账户看板 / 待审批分区 ===== */
.acct-board-section { margin-bottom: 18px; }
.acct-rate { color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ===== 直播总览条 ===== */
.live-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.live-sum-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 16px;
  min-width: 116px;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: var(--shadow-xs);
}
.live-sum-item span { font-size: 12px; color: var(--text-muted); }
.live-sum-item b { font-size: 17px; font-weight: 680; font-family: var(--font-num); letter-spacing: -.3px; }
.live-sum-item b.on { color: var(--danger); }

/* ===== 通用：空列表占位行 / 待生效徽标 ===== */
.empty-row { text-align: center; color: var(--text-muted); padding: 22px 12px; font-size: 13px; }

/* ===== 直播卡片：组件挂载区 ===== */
/* 挂载按钮统一放卡片底部：即使状态拉取失败也必须出现这一块 */
.live-mount-area { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.live-error + .live-mount-area { margin-top: 8px; }

/* 每张卡片的「组件挂载 + 刷新状态」按钮组：主按钮自适应撑开，刷新按钮紧凑靠右 */
.live-mount-btns { display: flex; align-items: stretch; gap: 8px; }
.live-mount-btns > .btn-mount,
.live-mount-btns > .btn-mounted,
.live-mount-btns > .btn-mount-blocked { width: auto; flex: 1 1 auto; }
.btn-live-refresh {
  flex: 0 0 auto;
  padding: 9px 13px; border-radius: 10px; font-size: 12.5px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-muted);
  cursor: pointer; font-family: inherit; font-weight: 600;
  white-space: nowrap;
  transition: border-color .16s var(--ease), color .16s var(--ease), background .16s var(--ease);
}
.btn-live-refresh:hover { border-color: var(--primary); color: var(--primary); background: var(--brand-050); }
.btn-live-refresh:disabled { opacity: .55; cursor: not-allowed; }
/* 待复核态：腾讯给了资格但妙问没检测到观看，用橙色高亮引导点「刷新状态」强力复核 */
.btn-live-refresh.is-attention {
  border-color: var(--warning);
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
  animation: live-attention 1.8s ease-in-out infinite;
}
@keyframes live-attention {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warning) 38%, transparent); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--warning) 0%, transparent); }
}

/* 判定明细：最近窗口观看 / 进入 / 消耗 + 腾讯组件资格，便于核对能否挂载 */
.live-basis-detail {
  font-size: 11px; color: var(--text-muted); margin-top: 5px;
  line-height: 1.55; padding: 6px 9px; border-radius: 8px;
  background: var(--surface-2);
}
.live-block-tip.is-pending { color: var(--warning); }
.live-block-detail { color: var(--text-faint); font-size: 11px; }

/* ===== 账户分组 ===== */
.grp-chip {
  display: inline-block; max-width: 130px;
  padding: 2px 9px; border-radius: var(--radius-pill);
  background: var(--brand-050);
  border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
  font-size: 11.5px; font-weight: 500;
  color: var(--primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.grp-add { display: flex; gap: 8px; margin-bottom: 10px; }
.grp-add .select { flex: 1 1 auto; }
.grp-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  max-height: 190px; overflow-y: auto; margin-bottom: 12px;
}
.grp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.grp-row:last-child { border-bottom: none; }
.grp-row:hover { background: var(--surface-2); }
.grp-name { font-weight: 600; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.grp-empty { padding: 18px 12px; text-align: center; font-size: 12px; color: var(--text-muted); }
.grp-assign { border-top: 1px dashed var(--border); padding-top: 12px; }
.grp-assign select[multiple] { width: 100%; }
.grp-assign-btns { display: flex; align-items: flex-end; gap: 8px; }

/* ===== 对接资料 ===== */
.docs-stages { display: flex; flex-direction: column; gap: 12px; }
/* .doc-block 既是资料页的阶段面板，也是弹窗里的小分区，统一走轻边框卡片 */
.doc-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.doc-block:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.doc-block-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px; font-weight: 650;
}
.doc-stage-head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 15px; cursor: pointer; user-select: none;
  transition: background-color .14s var(--ease);
}
.doc-stage-head:hover { background: var(--surface-2); }
.doc-stage-arrow { width: 12px; color: var(--text-faint); font-size: 11px; transition: color .14s; }
.doc-stage-head:hover .doc-stage-arrow { color: var(--primary); }
/* 阶段图标：给 emoji 一个小色板底，统一观感（不影响文字与布局流） */
.doc-stage-icon {
  font-size: 15px;
  width: 28px; height: 28px; flex: 0 0 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--brand-050), var(--sky-050));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 10%, transparent);
}
.doc-stage-name { font-size: 14px; font-weight: 650; letter-spacing: -.1px; }
.doc-stage-count { font-size: 12px; color: var(--text-muted); }
.doc-stage-head .btn-sm { margin-left: auto; }
.doc-stage-desc {
  padding: 0 15px 8px 52px; font-size: 12px; color: var(--text-muted); line-height: 1.55;
}
.doc-stage-body { padding: 0 15px 14px 52px; display: flex; flex-direction: column; gap: 10px; }

.doc-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 12px 14px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.doc-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.doc-item.is-pending { border-color: #f0dfa3; background: #fffdf6; }
[data-theme="dark"] .doc-item.is-pending { border-color: #55481a; background: #201b0d; }
.doc-item-head { display: flex; align-items: flex-start; gap: 10px; }
.doc-item-name { font-size: 14px; font-weight: 650; flex: 1 1 auto; word-break: break-word; }
.doc-item-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-top: 6px; word-break: break-word; }
.doc-item-remark { font-size: 12px; color: var(--text-muted); margin-top: 6px; word-break: break-word; }
.doc-item-reject {
  font-size: 12px; color: var(--danger); margin-top: 8px;
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 22%, transparent);
  border-radius: 8px; padding: 6px 9px;
}
[data-theme="dark"] .doc-item-reject { background: #331b1d; border-color: #4d2629; }
.doc-item-meta { font-size: 11px; color: var(--text-faint); margin-top: 8px; }
.doc-empty { padding: 16px 10px; text-align: center; font-size: 12px; color: var(--text-muted); }

/* 资料链接：一行一个，名称过长省略，右侧操作不换行 */
.doc-links-view { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.doc-link-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.doc-link-name {
  flex: 0 1 auto; min-width: 0; max-width: 62%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary);
}
.doc-link-row .link-btn { white-space: nowrap; }

/* 多个文档：小字按序号列出 */
.doc-file-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.doc-file-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.doc-file-idx { flex: 0 0 auto; min-width: 18px; font-variant-numeric: tabular-nums; color: var(--text-faint); }
.doc-file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-file-row .link-btn { font-size: 12px; white-space: nowrap; }

/* 弹窗内的链接/文档编辑区 */
.doc-links { display: flex; flex-direction: column; gap: 8px; }
.doc-link-edit { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; align-items: center; }
.doc-file-list .doc-file-row + .doc-file-row { border-top: 1px dashed var(--border); padding-top: 3px; }

/* ===== 资料类型图标 =====
   链接用链条图标，word / ppt / excel / pdf / 图片各有自己的配色与缩写，
   让用户不点开也能一眼分辨这条资料是什么。 */
.ftype {
  flex: 0 0 auto;
  width: 21px; height: 21px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; letter-spacing: .2px;
  line-height: 1;
}
.ftype-link  { background: var(--brand-050); color: var(--primary); }
.ftype-word  { background: #e6effd; color: #2b579a; }
.ftype-ppt   { background: #fdece3; color: #d24726; }
.ftype-excel { background: #e6f6ec; color: #217346; }
.ftype-pdf   { background: #fdeaea; color: #c0392b; }
.ftype-image { background: #eaf6ff; color: #0f8ecf; }
.ftype-text  { background: var(--surface-2); color: var(--text-muted); }
.ftype-other { background: var(--surface-2); color: var(--text-muted); }
[data-theme="dark"] .ftype-word  { background: #1d2b45; color: #8fb4f0; }
[data-theme="dark"] .ftype-ppt   { background: #40251a; color: #f0a184; }
[data-theme="dark"] .ftype-excel { background: #1b3628; color: #7fc79c; }
[data-theme="dark"] .ftype-pdf   { background: #3d2020; color: #f08b83; }
[data-theme="dark"] .ftype-image { background: #173040; color: #7ec4e8; }

/* ===== 资料图片：小图预览 ===== */
.doc-image-grid {
  display: grid; gap: 10px; margin-top: 8px;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
}
.doc-image-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.doc-img-card { margin: 0; }
.doc-img-thumb {
  display: block; width: 100%; height: 74px;
  object-fit: cover; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.doc-image-ops { display: flex; gap: 10px; padding: 5px 7px; }
.doc-image-ops .link-btn { font-size: 11.5px; white-space: nowrap; }
.doc-img-meta { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px 7px; }
.doc-img-name {
  font-size: 11.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-img-meta .row-actions { gap: 10px; flex-wrap: nowrap; }
.doc-img-meta .link-btn { font-size: 11.5px; white-space: nowrap; }

/* ===== 无障碍：尊重「减少动态效果」系统偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}


/* ===== 日报编辑（新规则）：①时间 ②账户/分组 ③性质 ④规则 ⑤模板 ⑥生成 ===== */
.rep-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.rep-step {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.rep-step-no {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-050); color: var(--primary);
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.rep-step-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rep-step-title { font-weight: 600; font-size: 13px; color: var(--text); }
.rep-step-tip { font-size: 12px; color: var(--text-muted); line-height: 1.55; }
.rep-radios { display: flex; flex-wrap: wrap; gap: 14px; }
.rep-radios label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.rep-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rep-row .select { min-width: 180px; }
.rep-preview {
  margin-top: 8px; padding: 10px 12px; background: var(--surface-2);
  border-radius: var(--radius-sm); font-size: 12px;
}
.rep-preview-title { font-weight: 600; margin-bottom: 6px; }
.rep-preview-body {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: inherit; font-size: 12px; color: var(--text-muted);
  max-height: 220px; overflow: auto;
}
.rep-strong { color: var(--primary); font-weight: 600; }
.rep-out-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 8px; font-weight: 600; font-size: 13px;
}
.rep-out-actions { display: flex; gap: 8px; }

/* 实际 vs 汇报 对照小表 */
.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mini-table th, .mini-table td { border: 1px solid var(--border); padding: 5px 8px; text-align: right; }
.mini-table th:first-child, .mini-table td:first-child { text-align: left; }
.mini-table th { background: var(--surface-2); font-weight: 600; }

/* ===== 数据规则管理 ===== */
.rule-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.rule-head .select { flex: 1; }
.rule-editor { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.rule-factors { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.rule-factor-head, .rule-factor { display: flex; gap: 10px; align-items: center; }
.rule-factor-head { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.rule-factor span { flex: 1; font-size: 13px; }
.rule-factor input { width: 120px; }

/* ===== 项目投放总览 ===== */
.ov-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ov-toolbar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.ov-switch { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 8px; }
.ov-switch label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.ov-table-wrap { max-height: 58vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ov-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ov-table th, .ov-table td { border: 1px solid var(--border); padding: 6px 10px; text-align: right; white-space: nowrap; }
.ov-table th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; z-index: 1; }
.ov-table td:first-child, .ov-table th:first-child { text-align: left; }
.ov-table .ov-foot td { font-weight: 700; background: var(--surface-2); }
.ov-table td[contenteditable="true"] { background: var(--brand-050); outline: none; }
.ov-table td[contenteditable="true"]:focus { box-shadow: inset 0 0 0 2px var(--primary); }
.ov-actions { margin-top: 10px; display: flex; gap: 8px; }

/* ===== 模板中文占位符标签 ===== */
.tpl-tags {
  display: flex; flex-direction: column; gap: 8px; margin: 8px 0; padding: 10px;
  background: var(--surface-2); border-radius: var(--radius-sm);
}
.tpl-tag-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tpl-tag-group-name { min-width: 100%; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.tpl-tag {
  padding: 3px 9px; font-size: 12px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--primary); cursor: pointer;
}
.tpl-tag:hover { background: var(--brand-050); border-color: var(--primary); }

/* 总览要看很多天的数据，弹窗给足版面 */
.modal-card-xl { width: min(1400px, 94vw); max-height: 88vh; display: flex; flex-direction: column; }
.modal-card-xl .modal-body { flex: 1; overflow: auto; }

/* ============================================================
   报表（view-board）：1:1 复刻腾讯广告「报表 - 账户分析」
   视觉基调：白底卡片 + 细边框 + 12px 字体 + 灰底表头，与腾讯广告后台一致
   ============================================================ */
.rpt-notice {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 12px; margin-bottom: 12px;
  background: #f0f6ff; border: 1px solid #d9e6ff; border-radius: 4px;
  font-size: 12px; color: #4a5568; line-height: 1.6;
}
.rpt-notice-ico {
  flex: 0 0 14px; width: 14px; height: 14px; margin-top: 2px;
  border-radius: 50%; background: #286bf0; color: #fff;
  font-size: 10px; line-height: 14px; text-align: center; font-weight: 700;
}
.rpt-notice-txt { flex: 1; }
.rpt-notice-x {
  border: 0; background: transparent; color: #9aa5b5; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 2px;
}
.rpt-notice-x:hover { color: #e5484d; }

.rpt-layout { display: flex; gap: 12px; align-items: flex-start; }
.rpt-main { flex: 1; min-width: 0; }

/* —— 左侧模块树 —— */
.rpt-side {
  flex: 0 0 180px; width: 180px;
  background: #fff; border: 1px solid #e5e6eb; border-radius: 4px;
  padding: 10px 0 0; font-size: 13px;
}
.rpt-side.is-collapsed { flex-basis: 44px; width: 44px; }
.rpt-side.is-collapsed .rpt-side-top,
.rpt-side.is-collapsed .rpt-tree,
.rpt-side.is-collapsed .rpt-select-block { display: none; }
.rpt-side-top { padding: 0 10px 8px; }
.rpt-side-foot {
  border-top: 1px solid #f0f1f3; padding: 8px 10px; text-align: center;
}
.rpt-side-collapse {
  border: 0; background: transparent; color: #8a94a6; font-size: 12px; cursor: pointer;
}
.rpt-side-collapse:hover { color: #286bf0; }

.rpt-tree { list-style: none; margin: 0; padding: 0; }
.rpt-node {
  position: relative; padding: 8px 14px; color: #333; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; line-height: 1.4;
  white-space: nowrap; flex-wrap: wrap; /* 子菜单 ul 换行到下一行，否则会挤掉标题文字 */
}
.rpt-node:hover { background: #f5f7fa; }
.rpt-node.is-active {
  background: #eef4ff; color: #286bf0; font-weight: 600;
}
.rpt-node.is-active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #286bf0;
}
.rpt-node-arrow { color: #a8b0bd; font-size: 11px; flex: 0 0 auto; margin-left: 6px; }
.rpt-sub { list-style: none; margin: 2px 0 0; padding: 0; flex: 0 0 100%; }
.rpt-sub-item {
  padding: 6px 12px 6px 28px; font-size: 12px; color: #6b7a90; cursor: pointer; white-space: nowrap;
}
.rpt-sub-item:hover { background: #f5f7fa; color: #286bf0; }
.rpt-node:not(.is-open) .rpt-sub { display: none; }

/* —— 卡片 / 标题行 —— */
.rpt-card {
  background: #fff; border: 1px solid #e5e6eb; border-radius: 4px;
  padding: 12px 16px; margin-bottom: 12px;
}
.rpt-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.rpt-h3 { margin: 0; font-size: 14px; font-weight: 600; color: #1b2534; }

/* —— 通用控件 —— */
.rpt-filters, .rpt-table-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rpt-btn, .rpt-btn-ghost, .rpt-drop, .rpt-select {
  height: 28px; padding: 0 10px; font-size: 12px; color: #333;
  background: #fff; border: 1px solid #d9dce1; border-radius: 3px;
  font-family: var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.rpt-btn:hover, .rpt-btn-ghost:hover, .rpt-drop:hover, .rpt-select:hover {
  border-color: #286bf0; color: #286bf0;
}
.rpt-select { padding-right: 4px; appearance: auto; }
.rpt-select-block { width: 100%; }
.rpt-select-sm { height: 24px; padding: 0 4px; }
.rpt-caret { color: #a8b0bd; font-size: 10px; }
.rpt-ico { color: #8a94a6; font-size: 12px; }
.rpt-flabel { font-size: 12px; color: #6b7a90; }
.rpt-datebox {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px;
  border: 1px solid #d9dce1; border-radius: 3px; background: #fff; font-size: 12px; color: #333;
}
.rpt-date-input { border: 0; outline: none; font-size: 12px; color: #333; font-family: var(--font-num); background: transparent; }
.rpt-date-sep { color: #9aa5b5; }
.rpt-cal { color: #8a94a6; font-size: 12px; }

/* —— 指标卡 —— */
.rpt-kpis { display: flex; gap: 28px; padding: 12px 0 6px; flex-wrap: wrap; }
.rpt-kpi { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b7a90; }
.rpt-kpi-dot { width: 9px; height: 9px; background: #ff8f1f; flex: 0 0 9px; }
.rpt-dot-round { border-radius: 50%; }
.rpt-dot-square { border-radius: 1px; }
.rpt-kpi-val { font-size: 16px; font-weight: 600; color: #1b2534; font-family: var(--font-num); margin-left: 2px; }
.rpt-kpi-q { color: #c0c4cc; font-size: 12px; cursor: help; }

/* —— 趋势图 —— */
.rpt-chart { position: relative; margin-top: 6px; border: 1px solid #f0f1f3; border-radius: 3px; background: #fff; }
.rpt-expand {
  position: absolute; left: 12px; top: 10px; z-index: 2;
  height: 22px; padding: 0 8px; font-size: 12px; color: #286bf0;
  background: #fff; border: 1px solid #d9dce1; border-radius: 3px; cursor: pointer;
}
.rpt-expand:hover { border-color: #286bf0; background: #f5f9ff; }
.rpt-chart-box { height: 200px; padding: 34px 8px 8px; transition: height .18s ease; }
.rpt-chart.is-open .rpt-chart-box { height: 360px; }
.rpt-chart svg { width: 100%; height: 100%; display: block; }

/* —— 数据表 —— */
.rpt-table-scroll { margin-top: 10px; overflow-x: auto; }
.rpt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.rpt-table th {
  background: #f7f8fa; color: #6b7a90; font-weight: 500; white-space: nowrap;
  padding: 8px; border-bottom: 1px solid #e5e6eb; text-align: right;
}
.rpt-table th.col-date { text-align: left; }
.rpt-table th.sortable { cursor: pointer; user-select: none; }
.rpt-table th.sortable:hover { color: #286bf0; }
.rpt-sort { color: #c8ccd4; margin-left: 3px; font-size: 11px; }
.rpt-table th.is-sorted { color: #286bf0; }
.rpt-table th.is-sorted .rpt-sort { color: #286bf0; }
.rpt-table td {
  padding: 8px; border-bottom: 1px solid #f0f1f3; color: #333;
  text-align: right; font-family: var(--font-num); white-space: nowrap;
}
.rpt-table td.col-date { text-align: left; color: #1b2534; }
.rpt-table tbody tr:hover td { background: #f7f9ff; }
.rpt-table tfoot td {
  background: #fafbfc; font-weight: 600; color: #1b2534; border-top: 1px solid #e5e6eb; border-bottom: 0;
}
.rpt-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 2px 0; font-size: 12px; color: #8a94a6; flex-wrap: wrap;
}
.rpt-foot-right { display: inline-flex; align-items: center; gap: 4px; }

@media (max-width: 900px) {
  .rpt-layout { flex-direction: column; }
  .rpt-side { flex: 1 1 auto; width: 100%; }
}

/* ===== 素材预审 ===== */
.prereview-wrap { max-width: 1080px; margin: 0 auto; padding: 8px 4px 40px; }
.prereview-wrap h2 { margin: 4px 0 6px; }
.prereview-sub { color: var(--muted, #6b7280); margin: 0 0 18px; font-size: 13px; }
.prereview-grid { display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: start; }
.prereview-form { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 18px; }
.prereview-form .field { margin-bottom: 16px; }
.prereview-form .field > label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 13px; }
.prereview-form .seg { display: flex; flex-wrap: wrap; gap: 6px; }
.preview-upload-tip { font-size: 12px; }
.pr-file-tip { font-size: 12px; color: var(--muted, #6b7280); margin-top: 6px; }
.prereview-result { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 18px; min-height: 320px; }
.pr-placeholder { color: var(--muted, #6b7280); font-size: 14px; }
.pr-status { margin-top: 12px; font-size: 13px; color: #2563eb; }
.pr-pass { color: #16a34a; font-weight: 600; font-size: 15px; padding: 10px 0; }
.pr-reject { color: #e5484d; font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.pr-card { border: 1px solid #f1d4d4; background: #fff7f7; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.pr-cat { font-weight: 700; color: #b42318; margin-bottom: 4px; }
.pr-reason { font-size: 13px; color: #444; margin-bottom: 6px; }
.pr-advice { margin: 0; padding-left: 18px; font-size: 13px; color: #333; }
.pr-advice li { margin-bottom: 4px; }
.pr-foot { font-size: 12px; color: var(--muted, #6b7280); margin-top: 8px; }
.pr-error { color: #e5484d; font-weight: 600; }
.pr-hint { font-weight: 400; color: #b42318; font-size: 13px; margin-top: 6px; }
@media (max-width: 860px) { .prereview-grid { grid-template-columns: 1fr; } }
