/* TradeHub · Shopify 风格设计系统 */
:root {
  --sh-green: #008060;
  --sh-green-dark: #004c3f;
  --sh-green-bg: #e3f1df;
  --sh-bg: #f6f6f7;
  --sh-surface: #ffffff;
  --sh-border: #e1e3e5;
  --sh-border-strong: #c9cccf;
  --sh-text: #202223;
  --sh-text-2: #6d7175;
  --sh-text-3: #8c9196;
  --sh-topbar: #202223;
  --sh-blue: #2c6ecb;
  --sh-blue-bg: #e5eff9;
  --sh-red: #d72c0d;
  --sh-red-bg: #fff4f4;
  --sh-amber: #8a6116;
  --sh-amber-bg: #fff5e0;
  --sh-radius: 8px;
  --sh-radius-sm: 6px;
  --sh-shadow: 0 0 0 1px rgba(0,0,0,0.02), 0 1px 0 rgba(0,0,0,0.05);
  /* U1：语义色统一（app.js 内联替换用） */
  --cl-primary: #6366F1;
  --cl-primary-2: #8B5CF6;
  --cl-success: #10B981;
  --cl-warning: #F59E0B;
  --cl-amber: #F59E0B;
  --cl-danger: #EF4444;
  --cl-danger-dark: #DC2626;
  --cl-info: #1877F2;
  --cl-instagram: #E1306C;
  --cl-youtube: #FF0000;
  --cl-violet: #8B5CF6;
  --cl-facebook: #1877F2;
  --cl-google: #EA4335;
  --cl-ink: #30363D;
  /* U2：中性色 + 文字层级 */
  --cl-text: #1F2937;
  --cl-text-2: #6B7280;
  --cl-text-3: #9CA3AF;
  --cl-bg: #F6F6F7;
  --cl-bg-elevated: #FAFAFA;
  --cl-border: #E5E7EB;
  --cl-border-strong: #D1D5DB;
  --cl-primary-dark: #4F46E5;
  --cl-primary-bg: rgba(99,102,241,0.10);
  --cl-primary-bg-strong: rgba(99,102,241,0.16);
  --cl-grad: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2));
  /* U2：字体体系 */
  --ff-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --ff-display: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  --ff-mono: 'SF Mono', 'Cascadia Code', Consolas, 'Courier New', monospace;
  /* U3：数字字体（金额/订单号/统计卡——等宽对齐） */
  --ff-num: 'SF Mono', 'Cascadia Code', 'Roboto Mono', Consolas, 'Microsoft YaHei', monospace;
  /* U2：字号阶梯（10 档） */
  --fs-2xs: 10px; --fs-xs: 11px; --fs-sm: 12px; --fs-base: 13px; --fs-md: 14px;
  --fs-lg: 15px; --fs-xl: 16px; --fs-2xl: 20px; --fs-3xl: 24px; --fs-display: 30px;
  /* U2：字重 */
  --fw-normal: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
  /* U2：行高 */
  --lh-tight: 1.3; --lh-base: 1.5; --lh-loose: 1.7;
  /* U2：间距（4 栅格） */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  /* U2：圆角 */
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 9999px;
  /* U2：阴影 */
  --sh-xs: 0 1px 2px rgba(0,0,0,0.04);
  --sh-sm: 0 2px 6px rgba(0,0,0,0.06);
  --sh-md: 0 4px 16px rgba(0,0,0,0.08);
  --sh-lg: 0 8px 32px rgba(0,0,0,0.12);
  --sh-focus: 0 0 0 3px rgba(99,102,241,0.18);
  /* U3：hover 抬升阴影（卡片） */
  --sh-lift: 0 2px 4px rgba(0,0,0,0.05), 0 10px 28px rgba(0,0,0,0.10);
  /* U2：过渡 */
  --tr-fast: 120ms ease; --tr-base: 200ms ease; --tr-slow: 320ms ease;
  /* U3：缓动曲线（动效规范） */
  --ease-std: cubic-bezier(0.25, 0.1, 0.25, 1);          /* 通用过渡 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);             /* 入场/卡片抬升 */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);      /* 弹层/徽标（轻微回弹） */
  /* U3：动效开关（跟随系统减动效） */
  --th-motion: 1;
  --sh-font: var(--ff-base);
  /* 旧变量兼容 */
  --muted: #6d7175;
  --border: #e1e3e5;
  --primary: #008060;
  --success: #008060;
  --warning: #b98900;
}
/* U3：减动效适配（系统开启"减少动态效果"时关闭装饰动画） */
@media (prefers-reduced-motion: reduce) {
  :root { --th-motion: 0; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 深色主题（S1：设置里可切换） */
[data-theme="dark"] {
  --sh-green: var(--cl-success);
  --sh-green-dark: #6fe3b0;
  --sh-green-bg: rgba(61, 220, 151, 0.12);
  --sh-bg: #0f1115;
  --sh-surface: #171a21;
  --sh-border: #2a2e37;
  --sh-border-strong: #3a3f4a;
  --sh-text: #e8eaed;
  --sh-text-2: #9aa0a6;
  --sh-text-3: #6b7280;
  --sh-topbar: #171a21;
  --sh-blue: #5b8def;
  --sh-blue-bg: rgba(91, 141, 239, 0.12);
  --sh-red: #f28b82;
  --sh-red-bg: rgba(242, 139, 130, 0.12);
  --sh-amber: #fdd663;
  --sh-amber-bg: rgba(253, 214, 99, 0.12);
  --sh-shadow: 0 1px 2px rgba(0,0,0,0.4);
  --muted: #9aa0a6;
  --border: #2a2e37;
  --primary: var(--cl-success);
  --success: var(--cl-success);
  --warning: #fdd663;
  /* U2：暗色 token 覆盖 */
  --cl-text: #E6EDF3;
  --cl-text-2: #9CA3AF;
  --cl-text-3: #6B7280;
  --cl-bg: #0F1115;
  --cl-bg-elevated: #161B22;
  --cl-border: #2A2E37;
  --cl-border-strong: #3A3F4A;
  --cl-primary: #818CF8;
  --cl-primary-dark: #A5B4FC;
  --cl-primary-bg: rgba(99,102,241,0.16);
  --cl-primary-bg-strong: rgba(99,102,241,0.24);
  --cl-grad: linear-gradient(135deg, #818CF8, #A78BFA);
  --sh-xs: 0 1px 2px rgba(0,0,0,0.5);
  --sh-sm: 0 2px 8px rgba(0,0,0,0.45);
  --sh-md: 0 4px 18px rgba(0,0,0,0.5);
  --sh-lg: 0 8px 36px rgba(0,0,0,0.6);
  --sh-focus: 0 0 0 3px rgba(129,140,248,0.25);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { font-family: var(--ff-base); font-size: var(--fs-md); color: var(--sh-text); background: var(--sh-bg); line-height: var(--lh-base); }
h1, h2, h3, h4, h5, h6 { font-family: var(--ff-display); font-weight: var(--fw-semibold); line-height: var(--lh-tight); color: var(--sh-text); }
button, input, textarea, select { font-family: inherit; }
.hidden { display: none !important; }
a { color: var(--cl-primary); text-decoration: none; transition: color var(--tr-fast); }
a:hover { text-decoration: underline; }
.text-muted { color: var(--sh-text-2); font-size: var(--fs-sm); }
.content-preview { color: var(--sh-text-2); font-size: var(--fs-base); }

/* ===== 登录页（Shopify 风格） ===== */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(1200px 600px at 20% -10%, var(--cl-primary) 0%, transparent 55%), radial-gradient(1000px 500px at 110% 110%, var(--cl-success) 0%, transparent 50%), var(--sh-bg); }
.auth-card { width: 100%; max-width: 420px; padding: 0 20px; text-align: center; }
.auth-logo { width: 52px; height: 52px; border-radius: 12px; background: linear-gradient(135deg, var(--cl-primary), var(--cl-violet)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; margin-bottom: 14px; box-shadow: 0 6px 20px rgba(99,102,241,.35); }
.auth-card h1 { font-size: 21px; font-weight: 600; margin-bottom: 4px; }
.auth-sub { color: var(--sh-text-2); margin-bottom: 22px; }
.auth-box { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 12px; padding: 24px; box-shadow: var(--sh-shadow); text-align: left; }
.auth-box label { display: block; font-size: 13px; font-weight: 500; margin: 12px 0 6px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 4px; }
.tab-btn { flex: 1; padding: 8px; background: transparent; border: 1px solid var(--sh-border-strong); border-radius: var(--r-md); cursor: pointer; font-size: var(--fs-base); color: var(--sh-text-2); font-family: inherit; transition: all var(--tr-fast); }
.tab-btn.active { background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-dark)); border-color: var(--cl-primary); color: #fff; font-weight: var(--fw-medium); }
.auth-hint { margin-top: 18px; font-size: 12px; color: var(--sh-text-3); line-height: 1.6; }
.msg { min-height: 18px; font-size: 13px; color: var(--sh-red); margin-top: 10px; }
.platform-link { margin-top: 14px; font-size: 12px; color: var(--sh-text-3); }
.platform-link a { color: var(--sh-blue); }

/* ===== 顶栏 + 布局 ===== */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.app-body { display: flex; flex: 1; min-height: 0; }
/* S9：侧栏品牌区（顶栏移除后） */
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 12px 12px 14px; border-bottom: 1px solid var(--sh-border); margin: 0 -2px 8px; }
.sb-logo { width: 28px; height: 28px; border-radius: 8px; background: var(--cl-grad); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 8px rgba(99,102,241,0.35); }
.sb-text { line-height: 1.25; min-width: 0; }
.sb-name { font-size: 14.5px; font-weight: 600; color: var(--sh-text); letter-spacing: 0.2px; }
.sb-ver { font-size: 11px; color: var(--sh-text-3); margin-top: 1px; }
.sidebar { width: 232px; background: var(--sh-surface); border-right: 1px solid var(--sh-border); padding: 10px 10px 14px; overflow-y: auto; flex-shrink: 0; display: flex; flex-direction: column; }
/* UX P0：移动端汉堡 + 抽屉 */
.sb-hamburger { display: none; position: fixed; top: 10px; left: 10px; z-index: 60; width: 38px; height: 38px; border: 1px solid var(--sh-border); border-radius: 8px; background: var(--sh-surface); color: var(--sh-text); font-size: 17px; cursor: pointer; }
.sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 49; }
/* UX P0：页面切换加载态 */
.page-loading { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; background: transparent; pointer-events: none; }
.page-loading .pl-spinner { position: absolute; top: 0; left: 0; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, var(--cl-primary), transparent); animation: pl-slide 1.1s ease-in-out infinite; border-radius: 0 3px 3px 0; }
@keyframes pl-slide { 0% { left: -40%; } 100% { left: 100%; } }
.page-loading .pl-text { display: none; }
.page-loading.hidden { display: none; }
body.sb-open .sb-overlay { display: block; }
body.sb-open .sidebar { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.2); }
@media (max-width: 860px) {
  .sb-hamburger { display: flex; align-items: center; justify-content: center; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; transform: translateX(-100%); transition: transform 0.25s ease; }
  .app-body > .page-wrap, .app-body > .page, .app-body > .content { margin-left: 0 !important; }
}
/* UX P1：无障碍——键盘焦点可见样式 */
.nav-item:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--cl-primary);
  outline-offset: 1px;
}
/* UX P2：刷新感知角标 */
.refresh-tag { font-size: 11px; color: var(--sh-text-3); margin-left: 8px; }
.sidebar-nav { flex: 1; }
/* UX P2：每日 AI 行动清单 */
.da-card { margin: 10px 14px 6px; padding: 12px 14px; background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 10px; }
.da-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; cursor: pointer; user-select: none; }
.da-card.collapsed .da-head { margin-bottom: 0; }
.da-card.collapsed .da-actions { display: none; }
.da-arrow { font-size: 12px; color: var(--sh-text-3); flex-shrink: 0; }
.da-title { font-weight: 600; font-size: 13.5px; }
.da-badge { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: var(--sh-border); color: var(--sh-text-2); flex-shrink: 0; }
.da-badge-warn { background: rgba(239, 68, 68, .14); color: #EF4444; }
.da-date { font-size: 11.5px; color: var(--sh-text-3); flex: 1; }
.da-refresh { border: 0; background: none; color: var(--sh-text-3); cursor: pointer; font-size: 14px; }
.da-refresh:hover { color: var(--cl-primary); }
.da-actions { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.da-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--sh-border); border-radius: 8px; background: var(--sh-bg); }
.da-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.da-high .da-dot { background: var(--cl-red); }
.da-medium .da-dot { background: var(--cl-amber); }
.da-low .da-dot { background: var(--cl-teal); }
.da-body { flex: 1; min-width: 0; }
.da-t { font-size: 13px; font-weight: 500; }
.da-prio { font-size: 10.5px; padding: 1px 6px; border-radius: 8px; margin-right: 6px; background: var(--sh-border); color: var(--sh-text-2); }
.da-d { font-size: 12px; color: var(--sh-text-3); margin-top: 2px; }
.da-go { flex-shrink: 0; }
/* UX P2：任务耗时 */
.cm-elapsed { font-size: 11.5px; color: var(--sh-text-3); margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--sh-border); }
/* S14：回复收藏 */
.cm-actions { margin-top: 8px; display: flex; gap: 8px; }
.cm-save { border: 1px solid var(--sh-border); background: none; color: var(--sh-text-2); font-size: 12px; padding: 4px 10px; border-radius: 6px; cursor: pointer; transition: all var(--tr-fast); }
.cm-save:hover { border-color: var(--cl-primary); color: var(--cl-primary); background: var(--cl-primary-bg); }
.cm-save:disabled { opacity: 0.6; cursor: default; }
/* S14：kb 拖拽上传 + 问答历史 */
.kb-dropzone { border: 1.5px dashed var(--sh-border-strong); border-radius: 10px; padding: 18px 12px; text-align: center; font-size: 13px; color: var(--sh-text-2); transition: all var(--tr-fast); }
.kb-dropzone.kb-dz-over { border-color: var(--cl-primary); background: var(--cl-primary-bg); }
#kb-history { margin-top: 6px; max-height: 200px; overflow-y: auto; }
.kb-hist-item { padding: 7px 9px; border-bottom: 1px solid var(--sh-border); }
.kb-hist-q { font-size: 13px; cursor: pointer; color: var(--cl-primary); }
.kb-hist-q:hover { text-decoration: underline; }
.kb-hist-a { font-size: 11.5px; color: var(--sh-text-3); margin-top: 2px; }
.nav-group-label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--sh-text-3); padding: var(--sp-4) var(--sp-3) var(--sp-1); }
.nav-group-toggle { cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3); border-radius: var(--r-md); transition: color var(--tr-fast), background var(--tr-fast); }
.nav-group-toggle:hover { color: var(--cl-primary); background: var(--cl-primary-bg); }
.ng-arrow { font-size: 10px; color: var(--sh-text-3); transition: transform var(--tr-fast); }
.nav-group-toggle.open .ng-arrow { transform: rotate(90deg); }
.nav-group-items { overflow: hidden; max-height: 0; opacity: 0; transition: max-height var(--tr-md) ease, opacity var(--tr-md) ease; }
.nav-group-items.open { max-height: 480px; opacity: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; background: none; border: none; border-radius: var(--r-md); font-size: var(--fs-md); color: var(--sh-text); cursor: pointer; text-align: left; position: relative; font-family: inherit; transition: background var(--tr-fast), color var(--tr-fast), transform var(--tr-fast); }
.nav-item:hover { background: var(--cl-primary-bg); color: var(--cl-primary); transform: translateX(1px); }
.nav-item.active { background: var(--cl-primary-bg); color: var(--cl-primary); font-weight: var(--fw-semibold); }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: linear-gradient(180deg, var(--cl-primary), var(--cl-violet)); }
.nav-item.active .nav-ico { opacity: 1; }
/* U3.1：子菜单字号与一级统一（层级靠缩进区分，不靠字号） */
.nav-item.nav-sub .nav-text { font-size: var(--fs-md); }
.nav-ico { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.65; transition: opacity var(--tr-fast); }
.nav-item:hover .nav-ico { opacity: 1; }
.sidebar-foot { border-top: 1px solid var(--sh-border); padding: 14px 12px 4px; margin-top: 12px; }
.sidebar-foot .user-email { display: block; color: var(--sh-text-2); font-size: 13px; margin-bottom: 10px; }

/* ===== 底部用户菜单（向上展开，WorkBuddy 风格） ===== */
.user-menu { position: relative; }
.user-menu-trigger { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.user-menu-trigger:hover { background: var(--sh-hover, rgba(128,128,128,.08)); }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,var(--cl-primary),var(--cl-primary-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.user-menu-info { flex: 1; min-width: 0; }
.user-menu-name { font-size: 13px; font-weight: 600; color: var(--sh-text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-role { font-size: 11px; color: var(--sh-text-3); margin-top: 1px; }
.user-menu-arrow { color: var(--sh-text-3); font-size: 11px; transition: transform .2s; }
.user-menu-panel { position: fixed; width: 260px; background: var(--sh-surface, #1c2128); border: 1px solid var(--sh-border); border-radius: 12px; padding: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.35); z-index: 500; animation: menuPop .18s ease; }
@keyframes menuPop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
/* U3：弹层入场（scale + fade） */
@keyframes thPopIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
/* U3：Toast 顶部滑入 */
@keyframes thToastIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
/* U3：内容区页面切换 */
@keyframes thPageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
/* S9：页面切换淡入（平滑美观核心） */
.page { animation: thPageIn 240ms var(--ease-out); }
/* U3：骨架屏扫光 */
@keyframes thShimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
/* U3：询盘红点呼吸 */
@keyframes thPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.9); } }
/* U3：统计数字淡入 */
@keyframes thCountUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.user-panel-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--sh-border); margin-bottom: 6px; }
.user-panel-name { font-size: 14px; font-weight: 700; color: var(--sh-text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-panel-email { font-size: 11px; color: var(--sh-text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-panel-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--sh-text-2); transition: background .12s; white-space: nowrap; }
.user-panel-item > span:not(.upi-ico):not(.upi-tag):not(.upi-val) { flex: 1; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.user-panel-item:hover { background: var(--sh-hover, rgba(128,128,128,.1)); color: var(--sh-text-1); }
.upi-ico { width: 18px; text-align: center; flex-shrink: 0; }
.upi-tag { margin-left: auto; font-size: 10px; color: var(--sh-text-3); border: 1px solid var(--sh-border); border-radius: 4px; padding: 1px 5px; white-space: nowrap; flex-shrink: 0; }
.upi-val { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--cl-primary); white-space: nowrap; flex-shrink: 0; }
/* S11：外观主题切换 pill */
.user-panel-theme { cursor: default; }
.theme-pills { margin-left: auto; display: inline-flex; gap: 4px; background: var(--sh-bg); border: 1px solid var(--sh-border); border-radius: 8px; padding: 2px; }
.theme-pill { border: none; background: none; font-size: 12px; color: var(--sh-text-2); padding: 4px 10px; border-radius: 6px; cursor: pointer; transition: all var(--tr-fast); font-family: inherit; }
.theme-pill:hover { color: var(--sh-text); }
.theme-pill.active { background: var(--cl-primary); color: #fff; font-weight: 600; }
.user-panel-sep { height: 1px; background: var(--sh-border); margin: 6px 10px; }
.user-panel-logout { color: var(--cl-danger); }
.user-panel-logout:hover { background: rgba(239,68,68,.08); color: var(--cl-danger); }
.content { flex: 1; padding: 24px 32px; overflow-y: auto; min-width: 0; }

/* ===== 页面与卡片 ===== */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); gap: 12px; flex-wrap: wrap; }
.page-head h2 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: -0.01em; }
.head-actions { display: flex; gap: 10px; align-items: center; }
.greeting { font-size: var(--fs-3xl); font-weight: var(--fw-bold); margin-bottom: 4px; letter-spacing: -0.02em; }
.page-sub { color: var(--sh-text-2); margin-bottom: var(--sp-5); font-size: var(--fs-base); }
.panel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .panel-row { grid-template-columns: 1fr; } }
.card, .panel { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); padding: var(--sp-5); margin-bottom: var(--sp-4); transition: box-shadow var(--tr-fast), transform var(--tr-fast); }
.card:hover, .panel:hover { box-shadow: var(--sh-lift); }
.card h3, .panel h3 { font-size: var(--fs-md); font-weight: var(--fw-semibold); margin-bottom: var(--sp-3); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); padding: 16px 20px; transition: box-shadow var(--tr-fast), transform var(--tr-fast); }
.metric-card:hover { box-shadow: var(--sh-lift); transform: translateY(-2px); }
.metric-card .label { font-size: var(--fs-sm); color: var(--sh-text-2); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.metric-card .value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-family: var(--ff-num); }
.metric-card .sub { font-size: var(--fs-sm); color: var(--sh-text-3); margin-top: 4px; }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--r-md); font-size: var(--fs-md); font-weight: var(--fw-medium); padding: 8px 16px; cursor: pointer; border: 1px solid transparent; transition: background var(--tr-fast), box-shadow var(--tr-fast), transform 80ms var(--ease-std); font-family: inherit; line-height: 1.2; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-dark)); color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.btn-primary:hover { background: linear-gradient(135deg, #5557E8, var(--cl-primary-dark)); box-shadow: 0 4px 14px rgba(99,102,241,0.4); transform: translateY(-1px); }
.btn-secondary, .btn-ghost { background: var(--sh-surface); border-color: var(--sh-border-strong); color: var(--sh-text); }
.btn-secondary:hover, .btn-ghost:hover { background: var(--sh-bg); }
.btn-plain { background: none; color: var(--cl-primary); padding: 6px 10px; }
.btn-danger { background: var(--sh-red); color: #fff; }
.btn-danger:hover { background: #b32400; }
.btn-sm { padding: 5px 12px; font-size: var(--fs-base); }

/* ===== 表格 ===== */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--sh-text-2); padding: 10px 12px; border-bottom: 1px solid var(--sh-border); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--sh-border); font-size: 13px; vertical-align: middle; }
.table tbody tr:hover { background: var(--sh-bg); }
/* UX P1-4：表格组件增强（斑马纹/行 hover 反馈/表头 sticky） */
.table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--sh-bg) 55%, transparent); }
.table tbody tr { transition: background var(--tr-fast); }
.table tbody tr:hover { background: var(--cl-primary-bg); }
.table th { position: sticky; top: 0; background: var(--sh-surface); z-index: 2; }
.table .t-sort { cursor: pointer; user-select: none; }
.table .t-sort:hover { color: var(--cl-primary); }
.table .t-empty { text-align: center; padding: 28px 12px; color: var(--sh-text-3); font-size: 13px; }

/* ===== 徽标 ===== */
.badge, .tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge-green, .tag-positive, .tag-A { background: var(--sh-green-bg); color: var(--sh-green-dark); }
.badge-gray, .tag-low, .tag-B, .tag-C, .tag-JUNK { background: #eceeef; color: var(--sh-text-2); }
.badge-amber, .tag-warning, .tag-medium { background: var(--sh-amber-bg); color: var(--sh-amber); }
.badge-red, .tag-danger { background: var(--sh-red-bg); color: var(--sh-red); }
.badge-blue, .tag-info { background: var(--sh-blue-bg); color: var(--sh-blue); }
.status-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.status-active, .status-published, .status-running { background: var(--sh-green-bg); color: var(--sh-green-dark); }
.status-paused, .status-offline, .status-terminated { background: #eceeef; color: var(--sh-text-2); }
.status-draft, .status-pending_approval, .status-submitted, .status-in_review { background: var(--sh-amber-bg); color: var(--sh-amber); }
.status-rejected { background: var(--sh-red-bg); color: var(--sh-red); }

/* ===== 统计条 ===== */
.stat-strip { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-item { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); padding: 12px 20px; min-width: 118px; }
.stat-item .num { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.stat-item .lbl { font-size: 12px; color: var(--sh-text-2); margin-top: 2px; }

/* ===== 表单 ===== */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
  width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--sh-border-strong); border-radius: var(--r-md);
  font-size: var(--fs-md); font-family: inherit; color: var(--sh-text); background: var(--sh-surface); appearance: none;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}
input:focus, select:focus { outline: none; border-color: var(--cl-primary); box-shadow: var(--sh-focus); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236366F1' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
label { display: block; font-size: var(--fs-base); font-weight: var(--fw-medium); margin-bottom: 6px; }
.form-row { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* ===== 信息条 ===== */
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--sh-radius-sm); font-size: 13px; margin-bottom: 16px; }
.banner-info { background: var(--sh-blue-bg); color: var(--sh-blue); }
.banner-success { background: var(--sh-green-bg); color: var(--sh-green-dark); }
.banner-warning { background: var(--sh-amber-bg); color: var(--sh-amber); }

/* ===== 列表卡片 ===== */
.site-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--sh-border); }
.site-item:last-child { border-bottom: none; }
.site-item .sname { font-size: 14px; font-weight: 500; margin-right: 8px; }
.site-item .smeta { font-size: 12px; color: var(--sh-text-2); margin-top: 3px; }
.site-actions { display: flex; gap: 8px; flex-shrink: 0; }
.campaign-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.campaign-card { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); padding: 18px; }
.campaign-card .cname { font-size: 14px; font-weight: 500; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.campaign-card .meta { font-size: 12px; color: var(--sh-text-2); margin-bottom: 4px; }
.campaign-card .btn { margin-top: 10px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tpl-card { background: var(--sh-surface); border: 1.5px solid var(--sh-border); border-radius: var(--sh-radius); overflow: hidden; cursor: pointer; transition: border-color var(--tr-fast), box-shadow var(--tr-fast), transform var(--tr-fast); }
.tpl-card:hover { border-color: var(--cl-primary); box-shadow: var(--sh-lift); transform: translateY(-2px); }
.tpl-card.selected { border-color: var(--cl-primary); box-shadow: 0 0 0 2px var(--cl-primary-bg); }
.tpl-thumb { height: 64px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 500; color: #fff; }
.tpl-thumb-t1-minimal { background: #26303b; }
.tpl-thumb-t2-industrial { background: #1f2937; }
.tpl-thumb-t3-commercial { background: #b45309; }
.tpl-thumb-t4-smart { background: #4c1d95; }
.tpl-thumb-t5-factory { background: #14532d; }
.tpl-body { padding: 10px 12px; }
.tpl-body h4 { font-size: 13px; font-weight: 500; }
.tpl-body p { font-size: 12px; color: var(--sh-text-2); margin-top: 2px; }

/* ===== 渠道连接卡片 ===== */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.conn-card { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); padding: 18px; }
.conn-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.conn-name { font-size: 14px; font-weight: 500; }
.conn-desc { font-size: 12px; color: var(--sh-text-2); line-height: 1.6; }
.conn-meta { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sh-border); font-size: 12px; color: var(--sh-text-2); }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.conn-dot.on { background: var(--sh-green); }
.conn-dot.off { background: #b5b9bc; }

/* ===== 渠道 API 配置表单（T7.1） ===== */
.ch-logo { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; }
.ch-form { margin: 12px 0 4px; }
.ch-field { margin-bottom: 10px; }
.ch-field label { font-size: 12px; font-weight: 500; margin-bottom: 4px; color: var(--sh-text); }
.ch-field input { height: 34px; font-size: 13px; }
.ch-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ch-hint { margin-top: 10px; font-size: 11px; color: var(--sh-text-3); }
.ch-test { margin-top: 10px; padding: 8px 12px; border-radius: var(--sh-radius-sm); font-size: 12px; line-height: 1.5; }
.ch-test-ok { background: var(--sh-green-bg); color: var(--sh-green-dark); }
.ch-test-fail { background: var(--sh-red-bg); color: var(--sh-red); }
.ch-card { display: flex; flex-direction: column; }
.ch-card .ch-form { flex: 1; }
.ch-help-link { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--sh-border); font-size: 12px; }
.ch-help-link a { color: var(--sh-blue); }
.ch-help-link a:hover { text-decoration: underline; }
.conn-toast { margin-bottom: 12px; padding: 10px 16px; border-radius: 8px; font-size: 13px; }
.conn-toast.ok { background: var(--sh-green-bg); color: var(--sh-green-dark); border: 1px solid var(--sh-green); }
.conn-toast.fail { background: var(--sh-red-bg); color: var(--sh-red); border: 1px solid var(--sh-red); }

/* ===== 洞察/待办列表 ===== */
.insight-list, .todo-list { list-style: none; }
.insight-list li, .todo-list li { padding: 10px 0; border-bottom: 1px dashed var(--sh-border); font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.insight-list li:last-child, .todo-list li:last-child { border-bottom: none; }
.insight-list .tag, .todo-list .tag { flex-shrink: 0; margin-top: 1px; }

/* ===== 自动化 ===== */
.level-select { display: flex; gap: 8px; margin-bottom: 14px; }
.level-btn { flex: 1; padding: 10px; border: 1px solid var(--sh-border-strong); border-radius: var(--r-md); background: var(--sh-surface); cursor: pointer; font-size: var(--fs-base); font-family: inherit; color: var(--sh-text-2); transition: all var(--tr-fast); }
.level-btn.active { background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-dark)); border-color: var(--cl-primary); color: #fff; font-weight: var(--fw-medium); }
.level-desc { font-size: 13px; color: var(--sh-text-2); margin-bottom: 14px; }

/* ===== 广告管理控制台（T8.5 投放控制台，渠道由侧边栏子项切换） ===== */
.nav-item.nav-sub { padding-left: 12px; }
.nav-logo { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.nav-logo svg { display: block; }
/* U3.1：子菜单字号与一级统一（层级靠缩进区分，不靠字号） */
.nav-item.nav-sub .nav-text { font-size: var(--fs-md); }

.ads-account-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); padding: 14px 18px; margin-bottom: 16px; flex-wrap: wrap; }
.ads-account-l { display: flex; align-items: center; gap: 12px; }
.ads-account-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ads-table-wrap { overflow-x: auto; }
.ads-table th, .ads-table td { white-space: nowrap; }
.ads-name { font-size: 13px; font-weight: 500; }
.ads-sub { margin-top: 3px; font-size: 12px; }
.ads-live-banner { padding: 10px 18px; font-size: 12px; border-bottom: 1px solid var(--sh-border); }
.ads-live-banner.ok { background: var(--sh-green-bg); color: var(--sh-green-dark); }
.ads-live-banner.demo { background: var(--sh-amber-bg); color: var(--sh-amber); }
.ads-detail-inner { padding: 10px 18px 14px; background: var(--sh-bg); }

/* ===== T8.6 投放工作台（面包屑/操作栏/钻取/批量） ===== */
.ads-crumb { font-size: 13px; color: var(--sh-text-2); }
.ads-crumb-link { color: var(--sh-blue); cursor: pointer; }
.ads-crumb-link:hover { text-decoration: underline; }
.ads-crumb-sep { margin: 0 6px; color: #8c9196; }
.ads-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ads-batch-tip { font-size: 12px; color: var(--sh-blue); margin-left: 6px; }
.ads-batch-a { color: var(--sh-blue); cursor: pointer; text-decoration: underline; margin: 0 4px; }
.ads-drill { color: var(--sh-blue); cursor: pointer; font-weight: 500; }
.ads-drill:hover { text-decoration: underline; }
.ads-table input[type="checkbox"] { cursor: pointer; }
.ads-toast { margin-bottom: 10px; padding: 8px 14px; border-radius: 8px; font-size: 12px; }
.ads-toast.ok { background: var(--sh-green-bg); color: var(--sh-green-dark); border: 1px solid var(--sh-green); }
.ads-toast.warn { background: var(--sh-amber-bg); color: var(--sh-amber); border: 1px solid var(--sh-amber); }

/* T8.10 表格头部（标题 + 时间筛选，最右侧上方） */
.ads-table-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--sh-border); }
.ads-table-title { font-size: 13px; font-weight: 500; }
.ads-table-period { display: flex; gap: 4px; }
.ads-table-period .period-btn { padding: 4px 10px; font-size: 12px; border: 1px solid var(--sh-border-strong); border-radius: 6px; background: var(--sh-surface); color: var(--sh-text-2); cursor: pointer; font-family: inherit; }
.ads-table-period .period-btn.active { background: var(--sh-blue); border-color: var(--sh-blue); color: #fff; }

/* ===== T8.11 创建向导 Modal ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,0.18); width: 560px; max-width: 94vw; max-height: 86vh; display: flex; flex-direction: column; animation: thPopIn 220ms var(--ease-out); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--sh-border); }
.modal-head h3 { font-size: 15px; font-weight: 500; }
.modal-close { border: none; background: none; font-size: 20px; color: var(--sh-text-2); cursor: pointer; }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--sh-border); }
.wizard-steps { flex: 1; text-align: center; font-size: 12px; color: var(--sh-text-2); }
.wz-dot { margin: 0 4px; }
.wz-dot.active { color: var(--sh-blue); font-weight: 600; }
.wizard-label { font-size: 13px; font-weight: 500; margin-bottom: 12px; }
.wizard-objs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wizard-obj { border: 2px solid var(--sh-border-strong); border-radius: 10px; padding: 14px 6px; text-align: center; cursor: pointer; font-size: 13px; color: var(--sh-text-2); transition: all 0.12s; }
.wizard-obj:hover { border-color: var(--sh-blue); }
.wizard-obj.active { border-color: var(--sh-blue); background: var(--sh-blue-bg); color: var(--sh-blue); font-weight: 500; }
.wizard-ico { font-size: 22px; margin-bottom: 6px; }
.wizard-field { margin-bottom: 12px; }
.wizard-field label { display: block; font-size: 12px; color: var(--sh-text-2); margin-bottom: 4px; }
.wizard-field input, .wizard-field select, .wizard-field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--sh-border-strong); border-radius: 8px; font-size: 13px; font-family: inherit; background: var(--sh-surface); color: var(--sh-text); box-sizing: border-box; }
.wizard-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wizard-preview { border: 1px solid var(--sh-border); border-radius: 10px; overflow: hidden; }
.wp-row { display: flex; gap: 10px; padding: 9px 14px; border-bottom: 1px dashed var(--sh-border); font-size: 13px; }
.wp-row:last-child { border-bottom: none; }
.wp-row span { color: var(--sh-text-2); width: 70px; flex-shrink: 0; }

/* ===== T8.13 Meta 受众（官方风格卡片网格） ===== */
.audience-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.audience-card { position: relative; background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 12px; box-shadow: var(--sh-shadow); padding: 16px; cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
.audience-card:hover { border-color: var(--sh-blue); box-shadow: 0 6px 16px rgba(0,0,0,.12); transform: translateY(-2px); }
.au-del { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; border: none; background: transparent; color: var(--sh-text-2); font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s, background .12s; }
.audience-card:hover .au-del { opacity: 1; }
.au-del:hover { background: var(--sh-red); color: #fff; }
.au-hint { margin-top: 8px; font-size: 11px; color: var(--sh-text-2); opacity: 0; transition: opacity .12s; }
.audience-card:hover .au-hint { opacity: 1; }
.au-name { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.au-size { font-size: 20px; font-weight: 600; color: var(--sh-blue); margin-bottom: 8px; }
.au-meta { font-size: 12px; color: var(--sh-text-2); margin-bottom: 4px; }
.au-interest { font-size: 12px; color: var(--sh-text); }
.au-detail-name { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.au-detail-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--sh-border); font-size: 13px; }
.au-detail-row span { flex: 0 0 72px; color: var(--sh-text-2); }
.au-detail-row div { flex: 1; word-break: break-all; }

/* ===== 社媒中心（T9：FB/IG/YT） ===== */
.social-account-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); padding: 14px 18px; margin-bottom: 14px; flex-wrap: wrap; }
.social-acc-l { display: flex; align-items: center; gap: 12px; }
.social-list { padding: 0 18px; }
/* S15：YouTube 评论 */
.yt-comment { padding: 8px 0; border-bottom: 1px solid var(--sh-border); font-size: 13px; }
.ytc-head { display: flex; gap: 8px; align-items: center; }
.ytc-text { margin: 4px 0 6px; color: var(--sh-text-2); }
.ytc-reply { display: flex; gap: 6px; align-items: center; }
.ytc-reply input { flex: 1; padding: 5px 9px; border: 1px solid var(--sh-border); border-radius: 6px; background: var(--sh-bg); color: var(--sh-text); font-size: 12.5px; }
.ytc-sub { margin-top: 4px; padding-left: 12px; border-left: 2px solid var(--sh-border); font-size: 12px; color: var(--sh-text-2); }
/* S17：@ 引用知识库文档 */
.chat-at-menu { position: absolute; bottom: 100%; left: 16px; display: flex; flex-direction: column; background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); z-index: 50; min-width: 260px; overflow: hidden; }
/* S18：输入框附件区 + 对话任务卡 */
.chat-attach-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 12px 0; }
.chat-attach-chip { display: flex; align-items: center; gap: 6px; background: var(--cl-primary-bg); border: 1px solid var(--cl-primary); color: var(--cl-primary); font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: default; }
.chat-attach-chip img { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; }
.chat-attach-chip .chip-x { cursor: pointer; opacity: .7; margin-left: 2px; }
.chat-attach-chip .chip-x:hover { opacity: 1; }
.chat-task-card { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 10px; padding: 8px 12px; margin: 6px 0; font-size: 12.5px; }
.ctc-row { display: flex; align-items: center; gap: 8px; }
.ctc-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctc-status { font-size: 11px; flex-shrink: 0; }
.ctc-status.ok { color: var(--cl-success); }
.ctc-status.fail { color: #EF4444; }
.ctc-bar { height: 4px; background: var(--sh-border); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.ctc-bar-in { height: 100%; background: var(--cl-primary); border-radius: 2px; transition: width .3s; }
.chat-msg-user-att { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chat-msg-user-att .chat-attach-chip { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.4); color: #fff; font-size: 11px; }
.chat-at-item { padding: 8px 14px; font-size: 13px; cursor: pointer; }
.chat-at-item:hover { background: var(--cl-primary-bg); color: var(--cl-primary); }
.social-post { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--sh-border); align-items: flex-start; }
.social-post:last-child { border-bottom: none; }
.sp-img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.sp-body { flex: 1; min-width: 0; }
.sp-msg { font-size: 13px; line-height: 1.5; word-break: break-word; }
.sp-meta { margin-top: 6px; font-size: 12px; color: var(--sh-text-2); }
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ig-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--sh-bg); border: 1px solid var(--sh-border); }
.ig-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--sh-text-2); font-size: 12px; }
.ig-overlay { position: absolute; inset: auto 0 0 0; padding: 6px 8px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; font-size: 12px; opacity: 0; transition: opacity .12s; }
.ig-item:hover .ig-overlay { opacity: 1; }
.social-target-val { font-size: 13px; font-weight: 500; color: var(--sh-blue); }

/* ===== 素材库（服务中心） ===== */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
/* 视觉A：类型 Tabs + 差异化视图 */
.asset-tabs { display: flex; gap: 6px; align-items: center; margin: 0 0 10px; flex-wrap: wrap; }
.at-tab { border: 1px solid var(--sh-border); background: var(--sh-surface); color: var(--sh-text-2); font-size: 12.5px; padding: 5px 13px; border-radius: 999px; cursor: pointer; transition: all var(--tr-fast); }
.at-tab:hover { border-color: var(--cl-primary); color: var(--cl-primary); }
.at-tab.at-active { background: var(--cl-primary); border-color: var(--cl-primary); color: #fff; }
.at-spacer { flex: 1; }
.asset-mixed { display: block; }
.asset-sec-label { font-size: 12.5px; font-weight: 600; color: var(--sh-text-2); margin: 6px 0 10px; }
.asset-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.asset-li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 10px; cursor: pointer; transition: all var(--tr-fast); position: relative; }
.asset-li:hover { border-color: var(--cl-primary); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.asset-li.asset-sel { border-color: var(--cl-primary); box-shadow: 0 0 0 2px var(--cl-primary-bg); }
.asset-li-emoji { font-size: 20px; }
.asset-li-body { flex: 1; min-width: 0; }
.asset-li-title { font-size: 13px; font-weight: 500; }
.asset-li-preview { font-size: 12px; color: var(--sh-text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-li-meta { font-size: 11.5px; color: var(--sh-text-3); flex-shrink: 0; }
.asset-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; pointer-events: none; }
.asset-chips { display: flex; gap: 4px; flex-wrap: wrap; margin: 5px 8px 0; }
.asset-chip { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--cl-primary-bg); color: var(--cl-primary); cursor: pointer; }
.asset-chip:hover { background: var(--cl-primary); color: #fff; }
/* 视觉B：知识库 Tabs + 文档卡片 */
.kb-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.kt-tab { border: 1px solid var(--sh-border); background: var(--sh-surface); color: var(--sh-text-2); font-size: 12.5px; padding: 5px 13px; border-radius: 999px; cursor: pointer; transition: all var(--tr-fast); }
.kt-tab:hover { border-color: var(--cl-primary); color: var(--cl-primary); }
.kt-tab.kt-active { background: var(--cl-primary); border-color: var(--cl-primary); color: #fff; }
.kb-doc-cards { display: flex; flex-direction: column; gap: 8px; }
.kb-doc-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 10px; cursor: pointer; transition: all var(--tr-fast); position: relative; overflow: hidden; }
.kb-doc-card:hover { border-color: var(--cl-primary); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.kdc-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.kdc-icon { font-size: 20px; }
.kdc-body { flex: 1; min-width: 0; }
.kdc-title { font-size: 13px; font-weight: 500; }
.kdc-summary { font-size: 12px; color: var(--sh-text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kdc-meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; font-size: 11px; }
.kdc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.asset-card { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 12px; box-shadow: var(--sh-shadow); overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.asset-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
/* S14：素材批量选择 */
.asset-card { position: relative; }
.asset-check { position: absolute; top: 6px; left: 6px; z-index: 3; }
.asset-card.asset-sel { border-color: var(--cl-primary); box-shadow: 0 0 0 2px var(--cl-primary-bg); }
.asset-check input { width: 15px; height: 15px; cursor: pointer; }
.asset-thumb { height: 110px; display: flex; align-items: center; justify-content: center; background: var(--ac, var(--sh-blue)); position: relative; overflow: hidden; }
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asset-emoji { font-size: 34px; filter: grayscale(.2); }
.asset-name { padding: 10px 12px 2px; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-meta { padding: 0 12px 12px; font-size: 11px; color: var(--sh-text-2); }

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .campaign-list { grid-template-columns: 1fr; }
  .sidebar { width: 60px; padding: 10px 6px; }
  .nav-group-label { font-size: 0; padding: 8px 0; }
  .nav-item { padding: 10px; justify-content: center; }
  .nav-item span.nav-text { display: none; }
  .sidebar-foot { padding: 8px 4px; }
  .sidebar-foot .user-email { display: none; }
  .content { padding: 16px; }
  .topbar-title { display: none; }
}

.card-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.form-actions { margin-top: 14px; display: flex; align-items: center; gap: 12px; }

/* ===== 工作台四栏（T5.1 按渠道分类） ===== */
.wbcard { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); padding: 18px 20px; margin-bottom: 16px; }
.wb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.wb-title { font-size: 15px; font-weight: 500; }
.wb-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.wb-tab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--sh-border-strong); background: var(--sh-surface); font-size: 13px; cursor: pointer; color: var(--sh-text-2); font-family: inherit; }
.wb-tab:hover { background: var(--sh-bg); }
.wb-tab.active { background: var(--cl-primary-bg); border-color: rgba(99,102,241,0.4); color: var(--cl-primary); font-weight: var(--fw-medium); }
.tlogo { width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 9px; font-weight: 600; flex-shrink: 0; }
.wb-period { display: flex; gap: 4px; flex-wrap: wrap; }
.period-btn { padding: 5px 10px; border-radius: var(--r-md); border: 1px solid var(--sh-border-strong); background: var(--sh-surface); font-size: var(--fs-sm); color: var(--sh-text-2); cursor: pointer; font-family: inherit; transition: all var(--tr-fast); }
.period-btn:hover { background: var(--sh-bg); }
.period-btn.active { background: var(--cl-primary); border-color: var(--cl-primary); color: #fff; font-weight: var(--fw-medium); }
.metric-blocks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 1080px) { .metric-blocks { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .metric-blocks { grid-template-columns: repeat(2, 1fr); } }
.metric-block { position: relative; border: 1px solid var(--sh-border); border-radius: var(--sh-radius); background: var(--sh-surface); padding: 14px 16px 12px; overflow: hidden; transition: box-shadow var(--tr-fast), transform var(--tr-fast); }
.metric-block:hover { box-shadow: var(--sh-lift); transform: translateY(-2px); }
.mb-top { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--mb-color, #c9cccf); }
.mb-label { font-size: var(--fs-sm); color: var(--sh-text-2); margin-bottom: 6px; }
.mb-value { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; font-family: var(--ff-num); }
.mb-value.tone-ok { color: var(--sh-green-dark); }
.mb-value.tone-warn { color: var(--sh-amber); }
.mb-value.tone-muted { color: var(--sh-text-3); }
.mb-sub { font-size: 11px; color: var(--sh-text-3); margin-top: 4px; }

/* ===== 工作台底部（T5.2：AI 建议待审批 + AI 自动化） ===== */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.booster-body .task-grid { flex: 1; min-width: 0; }
.task-card { border: 1px solid var(--sh-border); border-radius: var(--sh-radius); background: var(--sh-surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.task-card .task-title { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-card .task-desc { font-size: 12px; color: var(--sh-text-2); line-height: 1.5; }
.task-card .task-sub { font-size: 11px; color: var(--sh-text-3); }
.task-card .task-actions { display: flex; gap: 8px; margin-top: auto; }
.task-link { color: var(--sh-blue); font-size: 12px; font-weight: 500; cursor: pointer; background: none; border: none; font-family: inherit; padding: 0; }
.task-link:hover { text-decoration: underline; }
.booster-body { display: flex; gap: 20px; }
.booster-side { width: 140px; flex-shrink: 0; }
.booster-side .side-head { font-size: 12px; font-weight: 500; margin-bottom: 8px; }
.booster-side button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: none; background: none; border-radius: var(--sh-radius-sm); font-size: 13px; color: var(--sh-text-2); cursor: pointer; font-family: inherit; margin-bottom: 4px; }
.booster-side button:hover { background: var(--sh-bg); }
.booster-side button.active { background: var(--cl-primary-bg); color: var(--cl-primary); font-weight: var(--fw-medium); }
@media (max-width: 720px) {
  .booster-body { flex-direction: column; gap: 12px; }
  .booster-side { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  .booster-side button { width: auto; margin-bottom: 0; }
}

/* ===== T16 对话式 AI 驾驶舱 ===== */
.dash-layout { display: flex; gap: 16px; align-items: flex-start; }
.dash-main { flex: 1; min-width: 0; }
.dash-side { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.engine-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px;
  background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 13px; color: var(--sh-text); margin-bottom: 14px;
}
.eb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cl-success); box-shadow: 0 0 6px var(--cl-success); animation: ebpulse 1.6s infinite; }
@keyframes ebpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.chat-box { display: flex; flex-direction: column; gap: 18px; max-height: 56vh; overflow-y: auto; padding: 4px 2px 8px; }
.chat-msg { display: flex; gap: 10px; width: 100%; }
.chat-msg.chat-user { flex-direction: row-reverse; }
.chat-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--sh-blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.chat-msg.chat-user .chat-avatar { background: var(--sh-violet, #7C3AED); }
.chat-bubble {
  max-width: 100%; flex: 1 1 0%; min-width: 0; background: var(--sh-card); border: 1px solid var(--sh-border);
  border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.6;
}
.chat-msg.chat-user .chat-bubble { background: rgba(59, 130, 246, 0.1); }
.chat-name { font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--sh-text-2); }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chat-input-wrap { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--sh-border); }
.chat-hint { font-size: 12px; color: var(--sh-text-2); margin-bottom: 8px; }
#chat-input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--sh-border); background: var(--sh-card); color: var(--sh-text); font-size: 14px; }
#chat-input:focus { outline: none; border-color: var(--sh-blue); }
#chat-input::placeholder { color: var(--sh-text-3); }
/* 对话卡片：指标 / 建议 / 文本 */
.cm-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 6px; }
.cm-metric { background: var(--sh-bg); border: 1px solid var(--sh-border); border-radius: 8px; padding: 8px; text-align: center; transition: box-shadow var(--tr-fast), transform var(--tr-fast); }
.cm-metric:hover { box-shadow: var(--sh-lift); transform: translateY(-2px); }
.cm-metric .v { font-size: var(--fs-xl); font-weight: 700; color: var(--sh-text); font-family: var(--ff-num); }
.cm-metric .l { font-size: var(--fs-xs); color: var(--sh-text-2); margin-top: 2px; }
.cm-suggest { margin-top: 8px; border-top: 1px dashed var(--sh-border); padding-top: 8px; }
.cm-suggest-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--sh-border); font-size: 13px; }
.cm-suggest-item:last-child { border-bottom: none; }
.cm-suggest-item .lvl { font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.cm-suggest-item .lvl.high { background: rgba(239, 68, 68, 0.15); color: #F87171; }
.cm-suggest-item .lvl.medium { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.cm-suggest-item .lvl.low { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.cm-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12.5px; }
.cm-table th, .cm-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--sh-border); }
.dash-points, .dash-actions { display: flex; flex-direction: column; gap: 6px; }
.dp-item { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 6px 2px; border-bottom: 1px dashed var(--sh-border); }
.dp-item:last-child { border-bottom: none; }
.dp-item .k { color: var(--sh-text-2); }
.dp-item .v { font-weight: 600; }
@media (max-width: 900px) {
  .dash-layout { flex-direction: column; }
  .dash-side { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .dash-side .wbcard { flex: 1; min-width: 220px; }
}

/* ===== T17 WorkBuddy 风格工作台 ===== */
.wb-hero { text-align: center; padding: 22px 0 10px; }
.wb-ai-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sh-text-2);
  border: 1px solid var(--sh-border); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px;
}
.wb-hero-title { font-size: 34px; font-weight: 700; margin: 0 0 6px; letter-spacing: 0.5px; }
.wb-hero-sub { color: var(--sh-text-2); margin: 0 0 20px; font-size: 14px; }
.wb-scenes { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.wb-chip {
  border: 1px solid var(--sh-border-strong); background: var(--sh-surface); color: var(--sh-text);
  border-radius: 999px; padding: 8px 16px; font-size: 13.5px; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.wb-chip:hover { border-color: var(--cl-primary); color: var(--cl-primary); background: var(--cl-primary-bg); }
.wb-skills-wrap { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 22px; }
.wb-skills { display: flex; flex-wrap: nowrap; justify-content: center; gap: 8px; max-width: 880px; padding: 4px; margin: 0 auto; overflow: visible; }
.wb-skills::-webkit-scrollbar { display: none; }
/* P0-3：wrap 后无需横滚箭头 */
.wb-skills-wrap .wb-scroll-btn { display: none; }
.wb-skill { padding: 6px 13px; font-size: 12.5px; white-space: nowrap; }
.wb-scroll-btn {
  border: 1px solid var(--sh-border); background: var(--sh-surface); color: var(--sh-text-2);
  border-radius: 50%; width: 28px; height: 28px; cursor: pointer; flex-shrink: 0;
}
.wb-input-card {
  max-width: 100%; margin: 0; background: var(--sh-surface); border: 1px solid var(--sh-border-strong);
  border-radius: 28px; padding: 18px 20px; box-shadow: 0 12px 48px rgba(0,0,0,0.10);
}
#chat-input {
  width: 100%; border: none; outline: none; background: transparent; color: var(--sh-text);
  font-size: 16px; font-family: inherit; resize: none; min-height: 34px; line-height: 1.6;
}
.wb-input-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.wb-icon-btn {
  border: 1px solid var(--sh-border); background: transparent; color: var(--sh-text-2);
  border-radius: 10px; width: 36px; height: 36px; cursor: pointer; font-size: 17px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.wb-icon-btn:hover { border-color: var(--cl-primary); color: var(--cl-primary); background: var(--cl-primary-bg); }
.wb-model-select {
  border: 1px solid var(--sh-border); background: var(--sh-surface); color: var(--sh-text-2);
  border-radius: 8px; padding: 5px 6px; font-size: 12px; cursor: pointer;
  max-width: 118px; min-width: 100px; text-overflow: ellipsis; white-space: nowrap; font-size: 13px;
}
.wb-send-btn {
  background: var(--cl-grad); color: #fff; border: none;
  border-radius: 10px; width: 40px; height: 40px; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.wb-send-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99,102,241,0.4); }
.wb-engine { max-width: 680px; margin: 14px auto 0; }
.wb-chat { max-width: 100%; margin: 16px 0 0; min-height: 40px; }
/* T18 三联屏：中央对话 + 右侧浮框（grid 不遮挡） */
.trip-layout { display: grid; grid-template-columns: 1fr 268px; gap: 20px; align-items: start; }
.trip-main { min-width: 0; display: flex; flex-direction: column; height: calc(100vh - 150px); }
/* 首屏 hero（完整）→ 有对话后收起 */
.wb-hero { transition: all 0.25s; }
.wb-hero.compact .wb-hero-title { font-size: 20px; }
.wb-hero.compact .wb-hero-sub, .wb-hero.compact .wb-ai-badge { display: none; }
.wb-hero.compact .wb-scenes { display: none; }
.wb-hero.compact .wb-skills-wrap { margin-bottom: 6px; justify-content: flex-start; }
.wb-hero.compact { padding: 8px 0 4px; text-align: left; }
.wb-hero.compact .wb-hero-title { text-align: left; }
/* 对话历史：占据剩余高度滚动 */
.wb-chat { flex: 1; overflow-y: auto; margin: 6px 0 10px; width: 100%; min-height: 0; }
/* 输入框沉底 */
.wb-input-dock { margin-top: auto; margin-left: 0; margin-right: 0; width: 100%; }
.dash-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; width: 268px; max-height: calc(100vh - 120px); overflow-y: auto; }
/* 空状态 */
.chat-empty { text-align: center; padding: 40px 0 30px; color: var(--sh-text-2); }
.ce-icon { font-size: 34px; margin-bottom: 10px; }
.ce-title { font-size: 15px; font-weight: 600; color: var(--sh-text); margin-bottom: 6px; }
.ce-sub { font-size: 12.5px; color: var(--sh-text-3); }
/* 消息时间戳 */
.chat-meta { font-size: 11px; color: var(--sh-text-3); margin-bottom: 3px; }
.chat-msg.chat-user .chat-meta { text-align: right; }
@media (max-width: 1100px) {
  .trip-layout { grid-template-columns: 1fr; }
  .dash-side { position: static; width: 100%; flex-direction: row; flex-wrap: wrap; max-height: none; }
  .dash-side .wbcard { flex: 1; min-width: 230px; }
}

/* ===== T20 工作台全面美化（浅色 + 靛蓝点缀 + 径向光晕） ===== */
/* ① 页面背景：径向靛蓝光晕 */
.page#page-dashboard { position: relative; background: radial-gradient(ellipse 80% 50% at 50% -5%, rgba(99,102,241,0.06), transparent 70%); }
.page#page-dashboard::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at 50% -10%, rgba(99,102,241,0.045), transparent 55%);
}
.trip-layout { position: relative; z-index: 1; }

/* ② Hero：标题/副标题间距紧凑 */
.wb-hero { padding: 20px 0 12px; }
.wb-hero-title { font-size: 38px; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 8px; background: linear-gradient(135deg, var(--cl-primary-dark), var(--cl-primary), var(--cl-violet)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.wb-hero-sub { margin: 0 0 18px; font-size: 13.5px; }

/* ③ 场景芯片：更圆润 + 紧凑 */
.wb-scenes { gap: 10px; margin-bottom: 10px; max-width: 720px; margin-left: auto; margin-right: auto; }
.wb-scenes .wb-chip { flex: 0 0 auto; }
.wb-chip { border-radius: 999px; transition: all 0.18s ease; }
.wb-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(99,102,241,0.16); }
.wb-scene { padding: 9px 20px; font-size: 14px; border-color: var(--sh-border-strong); background: var(--sh-surface); }
.wb-skills-wrap { gap: 8px; margin-bottom: 10px; }
.wb-skill { padding: 7px 14px; font-size: 12.5px; border-color: var(--sh-border); background: rgba(255,255,255,0.6); }

/* ④ 输入框：自动伸缩 + 贴底 + 阴影 */
.wb-input-card {
  border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 0 0 1px var(--sh-border-strong);
  transition: box-shadow 0.2s, border-color 0.2s; max-width: 100%; margin: 0;
}
/* P0-2：仅 textarea 真正聚焦才绿色强调（:has 精确判定，避免点按钮/select 触发） */
.wb-input-card { box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 0 0 1px var(--sh-border-strong); }
.wb-input-card:hover { box-shadow: 0 5px 26px rgba(0,0,0,0.09), 0 0 0 1px var(--sh-border-strong); }
.wb-input-card:has(#chat-input:focus) { box-shadow: 0 6px 32px rgba(99,102,241,0.15), 0 0 0 2px rgba(99,102,241,0.28); border-color: var(--cl-primary); }
#chat-input { line-height: 1.6; padding: 2px 0; }
.wb-input-dock { margin-top: auto; margin-left: 0; margin-right: 0; width: 100%; }

/* ⑤ 对话区：隐藏无内容滚动条 + 气泡美化 */
.wb-chat { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.wb-chat::-webkit-scrollbar { width: 6px; }
.wb-chat::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.wb-chat:hover::-webkit-scrollbar-thumb { background: var(--sh-border-strong); }
.chat-bubble { border-radius: 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.chat-msg.chat-user .chat-bubble { background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.06)); border-color: rgba(99,102,241,0.18); }
.chat-name { font-size: 12px; font-weight: 700; color: var(--cl-primary); margin-bottom: 5px; }

/* ⑥ 空状态优雅化 */
.chat-empty { padding: 48px 0 36px; }
.ce-icon { font-size: 46px; margin-bottom: 12px; filter: drop-shadow(0 6px 16px rgba(0,128,96,0.15)); }
/* P1-4：空状态图标靛蓝调（emoji 用滤镜偏蓝紫） */
.chat-empty .ce-icon { filter: drop-shadow(0 6px 16px rgba(99,102,241,0.18)) saturate(1.05) hue-rotate(165deg) brightness(1.02); }
.ce-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--sh-text); }
.ce-sub { font-size: 13px; color: var(--sh-text-3); }

/* ⑦ 右侧面板 0 值优雅化 */
.dp-item .v:empty::after, .dp-item .v:has(+ *) { color: var(--sh-text-2); }
.dp-item .v { color: var(--cl-primary); font-weight: 700; }

/* ⑧ AI 徽章 */
.wb-ai-badge { background: var(--cl-primary-bg); border-color: rgba(99,102,241,0.25); color: var(--cl-primary); font-weight: var(--fw-semibold); }

/* ⑨ compact 态也优雅 */
.wb-hero.compact { padding: 6px 0 2px; }
.wb-hero.compact .wb-hero-title { font-size: 18px; background: none; -webkit-text-fill-color: var(--sh-text); }
/* P0-1：hero 收起时隐藏空状态（CSS 兜底，JS 也隐藏但双保险） */
.wb-hero.compact ~ .wb-chat .chat-empty { display: none; }

/* ⑩ 指标卡美化 */
.cm-metric { border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.cm-metric .v { font-size: 18px; }
.cm-metric .l { font-size: 11.5px; }
.cm-suggest-item .lvl { font-weight: 600; }

/* ⑪ 移动端单列时输入框不贴底 */
@media (max-width: 1100px) {
  .wb-input-dock { position: static; }
  .page#page-dashboard { background: none; }
}
/* P1-1：右侧 0 值优雅化 */
.v-zero { color: var(--sh-text-3); font-weight: 400; }

/* T32 思考过程折叠区 + Markdown 排版 */
.cm-thinking { margin: 4px 0 8px; border: 1px dashed var(--sh-border-strong); border-radius: 8px; background: var(--sh-bg); }
.cm-thinking summary { cursor: pointer; padding: 6px 10px; font-size: 12px; color: var(--sh-text-2); user-select: none; }
.cm-thinking summary:hover { color: var(--cl-primary); }
.cm-thinking-body { padding: 8px 12px; font-size: 12px; color: var(--sh-text-3); line-height: 1.7; white-space: pre-wrap; border-top: 1px dashed var(--sh-border); }
/* Markdown 排版 */
.cm-md { font-size: 13.5px; line-height: 1.75; }
.cm-md p { margin: 6px 0; }
.cm-md h1, .cm-md h2, .cm-md h3 { margin: 10px 0 6px; font-weight: 700; }
.cm-md h1 { font-size: 16px; } .cm-md h2 { font-size: 15px; } .cm-md h3 { font-size: 14px; }
.cm-md ul, .cm-md ol { margin: 6px 0; padding-left: 20px; }
.cm-md li { margin: 3px 0; }
.cm-md blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--cl-primary); background: var(--cl-primary-bg); border-radius: 0 8px 8px 0; color: var(--sh-text-2); }
.cm-md code { background: var(--sh-bg); border: 1px solid var(--sh-border); border-radius: 4px; padding: 1px 5px; font-size: 12px; font-family: Consolas, Monaco, monospace; }
.cm-md strong { color: var(--sh-text); }

/* C2 危险操作确认卡 */
.cm-confirm { border: 1px solid rgba(215,44,13,0.3); border-radius: 12px; padding: 14px 16px; background: var(--sh-red-bg); margin-top: 6px; }
.cm-confirm-icon { font-size: 26px; margin-bottom: 6px; }
.cm-confirm-msg { font-weight: 600; color: var(--sh-text); margin-bottom: 4px; font-size: 14px; }
.cm-confirm-detail { font-size: 12.5px; color: var(--sh-text-2); margin-bottom: 12px; }
.cm-confirm-actions { display: flex; gap: 10px; }
.btn-danger { background: var(--sh-red); color: #fff; border: none; }
.btn-danger:hover { opacity: 0.88; }

/* U2 AI 任务中心 */
.task-scroll { max-height: 240px; overflow-y: auto; }
.task-item { align-items: flex-start; }
.task-st { margin-right: 4px; }
.task-running { color: #3B82F6; animation: ebpulse 1.6s infinite; }
.task-done { color: var(--cl-success); }
.task-error { color: var(--cl-danger); }
.task-confirm { color: var(--cl-amber); }
.task-sub { font-size: 11px; color: var(--sh-text-3); white-space: nowrap; }

/* G2 任务状态醒目化 */
.task-row-confirm {
  border: 1.5px solid rgba(239,68,68,0.6); border-radius: 8px; padding: 7px 8px;
  background: rgba(239,68,68,0.08); animation: taskPulse 1.4s ease-in-out infinite;
}
@keyframes taskPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.35); }
  50% { box-shadow: 0 0 0 5px rgba(239,68,68,0.12); }
}
.task-row-error { border-left: 3px solid var(--cl-danger); border-radius: 4px; }
.task-row-done { border-left: 3px solid var(--cl-success); border-radius: 4px; opacity: 0.92; }
.task-flash { animation: flashBg 1s ease 2; }
@keyframes flashBg {
  0%,100% { background: transparent; }
  50% { background: rgba(16,185,129,0.25); }
}

/* H1 任务 ⋯ 菜单 + 归档 */
.task-item { position: relative; }
.task-more {
  position: absolute; right: 8px; top: 4px; width: 20px; height: 20px; text-align: center;
  border-radius: 4px; font-size: 14px; color: var(--sh-text-3); cursor: pointer; opacity: 0; transition: opacity 0.15s;
}
.task-item:hover .task-more { opacity: 1; }
.task-more:hover { background: var(--sh-bg); color: var(--sh-text); }
.task-menu {
  display: none; position: absolute; right: 8px; top: 26px; z-index: 20;
  background: var(--sh-surface); border: 1px solid var(--sh-border-strong); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12); padding: 4px; min-width: 110px;
}
.task-menu.open { display: block; }
.task-menu button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: none; background: none; border-radius: 6px; font-size: 12.5px; color: var(--sh-text); cursor: pointer; font-family: inherit; }
.task-menu button:hover { background: var(--sh-bg); }
.task-archived { opacity: 0.5; }
.task-arch-toggle { text-align: center; font-size: 11.5px; color: var(--sh-text-3); padding: 6px 0 2px; cursor: pointer; }
.task-arch-toggle:hover { color: var(--cl-primary); }

/* H3 发送按钮 busy（停止态） */
.wb-send-btn.busy { background: linear-gradient(135deg, var(--cl-danger), var(--cl-danger-dark)); box-shadow: 0 2px 8px rgba(239,68,68,0.3); }
.wb-send-btn.busy:hover { transform: none; }
.v-warn { color: var(--cl-danger); font-weight: 700; }

/* A2 执行透明度 */
.cm-tool-live { margin: 4px 0; }
.cm-tool-line { font-size: 12px; color: var(--sh-text-2); padding: 2px 0; }
.cm-tool-ok { color: var(--sh-green); }
.cm-tool-err { color: var(--cl-danger); }
/* 思考小窗（120px 滚动） */
.cm-think-scroll {
  max-height: 120px; overflow-y: auto; font-size: 12px; line-height: 1.5;
  color: var(--sh-text-3); background: var(--sh-bg); border: 1px dashed var(--sh-border-strong);
  border-radius: 8px; padding: 6px 10px; margin: 4px 0 8px; white-space: pre-wrap; word-break: break-all;
}
.cm-md-live { min-height: 20px; }

/* K3 写操作确认卡 */
.cm-pending-card { margin-top: 8px; }
.cm-confirm-item { font-size: 12.5px; color: var(--sh-text-2); padding: 3px 0; border-bottom: 1px dashed var(--sh-border); }
.cm-confirm-item:last-child { border-bottom: none; }



/* P2 专业级 BI 驾驶舱（整页重排） */
.ck-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; padding: 14px 18px; border-radius: 12px; background: var(--sh-surface); border: 1px solid var(--sh-border); }
.ck-hero-title { font-size: 18px; font-weight: 800; color: var(--sh-text); }
.ck-hero-sub { font-size: 12px; color: var(--sh-text-3); }
.ck-hero-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ck-period { display: flex; background: var(--sh-bg); border-radius: 8px; padding: 3px; gap: 2px; }
.ck-period-btn { border: none; background: transparent; color: var(--sh-text-3); font-size: 12px; padding: 5px 12px; border-radius: 6px; cursor: pointer; transition: all .2s; }
.ck-period-btn.active { background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2)); color: #fff; font-weight: 600; }

/* KPI 条：8 个紧凑卡 + sparkline */
.ck-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ck-kpi-card { position: relative; overflow: hidden; background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 12px; padding: 12px 14px; transition: transform .18s, box-shadow .18s; }
.ck-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
.ck-kpi-g0::before { content:''; position: absolute; top: -26px; right: -26px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,0.07), transparent 70%); }
.ck-kpi-g1::before { content:''; position: absolute; top: -26px; right: -26px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,0.07), transparent 70%); }
.ck-kpi-g2::before { content:''; position: absolute; top: -26px; right: -26px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(16,185,129,0.06), transparent 70%); }
.ck-kpi-label { font-size: 11px; color: var(--sh-text-3); margin-bottom: 2px; }
.ck-kpi-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.ck-kpi-value { font-size: 22px; font-weight: 800; line-height: 1.1; color: var(--sh-text); }
.ck-kpi-unit { font-size: 12px; font-weight: 500; color: var(--sh-text-3); margin-left: 2px; }
.ck-kpi-badge { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; white-space: nowrap; }
.ck-kpi-spark { position: absolute; bottom: 6px; right: 8px; opacity: 0.5; }
.ck-kpi-bar { margin-top: 8px; height: 3px; background: var(--sh-border); border-radius: 2px; overflow: hidden; }
.ck-kpi-bar-fill { height: 100%; background: linear-gradient(90deg, var(--cl-primary), var(--cl-primary-2)); border-radius: 2px; transition: width .5s; }

/* 主图区 */
.ck-main-charts { display: grid; grid-template-columns: 1.8fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 1100px) { .ck-main-charts { grid-template-columns: 1fr; } }
.ck-card { border-radius: 12px; border-color: var(--sh-border); }
.ck-chart-card { min-width: 0; overflow: hidden; }
.ck-donut-card .ck-chart-body { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ck-chart-body { padding: 6px 12px 10px; overflow: hidden; min-width: 0; }
.ck-chart-body canvas { display: block; max-width: 100%; height: auto; }
.ck-donut-wrap { display: flex; align-items: center; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ck-legend-item { font-size: 12px; color: var(--sh-text-2); display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.ck-legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* 渠道明细表 */
.ck-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ck-table th { text-align: left; padding: 8px 12px; color: var(--sh-text-3); font-weight: 600; font-size: 11.5px; border-bottom: 1px solid var(--sh-border); }
.ck-table td { padding: 8px 12px; border-bottom: 1px dashed var(--sh-border-strong); }
.ck-table tr:last-child td { border-bottom: none; }
.ck-ch-share { display: inline-block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--cl-primary), var(--cl-primary-2)); }

/* 三列：社媒矩阵 | 询盘健康 | 运营态势 */
.ck-grid3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 1100px) { .ck-grid3 { grid-template-columns: 1fr; } }
.ck-body { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.ck-social-card { background: var(--sh-bg); border: 1px solid var(--sh-border); border-radius: 10px; padding: 10px 12px; transition: transform .18s; }
.ck-social-card:hover { transform: translateY(-2px); }
.ck-sc-head { display: flex; align-items: center; gap: 8px; }
.ck-sc-name { font-size: 18px; font-weight: 800; width: 24px; text-align: center; }
.ck-sc-label { font-size: 12px; color: var(--sh-text-3); }
.ck-sc-fans { margin-left: auto; font-size: 13px; font-weight: 700; }
.ck-sc-metrics { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--sh-text-2); margin-top: 4px; }
.ck-site-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ck-site-item { background: var(--sh-bg); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; gap: 1px; }
.ck-site-item .k { font-size: 10.5px; color: var(--sh-text-3); }
.ck-site-item .v { font-size: 15px; font-weight: 700; }
.ck-health-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; padding: 5px 2px; border-bottom: 1px dashed var(--sh-border); }
.ck-health-row:last-child { border-bottom: none; }
.ck-health-num { font-weight: 700; font-size: 15px; }
.ck-health-a { color: var(--cl-success); } .ck-health-b { color: var(--cl-amber); } .ck-health-c { color: var(--cl-danger); }
.ck-ops-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 6px 2px; border-bottom: 1px dashed var(--sh-border); }
.ck-ops-item:last-child { border-bottom: none; }
.ck-ops-ico { font-size: 16px; }

/* 预警带（横向） */
.ck-alert-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 6px; }
.ck-alert-card { flex: 0 0 auto; font-size: 12px; color: var(--cl-danger-dark); background: rgba(239,68,68,0.09); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; padding: 7px 12px; }
.ck-alert-none { color: var(--sh-green); font-size: 12px; }
.ck-skeleton { height: 80px; border-radius: 12px; background: linear-gradient(90deg, var(--sh-border-strong) 25%, var(--sh-border) 50%, var(--sh-border-strong) 75%); background-size: 200% 100%; animation: ckShimmer 1.4s infinite; }
@keyframes ckShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.text-muted { color: var(--sh-text-3); font-size: 12px; }

/* Q：AI 公告条（红底 + 右→左滚动） */
.ck-announce { margin-bottom: 12px; border-radius: 10px; overflow: hidden; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.3); display: flex; align-items: center; }
.ck-announce-tag { flex: 0 0 auto; background: rgba(239,68,68,0.85); color: #fff; font-size: 11px; font-weight: 700; padding: 6px 12px; display: flex; align-items: center; gap: 5px; letter-spacing: 0.5px; }
.ck-announce-viewport { flex: 1; overflow: hidden; position: relative; height: 30px; }
.ck-announce-track { display: inline-block; white-space: nowrap; padding-left: 100%; animation: ckMarquee 28s linear infinite; }
.ck-announce-track span { color: #F87171; font-size: 12.5px; padding-right: 60px; }
@keyframes ckMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.ck-announce-none { display: none; }


/* R2 统一收件箱三栏（Messenger 风格） */
.inbox { display: flex; flex-direction: column; height: calc(100vh - 130px); min-height: 480px; background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 12px; overflow: hidden; }
.inbox-channels { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--sh-border); background: var(--sh-bg); }
.inbox-chan { border: none; background: transparent; color: var(--sh-text-2); font-size: 13px; padding: 6px 14px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.inbox-chan:hover { background: var(--sh-surface); }
.inbox-chan.active { background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2)); color: #fff; font-weight: 600; }
.inbox-badge { background: var(--cl-danger); color: #fff; font-size: 10.5px; border-radius: 10px; padding: 1px 6px; font-weight: 700; }
.inbox-chan.active .inbox-badge { background: rgba(255,255,255,0.25); }
.inbox-body { display: grid; grid-template-columns: 300px 1fr 280px; flex: 1; overflow: hidden; }
@media (max-width: 1100px) { .inbox-body { grid-template-columns: 260px 1fr; } .inbox-profile { display: none; } }
/* 左列 */
.inbox-list { display: flex; flex-direction: column; border-right: 1px solid var(--sh-border); min-width: 0; }
.inbox-list-head { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--sh-border); }
.inbox-search { flex: 1; background: var(--sh-bg); border: 1px solid var(--sh-border); border-radius: 8px; padding: 7px 10px; color: var(--sh-text-2); font-size: 12.5px; }
.inbox-manage { border: none; background: transparent; color: var(--sh-text-3); cursor: pointer; }
.inbox-tags { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--sh-border); overflow-x: auto; }
.inbox-tag { font-size: 11.5px; color: var(--sh-text-3); background: var(--sh-bg); border: 1px solid var(--sh-border); border-radius: 20px; padding: 3px 10px; cursor: pointer; white-space: nowrap; }
.inbox-tag:hover { color: var(--cl-primary); border-color: var(--cl-primary); }
.inbox-threads { flex: 1; overflow-y: auto; }
.inbox-thread { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--sh-border-strong); }
.inbox-thread:hover { background: var(--sh-bg); }
.inbox-thread.active { background: linear-gradient(90deg, rgba(99,102,241,0.12), transparent); }
.inbox-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.inbox-t-info { flex: 1; min-width: 0; }
.inbox-t-name { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; }
.inbox-t-time { font-size: 10.5px; color: var(--sh-text-3); }
.inbox-t-preview { font-size: 11.5px; color: var(--sh-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; justify-content: space-between; gap: 6px; }
.inbox-t-unread { background: var(--cl-primary); color: #fff; font-size: 10px; border-radius: 10px; padding: 0 5px; animation: thPulse 1.6s ease-in-out infinite; }
/* 中列 */
.inbox-chat { display: flex; flex-direction: column; min-width: 0; }
.inbox-chat-head { padding: 12px 16px; border-bottom: 1px solid var(--sh-border); font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 10px; }
.inbox-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.inbox-msg { max-width: 72%; padding: 8px 12px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.inbox-msg.contact { align-self: flex-start; background: var(--sh-bg); border-bottom-left-radius: 4px; }
.inbox-msg.me { align-self: flex-end; background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2)); color: #fff; border-bottom-right-radius: 4px; }
.inbox-msg-time { font-size: 10px; color: var(--sh-text-3); margin-top: 2px; }
.inbox-input { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--sh-border); }
.inbox-ico { border: none; background: transparent; font-size: 16px; cursor: pointer; }
.inbox-msg-input { flex: 1; background: var(--sh-bg); border: 1px solid var(--sh-border); border-radius: 20px; padding: 8px 14px; color: var(--sh-text-2); font-size: 13px; }
.inbox-send { border: none; background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2)); color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
/* 右列 */
.inbox-profile { border-left: 1px solid var(--sh-border); overflow-y: auto; padding: 16px; }
.ip-head { text-align: center; margin-bottom: 14px; }
.ip-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; margin: 0 auto 8px; }
.ip-name { font-size: 15px; font-weight: 700; }
.ip-sub { font-size: 11.5px; color: var(--sh-text-3); margin-top: 2px; }
.ip-section { margin-bottom: 14px; }
.ip-title { font-size: 11px; font-weight: 700; color: var(--sh-text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.ip-row { font-size: 12.5px; color: var(--sh-text-2); padding: 3px 0; display: flex; justify-content: space-between; gap: 8px; }
.ip-stage { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.ip-stage-btn { font-size: 11px; border: 1px solid var(--sh-border-strong); border-radius: 20px; padding: 3px 9px; background: transparent; color: var(--sh-text-2); cursor: pointer; }
.ip-stage-btn.active { background: var(--cl-primary); color: #fff; border-color: var(--cl-primary); }
.ip-ai { width: 100%; margin-top: 4px; background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2)); color: #fff; border: none; border-radius: 8px; padding: 8px; font-size: 12.5px; cursor: pointer; font-weight: 600; }
.ip-ai-result { margin-top: 8px; font-size: 12px; color: var(--sh-text-2); background: var(--sh-bg); border-radius: 8px; padding: 10px; white-space: pre-wrap; line-height: 1.5; }

/* S2 建档增强 */
/* U1 自定义平滑下拉（无箭头无边框） */
.ip-drop { position: relative; width: 100%; }
.ip-drop-val { background: var(--sh-bg); border: 1px solid var(--sh-border); border-radius: 8px; padding: 8px 12px; color: var(--sh-text-2); font-size: 12.5px; cursor: pointer; transition: all .2s; }
.ip-drop-val:hover { border-color: var(--cl-primary); }
/* V1 悬浮卡片下拉（无边框 + ✓图标 + hover渐变） */
.ip-drop-menu { position: absolute; z-index: 9999; background: var(--sh-surface); border: none; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.35); overflow: hidden; padding: 4px; animation: dropScale .16s ease; }
@keyframes dropScale { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.ip-drop-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 12.5px; color: var(--sh-text-2); cursor: pointer; border-radius: 8px; transition: background .15s; }
.ip-drop-item:hover { background: linear-gradient(90deg, rgba(99,102,241,0.1), rgba(139,92,246,0.06)); }
.ip-drop-item.active { color: var(--cl-primary); font-weight: 600; background: rgba(99,102,241,0.12); }
.ip-drop-check { width: 14px; color: var(--cl-primary); font-size: 11px; }
/* 建档滚动修复：grid 子项 min-height:0 才能滚动 */
.inbox-body { min-height: 0; }
.inbox-profile { min-height: 0; }
.ip-add { width: 100%; margin-top: 4px; background: transparent; border: 1px dashed var(--sh-border-strong); color: var(--sh-text-3); border-radius: 8px; padding: 6px; font-size: 11.5px; cursor: pointer; }
.ip-add:hover { color: var(--cl-primary); border-color: var(--cl-primary); }
.inbox-channels { overflow-x: auto; }

/* W2 客户资料页 */
.customer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.customer-card { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 12px; padding: 14px; transition: transform .18s, box-shadow .18s; }
.customer-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.customer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.customer-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.customer-info { flex: 1; min-width: 0; }
.customer-name { font-size: 14px; font-weight: 600; }
.customer-source { font-size: 11px; color: var(--sh-text-3); }
.customer-stage { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.customer-body { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.customer-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--sh-text-2); gap: 8px; }
.customer-msg { max-width: 65%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--sh-text-3); }
.customer-actions { display: flex; gap: 8px; }

/* X2/X3 CRM */
.crm-tabs { display: flex; background: var(--sh-bg); border-radius: 8px; padding: 3px; gap: 2px; }
.crm-tab { border: none; background: transparent; color: var(--sh-text-3); font-size: 12.5px; padding: 6px 14px; border-radius: 6px; cursor: pointer; }
.crm-tab.active { background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2)); color: #fff; font-weight: 600; }
.crm-kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: start; }
.crm-kcol { background: var(--sh-bg); border-radius: 10px; padding: 8px; min-height: 200px; }
.crm-khead { font-size: 12px; font-weight: 700; padding: 4px 6px 8px; display: flex; align-items: center; gap: 5px; }
.crm-kcount { background: var(--sh-surface); border-radius: 10px; padding: 0 7px; font-size: 11px; color: var(--sh-text-3); }
.crm-kamount { margin-left: auto; font-size: 11px; color: var(--sh-text-3); }
.crm-kbody { display: flex; flex-direction: column; gap: 6px; }
.crm-kcard { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 8px; padding: 8px 10px; cursor: grab; transition: transform .15s; }
.crm-kcard:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.crm-kcard-name { font-size: 12.5px; font-weight: 600; }
.crm-kcard-sub { font-size: 11px; color: var(--sh-text-3); }
.crm-kcard-amt { font-size: 11.5px; color: var(--sh-green-dark); margin-top: 3px; }
.crm-kempty { font-size: 11px; color: var(--sh-text-3); text-align: center; padding: 12px 0; }
.crm-fu-item { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px dashed var(--sh-border); font-size: 12.5px; }
.crm-fu-type { background: var(--sh-bg); border-radius: 4px; padding: 1px 7px; font-size: 11px; color: var(--sh-text-2); flex: 0 0 auto; }
.crm-fu-content { flex: 1; color: var(--sh-text-2); }
.crm-fu-company { color: var(--sh-text-3); font-size: 11.5px; }
.crm-fu-time { color: var(--sh-text-3); font-size: 11px; }
.crm-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 90vw; background: var(--sh-surface); border-left: 1px solid var(--sh-border); box-shadow: -8px 0 30px rgba(0,0,0,0.3); z-index: 200; display: flex; flex-direction: column; animation: dropScale .2s ease; }
.crm-drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--sh-border); }
.crm-drawer-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; }
.crm-drawer-close { margin-left: auto; border: none; background: var(--sh-bg); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--sh-text-2); }
.crm-drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.crm-ds { margin-bottom: 18px; }
.crm-ds-title { font-size: 11.5px; font-weight: 700; color: var(--sh-text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.crm-opp-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 2px; border-bottom: 1px dashed var(--sh-border); font-size: 12.5px; }
.crm-fu-row { display: flex; gap: 8px; padding: 6px 2px; border-bottom: 1px dashed var(--sh-border); font-size: 12px; color: var(--sh-text-2); }
.crm-ai-box { position: fixed; bottom: 24px; right: 24px; width: 320px; background: var(--sh-surface); border: 1px solid rgba(99,102,241,0.3); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.35); padding: 14px; z-index: 300; animation: dropScale .2s ease; }

/* Y3 CRM 同步状态 */
.ip-crm-sync { font-size: 11px; color: var(--sh-text-3); margin-top: 6px; padding: 4px 8px; background: var(--sh-bg); border-radius: 6px; text-align: center; }
.ip-crm-sync[data-ok="1"] { color: var(--cl-success); }

/* Z2 自动建档状态 */
.ip-auto-status { font-size: 12px; color: var(--sh-text-2); background: var(--sh-bg); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; line-height: 1.5; }
/* 建档滚动条隐藏（滑杆消失，鼠标仍可滚） */
.inbox-profile { scrollbar-width: none; -ms-overflow-style: none; }
.inbox-profile::-webkit-scrollbar { display: none; }
.ip-section { margin-bottom: 10px; }

/* 社媒卡片跳转 */
.ck-social-link { display: block; text-decoration: none; color: inherit; background: var(--sh-bg); border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; padding: 10px 12px; position: relative; transition: transform .18s, box-shadow .18s; cursor: pointer; }
.ck-social-link:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
.ck-sc-go { position: absolute; top: 6px; right: 8px; font-size: 12px; opacity: 0.5; }
.ck-social-link:hover .ck-sc-go { opacity: 1; }

/* AA2 Shopify 风格建站台 */
.shopify { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 12px; overflow: hidden; }
.shopify-top { display: flex; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--sh-border); gap: 12px; }
.shopify-store-name { font-size: 14px; }
.shopify-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.shopify-status { font-size: 12px; padding: 4px 10px; border-radius: 20px; background: var(--sh-bg); color: var(--sh-text-3); }
.shopify-status-live { background: rgba(16,185,129,0.15); color: var(--cl-success); }
.shopify-body { min-height: 480px; } /* T94：页内导航已移除，主区单列由左侧导航驱动 */
@media (max-width: 900px) { .shopify-body { grid-template-columns: 1fr; } }
.shopify-nav { border-right: 1px solid var(--sh-border); padding: 10px 0; }
.shopify-nav-item { display: block; width: 100%; text-align: left; border: none; background: transparent; color: var(--sh-text-2); font-size: 13px; padding: 10px 18px; cursor: pointer; }
.shopify-nav-item:hover { background: var(--sh-bg); }
.shopify-nav-item.active { background: linear-gradient(90deg, rgba(99,102,241,0.12), transparent); color: var(--cl-primary); font-weight: 600; border-left: 3px solid var(--cl-primary); }
.shopify-main { padding: 18px; }
.shopify-section-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.shopify-hint { font-size: 11.5px; color: var(--sh-text-3); font-weight: 400; }
.shopify-inuse { background: rgba(16,185,129,0.15); color: var(--cl-success); font-size: 10.5px; padding: 1px 8px; border-radius: 10px; margin-left: 4px; }
.tpl-thumb svg { width: 100%; height: 100%; display: block; border-radius: 8px 8px 0 0; }
.shopify-page-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px dashed var(--sh-border); }
.shopify-set-row { display: flex; justify-content: space-between; padding: 10px 4px; border-bottom: 1px dashed var(--sh-border); font-size: 13px; color: var(--sh-text-3); }

/* BB2 弹窗 + 规格行 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 400; display: flex; align-items: center; justify-content: center; }
.modal-overlay.hidden { display: none; }
.modal-card { background: var(--sh-surface); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.4); display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--sh-border); }
.modal-head h3 { font-size: 14px; margin: 0; }
.modal-close { border: none; background: var(--sh-bg); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; color: var(--sh-text-2); }
.modal-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-row label { font-size: 12px; color: var(--sh-text-3); }
.form-row input, .form-row textarea { background: var(--sh-bg); border: 1px solid var(--sh-border); border-radius: 8px; padding: 8px 10px; color: var(--sh-text-2); font-size: 13px; }
.spec-row { display: flex; gap: 6px; margin-bottom: 6px; }
.spec-row input { flex: 1; }
.page-block-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed var(--sh-border); }

/* CC2 自动化合并 */
.auto-sug-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed var(--sh-border); }

/* DD2 自动化任务 */
.auto-tpls { display: flex; gap: 8px; flex-wrap: wrap; }
.auto-sched { display: flex; gap: 8px; }
.auto-sched select, .auto-sched input { background: var(--sh-bg); border: 1px solid var(--sh-border); border-radius: 8px; padding: 7px 10px; color: var(--sh-text-2); font-size: 12.5px; }

/* HH2：pending 确认浮层（fixed 顶层 + 遮罩，必定可见） */
.pm-overlay { position: fixed; inset: 0; z-index: 5000; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; animation: pmFade .18s ease; backdrop-filter: blur(2px); }
@keyframes pmFade { from { opacity: 0; } to { opacity: 1; } }
.pm-box { width: 420px; max-width: 92vw; background: var(--sh-surface); border: 1px solid rgba(215,44,13,0.35); border-radius: 14px; box-shadow: 0 16px 50px rgba(0,0,0,0.5); padding: 20px; animation: pmPop .2s ease; }
.pm-box.pm-wide { width: 560px; max-width: 94vw; }
@keyframes pmPop { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.pm-head { font-size: 15px; font-weight: 800; color: var(--cl-danger-dark); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.pm-sub { font-size: 12.5px; color: var(--sh-text-2); margin-bottom: 10px; }
.pm-detail { background: var(--sh-bg); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; max-height: 300px; overflow-y: auto; }
.pm-detail .cm-confirm-item { border-bottom: 1px dashed var(--sh-border); padding: 5px 0; font-size: 13px; color: var(--sh-text); }
.pm-tip { font-size: 11.5px; color: var(--sh-text-3); margin-bottom: 14px; }
.pm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.pm-actions .btn { padding: 8px 18px; font-size: 13px; border-radius: 8px; cursor: pointer; }
.pm-actions .btn-danger { background: var(--cl-danger-dark); color: #fff; border: none; }
.pm-actions .btn-danger:hover { background: #B91C1C; }
.cm-pending-note { font-size: 12px; color: var(--cl-danger-dark); background: rgba(220,38,38,0.08); border: 1px dashed rgba(220,38,38,0.3); border-radius: 8px; padding: 8px 12px; margin-top: 8px; }

/* 落地方式注册表：Meta 广告创建确认卡分项样式 */
.cm-ad-confirm { padding: 8px 2px !important; }.cm-ad-title { font-size: 13.5px; font-weight: 700; color: var(--sh-text); margin-bottom: 8px; }
.cm-ad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-bottom: 8px; }
.cm-ad-grid > div { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 8px; padding: 6px 8px; }
.cm-ad-k { font-size: 11px; color: var(--sh-text-2); font-weight: 600; display: block; margin-bottom: 2px; }
.cm-ad-v { font-size: 12.5px; color: var(--sh-text); word-break: break-all; }
.cm-ad-copy { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 8px; padding: 8px; }
.cm-ad-copy ul { margin: 2px 0 6px 16px; padding: 0; }
.cm-ad-copy li { font-size: 12px; color: var(--sh-text); line-height: 1.5; }
.cm-ad-copy-h, .cm-ad-copy-b { font-size: 11.5px; font-weight: 600; color: var(--sh-text-2); margin-top: 4px; }

/* KK3 线索评分徽章 */
.inbox-score { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 10px; padding: 0 6px; margin-left: 6px; vertical-align: 1px; }

/* T91：关键项前置询问快捷回答按钮 */
.cm-clarify { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cm-clarify-chip { background: var(--sh-surface); border: 1px solid var(--sh-border); border-radius: 16px; padding: 6px 14px; font-size: 12.5px; color: var(--sh-text); cursor: pointer; transition: all .15s ease; }
.cm-clarify-chip:hover { border-color: var(--sh-accent, var(--cl-info)); color: var(--sh-accent, var(--cl-info)); background: rgba(24,95,165,.08); }

/* T92：驾驶舱广告系列可操作列表 */
.ck-ads-sep { margin: 12px 0 6px; padding-top: 10px; border-top: 1px dashed var(--sh-border); font-size: 12px; font-weight: 600; color: var(--sh-text-2); }
.ck-ads-table { margin-top: 4px; }
.ck-ads-table td { padding: 6px 8px; font-size: 12.5px; }
.ck-ads-table .btn { padding: 3px 10px; font-size: 11.5px; margin-right: 4px; }
.ck-ad-status { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 8px; }
.ck-ads-empty { font-size: 12px; color: var(--sh-text-3); padding: 10px 0; }

/* T92：工作台广告快捷操作卡 */
.dp-ad-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dp-ad-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.ad-quick-foot { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--sh-border); text-align: right; }
.ad-quick-foot a:hover { color: var(--sh-accent, var(--cl-info)); }

/* T94：导航子项行内动作（主题行 👁 预览） */
.nav-item.nav-sub { display: flex; align-items: center; gap: 4px; }
.nav-sub-action { margin-left: auto; margin-right: 6px; font-size: 13px; opacity: 0.75; cursor: pointer; padding: 1px 5px; border-radius: 6px; }
.nav-sub-action:hover { opacity: 1; background: rgba(99,102,241,0.12); }

/* T95：独立站数据看板 */
.shopify-data .ck-table { margin-top: 6px; }
.shopify-data .ck-table td, .shopify-data .ck-table th { padding: 6px 10px; font-size: 12.5px; }

/* ===== U3：动效体系组件（Toast / 骨架屏 / 页面切换 / 呼吸灯） ===== */
/* Toast 容器与消息 */
.th-toast-wrap { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.th-toast { background: var(--sh-surface); border: 1px solid var(--sh-border); border-left: 3px solid var(--cl-primary); border-radius: 10px; box-shadow: var(--sh-lg); padding: 10px 16px; font-size: var(--fs-base); color: var(--sh-text); display: flex; align-items: center; gap: 8px; animation: thToastIn 240ms var(--ease-out); max-width: 420px; }
.th-toast.success { border-left-color: var(--cl-success); }
.th-toast.error { border-left-color: var(--cl-danger); }
.th-toast.warn { border-left-color: var(--cl-warning); }
.th-toast.out { animation: thToastOut 200ms var(--ease-std) forwards; }
@keyframes thToastOut { to { opacity: 0; transform: translateY(-12px); } }
/* 骨架屏 */
.th-skeleton { background: linear-gradient(90deg, var(--cl-bg-elevated) 25%, rgba(99,102,241,0.06) 50%, var(--cl-bg-elevated) 75%); background-size: 800px 100%; animation: thShimmer 1.2s infinite linear; border-radius: var(--r-sm); }
.th-skeleton-line { height: 12px; margin: 6px 0; }
.th-skeleton-block { height: 72px; }
/* 内容区切换（页面淡入） */
.page-content { animation: thPageIn 240ms var(--ease-out); }
/* 询盘红点呼吸 */
.th-dot-pulse { animation: thPulse 1.6s ease-in-out infinite; }
/* 统计数字入场 */
.th-count-in { animation: thCountUp 400ms var(--ease-out); }
/* 暗色主题动效适配（data-theme=dark，与 applyTheme 一致） */
html[data-theme="dark"] .th-toast { background: #161b22; border-color: #30363d; color: #e6edf3; }
html[data-theme="dark"] .card:hover, html[data-theme="dark"] .panel:hover,
html[data-theme="dark"] .metric-card:hover, html[data-theme="dark"] .metric-block:hover { box-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 12px 32px rgba(0,0,0,0.5); }

/* UX P0-3：深色模式补漏（表单/表格/模态） */
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea {
  background: #0f1115; color: #e8eaed; border-color: #2a2e37;
}
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #6b7280; }
html[data-theme="dark"] table.table thead th { background: #161b22; color: #9aa0a6; border-color: #2a2e37; }
html[data-theme="dark"] table.table td { border-color: #22262e; color: #e8eaed; }
html[data-theme="dark"] .modal-card, html[data-theme="dark"] .modal { background: #171a21; color: #e8eaed; border-color: #2a2e37; }
html[data-theme="dark"] .kpi .v, html[data-theme="dark"] .kpi .l { color: #e8eaed; }
html[data-theme="dark"] .metric-block, html[data-theme="dark"] .panel { background: #171a21; }
html[data-theme="dark"] .sb-hamburger { background: #171a21; color: #e8eaed; }
