
/* ========== 主题变量 ========== */
/* ================================================================
   设计令牌 · 单一来源（P0 · 2026-11-04）
   取代原三处 :root（初版玻璃 / V3 扁平 / 玻璃令牌补充）。
   规则：
   1. 组件样式引用语义令牌；旧变量名保留为桥接别名，存量引用不动
   2. 文字三档与按钮实底已按 WCAG 2.1 AA 验算（白底）：
      primary 15.66 / secondary 6.49 / muted 4.83 / 按钮白字 6.16
   3. 主题切换只重定义本块变量（见 .theme-tech），不逐条覆写组件
   ================================================================ */
:root {
  /* —— 表面 —— */
  --color-surface: #ffffff;
  --color-canvas: #f0f2f5;
  --color-raised: #f2f4f7;
  --color-line: #e5e7eb;
  --color-line-strong: rgba(17, 24, 39, 0.16);

  /* —— 文字 —— */
  --text-primary: #1f2330;
  --text-secondary: #5f5e5a;
  --text-muted: #6b7280;
  --text-tertiary: var(--text-muted); /* 修复：jobs 页 4 处引用此名但从未定义 */

  /* —— 主色（#1677FF 只作图形色，不承载文字） —— */
  --accent: #1677FF;
  --accent-solid: #0958d9;
  --accent-text: #185fa5;
  --accent-light: rgba(22, 119, 255, 0.12);

  /* —— 状态色（浅底+深字成对，均 ≥5.4:1） —— */
  --ok: #0f6e56;        --ok-soft: #e1f5ee;
  --warn: #854f0b;      --warn-soft: #faeeda;
  --danger-strong: #a32d2d; --danger-soft: #fcebeb;
  --info: #0c447c;      --info-soft: #e6f1fb;

  /* —— 玻璃令牌（报销区液态玻璃专用，原第 4261 行 :root 迁入） —— */
  --glass-bg-1: rgba(255, 255, 255, 0.82);
  --glass-bg-2: rgba(255, 255, 255, 0.56);
  --glass-bg-3: rgba(255, 255, 255, 0.68);
  --glass-edge: rgba(255, 255, 255, 0.66);
  --glass-hi-top: rgba(255, 255, 255, 0.92);
  --glass-hi-bot: rgba(255, 255, 255, 0.32);
  --glass-hi-ring: rgba(255, 255, 255, 0.16);
  --glass-blur: 36px;
  --glass-sat: 190%;
  --glass-r: 24px;
  --glass-s1: 0 1px 2px rgba(15, 23, 42, 0.05);
  --glass-s2: 0 10px 30px rgba(15, 23, 42, 0.09);
  --glass-s3: 0 32px 64px -24px rgba(15, 23, 42, 0.18);

  /* —— 桥接别名（存量 900+ 处引用，保持原视觉值） —— */
  --bg-overlay: rgba(0, 0, 0, 0.2);
  --card-bg: var(--color-surface);
  --card-bg-solid: var(--color-surface);
  --card-border: rgba(0, 0, 0, 0.06);
  --accent-strong: var(--accent-solid);
  --line-soft: var(--color-line);
  --danger: #e74c3c;
  --warning: #f39c12;
  --success: #00b894;
  --radius: 16px;
  --radius-sm: 10px;
  --blur: 20px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 预设主题背景（仅保留：科技·深空霓虹 / 清新草原） ========== */
.theme-meadow { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }

/* ========== 科技主题：深空霓虹 ========== */
.theme-tech {
  /* —— 深色语义令牌（2026-11-05 收敛：原散落硬编码，值零改动） —— */
  --d-text: #d8e6ff;  /* 深色主文字 */
  --d-accent-text: #7ceaff;  /* 深色亮青文字 */
  --d-accent-text-2: #9fdcff;  /* 深色次亮青文字 */
  --d-text-sub: #9fc3e8;  /* 深色次级说明文字 */
  --d-text-muted: #9ca3af;  /* 深色弱化文字 */
  --d-text-strong-soft: #e5e7eb;  /* 深色柔和浅文字 */
  --d-ok: #3dffb0;  /* 深色语义·正常/成功 */
  --d-danger: #ff8f8f;  /* 深色语义·异常/最差 */
  --d-warn: #ffc46b;  /* 深色语义·警示/待办 */
  --d-info: #a29bfe;  /* 深色语义·信息/剩余 */
  --d-accent: #00e5ff;  /* 深色主色（青） */
  --d-line-solid: #1f2937;  /* 深色实线分隔（侧栏） */
  --d-surface-solid: rgba(6, 15, 32, 0.9);  /* 深色实底面板 */
  --d-surface-solid-2: rgba(6, 15, 32, 0.85);  /* 深色实底面板（浅一档） */
  --d-surface-raise: rgba(8, 20, 40, 0.55);  /* 深色次级面 */
  --d-surface-raise-2: rgba(16, 24, 48, 0.55);  /* 深色次级面（偏蓝） */
  --d-line: rgba(0, 229, 255, 0.22);  /* 深色描边 */
  --d-line-strong: rgba(0, 229, 255, 0.18);  /* 深色描边（强） */
  --d-line-soft: rgba(0, 229, 255, 0.16);  /* 深色描边（弱） */
  --d-line-dim: rgba(0, 229, 255, 0.10);  /* 深色描边（极弱） */
  --d-accent-soft: rgba(0, 229, 255, 0.14);  /* 深色主色淡底/淡边 */
  --d-accent-soft-2: rgba(0, 229, 255, 0.12);  /* 深色主色淡底（略浅） */
  --d-accent-soft-3: rgba(0, 229, 255, 0.08);  /* 深色主色淡底（更浅） */
  --d-accent-soft-4: rgba(0, 229, 255, 0.07);  /* 深色行 hover 底 */
  --d-accent-soft-5: rgba(0, 229, 255, 0.05);  /* 深色表头 hover 底 */
  --d-ok-soft: rgba(61, 255, 176, 0.10);  /* 深色正常态淡底 */
  --d-danger-soft: rgba(255, 90, 90, 0.14);  /* 深色异常态淡底 */
  --d-warn-soft: rgba(255, 196, 107, 0.12);  /* 深色警示态淡底 */
  --bg-overlay: rgba(2, 6, 18, 0.25);
  --card-bg: rgba(9, 22, 42, 0.62);
  --card-bg-solid: rgba(7, 18, 36, 0.94);
  --card-border: rgba(0, 229, 255, 0.20);
  --text-primary: #d8e6ff;
  --text-secondary: rgba(178, 203, 235, 0.78);
  --text-muted: rgba(132, 164, 205, 0.5);
  --accent: #00e5ff;
  --accent-light: rgba(0, 229, 255, 0.14);
  --line-soft: rgba(0, 229, 255, 0.13);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.35);
  /* —— 深色玻璃令牌（原 body.theme-tech 块迁入） —— */
  --glass-bg-1: rgba(18, 34, 58, 0.70);
  --glass-bg-2: rgba(8, 20, 40, 0.50);
  --glass-bg-3: rgba(13, 28, 50, 0.62);
  --glass-edge: rgba(0, 229, 255, 0.24);
  --glass-hi-top: rgba(130, 224, 255, 0.34);
  --glass-hi-bot: rgba(0, 229, 255, 0.10);
  --glass-hi-ring: rgba(0, 229, 255, 0.10);
  --glass-s1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --glass-s2: 0 10px 30px rgba(0, 0, 0, 0.42);
  --glass-s3: 0 32px 64px -24px rgba(0, 0, 0, 0.55);
  background:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    radial-gradient(ellipse 90% 55% at 75% -12%, rgba(0, 229, 255, 0.14), transparent 60%),
    radial-gradient(ellipse 65% 45% at 8% 112%, rgba(102, 126, 234, 0.12), transparent 65%),
    linear-gradient(180deg, #030916 0%, #050e22 45%, #04101f 100%) !important;
  background-size: 44px 44px, 44px 44px, auto, auto, auto !important;
  background-attachment: fixed !important;
}

/* 卡片：霓虹描边 + 辉光 */
.theme-tech .card {
  background: rgba(9, 22, 42, 0.72);
  border: 1px solid rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.04), 0 0 28px rgba(0, 229, 255, 0.07), 0 10px 36px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.theme-tech .card:hover {
  border-color: rgba(0, 229, 255, 0.32);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.07), 0 0 38px rgba(0, 229, 255, 0.13), 0 12px 40px rgba(0, 0, 0, 0.55);
}

/* 顶栏 */
.theme-tech #topbar { background: rgba(5, 13, 28, 0.92); border-bottom: 1px solid rgba(0, 229, 255, 0.15); }
.theme-tech #topbar .topbar-title { color: #e8f4ff; text-shadow: 0 0 18px rgba(0, 229, 255, 0.45); }
.theme-tech .topbar-icon-btn { background: rgba(9, 22, 42, 0.8); border-color: var(--d-line); color: var(--d-accent-text-2); }
.theme-tech .topbar-icon-btn:hover { border-color: var(--accent); box-shadow: 0 0 12px rgba(0, 229, 255, 0.35); }
.theme-tech .topbar-search:focus-within { background: rgba(6, 15, 32, 0.95); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15); }
.theme-tech .stat-mini .num { color: var(--d-accent-text); text-shadow: 0 0 12px rgba(0, 229, 255, 0.35); }

/* 侧边栏：跟随「清新草原」主题外观。
   科技主题全局 --accent 为青色霓虹，此处在侧边栏子树内恢复 V3 主色 token，
   使导航高亮/品牌标识与草原主题保持同一套取值（桌面侧栏 + 移动端底部 Tab 均生效）。 */
.theme-tech .app-sidebar {
  --accent: #1677FF;
  --accent-light: rgba(22, 119, 255, 0.12);
}
@media (min-width: 981px) {
  .theme-tech .app-sidebar { background: #0d1117; border-right: 1px solid #1f2937; }
  .theme-tech .sidebar-brand { border-bottom-color: var(--d-line-solid); }
  .theme-tech .sidebar-foot { border-top-color: var(--d-line-solid); }
  .theme-tech .sidebar-tools { border-bottom-color: var(--d-line-solid); }
  .theme-tech .sidebar-brand .brand-name { color: var(--d-text-strong-soft); }
  .theme-tech .brand-ver { color: #93a1b3; }  /* 原 #6b7280 对 #0d1117 仅 3.91，提到 7.2 */
  .theme-tech .sidebar-item { color: var(--d-text-muted); border-radius: 9px; }
  .theme-tech .sidebar-item:hover { background: var(--d-line-solid); color: var(--d-text-strong-soft); box-shadow: none; }
  .theme-tech .sidebar-item.active {
    background: var(--accent-solid); color: #fff; font-weight: 600;
    border: none; box-shadow: none; text-shadow: none;
  }
  .theme-tech .sidebar-item.active::before { display: block; background: var(--accent); }
  .theme-tech #editModeBtn.editing { background: var(--accent-solid); color: #fff; border: none; box-shadow: none; }
  .theme-tech #syncIndicator { background: var(--d-line-solid); color: var(--d-text-muted); border: none; }
}

/* 弹窗与滑出面板 */
.theme-tech .modal-box, .theme-tech .slide-panel {
  background: rgba(7, 18, 36, 0.97);
  border: 1px solid rgba(0, 229, 255, 0.24);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.10), 0 24px 60px rgba(0, 0, 0, 0.6);
  color: var(--text-primary);
}
.theme-tech .modal-box h3 { color: var(--d-accent-text); }
.theme-tech .modal-overlay { background: rgba(2, 6, 16, 0.66); }

/* 表单控件统一深色 */
.theme-tech input[type="text"], .theme-tech input[type="number"], .theme-tech input[type="date"],
.theme-tech input[type="url"], .theme-tech input[type="search"], .theme-tech textarea, .theme-tech select,
.theme-tech .att-type-select, .theme-tech .att-add-form input, .theme-tech .att-add-form select,
.theme-tech .reimb-status-select, .theme-tech .reimb-add-form input, .theme-tech .reimb-add-form select,
.theme-tech .act-metric-row input, .theme-tech .act-compare-metric-select select,
.theme-tech .sub-add-row input, .theme-tech .todo-detail-add input,
.theme-tech .titlelib-tpl .tl-edit-input, .theme-tech .modal-box .form-group select,
.theme-tech .modal-box .form-group input, .theme-tech .modal-box .form-group textarea,
.theme-tech .plan-task-status, .theme-tech .btn-cancel, .theme-tech .topbar-btn:not(.primary) {
  background: var(--d-surface-solid);
  color: var(--d-text);
  border-color: var(--d-line);
}
.theme-tech .topbar-search { background: rgba(6, 15, 32, 0.8); }
.theme-tech input:focus, .theme-tech textarea:focus, .theme-tech select:focus {
  border-color: var(--d-accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
  outline: none;
}
.theme-tech input::placeholder, .theme-tech textarea::placeholder { color: rgba(132, 164, 205, 0.45); }
.theme-tech .btn-cancel:hover { background: var(--d-accent-soft-3); }
.theme-tech .topbar-btn:not(.primary):hover { background: var(--d-accent-soft-2); color: var(--d-accent); }

/* 主按钮霓虹 */
.theme-tech .btn-primary, .theme-tech .topbar-btn.primary {
  background: linear-gradient(135deg, #00c8e0, #0090ff);
  border: none;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
  color: #04101f;
  font-weight: 600;
}
.theme-tech .btn-primary:hover { box-shadow: 0 0 24px rgba(0, 229, 255, 0.55); }

/* 列表项：深色玻璃 */
.theme-tech .daily-task, .theme-tech .publish-entry, .theme-tech .todo-item,
.theme-tech .spark-item, .theme-tech .tag-filter .tag-chip { background: var(--d-surface-raise); border-color: var(--d-line-dim); }
.theme-tech .daily-task:hover, .theme-tech .publish-entry:hover, .theme-tech .todo-item:hover,
.theme-tech .spark-item:hover { background: rgba(10, 26, 50, 0.8); border-color: rgba(0, 229, 255, 0.28); }
.theme-tech .daily-task .dt-count { background: var(--d-line-dim); color: var(--d-accent-text); }
.theme-tech .quick-input input { background: rgba(6, 15, 32, 0.75); }
.theme-tech .quick-input input:focus { background: rgba(4, 10, 24, 0.95); }

/* 复选框与小徽标 */
.theme-tech .todo-checkbox, .theme-tech .todo-sub-checkbox, .theme-tech .batch-checkbox {
  background: var(--d-surface-solid); border-color: rgba(0, 229, 255, 0.35);
}
.theme-tech .todo-checkbox.checked, .theme-tech .todo-sub-checkbox.checked,
.theme-tech .batch-checkbox.checked { background: #00c8e0; border-color: #00c8e0; }
.theme-tech .sub-add-row button { background: transparent; color: var(--d-accent); }
.theme-tech .plan-task-owner, .theme-tech .plan-mat-qty {
  background: var(--d-surface-solid-2); color: var(--d-accent-text-2); border-color: var(--d-line-soft);
}
.theme-tech .att-type-select, .theme-tech .att-add-form input, .theme-tech .att-add-form select,
.theme-tech .reimb-status-select, .theme-tech .reimb-add-form input, .theme-tech .reimb-add-form select,
.theme-tech .plan-task-status, .theme-tech .act-metric-row input { color: var(--d-text); }

/* 活动对比视图（全屏） */
.theme-tech .act-compare-box {
  background: rgba(7, 18, 36, 0.98);
  border: 1px solid rgba(0, 229, 255, 0.26);
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.12), 0 24px 64px rgba(0, 0, 0, 0.65);
  color: var(--d-text);
}
.theme-tech .act-compare-metric-select { color: var(--d-accent-text-2); }
.theme-tech .act-compare-table th { background: var(--d-accent-soft-3); color: var(--d-accent-text); border-bottom: 1px solid rgba(0, 229, 255, 0.2); }
.theme-tech .act-compare-table th.act-col-first { background: var(--d-line-dim); }
.theme-tech .act-compare-table td { border-bottom: 1px solid rgba(0, 229, 255, 0.08); }
.theme-tech .act-compare-table td.act-col-first { background: rgba(7, 18, 36, 0.99); color: var(--d-text); }
.theme-tech .act-compare-table tr:hover td, .theme-tech .act-compare-table tr:hover td.act-col-first { background: var(--d-accent-soft-5); }
.theme-tech .act-compare-table .act-best { background: rgba(0, 230, 150, 0.14) !important; color: var(--d-ok); }
.theme-tech .act-compare-table .act-worst { background: rgba(255, 90, 90, 0.12) !important; color: var(--d-danger); }

/* 空状态与提示文字 */
.theme-tech .empty-tip, .theme-tech .act-tip, .theme-tech .act-compare-empty { color: rgba(132, 164, 205, 0.6); }
.theme-tech .swatch { border: 2px solid rgba(0, 229, 255, 0.25); }
.theme-tech .swatch.active { box-shadow: 0 0 0 2px #00e5ff, 0 0 10px rgba(0, 229, 255, 0.5); }
.theme-tech ::-webkit-scrollbar { width: 8px; height: 8px; }
.theme-tech ::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, 0.25); border-radius: 4px; }
.theme-tech ::-webkit-scrollbar-thumb:hover { background: rgba(0, 229, 255, 0.45); }
.theme-tech ::-webkit-scrollbar-track { background: transparent; }
.theme-tech input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8) sepia(1) saturate(3) hue-rotate(150deg); }

/* ===== 科技主题补充：模块内部行 / 徽标 / 文字适配 ===== */
/* 假勤·报销·活动·筹备 列表行：深色玻璃底 */
.theme-tech .att-item, .theme-tech .reimb-item, .theme-tech .plan-task-row,
.theme-tech .plan-mat-row, .theme-tech .plan-budget-row, .theme-tech .plan-tpl-row,
.theme-tech .act-metric-list-row { background: var(--d-surface-raise); }
.theme-tech .att-item:hover, .theme-tech .reimb-item:hover { background: var(--d-accent-soft-4); }
.theme-tech .reimb-item.done { background: rgba(8, 20, 40, 0.35); }

/* 行内主要文字 → 亮色 */
.theme-tech .att-item-hours, .theme-tech .att-item-note, .theme-tech .att-summary,
.theme-tech .reimb-item-name, .theme-tech .reimb-summary, .theme-tech .act-count,
.theme-tech .act-item-name, .theme-tech .act-item-date, .theme-tech .act-item-text,
.theme-tech .act-metric-chip, .theme-tech .act-metric-chip b,
.theme-tech .act-metric-row .act-metric-name,
.theme-tech .act-metric-list-row .act-ml-name,
.theme-tech .plan-item-name, .theme-tech .plan-item-date, .theme-tech .plan-detail-meta,
.theme-tech .plan-section-title, .theme-tech .plan-task-title, .theme-tech .plan-task-due,
.theme-tech .plan-mat-name, .theme-tech .plan-budget-item, .theme-tech .plan-budget-total,
.theme-tech .plan-tpl-row .plan-tpl-name { color: var(--d-text); }

/* 次要灰字 → 半透亮蓝灰 */
.theme-tech .att-item-date, .theme-tech .reimb-item-date,
.theme-tech .att-stat-label, .theme-tech .reimb-stat-label,
.theme-tech .att-stat-sub, .theme-tech .reimb-stat-sub,
.theme-tech .act-metric-row .act-metric-unit,
.theme-tech .act-metric-list-row .act-ml-unit,
.theme-tech .plan-section-title .plan-section-count,
.theme-tech .plan-mat-note, .theme-tech .plan-tpl-row .plan-tpl-count,
.theme-tech .plan-progress-meta { color: rgba(178, 203, 235, 0.66); }

/* 假勤/报销统计数值 → 霓虹亮色 */
.theme-tech .att-stat-value, .theme-tech .reimb-stat-value { color: #eaf3ff; }
.theme-tech .att-stat-overtime .att-stat-value, .theme-tech .reimb-stat-done .reimb-stat-value { color: var(--d-ok); }
.theme-tech .att-stat-leave .att-stat-value { color: var(--d-danger); }
.theme-tech .att-stat-remain .att-stat-value, .theme-tech .reimb-stat-total .reimb-stat-value { color: var(--d-info); }
.theme-tech .reimb-stat-pending .reimb-stat-value { color: var(--d-warn); }
.theme-tech .reimb-item-amount { color: var(--d-info); }

/* 类型/状态徽标 → 霓虹亮色 */
.theme-tech .att-item-type.overtime { background: rgba(61, 255, 176, 0.12); color: var(--d-ok); }
.theme-tech .att-item-type.leave { background: var(--d-danger-soft); color: var(--d-danger); }
.theme-tech .reimb-item-status.done { background: rgba(61, 255, 176, 0.12); color: var(--d-ok); }
.theme-tech .reimb-item-status.submitted { background: var(--d-warn-soft); color: var(--d-warn); }
.theme-tech .reimb-item-status.unsubmitted { background: rgba(178, 203, 235, 0.12); color: var(--d-text-sub); }
.theme-tech .act-metric-list-row .act-ml-higher { color: var(--d-ok); }
.theme-tech .act-metric-chip { background: var(--d-surface-raise); border-color: var(--d-accent-soft); }

/* 周期标签与任务状态 */
.theme-tech .dt-period.daily { background: var(--d-accent-soft); color: var(--d-accent-text); }
.theme-tech .dt-period.weekly { background: rgba(162, 155, 254, 0.16); color: #c3bcff; }
.theme-tech .dt-period.monthly { background: rgba(255, 196, 107, 0.14); color: var(--d-warn); }
.theme-tech .daily-task .dt-status.not_started { background: rgba(178, 203, 235, 0.12); color: var(--d-text-sub); }
.theme-tech .daily-task .dt-status.in_progress { background: var(--d-accent-soft); color: var(--d-accent-text); }
.theme-tech .daily-task .dt-status.done { background: rgba(61, 255, 176, 0.14); color: var(--d-ok); }

/* 筹备：分类/倒计时/状态/优先级徽标 */
.theme-tech .plan-item-cat { background: var(--d-line-dim); color: var(--d-accent-text); }
.theme-tech .plan-countdown.future { background: var(--d-ok-soft); color: var(--d-ok); }
.theme-tech .plan-countdown.today { background: var(--d-warn-soft); color: var(--d-warn); }
.theme-tech .plan-countdown.past { background: rgba(255, 90, 90, 0.12); color: var(--d-danger); }
.theme-tech .plan-status-chip.active { background: var(--d-ok-soft); color: var(--d-ok); }
.theme-tech .plan-status-chip.done { background: var(--d-accent-soft-2); color: var(--d-accent-text); }
.theme-tech .plan-status-chip.cancelled { background: rgba(178, 203, 235, 0.10); color: rgba(178, 203, 235, 0.6); }
.theme-tech .plan-task-prio.high { background: var(--d-danger-soft); color: var(--d-danger); }
.theme-tech .plan-task-prio.mid { background: var(--d-warn-soft); color: var(--d-warn); }
.theme-tech .plan-task-prio.low { background: var(--d-ok-soft); color: var(--d-ok); }

/* 筹备：进度条 / 添加按钮 / 分隔线 / 强调色 */
.theme-tech .plan-progress-bar { background: var(--d-line-dim); }
.theme-tech .plan-progress-fill { background: linear-gradient(90deg, #00e5ff, #0090ff); box-shadow: 0 0 8px rgba(0, 229, 255, 0.5); }
.theme-tech .plan-add-btn { color: var(--d-accent-text); background: var(--d-accent-soft-4); border-color: rgba(0, 229, 255, 0.35); }
.theme-tech .plan-add-btn:hover { background: var(--d-accent-soft); }
.theme-tech .plan-section { border-top-color: rgba(0, 229, 255, 0.13); }
.theme-tech .plan-task-due.urgent { color: var(--d-danger); }
.theme-tech .plan-budget-amount { color: var(--d-danger); }
.theme-tech .plan-row-act { color: var(--d-accent-text); background: var(--d-accent-soft-4); border-color: rgba(0, 229, 255, 0.3); }
.theme-tech .plan-row-act:hover { background: var(--d-accent-soft); }
.theme-tech .plan-reimb-chip { color: #6ee7b7; background: rgba(16, 185, 129, 0.12); }

/* 弹窗内：禁用输入 + 取消按钮（原规则并列特异性靠后者胜，此处显式提升） */
.theme-tech .modal-box .form-group input[disabled] { background: rgba(4, 10, 24, 0.8); color: rgba(132, 164, 205, 0.5); }
.theme-tech .modal-box .btn-cancel { background: var(--d-surface-solid); color: var(--d-text-sub); border-color: var(--d-line); }
.theme-tech .modal-box .btn-cancel:hover { background: var(--d-accent-soft-3); }

/* 顶栏搜索框文字 */
.theme-tech .topbar-search input { color: var(--d-text); }

/* ===== 科技主题补充二：白底元素深色化（链接/推广/台账等） ===== */
/* 常用工作链接卡片已改为主题变量驱动，无需在此覆写底色 */
.theme-tech .link-add-form input { background: var(--d-surface-solid); color: var(--d-text); border-color: var(--d-line); }

/* 推广记录：表单输入框（原规则带 [type] 属性选择器，特异性并列且靠后，需对齐属性选择器压制） */
.theme-tech .publish-add-form input[type="text"],
.theme-tech .publish-add-form input,
.theme-tech .publish-add-row input[type="text"],
.theme-tech .publish-add-row input[type="date"],
.theme-tech .publish-add-row input,
.theme-tech .publish-search input {
  background: var(--d-surface-solid); color: var(--d-text); border-color: var(--d-line);
}

/* 项目台账：指标卡与内联图表 */
.theme-tech .ledger-metric { background: var(--d-surface-raise); border-color: var(--d-accent-soft-2); }
.theme-tech .ledger-metric:hover { background: rgba(10, 26, 50, 0.85); border-color: rgba(0, 229, 255, 0.32); }
.theme-tech .ledger-inline-chart { background: var(--d-surface-raise); border-color: var(--d-accent-soft-2); }

/* 同类遗漏：批量操作条 / 待办·火花操作按钮 hover */
.theme-tech .batch-bar button { background: var(--d-surface-solid); color: var(--d-text); }
.theme-tech .batch-bar button:hover { background: var(--d-accent-soft); }
.theme-tech .batch-bar button.danger { background: rgba(231, 76, 60, 0.18); color: #ff8f85; }
.theme-tech .batch-bar button.danger:hover { background: rgba(231, 76, 60, 0.32); color: #ffd9d5; }
.theme-tech .batch-bar button:hover { background: var(--d-accent-soft-2); color: var(--d-accent); }
.theme-tech .batch-bar button.danger { background: var(--d-danger-soft); color: var(--d-danger); }
.theme-tech .batch-bar button.danger:hover { background: rgba(255, 90, 90, 0.22); color: #ffb3b3; }
.theme-tech .todo-actions button:hover, .theme-tech .spark-actions button:hover { background: var(--d-line-dim); color: var(--d-accent); }

/* 设置面板：功能按钮 */
.theme-tech .setting-btn { background: var(--d-surface-solid); color: var(--d-text); border-color: var(--d-line-strong); }
.theme-tech .setting-btn:hover { background: var(--d-accent-soft-2); color: var(--d-accent); }
.theme-tech .setting-btn.danger:hover { background: var(--d-danger-soft); border-color: var(--d-danger); }

/* 标题库：添加行输入框与下拉 */
.theme-tech .titlelib-add-row input,
.theme-tech .titlelib-add-row select {
  background: var(--d-surface-solid); color: var(--d-text); border-color: var(--d-line);
}

/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "Microsoft YaHei", "Segoe UI", "PingFang SC", sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.6s ease;
}

/* 背景层 */
#bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transition: background-image 0.6s ease, filter 0.3s ease;
}
#bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--bg-overlay);
  transition: background 0.3s ease;
  pointer-events: none;
}

/* ========== 顶栏（白卡片） ========== */
.topbar-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}
#topbar {
  position: relative;
  z-index: 10;
  margin: 20px 0 0;
  padding: 18px 26px;
  background: var(--card-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 18px;
}
#topbar .topbar-left { display: flex; flex-direction: column; min-width: 180px; }
#topbar .topbar-title { font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: 0.5px; }
#topbar .topbar-date { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

#topbar .topbar-stats { display: flex; gap: 10px; }
.stat-mini {
  background: var(--card-bg-solid);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 92px;
  transition: var(--transition);
}
.stat-mini:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stat-mini .num { font-size: 22px; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.stat-mini .num .denom { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.stat-mini .label { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

#topbar .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bg-label { font-size: 12px; color: var(--text-secondary); }
.bg-swatches { display: flex; gap: 6px; align-items: center; }
.swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { box-shadow: 0 0 0 2px var(--accent); }
.topbar-btn {
  padding: 7px 14px;
  border: 1px solid var(--card-border);
  background: var(--card-bg-solid);
  color: var(--text-primary);
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.topbar-btn:hover { background: var(--accent-solid); color: #fff; border-color: var(--accent); }
.topbar-btn.primary { background: var(--accent-solid); color: #fff; border-color: var(--accent); }
.topbar-btn.primary:hover { background: #5a4de0; }
.topbar-icon-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--card-border);
  background: var(--card-bg-solid);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.topbar-icon-btn:hover { background: var(--accent-solid); color: #fff; }

/* ========== 模块导航块 ========== */
.nav-block-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.nav-block-row.topbar-nav {
  /* 顶栏内：不占独立行，融入 flex 流 */
}
.nav-chip {
  padding: 5px 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.nav-chip:hover {
  background: var(--accent-solid);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(108,92,231,0.3);
}

/* ========== 主内容区 ========== */
#main {
  position: relative;
  z-index: 5;
  padding: 16px 12px 140px;
}


/* ========== 通用白色卡片 ========== */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 18px;
  transition: var(--transition);
}
.card:hover { box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.card-action {
  padding: 5px 12px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.card-action:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }



/* ========== 固定性任务清单 ========== */
.daily-tasks { display: flex; flex-direction: column; gap: 10px; }
.daily-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  transition: var(--transition);
}
.daily-task:hover { background: rgba(255, 255, 255, 0.65); }
.daily-task .dt-platform {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
}
.daily-task .dt-account {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}
.daily-task .dt-type {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 2px 8px;
  background: rgba(108, 92, 231, 0.08);
  border-radius: 6px;
  margin-right: 4px;
}
.daily-task .dt-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  white-space: nowrap;
}
.daily-task .dt-count .dt-dots {
  display: inline-flex;
  gap: 3px;
}
.daily-task .dt-count .dt-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #dee2e6;
  transition: var(--transition);
}
.daily-task .dt-count .dt-dot.filled { background: var(--success); }
.daily-task .dt-count .dt-num { color: var(--text-primary); }
.daily-task .dt-status {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  min-width: 76px;
}
.daily-task .dt-status.not_started { background: #f1f3f5; color: #6c757d; }
.daily-task .dt-status.in_progress { background: #e3f2fd; color: #1976d2; }
.daily-task .dt-status.done { background: #d4edda; color: #155724; }
.daily-task .dt-status:hover { transform: scale(1.04); }
.daily-task.done .dt-account { text-decoration: line-through; color: var(--text-muted); }
.daily-task .dt-del {
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 6px;
  transition: var(--transition);
  display: none;
}
body.edit-mode .daily-task .dt-del { display: block; }
.daily-task .dt-del:hover { background: rgba(231, 76, 60, 0.12); color: var(--danger); }

.daily-task-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.dt-checkin-stat {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 3px 12px;
  margin-left: 10px;
  background: rgba(108, 92, 231, 0.10);
  border: 1px solid rgba(108, 92, 231, 0.28);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
}
.dt-checkin-stat b {
  color: var(--accent);
  font-size: 14px;
  margin: 0 2px;
}
/* 周期标签 */
.dt-period {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.dt-period.daily { background: #e3f2fd; color: #1565c0; }
.dt-period.weekly { background: #f3e5f5; color: #7b1fa2; }
.dt-period.monthly { background: #fff3e0; color: #e65100; }
/* 完成锁定状态 */
.daily-task .dt-status.done-locked {
  cursor: default;
  opacity: 0.85;
}
.daily-task .dt-status.done-locked:hover { transform: none; }



/* ========== 公众号发布清单 ========== */
.publish-add-form {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.publish-add-form input[type="text"] {
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 13px;
  background: rgba(255,255,255,0.7);
  color: var(--text-primary);
  font-family: inherit;
}
.publish-add-form input[type="text"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.publish-add-row {
  display: flex; gap: 8px; margin-bottom: 10px; align-items: center;
}
.publish-add-row input[type="date"] {
  padding: 8px 10px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 13px;
  background: rgba(255,255,255,0.7);
  color: var(--text-primary);
  font-family: inherit;
  width: 140px; flex-shrink: 0;
}
.publish-add-row input[type="text"] {
  flex: 1; min-width: 80px;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 13px;
  background: rgba(255,255,255,0.7);
  color: var(--text-primary);
  font-family: inherit;
}
.publish-add-row input[type="text"]:focus,
.publish-add-row input[type="date"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.publish-add-row button {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent-solid);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.publish-add-row button:hover { opacity: 0.9; transform: translateY(-1px); }

.publish-search {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.publish-search input {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 13px;
  background: rgba(255,255,255,0.7);
  color: var(--text-primary);
  font-family: inherit;
}
.publish-search input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.publish-search .ps-info { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.publish-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 360px; overflow-y: auto;
}
.publish-list::-webkit-scrollbar { width: 5px; }
.publish-list::-webkit-scrollbar-thumb { background: rgba(108,92,231,0.3); border-radius: 3px; }

/* ===== 公众号职位推文发布 ===== */
.wxpub-stat { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }

.wxpub-config {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.wxpub-cfg-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 10px;
}
.wxpub-cfg-label { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.wxpub-cfg-row select {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  background: transparent; border: none; outline: none; cursor: pointer;
  padding: 2px 4px; border-radius: 6px;
}
.wxpub-cfg-row select:hover { background: rgba(108,92,231,0.1); }
.wxpub-cfg-row select option { color: #1f2937; background: #fff; }

.wxpub-cmd {
  margin-bottom: 10px; padding: 10px 14px;
  background: rgba(17, 24, 39, 0.06);
  border: 1px solid rgba(108,92,231,0.15);
  border-radius: 10px; overflow-x: auto;
}
.wxpub-cmd code {
  font-family: 'Consolas','Monaco','Courier New',monospace;
  font-size: 12.5px; color: var(--text-primary);
  white-space: nowrap; user-select: all; line-height: 1.6;
}

.wxpub-tip {
  font-size: 12.5px; color: var(--text-secondary);
  line-height: 1.7; padding: 8px 12px; margin-bottom: 12px;
  background: rgba(108,92,231,0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.wxpub-tip b { color: var(--accent); }

.wxpub-history { display: flex; flex-direction: column; gap: 6px; max-height: 460px; overflow-y: auto; }
.wxpub-history::-webkit-scrollbar { width: 5px; }
.wxpub-history::-webkit-scrollbar-thumb { background: rgba(108,92,231,0.3); border-radius: 3px; }

/* 发布记录：表头和每条记录共用同一个 grid 模板，列宽只在这里改一处就能对齐 */
.wxpub-log {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 148px 116px 76px;
  gap: 10px; align-items: center;
  padding: 9px 14px; background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 10px; transition: var(--transition);
}
.wxpub-log:hover { background: rgba(255, 255, 255, 0.7); border-color: var(--card-border); }
/* 标题栏：只有表头作用，不要卡片底和圆角 */
.wxpub-log-head {
  padding: 0 14px 7px; background: transparent;
  border: none; border-bottom: 1px solid var(--card-border); border-radius: 0;
  font-size: 11.5px; font-weight: 600; color: var(--text-muted);
}
.wxpub-log-head:hover {
  background: transparent; border-color: transparent;
  border-bottom-color: var(--card-border);
}
.wxpub-log .wl-title {
  font-size: 13.5px; font-weight: 600; color: var(--text-primary);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wxpub-log .wl-account,
.wxpub-log .wl-time {
  font-size: 12px; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wxpub-log .wl-count {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  background: rgba(108,92,231,0.12); color: var(--accent); white-space: nowrap;
  justify-self: start;
}
/* 推送状态。published 表是发布成功才落的，能进记录就说明这一步成了，
   所以这列真正要区分的是「群发=粉丝收到推送」还是「发表=只挂主页、不推送」 */
.wxpub-log .wl-status {
  font-size: 11.5px; font-weight: 600; text-align: right;
  color: #16a34a; white-space: nowrap;
}
/* 群发是唯一有推送效果的，单独给个色好认 */
.wxpub-log .wl-count.mass { background: rgba(14, 116, 144, 0.12); color: #0e7490; }
.wxpub-log .wl-status.mass { color: #0e7490; }
.wxpub-log .wl-del {
  cursor: pointer; font-size: 13px; color: var(--text-muted);
  padding: 2px 5px; border-radius: 5px; transition: var(--transition);
}
.wxpub-log .wl-del:hover { background: rgba(220, 38, 38, 0.12); color: #dc2626; }

.wxpub-empty { text-align: center; padding: 22px 10px; color: var(--text-muted); font-size: 13px; }

/* 失败记录：整行淡红 + 状态列红字。以前只有成功才落库，这一列永远绿，
   现在真会红 —— 出问题不用再翻服务器日志 */
.wxpub-log.fail {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(220, 38, 38, 0.16);
}
.wxpub-log.fail:hover { background: rgba(220, 38, 38, 0.09); }
.wxpub-log .wl-status.fail { color: #dc2626; cursor: help; }

/* 自动跳过的排期（过点超宽限没补发）：中性灰，别跟失败混在一起吓人 */
.wxpub-log.skip { background: rgba(107, 114, 128, 0.05); border-color: rgba(107, 114, 128, 0.18); }
.wxpub-log.skip:hover { background: rgba(107, 114, 128, 0.1); }
.wxpub-log .wl-status.skip { color: #6b7280; cursor: help; }

/* 加载更多：记录全量存在库里，页面按 50 条翻 */
.wxpub-more {
  margin: 4px auto 2px; padding: 7px 18px; border-radius: 9px;
  border: 1px dashed var(--card-border); background: transparent;
  color: var(--text-secondary); font-size: 12.5px; cursor: pointer;
  transition: var(--transition);
}
.wxpub-more:hover { border-color: var(--accent); color: var(--accent); background: rgba(108,92,231,0.06); }
.wxpub-more-end { text-align: center; padding: 8px 0 2px; font-size: 11.5px; color: var(--text-muted); }

/* 记录区顶部的筛选 */
.wx-hist-sel {
  height: 26px; padding: 0 8px; border-radius: 8px; font-size: 12px;
  border: 1px solid var(--card-border); background: var(--card-bg-solid, #fff);
  color: var(--text-secondary); cursor: pointer; max-width: 132px;
}
.wx-hist-sel:focus { outline: none; border-color: var(--accent); }

/* 定时推送设置 */
.wxpub-schedule { margin-bottom: 12px; }
.wxpub-sch-row { padding: 6px 12px; }
.wxpub-time {
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-primary);
  background: rgba(255, 255, 255, 0.65); border: 1px solid rgba(108,92,231,0.25);
  border-radius: 7px; padding: 3px 8px; outline: none; cursor: pointer;
}
.wxpub-time:disabled { opacity: 0.45; cursor: not-allowed; }
.wxpub-switch { display: inline-flex; align-items: center; cursor: pointer; }
.wxpub-switch input { display: none; }
.wxpub-switch-track {
  position: relative; display: inline-block; width: 38px; height: 21px;
  background: rgba(0, 0, 0, 0.18); border-radius: 11px; transition: var(--transition);
}
.wxpub-switch-dot {
  position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  background: #fff; border-radius: 50%; transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.wxpub-switch input:checked + .wxpub-switch-track { background: var(--accent); }
.wxpub-switch input:checked + .wxpub-switch-track .wxpub-switch-dot { left: 19px; }

.wxpub-sch-status {
  display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center;
  font-size: 12px; color: var(--text-secondary);
  padding: 7px 12px; margin-top: 8px; line-height: 1.7;
  background: rgba(108,92,231,0.05); border-radius: 9px;
}
.wxpub-sch-status b { color: var(--text-primary); font-weight: 600; }
.wxpub-sch-status .sch-on { color: #16a34a; font-weight: 600; }
.wxpub-sch-status .sch-off { color: var(--text-muted); }
.wxpub-sch-status .sch-warn { color: #d97706; }
.wxpub-sch-status .sch-err { color: #dc2626; }

/* 公众号自动发布：账号管理 / 今日预览 */
.wxpub-block { margin-bottom: 14px; }
.wxpub-block-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 8px;
}
.wxpub-hint { font-size: 12px; font-weight: 400; color: var(--text-muted); }

.wxpub-acclist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.wxacc {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.6); border: 1px solid var(--card-border);
  border-radius: 9px; padding: 7px 12px; font-size: 13px;
}
.wxacc .wa-name { font-weight: 600; color: var(--text-primary); }
.wxacc .wa-appid { font-size: 12px; color: var(--text-muted); font-family: monospace; }
.wxacc .wa-on {
  margin-left: auto; font-size: 12px; padding: 2px 10px; border-radius: 20px;
  background: rgba(0,0,0,0.07); color: var(--text-muted); cursor: pointer; user-select: none;
}
.wxacc .wa-on.on { background: rgba(22,163,74,0.14); color: #16a34a; font-weight: 600; }
.wxacc .wa-del {
  font-size: 13px; color: var(--text-muted); cursor: pointer;
  padding: 2px 7px; border-radius: 6px;
}
.wxacc .wa-del:hover { background: rgba(220,38,38,0.12); color: #dc2626; }

.wxpub-addrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wxpub-input {
  flex: 1 1 130px; min-width: 120px; font-family: inherit; font-size: 13px;
  color: var(--text-primary); background: rgba(255,255,255,0.65);
  border: 1px solid var(--card-border); border-radius: 8px; padding: 6px 10px; outline: none;
}
.wxpub-input:focus { border-color: var(--accent); }

.wxpub-prevlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.wxprev {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.6); border: 1px solid var(--card-border);
  border-radius: 9px; padding: 7px 12px; font-size: 13px;
}
.wxprev .wp-mode {
  flex: 0 0 auto; font-size: 12px; padding: 2px 9px; border-radius: 20px;
  background: rgba(108,92,231,0.12); color: var(--accent); font-weight: 600;
}
.wxprev.mass { border-color: rgba(220,38,38,0.3); }
.wxprev.mass .wp-mode { background: rgba(220,38,38,0.12); color: #dc2626; }
.wxprev .wp-title {
  flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-primary);
}
.wxprev .wp-meta { flex: 0 0 auto; font-size: 12px; color: var(--text-muted); }

/* 标题模板 */
/* 标题模板库：每个模板一个编号，排期里按编号勾选 */
.wxtpl-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.wxtpl-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wxtpl-no {
  flex: 0 0 auto; min-width: 22px; height: 22px; line-height: 22px; text-align: center;
  font-size: 12px; font-weight: 700; color: #fff; border-radius: 6px;
  background: var(--accent-solid); cursor: default;
}
.wxtpl-name { flex: 0 0 96px; font-size: 12.5px; }
/* 「不参与整库随机」开关：小复选框 + 两字标签，勾上高亮 */
.wxtpl-nr {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--text-muted); cursor: pointer; user-select: none;
  padding: 3px 6px; border-radius: 6px; border: 1px solid transparent; white-space: nowrap;
}
.wxtpl-nr:hover { background: rgba(16,24,40,0.045); }
.wxtpl-nr.on { color: var(--accent-solid); border-color: rgba(22,119,255,0.28);
  background: rgba(22,119,255,0.08); }
.wxtpl-nr input { margin: 0; width: 12px; height: 12px; cursor: pointer; }
/* 弹窗里的模板条目：标了「不随机」的加个小角标 */
.wsp-nr {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; padding: 0 5px;
  border-radius: 5px; color: var(--text-muted); background: var(--line-soft);
}
.wxtpl-text { flex: 1 1 auto; font-family: 'Consolas','Monaco','Courier New',monospace; }
.wxtpl-del {
  flex: 0 0 auto; width: 24px; height: 24px; line-height: 1; border: none; cursor: pointer;
  border-radius: 6px; background: rgba(220,60,60,0.12); color: #c0392b; font-size: 15px;
}
.wxtpl-del:hover { background: rgba(220,60,60,0.24); }
.wxtpl-add { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wxtpl-tplno {
  flex: 0 0 auto; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  font-size: 11px; font-weight: 700; color: #fff; border-radius: 5px;
  background: var(--accent-solid); opacity: 0.85;
}

/* 排期行里的标题模板勾选：小圆点编号，点一下选中/取消 */
.ws-tpls { display: inline-flex; gap: 3px; flex-wrap: wrap; margin-left: 2px; }
.ws-tpl {
  min-width: 20px; height: 20px; line-height: 19px; text-align: center; cursor: pointer;
  font-size: 11.5px; border-radius: 5px; padding: 0 4px;
  border: 1px solid var(--card-border); color: var(--text-muted); background: rgba(0,0,0,0.03);
}
.ws-tpl:hover { border-color: var(--accent); color: var(--accent); }
.ws-tpl.on {
  background: var(--accent-solid); border-color: var(--accent); color: #fff; font-weight: 700;
}

.wxtpl-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.wxtpl-label {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
  min-width: 32px;
}
.wxtpl-input { font-family: 'Consolas','Monaco','Courier New',monospace; }
.wxtpl-def {
  flex: 0 0 auto; cursor: pointer; font-size: 12px; padding: 3px 9px; border-radius: 7px;
  color: var(--text-muted); border: 1px solid var(--card-border); background: rgba(255,255,255,0.5);
}
.wxtpl-def:hover { color: var(--accent); border-color: var(--accent); }

.wxtpl-vars { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 6px 0 8px; }
.wxtpl-vars-label { font-size: 12px; color: var(--text-muted); margin-right: 2px; }
.wxtpl-var {
  cursor: pointer; font-size: 12px; padding: 3px 9px; border-radius: 7px;
  background: rgba(108,92,231,0.1); color: var(--accent); border: 1px solid transparent;
  white-space: nowrap;
}
.wxtpl-var:hover { background: rgba(108,92,231,0.2); border-color: var(--accent); }

.wxtpl-preview { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.wxtpl-line {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  background: rgba(255,255,255,0.6); border: 1px solid var(--card-border);
  border-radius: 8px; padding: 6px 11px;
}
.wxtpl-line.demo { opacity: 0.72; border-style: dashed; }
.wxtpl-mode {
  flex: 0 0 auto; font-size: 11.5px; padding: 1px 8px; border-radius: 20px;
  background: rgba(108,92,231,0.12); color: var(--accent); font-weight: 600;
}
.wxtpl-mode.mass { background: rgba(220,38,38,0.12); color: #dc2626; }
.wxtpl-txt {
  flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-primary);
}
.wxtpl-byte {
  flex: 0 0 auto; font-size: 11px; font-weight: 600; padding: 1px 7px;
  border-radius: 6px; font-variant-numeric: tabular-nums;
}
.wxtpl-byte.ok { background: rgba(22,163,74,0.12); color: #16a34a; }
.wxtpl-byte.warn { background: rgba(217,119,6,0.14); color: #d97706; }
.wxtpl-byte.over { background: rgba(220,38,38,0.14); color: #dc2626; }
.wxtpl-flag {
  flex: 0 0 auto; cursor: help; font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 6px; background: rgba(217,119,6,0.12); color: #d97706;
}

/* ------------------------------------------------------------------ 排期（主区）
   主次分明：今天怎么发放在最上面、可直接在行内改；模板/账号/记录收进折叠区。 */
/* ========== 自动发布：左边改设置，右边实时看预览 ========== */
.wxpub-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 520px;
  gap: 14px; align-items: start;
}
.wxpub-col { min-width: 0; }
.wxpub-col-set { display: flex; flex-direction: column; gap: 10px; }
/* 右栏两块：发布队列 + 预览，各自独立 */
.wxpub-col-preview {
  position: sticky; top: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.wxmod-queue .wxmod-body { padding-top: 8px; }
.wxpub-preview {
  border: 1px solid var(--card-border); border-radius: 12px; padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(108,92,231,0.07), rgba(108,92,231,0.02));
}
.wxpub-preview .wxmod-head {
  border-bottom: none; background: none; padding: 2px 0 8px;
}
.wxpreview-block { margin-bottom: 10px; }
.wxpreview-label {
  font-size: 11.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px;
}
.wxpub-preview .wxtpl-preview { margin-bottom: 0; }
.wxpub-preview .wxbody-preview { margin-top: 0; max-height: 540px; }
/* 发布队列：今天这个号几点发什么、发到哪了 */
.wx-queue { display: flex; flex-direction: column; gap: 5px; }
.wxq-sum { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.wxq-num {
  font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  background: rgba(128,128,128,0.12); color: var(--text-secondary);
}
.wxq-num.sent { background: rgba(22,163,74,0.13); color: #16a34a; }
.wxq-num.wait { background: rgba(108,92,231,0.13); color: var(--accent); }
.wxq-num.off  { background: rgba(128,128,128,0.14); color: var(--text-muted); }
.wxq-num.skip { background: rgba(217,119,6,0.15); color: #d97706; }
.wxq-row {
  display: flex; align-items: center; gap: 7px; font-size: 12px;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.62); border: 1px solid var(--card-border);
}
.wxq-row.sent { background: rgba(22,163,74,0.07); }
.wxq-row.off  { opacity: 0.5; }
.wxq-row.skip { background: rgba(217,119,6,0.07); }
.wxq-time {
  flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.wxq-mode {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  background: rgba(108,92,231,0.13); color: var(--accent);
}
/* 贴图行的渠道标签：跟 mode 一样的小胶囊，青绿色跟档位区分开 */
.wxq-chan {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  background: rgba(13,148,136,0.12); color: #0d9488;
}
body.theme-tech .wxq-chan { background: rgba(0,229,255,0.10); color: var(--d-accent-text); }
.wxq-mode.mass { background: rgba(220,38,38,0.12); color: #dc2626; }
.wxq-mode.draft { background: rgba(107,114,128,0.14); color: #6b7280; }
body.theme-tech .wxq-mode.draft { color: var(--d-text-sub); }
/* 推送账号：一眼看出这条发到哪个号。几个号给不同底色，扫一眼就分得开 */
.wxq-acc {
  flex: 0 0 auto; max-width: 96px; font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wxq-acc.a0 { background: rgba(108,92,231,0.13); color: #6c5ce7; }
.wxq-acc.a1 { background: rgba(22,163,74,0.13); color: #16a34a; }
.wxq-acc.a2 { background: rgba(217,119,6,0.14); color: #d97706; }
.wxq-acc.a3 { background: rgba(37,99,235,0.13); color: #2563eb; }
.wxq-title {
  flex: 1 1 auto; min-width: 0; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wxq-state { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.wxq-row.sent .wxq-state { color: #16a34a; }
.wxq-row.wait .wxq-state { color: var(--accent); }
.wxq-row.skip .wxq-state { color: #d97706; }
/* 队列每行的「立即发布」：正常是小按钮，已发 / 待生成时退化成灰色文字不点 */
.wxq-pub {
  flex: 0 0 auto; margin-left: auto; cursor: pointer;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  border: 1px solid rgba(108,92,231,0.35); background: rgba(108,92,231,0.10);
  color: var(--accent);
}
.wxq-pub:hover { background: rgba(108,92,231,0.20); }
.wxq-pub.done, .wxq-pub.off {
  cursor: default; border-color: var(--card-border); background: transparent;
  color: var(--text-muted); font-weight: 500;
}

.wxpreview-notes { display: flex; flex-direction: column; gap: 3px; }
.wxpreview-notes .wxpub-hint:empty { display: none; }

/* 设置模块：排期 / 标题 / 正文 / 账号 / 记录，各自一块 */
.wxmod {
  border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,0.45);
}
/* 深色主题：原先写死的半透明白底在暗色下会泛成一块灰白，改为深色玻璃 + 青色描边 */
.theme-tech .wxmod {
  background: var(--glass-bg-3);
  border-color: var(--d-line);
}
.theme-tech .wxmod-head {
  background: var(--d-accent-soft-4);
  border-bottom-color: var(--d-line);
}
.theme-tech .wxmod-title { color: var(--d-text); }
.theme-tech .wxmod-manual { border-color: rgba(0, 229, 255, 0.42); }
.wxmod-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; border-bottom: 1px solid var(--card-border);
  background: rgba(108,92,231,0.06);
}
.wxmod-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.wxmod-actions {
  margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.wxmod-body { padding: 11px 12px; }
.wxmod-manual { border-color: rgba(108,92,231,0.45); }
.wxmod-manual .wxmod-body { padding-top: 12px; }

/* 窄屏放不下两栏：预览落到设置下面 */
@media (max-width: 1180px) {
  .wxpub-layout { grid-template-columns: minmax(0, 1fr); }
  .wxpub-col-preview { position: static; }
}

.wx-today {
  border: 1px solid var(--card-border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(108,92,231,0.07), rgba(108,92,231,0.02));
}
.wx-today-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.wx-today-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.wx-today-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-action.primary {
  background: var(--accent-solid); color: #fff; border-color: var(--accent); font-weight: 600;
}
.card-action.primary:hover { filter: brightness(1.08); background: var(--accent-solid); color: #fff; }

.wx-slotlist { display: flex; flex-direction: column; gap: 6px; }
.wxslot {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; flex-wrap: wrap;
  background: rgba(255,255,255,0.6); border: 1px solid var(--card-border);
  border-radius: 10px; font-size: 13px;
}
.wxslot:hover { border-color: rgba(108,92,231,0.35); }
.wxslot.off { opacity: 0.48; }
.wxslot.sent { background: rgba(22,163,74,0.07); }
.wxslot .ws-idx {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(108,92,231,0.14); color: var(--accent);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.wxslot .ws-mode {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
  background: rgba(108,92,231,0.12); color: var(--accent);
}
.wxslot .ws-mode.mass { background: rgba(220,38,38,0.12); color: #dc2626; }
/* 仅草稿：中性灰，跟群发红/发布紫区分开 */
.wxslot .ws-mode.draft { background: rgba(107,114,128,0.14); color: #6b7280; }
body.theme-tech .wxslot .ws-mode.draft { color: var(--d-text-sub); }
.wxslot .ws-time {
  flex: 0 0 auto; width: 82px; padding: 4px 6px; border-radius: 8px;
  border: 1px solid var(--card-border); background: rgba(255,255,255,0.7);
  color: var(--text-primary); font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums; outline: none;
}
.wxslot .ws-time:focus { border-color: var(--accent); }
.wxslot .ws-src, .wxslot .ws-pick {
  flex: 0 0 auto; max-width: 148px; padding: 4px 6px; border-radius: 8px;
  border: 1px solid var(--card-border); background: rgba(255,255,255,0.7);
  color: var(--text-primary); font-size: 12px; cursor: pointer; outline: none;
}
.wxslot .ws-pick { max-width: 132px; }
/* 标题/正文/封面三个按钮作为一组：不够宽就整组落到下一行 */
.wxslot .ws-picks { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wxslot .ws-on { margin-left: auto; }
.wxslot .ws-src:focus, .wxslot .ws-pick:focus { border-color: var(--accent); }
.wxslot .ws-content {
  flex: 1 1 auto; min-width: 0; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wxslot .ws-content.pending { color: var(--text-muted); font-size: 12px; }
.wxslot .ws-flag {
  flex: 0 0 auto; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px;
}
.wxslot .ws-flag.ok { background: rgba(22,163,74,0.12); color: #16a34a; }
.wxslot .ws-flag.warn { background: rgba(217,119,6,0.14); color: #d97706; }

/* 排期第二行：这条推文用哪个标题模板、哪张封面 */
.wxslot .ws-extra {
  flex: 1 0 100%; display: flex; align-items: center; gap: 6px;
  padding: 6px 0 0 22px; flex-wrap: wrap;
}
.wxslot .ws-lab {
  flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--text-muted);
}
.wxslot .ws-tpls { flex: 1 1 auto; display: flex; gap: 5px; flex-wrap: wrap; }
.wxslot .ws-chip {
  font-size: 11px; padding: 2px 9px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--card-border); color: var(--text-muted);
  background: rgba(255,255,255,0.5); transition: all 0.15s; user-select: none;
}
.wxslot .ws-chip:hover { border-color: var(--accent); color: var(--accent); }
.wxslot .ws-chip.on {
  background: var(--accent-solid); border-color: var(--accent); color: #fff; font-weight: 600;
}
.wxslot .ws-none { font-size: 11px; color: var(--text-muted); }

/* 下拉多选（标题模板 / 封面）：点开勾选，勾多个就每天随机挑一个 */
.wxslot .wsm { position: relative; flex: 0 0 auto; }
/* 某个下拉展开时把**整行**提到最前。
   只给弹层自己加 z-index 挡不住：下面那几行的下拉按钮同样是定位元素，
   行与行之间才是同一个层叠上下文，弹层再高也只在自己行里说了算。 */
.wxslot.z-top { position: relative; z-index: 60; }
.wxslot .wsm-btn {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  height: 24px; padding: 0 7px; border-radius: 6px; font-size: 11.5px;
  border: 1px solid var(--card-border); color: var(--text-primary);
  background: rgba(255,255,255,0.5); user-select: none;
}
.wxslot .wsm-btn::-webkit-details-marker { display: none; }
.wxslot .wsm-btn::marker { content: ''; }
.wxslot .wsm-btn:hover { border-color: var(--accent); }
.wxslot .wsm[open] .wsm-btn { border-color: var(--accent); }
.wxslot .wsm-lab { font-size: 10.5px; font-weight: 700; color: var(--text-muted); }
.wxslot .wsm-val {
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wxslot .wsm-caret { font-size: 9px; color: var(--text-muted); }
/* 弹层用 fixed：坐标由 JS 在展开时算（见 wb.js 的 slotZ）。
   用 absolute 时它只在「自己那一行」的层叠里说了算——下面还有下一条排期、
   再下面还有三个设置按钮，谁压谁全看布局和窗口宽度，很脆；
   fixed 直接挂到视口上，不参与这些比较，一定在最上层。 */
.wxslot .wsm-pop {
  position: fixed; z-index: 900; top: 0; left: 0; min-width: 176px;
  max-height: 268px; overflow: auto; padding: 5px;
  border: 1px solid var(--card-border); border-radius: 9px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 6px 20px rgba(0,0,0,0.16);
}
.wxslot .wsm-opt {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px;
  border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--text-primary);
}
.wxslot .wsm-opt:hover { background: rgba(108,92,231,0.10); }
.wxslot .wsm-opt.on { background: rgba(108,92,231,0.18); font-weight: 600; }
.wxslot .wsm-thumb {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 5px; object-fit: cover;
}
.wxslot .wsm-name {
  flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wxslot .wsm-x { flex: 0 0 auto; color: var(--text-muted); font-size: 13px; padding: 0 3px; }
.wxslot .wsm-x:hover { color: #ff5b5b; }
.wxslot .wsm-foot {
  border-top: 1px solid var(--card-border); margin-top: 4px; padding-top: 4px;
}
.wxslot .wsm-add {
  display: inline-block; padding: 2px 6px; font-size: 11.5px;
  color: var(--accent); cursor: pointer;
}
.wxslot .wsm-empty { padding: 6px; font-size: 11px; color: var(--text-muted); }

/* 封面：小缩略图，点开选 */
.wxslot .ws-cover {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--card-border); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(128,128,128,0.08);
}
.wxslot .ws-cover:hover { border-color: var(--accent); }
.wxslot .ws-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wxslot .ws-cv-auto { font-size: 10px; color: var(--text-muted); }

/* 封面选择面板 */
.wx-cover-picker {
  display: none; margin-top: 10px; padding: 10px; border-radius: 10px;
  border: 1px solid var(--card-border); background: rgba(255,255,255,0.5);
}
.wx-cover-picker.show { display: block; }
.wxcv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wxcv-title { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.wxcv-actions { display: flex; gap: 6px; }
.wxcv-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px; margin-top: 9px; max-height: 260px; overflow-y: auto;
}
.wxcv-item {
  position: relative; aspect-ratio: 1 / 1; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; overflow: hidden;
  background: rgba(128,128,128,0.1);
  display: flex; align-items: center; justify-content: center;
}
.wxcv-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wxcv-item:hover { border-color: rgba(108,92,231,0.5); }
.wxcv-item.on { border-color: var(--accent); }
.wxcv-auto { font-size: 11px; color: var(--text-muted); }
.wxcv-tip { margin-top: 8px; font-size: 11px; color: var(--text-muted); }

/* 行内启用开关 */
.wxslot .ws-on { flex: 0 0 auto; cursor: pointer; display: inline-flex; }
.wxslot .ws-on input { display: none; }
.wxslot .ws-track {
  position: relative; width: 32px; height: 17px; border-radius: 10px;
  background: rgba(128,128,128,0.32); transition: background 0.15s;
}
.wxslot .ws-dot {
  position: absolute; top: 2px; left: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: #fff; transition: left 0.15s;
}
.wxslot .ws-on input:checked + .ws-track { background: var(--accent); }
.wxslot .ws-on input:checked + .ws-track .ws-dot { left: 17px; }

.wx-pub-note { margin-top: 9px; font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.wx-pub-note b { color: var(--accent); }

/* 四个设置入口：🏷 标题模板 / 📝 正文模板 / 📇 公众号账号 / 🧹 筛选规则
   直接复用「常用工作链接」那套卡片（.main-links-grid + .link-card）：图标在上、
   名称居中在下，配色和图标尺寸完全跟着看板走，这边只收了一下列宽——
   自动发布这栏比看板窄，按看板的 150px 会挤成 3+1。 */
.wxset-bar {
  display: grid;
  /* 五张卡（模板 / 正文 / 账号 / 筛选规则 / 手动发布），窄屏自动堆成两列 */
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
}
/* 选择器带两级是为了盖过 .main-links-grid .link-card 的尺寸 */
.wxset-bar.main-links-grid .link-card {
  width: 100%; min-height: 110px; padding: 16px 10px 14px; gap: 9px;
  font-family: inherit;
}
.wxset-bar.main-links-grid .link-name { font-size: 13px; }
/* 手动发布展开时这张卡高亮，省得猜现在是开还是关 */
.wxset-bar.main-links-grid .link-card.on {
  border-color: var(--accent); background: var(--accent-light);
}
.wxset-bar.main-links-grid .link-card.on .link-name { color: var(--accent); }

/* 筛选规则弹窗：一条规则一行，权重用小输入框，改完点外面保存/关闭都在统一的按钮区 */
.wxflt-tip { margin-bottom: 10px; line-height: 1.7; }
.wxflt-tip b { color: var(--accent); }
.wxflt-grp {
  margin: 14px 0 7px; padding-left: 7px; border-left: 3px solid var(--accent);
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
}
.wxflt-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 7px; font-size: 13px;
}
.wxflt-lab { flex: 0 0 auto; min-width: 96px; color: var(--text-primary); font-weight: 600; }
.wxflt-num { flex: 0 0 auto; width: 88px; min-width: 0; text-align: right; }
.wxflt-wide { width: 100%; flex: 1 1 260px; }
.wxflt-note { flex: 1 1 160px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.wxflt-chk {
  display: flex; align-items: center; gap: 8px; margin-bottom: 7px;
  font-size: 13px; color: var(--text-primary); cursor: pointer;
}
.wxflt-chk input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex: 0 0 auto; }

/* 排期按公众号切换：两个以上号才出现 */
.ws-accbox { display: inline-flex; align-items: center; }
.ws-accsel {
  max-width: 150px; padding: 4px 6px; border-radius: 8px;
  border: 1px solid var(--card-border); background: rgba(255,255,255,0.75);
  color: var(--text-primary); font-size: 12px; font-weight: 600; cursor: pointer;
  outline: none;
}
.ws-accsel:focus { border-color: var(--accent); }

/* 每篇推文放几个岗位 */
.ws-per {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-secondary); white-space: nowrap;
}
.ws-per select {
  padding: 3px 6px; border-radius: 7px; font-size: 12px; font-family: inherit; cursor: pointer;
  border: 1px solid var(--card-border); background: rgba(255,255,255,0.7); color: var(--text-primary);
}
.ws-per select:focus { outline: none; border-color: var(--accent); }

/* 正文模板：左边写模板，右边看效果 */
.wxbody-input {
  width: 100%; min-height: 210px; resize: vertical;
  font-family: 'Consolas','Monaco','Courier New',monospace;
  font-size: 13px; line-height: 1.8; padding: 10px 12px;
}
.wxbody-preview {
  margin-top: 10px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--card-border); background: rgba(255,255,255,0.5);
  max-height: 420px; overflow: auto;
}
.wxbody-demo { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
/* 正文卡片本身是浅灰底，外面垫一层白底才看得出在微信里的真实效果 */
.wxbody-phone {
  background: #fff; border-radius: 8px; padding: 14px 12px;
  font-size: 14px; line-height: 1.8; color: #222;
}

/* 次区：折叠起来的设置 */
.wx-sub {
  border: 1px solid var(--card-border); border-radius: 10px;
  margin-bottom: 8px; overflow: hidden;
}
.wx-sub > summary {
  cursor: pointer; padding: 9px 12px; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); list-style: none;
  display: flex; align-items: center; gap: 7px;
}
.wx-sub > summary::-webkit-details-marker { display: none; }
.wx-sub > summary::before {
  content: '▸'; font-size: 10px; color: var(--text-muted); transition: transform 0.15s;
}
.wx-sub[open] > summary::before { transform: rotate(90deg); }
.wx-sub > summary:hover { background: rgba(108,92,231,0.06); }
.wx-sub-body { padding: 2px 12px 12px; }


.card-action.danger { background: rgba(220,38,38,0.12); color: #dc2626; }

.theme-tech .wxpub-history::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, 0.28); }

.publish-entry {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  transition: var(--transition);
}
.publish-entry:hover { background: rgba(255, 255, 255, 0.7); border-color: var(--card-border); }
.publish-entry .pe-company {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  flex: 1; min-width: 0; word-break: break-all;
}
.publish-entry .pe-note {
  font-size: 12px; color: var(--text-secondary);
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.publish-entry .pe-date {
  font-size: 12px; color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px; border-radius: 6px; white-space: nowrap;
}
.publish-entry .pe-del {
  display: none; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; font-size: 14px;
  padding: 4px 6px; border-radius: 6px; transition: var(--transition);
  flex-shrink: 0;
}
body.edit-mode .publish-entry .pe-del { display: block; }
.publish-entry .pe-del:hover { background: rgba(231,76,60,0.12); color: var(--danger); }

.publish-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }

.publish-stat {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-secondary);
  margin-left: 8px;
}

/* ========== 双栏布局 ========== */
.dual-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-card {
  background: var(--card-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: flex; flex-direction: column;
  min-height: 360px;
  transition: var(--transition);
}
.panel-card:hover { box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12); }
.panel-card .card-header { margin-bottom: 14px; }
.panel-card .card-title { font-size: 16px; font-weight: 700; }
.panel-card .count-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px; font-weight: 600;
  padding: 1px 9px; border-radius: 20px;
  margin-left: 6px;
}

/* ========== 待办项 ========== */
.todo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: grab;
}
.todo-item:hover { background: rgba(255, 255, 255, 0.65); border-color: var(--card-border); }
.todo-item.dragging { opacity: 0.4; cursor: grabbing; }
.todo-item.done .todo-title { text-decoration: line-through; color: var(--text-muted); }
.todo-checkbox {
  width: 18px; height: 18px;
  border: 2px solid #c5cad6;
  border-radius: 5px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  background: #fff;
}
.todo-checkbox.checked { background: var(--success); border-color: var(--success); }
.todo-checkbox.checked::after { content: "✓"; color: #fff; font-size: 12px; font-weight: bold; }
.todo-content { flex: 1; min-width: 0; }
.todo-title { font-size: 14px; font-weight: 500; word-break: break-word; color: var(--text-primary); }
.todo-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.todo-date { font-size: 11px; color: var(--text-muted); }
.todo-actions { display: none; gap: 2px; }
body.edit-mode .todo-actions { display: flex; }
.todo-actions button {
  width: 24px; height: 24px;
  border: none; background: transparent;
  color: var(--text-secondary);
  border-radius: 5px; cursor: pointer; font-size: 12px;
  transition: var(--transition);
}
.todo-actions button:hover { background: rgba(255,255,255,0.8); color: var(--accent); }

/* ---- 待办标签 ---- */
#todoTagFilter { margin: 0 0 8px; }
.todo-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.todo-tag {
  font-size: 10px; padding: 1px 7px; border-radius: 4px;
  background: var(--accent-light); color: var(--accent); cursor: pointer;
  transition: var(--transition); user-select: none;
}
.todo-tag:hover { background: var(--accent-solid); color: #fff; }

/* ---- 二级待办（子项） ---- */
.todo-sub-list {
  margin: 6px 0 2px; padding: 7px 9px 6px 11px;
  background: rgba(31, 35, 48, 0.035);
  border-radius: 8px;
  border-left: 2px solid var(--accent-light);
}
.todo-sub-item {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 0; font-size: 13px;
}
.todo-sub-checkbox {
  width: 14px; height: 14px; flex-shrink: 0;
  border: 1.5px solid #c5cad6; border-radius: 50%;
  cursor: pointer; background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.todo-sub-checkbox.checked { background: var(--success); border-color: var(--success); }
.todo-sub-checkbox.checked::after { content: "✓"; color: #fff; font-size: 9px; font-weight: bold; }
.todo-sub-title { flex: 1; min-width: 0; word-break: break-word; color: var(--text-secondary); }
.todo-sub-item.done .todo-sub-title { text-decoration: line-through; color: var(--text-muted); }
.todo-sub-del {
  width: 20px; height: 20px; flex-shrink: 0;
  border: none; background: transparent;
  color: var(--text-muted); border-radius: 4px; cursor: pointer; font-size: 11px;
  opacity: 0; transition: var(--transition);
}
.todo-item:hover .todo-sub-del, body.edit-mode .todo-sub-del { opacity: 1; }
.todo-sub-del:hover { color: #e74c3c; background: rgba(231,76,60,0.1); }
.sub-add-row { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.sub-add-row input {
  flex: 1; min-width: 0; font-size: 12px; padding: 4px 8px;
  border: 1px solid var(--card-border); border-radius: 6px; outline: none;
  background: #fff; color: var(--text-primary); font-family: inherit;
  transition: var(--transition);
}
.sub-add-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
.sub-add-row button {
  flex-shrink: 0; width: 26px; height: 26px;
  border: 1px solid var(--card-border); border-radius: 6px;
  background: #fff; color: var(--accent); cursor: pointer; font-size: 14px;
  transition: var(--transition);
}
.sub-add-row button:hover { background: var(--accent-solid); border-color: var(--accent); color: #fff; }
.todo-sub-progress {
  font-size: 10px; color: var(--text-muted);
  background: rgba(31,35,48,0.05); padding: 1px 6px; border-radius: 8px;
  margin-left: 6px; vertical-align: 1px;
}

/* ---- 待办详情弹窗（二级待办管理） ---- */
.todo-detail-head { padding-bottom: 12px; border-bottom: 1px solid var(--line-soft, rgba(31,35,48,0.08)); margin-bottom: 4px; }
.todo-detail-title { font-size: 16px; font-weight: 600; color: var(--text-primary); line-height: 1.5; }
.todo-detail-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.todo-detail-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.todo-detail-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin: 14px 0 8px; }
.todo-detail-subs { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.todo-detail-sub {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 8px; font-size: 13px;
  transition: var(--transition);
}
.todo-detail-sub:hover { background: rgba(31,35,48,0.04); }
.todo-detail-sub-title { flex: 1; min-width: 0; word-break: break-word; color: var(--text-primary); }
.todo-detail-sub.done .todo-detail-sub-title { text-decoration: line-through; color: var(--text-muted); }
.todo-detail-sub .todo-sub-del { opacity: 0; }
.todo-detail-sub:hover .todo-sub-del { opacity: 1; }
.todo-detail-empty { text-align: center; padding: 22px 0; font-size: 12.5px; color: var(--text-muted); background: rgba(31,35,48,0.03); border-radius: 8px; }
.todo-detail-add { display: flex; gap: 8px; margin-top: 14px; }
.todo-detail-add input {
  flex: 1; min-width: 0; padding: 8px 12px; font-size: 13px;
  border: 1px solid var(--card-border); border-radius: 8px; outline: none;
  background: #fff; color: var(--text-primary); font-family: inherit;
  transition: var(--transition);
}
.todo-detail-add input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
.todo-detail-add button {
  flex-shrink: 0; padding: 0 16px; font-size: 13px;
  border: 1px solid var(--accent); border-radius: 8px;
  background: var(--accent-solid); color: #fff; cursor: pointer;
  transition: var(--transition);
}
.todo-detail-add button:hover { filter: brightness(1.08); }

/* 批量操作栏 */
.batch-bar {
  display: none; align-items: center; gap: 6px;
  padding: 8px 12px; margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.2);
}
.batch-bar.show { display: flex; }
.batch-bar .batch-info { flex: 1; font-size: 12px; color: var(--text-secondary); }
.batch-bar .batch-info b { color: #e74c3c; }
.batch-bar button {
  padding: 4px 10px; border: none; border-radius: 6px;
  font-size: 11px; cursor: pointer; transition: var(--transition);
  background: rgba(255,255,255,0.6); color: var(--text-primary);
  font-family: inherit;
}
.batch-bar button:hover { background: rgba(255,255,255,0.9); }
.batch-bar button.danger { background: rgba(231, 76, 60, 0.15); color: #c0392b; }
.batch-bar button.danger:hover { background: rgba(231, 76, 60, 0.25); color: #fff; }
.batch-checkbox {
  width: 16px; height: 16px;
  border: 2px solid #c5cad6;
  border-radius: 4px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); background: #fff;
}
.batch-checkbox.checked { background: var(--danger); border-color: var(--danger); }
.batch-checkbox.checked::after { content: "✓"; color: #fff; font-size: 10px; font-weight: bold; }
.todo-item.batch-selected { background: rgba(231, 76, 60, 0.08); border-color: rgba(231, 76, 60, 0.3); }
.todo-item.batch-mode { cursor: pointer; }

/* ========== 已完成视图（点筛选行「✅ 已完成」状态片切换，按完成月份分组） ========== */
.todo-archive {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--card-border);
}
.todo-archive-group {
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid transparent;
  transition: var(--transition);
}
.todo-archive-group:hover { border-color: var(--card-border); }
.todo-archive-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; cursor: pointer; user-select: none;
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
}
.todo-archive-head:hover { background: rgba(255, 255, 255, 0.5); border-radius: 8px; }
.todo-archive-arrow { font-size: 9px; color: var(--text-muted); transition: transform .18s; }
.todo-archive-group.open .todo-archive-arrow { transform: rotate(90deg); }
.todo-archive-title { flex: 1; min-width: 0; }
.todo-archive-count { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.todo-archive-body { padding: 0 10px 8px; }
.todo-archive-group:not(.open) .todo-archive-body { display: none; }
.todo-archive-body .todo-item { margin-bottom: 6px; }
.todo-archive-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 22px 0; }

/* ========== 火花项 ========== */
.spark-item {
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: grab;
}
.spark-item:hover { background: rgba(255, 255, 255, 0.65); border-color: var(--card-border); }
.spark-item.dragging { opacity: 0.4; cursor: grabbing; }
.spark-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.spark-title { font-size: 14px; font-weight: 600; flex: 1; color: var(--text-primary); }
.spark-body { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.6; word-break: break-word; }
.spark-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.spark-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.spark-tag {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  cursor: pointer;
  transition: var(--transition);
}
.spark-tag:hover { background: var(--accent-solid); color: #fff; }
.spark-time { font-size: 11px; color: var(--text-muted); }
.spark-actions { display: flex; gap: 2px; opacity: 0; transition: var(--transition); }
.spark-item:hover .spark-actions, body.edit-mode .spark-actions { opacity: 1; }
.spark-actions button {
  width: 24px; height: 24px;
  border: none; background: transparent;
  color: var(--text-secondary);
  border-radius: 5px; cursor: pointer; font-size: 12px;
  transition: var(--transition);
}
.spark-actions button:hover { background: rgba(255,255,255,0.8); color: var(--accent); }
.spark-note { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; word-break: break-word; border-left: 2px solid var(--accent-light); padding-left: 6px; }

/* ========== 日历排班表（紧凑尺寸，整卡高度约为原版 2/3） ========== */
/* 注意：.card 的 padding/标题字号在后面有通用定义，此处需提高特异性才能覆盖 */
.card.schedule-card { padding: 12px 16px; }
.card.schedule-card .card-title { white-space: nowrap; font-size: 14px; }
.schedule-card .card-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: nowrap; margin-bottom: 8px; }
.sched-week-head {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 3px;
}
.sched-week-head span {
  text-align: center; font-size: 10px; font-weight: 600; color: var(--text-secondary); padding: 1px 0; line-height: 1.2;
}
.sched-week-head .sched-wkend { color: #A32D2D; }
.sched-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.sched-cell {
  position: relative; min-height: 26px; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; border: 1px solid transparent; cursor: default;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sched-cell:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(31,35,48,0.10); }
.sched-cell .sched-day { font-weight: 600; line-height: 1.05; }
.sched-cell.other-month { opacity: 0.3; }
.sched-cell.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }

/* 状态底色：上班=白、休息=绿、节假日=红、调休上班=紫橙 */
.sched-cell.work { background: #f7f9fc; color: var(--text-primary); }
.sched-cell.rest { background: rgba(15,110,86,0.10); color: #0F6E56; }
.sched-cell.holiday { background: rgba(163,45,45,0.12); color: #A32D2D; font-weight: 700; }
.sched-cell.makeup { background: rgba(108,92,231,0.14); color: #534AB7; font-weight: 700; }

/* 假勤标记：加班绿、请假橙 */
.sched-cell .sched-marks { display: flex; gap: 1px; margin-top: 1px; }
.sched-cell .sched-marks i {
  font-style: normal; font-size: 8px; line-height: 1.2; padding: 0 2px;
  border-radius: 2px; font-weight: 700;
}
.sched-cell .mark-ot { background: #3dffb0; color: #075e42; }
.sched-cell .mark-leave { background: #ffc46b; color: #854F0B; }
/* 手工指定的休息日：用主题紫，跟大小周自动排出来的休息区分开 */
.sched-cell .mark-manual { background: #d5cff7; color: #3C3489; }

/* ========== 公招采集 ========== */
/* 页面布局：采集源在上、公告列表在下，两块等宽各占满整行。
   min-width:0 必须有——源里的长 URL 会把 1fr 轨道撑宽，之前整页挤在左上角就是它干的 */
#section-jobs-sources, #section-jobs-list { grid-column: 1 / -1; min-width: 0; }

/* 公告列表条目（jobs 页专用；看板小窗用的是 .jobs-item，别混） */
.jobs-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  text-decoration: none; transition: background 0.15s;
}
.jobs-row:hover { background: var(--accent-light); }
.jobs-row:hover .jobs-title { color: var(--accent); }
.jobs-date-chip {
  flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--text-secondary);
  background: var(--accent-light); border-radius: 6px; padding: 3px 7px;
  font-variant-numeric: tabular-nums;
}
.jobs-row .jobs-title {
  flex: 1; min-width: 0; font-size: 13px; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jobs-src-tag {
  flex-shrink: 0; max-width: 150px; overflow: hidden; text-overflow: ellipsis;
  font-size: 11px; color: var(--text-tertiary); white-space: nowrap;
  border: 1px solid var(--line-soft); border-radius: 999px; padding: 2px 9px;
}

.jobs-item {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 2px; border-bottom: 1px solid var(--line-soft);
}
.jobs-item:last-child { border-bottom: none; }
.jobs-title {
  flex: 1; min-width: 0; font-size: 13px; color: var(--text-primary);
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jobs-title:hover { color: var(--accent); text-decoration: underline; }
.jobs-date { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }

/* 采集源：一行一个，从左到右 网站名称 | 链接 | 采集数据，整条铺底色 */
.jobs-src {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; margin-bottom: 6px;
  background: var(--accent-light);
  border: 1px solid var(--line-soft); border-radius: 8px;
}
.jobs-src:last-child { margin-bottom: 0; }
.jobs-src-name {
  flex: 0 0 170px; min-width: 0;
  display: flex; align-items: center; gap: 6px;
}
.jobs-src-title {
  font-size: 13px; color: var(--text-primary); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jobs-src-meta {
  flex: 1 1 0; min-width: 0; font-size: 12px; color: var(--text-tertiary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jobs-src-del {
  background: none; border: none; color: var(--danger); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 6px; flex-shrink: 0;
}
.jobs-src-edit {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 2px 6px; flex-shrink: 0;
  border-radius: 4px; transition: var(--transition);
}
.jobs-src-edit:hover { background: rgba(22,119,255,0.12); color: var(--accent); }
/* 源条目：状态徽标（正常/失败/未运行）跟在网站名称后面 */
.jobs-src-status {
  display: inline-block; font-size: 10px; font-weight: 600; flex-shrink: 0;
  padding: 1px 7px; border-radius: 999px; vertical-align: 1px;
}
.jobs-src-status.ok { background: rgba(0,184,148,0.12); color: #0e9f6e; }
.jobs-src-status.fail { background: rgba(231,76,60,0.1); color: var(--danger); }
.jobs-src-status.idle { background: rgba(111,119,131,0.12); color: var(--text-tertiary); }
.jobs-src-info {
  flex: 0 1 auto; font-size: 12px; color: var(--text-secondary); white-space: nowrap;
}
/* 窄屏一行放不下三项，名称与采集数据各占一行 */
@media (max-width: 700px) {
  .jobs-src { flex-wrap: wrap; }
  .jobs-src-name { flex: 1 1 100%; }
  .jobs-src-info { flex: 1 1 100%; }
}

/* 发布队列 */
.pubq-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 2px; border-bottom: 1px solid var(--line-soft);
}
.pubq-item:last-child { border-bottom: none; }
.pubq-time {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  width: 46px; flex-shrink: 0;
}
.pubq-status {
  font-size: 11px; padding: 2px 6px; border-radius: 3px; flex-shrink: 0;
  background: rgba(108,92,231,0.12); color: #534AB7;
}
.pubq-status.ok { background: rgba(61,255,176,0.28); color: #075e42; }
.pubq-status.warn { background: rgba(255,196,107,0.32); color: #854F0B; }
.pubq-status.off { background: rgba(150,150,150,0.18); color: #6b7280; }
.pubq-title {
  flex: 1; min-width: 0; font-size: 13px; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 队列区填满卡片剩下的空间，排期多时内部滚动。
   之前写死 max-height:150px 会让卡片比同行矮一截；
   改成 flex:1 1 0 + min-height:0 后，卡片外面跟同行等高（stretch），
   内容区又能被压到任意高度而不撑破卡片。 */
#dashPubQueue {
  flex: 1 1 0; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding-right: 4px;                     /* 给滚动条让位，标题不会贴着它 */
  scrollbar-width: thin;
  scrollbar-color: rgba(31,35,48,0.20) transparent;
}
#dashPubQueue::-webkit-scrollbar { width: 4px; }
#dashPubQueue::-webkit-scrollbar-track { background: transparent; }
#dashPubQueue::-webkit-scrollbar-thumb { background: rgba(31,35,48,0.20); border-radius: 2px; }
#dashPubQueue::-webkit-scrollbar-thumb:hover { background: rgba(31,35,48,0.38); }
.pubq-account {
  flex-shrink: 0; max-width: 110px;
  font-size: 11px; padding: 2px 6px; border-radius: 3px;
  background: rgba(22,119,255,0.10); color: #1677ff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 看板小窗：待报销动态 / 假勤动态 ----------
   只占 1/3 页宽，卡片内边距、标题间距都相应收小。
   两张卡各 flex:1 平分 .dash-fin-col 的高度（容器跟着日历排班等高），
   数字块再 flex:1 撑满卡片，卡片被拉高时数字照样垂直居中 */
#section-dashreimb, #section-dashatt { padding: 14px 16px; }
.dash-fin-col > .card {
  flex: 1 1 0; min-height: 0;
  margin-bottom: 0;   /* .card 基类带 18px，而清零规则只管 #main > .card，
                         这两张卡是容器的子元素，不清掉间隔会宽成 26px */
  display: flex; flex-direction: column;
}
#section-dashreimb .card-header,
#section-dashatt .card-header { margin-bottom: 8px; }
/* 只留一个总数：金额 / 天数居中放大 */
.fin-hero {
  flex: 1 1 0; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px; border-radius: 10px;
  background: rgba(255,255,255,0.6); border: 1px solid var(--card-border);
}
.fin-hero .fh-value {
  font-size: 26px; font-weight: 700; line-height: 1.25; color: var(--text-primary);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 窄到放不下三列时，日历和动态卡组各占满整行（卡组内仍是上下两张） */
@media (max-width: 980px) {
  /* ≤980 整行由 .span-full-sm 承担（P3）；整行独占时不能再靠 flex 撑高度——那行只有它自己，
     行高就等于卡片最小高度，队列区会被压成 0 高看不见排期 */
  #section-pubqueue { display: block; }
  #dashPubQueue { flex: none; max-height: 150px; }
}

.sched-legend {
  display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 6px;
  padding-top: 5px; border-top: 1px solid var(--line-soft);
}
.sched-lg { display: flex; align-items: center; gap: 3px; font-size: 10px; color: var(--text-secondary); }
.sched-lg i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.lg-work { background: #f7f9fc; border: 1px solid var(--line-soft); }
.lg-rest { background: rgba(15,110,86,0.28); }
.lg-holiday { background: rgba(163,45,45,0.35); }
.lg-makeup { background: rgba(108,92,231,0.45); }
.lg-ot { background: #3dffb0; }
.lg-leave { background: #ffc46b; }
.sched-summary { margin-top: 5px; font-size: 11px; color: var(--text-secondary); line-height: 1.4; }
.sched-summary b { color: var(--text-primary); }
.sched-summary .s-ot { color: #0F6E56; }
.sched-summary .s-lv { color: #854F0B; }

/* 排班设置弹窗：日期列表 */
.sched-date-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-height: 96px; overflow-y: auto; }
.sched-date-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; padding: 2px 4px 2px 7px; border-radius: 5px;
  background: var(--accent-light); color: var(--accent);
}
.sched-date-chip button {
  border: none; background: transparent; color: inherit; cursor: pointer;
  font-size: 12px; line-height: 1; padding: 0 2px; opacity: 0.7;
}
.sched-date-chip button:hover { opacity: 1; color: #A32D2D; }
.sched-empty { font-size: 11px; color: var(--text-muted); }


/* 快速输入区 */
.quick-input {
  display: flex; gap: 6px;
  margin-bottom: 12px;
}
.quick-input input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.quick-input input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.85);
}
.quick-input input::placeholder { color: var(--text-muted); }
.quick-input button {
  padding: 0 18px;
  border: none;
  background: var(--accent-solid);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.quick-input button:hover { background: #5a4de0; }

/* 标签筛选条 */
.tag-filter { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.tag-filter .tag-chip {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.tag-filter .tag-chip.active { background: var(--accent-solid); border-color: var(--accent); color: #fff; }
.tag-filter .tag-chip:hover { border-color: var(--accent); }
/* 状态片「✅ 已完成」：激活时用绿色区分于标签片 */
.tag-filter .tag-chip.done-chip.active { background: #2e9e5b; border-color: #2e9e5b; color: #fff; }
.tag-filter .tag-chip.done-chip:hover { border-color: #2e9e5b; }

/* 空状态 */
.empty-state { text-align: center; padding: 28px 16px; color: var(--text-muted); }
.empty-state .emoji { font-size: 32px; margin-bottom: 6px; }
.empty-state .text { font-size: 13px; }

/* 面板内容滚动 */
.panel-body { max-height: 480px; overflow-y: auto; }
.panel-body::-webkit-scrollbar { width: 5px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 3px; }

/* ========== 假勤统计 ========== */
.att-overview { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.att-stat-card { flex: 1; min-width: 140px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--card-bg-solid); }
.att-stat-overtime { border-left: 3px solid #0F6E56; }
.att-stat-leave { border-left: 3px solid #A32D2D; }
.att-stat-remain { border-left: 3px solid #534AB7; }
.att-stat-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.att-stat-value { font-size: 20px; font-weight: 700; color: #1f2937; }
.att-stat-overtime .att-stat-value { color: #0F6E56; }
.att-stat-leave .att-stat-value { color: #A32D2D; }
.att-stat-remain .att-stat-value { color: #534AB7; }
.att-stat-sub { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.att-add-form { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.att-type-select { padding: 7px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; background: #fff; color: #374151; cursor: pointer; }
.att-add-form input, .att-add-form select { padding: 7px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; background: #fff; color: #374151; font-family: inherit; }
.att-add-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(83,74,183,0.1); }
.att-list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.att-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: #f9fafb; transition: background 0.15s; }
.att-item:hover { background: #f3f4f6; }
.att-item-type { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 22px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.att-item-type.overtime { background: rgba(15,110,86,0.1); color: #0F6E56; }
.att-item-type.leave { background: rgba(163,45,45,0.1); color: #A32D2D; }
.att-item-hours { font-weight: 600; font-size: 13px; color: #1f2937; min-width: 80px; }
.att-item-date { font-size: 12px; color: #6b7280; min-width: 90px; }
.att-item-note { font-size: 13px; color: #4b5563; flex: 1; }
.att-item-del { width: 26px; height: 26px; border: none; background: transparent; color: #9ca3af; cursor: pointer; border-radius: 6px; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.att-item-del:hover { background: rgba(163,45,45,0.08); color: #A32D2D; }
.att-summary { font-size: 12px; color: #6b7280; }

/* ========== 报销统计 ========== */
.reimb-overview { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.reimb-stat-card { flex: 1; min-width: 140px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--card-bg-solid); }
.reimb-stat-total { border-left: 3px solid #534AB7; }
.reimb-stat-done { border-left: 3px solid #0F6E56; }
.reimb-stat-pending { border-left: 3px solid #854F0B; }
.reimb-stat-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.reimb-stat-value { font-size: 20px; font-weight: 700; color: #1f2937; }
.reimb-stat-total .reimb-stat-value { color: #534AB7; }
.reimb-stat-done .reimb-stat-value { color: #0F6E56; }
.reimb-stat-pending .reimb-stat-value { color: #854F0B; }
.reimb-stat-sub { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.reimb-add-form { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.reimb-status-select { padding: 7px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; background: #fff; color: #374151; cursor: pointer; }
.reimb-add-form input, .reimb-add-form select { padding: 7px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; background: #fff; color: #374151; font-family: inherit; }
.reimb-add-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(83,74,183,0.1); }
.reimb-list { display: flex; flex-direction: column; gap: 4px; max-height: 400px; overflow-y: auto; }
.reimb-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: #f9fafb; transition: background 0.15s, opacity 0.2s; }
.reimb-item:hover { background: #f3f4f6; }
.reimb-item.done { background: #f3f4f6; opacity: 0.55; }
.reimb-item.done .reimb-item-name { text-decoration: line-through; color: #9ca3af; }
.reimb-item.done .reimb-item-amount { color: #9ca3af; }
.reimb-item-name { font-size: 13px; color: #1f2937; flex: 1; font-weight: 500; }
.reimb-item-amount { font-weight: 700; font-size: 14px; color: #534AB7; min-width: 80px; text-align: right; }
.reimb-item-status { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; min-width: 56px; }
.reimb-item-status.done { background: rgba(15,110,86,0.1); color: #0F6E56; }
.reimb-item-status.submitted { background: rgba(133,79,11,0.1); color: #854F0B; }
.reimb-item-status.unsubmitted { background: rgba(107,114,128,0.1); color: #6b7280; }
.reimb-item-date { font-size: 12px; color: #6b7280; min-width: 90px; }
.reimb-item-actions { display: flex; gap: 4px; }
.reimb-item-actions button { width: 26px; height: 26px; border: none; background: transparent; color: #9ca3af; cursor: pointer; border-radius: 6px; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.reimb-item-actions .reimb-cycle:hover { background: rgba(83,74,183,0.08); color: #534AB7; }
.reimb-item-actions .reimb-del:hover { background: rgba(163,45,45,0.08); color: #A32D2D; }
.reimb-status-dropdown { font-size: 11px; font-weight: 600; padding: 3px 6px; border: 1px solid rgba(0,0,0,0.1); border-radius: 4px; cursor: pointer; min-width: 56px; outline: none; }
.reimb-status-dropdown option { font-size: 12px; }
.reimb-summary { font-size: 12px; color: #6b7280; }
/* 报销详情：事项名下方的灰色小字，超长省略，鼠标悬停看全文 */
.reimb-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.reimb-item-detail { font-size: 11.5px; color: #6b7280; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reimb-item:hover .reimb-item-detail { white-space: normal; }
.reimb-item-actions .reimb-edit:hover { background: rgba(83,74,183,0.08); color: #534AB7; }
/* 合并报销：行内勾选框 + 合并弹窗里的明细行 */
.reimb-pick { width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; accent-color: #534AB7; }
.reimb-merge-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: #374151; padding: 4px 0; }
.reimb-merge-row span:last-child { font-variant-numeric: tabular-nums; color: #534AB7; font-weight: 600; }

/* ========== 活动复盘 ========== */
.act-count { font-size: 12px; color: #6b7280; }
.act-list { display: flex; flex-direction: column; gap: 8px; max-height: 620px; overflow-y: auto; }
.act-item { border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; background: var(--card-bg-solid); transition: box-shadow 0.15s; }
.act-item:hover { box-shadow: var(--shadow-sm); }
.act-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.act-item-name { font-size: 14px; font-weight: 700; color: #1f2937; flex: 1; min-width: 140px; cursor: pointer; }
.act-item-name:hover { color: var(--accent); }
.act-item-date { font-size: 12px; color: #6b7280; }
.act-item-cat { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: rgba(108,92,231,0.08); color: #534AB7; }
.act-item-rating { font-size: 12px; color: #f59e0b; letter-spacing: 1px; }
.act-item-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.act-metric-chip { font-size: 11px; color: #374151; background: #f9fafb; border: 1px solid #eef0f3; padding: 2px 8px; border-radius: 6px; }
.act-metric-chip b { color: #1f2937; }
.act-item-text { font-size: 12px; color: #6b7280; margin-top: 6px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.act-item-actions { display: flex; gap: 4px; margin-left: auto; }
.act-item-actions button { width: 28px; height: 28px; border: none; background: transparent; color: #9ca3af; cursor: pointer; border-radius: 6px; font-size: 14px; }
.act-item-actions .act-edit:hover { background: rgba(83,74,183,0.08); color: #534AB7; }
.act-item-actions .act-del:hover { background: rgba(163,45,45,0.08); color: #A32D2D; }
.act-tip { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* 编辑弹窗：指标输入行 */
.act-metric-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.act-metric-row .act-metric-name { font-size: 12px; color: #374151; min-width: 92px; font-weight: 500; }
.act-metric-row .act-metric-unit { font-size: 11px; color: #9ca3af; min-width: 44px; }
.act-metric-row input { flex: 1; padding: 7px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; background: #fff; font-family: inherit; outline: none; }
.act-metric-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(83,74,183,0.1); }
.act-no-metric { font-size: 12px; color: var(--text-muted); padding: 8px 0; }

/* 评分星 */
.act-rating { display: flex; gap: 4px; }
.act-rating span { font-size: 22px; cursor: pointer; color: #d1d5db; transition: transform 0.1s, color 0.15s; }
.act-rating span.on { color: #f59e0b; }
.act-rating span:hover { transform: scale(1.15); }

/* 指标管理列表 */
.act-metric-list-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #f9fafb; margin-bottom: 6px; }
.act-metric-list-row .act-ml-name { font-size: 13px; font-weight: 500; color: #1f2937; flex: 1; }
.act-metric-list-row .act-ml-unit { font-size: 11px; color: #6b7280; min-width: 60px; }
.act-metric-list-row .act-ml-higher { font-size: 11px; color: #0F6E56; }
.act-metric-list-row button { width: 26px; height: 26px; border: none; background: transparent; color: #9ca3af; cursor: pointer; border-radius: 6px; font-size: 13px; }
.act-metric-list-row .act-ml-del:hover { background: rgba(163,45,45,0.08); color: #A32D2D; }

/* 对比视图 */
.act-compare-overlay { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.act-compare-box { background: #fff; border-radius: 16px; width: 100%; max-width: 1200px; max-height: 92vh; display: flex; flex-direction: column; padding: 20px 22px; box-shadow: 0 24px 64px rgba(0,0,0,0.25); }
.act-compare-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.act-compare-metric-select { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; color: #374151; }
.act-compare-metric-select select { padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 12px; background: #fff; outline: none; }
.act-compare-table-wrap { overflow: auto; border: 1px solid var(--line-soft); border-radius: 12px; flex: 1; min-height: 0; }
.act-compare-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.act-compare-table th { background: #f9fafb; color: #374151; font-weight: 600; padding: 8px 10px; text-align: left; border-bottom: 1px solid #eef0f3; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.act-compare-table th.act-col-first { position: sticky; left: 0; z-index: 2; background: #f9fafb; }
.act-compare-table td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; white-space: nowrap; }
.act-compare-table td.act-col-first { position: sticky; left: 0; background: #fff; font-weight: 500; color: #1f2937; }
.act-compare-table tr:hover td { background: #fafbfc; }
.act-compare-table tr:hover td.act-col-first { background: #fafbfc; }
.act-compare-table .act-best { background: rgba(15,110,86,0.12) !important; color: #085041; font-weight: 600; }
.act-compare-table .act-worst { background: rgba(163,45,45,0.08) !important; color: #A32D2D; }
.act-compare-table .act-empty { color: #d1d5db; }
.act-compare-chart-wrap { height: 260px; margin-top: 14px; flex-shrink: 0; }
.act-compare-empty { text-align: center; color: #9ca3af; padding: 40px 0; font-size: 13px; }

/* ========== 活动筹备 ========== */
.plan-list { display: flex; flex-direction: column; gap: 10px; max-height: 620px; overflow-y: auto; }
.plan-item { border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; background: var(--card-bg-solid); transition: box-shadow 0.15s; }
.plan-item:hover { box-shadow: var(--shadow-sm); }
.plan-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-item-name { font-size: 14px; font-weight: 700; color: #1f2937; flex: 1; min-width: 140px; cursor: pointer; }
.plan-item-name:hover { color: var(--accent); }
.plan-item-date { font-size: 12px; color: #6b7280; }
.plan-item-cat { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: rgba(108,92,231,0.08); color: #534AB7; }
.plan-countdown { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 8px; }
.plan-countdown.future { background: rgba(15,110,86,0.1); color: #0F6E56; }
.plan-countdown.today { background: rgba(133,79,11,0.12); color: #854F0B; }
.plan-countdown.past { background: rgba(163,45,45,0.1); color: #A32D2D; }
.plan-status-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 8px; }
.plan-status-chip.active { background: rgba(15,110,86,0.1); color: #0F6E56; }
.plan-status-chip.done { background: rgba(108,92,231,0.1); color: #534AB7; }
.plan-status-chip.cancelled { background: #f1f3f5; color: #9ca3af; }
.plan-item-actions { display: flex; gap: 4px; margin-left: auto; }
.plan-item-actions button { width: 28px; height: 28px; border: none; background: transparent; color: #9ca3af; cursor: pointer; border-radius: 6px; font-size: 14px; }
.plan-item-actions button:hover { background: rgba(83,74,183,0.08); color: #534AB7; }
.plan-item-actions .plan-del:hover { background: rgba(163,45,45,0.08); color: #A32D2D; }
.plan-progress-wrap { margin-top: 10px; }
.plan-progress-bar { height: 6px; border-radius: 4px; background: #eef0f3; overflow: hidden; }
.plan-progress-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #534AB7, #7c6ef2); transition: width 0.3s; }
.plan-progress-meta { display: flex; justify-content: space-between; font-size: 11px; color: #9ca3af; margin-top: 4px; }
.plan-tip { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* 详情弹窗内区块 */
.plan-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.plan-detail-meta { font-size: 12px; color: #6b7280; display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.plan-section { border-top: 1px solid #eef0f3; margin-top: 14px; padding-top: 12px; }
.plan-section-title { font-size: 13px; font-weight: 700; color: #1f2937; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.plan-section-title .plan-section-count { font-size: 11px; font-weight: 500; color: #9ca3af; }

/* 任务行 */
.plan-task-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: #f9fafb; margin-bottom: 6px; flex-wrap: wrap; }
.plan-task-row.is-done { opacity: 0.55; }
.plan-task-row.is-done .plan-task-title { text-decoration: line-through; }
.plan-task-check { width: 16px; height: 16px; cursor: pointer; accent-color: #534AB7; }
.plan-task-title { font-size: 13px; color: #1f2937; font-weight: 500; flex: 1; min-width: 120px; cursor: pointer; white-space: normal; word-break: break-word; overflow-wrap: anywhere; line-height: 1.5; }
.plan-task-title:hover { color: var(--accent); }
/* 活动要点行：多行文字时 checkbox / 删除按钮对齐首行 */
.plan-point-row { align-items: flex-start; }
.plan-point-row .plan-task-check, .plan-point-row .plan-row-del { margin-top: 3px; }
.plan-task-owner { font-size: 11px; color: #6b7280; background: #fff; border: 1px solid #eef0f3; padding: 1px 7px; border-radius: 6px; }
.plan-task-due { font-size: 11px; color: #6b7280; }
.plan-task-due.urgent { color: #A32D2D; font-weight: 600; }
.plan-task-prio { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 5px; }
.plan-task-prio.high { background: rgba(163,45,45,0.1); color: #A32D2D; }
.plan-task-prio.mid { background: rgba(133,79,11,0.1); color: #854F0B; }
.plan-task-prio.low { background: rgba(15,110,86,0.1); color: #0F6E56; }
.plan-task-status { font-size: 11px; color: #6b7280; padding: 1px 8px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff; cursor: pointer; outline: none; }
.plan-row-del { width: 24px; height: 24px; border: none; background: transparent; color: #9ca3af; cursor: pointer; border-radius: 6px; font-size: 12px; flex-shrink: 0; }
.plan-row-del:hover { background: rgba(163,45,45,0.08); color: #A32D2D; }
/* 预算项「转入报销」按钮 / 已转入标记 */
.plan-row-act { font-size: 11px; color: #534AB7; background: rgba(83,74,183,0.06); border: 1px solid rgba(83,74,183,0.3); border-radius: 6px; padding: 2px 8px; cursor: pointer; flex-shrink: 0; }
.plan-row-act:hover { background: rgba(83,74,183,0.14); }
.plan-reimb-chip { font-size: 11px; color: #15803d; background: #dcfce7; border-radius: 6px; padding: 2px 8px; flex-shrink: 0; }

/* 物料/预算行 */
.plan-mat-row, .plan-budget-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: #f9fafb; margin-bottom: 6px; flex-wrap: wrap; }
.plan-mat-name { font-size: 13px; color: #1f2937; font-weight: 500; flex: 1; min-width: 100px; }
.plan-mat-name.is-done { text-decoration: line-through; color: #9ca3af; }
.plan-mat-qty { font-size: 11px; color: #6b7280; background: #fff; border: 1px solid #eef0f3; padding: 1px 7px; border-radius: 6px; }
.plan-mat-note { font-size: 11px; color: #9ca3af; }
.plan-budget-item { font-size: 13px; color: #1f2937; font-weight: 500; flex: 1; min-width: 100px; cursor: pointer; }
.plan-budget-item:hover { color: var(--accent); }
.plan-budget-amount { font-size: 13px; font-weight: 700; color: #A32D2D; }
.plan-budget-total { display: flex; justify-content: flex-end; gap: 6px; font-size: 13px; font-weight: 700; color: #1f2937; padding: 6px 10px 0; }
.plan-empty-row { font-size: 12px; color: var(--text-muted); padding: 6px 0; }
.plan-add-btn { font-size: 12px; color: #534AB7; background: rgba(83,74,183,0.06); border: 1px dashed rgba(83,74,183,0.35); border-radius: 8px; padding: 5px 12px; cursor: pointer; margin-top: 2px; }
.plan-add-btn:hover { background: rgba(83,74,183,0.12); }

/* 模板管理 */
.plan-tpl-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #f9fafb; margin-bottom: 6px; }
.plan-tpl-row .plan-tpl-name { font-size: 13px; font-weight: 500; color: #1f2937; flex: 1; }
.plan-tpl-row .plan-tpl-count { font-size: 11px; color: #9ca3af; }
.plan-tpl-row button { width: 26px; height: 26px; border: none; background: transparent; color: #9ca3af; cursor: pointer; border-radius: 6px; font-size: 13px; }
.plan-tpl-row .plan-tpl-edit:hover { background: rgba(83,74,183,0.08); color: #534AB7; }
.plan-tpl-row .plan-tpl-del:hover { background: rgba(163,45,45,0.08); color: #A32D2D; }


/* ========== 隐私锁定 ========== */
body.locked #main { filter: blur(12px); pointer-events: none; user-select: none; transition: filter 0.3s; }
#lockOverlay {
  display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 16px; font-weight: 600; color: #6b7280; letter-spacing: 1px;
  background: rgba(255,255,255,0.85); padding: 14px 28px; border-radius: 12px;
  z-index: 50; pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
body.locked #lockOverlay { display: block; }
#lockModeBtn.locked { color: #A32D2D; background: rgba(163,45,45,0.15); }
.lock-error { border-color: #A32D2D !important; }


/* ========== 侧滑面板 ========== */
.slide-panel {
  position: fixed;
  top: 0; right: -380px;
  width: 360px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid var(--card-border);
  z-index: 200;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 24px;
  color: var(--text-primary);
  box-shadow: -8px 0 32px rgba(0,0,0,0.08);
}
.slide-panel.open { right: 0; }
.slide-panel .panel-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px;
  border: none; background: transparent;
  color: var(--text-primary); font-size: 20px;
  cursor: pointer; border-radius: 8px;
  transition: var(--transition);
}
.slide-panel .panel-close:hover { background: rgba(0,0,0,0.06); }
.slide-panel h3 { font-size: 18px; margin-bottom: 18px; margin-top: 4px; }
.slide-panel .section { margin-bottom: 24px; }
.slide-panel .section-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 600; }

/* 链接卡片（配色跟随主题） */
.link-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.link-card:hover {
  background: var(--card-bg-solid);
  border-color: #b6bcc5;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.link-card .link-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-light);
  border-radius: 8px;
}
/* 自动匹配的内联 SVG 图标：线性描边、颜色跟 currentColor 走主题。
   手动指定的字符图标不受影响，仍由上面的 font-size 控制。 */
.link-card .link-icon svg { width: 20px; height: 20px; display: block; stroke: currentColor; }
.link-card .link-info { flex: 1; min-width: 0; }
.link-card .link-name { font-weight: 600; color: var(--text-primary); font-size: 13px; }
.link-card .link-url { font-size: 11px; color: var(--text-secondary); }
.link-card .link-del { opacity: 0; background: rgba(255,90,90,0.15); border: none; color: #ff6b6b; padding: 4px 7px; border-radius: 5px; cursor: pointer; font-size: 11px; transition: opacity 0.2s; }
.link-card:hover .link-del { opacity: 1; }
.link-add-form { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.link-add-form input {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  outline: none;
}
.link-add-form input:focus { border-color: var(--accent); }

/* 主页链接网格 —— 竖式大卡：图标在上、名称 + 域名在下，配色由主题变量驱动。
   列宽交给 auto-fill 自适应：宽屏多几列，窄屏自动堆成两列/一列，不写死列数。 */
.main-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.main-links-grid .link-card {
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 9px;
  padding: 18px 12px 15px;
  min-height: 122px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.main-links-grid .link-card:hover {
  transform: translateY(-3px);
  border-color: #b6bcc5;
  background: var(--card-bg-solid);
  box-shadow: var(--shadow);
}
.main-links-grid .link-card .link-icon {
  width: 52px; height: 52px;
  font-size: 26px;
  border-radius: 14px;
  flex-shrink: 0;
  background: rgba(111, 119, 131, 0.08);
  border: 1px solid transparent;
  box-shadow: none;
  transition: background .2s ease, transform .2s ease;
}
.main-links-grid .link-card:hover .link-icon {
  background: #dcdfe4;
  transform: scale(1.06);
}
.main-links-grid .link-card .link-icon svg { width: 26px; height: 26px; }
.main-links-grid .link-card .link-info {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.main-links-grid .link-card .link-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  /* 名称最多两行，超出省略，避免长名称把卡片撑高、同排卡片高度不一致 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.main-links-grid .link-card .link-url {
  display: block;
  max-width: 100%;
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main-links-grid .link-card .link-del {
  position: absolute;
  top: 6px;
  right: 6px;
  opacity: 0;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 7px;
  background: var(--card-bg-solid);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: opacity .2s, background .2s, color .2s, border-color .2s;
}
.main-links-grid .link-card:hover .link-del { opacity: 1; }
.main-links-grid .link-card .link-del:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.main-links-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: 20px;
  font-size: 12px;
}


/* 滑块 */
.slider-row { margin-bottom: 14px; }
.slider-row label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.slider-row input[type=range] { width: 100%; accent-color: var(--accent); }

/* 上传按钮 */
.upload-btn {
  display: block;
  width: 100%;
  padding: 10px;
  border: 2px dashed var(--card-border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  transition: var(--transition);
  font-family: inherit;
}
.upload-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* 设置按钮组 */
.setting-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.6);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  margin-bottom: 6px;
  transition: var(--transition);
  font-family: inherit;
}
.setting-btn:hover { background: rgba(255,255,255,0.9); }
.setting-btn.danger:hover { background: rgba(231, 76, 60, 0.1); border-color: var(--danger); }

/* ========== 模态框 ========== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  width: 90%; max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  color: var(--text-primary);
}
.modal-box h3 { font-size: 18px; margin-bottom: 16px; }
.modal-box .form-group { margin-bottom: 14px; }
.modal-box .form-group label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; }
.modal-box .form-group input,
.modal-box .form-group textarea,
.modal-box .form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--card-border);
  background: #fff;
  color: var(--text-primary);
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.modal-box .form-group input:focus,
.modal-box .form-group textarea:focus,
.modal-box .form-group select:focus { border-color: var(--accent); }
.modal-box .form-group textarea { resize: vertical; min-height: 70px; }
.modal-box .form-group .form-tip {
  font-size: 11px; color: var(--text-muted); line-height: 1.6; margin-top: 5px;
}
.modal-box .form-group input[disabled] { background: #f5f6f8; color: var(--text-muted); cursor: not-allowed; }
.modal-box .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.modal-box .btn {
  padding: 9px 18px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  transition: var(--transition);
  font-family: inherit;
}
.modal-box .btn-primary { background: var(--accent-solid); color: #fff; }
.modal-box .btn-primary:hover { background: #5a4de0; }
.modal-box .btn-cancel { background: #f1f3f5; color: var(--text-secondary); }
.modal-box .btn-cancel:hover { background: #e9ecef; }
.modal-tip {
  font-size:11px; color:var(--text-secondary); margin-bottom:10px; line-height:1.6;
  background:var(--accent-light); padding:8px 12px; border-radius:8px;
  border:1px solid rgba(108,92,231,0.15);
}

/* ========== Toast ========== */
#toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(31, 35, 48, 0.95);
  backdrop-filter: blur(20px);
  color: #fff;
  padding: 11px 24px;
  border-radius: 24px;
  font-size: 13px;
  z-index: 500;
  opacity: 0;
  transition: all 0.4s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* 带操作按钮的提示条（撤销用） */
#toast.with-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 10px 9px 20px;
  max-width: min(90vw, 460px);
}
.toast-action {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
  color: #fff;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 14px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background .15s;
}
.toast-action:hover { background: rgba(255,255,255,0.26); }

<!-- 数据监测模块已移除 -->
.view-tabs { display: none; }

/* ========== 响应式 ========== */

/* --- 平板 / 小屏桌面 (≤980px) --- */
@media (max-width: 980px) {
  .topbar-wrapper { padding: 0 12px; }
  #topbar { flex-wrap: wrap; padding: 14px 18px; gap: 12px; }
  #topbar .topbar-left { min-width: auto; }
  #topbar .topbar-title { font-size: 19px; }
  #topbar .topbar-right { width: 100%; margin-left: 0; justify-content: flex-start; flex-wrap: wrap; }
  #topbar .topbar-stats { flex: 1; justify-content: flex-end; }
  .stat-mini { min-width: 72px; padding: 8px 12px; }
  .stat-mini .num { font-size: 18px; }
  #main { padding: 16px 12px 120px; }
  .dual-panel { grid-template-columns: 1fr; }
  .card { padding: 16px 18px; margin-bottom: 14px; }
  .slide-panel { width: 340px; right: -340px; }
  .nav-chip { padding: 4px 10px; font-size: 11px; }
}

/* --- 手机横屏 / 小平板 (≤768px) --- */
@media (max-width: 768px) {
  .topbar-wrapper { padding: 0 8px; }
  #topbar { padding: 12px 14px; gap: 10px; border-radius: 14px; margin-top: 12px; }
  #topbar .topbar-title { font-size: 17px; }
  #topbar .topbar-date { font-size: 10px; }
  #topbar .topbar-stats { display: none; }
  #topbar .topbar-right { justify-content: flex-start; gap: 6px; }
  .topbar-btn { padding: 6px 10px; font-size: 11px; border-radius: 8px; }
  .topbar-icon-btn {
    width: 38px; height: 38px;
    font-size: 16px;
    border-radius: 10px;
  }
  #syncIndicator { font-size: 10px; padding: 3px 8px; }
  #main { padding: 12px 8px 100px; }
  .card { padding: 14px 14px; margin-bottom: 12px; border-radius: 14px; }
  .card-header { margin-bottom: 12px; flex-wrap: wrap; gap: 6px; }
  .card-title { font-size: 15px; }
  .card-action { font-size: 11px; padding: 5px 10px; }

  /* Slide panel: full-width overlay on phone */
  .slide-panel {
    width: 100vw; right: -100vw;
    border-radius: 20px 20px 0 0;
    padding: 20px 16px 32px;
    border-left: none;
    border-top: 1px solid var(--card-border);
    top: auto; bottom: 0;
    height: 85vh;
  }
  .slide-panel.open { right: 0; }
  .slide-panel h3 { font-size: 17px; margin-bottom: 14px; }
  .slide-panel .section { margin-bottom: 20px; }

  /* Modal: full width, bottom aligned */
  .modal-overlay { align-items: flex-end; }
  .modal-box {
    width: 100%; max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 20px 16px 28px;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-box h3 { font-size: 17px; }
  .modal-box .form-group input,
  .modal-box .form-group textarea,
  .modal-box .form-group select {
    font-size: 16px; /* prevent iOS zoom */
    padding: 10px 12px;
  }

  /* Setting buttons: bigger touch targets */
  .setting-btn {
    padding: 12px 14px;
    font-size: 13px;
    min-height: 44px;
  }

  .mt-btn { padding: 6px 10px; font-size: 11px; }

  /* Toast: wider on mobile */
  #toast { min-width: auto; width: 85%; max-width: 320px; font-size: 13px; padding: 10px 20px; }

  /* Nav blocks: compact on mobile */
  .nav-chip { padding: 3px 8px; font-size: 10px; border-radius: 12px; }
}


/* ⚠️ 以下一组规则（mt-btn / toast / nav-chip 紧凑值、发布表单竖排、链接网格收紧）
   原设计属 @media (max-width: 768px)，因历史括号错位在桌面端全局生效，现网视觉长期依赖。
   2026-11-05 修复：删除错位的多余 } 使括号平衡；本组**保持全局作用域**（视觉零变化）。
   若要还原为平板专属，需把这组移入上面的 @media 块并做桌面视觉评审。 */

  /* Publish add form */
  .publish-add-form { flex-direction: column; }
  .publish-add-form input { min-width: auto !important; width: 100%; }
  .publish-add-form button { width: 100%; }

  /* Link add form */
  .link-add-form { flex-wrap: wrap; gap: 6px; }
  .link-add-form input { min-width: auto !important; }

  /* Main links grid: tighter on tablet */
  .main-links-grid { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 10px; }
  .main-links-grid { gap: 12px; }
  .main-links-grid .link-card { padding: 15px 10px 13px; gap: 8px; min-height: 108px; }
  .main-links-grid .link-card .link-icon { width: 46px; height: 46px; font-size: 23px; border-radius: 12px; }
  .main-links-grid .link-card .link-icon svg { width: 23px; height: 23px; }
  .main-links-grid .link-card .link-name { font-size: 13px; }
  .main-links-grid .link-card .link-del { opacity: 0.6; }

/* --- 手机竖屏 (≤480px) --- */
@media (max-width: 480px) {
  .topbar-wrapper { padding: 0 4px; }
  #topbar {
    padding: 10px 10px; gap: 8px;
    border-radius: 12px; margin-top: 8px;
    flex-wrap: wrap;
  }
  #topbar .topbar-left { width: 100%; flex-direction: row; align-items: baseline; gap: 8px; }
  #topbar .topbar-title { font-size: 16px; }
  #topbar .topbar-right { gap: 5px; }
  .topbar-icon-btn { width: 36px; height: 36px; font-size: 15px; }

  #main { padding: 10px 6px 90px; }
  .card { padding: 12px 12px; margin-bottom: 10px; border-radius: 12px; }
  .card-title { font-size: 14px; }
  .card-header { margin-bottom: 10px; }

  /* Daily tasks: stack everything vertically */
  .daily-task {
    flex-wrap: wrap;
    padding: 10px 12px; gap: 8px;
    border-radius: 10px;
  }
  .daily-task .dt-platform { min-width: auto; width: 100%; font-size: 12px; }
  .daily-task .dt-account { min-width: 100%; font-size: 13px; }
  .daily-task .dt-count { font-size: 11px; padding: 3px 8px; }
  .daily-task .dt-status { min-width: 64px; padding: 6px 12px; font-size: 11px; }

  /* Todo/spark items: bigger tap area */
  .todo-item { padding: 10px 10px; gap: 10px; }
  .todo-item .todo-priority { font-size: 18px; }
  .todo-checkbox { width: 22px; height: 22px; }
  .spark-card { padding: 12px 14px; }


  /* Modal actions: full width buttons */
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; min-height: 44px; text-align: center; }

  /* Slide panel: tighter */
  .slide-panel { padding: 16px 12px 24px; height: 90vh; }
  .slide-panel h3 { font-size: 16px; }

  /* Form inputs: prevent zoom */
  input[type="text"], input[type="url"], input[type="date"],
  textarea, select {
    font-size: 16px !important;
    padding: 10px 12px !important;
  }

  /* Dual-column spark grid → single */
  #sparkGrid .dual-panel {
    grid-template-columns: 1fr;
  }

  /* Main links: 2 columns on phone, keep tech card look */
  .main-links-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 9px;
  }
  .main-links-grid { gap: 10px; }
  .main-links-grid .link-card { padding: 13px 8px 11px; gap: 7px; min-height: 96px; border-radius: 12px; }
  .main-links-grid .link-card .link-icon { width: 40px; height: 40px; font-size: 20px; border-radius: 11px; }
  .main-links-grid .link-card .link-icon svg { width: 20px; height: 20px; }
  .main-links-grid .link-card .link-name { font-size: 12px; }
  .main-links-grid .link-card .link-del { opacity: 0.5; font-size: 10px; padding: 2px 5px; }
  #mainLinkAddForm { flex-direction: column; }
  #mainLinkAddForm input { width: 100% !important; min-width: auto !important; }
  #mainLinkAddForm button { width: 100%; }
}

/* Cloud Sync Indicator */
#syncIndicator {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  white-space: nowrap;
  transition: opacity 0.3s;
}
.sync-status-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ========== 标题备选库（工作看板小窗版，卡片即 section-titlelib） ========== */
.titlelib-col-head {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
#section-titlelib .card-title .badge {
  font-size: 12px; font-weight: 400; color: var(--text-secondary);
  background: var(--accent-light); padding: 2px 10px; border-radius: 10px;
}
/* 右上角图标按钮：展开后高亮，表示对应区域正在显示 */
#section-titlelib .card-action.act {
  background: var(--accent-solid); border-color: var(--accent); color: #fff;
}
/* 模板列表：小窗里限高内滚，免得模板多了把卡片拉得很长 */
.titlelib-templates {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px;
  max-height: 300px; overflow-y: auto; padding-right: 2px;
}
/* 看板小窗里模板排得紧凑些：条目间距和上下留白都收小 */
#section-titlelib .titlelib-templates { gap: 3px; }
/* 只有约 1/3 页宽：字号收小，且每条模板只占一行，超出部分用省略号 */
#section-titlelib .titlelib-tpl { padding: 4px 9px; font-size: 12px; gap: 8px; }
#section-titlelib .titlelib-tpl .idx { width: 18px; height: 18px; font-size: 10px; }
#section-titlelib .titlelib-tpl .txt {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#section-titlelib .titlelib-tpl .hint { display: none; }
#section-titlelib .titlelib-templates { margin-bottom: 10px; }
#section-titlelib .titlelib-fill-row { gap: 8px; margin-bottom: 12px; }
/* 关键词标签现在排在最下面，底部不再需要留白（原本是给下方模板列表留的） */
#section-titlelib .titlelib-fill-tags { margin: -4px 0 2px; }
#section-titlelib .titlelib-tabs { gap: 5px; margin-bottom: 10px; }
#section-titlelib .titlelib-tab { padding: 4px 11px; font-size: 12px; }
#section-titlelib .titlelib-tag { padding: 5px 10px; font-size: 12px; }
.titlelib-tpl {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
  border: 1px solid transparent; user-select: none; font-size: 14px;
  color: var(--text-primary); line-height: 1.5;
}
.titlelib-tpl:hover { border-color: var(--accent); background: var(--accent-light); }
.titlelib-tpl.copied { border-color: var(--success); background: rgba(0,184,148,0.08); }
.titlelib-tpl .idx {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-light); display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 600; color: var(--accent);
}
.titlelib-tpl .txt { flex: 1; }
.titlelib-tpl .txt .hl { color: #ff6b35; font-weight: 600; }
.titlelib-tpl .fill { display: inline-block; background: rgba(255,107,53,0.1); border: 1px dashed #ff6b35; border-radius: 4px; padding: 1px 8px; color: #ff6b35; font-weight: 500; }
/* 模板变量块：{{date}} 当天日期 / {} 填空 */
.titlelib-tpl .txt .tl-chip {
  display: inline-block; background: rgba(255,107,53,0.1);
  border: 1px dashed #ff8a5c; border-radius: 4px; padding: 1px 8px; margin: 0 2px;
  color: #ff6b35; font-weight: 600; font-size: 13px; line-height: 1.5;
}
/* 还没填关键词的空占位：画一段淡下划线（原来的 "{}" 字面太像代码） */
.titlelib-tpl .txt .tl-chip.is-empty {
  display: inline-block; width: 2.4em; height: 0.95em;
  padding: 0; margin: 0 2px; border: none; border-bottom: 2px solid #c3c8d0;
  border-radius: 0; background: transparent; vertical-align: baseline;
}
/* {文字} 提示性占位（如 {岗位}）：灰字小块，填了关键词后被替换成词 */
.titlelib-tpl .txt .tl-chip.tl-ph {
  background: rgba(111,119,131,0.06); border: 1px dashed #c3c8d0;
  color: #98a0ab; font-weight: 500;
}
.titlelib-tpl .hint { flex-shrink: 0; font-size: 11px; color: var(--text-muted); opacity: 0; transition: opacity 0.2s; }
.titlelib-tpl:hover .hint { opacity: 1; }
.titlelib-fill-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.titlelib-fill-row input {
  flex: 1; min-width: 0; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--card-border); background: var(--card-bg-solid);
  font-size: 13px; font-family: inherit; color: var(--text-primary); outline: none; transition: border-color 0.2s;
}
.titlelib-fill-row input:focus { border-color: var(--accent); }
/* 关键词标签：按顺序填入模板的 {} / {1} {2} */
.titlelib-fill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.titlelib-fill-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px;
  border-radius: 6px; font-size: 12px; line-height: 1.6;
  background: rgba(255,107,53,0.1); border: 1px dashed #ff8a5c; color: #ff6b35;
}
.titlelib-fill-tag b { font-size: 11px; opacity: 0.7; font-weight: 600; }
.titlelib-fill-tag button {
  border: none; background: none; color: inherit; cursor: pointer;
  font-size: 13px; line-height: 1; padding: 0 0 0 1px;
}
.titlelib-fill-empty { font-size: 12px; color: var(--text-muted); }
.titlelib-fill-clear {
  margin-left: auto; padding: 2px 8px; border: 1px solid var(--card-border);
  border-radius: 5px; background: transparent; color: var(--text-muted);
  font-size: 12px; font-family: inherit; cursor: pointer;
}
.titlelib-fill-clear:hover { border-color: #6f7783; color: var(--text-secondary); }
.titlelib-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.titlelib-tab {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--card-border);
  background: var(--card-bg-solid); font-size: 13px; cursor: pointer;
  transition: all 0.15s; color: var(--text-secondary); white-space: nowrap;
}
.titlelib-tab:hover { border-color: var(--accent); color: var(--accent); }
.titlelib-tab.act { background: var(--accent-solid); color: #fff; border-color: var(--accent); font-weight: 600; }
.titlelib-words { display: none; flex-wrap: wrap; gap: 7px; }
.titlelib-words.act { display: flex; }
.titlelib-tag {
  padding: 7px 13px; border-radius: 8px; border: 1px solid var(--card-border);
  background: var(--card-bg-solid); font-size: 13px; cursor: pointer;
  transition: all 0.15s; color: var(--text-primary); user-select: none;
}
.titlelib-tag:hover { border-color: var(--accent); transform: translateY(-1px); }
.titlelib-tag.copied { background: rgba(0,184,148,0.12); border-color: var(--success); color: var(--success); }
.titlelib-divider { border: none; border-top: 1px solid var(--card-border); margin: 20px 0; }

/* ========== OKR 看板（顶栏替代统计） ========== */
.okr-board { display: flex; gap: 14px; flex: 1; }
.okr-row {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 14px; background: var(--card-bg-solid);
  border: 1px solid var(--card-border); border-radius: 12px;
  min-width: 180px; cursor: pointer; transition: var(--transition);
}
.okr-row:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.okr-row.dragging { opacity: 0.4; cursor: grabbing; }
.okr-row .okr-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.okr-row .okr-name .edit-icon { font-size: 10px; color: var(--text-muted); opacity: 0; transition: opacity 0.2s; }
.okr-row:hover .okr-name .edit-icon { opacity: 1; }
.okr-row .okr-stats { display: flex; align-items: baseline; gap: 6px; }
.okr-row .okr-num { font-size: 22px; font-weight: 700; }
.okr-row .okr-target { font-size: 13px; color: var(--text-muted); }
.okr-row .okr-source {
  font-size: 10px; font-weight: 500; color: #6c5ce7;
  background: rgba(108,92,231,0.1); border: 1px solid rgba(108,92,231,0.25);
  padding: 1px 7px; border-radius: 999px; white-space: nowrap;
  cursor: help;
}
.okr-bar-wrap { height: 6px; background: rgba(0,0,0,0.06); border-radius: 3px; overflow: hidden; }
.okr-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.okr-bar-fill.recruit { background: linear-gradient(90deg, #6c5ce7, #a29bfe); }
.okr-bar-fill.matchmaking { background: linear-gradient(90deg, #fd79a8, #fab1a0); }
.okr-board .okr-row { cursor: grab; }
.okr-board .okr-row:active { cursor: grabbing; }

/* ========== 滚动提醒栏 ========== */
.marquee-card { padding: 10px 20px !important; }
.marquee-wrap {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: nowrap; height: 28px; overflow: hidden;
}
.marquee-label {
  flex: 0 0 auto; font-size: 14px; font-weight: 700; color: var(--danger);
  white-space: nowrap; cursor: pointer; line-height: 1;
}
.marquee-track {
  flex: 1 1 auto; min-width: 0; overflow: hidden; height: 20px; position: relative;
}
.marquee-edit-btn {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border: none;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  padding: 0;
  line-height: 1;
  opacity: 0.6;
}
.marquee-edit-btn:hover {
  background: var(--accent-solid);
  color: #fff;
  transform: scale(1.1);
  opacity: 1;
}
.marquee-scroll {
  display: flex; gap: 40px; position: absolute;
  top: 0; line-height: 20px;
  padding-left: 4ch;
  animation: marqueeScroll 30s linear infinite;
  white-space: nowrap;
}
.marquee-item { font-size: 13px; color: var(--text-primary); font-weight: 500; line-height: 20px; }
.marquee-item .mq-num { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-solid); color: #fff; font-size: 10px; font-weight: 600; margin-right: 6px; vertical-align: middle; flex-shrink: 0; }
.marquee-item .mq-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--danger); margin: 0 3px; vertical-align: middle; }
@keyframes marqueeScroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ========== 待办对接人 & 优先级 ========== */
.todo-contact { font-size: 11px; color: var(--accent); margin-left: 6px; }
.todo-priority-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 4px; font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.todo-priority-tag.high { background: rgba(231,76,60,0.12); color: #e74c3c; }
.todo-priority-tag.medium { background: rgba(243,156,18,0.12); color: #f39c12; }
.todo-priority-tag.low { background: rgba(0,184,148,0.12); color: #00b894; }

/* ========== 火花分类标签 ========== */
.spark-cat {
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.spark-cat.recruit { background: rgba(108,92,231,0.12); color: #6c5ce7; }
.spark-cat.matchmaking { background: rgba(253,121,168,0.12); color: #fd79a8; }

/* ========== 项目管理台账 ========== */
.ledger-card { margin-bottom: 18px; }
.ledger-card .card-header { margin-bottom: 12px; }
.ledger-section { margin-bottom: 16px; }
.ledger-section:last-child { margin-bottom: 0; }
.ledger-section-title {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.ledger-section-title .ledger-update-btn {
  font-size: 11px; padding: 3px 10px; border: 1px solid var(--card-border);
  background: var(--card-bg-solid); border-radius: 6px; cursor: pointer;
  color: var(--accent); transition: var(--transition); font-family: inherit;
}
.ledger-section-title .ledger-update-btn:hover { background: var(--accent-solid); color: #fff; border-color: var(--accent); }
.ledger-history-btn {
  font-size: 11px; padding: 3px 10px; border: 1px solid var(--card-border);
  background: var(--card-bg-solid); border-radius: 6px; cursor: pointer;
  color: var(--text-secondary); transition: var(--transition); font-family: inherit;
}
.ledger-history-btn:hover { background: var(--card-bg); color: var(--text-primary); border-color: var(--accent); }
.ledger-edit-cat-btn {
  font-size: 11px; padding: 3px 8px; border: 1px solid var(--card-border);
  background: var(--card-bg-solid); border-radius: 6px; cursor: pointer;
  color: var(--text-muted); transition: var(--transition); font-family: inherit;
  margin-left: auto;
}
.ledger-edit-cat-btn:hover { color: var(--text-primary); border-color: var(--accent); }
.ledger-add-cat-btn {
  font-size: 12px; padding: 5px 12px; border: 1px dashed var(--accent);
  background: transparent; border-radius: 6px; cursor: pointer;
  color: var(--accent); transition: var(--transition); font-family: inherit;
}
.ledger-add-cat-btn:hover { background: var(--accent-solid); color: #fff; border-color: var(--accent); }
.ledger-empty-cats { text-align: center; padding: 28px 16px; color: var(--text-muted); font-size: 13px; }
.ledger-empty-cats button {
  margin-top: 10px; font-size: 13px; padding: 6px 16px; border: 1px dashed var(--accent);
  background: transparent; border-radius: 6px; cursor: pointer; color: var(--accent);
  transition: var(--transition); font-family: inherit;
}
.ledger-empty-cats button:hover { background: var(--accent-solid); color: #fff; }
.ledger-history-row {
  padding: 6px 10px; margin: 4px 0; border-radius: 6px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  font-size: 12px; color: var(--text-primary); cursor: pointer;
  transition: var(--transition);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 6px;
}
.ledger-history-row:hover { background: var(--accent-light); border-color: var(--accent); }
.ledger-history-row.highlight { border-color: var(--accent); background: rgba(108,92,231,0.08); }
.ledger-history-date { font-weight: 600; margin-bottom: 2px; }
.ledger-history-vals { font-size: 11px; color: var(--text-secondary); }
.ledger-history-row .ledger-row-info { flex: 1; min-width: 0; }
.ledger-history-del {
  flex-shrink: 0; width: 20px; height: 20px; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; font-size: 14px; border-radius: 4px;
  line-height: 20px; text-align: center; transition: var(--transition);
  margin-top: 1px;
}
.ledger-history-del:hover { background: rgba(231,76,60,0.15); color: var(--danger); }
.ledger-history-empty { text-align: center; padding: 16px; color: var(--text-muted); font-size: 13px; }
.ledger-metric {
  background: rgba(255,255,255,0.5); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 10px 12px; transition: var(--transition);
}
.ledger-metric:hover { border-color: var(--accent); background: rgba(255,255,255,0.75); }
.ledger-metric .lm-label { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.ledger-metric .lm-value { font-size: 20px; font-weight: 700; color: var(--text-primary); display: flex; align-items: baseline; gap: 6px; }
.ledger-metric .lm-arrow { font-size: 13px; font-weight: 600; }
.ledger-metric .lm-arrow.up { color: #e74c3c; }
.ledger-metric .lm-arrow.down { color: #00b894; }
.ledger-metric .lm-arrow.flat { color: var(--text-muted); }
.ledger-metric .lm-prev { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ledger-empty {
  text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px;
}
/* 台账数据网格 */
.ledger-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  flex: 1 1 58%;
  min-width: 340px;
  align-content: center;
}
/* 数据+图表并排，等高对齐 */
.ledger-content-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
}
/* 内联对比图表 */
.ledger-inline-chart {
  flex: 0 0 360px;
  min-width: 280px;
  height: auto;
  min-height: 240px;
  position: relative;
  background: rgba(255,255,255,0.45);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
}
.ledger-inline-chart .chart-title {
  font-size: 12px; color: var(--text-secondary); margin-bottom: 4px;
  text-align: center; font-weight: 500; flex-shrink: 0;
}
.ledger-inline-chart .chart-body {
  flex: 1; position: relative; min-height: 0;
}
/* 空数据时隐藏图表区 */
.ledger-inline-chart.empty { display: none; }

/* ========== 标题库可增删改 ========== */
.titlelib-tpl .tl-edit, .titlelib-tpl .tl-del {
  flex-shrink: 0; width: 22px; height: 22px; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; font-size: 13px; border-radius: 4px;
  display: none; transition: var(--transition); padding: 0; line-height: 1;
}
.titlelib-tpl:hover .tl-edit, .titlelib-tpl:hover .tl-del { display: flex; align-items: center; justify-content: center; }
.titlelib-tpl .tl-edit:hover { background: rgba(22,119,255,0.12); color: var(--accent); }
.titlelib-tpl .tl-del:hover { background: rgba(231,76,60,0.12); color: var(--danger); }
.titlelib-tpl .tl-edit-input {
  flex: 1; padding: 4px 8px; border: 1px solid var(--accent); border-radius: 6px;
  font-size: 13px; font-family: inherit; color: var(--text-primary);
  background: #fff; outline: none; min-width: 0;
}
.titlelib-words { position: relative; }
.titlelib-tag { position: relative; }
.titlelib-tag .tl-ops {
  display: none; position: absolute; top: -8px; right: -3px; z-index: 3; gap: 2px;
}
.titlelib-tag:hover .tl-ops { display: flex; }
.titlelib-tag .tl-ops button {
  width: 16px; height: 16px; border: none; border-radius: 50%; font-size: 9px;
  line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.titlelib-tag .tl-word-edit { background: rgba(22,119,255,0.9); }
.titlelib-tag .tl-word-del { background: rgba(231,76,60,0.9); }
.titlelib-add-row {
  display: flex; gap: 8px; margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--card-border);
}
.titlelib-add-row input {
  flex: 1; padding: 6px 10px; border: 1px solid var(--card-border);
  border-radius: 6px; font-size: 13px; font-family: inherit;
  background: rgba(255,255,255,0.7); color: var(--text-primary); outline: none;
}
.titlelib-add-row input:focus { border-color: var(--accent); }
.titlelib-add-row select {
  padding: 6px 10px; border: 1px solid var(--card-border);
  border-radius: 6px; font-size: 13px; font-family: inherit;
  background: rgba(255,255,255,0.7); color: var(--text-primary); outline: none;
}
.titlelib-add-row button {
  padding: 6px 14px; border: none; border-radius: 6px;
  background: var(--accent-solid); color: #fff; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit; white-space: nowrap;
}
.titlelib-add-row button:hover { opacity: 0.9; }
/* 词汇复制面板：点卡片右上角 🏷️ 才展开，顶部虚线跟「标题复制」分隔 */
.titlelib-words-panel {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--card-border);
}
/* 「添加模板」默认收起，点卡片右上角 ＋ 才出现（JS 给卡片切 .add-open） */
#section-titlelib .titlelib-templates .titlelib-add-row { display: none; }
#section-titlelib.add-open .titlelib-templates .titlelib-add-row { display: flex; }

.ledger-date-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; grid-column: 1/-1; }

/* Responsive for ledger */
@media (max-width: 900px) {
  .ledger-content-row { flex-direction: column; }
  .ledger-inline-chart { flex: 1 1 auto; width: 100%; min-width: 0; }
  .ledger-metrics { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 768px) {
  .ledger-metrics { grid-template-columns: repeat(2, 1fr); }
  .okr-board { flex-direction: column; gap: 8px; }
  .okr-row { min-width: auto; }
}
@media (max-width: 480px) {
  .ledger-metrics { grid-template-columns: 1fr 1fr; }
  .ledger-metric .lm-value { font-size: 17px; }
}

/* V3 设计系统注释保留，:root 已并入顶部令牌块（P0 2026-11-04） */
/* ================================================================
   V3 设计系统（2026-08-13）
   布局：左侧固定侧边栏 + 主内容 12 列网格
   原则：扁平化、去毛玻璃、统一 token、收敛色板
   ================================================================ */

/* ---------- 布局骨架 ---------- */
body {
  padding-left: 232px;
  background: #f0f2f5;
}
#bg-layer, #bg-overlay { display: none; }

/* ========== 手机版菜单首页（menu.html）========== */
/* #main 是 12 列网格，菜单容器跨满整行 */
.menu-wrap { grid-column: 1 / -1; }
.menu-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.menu-logo {
  width: 52px; height: 52px; flex: none; border-radius: 15px;
  background: var(--accent-solid); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; letter-spacing: .5px;
}
.menu-hi-text { font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.25; }
.menu-date { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }

.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.menu-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; padding: 18px 10px; border-radius: 16px; text-align: center;
  text-decoration: none; color: var(--text-primary);
  background: var(--card-bg); border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.menu-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(15, 23, 42, .12); }
.menu-card:active { transform: scale(.97); }
.menu-icon {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-light); color: var(--accent);
}
.menu-icon svg { width: 23px; height: 23px; }
.menu-name { font-size: 15px; font-weight: 600; }
.menu-desc { font-size: 11.5px; color: var(--text-secondary); line-height: 1.45; }

.menu-extra {
  display: block; margin-top: 16px; padding: 14px; border-radius: 14px;
  text-align: center; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--accent);
  background: var(--card-bg); border: 1px dashed var(--card-border);
}
.menu-extra:hover { border-style: solid; border-color: var(--accent); }

@media (max-width: 980px) {
  .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .menu-card { padding: 15px 8px; gap: 7px; }
  .menu-icon { width: 42px; height: 42px; border-radius: 12px; }
  .menu-icon svg { width: 21px; height: 21px; }
}
@media (max-width: 640px) {
  .menu-head { margin-bottom: 14px; }
  .menu-logo { width: 46px; height: 46px; border-radius: 13px; font-size: 16px; }
  .menu-hi-text { font-size: 17px; }
  /* 两列 + 大按钮：手机上拇指点按区域足够大 */
  .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .menu-card { padding: 16px 8px; gap: 6px; border-radius: 14px; min-height: 92px; }
  .menu-name { font-size: 14.5px; }
  .menu-desc { display: none; }
  /* 第 7 个按钮落单，跨满整行显示 */
  .menu-card:last-child { grid-column: 1 / -1; }
}

/* ---------- 左侧固定侧边栏（深色） ---------- */
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; width: 232px; z-index: 60;
  background: #0d1117;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-right: 1px solid #1f2937;
  display: flex;
}
.sidebar-inner { width: 100%; display: flex; flex-direction: column; padding: 22px 14px 16px; }
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 18px; border-bottom: 1px solid #1f2937; margin-bottom: 14px;
}
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent-solid); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
}
.brand-name { font-size: 14px; font-weight: 700; color: #e5e7eb; line-height: 1.2; }
.brand-ver { font-size: 11px; color: #6b7280; margin-top: 2px; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.sidebar-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: 9px; cursor: pointer;
  font-size: 15px; color: #9ca3af; text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
  user-select: none;
}
.sidebar-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-item:hover { background: #1f2937; color: #e5e7eb; }
.sidebar-item.active { background: var(--accent-solid); color: #fff; font-weight: 600; }
.sidebar-item.active::before {
  content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 2px; background: var(--accent);
}
.sidebar-foot {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid #1f2937;
  display: flex; flex-direction: column; gap: 2px;
}

/* ---------- 侧边栏工具区（编辑模式 + 同步状态） ---------- */
.sidebar-tools {
  padding: 0 0 12px;
  border-bottom: 1px solid #1f2937;
  margin-bottom: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.sidebar-tools .sidebar-item {
  font-size: 13px; padding: 8px 10px;
  flex: 1 1 auto; min-width: 0;
}
.sidebar-tools .sidebar-item.icon-only {
  flex: 0 0 auto; width: 34px;
  justify-content: center; padding: 8px 0; gap: 0;
}
.sidebar-tools .sidebar-item span { white-space: nowrap; }
#editModeBtn.editing { background: var(--accent-solid); color: #fff; }
#syncIndicator {
  background: #1f2937;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
  white-space: nowrap;
  flex: 1 1 auto; min-width: 0;
  text-align: center;
}
#syncIndicator:hover { background: #283244; }

/* ---------- 顶栏轻量化 ---------- */
#topbar {
  background: #ffffff;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid var(--line-soft); border-radius: 14px;
  box-shadow: var(--shadow-sm);
  margin-top: 18px; padding: 12px 20px; gap: 14px;
}
#topbar .topbar-title { font-size: 20px; font-weight: 700; color: #111827; }
.topbar-search {
  flex: 1; max-width: 320px; margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  background: #f3f4f6; border: 1px solid transparent; border-radius: 10px;
  padding: 7px 12px; color: var(--text-muted); transition: border-color 0.2s, box-shadow 0.2s;
}
.topbar-search svg { width: 14px; height: 14px; flex-shrink: 0; }
.topbar-search input { border: none; outline: none; background: transparent; font-size: 13px; color: #111827; font-family: inherit; width: 100%; }
.topbar-search:focus-within { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12); }

/* ---------- 主内容 12 列网格 ---------- */
#main {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 12px 140px;
}
#main > .card, #main > .dual-panel, #main > .titlelib-wrapper { margin-bottom: 0; }

/* ---------- 网格跨度类（P3 · 2026-11-04） ----------
   取代逐模块 #section-xxx 的 grid-column 特例。
   基础档 12 列：span-4 = 1/3、span-6 = 1/2、span-12 = 整行
   ≤1100：span-4 升 6 列；.span-full-md 提前占满整行
   ≤980 ：.span-full-sm 占满整行
   ≤768 ：全部整行（由 #main > .card 兜底）
   align-self 仍由各模块自己的规则决定，与跨度解耦。 */
.span-4  { grid-column: span 4; }
.span-6  { grid-column: span 6; }
.span-12 { grid-column: 1 / -1; }

@media (max-width: 1100px) {
  .span-4 { grid-column: span 6; }
  .span-full-md { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .span-full-sm { grid-column: 1 / -1; }
}
.okr-card { /* 跨度改由 .span-12 承担（P3） */ }
/* 这一排三个模块各占 1/3 且等高，高度以「日历排班」为准：
   日历用自然高度当基准（换月份行数变了，整排跟着变），
   任务清单和动态组 stretch 到同一行高，各自内部消化多出来的空间
   ——任务清单内容区滚动，动态组两张卡平分。 */
#section-dailytask { align-self: stretch; }
.schedule-card { align-self: start; }
.dash-fin-col {
  align-self: stretch;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
}
/* 任务清单：卡片外面跟着日历等高，内容区自己滚。
   flex:1 1 0 + min-height:0 是关键——让内容不会反过来把整行撑高，
   否则「以日历为准」就失效了，会变成以任务清单为准。 */
#section-dailytask { display: flex; flex-direction: column; min-height: 0; }
#dailyTasks {
  flex: 1 1 0; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(31,35,48,0.20) transparent;
}
#dailyTasks::-webkit-scrollbar { width: 4px; }
#dailyTasks::-webkit-scrollbar-track { background: transparent; }
#dailyTasks::-webkit-scrollbar-thumb { background: rgba(31,35,48,0.20); border-radius: 2px; }
#dailyTasks::-webkit-scrollbar-thumb:hover { background: rgba(31,35,48,0.38); }
/* 卡片只剩 1/3 页宽（这几项原来是按 2/3 排的），一起收紧。
   不收紧的话「平台 + 账号 + 类型 + 周期 + 状态」挤不下，
   账号列只剩五十来像素，中文会被拆成"竖排单字"。
   账号宁可省略号截断，也不竖排。 */
#section-dailytask .daily-task { gap: 8px; padding: 10px 12px; }
#section-dailytask .daily-task .dt-platform { min-width: 0; font-size: 12px; white-space: nowrap; }
#section-dailytask .daily-task .dt-account {
  min-width: 0; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#section-dailytask .daily-task .dt-type { font-size: 11px; padding: 2px 6px; margin-right: 0; }
#section-dailytask .daily-task .dt-count { font-size: 11px; padding: 3px 6px; margin-left: 0; }
#section-dailytask .daily-task .dt-status { min-width: 0; padding: 5px 10px; font-size: 12px; }
/* 日历卡贴合内容高度，不被固定任务卡拉伸（避免整卡虚高） */
.schedule-card { align-self: start; }
/* 常用链接：跨度由 .span-12 承担（P3） */

/* ========== 看板卡片：待办 & 灵感 ==========
   占整行，内部左右两栏（左待办、右灵感）。只做概览，点条目进 todo.html 处理。
   配色沿用待办/灵感页的浅底 + hover 提亮，保持同一套观感。 */
#section-dashtodoidea { /* 跨度改由 .span-12 承担（P3） */ }
.dash-ti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.dash-ti-col { min-width: 0; }
.dash-ti-head {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-primary);
}
.dash-ti-tip { font-size: 11px; font-weight: 400; color: var(--text-muted); }
/* 计数徽章：原来挂在外层大标题上，大标题去掉后挪进小标题 */
.dash-ti-count {
  flex: none; min-width: 18px; padding: 0 5px;
  border-radius: 9px;
  background: rgba(31, 38, 135, 0.08);
  color: var(--text-secondary);
  font-size: 11px; font-weight: 600; text-align: center;
}
/* 纸牌层叠 + 自动轮播：每条卡片带一个编号 --i（0 = 最上面那条，完整可见），
   位置、缩放、层级全由 --i 算出来。wb.js 每隔几秒把编号整体减 1，
   最上面那条就绕到最下面去，一叠卡片自己轮着翻。
   位置必须用 transform（绝对定位）而不是 margin：靠 margin 叠的话，
   改 DOM 顺序会让位置瞬间跳变，做不到平滑过渡。
   容器高度由 JS 按条数设置——卡片是绝对定位的，撑不开父容器。 */
.dash-ti-list { position: relative; }
.dash-ti-row {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;                /* 必须不透明：半透明会透出下面那条的标题 */
  border: 1px solid rgba(31, 38, 135, 0.08);
  box-shadow: 0 2px 8px rgba(31, 38, 135, 0.10);
  cursor: pointer;                 /* 看板里不做拖拽排序，点了直接去待办灵感页 */
  transform: translateY(calc(var(--i, 0) * 19px)) scale(calc(1 - var(--i, 0) * 0.018));
  transform-origin: top center;
  z-index: calc(10 - var(--i, 0));
  transition: transform .5s ease, box-shadow .2s ease;
  min-width: 0;
}
/* 鼠标移进这一栏：wb.js 暂停轮播，这里同时摊平成完整列表，好看清、好点中 */
.dash-ti-col:hover .dash-ti-list { height: auto !important; }
.dash-ti-col:hover .dash-ti-row {
  position: static;
  transform: none;
  margin-top: 6px;
}
.dash-ti-row:hover {
  border-color: rgba(31, 38, 135, 0.18);
  box-shadow: 0 3px 12px rgba(31, 38, 135, 0.16);
}
.dash-ti-title {
  flex: 1 1 auto; min-width: 0;
  font-size: 13.5px; font-weight: 500; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-ti-sub {
  flex: none; max-width: 42%;
  font-size: 11px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 优先级色点：跟待办页的高/中/低一致 */
.dash-ti-pri {
  flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: #b6bcc5;
}
.dash-ti-pri.high { background: #e74c3c; }
.dash-ti-pri.medium { background: #f39c12; }
.dash-ti-pri.low { background: #b6bcc5; }
.dash-ti-empty {
  padding: 16px 0; text-align: center;
  font-size: 12px; color: var(--text-muted);
}
.dash-ti-more {
  margin-top: 2px; text-align: right;
  font-size: 11px; color: var(--text-secondary);
}
@media (max-width: 768px) {
  .dash-ti-grid { grid-template-columns: 1fr; gap: 10px; }
}

.dual-panel { grid-column: 1 / -1; }
#section-publish { grid-column: 1 / -1; }
#section-wxpublish { grid-column: 1 / -1; }
#section-manualpub { grid-column: 1 / -1; }
.ledger-card { grid-column: 1 / -1; }
/* 三个小窗并排：最新招聘公告 / 公众号发布队列 / 标题模板 各占 4 列（12 列网格）
   align-self 覆盖 #main 的 align-items:start，让三个窗等高对齐（内容矮的底部留白）。
   但发布队列要单独拿出来设 start —— 它内部是限高滚动区，被拉高只会多出一截空白。
   注意：这里必须用单条规则，写成上面那种三 ID 组合选择器会因特异性更高而压不掉。 */
#section-jobs, #section-titlelib { align-self: stretch; }
#section-pubqueue {
  align-self: stretch;
  display: flex; flex-direction: column; min-height: 0;
}
#section-attendance { grid-column: 1 / -1; }
#section-reimburse { grid-column: 1 / -1; }

/* ---------- 假勤 / 报销：单页仅一块内容，卡片撑满整页高度 ---------- */
#section-attendance, #section-reimburse {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 156px);
  min-height: calc(100dvh - 156px);
}
#section-attendance > *:not(.att-list),
#section-reimburse > *:not(.reimb-list) { flex-shrink: 0; }
#section-attendance .att-list,
#section-reimburse .reimb-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}
@media (max-width: 980px) {
  #section-attendance, #section-reimburse {
    min-height: calc(100vh - 100px);
    min-height: calc(100dvh - 100px);
  }
}

/* ---------- 假勤 / 报销：添加按钮用高级灰实心 ---------- */
#section-attendance .add-btn,
#section-reimburse .add-btn {
  background: #6f7783;
  border: 1px solid #6f7783;
  color: #fff;
  font-weight: 600;
}
#section-attendance .add-btn:hover,
#section-reimburse .add-btn:hover {
  background: #5b636e;
  border-color: #5b636e;
  color: #fff;
}
#section-activity { grid-column: 1 / -1; }
/* 深色主题：高级灰实心在暗底上既闷又抢眼，改为青色淡底 + 描边的次级按钮 */
.theme-tech #section-attendance .add-btn,
.theme-tech #section-reimburse .add-btn {
  background: var(--d-accent-soft);
  border-color: rgba(0, 229, 255, 0.48);
  color: var(--d-accent-text);
}
.theme-tech #section-attendance .add-btn:hover,
.theme-tech #section-reimburse .add-btn:hover {
  background: rgba(0, 229, 255, 0.24);
  border-color: var(--d-accent);
  color: #eafcff;
}
#section-plan { grid-column: 1 / -1; }

/* ---------- 卡片统一（去毛玻璃） ---------- */
.card, .panel-card, .titlelib-card {
  background: var(--card-bg-solid);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover, .panel-card:hover, .titlelib-card:hover { box-shadow: 0 6px 24px rgba(31, 35, 48, 0.09); }
.card { padding: 18px 22px; }
.card-header { margin-bottom: 14px; }
.card-title, .panel-card .card-title { font-size: 15px; font-weight: 700; }

/* ---------- 按钮统一（三态） ---------- */
.card-action, .topbar-btn, .btn, .upload-btn, .quick-input button {
  border-radius: 9px;
  font-size: 12.5px;
  font-family: inherit;
}
.card-action { border-color: var(--line-soft); color: var(--text-secondary); background: transparent; }
.card-action:hover { background: var(--accent-light); color: var(--accent); border-color: rgba(22, 119, 255, 0.3); }
.topbar-icon-btn { width: 32px; height: 32px; border-radius: 9px; background: #fff; border-color: var(--line-soft); }
.topbar-icon-btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-primary, .btn-primary:hover { background: var(--accent-solid); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-cancel { background: #fff; border-color: var(--line-soft); }

/* ---------- 输入框统一 ---------- */
input[type="text"], input[type="number"], input[type="date"], input[type="url"], input[type="search"], textarea, select {
  border-radius: 9px;
  border-color: var(--line-soft);
}

/* ---------- 弹窗统一 ---------- */
.modal-box { border-radius: 16px; }

/* ---------- OKR 看板卡片 ---------- */
.okr-board { flex-wrap: wrap; flex: 1; }
.okr-card .card-header { margin-bottom: 12px; }

/* ================================================================
   卡片规格（P2 · 2026-11-04）
   1. 头部固定 44px：标题 14/600、操作区右对齐，全站基线统一
   2. 三档高度契约 data-h="compact|standard|tall" = 240 / 288 / 360
      同一行必须同档；档外不新增数值
   3. 内容超长时卡内滚动，不撑高同行其他卡
   用 #main 前缀提高特异性，压过各模块的 .xxx-card .card-header 特例
   ================================================================ */
#main .card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  height: 44px; min-height: 44px;
  margin-bottom: 8px;
  padding: 0;
}
#main .card-title {
  font-size: 14px; font-weight: 600; line-height: 1.4;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
#main .card-action {
  flex: none; height: 26px; padding: 0 10px;
  font-size: 12px; line-height: 24px;
  border-radius: 6px;
}

/* 三档高度 */
#main .card[data-h] { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#main .card[data-h="compact"]  { height: 240px; }
#main .card[data-h="standard"] { height: 288px; }
#main .card[data-h="tall"]     { height: 360px; }
#main .card[data-h] > .card-header { flex: 0 0 44px; }
#main .card[data-h] > :not(.card-header) { min-height: 0; }

/* 已知列表容器：吃掉剩余高度并内滚（内容多也不撑行） */
#main .card[data-h] > #dashJobsList,
#main .card[data-h] > #dashPubQueue,
#main .card[data-h] > #okrBoard,
#main .card[data-h] > #dailyTasks,
#main .card[data-h] > .dash-ti-grid {
  flex: 1 1 0; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 35, 48, 0.20) transparent;
}
/* 底部 14px 渐隐：内容被滚出时裁切边缘柔和，不会出现「半行硬切」 */
#main .card[data-h] > #dashJobsList,
#main .card[data-h] > #dashPubQueue {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 14px), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 14px), transparent 100%);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  body { padding-left: 200px; }
  .app-sidebar { width: 200px; }
  /* ≤1100 的跨度由 .span-full-md / .span-4 承担（P3） */
  /* 独占整行时不能再靠 flex 填充高度——那行只有它自己，
     行高就等于它的最小高度，内容区会被压成 0 高看不见任务。
     改回常规流式，用 max-height 限高滚动。 */
  #section-dailytask { display: block; }
  #dailyTasks { flex: none; max-height: 320px; }
  /* 固定任务独占了整行，剩下日历和动态卡组各占半行（.span-4 在 ≤1100 自动升 6 列） */
  /* 中等屏三个小窗改两两一行（同上，.span-4 在 ≤1100 自动升 6 列） */
}
@media (max-width: 980px) {
  body { padding-left: 0; padding-bottom: 66px; }
  .app-sidebar {
    top: auto; right: 0; width: 100%; height: 58px;
    border-right: none; border-top: 1px solid var(--line-soft);
    background: #ffffff;
  }
  .sidebar-inner { flex-direction: row; align-items: center; padding: 8px 10px; }
  .sidebar-brand, .sidebar-foot, .sidebar-tools { display: none; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-item { flex-shrink: 0; padding: 6px 10px; font-size: 12.5px; color: #6b7280; justify-content: center; }
  .sidebar-item:hover { background: #f3f4f6; color: #374151; }
  .sidebar-item.active::before { display: none; }
  .sidebar-item.active { background: var(--accent-solid); color: #fff; }
  #main { padding: 14px 12px 84px; gap: 12px; }
  .topbar-wrapper { padding: 0 12px; }
}
@media (max-width: 768px) {
  .dual-panel { grid-template-columns: 1fr; }
  #topbar { flex-wrap: wrap; }
  #topbar .topbar-left { min-width: 0; }
  .topbar-search { order: 3; max-width: 100%; width: 100%; margin-left: 0; }
  #main > .card, #main > .dual-panel { grid-column: 1 / -1; }
  /* 手机版底部导航：精简为「图标 + 短名」，保留横向滚动，不再挤成一团 */
  .sidebar-nav { gap: 2px; }
  .sidebar-item {
    flex-direction: column; gap: 2px; padding: 4px 6px;
    min-width: 56px; font-size: 10.5px; line-height: 1.1;
  }
  .sidebar-item svg { width: 19px; height: 19px; }
  .sidebar-item span { white-space: nowrap; }
}


  /* ===== 工作台导航分组 + 手动发布表单（2026-09-15 改） ===== */
  .sidebar-group{margin-top:4px;}
  .sidebar-group-title{font-size:11px;color:rgba(178,203,235,.42);letter-spacing:1px;padding:11px 16px 3px;font-weight:600;}
  .manual-pub-panel{margin:0;}
  .manual-pub-title{font-weight:600;color:var(--text-primary);margin-bottom:10px;font-size:14px;}
  .manual-pub-sub{font-size:12px;color:var(--text-secondary);font-weight:400;}
  .manual-pub-row{display:flex;align-items:center;gap:10px;margin-bottom:10px;flex-wrap:wrap;}
  .manual-pub-row>label{min-width:54px;color:var(--text-secondary);font-size:13px;}
  .manual-pub-input{flex:1;min-width:160px;background:var(--card-bg-solid);border:1px solid var(--card-border);border-radius:8px;color:var(--text-primary);padding:8px 10px;font-size:13px;font-family:inherit;}
  .manual-pub-area{flex:1;min-width:220px;min-height:120px;background:var(--card-bg-solid);border:1px solid var(--card-border);border-radius:8px;color:var(--text-primary);padding:8px 10px;font-size:13px;font-family:monospace;line-height:1.5;}
  .manual-pub-input:focus,.manual-pub-area:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light);}
  .manual-pub-hint{color:var(--text-muted);font-size:12px;}
  .manual-pub-count{flex:0 0 auto;min-width:44px;text-align:right;font-variant-numeric:tabular-nums;}
  .manual-pub-count.over{color:#ff8585;font-weight:600;}
  .manual-pub-btn{flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;background:var(--accent-light);border:1px solid var(--accent);border-radius:8px;color:var(--accent);padding:6px 12px;font-size:13px;cursor:pointer;user-select:none;}
  .manual-pub-btn:hover{background: var(--accent-solid);color:#fff;}
  .manual-pub-actions{align-items:center;}
  .manual-pub-check{font-size:13px;color:var(--text-secondary);display:flex;align-items:center;gap:5px;}
  .manual-pub-result{font-size:13px;color:var(--text-secondary);}
  .manual-pub-tip{font-size:12px;color:var(--text-secondary);line-height:1.6;}

  
/* ========== V3.1 大类分页 ========== */
/* 非当前大类所属区块：整块隐藏（DOM 保留，避免 App.init() 渲染时缺元素） */
[data-group].wb-group-hidden { display: none !important; }
/* 页头：只标注当前大类，不做二级导航 */
.wb-page-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.wb-page-title { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.wb-page-sub { font-size: 12.5px; color: var(--text-secondary, #8b94a3); }
@media(max-width:640px){ .wb-page-head { flex-direction: column; gap: 2px; } }

/* ========== 工作日志：月历式记录 ========== */
/* #main 是 12 列网格，卡片默认只占 1 列，工作日志需跨满整行 */
#section-worklog { grid-column: 1 / -1; }
.wl-topbar { display:flex; justify-content:center; margin-bottom:12px; }
.wl-month-nav { display:flex; align-items:center; gap:14px; }
.wl-nav-btn { width:34px; height:34px; flex:none; padding:0; display:flex; align-items:center; justify-content:center; font-size:20px; line-height:1; border:1px solid var(--card-border); border-radius:var(--radius-sm); background:var(--card-bg); color:var(--text-primary); cursor:pointer; transition:border-color .15s, color .15s, background .15s; }
.wl-nav-btn:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-light); }
.wl-month { font-size:16px; font-weight:700; min-width:108px; text-align:center; letter-spacing:.5px; color:var(--text-primary); }
.wl-summary { font-size:12.5px; color:var(--text-secondary); }
.wl-weekdays { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-bottom:6px; }
.wl-weekdays span { text-align:center; font-size:12px; color:var(--text-muted); padding:2px 0; }
.wl-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.wl-cell { position:relative; min-height:98px; border:1px solid var(--card-border); border-radius:var(--radius-sm); background:var(--card-bg); padding:4px 5px 5px; display:flex; flex-direction:column; overflow:hidden; transition:border-color .15s, box-shadow .15s; }
.wl-cell:hover { border-color:var(--accent); }
.wl-cell.is-today { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-light); }
.wl-cell.is-rest { opacity:.72; }
.wl-cell-head { display:flex; align-items:center; justify-content:space-between; cursor:pointer; user-select:none; }
.wl-day { font-size:12.5px; font-weight:700; color:var(--text-primary); }
.wl-cell.is-rest .wl-day { color:var(--text-muted); font-weight:600; }
.wl-dot { width:6px; height:6px; border-radius:50%; background:var(--accent); display:none; flex:none; }
.wl-cell.has-log .wl-dot { display:block; }
.wl-rest { position:absolute; left:0; right:0; top:20px; bottom:0; display:flex; align-items:center; justify-content:center; font-size:34px; font-weight:800; color:var(--text-muted); opacity:.35; letter-spacing:4px; pointer-events:none; }
.wl-input { flex:1; width:100%; min-height:0; border:none; outline:none; background:transparent; resize:none; font-size:12.5px; line-height:1.55; color:var(--text-primary); font-family:inherit; margin-top:2px; padding:0; }
.wl-input::placeholder { color:var(--text-muted); }
.wl-cell.is-rest .wl-input { opacity:.6; }
.wl-modal-text { width:100%; min-height:230px; font-size:17px; line-height:1.85; padding:12px; border:1px solid var(--card-border); border-radius:var(--radius-sm); resize:vertical; font-family:inherit; color:var(--text-primary); background:var(--card-bg-solid); box-sizing:border-box; }
.wl-modal-text:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-light); }
.wl-modal-todos { margin-top:10px; font-size:12.5px; color:var(--text-secondary); line-height:1.7; }
.wl-rest-badge { display:inline-block; margin-left:8px; padding:1px 9px; border-radius:20px; background:var(--accent-light); color:var(--text-secondary); font-size:12px; font-weight:600; }
.wl-tip { margin-top:10px; font-size:12px; color:var(--text-secondary); }
@media(max-width:760px){
  .wl-grid, .wl-weekdays { gap:4px; }
  .wl-cell { min-height:76px; }
  .wl-rest { font-size:24px; }
}

/* ================= 手机版统一排版适配（P0 溢出 / P1 触控与字号） ================= */
@media (max-width: 768px) {

  /* --- P0-1 dashboard：固定性任务清单不再把页面撑宽 --- */
  .daily-task { flex-wrap: wrap; row-gap: 8px; }
  .daily-task .dt-platform { min-width: 0; }
  .daily-task .dt-account { min-width: 0; word-break: break-word; }
  .daily-task .dt-status { min-width: 0; }
  .daily-task .dt-count { margin-left: 0; }

  /* --- P0-2 假勤 / 报销条目：允许换行，操作按钮不再被挤出屏幕 --- */
  .att-item, .reimb-item { flex-wrap: wrap; row-gap: 6px; }
  .att-item-date, .reimb-item-date { min-width: 0; }
  .att-item-hours { min-width: 0; }
  .att-item-note, .reimb-item-name { min-width: 0; word-break: break-word; }
  .att-item > :last-child, .reimb-item > :last-child { margin-left: auto; }
  .reimb-item-actions { margin-left: auto; }

  /* --- P0-3 长命令行 / 代码块：可横向滑动查看 --- */
  pre, code { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #wxPubCmd { display: block; }

  /* --- P1-1 图标类小按钮统一放大到 34×34 --- */
  .att-item-del,
  .reimb-item-actions button,
  .plan-item-actions button,
  .plan-del,
  .link-del,
  .dt-del,
  .marquee-edit-btn {
    width: 34px; height: 34px; min-width: 34px; min-height: 34px; font-size: 15px;
  }

  /* --- P1-2 文字类按钮统一最小高度，方便拇指点击 --- */
  .card-action, .topbar-btn, .btn, .upload-btn,
  .quick-input button, .ledger-add-cat-btn, .ledger-edit-cat-btn {
    min-height: 34px; padding-top: 6px; padding-bottom: 6px;
  }

  /* --- P1-3 表单控件加大 --- */
  select, input[type="date"] { min-height: 34px; }
  .reimb-status-dropdown { min-height: 32px; font-size: 12px; padding: 4px 8px; }
  input[type="checkbox"], input[type="radio"] {
    width: 20px; height: 20px; min-width: 20px; min-height: 20px;
  }

  /* --- P1-4 过小字号提升到 ≥11px --- */
  .tl-word-edit, .tl-word-del { font-size: 11px; padding: 2px 6px; min-height: 22px; }
  .sched-lg, .spark-cat, .edit-icon, .okr-source { font-size: 11px; }

  /* --- 收口：状态胶囊、色块、活动按钮、复选框再放大一档 --- */
  .act-item-actions button { width: 34px; height: 34px; }
  .spark-actions button { width: 34px; height: 34px; }
  .swatch { width: 32px; height: 32px; }
  input.reimb-pick { width: 22px; height: 22px; }
  .daily-task .dt-status { min-height: 32px; padding: 6px 10px; }
  .stat-repeat-btn, .stat-cycle-btn { width: 34px; height: 34px; }
}

@media (max-width: 480px) {
  .daily-task { column-gap: 6px; }
  .daily-task .dt-platform { font-size: 12.5px; }
  .att-item, .reimb-item { padding: 10px; column-gap: 8px; }
}

/* ==========================================================================
   报销统计：液态玻璃（Liquid Glass）+ 三段审批进度条
   作用域严格锁在 #section-reimburse 与报销弹窗内，不影响其他页面。

   性能取舍：列表项刻意不用 backdrop-filter。报销记录可能有几十条，
   每条一个 GPU 模糊层在滚动时会掉帧；改用「半透明 + 双层内高光」模拟
   玻璃厚度，观感接近但滚动始终流畅。真模糊只给卡片、统计块、弹窗这些
   数量固定的大容器。
   ========================================================================== */

/* ---------- 1. 卡片本体：做出玻璃的厚度 ---------- */
#section-reimburse.card {
  background: linear-gradient(155deg,
    rgba(255,255,255,0.80) 0%,
    rgba(255,255,255,0.58) 46%,
    rgba(255,255,255,0.68) 100%);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  border: 1px solid rgba(255,255,255,0.66);
  border-radius: 26px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.90),
    inset 0 -1px 0 rgba(255,255,255,0.30),
    inset 0 0 0 1px rgba(255,255,255,0.14),
    0 1px 2px rgba(15,23,42,0.05),
    0 10px 30px rgba(15,23,42,0.09),
    0 32px 64px -24px rgba(15,23,42,0.18);
}

/* ---------- 2. 三块统计数字 ---------- */
#section-reimburse .reimb-stat-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.76), rgba(255,255,255,0.42));
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 2px 6px rgba(15,23,42,0.05),
    0 8px 20px -8px rgba(15,23,42,0.10);
  transition: transform .28s cubic-bezier(.4,0,.2,1), box-shadow .28s;
}
#section-reimburse .reimb-stat-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 4px 10px rgba(15,23,42,0.07),
    0 14px 28px -10px rgba(15,23,42,0.16);
}

/* ---------- 3. 列表容器与列表项 ---------- */
#section-reimburse .reimb-list {
  gap: 7px;
  padding: 7px;
  border-radius: 20px;
  background: rgba(255,255,255,0.20);
  box-shadow:
    inset 0 1px 3px rgba(15,23,42,0.06),
    inset 0 0 0 1px rgba(255,255,255,0.30);
}
#section-reimburse .reimb-item {
  background: linear-gradient(160deg, rgba(255,255,255,0.66), rgba(255,255,255,0.34));
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.85),
    0 1px 3px rgba(15,23,42,0.04);
  transition: transform .22s cubic-bezier(.4,0,.2,1),
              box-shadow .22s, background .22s, opacity .2s;
}
#section-reimburse .reimb-item:hover {
  background: linear-gradient(160deg, rgba(255,255,255,0.82), rgba(255,255,255,0.52));
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 6px 16px -4px rgba(15,23,42,0.12);
}
/* 已报销：背景压暗 + 名称加删除线来表达「归档」，但不要用整体 opacity ——
   那会把进度条的颜色一起冲淡，而恰恰是已完成这条，进度条最该完整显示渐变的深度。
   这里必须显式写 opacity:1 覆盖基础样式里的 .reimb-item.done { opacity:.55 }。 */
#section-reimburse .reimb-item.done {
  background: linear-gradient(160deg, rgba(255,255,255,0.34), rgba(255,255,255,0.18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  opacity: 1;
}

/* ---------- 4. 按钮：沿用原来的「高级灰」调性，做成有厚度的玻璃胶囊 ----------
   注意它是 flex 列里的子元素，会被 stretch 成通栏，这是既有布局，不改。 */
#section-reimburse .add-btn {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: linear-gradient(160deg, rgba(94,102,118,0.94), rgba(66,74,90,0.90));
  color: #fff;
  max-height: 42px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.12),
    0 4px 14px rgba(48,56,72,0.20);
  transition: transform .2s cubic-bezier(.4,0,.2,1), box-shadow .2s, background .2s;
}
#section-reimburse .add-btn:hover {
  background: linear-gradient(160deg, rgba(108,116,132,0.96), rgba(76,84,102,0.92));
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.36),
    0 8px 20px rgba(48,56,72,0.28);
}

/* ---------- 5. 报销弹窗（编辑 / 合并） ---------- */
#reimbModal .modal-box, #reimbMergeModal .modal-box {
  background: linear-gradient(155deg, rgba(255,255,255,0.86), rgba(255,255,255,0.72));
  backdrop-filter: blur(40px) saturate(190%);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  border: 1px solid rgba(255,255,255,0.70);
  border-radius: 26px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 20px 60px -12px rgba(15,23,42,0.25);
}

/* ==========================================================================
   三段审批进度条（可点击）：待提交 → 已提交 → 已报销
   整条轨道是一条「同色系」的横向渐变，左浅右深。
   走过的格子把遮光盖撤掉透出渐变，没走的格子盖着层浅色保持未点亮状态。
   每格是 <button>，点哪一格直接把状态设成哪一档；误触由 setStatus() 的
   5 秒撤销提示兜底。✏️ 弹窗保留用于改其它字段。
   ========================================================================== */
.reimb-progress {
  display: flex;
  flex: 0 0 auto;
  width: 216px;
  height: 26px;
  border-radius: 999px;
  overflow: hidden;
  /* 整条轨道的渐变：同一色系（琥珀橙），从头到尾逐渐加深，整体保持明亮。
     四个色阶的明度约 217 → 196 → 175 → 152，和之前天蓝版同一节奏。 */
  background: linear-gradient(90deg,
    #ffdcb0 0%,
    #ffc48a 34%,
    #ffa964 68%,
    #f58f45 100%);
  box-shadow:
    inset 0 1px 2px rgba(15,23,42,0.10),
    inset 0 0 0 1px rgba(255,255,255,0.55);
  user-select: none;
  cursor: default;
}
.rp-seg {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1;
  letter-spacing: .3px;
  white-space: nowrap;
  border: 0;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  /* 未推进：盖一层浅色，把底下的渐变遮住 */
  background: rgba(255,255,255,0.93);
  color: #9aa1ab;
  transition: background .35s cubic-bezier(.4,0,.2,1),
              color .35s, text-shadow .35s, box-shadow .18s;
}
/* 可点击的悬停反馈：未推进格透出一点底色，已推进格加一圈高光描边 */
.reimb-progress.is-editable .rp-seg:hover {
  background: rgba(255,255,255,0.58);
  color: #5c6470;
  box-shadow: inset 0 0 0 1.5px rgba(133,79,11,0.38);
}
.reimb-progress.is-editable .rp-seg.done:hover {
  background: rgba(255,255,255,0.22);
  color: #3f2000;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.9);
}
.rp-seg:focus-visible {
  outline: 2px solid var(--accent, #534AB7);
  outline-offset: -2px;
}
/* 格子之间的分隔：一道细高光（只在已填充区看得见） */
.rp-seg + .rp-seg::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 1px;
  background: rgba(255,255,255,0.5);
}
/* 已推进：撤掉盖子，透出底下的渐变。
   渐变整体偏亮，所以这里用深棕字而不是白字 ——
   前几段是最浅的橙，配白字对比度不到 2，基本看不见。 */
.rp-seg.done {
  background: transparent;
  color: #7a3d06;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255,255,255,0.45);
}
/* 当前所在段：顶部高光 + 底部小圆点，一眼看出「现在停在哪一档」 */
.rp-seg.cur {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.rp-seg.cur::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}

/* ==========================================================================
   科技·深空霓虹主题适配：玻璃改成冷色，高光走青蓝
   ========================================================================== */
.theme-tech #section-reimburse.card {
  background: linear-gradient(155deg,
    rgba(14,32,60,0.74) 0%,
    rgba(6,16,34,0.56) 46%,
    rgba(8,20,42,0.66) 100%);
  border-color: rgba(0,229,255,0.26);
  box-shadow:
    inset 0 1px 0 rgba(0,229,255,0.20),
    inset 0 -1px 0 rgba(0,229,255,0.05),
    0 10px 30px rgba(0,0,0,0.45),
    0 32px 64px -24px rgba(0,0,0,0.60);
}
.theme-tech #section-reimburse .reimb-stat-card {
  background: linear-gradient(160deg, rgba(12,28,54,0.72), rgba(6,16,34,0.50));
  border-color: var(--d-line);
  box-shadow:
    inset 0 1px 0 rgba(0,229,255,0.16),
    0 8px 20px -8px rgba(0,0,0,0.50);
}
.theme-tech #section-reimburse .reimb-list {
  background: rgba(0,229,255,0.04);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.30),
    inset 0 0 0 1px rgba(0,229,255,0.10);
}
.theme-tech #section-reimburse .reimb-item {
  background: linear-gradient(160deg, rgba(12,30,56,0.60), rgba(6,16,34,0.38));
  border-color: var(--d-line-soft);
  box-shadow: inset 0 1px 0 rgba(0,229,255,0.14);
}
.theme-tech #section-reimburse .reimb-item:hover {
  background: linear-gradient(160deg, rgba(16,38,70,0.72), rgba(8,20,42,0.50));
  box-shadow:
    inset 0 1px 0 rgba(0,229,255,0.22),
    0 6px 16px -4px rgba(0,0,0,0.50);
}
.theme-tech #section-reimburse .reimb-item.done {
  background: linear-gradient(160deg, rgba(8,20,40,0.42), rgba(4,12,26,0.30));
}
.theme-tech #section-reimburse .add-btn {
  background: linear-gradient(160deg, rgba(0,229,255,0.92), rgba(0,180,216,0.86));
  color: #04121f;
  border-color: rgba(255,255,255,0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 4px 14px rgba(0,229,255,0.28);
}
.theme-tech #reimbModal .modal-box, .theme-tech #reimbMergeModal .modal-box {
  background: linear-gradient(155deg, rgba(12,30,58,0.88), rgba(6,16,34,0.78));
  border-color: rgba(0,229,255,0.28);
  box-shadow:
    inset 0 1px 0 rgba(0,229,255,0.20),
    0 20px 60px -12px rgba(0,0,0,0.70);
}
.theme-tech .reimb-progress {
  /* 同色系青蓝渐变，左浅右深 */
  background: linear-gradient(90deg,
    #a8f0ff 0%,
    #7ceaff 32%,
    #4fd8f5 65%,
    #26bfe0 100%);
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.35),
    inset 0 0 0 1px rgba(0,229,255,0.16);
}
/* 未推进：深色盖子遮住渐变。文字 #8aa3c0 对 #0a1a30 约 6.7:1（原 #6a7f9c 仅 4.26，未达 AA） */
.theme-tech .rp-seg {
  background: rgba(10,26,48,0.88);
  color: #8aa3c0;
}
/* 分隔线压在亮青渐变上，要用白色高光才自然；用深色会变成一道黑杠 */
.theme-tech .rp-seg + .rp-seg::before { background: rgba(4, 32, 46, 0.22); }
.theme-tech .rp-seg.done {
  background: transparent;
  color: #04202e;
  text-shadow: none;
}
.theme-tech .rp-seg.cur {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}
.theme-tech .reimb-progress.is-editable .rp-seg:hover {
  background: rgba(0,229,255,0.20);
  color: #d5f4ff;
  box-shadow: inset 0 0 0 1.5px rgba(0,229,255,0.55);
}
.theme-tech .reimb-progress.is-editable .rp-seg.done:hover {
  background: rgba(255,255,255,0.18);
  color: #03202c;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.72);
}

/* ---------- 窄屏：进度条独占一行 ---------- */
@media (max-width: 900px) {
  #section-reimburse .reimb-progress {
    flex: 1 1 100%;
    max-width: 300px;
  }
}

/* ==========================================================================
   报销统计：左右结构（左列表 / 右统计 + 按钮）

   高度链很关键，改坏了列表会顶破卡片而不是在卡片内滚动：
   卡片本身是 flex column 且撑满整页（min-height: calc(100vh - 156px)），
   原本靠「#section-reimburse .reimb-list { flex:1 }」让列表吃掉剩余高度。
   改成左右后列表不再是卡片的直接子元素，所以 .reimb-body 必须接住 flex:1，
   且 .reimb-left 也要 min-height:0 —— 否则里层 overflow-y:auto 不生效。
   ========================================================================== */
/* 卡片必须定住高度：原来只写了 min-height，记录一多就把卡片顶高、整页变长，
   右侧统计跟着被滚出视野 —— 而「统计常驻可见」正是做左右布局的意义。
   加上 max-height 后，多出来的记录改为在列表内部滚动。 */
#section-reimburse {
  max-height: calc(100vh - 156px);
  max-height: calc(100dvh - 156px);
}
#section-reimburse > .reimb-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 16px;
  align-items: stretch;
}
#section-reimburse .reimb-left {
  flex: 1 1 auto;
  min-width: 0;          /* 没有这行，长事项名会把左栏撑破 */
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#section-reimburse .reimb-right {
  flex: 0 0 236px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* 右侧统计卡改成竖排：一列一张 */
#section-reimburse .reimb-overview {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 0;
}
#section-reimburse .reimb-stat-card {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
}
/* 右侧「添加报销」占满右栏宽度 */
#section-reimburse .reimb-right .add-btn {
  width: 100%;
  max-height: none;
  padding: 10px 14px;
}
/* 合并栏在 236px 窄栏里横排会挤成一团，改竖排 */
#section-reimburse .reimb-right #reimbMergeBar {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

/* ---------- 窄屏：右栏挪到上方，统计恢复横排 ---------- */
@media (max-width: 980px) {
  /* 窄屏的 min-height 是 100px 那版，max-height 要跟着改 */
  #section-reimburse {
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
  }
  #section-reimburse > .reimb-body { flex-direction: column; }
  #section-reimburse .reimb-right { order: 1; flex: 0 0 auto; }
  #section-reimburse .reimb-left  { order: 2; }
  #section-reimburse .reimb-overview {
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 0;
  }
  #section-reimburse .reimb-stat-card { flex: 1 1 140px; }
}

/* ==========================================================================
   液态玻璃（Liquid Glass）外观层
   --------------------------------------------------------------------------
   V3 设计系统原本是「扁平化、去毛玻璃」：卡片纯白实心、页面底色纯灰。
   玻璃要有东西能透出来才成立，所以这里做三件事：
     1. 页面底色换成带渐变的浅色，并垫几团缓慢漂移的彩色光斑当折射源
     2. 卡片改成「有厚度的玻璃」：斜向渐变底 + 上下内高光 + 一圈内描边
        + 三层外阴影（近/中/远），让卡片真的浮起来
     3. 顶栏、弹窗、侧边栏跟着一起玻璃化，风格才统一
   只改观感（背景 / 描边 / 阴影 / 圆角 / 模糊），不碰尺寸和布局。
   ========================================================================== */

/* 玻璃令牌已迁入顶部设计令牌块（P0 2026-11-04） */

/* 深色玻璃令牌已并入顶部 .theme-tech 块（P0 2026-11-04） */

/* ---------- 2. 底色与光斑：玻璃折射用的 ---------- */
body {
  background:
    linear-gradient(160deg, #eef2ff 0%, #f4f7fb 46%, #fdf1f7 100%);
  background-attachment: fixed;
}
body.theme-tech {
  background:
    linear-gradient(160deg, #050b18 0%, #071427 46%, #040d1a 100%);
  background-attachment: fixed;
}
/* 光斑不用 filter: blur() —— 大尺寸固定元素上做模糊太吃性能，
   径向渐变本身就是柔的，直接叠出来即可 */
body::before {
  content: '';
  position: fixed;
  inset: -12%;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(38% 40% at 16% 20%, rgba(108, 92, 231, 0.28), transparent 62%),
    radial-gradient(34% 36% at 84% 28%, rgba(0, 201, 224, 0.24), transparent 64%),
    radial-gradient(42% 44% at 60% 86%, rgba(255, 138, 180, 0.20), transparent 66%);
  animation: glassDrift 28s ease-in-out infinite alternate;
}
body.theme-tech::before {
  background:
    radial-gradient(38% 40% at 18% 22%, rgba(0, 229, 255, 0.22), transparent 62%),
    radial-gradient(36% 38% at 80% 30%, rgba(108, 92, 231, 0.26), transparent 64%),
    radial-gradient(44% 44% at 58% 84%, rgba(0, 120, 255, 0.20), transparent 66%);
}
@keyframes glassDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(2.5%, -2%, 0) scale(1.06); }
}

/* ---------- 3. 卡片：做出玻璃的厚度 ---------- */
/* 不支持 backdrop-filter 的浏览器（老 Firefox / 安卓 WebView）保持原样，
   免得只剩半透明底、文字糊在背景上看不清 */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .panel-card, .titlelib-card, .okr-card {
    background: linear-gradient(155deg,
      var(--glass-bg-1) 0%, var(--glass-bg-2) 46%, var(--glass-bg-3) 100%);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    border: 1px solid var(--glass-edge);
    border-radius: var(--glass-r);
    box-shadow:
      inset 0 1px 0 var(--glass-hi-top),
      inset 0 -1px 0 var(--glass-hi-bot),
      inset 0 0 0 1px var(--glass-hi-ring),
      var(--glass-s1), var(--glass-s2), var(--glass-s3);
    transition: box-shadow 0.28s ease, transform 0.28s ease;
  }
  .card:hover, .panel-card:hover, .titlelib-card:hover, .okr-card:hover {
    transform: translateY(-2px);
    box-shadow:
      inset 0 1px 0 var(--glass-hi-top),
      inset 0 -1px 0 var(--glass-hi-bot),
      inset 0 0 0 1px var(--glass-hi-ring),
      var(--glass-s1), 0 16px 40px rgba(15, 23, 42, 0.14), var(--glass-s3);
  }

  /* 顶栏 */
  #topbar {
    background: linear-gradient(155deg,
      var(--glass-bg-1) 0%, var(--glass-bg-2) 50%, var(--glass-bg-3) 100%);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    border: 1px solid var(--glass-edge);
    border-radius: var(--glass-r);
    box-shadow:
      inset 0 1px 0 var(--glass-hi-top),
      inset 0 0 0 1px var(--glass-hi-ring),
      var(--glass-s1), var(--glass-s2), var(--glass-s3);
  }

  /* 弹窗 */
  .modal-box {
    background: linear-gradient(155deg,
      var(--glass-bg-1) 0%, var(--glass-bg-2) 46%, var(--glass-bg-3) 100%);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid var(--glass-edge);
    border-radius: var(--glass-r);
    box-shadow:
      inset 0 1px 0 var(--glass-hi-top),
      inset 0 0 0 1px var(--glass-hi-ring),
      0 24px 70px rgba(15, 23, 42, 0.28);
  }

  /* 侧边栏：深色玻璃 */
  .app-sidebar {
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.88), rgba(13, 17, 23, 0.70));
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    border-right: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.07), 10px 0 40px rgba(0, 0, 0, 0.28);
  }
}

/* ---------- 4. 手机端：模糊调低、动画关掉，省性能 ---------- */
@media (max-width: 768px) {
  :root { --glass-blur: 20px; --glass-r: 20px; }
  body::before { animation: none; }
}

/* 系统开了「减少动态效果」就别飘了 */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

/* ==========================================================================
   深色模式（科技·深空霓虹）可读性加固
   --------------------------------------------------------------------------
   两套样式在这里打架：
     · V3 设计系统是按亮色设计的，很多容器把底色写死成 #fff
     · 深色主题又把文字统一改成浅色 #d8e6ff
   白底配浅色字必然看不清。这里做三件事：
     1. 玻璃调厚、光斑调淡 —— 卡片中段原本只有 0.50，太透，彩色光斑会
        透上来把文字糊住
     2. 写死白底的容器在深色下压暗：弹窗表单、标题库编辑框、假勤/报销/
        活动的输入框、看板的待办灵感行
     3. 窄屏（≤980px）侧边栏变横条时 V3 也写死了白底，跟着一起改
   ========================================================================== */

/* ---------- 1. 深色下玻璃调厚、光斑调淡 ---------- */
body.theme-tech {
  --glass-bg-1: rgba(16, 30, 52, 0.90);
  --glass-bg-2: rgba(11, 24, 44, 0.84);
  --glass-bg-3: rgba(14, 28, 50, 0.88);
  --glass-edge: rgba(0, 229, 255, 0.20);
  --glass-hi-top: rgba(130, 224, 255, 0.26);
  --glass-hi-bot: rgba(0, 229, 255, 0.08);
}
body.theme-tech::before {
  background:
    radial-gradient(38% 40% at 18% 22%, rgba(0, 229, 255, 0.13), transparent 62%),
    radial-gradient(36% 38% at 80% 30%, rgba(108, 92, 231, 0.15), transparent 64%),
    radial-gradient(44% 44% at 58% 84%, rgba(0, 120, 255, 0.12), transparent 66%);
}
/* 顶栏搜索框：V3 把输入文字写死成深灰，深色底上等于隐形 */
body.theme-tech .topbar-search input { color: var(--d-text); }

/* ---------- 2. 写死白底的容器：深色下压暗 ---------- */
body.theme-tech .modal-box .form-group input,
body.theme-tech .modal-box .form-group textarea,
body.theme-tech .modal-box .form-group select,
body.theme-tech .titlelib-tpl .tl-edit-input,
body.theme-tech .act-metric-row input,
body.theme-tech .att-type-select,
body.theme-tech .att-add-form input,
body.theme-tech .att-add-form select,
body.theme-tech .reimb-status-select,
body.theme-tech .reimb-add-form input,
body.theme-tech .reimb-add-form select,
body.theme-tech .act-compare-metric-select select {
  background: var(--d-surface-solid-2);
  border-color: var(--d-line-strong);
  color: var(--text-primary);
}
body.theme-tech .modal-box .form-group input:focus,
body.theme-tech .modal-box .form-group textarea:focus,
body.theme-tech .modal-box .form-group select:focus,
body.theme-tech .titlelib-tpl .tl-edit-input:focus {
  background: rgba(4, 10, 24, 0.96);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}
/* 下拉展开后的选项由浏览器绘制，默认白底，深色下要跟着改 */
body.theme-tech select option { background: #0a1526; color: var(--d-text); }

/* 兜底：上面没逐个点到的输入框，深色下一律压暗。
   避开复选框 / 单选框——它们靠背景表达选中状态，改了就看不出勾没勾 */
body.theme-tech input:not([type="checkbox"]):not([type="radio"]):not(:focus),
body.theme-tech textarea:not(:focus),
body.theme-tech select:not(:focus) {
  background: var(--d-surface-solid-2);
  border-color: var(--d-line-strong);
  color: var(--text-primary);
}
body.theme-tech input:not([type="checkbox"]):not([type="radio"]):focus,
body.theme-tech textarea:focus,
body.theme-tech select:focus {
  background: rgba(4, 10, 24, 0.94);
  color: var(--text-primary);
}
/* 顶栏搜索框本来是透明的（底色由外层 .topbar-search 给），别被兜底填成实心 */
body.theme-tech #topbar .topbar-search input {
  background: transparent;
  color: var(--d-text);
}

/* 看板「待办灵感」列表行：这行必须接近不透明，否则会透出下面那条标题 */
body.theme-tech .dash-ti-row {
  background: rgba(11, 24, 44, 0.96);
  border-color: var(--d-accent-soft);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
body.theme-tech .dash-ti-row:hover {
  border-color: rgba(0, 229, 255, 0.30);
  box-shadow: 0 3px 12px rgba(0, 229, 255, 0.16);
}
/* 计数徽章：浅底配浅字，深色下两边一起换 */
body.theme-tech .dash-ti-count {
  background: var(--d-accent-soft);
  color: var(--d-accent-text-2);
}

/* ---------- 3. 窄屏：侧边栏变横条时 V3 写死了白底 ---------- */
@media (max-width: 980px) {
  body.theme-tech .app-sidebar {
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.95), rgba(13, 17, 23, 0.90));
    border-top-color: var(--d-line-soft);
  }
  body.theme-tech .sidebar-item { color: var(--d-text-muted); }
  body.theme-tech .sidebar-item:hover { background: var(--d-line-solid); color: var(--d-text-strong-soft); }
}

/* ---------- 发布记录：窄屏排不下 5 列，折成两行 ---------- */
@media (max-width: 768px) {
  .wxpub-log {
    grid-template-columns: 58px minmax(0, 1fr) 66px;
    grid-template-areas:
      "type  title   title"
      "time  account status";
    row-gap: 3px; column-gap: 8px;
  }
  /* 折成两行后对不上表头，窄屏就不显示标题栏了 */
  .wxpub-log-head { display: none; }
  .wxpub-log .wl-count   { grid-area: type; }
  .wxpub-log .wl-title   { grid-area: title; }
  .wxpub-log .wl-time    { grid-area: time; font-size: 11.5px; }
  .wxpub-log .wl-account { grid-area: account; font-size: 11.5px; }
  .wxpub-log .wl-status  { grid-area: status; font-size: 11px; }
}

/* ---------- 发布记录：深色模式下新加的几列 ---------- */
body.theme-tech .wxpub-log-head {
  color: rgba(132, 164, 205, 0.75);
  border-bottom-color: var(--d-line-soft);
}
/* 亮色下的绿 #16a34a 压在深色底上偏暗，换成深色主题惯用的亮绿 */
body.theme-tech .wxpub-log .wl-status { color: var(--d-ok); }
body.theme-tech .wxpub-log .wl-count.mass,
body.theme-tech .wxpub-log .wl-status.mass { color: var(--d-accent-text); }


/* ==========================================================================
   深色科技主题（theme-tech）专区 · 2026-11-05 归拢
   --------------------------------------------------------------------------
   从 wxslot/wxtpl/wxpub/sched/reimb-detail 各模块中间原样搬来的深色覆写，
   一条未改。深色规则从此集中在此管理，与上文 4185+/4376+/4505+ 段同为深色区。
   ========================================================================== */

.theme-tech .wxslot .wsm-btn { background: var(--d-surface-raise-2); }
.theme-tech .wxslot .wsm-pop { background: rgba(16,24,48,0.98); }
.theme-tech .wxtpl-line { background: var(--d-surface-raise-2); }
.theme-tech .wxtpl-var { background: rgba(0,229,255,0.1); color: #7fe6ff; }
.theme-tech .wxtpl-var:hover { background: rgba(0,229,255,0.2); border-color: var(--d-accent); }
.theme-tech .wxtpl-def { background: rgba(16,24,48,0.5); }
.theme-tech .wxtpl-byte.ok { color: #4ade80; }
.theme-tech .wxtpl-byte.warn { color: #fbbf24; }
.theme-tech .wxtpl-byte.over { color: #f87171; }
/* 「不随机」开关：深色下走青色系，别用深蓝 accent-solid（深底上发闷） */
.theme-tech .wxtpl-nr { color: var(--d-text-sub); }
.theme-tech .wxtpl-nr:hover { background: rgba(255,255,255,0.06); }
.theme-tech .wxtpl-nr.on {
  color: var(--d-accent-text); border-color: rgba(0,229,255,0.35);
  background: rgba(0,229,255,0.12);
}
.theme-tech .wsp-nr { color: var(--d-text-sub); background: rgba(255,255,255,0.08); }
/* 深色科技主题适配 */
.theme-tech .wxpub-cfg-row,
.theme-tech .wxpub-log,
.theme-tech .wxacc,
.theme-tech .wxprev,
.theme-tech .wxslot {
  background: var(--d-surface-raise-2);
  border: 1px solid rgba(0, 229, 255, 0.16);
}
.theme-tech .wxslot .ws-time,
.theme-tech .wxslot .ws-src,
.theme-tech .wxslot .ws-pick {
  background: var(--d-surface-raise-2);
  border: 1px solid rgba(0, 229, 255, 0.16);
  color: var(--text-primary);
}
.theme-tech .wx-today { background: var(--d-accent-soft-5); }
.theme-tech .wxpub-input {
  background: var(--d-surface-raise-2);
  border: 1px solid rgba(0, 229, 255, 0.16);
  color: var(--text-primary);
}
.theme-tech .wxpub-cfg-row:hover,
.theme-tech .wxpub-log:hover {
  background: rgba(16, 24, 48, 0.8);
  border-color: rgba(0, 229, 255, 0.38);
}
.theme-tech .wxpub-cfg-row select:hover { background: var(--d-accent-soft-2); }
.theme-tech .wxpub-cmd {
  background: rgba(0, 229, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.2);
}
.theme-tech .wxpub-tip {
  background: rgba(0, 229, 255, 0.06);
  border-left-color: var(--accent);
}
.theme-tech .wxpub-log .wl-count {
  background: var(--d-accent-soft); color: #7fe6ff;
}
.theme-tech .wxpub-sch-status { background: var(--d-accent-soft-5); }
.theme-tech .wxpub-time {
  background: rgba(16, 24, 48, 0.6); border-color: rgba(0, 229, 255, 0.25);
  color-scheme: dark;
}
.theme-tech .wxpub-switch-track { background: rgba(255, 255, 255, 0.16); }
.theme-tech .wxpub-sch-status .sch-on { color: #4ade80; }
.theme-tech .wxpub-sch-status .sch-warn { color: #fbbf24; }
.theme-tech .wxpub-sch-status .sch-err { color: #f87171; }
/* 科技主题下的日历配色 */
.theme-tech .sched-cell.work { background: rgba(8,20,40,0.45); color: var(--d-text); }
.theme-tech .sched-cell.rest { background: rgba(61,255,176,0.12); color: var(--d-ok); }
.theme-tech .sched-cell.holiday { background: rgba(255,143,143,0.14); color: var(--d-danger); }
.theme-tech .sched-cell.makeup { background: rgba(162,155,254,0.18); color: var(--d-info); }
.theme-tech .sched-week-head span { color: rgba(178,203,235,0.8); }
.theme-tech .sched-week-head .sched-wkend { color: var(--d-danger); }
.theme-tech .sched-cell .mark-ot { background: var(--d-ok); color: #06281d; }
.theme-tech .sched-cell .mark-leave { background: var(--d-warn); color: #3d2a06; }
.theme-tech .lg-work { background: rgba(8,20,40,0.6); border-color: rgba(0,229,255,0.2); }
.theme-tech .reimb-item-detail { color: rgba(178, 203, 235, 0.66); }

/* ==========================================================================
   深色主题 · 过亮表面收尾（2026-11-05）
   扫描器 _scan_dark_bright.mjs 找出 computed 背景亮度 > 0.42 的漏网元素，
   这里逐类收敛。全部带 .theme-tech 前缀，浅色主题零影响。
   ========================================================================== */

/* 1 · 模块图标底色：马卡龙浅底（#eff6ff 等）在深色下是刺眼白方块。
      注意 wb-visual.css 在本文件之后加载，其 :root 定义的同名变量会赢，
      所以这里用 body.theme-tech（0,1,1）压过 :root（0,1,0）。图标 svg 走 currentColor 自动跟随 */
body.theme-tech {
  --v4-blue-bg: rgba(64, 150, 255, 0.16);   --v4-blue-fg: #8dc2ff;
  --v4-green-bg: rgba(61, 255, 176, 0.13);  --v4-green-fg: #6dffc4;
  --v4-amber-bg: rgba(255, 176, 32, 0.16);  --v4-amber-fg: #ffce7a;
  --v4-purple-bg: rgba(162, 155, 254, 0.16);--v4-purple-fg: #bfb8ff;
  --v4-teal-bg: rgba(0, 229, 255, 0.14);    --v4-teal-fg: #7ceaff;
  --v4-coral-bg: rgba(255, 143, 143, 0.15); --v4-coral-fg: #ffada8;
}

/* 2 · 看板财务英雄块：0.6 白底在深底上炸成白板 */
.theme-tech .fin-hero {
  background: var(--glass-bg-3);
  border-color: var(--d-line);
}

/* 3 · 发布队列行 / 渠道小圆点 */
.theme-tech .wxq-row {
  background: rgba(8, 20, 40, 0.6);
  border-color: var(--d-line-soft);
}
.theme-tech .wxq-row.sent { background: rgba(61, 255, 176, 0.09); }
.theme-tech .wxq-row.skip { background: rgba(255, 196, 107, 0.09); }
.theme-tech .wxq-row.wait .wxq-state { color: var(--d-accent-text); }
.theme-tech .wxq-row.sent .wxq-state { color: var(--d-ok); }
.theme-tech .wxq-row.skip .wxq-state { color: var(--d-warn); }
.theme-tech .wxslot .ws-dot { background: #cfe4ff; }
.theme-tech .wxslot .ws-on input:checked + .ws-track .ws-dot { background: #05202b; }

/* 4 · 公众号预览区：必须保留白底（公众号正文是白底文章，反色就失真了），
      但给它一圈青色描边 + 深色外框，让它看起来像"嵌进深色界面的手机屏幕" */
.theme-tech .wxbody-preview {
  background: rgba(8, 20, 40, 0.55);
  border: 1px solid var(--d-line);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}
.theme-tech .wxpub-preview .wxtpl-preview { background: transparent; }
/* ==================================================== 看板：公众号自动发布监测
   左：6 个蓝色数据框（3 列 × 2 行）；右：公众号列表与左栏两排框等高，超出在列内滚动。
   等高不写死像素：wb.js 量出左侧实际高度后写到 .wxmon-list 的 max-height。 */
.wxmon-wrap { display: flex; gap: 18px; align-items: flex-start; }

/* 左栏：两排 × 三列 */
.wxmon-cells {
  display: grid; gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 0 0 54%; min-width: 0;
}
.wxmon-cell {
  background: var(--accent-light);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 12px 10px;
}
.wxmon-cell b {
  display: block; font-size: 20px; font-weight: 650; line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.wxmon-cell span {
  display: block; margin-top: 1px;
  font-size: 11.5px; color: var(--text-tertiary); white-space: nowrap;
}
/* 有报错时整框可点：蓝底不变，只描边 + 数字走危险色，副行给「查看」提示 */
.wxmon-cell-err { cursor: pointer; border-color: var(--accent); }
.wxmon-cell-err:hover { background: var(--accent-light); box-shadow: 0 0 0 2px var(--accent-light); }
.wxmon-cell-err b { color: var(--danger); }
.wxmon-more { font-style: normal; color: var(--accent-solid); margin-left: 3px; }

/* 右栏：与左栏等高（max-height 由 JS 写），行多则内部滚动 */
.wxmon-list {
  flex: 1 1 auto; min-width: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding-right: 2px;
}
/* 滚动条要有存在感：--line-soft 只有 6% 不透明度，几乎看不见，看不出还能滚 */
.wxmon-list { scrollbar-width: thin; scrollbar-color: rgba(16, 24, 40, .22) transparent; }
.wxmon-list::-webkit-scrollbar { width: 5px; }
.wxmon-list::-webkit-scrollbar-thumb { background: rgba(16, 24, 40, .22); border-radius: 3px; }
.wxmon-list::-webkit-scrollbar-thumb:hover { background: rgba(16, 24, 40, .38); }
body.theme-tech .wxmon-list { scrollbar-color: rgba(0, 229, 255, .3) transparent; }
body.theme-tech .wxmon-list::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, .3); }
.wxmon-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--line-soft);
}
.wxmon-row:last-child { border-bottom: 0; }
.wxmon-row-name {
  flex: 1 1 auto; min-width: 0;
  font-size: 12.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wxmon-row-slot { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }

/* 窄屏：左栏压成 2 列，右列表放开高度限制直接铺开 */
@media (max-width: 768px) {
  .wxmon-wrap { flex-direction: column; gap: 12px; }
  .wxmon-cells { flex: none; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wxmon-cell b { font-size: 17px; }
  .wxmon-list { max-height: none !important; width: 100%; }
}

/* 监测卡状态徽章：自带配色，不依赖 .pubq-status（后者在深色下被覆盖成实心块） */
.wxmon-badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; line-height: 1.7; white-space: nowrap;
}
.wxmon-badge.ok   { background: rgba(16, 185, 129, .16); color: #0a7a5a; }
.wxmon-badge.warn { background: rgba(245, 158, 11, .18); color: #8a5a00; }
.wxmon-badge.off  { background: rgba(148, 163, 184, .18); color: #5f6b7a; }
body.theme-tech .wxmon-badge.ok   { background: rgba(61, 255, 176, .14); color: #7dffcf; }
body.theme-tech .wxmon-badge.warn { background: rgba(255, 196, 107, .16); color: #ffcf87; }
body.theme-tech .wxmon-badge.off  { background: rgba(160, 180, 200, .14); color: #b6c4d4; }

/* 监测卡高度随账号数自适应：账号增删后固定 288px 会裁掉最后一行
   （span-12 独占一行，align-self:start 防止被网格 stretch 拉虚高） */
#main .card#section-wxmon { align-self: start; height: auto; overflow: visible; }

/* 监测卡报错详情弹窗：头部/滚动体/页脚三段，内容多时只滚中间 */
.wxmon-m-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--line-soft);
}
.wxmon-m-head b { font-size: 15px; font-weight: 650; }
.wxmon-m-head small { font-size: 11.5px; color: var(--text-tertiary); margin-left: 8px; }
.wxmon-m-x {
  border: 0; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--text-tertiary);
  padding: 0 2px; border-radius: 6px;
}
.wxmon-m-x:hover { color: var(--text-primary); background: var(--accent-light); }
.wxmon-m-body { padding: 4px 20px; max-height: 60vh; overflow-y: auto; }
.wxmon-m-item { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.wxmon-m-item:last-child { border-bottom: 0; }
.wxmon-m-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.wxmon-m-time {
  font-family: 'Consolas','Monaco','Courier New',monospace;
  font-size: 11px; color: var(--text-tertiary);
}
.wxmon-m-acc {
  font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: var(--accent-light); color: var(--accent-solid);
}
.wxmon-m-raw {
  font-family: 'Consolas','Monaco','Courier New',monospace;
  font-size: 11.5px; line-height: 1.55; word-break: break-all;
  color: var(--danger); background: rgba(231, 76, 60, .09);
  border-radius: 8px; padding: 7px 10px;
}
.wxmon-m-hint { font-size: 12px; line-height: 1.6; color: var(--text-secondary); margin-top: 6px; }
.wxmon-m-hint b { color: var(--text-primary); font-weight: 650; }
.wxmon-m-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 20px; border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--text-tertiary);
}
body.theme-tech .wxmon-m-raw { background: rgba(255, 143, 143, .10); color: var(--d-danger); }

/* 报错详情密度高，不要毛玻璃：跟 #reimbModal 一样改实底，两套主题各给一份 */
body:not(.theme-tech) #wxMonErrModal .modal-box {
  background: #fff; backdrop-filter: none;
  border: 1px solid rgba(16, 24, 40, .06);
}
body.theme-tech #wxMonErrModal .modal-box {
  background: var(--d-surface-solid); backdrop-filter: none;
  border-color: var(--d-line);
}

/* 监测卡深色微调：小标签用 --text-tertiary 在深底上偏灰（3.4:1），
   提到 --d-text-sub（≈6.8:1）；数字用 --d-text，报错数字保持危险色 */
body.theme-tech .wxmon-cell b { color: var(--d-text); }
body.theme-tech .wxmon-cell span { color: var(--d-text-sub); }
body.theme-tech .wxmon-cell-err b { color: var(--d-danger); }
body.theme-tech .wxmon-cell-err span { color: var(--d-text-sub); }
body.theme-tech .wxmon-row-slot { color: var(--d-text-sub); }
body.theme-tech .wxmon-cell-err { border-color: var(--d-accent); }

/* 深色下强调文字要用亮青（--accent-solid 是 #0958d9，深底上几乎看不见） */
body.theme-tech .wxmon-more { color: var(--d-accent-text); }
body.theme-tech .wxmon-m-acc { color: var(--d-accent-text); }


/* ================================================================
   排期：标题 / 正文 / 封面 的按钮 + 弹窗（2026-11-11）
   三个原先都是排期行里的小下拉，模板全文看不全，统一改弹窗。
   所有表面色走 --card-bg-solid / --line-soft / --text-*，深色主题自动适配
   （注意：不要用 --color-surface，.theme-tech 没覆盖它，深色下会白底）
   ================================================================ */

/* —— 排期行上的触发按钮 —— */
.ws-pickbtn {
  display: inline-flex; align-items: center; gap: 4px;
  max-width: 168px; padding: 3px 7px;
  border: 1px solid var(--line-soft); border-radius: 7px;
  background: var(--card-bg-solid); color: var(--text-secondary);
  font-size: 11px; line-height: 1.5; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.ws-pickbtn:hover { border-color: var(--accent); }
.ws-pickbtn.on { border-color: var(--accent); background: var(--accent-light); color: var(--accent-text); }
.ws-pb-lab { font-size: 10.5px; font-weight: 700; color: var(--text-muted); flex: 0 0 auto; }
.ws-pickbtn.on .ws-pb-lab { color: var(--accent-text); }
.ws-pb-val {
  flex: 1 1 auto; min-width: 0; max-width: 96px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}
.ws-pb-caret { flex: 0 0 auto; font-size: 9px; opacity: .65; }

/* —— 弹窗外壳：实底，文字密，不用毛玻璃 —— */
#wxSlotPickBox {
  display: flex; flex-direction: column;
  width: calc(100% - 48px); max-width: 760px; max-height: 84vh;
  padding: 0; overflow: hidden;
  background: var(--card-bg-solid);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}
.wsp-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 15px 18px 12px; border-bottom: 1px solid var(--line-soft);
}
.wsp-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.wsp-sub { margin-top: 4px; font-size: 11.5px; line-height: 1.6; color: var(--text-muted); }
.wsp-x {
  flex: 0 0 auto; border: 0; background: transparent; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 5px; color: var(--text-muted);
}
.wsp-x:hover { color: var(--text-primary); }

.wsp-body { flex: 1 1 auto; overflow: auto; padding: 12px 18px; }
.wsp-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-top: 1px solid var(--line-soft);
}
.wsp-tip { flex: 1 1 auto; font-size: 11.5px; color: var(--text-muted); }
.wsp-empty { padding: 26px 10px; text-align: center; font-size: 12px; color: var(--text-muted); }

/* —— 模板条目（标题 / 正文共用）—— */
.wsp-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--card-bg-solid); cursor: pointer;
}
.wsp-item:last-child { margin-bottom: 0; }
.wsp-item:hover { border-color: var(--accent); }
.wsp-item.on { border-color: var(--accent); background: var(--accent-light); }
.wsp-item input { flex: 0 0 auto; margin-top: 3px; }
.wsp-main { flex: 1 1 auto; min-width: 0; }
.wsp-hd { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.wsp-id {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; color: var(--text-muted);
  padding: 0 5px; border-radius: 5px; background: var(--line-soft);
}
.wsp-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.wsp-text {
  margin-top: 5px; font-size: 12px; line-height: 1.75; color: var(--text-secondary);
  white-space: pre-wrap; word-break: break-word;
  max-height: 168px; overflow: auto;
}

/* —— 封面网格 —— */
.wsp-covers {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px;
}
.wsp-cov {
  position: relative; border: 1px solid var(--line-soft); border-radius: 10px;
  overflow: hidden; background: var(--card-bg-solid);
}
.wsp-cov.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.wsp-cov-main { display: block; position: relative; cursor: pointer; }
.wsp-cov-main input { position: absolute; left: 8px; top: 8px; z-index: 2; }
.wsp-cov-main img {
  display: block; width: 100%; height: 96px; object-fit: cover; background: var(--line-soft);
}
.wsp-cov-ph {
  display: flex; align-items: center; justify-content: center;
  height: 96px; font-size: 11px; color: var(--text-muted); background: var(--line-soft);
}
.wsp-cov-ft { display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.wsp-cov-nm {
  flex: 1 1 auto; min-width: 0; font-size: 11px; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wsp-cov-sz { flex: 0 0 auto; font-size: 10.5px; color: var(--text-muted); }
.wsp-cov-sz.low { color: var(--danger-strong); }
.wsp-cov-x {
  position: absolute; right: 6px; top: 6px; z-index: 3;
  width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 13px; line-height: 1;
}
.wsp-cov-x:hover { background: var(--danger-strong); }

/* —— 深色主题下的两处补救（浅色令牌在深底上看不清）—— */
body.theme-tech .ws-pickbtn.on,
body.theme-tech .wsp-item.on { color: var(--d-text); }
body.theme-tech .ws-pickbtn.on .ws-pb-lab,
body.theme-tech .wsp-cov-sz.low { color: var(--d-accent-text); }
body.theme-tech .wsp-cov-sz.low { color: var(--d-danger); }

@media (max-width: 640px) {
  #wxSlotPickBox { width: calc(100% - 20px); max-height: 90vh; }
  .wsp-covers { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .wsp-text { max-height: 120px; }
}

/* ===== 发布记录完整版：深色主题适配 ===== */
body.theme-tech .wx-hist-sel {
  background: var(--d-surface-solid);
  border-color: var(--d-line);
  color: var(--d-text-sub);
}
body.theme-tech .wxpub-log.fail {
  background: rgba(255, 143, 143, 0.07);
  border-color: rgba(255, 143, 143, 0.2);
}
body.theme-tech .wxpub-log.fail:hover { background: rgba(255, 143, 143, 0.12); }
body.theme-tech .wxpub-log .wl-status.fail { color: var(--d-danger); }
body.theme-tech .wxpub-log.skip { background: rgba(159, 195, 232, 0.06); border-color: rgba(159, 195, 232, 0.16); }
body.theme-tech .wxpub-log.skip:hover { background: rgba(159, 195, 232, 0.12); }
body.theme-tech .wxpub-log .wl-status.skip { color: var(--d-text-sub); }
body.theme-tech .wxpub-more { border-color: var(--d-line); color: var(--d-text-sub); }
body.theme-tech .wxpub-more:hover { color: var(--d-accent-text); border-color: var(--d-accent-text); }

/* ================= 自动发布 V4 版式（2026-11-11） =================
   结构：页签条（今日计划/图文排期/贴图排期 + 操作）→ 今日计划小卡 / 两栏排期 → 通栏记录。
   原来顶上那条状态带（合计 + 每号一条 chips）整体搬进「今日计划」页签改成小卡，
   卡片顶部因此少一层，打开页面第一眼就是今天发到哪了。 */

/* ---- 页签条右侧的操作按钮（跳过今天 / 刷新） ---- */
.wxbar-acts { display: flex; gap: 6px; flex-shrink: 0; }

/* ---- 页签 ---- */
.wxpub-tabs { display: inline-flex; align-items: center; gap: 4px; }
.wxpub-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; background: transparent;
  font-family: inherit; font-size: 12.5px; color: var(--text-secondary);
  transition: var(--transition);
}
.wxpub-tab b {
  font-size: 11px; font-weight: 600; line-height: 1.6; padding: 0 5px;
  border-radius: 7px; background: rgba(111, 119, 131, 0.12); color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.wxpub-tab:hover { background: rgba(108, 92, 231, 0.07); color: var(--text-primary); }
.wxpub-tab.on {
  background: var(--accent-light, rgba(108, 92, 231, 0.12));
  border-color: rgba(108, 92, 231, 0.28);
  color: var(--accent, #6c5ce7); font-weight: 700;
}
.wxpub-tab.on b { background: rgba(108, 92, 231, 0.16); color: var(--accent, #6c5ce7); }

/* ---- 整卡页签条：今日计划 / 图文排期 / 贴图排期，右侧留操作按钮 ---- */
.wxpub-tabbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 0 2px 8px; margin: 0 0 12px;
  border-bottom: 1px solid var(--card-border);
}
.wxpub-tabbar .wxpub-tab { font-size: 13px; padding: 5px 12px; }
.wxpub-tabbar .wxbar-acts { margin-left: auto; display: flex; gap: 6px; }
.wxpub-tabbar .wxbar-acts .card-action { font-size: 12px; padding: 4px 10px; }

/* ---- 今日计划概览：四张数字小卡 + 每个公众号一张进度卡 ----
   这些数字原来挤在卡片顶部那条状态带里，现在拆成小卡放进页签，
   卡片顶部省一层高度，数字之间的关系也更好读。 */
.wxplan-cards { display: flex; flex-direction: column; gap: 10px; }
/* 左栏宽度随视口变（右栏固定 520），四张数字卡在窄屏折成两行两张，
   不会把数字挤成竖排 */
.wxpc-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wxpc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 10px; }
/* ---- 号卡折叠：默认最多 3 行，多出来的收进「展开全部」----
   号一多（10 个以上）左栏会无限长，把发布记录顶到屏幕外，所以按行折叠 + 底部渐隐。
   高度和列数都由 _fitAccScroll() 量出来写，视口变了重算。 */
.wxpc-sec { display: flex; flex-direction: column; gap: 8px; }
.wxpc-scroll { position: relative; }
.wxpc-scroll.more { overflow: hidden; }
.wxpc-scroll.more::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
  pointer-events: none; border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, rgba(247, 248, 251, 0), rgba(247, 248, 251, 0.96));
}
body.theme-tech .wxpc-scroll.more::after {
  background: linear-gradient(180deg, rgba(8, 14, 26, 0), rgba(8, 14, 26, 0.96));
}
/* 展开后不再限 3 行，但也不让 40 个号铺满整页：60vh 内滚 */
.wxpc-scroll.open { overflow-y: auto; max-height: 60vh; }
.wxpc-morebtn { align-self: flex-start; font-size: 12px; padding: 4px 10px; }
.wxpc {
  position: relative; overflow: hidden; padding: 11px 13px 12px;
  border-radius: 14px; border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: wxpcIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.wxpc:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08); }
/* 左侧竖色带：四种状态各一条，扫一眼分得清 */
.wxpc::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--wxpc-c, rgba(108, 92, 231, 0.55));
}
.wxpc.kpi.today { --wxpc-c: linear-gradient(180deg, #6c5ce7, #a99bff); }
.wxpc.kpi.ok    { --wxpc-c: linear-gradient(180deg, #16a34a, #4ade80); }
.wxpc.kpi.wait  { --wxpc-c: linear-gradient(180deg, #d97706, #fbbf24); }
.wxpc.kpi.bad   { --wxpc-c: linear-gradient(180deg, #dc2626, #f87171); }
.wxpc.kpi.bad.on { cursor: pointer; border-color: rgba(220, 38, 38, 0.28); }
.wxpc.kpi.bad.on:hover { background: rgba(220, 38, 38, 0.05); }

.wxpc-hd { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wxpc-ico { font-size: 13px; line-height: 1; }
.wxpc-k { font-size: 11.5px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.2px; }
.wxpc-more { margin-left: auto; font-size: 11px; font-weight: 600; color: #dc2626; opacity: 0.8; }
.wxpc-val { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; }
.wxpc-v {
  font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -0.5px;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.wxpc-val i { font-style: normal; font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.wxpc.kpi.ok .wxpc-v { color: #16a34a; }
.wxpc.kpi.wait .wxpc-v { color: #d97706; }
.wxpc.kpi.bad .wxpc-v { color: #dc2626; }
/* 0 条就别喊了：灰色，跟有数的卡拉开层次（同权靠后加载覆盖） */
.wxpc.kpi.zero .wxpc-v { color: var(--text-muted); }
.wxpc-sub {
  margin-top: 6px; font-size: 11px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 公众号卡：名字 + 百分比 + 发了几条/共几条 + 进度条 + 一句话状态 */
.wxpc.acc { padding-bottom: 11px; }
.wxpc-dot {
  flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: #9ca3af;
}
.wxpc-dot.ok  { background: #16a34a; }
.wxpc-dot.run { background: #6c5ce7; }
.wxpc-dot.bad { background: #dc2626; animation: wxpcPulse 1.9s ease-out infinite; }
.wxpc-name {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 700;
  color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wxpc-pct { font-size: 11.5px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.wxpc-mid { display: flex; align-items: baseline; gap: 5px; margin-top: 5px; }
.wxpc-num { font-size: 21px; font-weight: 800; line-height: 1.1; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.wxpc-split { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.wxpc-track {
  margin-top: 8px; height: 5px; border-radius: 999px;
  background: rgba(111, 119, 131, 0.14); overflow: hidden;
}
.wxpc-fill {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, #6c5ce7, #a99bff);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.wxpc-fill.bad { background: linear-gradient(90deg, #dc2626, #f87171); }
.wxpc-foot { margin-top: 6px; font-size: 11px; color: var(--text-muted); }
.wxpc-foot.bad { color: #dc2626; font-weight: 600; }

@keyframes wxpcIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes wxpcPulse {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* 深色主题：小卡走深色玻璃，别用半透明白底（会泛成一块灰） */
.theme-tech .wxpc {
  background: var(--glass-bg-3); border-color: var(--d-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.theme-tech .wxpc:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }
.theme-tech .wxpc-k,
.theme-tech .wxpc-sub,
.theme-tech .wxpc-split,
.theme-tech .wxpc-pct,
.theme-tech .wxpc-foot,
.theme-tech .wxpc-val i { color: var(--d-text-sub); }
.theme-tech .wxpc-v,
.theme-tech .wxpc-num,
.theme-tech .wxpc-name { color: var(--d-text); }
.theme-tech .wxpc.kpi.ok .wxpc-v { color: var(--d-ok); }
.theme-tech .wxpc.kpi.wait .wxpc-v { color: var(--d-warn); }
.theme-tech .wxpc.kpi.bad .wxpc-v { color: var(--d-danger); }
.theme-tech .wxpc.kpi.zero .wxpc-v { color: var(--d-text-sub); }
.theme-tech .wxpc-track { background: rgba(255, 255, 255, 0.10); }
.theme-tech .wxpc-foot.bad,
.theme-tech .wxpc-more { color: var(--d-danger); }
.theme-tech .wxpc-dot.ok { background: var(--d-ok); }
.theme-tech .wxpc-dot.run { background: var(--d-accent-text); }
.theme-tech .wxpc-dot.bad { background: var(--d-danger); }

/* 队列还在右栏半宽里：这些标签一律不折行，宁可挤也不换行 */
.wxq-mode, .wxq-chan, .wxq-state, .wxq-pub { white-space: nowrap; }
.wxq-chan.wx { background: rgba(37, 99, 235, 0.10); color: #2563eb; }
body.theme-tech .wxq-chan.wx { background: rgba(124, 234, 255, 0.10); color: var(--d-accent-text); }

/* 小卡挪进左栏后可用宽度变窄（右栏固定 520）：1400 以下四张排不下两行两张 */
@media (max-width: 1400px) {
  .wxpc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .wxpc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .wxpc-row { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .wxpc, .wxpc-dot.bad { animation: none; }
  .wxpc-fill { transition: none; }
  .wxpc { transition: none; }
}
.wxpub-pane { min-width: 0; }

/* 页内工具栏：账号选择 / 每篇岗位数 / 保存，独占一行 */
.wxpane-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 8px; margin-bottom: 6px;
  border-bottom: 1px dashed var(--card-border);
}
.wxpane-fill { flex: 1; min-width: 0; }
.wxpane-sel { display: inline-flex; align-items: center; gap: 4px; }

/* ---- 配置入口：一行五个小卡（原来是 4+1 两排、每张 122px 高的巨卡） ---- */
.wxset-bar.main-links-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.wxset-bar.main-links-grid .link-card {
  flex-direction: row; justify-content: flex-start; text-align: left;
  min-height: 52px; padding: 8px 10px; gap: 8px;
  border-radius: 10px; box-shadow: none;
}
.wxset-bar.main-links-grid .link-card .link-icon {
  width: 28px; height: 28px; font-size: 15px; border-radius: 8px;
}
.wxset-bar.main-links-grid .link-name { font-size: 12.5px; }
.wxset-bar.main-links-grid .link-card:hover { transform: translateY(-1px); }

/* 两栏底部对齐：左栏拉伸到右栏那么高，排期卡再吃掉多出来的空间。
   右栏单独 align-self:start，否则 sticky 会失效（拉满行高就没有滚动余地了） */
.wxpub-layout { align-items: stretch; }
.wxpub-col-preview { align-self: start; }
.wxpub-col-set > .wxmod:first-child { flex: 1 1 auto; }

/* 右栏两块限高内部滚动：队列有 15~20 行，放开就是 693px，
   一栏就把整个卡片顶到 1350 —— 限高后卡片高度由左栏决定 */
.wxpub-col-preview .wxpub-pane { max-height: 420px; overflow-y: auto; }
.wxpub-col-preview .wxpub-pane::-webkit-scrollbar { width: 6px; }
.wxpub-col-preview .wxpub-pane::-webkit-scrollbar-thumb {
  background: var(--card-border); border-radius: 3px;
}

/* ---- 通栏发布记录 ---- */
.wxmod-hist { margin-top: 12px; }
.wxmod-hist .wxpub-history { max-height: 384px; }
.wx-hist-kw { max-width: 128px; }

/* ---- 深色主题 ---- */
body.theme-tech .wxpub-tab { color: var(--d-text-sub); }
body.theme-tech .wxpub-tab b { background: rgba(255, 255, 255, 0.08); color: var(--d-text-sub); }
body.theme-tech .wxpub-tab:hover { background: rgba(0, 229, 255, 0.08); color: var(--d-text); }
body.theme-tech .wxpub-tab.on {
  background: rgba(0, 229, 255, 0.12); border-color: rgba(0, 229, 255, 0.3);
  color: var(--d-accent-text);
}
body.theme-tech .wxpub-tab.on b { background: rgba(0, 229, 255, 0.16); color: var(--d-accent-text); }
body.theme-tech .wxpane-bar { border-bottom-color: var(--d-line); }
body.theme-tech .wx-hist-kw {
  background: var(--d-surface-solid); border-color: var(--d-line); color: var(--d-text-sub);
}

/* ==========================================================================
   公众号发布页 · B 版视觉（柔和渐变）
   2026-11-11 定稿：大圆角 + 彩色柔光底 + 胶囊页签 + 左侧状态色带 + 胶囊进度条。
   作用域一律带 #section-wxpublish，避免 .card / .link-card / .wxq-row 这类
   通名污染首页与其它模块页。深色（theme-tech）另起一套，见文件下方。
   ========================================================================== */
/* 页面底色：紫/蓝两层柔光，只在发布页生效（深色主题不套） */
/* ⚠️ 必须挂 html 前缀：wb-visual.css 的 body:not(.theme-tech).theme-meadow 同为 (0,2,1)
   且后加载，不提高一级就被它压掉 */
html body.page-promo:not(.theme-tech) {
  background:
    radial-gradient(1100px 420px at 12% -8%, #e9e4ff 0%, rgba(233, 228, 255, 0) 62%),
    radial-gradient(900px 380px at 96% 4%, #e2f6ff 0%, rgba(226, 246, 255, 0) 58%),
    #fbfaff;
}
#section-wxpublish.card,
#section-wxpublish .card {
  border-radius: 22px;
  border: 1px solid rgba(120, 108, 240, 0.14);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 44px -26px rgba(84, 70, 168, 0.42);
}
#section-wxpublish.card:hover,
#section-wxpublish .card:hover { box-shadow: 0 22px 52px -26px rgba(84, 70, 168, 0.45); }

/* 页签：灰底胶囊里嵌一颗白色药丸 */
#section-wxpublish .wxpub-tabbar { border-bottom: 0; }
#section-wxpublish .wxpub-tabs {
  background: rgba(108, 92, 231, 0.09);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
#section-wxpublish .wxpub-tab {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 6px 14px;
  color: #6b7392;
}
#section-wxpublish .wxpub-tab.on {
  background: #fff;
  color: #5b46d6;
  box-shadow: 0 3px 10px rgba(91, 70, 214, 0.18);
}
#section-wxpublish .wxpub-tab.on b { background: rgba(108, 92, 231, 0.14); color: #5b46d6; }

/* 数字卡：每种状态一层极浅渐变 + 圆角图标底 */
#section-wxpublish .wxpc {
  border-radius: 18px;
  border: 1px solid rgba(120, 108, 240, 0.12);
  box-shadow: 0 10px 26px -20px rgba(84, 70, 168, 0.55);
}
#section-wxpublish .wxpc.kpi::before { display: none; }
#section-wxpublish .wxpc.kpi.today { background: linear-gradient(158deg, #f1edff 0%, #ffffff 64%); }
#section-wxpublish .wxpc.kpi.ok { background: linear-gradient(158deg, #e9fbf2 0%, #ffffff 64%); }
#section-wxpublish .wxpc.kpi.wait { background: linear-gradient(158deg, #fff5e6 0%, #ffffff 64%); }
#section-wxpublish .wxpc.kpi.bad { background: linear-gradient(158deg, #ffeded 0%, #ffffff 64%); }
#section-wxpublish .wxpc:hover { transform: translateY(-3px); }
#section-wxpublish .wxpc-ico {
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 12px;
}
#section-wxpublish .wxpc.kpi.today .wxpc-ico { background: rgba(108, 92, 231, 0.14); }
#section-wxpublish .wxpc.kpi.ok .wxpc-ico { background: rgba(22, 163, 74, 0.14); }
#section-wxpublish .wxpc.kpi.wait .wxpc-ico { background: rgba(217, 119, 6, 0.14); }
#section-wxpublish .wxpc.kpi.bad .wxpc-ico { background: rgba(220, 38, 38, 0.14); }
#section-wxpublish .wxpc-v { font-size: 29px; font-weight: 800; letter-spacing: -0.02em; }
#section-wxpublish .wxpc.kpi.today .wxpc-v { color: #5b46d6; }
#section-wxpublish .wxpc.kpi.ok .wxpc-v { color: #0f9d63; }
#section-wxpublish .wxpc.kpi.wait .wxpc-v { color: #d9820a; }
#section-wxpublish .wxpc.kpi.bad .wxpc-v { color: #e0453e; }
#section-wxpublish .wxpc-k { color: #7a8299; font-weight: 600; }

/* 号卡：左侧竖色带（失败自动红）+ 胶囊百分比 + 双色渐变进度条 */
#section-wxpublish .wxpc.acc { background: #fff; border-radius: 16px; padding-left: 15px; }
#section-wxpublish .wxpc.acc::before {
  display: block;
  left: 0; right: auto; top: 0; bottom: 0;
  width: 4px; height: auto; border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, #a99bff, #6c5ce7);
}
#section-wxpublish .wxpc.acc.hasbad::before { background: linear-gradient(180deg, #ff9a9a, #e0453e); }
#section-wxpublish .wxpc-pct {
  background: rgba(108, 92, 231, 0.1);
  color: #5b46d6;
  border-radius: 999px;
  padding: 1px 7px;
}
#section-wxpublish .wxpc-num { font-size: 22px; font-weight: 800; }
#section-wxpublish .wxpc-track { height: 6px; border-radius: 999px; background: #eff0f6; }
#section-wxpublish .wxpc-fill { border-radius: 999px; background: linear-gradient(90deg, #8b7bff, #6c5ce7); }
#section-wxpublish .wxpc-fill.bad { background: linear-gradient(90deg, #ffa8a8, #e0453e); }
#section-wxpublish .wxpc-dot { width: 8px; height: 8px; box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12); }
#section-wxpublish .wxpc-dot.ok { background: #12b76a; box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.14); }
#section-wxpublish .wxpc-dot.bad { background: #f04438; box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.16); }

/* 模块卡 / 队列行 / 配置入口 */
#section-wxpublish .wxmod { border-radius: 16px; background: rgba(255, 255, 255, 0.7); }
#section-wxpublish .wxmod-head { background: rgba(108, 92, 231, 0.07); }
#section-wxpublish .wxmod-head .wxpub-tabs { background: rgba(108, 92, 231, 0.1); }
#section-wxpublish .wxq-row {
  border-radius: 10px;
  border-color: rgba(120, 108, 240, 0.1);
  background: rgba(255, 255, 255, 0.7);
}
#section-wxpublish .wxq-row:hover { background: #fff; box-shadow: 0 6px 16px -10px rgba(84, 70, 168, 0.4); }
#section-wxpublish .wxq-row.sent { background: rgba(18, 183, 106, 0.06); }
#section-wxpublish .wxq-row.skip { background: rgba(217, 119, 6, 0.06); }
#section-wxpublish .link-card { border-radius: 14px; box-shadow: 0 8px 20px -16px rgba(84, 70, 168, 0.5); }
#section-wxpublish .link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 108, 240, 0.4);
}
#section-wxpublish .wxpc-scroll.more::after {
  background: linear-gradient(180deg, rgba(251, 250, 255, 0), #fbfaff);
}

/* ---- B 版深色配套：形状语言照旧，配色退回 --d-* 令牌，
        渐变白卡一律换成深色玻璃，否则深色主题下会闪一块白 ---- */
body.theme-tech #section-wxpublish.card,
body.theme-tech #section-wxpublish .card {
  background: var(--d-surface-solid);
  border-color: var(--d-line);
  box-shadow: none;
}
body.theme-tech #section-wxpublish .wxpub-tabs { background: rgba(255, 255, 255, 0.06); }
body.theme-tech #section-wxpublish .wxpub-tab { color: var(--d-text-sub); }
body.theme-tech #section-wxpublish .wxpub-tab.on {
  background: rgba(0, 229, 255, 0.12);
  color: var(--d-accent-text);
  box-shadow: none;
}
body.theme-tech #section-wxpublish .wxpub-tab.on b {
  background: rgba(0, 229, 255, 0.16); color: var(--d-accent-text);
}
body.theme-tech #section-wxpublish .wxpc {
  background: var(--glass-bg-3);
  border-color: var(--d-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
body.theme-tech #section-wxpublish .wxpc.kpi.today,
body.theme-tech #section-wxpublish .wxpc.kpi.ok,
body.theme-tech #section-wxpublish .wxpc.kpi.wait,
body.theme-tech #section-wxpublish .wxpc.kpi.bad { background: var(--glass-bg-3); }
body.theme-tech #section-wxpublish .wxpc:not(.kpi)::before {
  background: linear-gradient(180deg, var(--d-accent-text), rgba(0, 229, 255, 0.15));
}
body.theme-tech #section-wxpublish .wxpc.acc { background: var(--glass-bg-3); }
body.theme-tech #section-wxpublish .wxpc.hasbad:not(.kpi)::before {
  background: linear-gradient(180deg, var(--d-danger), rgba(255, 143, 143, 0.15));
}
body.theme-tech #section-wxpublish .wxpc-ico { background: rgba(255, 255, 255, 0.07) !important; }
body.theme-tech #section-wxpublish .wxpc-k,
body.theme-tech #section-wxpublish .wxpc-sub { color: var(--d-text-sub); }
body.theme-tech #section-wxpublish .wxpc-v,
body.theme-tech #section-wxpublish .wxpc-num,
body.theme-tech #section-wxpublish .wxpc-name { color: var(--d-text); }
body.theme-tech #section-wxpublish .wxpc.kpi.today .wxpc-v { color: var(--d-accent-text); }
body.theme-tech #section-wxpublish .wxpc.kpi.ok .wxpc-v { color: var(--d-ok); }
body.theme-tech #section-wxpublish .wxpc.kpi.wait .wxpc-v { color: var(--d-warn); }
body.theme-tech #section-wxpublish .wxpc.kpi.bad .wxpc-v { color: var(--d-danger); }
body.theme-tech #section-wxpublish .wxpc.kpi.zero .wxpc-v { color: var(--d-text-sub); }
body.theme-tech #section-wxpublish .wxpc-pct {
  background: rgba(0, 229, 255, 0.1); color: var(--d-accent-text);
}
body.theme-tech #section-wxpublish .wxpc-track { background: rgba(255, 255, 255, 0.1); }
body.theme-tech #section-wxpublish .wxpc-fill {
  background: linear-gradient(90deg, var(--d-accent-text), #4c8dff);
}
body.theme-tech #section-wxpublish .wxpc-fill.bad {
  background: linear-gradient(90deg, #ff9a9a, var(--d-danger));
}
body.theme-tech #section-wxpublish .wxmod { background: rgba(255, 255, 255, 0.03); }
body.theme-tech #section-wxpublish .wxmod-head { background: rgba(255, 255, 255, 0.04); }
body.theme-tech #section-wxpublish .wxq-row {
  background: rgba(255, 255, 255, 0.03); border-color: var(--d-line);
}
body.theme-tech #section-wxpublish .wxq-row:hover { background: rgba(255, 255, 255, 0.06); }
body.theme-tech #section-wxpublish .wxq-row.sent { background: rgba(61, 255, 176, 0.06); }
body.theme-tech #section-wxpublish .wxq-row.skip { background: rgba(255, 200, 97, 0.06); }
body.theme-tech #section-wxpublish .link-card { background: rgba(255, 255, 255, 0.04); }
body.theme-tech #section-wxpublish .wxpc-scroll.more::after {
  background: linear-gradient(180deg, rgba(13, 21, 36, 0), var(--d-surface-solid));
}

/* ---- 配置入口：五张大卡（图标 + 名称 + 一句现状）----
   跟今日计划的数字小卡同一套语言；副标题数字由 _renderSetCards() 填 */
#section-wxpublish .wxset-bar.main-links-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
#section-wxpublish .wxset-card {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  min-height: 92px; padding: 12px 13px 11px; gap: 0;
  border-radius: 14px; background: #fff;
  border: 1px solid rgba(120, 108, 240, 0.14);
  box-shadow: 0 8px 20px -16px rgba(84, 70, 168, 0.5);
  text-align: left;
}
#section-wxpublish .wxset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 108, 240, 0.4);
}
#section-wxpublish .wxset-card.on {
  border-color: rgba(108, 92, 231, 0.55);
  background: rgba(108, 92, 231, 0.06);
}
#section-wxpublish .wxset-top { display: flex; align-items: center; }
#section-wxpublish .wxset-card .link-icon {
  width: 30px; height: 30px; border-radius: 10px;
  background: rgba(108, 92, 231, 0.1); color: #5b46d6;
}
#section-wxpublish .wxset-card .link-icon svg { width: 17px; height: 17px; }
#section-wxpublish .wxset-go {
  margin-left: auto; font-size: 15px; line-height: 1; color: #b9bfd2;
  transition: transform 0.2s ease;
}
#section-wxpublish .wxset-card.on .wxset-go { transform: rotate(90deg); color: #5b46d6; }
#section-wxpublish .wxset-name {
  margin-top: 9px; font-size: 13px; font-weight: 700; color: var(--text-primary);
}
#section-wxpublish .wxset-sub {
  margin-top: 3px; font-size: 11px; color: #7a8299;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 1400px) {
  #section-wxpublish .wxset-bar.main-links-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  #section-wxpublish .wxset-bar.main-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  #section-wxpublish .wxset-bar.main-links-grid { grid-template-columns: minmax(0, 1fr); }
}
/* 深色 */
body.theme-tech #section-wxpublish .wxset-card {
  background: var(--glass-bg-3);
  border-color: var(--d-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
body.theme-tech #section-wxpublish .wxset-card:hover { border-color: rgba(0, 229, 255, 0.35); }
body.theme-tech #section-wxpublish .wxset-card.on {
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.08);
}
body.theme-tech #section-wxpublish .wxset-card .link-icon {
  background: rgba(0, 229, 255, 0.1); color: var(--d-accent-text);
}
body.theme-tech #section-wxpublish .wxset-go { color: var(--d-text-sub); }
body.theme-tech #section-wxpublish .wxset-card.on .wxset-go { color: var(--d-accent-text); }
body.theme-tech #section-wxpublish .wxset-name { color: var(--d-text); }
body.theme-tech #section-wxpublish .wxset-sub { color: var(--d-text-sub); }

/* ---- 右栏高度跟随左栏末行（配置入口大卡）底部 ----
   做法：右栏自己不参与撑高（子卡绝对定位铺满），行高就由左栏内容决定，
   右栏卡片 stretch 后底边自然与「标题模板」那一行齐平。
   内容超出就在 pane 内滚动，不会反过来把整个两栏区顶高。 */
.wxpub-layout { align-items: stretch; }
.wxpub-col-preview {
  align-self: stretch;
  position: relative;   /* 原 sticky：等高后 sticky 已无滚动余地，改为包含块 */
  top: auto;
  min-height: 0;
}
.wxpub-col-preview > .wxmod {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; min-height: 0;
}
.wxpub-col-preview > .wxmod > .wxmod-head { flex: 0 0 auto; }
.wxpub-col-preview > .wxmod > .wxmod-body {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
}
/* 队列 / 预览共用这块高度，谁显示谁吃掉剩余空间并内部滚动 */
.wxpub-col-preview .wxpub-pane {
  flex: 1 1 auto; min-height: 0;
  max-height: none;
  overflow-y: auto;
}
/* 窄屏单列：右栏落回左栏下方，恢复文档流与固定限高，否则高度会算成 0 */
@media (max-width: 1180px) {
  .wxpub-col-preview { position: static; }
  .wxpub-col-preview > .wxmod {
    position: static; inset: auto; display: block;
  }
  .wxpub-col-preview > .wxmod > .wxmod-body { display: block; }
  .wxpub-col-preview .wxpub-pane { flex: none; max-height: 420px; }
}

/* ================= 今日日报（卡内编号清单 + 底部回车输入） =================
   #section-dailyreport 锁 standard(288px)：列表 .dr-view 自己滚动，
   底部输入框与页脚 flex:none 不参与压缩；卡内不再有弹窗/多栏文本框。 */
.dr-today { flex:1; min-height:0; display:flex; flex-direction:column; gap:6px; padding:9px 12px 6px; overflow:hidden; }
.dr-head-actions { display:flex; gap:6px; align-items:center; flex:none; }

.dr-view { flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:3px; padding-right:2px; }
.dr-view::-webkit-scrollbar { width:4px; }
.dr-view::-webkit-scrollbar-thumb { background:var(--card-border); border-radius:4px; }

/* 空态 */
.dr-empty { flex:1; min-height:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; text-align:center; }
.dr-empty-ico { width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:17px; color:var(--accent); background:var(--accent-light); margin-bottom:2px; }
.dr-empty-t { font-size:13px; font-weight:600; color:var(--text-secondary); }
.dr-empty-s { font-size:11px; color:var(--text-muted); }

/* 编号条目：序号 / 内容 / 删除 */
.dr-item { display:flex; align-items:baseline; gap:7px; padding:3px 4px; border-radius:6px; font-size:12.5px; line-height:1.5; }
.dr-item:hover { background:var(--accent-light); }
.dr-no { flex:none; min-width:17px; font-weight:700; color:var(--accent); font-variant-numeric:tabular-nums; }
.dr-txt { flex:1; min-width:0; color:var(--text-primary); white-space:pre-wrap; word-break:break-word; }
.dr-del { flex:none; border:0; background:transparent; cursor:pointer; font-size:14px; line-height:1; padding:0 3px; color:var(--text-muted); opacity:.35; }
.dr-item:hover .dr-del { opacity:1; }
.dr-del:hover { color:#e11d48; }

/* 底部输入行 */
.dr-input-row { flex:none; display:flex; align-items:center; gap:6px; }
.dr-input { flex:1; min-width:0; height:34px; box-sizing:border-box; padding:6px 10px; font-size:12.5px;
            font-family:inherit; color:var(--text-primary); background:var(--card-bg-solid);
            border:1px solid var(--card-border); border-radius:7px; }
.dr-input::placeholder { color:var(--text-muted); font-size:12px; }
.dr-input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-light); }
.dr-input-hint { flex:none; font-size:11px; color:var(--text-muted); white-space:nowrap; }

.dr-today-foot { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:11px; color:var(--text-muted); flex:none; padding-top:5px; border-top:1px solid var(--card-border); }
.dr-foot-left { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.dr-foot-sep { color:var(--text-muted); }
.dr-foot-tip { color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dr-state { font-size:11px; color:var(--text-muted); white-space:nowrap; }
.dr-state.is-saved { color:#16a34a; }

@media(max-width:760px){
  .dr-today { gap:4px; padding:8px 10px 6px; }
  .dr-item { font-size:12px; }
  .dr-input-hint { display:none; }
}

/* ========== 一排三栏：常用工作链接 / 待办 / 灵感（2026-11-18） ==========
   三张 .trio-card 各 span-4（4+4+4=12），data-h=standard 等高 288px。
   全部用新 class（trio-/tri-），不复用 .main-links-grid / .dash-ti-* ——
   那两套旧样式里带竖式大卡、纸牌绝对定位叠压、轮播等规则，复用会被高特异性命中。
   配色一律走主题变量，深/浅色自动适配。 */

/* 卡片内容区：吃掉 header 之外的高度并内滚（内容多也不撑破行高） */
#main .card.trio-card[data-h] > .trio-links,
#main .card.trio-card[data-h] > .tri-list {
  flex: 1 1 0; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 35, 48, 0.20) transparent;
}
/* 展开「+ 添加」表单时不被 flex 压没 */
#main .card.trio-card[data-h] > .link-add-form { flex: 0 0 auto; }

/* ---- 常用工作链接：一列纵向排布的「长方形小框」 ----
   复用 buildHtml 生成的 .link-card 结构，这里覆盖成横向紧凑小框：
   图标在左、名称在右单行省略，域名（窄卡放不下）隐藏。 */
.trio-links { display: flex; flex-direction: column; gap: 8px; }
.trio-links .link-card {
  flex: 0 0 auto;
  flex-direction: row; align-items: center; justify-content: flex-start; text-align: left;
  gap: 9px; padding: 8px 10px; min-height: 0;
  border-radius: 9px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm); backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: background .18s, border-color .18s, transform .18s;
}
.trio-links .link-card:hover {
  background: var(--card-bg-solid); border-color: var(--accent);
  transform: translateX(2px);
}
.trio-links .link-card .link-icon {
  flex: 0 0 auto; width: 30px; height: 30px; font-size: 16px;
  border-radius: 8px; background: var(--accent-light);
}
.trio-links .link-card .link-icon svg { width: 16px; height: 16px; }
.trio-links .link-card .link-info { flex: 1 1 auto; min-width: 0; text-align: left; }
.trio-links .link-card .link-name {
  font-size: 12.5px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; -webkit-line-clamp: unset;
}
.trio-links .link-card .link-url { display: none; }
.trio-links .link-card .link-del { flex: 0 0 auto; position: static; opacity: 0; padding: 3px 6px; font-size: 11px; }
.trio-links .link-card:hover .link-del { opacity: 1; }
.trio-links .main-links-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 16px 4px; }

/* ---- 待办 / 灵感：文字横条列表 ----
   一条一行，色点 + 标题（单行省略）+ 右侧副信息，底部分隔线；
   不再是纸牌层叠、不再旋转、不再轮播。 */
.tri-list { display: flex; flex-direction: column; }
.tri-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 8px; min-width: 0;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background .18s, opacity .3s ease, transform .3s ease;
}
.tri-row:last-child { border-bottom: none; }
.tri-row:hover { background: var(--accent-light); border-radius: 6px; }
.tri-pri { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #b6bcc5; }
.tri-pri.high { background: #e74c3c; }
.tri-pri.medium { background: #f39c12; }
.tri-pri.low { background: #b6bcc5; }
.tri-pri.idea { background: #b9880f; }
.tri-title {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tri-sub {
  flex: 0 1 auto; max-width: 38%; font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tri-empty { padding: 18px 4px; text-align: center; font-size: 12px; color: var(--text-muted); }
/* 点击完成 / 移入废纸篓：向右淡出收起（配合 wb.js _fly 的 520ms 后重绘） */
.tri-row.fly-out { opacity: 0; transform: translateX(26px); }

/* 待办 / 灵感卡底部快加输入行（2026-11-20）：复用 .dr-input / .dr-input-hint，
   固定在卡底不参与列表内滚（.tri-list 已 flex:1 吃掉剩余高度） */
.tri-input-row { flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
                 padding-top: 8px; border-top: 1px solid var(--card-border); }
.tri-input-row .dr-input { height: 32px; }

/* 标题右侧计数徽章 */
.tri-count {
  flex: 0 0 auto; min-width: 18px; padding: 0 5px; border-radius: 9px;
  background: rgba(31, 38, 135, 0.08); color: var(--text-secondary);
  font-size: 11px; font-weight: 600; text-align: center; line-height: 18px;
}
body.theme-tech .tri-count { background: var(--d-accent-soft); color: var(--d-accent-text-2); }
body.theme-tech .tri-row:hover { background: var(--d-accent-soft-4); }

/* 769~1100：站内通用规则会把 .span-4 升成 6 列（三卡变两行）。
   这三张卡的内容都是「一行一条文字」，窄一点也放得下，这里保住一行三栏，
   同时隐掉横条右侧的副信息腾出空间；≤768 仍由整行规则兜底。 */
@media (min-width: 769px) and (max-width: 1100px) {
  #main > .card.trio-card { grid-column: span 4; }
  #main > .card.trio-card .tri-sub { display: none; }
  #main > .card.trio-card .trio-links .link-name { font-size: 12px; }
  /* 窄区间把输入框右侧的回车提示也隐掉，避免挤压输入区 */
  #main > .card.trio-card .tri-input-row .dr-input-hint { display: none; }
}
