/* ===== LinkSight Theme System ===== */
:root, [data-theme=dark] {
  /* --- 设计令牌 v1（与 /var/www/shared/DESIGN_GUIDE.md 对齐，新页面强制使用） --- */
  --ls-brand: #E11D48;          /* 镜界产品色：玫红 */
  --ls-success: #10B981;
  --ls-warning: #F59E0B;
  --ls-danger: #EF4444;
  --ls-info: #3B82F6;
  --ls-radius: 12px;            /* 卡片/按钮/输入框统一圆角 */
  --ls-t-caption: 12px;         /* 字级 5 档：标签/徽章/辅助 */
  --ls-t-body: 14px;            /* 正文/输入框/按钮 */
  --ls-t-title: 16px;           /* 卡片标题（bold） */
  --ls-t-head: 20px;            /* 页面标题（bold） */
  --ls-t-hero: 28px;            /* 大数字/主视觉（bold） */
  --ls-card-pad: 20px;          /* 卡片内边距（桌面），移动端 16px */
  --ls-card-gap: 24px;          /* 卡片间距（桌面），移动端 16px */

  --ls-bg: #0a0a0f;
  --ls-surface: #0f0f14;
  --ls-surface-2: #1a1a2e;
  --ls-card-bg: rgba(255,255,255,0.03);
  --ls-card-border: rgba(255,255,255,0.08);
  --ls-text: #ffffff;
  --ls-text-2: #e5e7eb;
  --ls-text-3: #d1d5db;
  --ls-text-muted: #9ca3af;
  --ls-border: rgba(255,255,255,0.1);
  --ls-hover-bg: rgba(255,255,255,0.05);
  --ls-input-bg: #1a1a2e;
  --ls-nav-bg: rgba(10,10,10,0.85);
}

[data-theme=light] {
  --ls-bg: #f8fafc;
  --ls-surface: #ffffff;
  --ls-surface-2: #f1f5f9;
  --ls-card-bg: #ffffff;
  --ls-card-border: rgba(0,0,0,0.08);
  --ls-text: #0f172a;
  --ls-text-2: #334155;
  --ls-text-3: #64748b;
  --ls-text-muted: #94a3b8;
  --ls-border: rgba(0,0,0,0.1);
  --ls-hover-bg: rgba(0,0,0,0.03);
  --ls-input-bg: #ffffff;
  --ls-nav-bg: rgba(248,250,252,0.9);
}

/* ===== Base ===== */
[data-theme=light] body {
  background-color: var(--ls-bg) !important;
  color: var(--ls-text-2) !important;
}

/* ===== 导航栏强制覆盖 ===== */
[data-theme=light] aside,
[data-theme=light] .nav-drawer {
  background-color: var(--ls-surface) !important;
}
[data-theme=light] aside .border-b,
[data-theme=light] aside .border-r,
[data-theme=light] .nav-drawer .border-b,
[data-theme=light] .nav-drawer .border-r {
  border-color: var(--ls-border) !important;
}

/* ===== 所有输入框兜底覆盖 ===== */
[data-theme=light] input,
[data-theme=light] select,
[data-theme=light] textarea {
  background-color: var(--ls-input-bg) !important;
  color: var(--ls-text) !important;
  border-color: var(--ls-border) !important;
}
[data-theme=light] input::placeholder,
[data-theme=light] textarea::placeholder {
  color: var(--ls-text-muted) !important;
}

/* ===== Tailwind class 覆盖 ===== */
[data-theme=light] .bg-\[#0a0a0f\] { background-color: var(--ls-bg) !important; }
[data-theme=light] .bg-\[#0f0f14\] { background-color: var(--ls-surface) !important; }
[data-theme=light] .bg-\[#1a1a2e\] { background-color: var(--ls-surface-2) !important; }
[data-theme=light] .bg-black\/60 { background-color: rgba(0,0,0,0.2) !important; }

[data-theme=light] .border-white\/5,
[data-theme=light] .border-white\/10 { border-color: var(--ls-border) !important; }

[data-theme=light] .text-gray-100 { color: var(--ls-text-2) !important; }
[data-theme=light] .text-gray-200 { color: var(--ls-text-2) !important; }
[data-theme=light] .text-gray-300 { color: var(--ls-text-3) !important; }
[data-theme=light] .text-gray-400 { color: var(--ls-text-muted) !important; }
[data-theme=light] .text-gray-500 { color: var(--ls-text-muted) !important; }
[data-theme=light] .text-gray-600 { color: var(--ls-text-3) !important; }
[data-theme=light] .text-white { color: var(--ls-text) !important; }

[data-theme=light] .placeholder-gray-500::placeholder { color: var(--ls-text-muted) !important; }

[data-theme=light] .hover\:text-white:hover { color: var(--ls-text) !important; }
[data-theme=light] .hover\:bg-white\/5:hover { background-color: var(--ls-hover-bg) !important; }
[data-theme=light] .hover\:bg-white\/\[0\.03\]:hover { background-color: var(--ls-hover-bg) !important; }
[data-theme=light] .hover\:bg-white\/\[0\.05\]:hover { background-color: var(--ls-hover-bg) !important; }

/* ===== 自定义 class ===== */
[data-theme=light] .card {
  background: var(--ls-card-bg) !important;
  border-color: var(--ls-card-border) !important;
}
[data-theme=light] .btn-secondary {
  background: rgba(0,0,0,0.05) !important;
  color: var(--ls-text) !important;
}
[data-theme=light] .nav-item-active {
  background: rgba(225,29,72,0.08) !important;
}
[data-theme=light] .step-dot.pending {
  background: var(--ls-hover-bg) !important;
  color: var(--ls-text-muted) !important;
  border-color: var(--ls-border) !important;
}
[data-theme=light] .dimension-card {
  background: var(--ls-card-bg) !important;
  border-color: var(--ls-card-border) !important;
}
[data-theme=light] .dimension-card:hover {
  background: rgba(225,29,72,0.03) !important;
}
[data-theme=light] .score-ring-bg {
  stroke: var(--ls-card-border) !important;
}
[data-theme=light] .step-line {
  background: var(--ls-border) !important;
}
[data-theme=light] #mobile-nav-overlay {
  background: rgba(0,0,0,0.2) !important;
}

/* ===== 主题切换按钮 ===== */
[data-theme=light] #theme-toggle-btn {
  border-color: var(--ls-border) !important;
  background-color: var(--ls-hover-bg) !important;
  color: var(--ls-text-muted) !important;
}
[data-theme=light] #theme-toggle-btn:hover {
  background-color: rgba(0,0,0,0.06) !important;
  color: var(--ls-text) !important;
}

/* ===== 统一组件系统 ===== */

/* --- Button --- */
.ls-btn {
  background: linear-gradient(135deg, #E11D48, #991B1B);
  color: white; padding: 10px 20px; border-radius: var(--ls-radius);
  font-weight: 600; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s; font-size: 14px; line-height: 1.4;
}
.ls-btn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.ls-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ls-btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.ls-btn-lg { padding: 12px 28px; font-size: 15px; border-radius: var(--ls-radius); }

.ls-btn-secondary {
  background: var(--ls-hover-bg); color: var(--ls-text);
  padding: 10px 20px; border-radius: var(--ls-radius); border: 1px solid var(--ls-border);
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s; font-size: 14px;
}
.ls-btn-secondary:hover:not(:disabled) { background: var(--ls-border); }
.ls-btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.ls-btn-ghost {
  background: transparent; color: var(--ls-text-muted);
  padding: 8px 14px; border-radius: var(--ls-radius); border: none;
  font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s; font-size: 14px;
}
.ls-btn-ghost:hover { background: var(--ls-hover-bg); color: var(--ls-text); }

/* --- Input / Select / Textarea --- */
.ls-input {
  background: var(--ls-input-bg); border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius); padding: 10px 14px; color: var(--ls-text);
  font-size: 14px; width: 100%; outline: none;
  transition: border-color 0.2s;
}
.ls-input:focus { border-color: #E11D48; }
.ls-input::placeholder { color: var(--ls-text-muted); }

.ls-select {
  background: var(--ls-input-bg); border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius); padding: 10px 14px; color: var(--ls-text);
  font-size: 14px; width: 100%; outline: none;
  transition: border-color 0.2s; appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 10px center; background-repeat: no-repeat; background-size: 16px;
  padding-right: 36px;
}
[data-theme=light] .ls-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}
.ls-select:focus { border-color: #E11D48; }

.ls-textarea {
  background: var(--ls-input-bg); border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius); padding: 10px 14px; color: var(--ls-text);
  font-size: 14px; width: 100%; outline: none;
  transition: border-color 0.2s; resize: vertical;
}
.ls-textarea:focus { border-color: #E11D48; }
.ls-textarea::placeholder { color: var(--ls-text-muted); }

/* --- Card --- */
.ls-card {
  background: var(--ls-card-bg); border: 1px solid var(--ls-card-border);
  border-radius: 12px; padding: 20px;
  transition: all 0.2s;
}
.ls-card-hover:hover {
  border-color: rgba(225,29,72,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(225,29,72,0.08);
}

/* --- Table --- */
.ls-table {
  width: 100%; font-size: 14px; border-collapse: collapse;
}
.ls-table thead tr {
  border-bottom: 1px solid var(--ls-border);
  color: var(--ls-text-muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.ls-table thead th {
  text-align: left; padding: 12px 16px; font-weight: 500;
}
.ls-table tbody tr {
  border-bottom: 1px solid var(--ls-border);
  transition: background 0.15s;
}
.ls-table tbody tr:hover {
  background: var(--ls-hover-bg);
}
.ls-table tbody td {
  padding: 14px 16px; vertical-align: middle;
}
.ls-table tbody td:first-child,
.ls-table thead th:first-child { padding-left: 20px; }
.ls-table tbody td:last-child,
.ls-table thead th:last-child { padding-right: 20px; }

/* --- Empty State --- */
.ls-empty {
  text-align: center; padding: 64px 20px; color: var(--ls-text-muted);
}
.ls-empty i {
  font-size: 48px; margin-bottom: 16px; opacity: 0.3; display: block;
}
.ls-empty .title {
  font-size: 15px; font-weight: 500; color: var(--ls-text-3); margin-bottom: 6px;
}
.ls-empty .hint {
  font-size: 13px; color: var(--ls-text-muted);
}

/* --- Page Title --- */
.ls-page-title {
  font-size: 20px; font-weight: 700; color: var(--ls-text);
  margin-bottom: 4px;
}
.ls-page-subtitle {
  font-size: 13px; color: var(--ls-text-muted);
}

/* --- Section Title --- */
.ls-section-title {
  font-size: 14px; font-weight: 600; color: var(--ls-text-2);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}

/* --- Badge --- */
.ls-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
}
.ls-badge-red { background: rgba(225,29,72,0.1); color: #E11D48; }
.ls-badge-green { background: rgba(34,197,94,0.1); color: #22c55e; }
.ls-badge-blue { background: rgba(59,130,246,0.1); color: #3b82f6; }
.ls-badge-yellow { background: rgba(234,179,8,0.1); color: #eab308; }
.ls-badge-gray { background: var(--ls-hover-bg); color: var(--ls-text-muted); }
.ls-badge-orange { background: rgba(249,115,22,0.1); color: #f97316; }

/* --- Tag Pill --- */
.ls-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.ls-tag:hover { opacity: 0.85; }
.ls-tag.active { box-shadow: 0 0 0 2px rgba(225,29,72,0.3); }

/* --- Divider --- */
.ls-divider {
  height: 1px; background: var(--ls-border); margin: 16px 0;
}

/* --- Modal / Drawer backdrop --- */
.ls-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 50; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
[data-theme=light] .ls-backdrop { background: rgba(0,0,0,0.4); }

.ls-drawer {
  position: fixed; top: 0; right: 0; width: 480px; max-width: 90vw;
  height: 100vh; background: var(--ls-surface);
  border-left: 1px solid var(--ls-border);
  z-index: 60; overflow-y: auto;
  animation: slideInRight 0.3s ease;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* --- Tabs --- */
.ls-tabs {
  display: flex; gap: 4px; padding: 4px;
  background: var(--ls-hover-bg); border-radius: 10px;
}
.ls-tab {
  padding: 8px 16px; border-radius: var(--ls-radius); font-size: 13px; font-weight: 500;
  color: var(--ls-text-muted); cursor: pointer; border: none; background: transparent;
  transition: all 0.2s;
}
.ls-tab.active {
  background: var(--ls-card-bg); color: var(--ls-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.ls-tab:hover:not(.active) { color: var(--ls-text-2); }

/* --- Search bar --- */
.ls-search {
  position: relative; flex: 1;
}
.ls-search i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ls-text-muted); font-size: 14px; pointer-events: none;
}
.ls-search input {
  width: 100%; padding: 10px 14px 10px 38px;
  background: var(--ls-input-bg); border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius); color: var(--ls-text); font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.ls-search input:focus { border-color: #E11D48; }
.ls-search input::placeholder { color: var(--ls-text-muted); }

/* --- Pagination --- */
.ls-pagination {
  display: flex; align-items: center; gap: 4px;
}
.ls-page-btn {
  min-width: 32px; height: 32px; padding: 0 8px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: 13px; font-weight: 500;
  background: transparent; color: var(--ls-text-muted);
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.15s;
}
.ls-page-btn:hover:not(:disabled) { background: var(--ls-hover-bg); color: var(--ls-text); }
.ls-page-btn.active { background: #E11D48; color: white; border-color: #E11D48; }
.ls-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* --- Skeleton --- */
.ls-skeleton {
  background: linear-gradient(90deg, var(--ls-hover-bg) 25%, var(--ls-card-bg) 50%, var(--ls-hover-bg) 75%);
  background-size: 200% 100%; animation: skeleton 1.5s infinite;
  border-radius: 6px;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Toast --- */
.ls-toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 500;
  color: white; z-index: 100; animation: toastSlide 0.3s ease;
  display: flex; align-items: center; gap: 10px;
}
.ls-toast-success { background: #22c55e; }
.ls-toast-error { background: #E11D48; }
.ls-toast-info { background: #3b82f6; }
@keyframes toastSlide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

[data-theme=light] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
[data-theme=light] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }
[data-theme=light] * { scrollbar-color: rgba(0,0,0,0.15) transparent; }


/* ===== Product Theme Colors ===== */
:root, [data-theme=dark] {
  --ls-wave: #10B981;
  --ls-wave-soft: rgba(16, 185, 129, 0.12);
  --ls-zhi: #7C3AED;
  --ls-zhi-soft: rgba(124, 58, 237, 0.12);
  --ls-sight: #E11D48;
  --ls-sight-soft: rgba(225, 29, 72, 0.12);
}

[data-theme=light] {
  --ls-wave: #059669;
  --ls-wave-soft: rgba(5, 150, 105, 0.10);
  --ls-zhi: #5B21B6;
  --ls-zhi-soft: rgba(91, 33, 182, 0.10);
  --ls-sight: #E11D48;
  --ls-sight-soft: rgba(225, 29, 72, 0.10);
}

.ls-wave-text { color: var(--ls-wave) !important; }
.ls-wave-bg { background-color: var(--ls-wave-soft) !important; }
.ls-wave-border { border-color: var(--ls-wave) !important; }
.ls-zhi-text { color: var(--ls-zhi) !important; }
.ls-zhi-bg { background-color: var(--ls-zhi-soft) !important; }
.ls-zhi-border { border-color: var(--ls-zhi) !important; }
.ls-sight-text { color: var(--ls-sight) !important; }
.ls-sight-bg { background-color: var(--ls-sight-soft) !important; }
.ls-sight-border { border-color: var(--ls-sight) !important; }

/* ===== Polished cards ===== */
.ls-card-polish {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ls-card-polish:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
}

/* Product strip on top of cards */
.ls-product-strip-wave { border-top: 3px solid var(--ls-wave); }
.ls-product-strip-zhi { border-top: 3px solid var(--ls-zhi); }
.ls-product-strip-sight { border-top: 3px solid var(--ls-sight); }

/* Source badges */
.ls-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 500;
}

/* ===== Dashboard 看板美化（2026-08，仅 #dashboard 页使用）===== */
.dash-title-bar {
  display: inline-block; width: 4px; height: 22px; border-radius: 999px;
  background: linear-gradient(180deg, #FB7185, #991B1B);
  box-shadow: 0 0 12px rgba(225,29,72,0.5);
}
.dash-card-title {
  font-size: var(--ls-t-title); font-weight: 600; color: var(--ls-text);
  display: flex; align-items: center; gap: 10px;
}
.dash-icon-chip {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.dash-num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.dash-kpi { position: relative; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.dash-kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.35); border-color: rgba(225,29,72,0.30); }
.dash-kpi-hero {
  background: linear-gradient(135deg, rgba(225,29,72,0.22), rgba(153,27,27,0.10)) !important;
  border-color: rgba(225,29,72,0.40) !important;
  box-shadow: 0 6px 26px rgba(225,29,72,0.14);
}
.dash-kpi-hero::after {
  content: ''; position: absolute; top: -40%; right: -20%; width: 70%; height: 120%;
  background: radial-gradient(circle, rgba(251,113,133,0.16), transparent 70%);
  pointer-events: none;
}

.dash-action { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease; }
.dash-action:hover {
  transform: translateY(-2px);
  border-color: rgba(225,29,72,0.35) !important;
  box-shadow: 0 10px 26px rgba(225,29,72,0.10);
  background: rgba(225,29,72,0.06);
}
.dash-action:hover .dash-action-arrow { color: #FB7185; transform: translateX(3px); }
.dash-action-arrow { transition: transform 0.18s ease, color 0.18s ease; }

.dash-refresh {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--ls-t-caption); color: var(--ls-text-muted);
  padding: 8px 14px; border-radius: var(--ls-radius);
  border: 1px solid var(--ls-card-border); background: var(--ls-card-bg);
  cursor: pointer; transition: all 0.18s ease;
}
.dash-refresh:hover { color: var(--ls-text); border-color: rgba(225,29,72,0.4); background: rgba(225,29,72,0.08); }

.dash-qa {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--ls-radius);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  color: var(--ls-text-2); font-size: var(--ls-t-body); text-align: left;
  cursor: pointer; transition: all 0.16s ease;
}
.dash-qa i { color: #FB7185; width: 16px; text-align: center; font-size: 13px; }
.dash-qa:hover { background: rgba(225,29,72,0.10); border-color: rgba(225,29,72,0.35); color: var(--ls-text); transform: translateX(2px); }

[data-theme=light] .dash-qa { background: rgba(0,0,0,0.03); border-color: var(--ls-border); }
[data-theme=light] .dash-qa:hover { background: rgba(225,29,72,0.06); }
[data-theme=light] .dash-kpi-hero { background: linear-gradient(135deg, rgba(225,29,72,0.10), rgba(225,29,72,0.04)) !important; }

/* ===== Marketing 营销页美化（2026-08，仅 #marketing 页 标签管理/客群筛选/精准推送 使用）===== */

/* --- 统计数字卡 --- */
.mkt-stat { position: relative; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.mkt-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.35); border-color: rgba(225,29,72,0.30); }
.mkt-stat-num { font-size: var(--ls-t-hero); font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.mkt-stat-label { font-size: var(--ls-t-caption); color: var(--ls-text-muted); margin-top: 4px; }
.mkt-icon-chip {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
@media (max-width: 768px) { .mkt-stat-num { font-size: var(--ls-t-head); } }

/* --- 标签卡片墙 --- */
.mkt-tag-card { position: relative; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.mkt-tag-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--tag-color, #F43F5E); opacity: 0.9;
}
.mkt-tag-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.16);
}
.mkt-tag-dot { width: 12px; height: 12px; border-radius: 999px; box-shadow: 0 0 8px var(--tag-color, transparent); }
.mkt-tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 12px; border-radius: 999px; font-size: var(--ls-t-caption); font-weight: 500;
}
.mkt-mini-stat { background: rgba(255,255,255,0.04); border-radius: 10px; padding: 8px; text-align: center; }
.mkt-mini-stat-num { font-size: var(--ls-t-title); font-weight: 700; font-variant-numeric: tabular-nums; }
.mkt-mini-stat-label { font-size: var(--ls-t-caption); color: var(--ls-text-muted); margin-top: 1px; }

/* --- 颜色色板点选 --- */
.mkt-color-dot {
  width: 26px; height: 26px; border-radius: 999px; cursor: pointer; flex-shrink: 0;
  border: 2px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mkt-color-dot:hover { transform: scale(1.15); }
.mkt-color-dot.active { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.18); }

/* --- 客群筛选规则树 --- */
.mkt-seg-group {
  position: relative; border-radius: var(--ls-radius);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  padding: 12px 12px 12px 18px; margin-bottom: 12px;
}
.mkt-seg-group::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px 0 0 4px; }
.mkt-seg-group-and { border-color: rgba(59,130,246,0.22); }
.mkt-seg-group-and::before { background: linear-gradient(180deg, #60A5FA, #1D4ED8); box-shadow: 0 0 10px rgba(59,130,246,0.35); }
.mkt-seg-group-or { border-color: rgba(245,158,11,0.22); }
.mkt-seg-group-or::before { background: linear-gradient(180deg, #FBBF24, #B45309); box-shadow: 0 0 10px rgba(245,158,11,0.35); }

.mkt-op-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: var(--ls-t-caption); font-weight: 600;
}
.mkt-op-and { background: rgba(59,130,246,0.12); color: #60A5FA; border: 1px solid rgba(59,130,246,0.30); }
.mkt-op-or { background: rgba(245,158,11,0.12); color: #FBBF24; border: 1px solid rgba(245,158,11,0.30); }

.mkt-seg-cond {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 8px 12px; border-radius: var(--ls-radius);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.15s ease;
}
.mkt-seg-cond:hover { border-color: rgba(225,29,72,0.30); }
.mkt-seg-cond .ls-select, .mkt-seg-cond .ls-input { height: 34px; min-width: 0; }

/* --- 弱化次要按钮（添加条件/条件组） --- */
.mkt-btn-subtle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--ls-radius);
  border: 1px dashed rgba(255,255,255,0.15); background: transparent;
  color: var(--ls-text-muted); font-size: var(--ls-t-caption); font-weight: 500;
  cursor: pointer; transition: all 0.15s ease;
}
.mkt-btn-subtle:hover { border-color: rgba(225,29,72,0.45); color: #FB7185; background: rgba(225,29,72,0.06); }

/* --- 预估人数醒目展示 --- */
.mkt-count-hero {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.30);
  color: #34D399; font-size: var(--ls-t-caption); font-weight: 500;
}
.mkt-count-hero b { font-size: var(--ls-t-title); font-weight: 700; font-variant-numeric: tabular-nums; }
.mkt-count-hero i { align-self: center; }

/* --- 活动卡片 --- */
.mkt-campaign { position: relative; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.mkt-campaign::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.mkt-campaign-draft::before { background: linear-gradient(180deg, #FBBF24, #B45309); }
.mkt-campaign-sent::before { background: linear-gradient(180deg, #34D399, #047857); }
.mkt-campaign-sending::before { background: linear-gradient(180deg, #60A5FA, #1D4ED8); }
.mkt-campaign-partial::before { background: linear-gradient(180deg, #FB923C, #C2410C); }
.mkt-campaign-failed::before { background: linear-gradient(180deg, #F87171, #B91C1C); }
.mkt-campaign:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.35); border-color: rgba(255,255,255,0.14); }

.mkt-channel-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: var(--ls-t-caption);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: var(--ls-text-3);
}
.mkt-channel-chip i { color: #FB7185; font-size: 11px; }

.mkt-metric { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--ls-radius); padding: 12px; text-align: center; }
.mkt-metric-num { font-size: var(--ls-t-head); font-weight: 700; font-variant-numeric: tabular-nums; }
.mkt-metric-label { font-size: var(--ls-t-caption); color: var(--ls-text-muted); margin-top: 2px; }

/* --- 抽屉表单分组 --- */
.mkt-form-section {
  border: 1px solid rgba(255,255,255,0.07); border-radius: var(--ls-radius);
  padding: 16px; background: rgba(255,255,255,0.02);
}
.mkt-form-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--ls-t-body); font-weight: 600; color: var(--ls-text-2);
  margin-bottom: 12px;
}
.mkt-step-num {
  width: 20px; height: 20px; border-radius: 999px; flex-shrink: 0;
  background: rgba(225,29,72,0.15); color: #FB7185;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* --- 发送二次确认弹窗 --- */
.mkt-confirm-card {
  background: var(--ls-surface); border: 1px solid var(--ls-border);
  border-radius: 16px; padding: 24px;
  max-width: 400px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* --- 浅色主题适配 --- */
[data-theme=light] .mkt-seg-group { background: rgba(0,0,0,0.02); }
[data-theme=light] .mkt-seg-cond { background: rgba(0,0,0,0.03); border-color: var(--ls-border); }
[data-theme=light] .mkt-mini-stat { background: rgba(0,0,0,0.03); }
[data-theme=light] .mkt-metric { background: rgba(0,0,0,0.03); border-color: var(--ls-border); }
[data-theme=light] .mkt-form-section { background: rgba(0,0,0,0.02); border-color: var(--ls-border); }
[data-theme=light] .mkt-btn-subtle { border-color: rgba(0,0,0,0.15); }
[data-theme=light] .mkt-btn-subtle:hover { background: rgba(225,29,72,0.06); }
[data-theme=light] .mkt-channel-chip { background: rgba(0,0,0,0.04); border-color: var(--ls-border); }
[data-theme=light] .mkt-tag-card:hover { border-color: rgba(0,0,0,0.15); box-shadow: 0 10px 26px rgba(0,0,0,0.10); }
[data-theme=light] .mkt-campaign:hover { border-color: rgba(0,0,0,0.15); box-shadow: 0 10px 28px rgba(0,0,0,0.10); }
[data-theme=light] .mkt-stat:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.10); }
[data-theme=light] .mkt-color-dot.active { border-color: #0f172a; box-shadow: 0 0 0 3px rgba(0,0,0,0.12); }

/* --- Marketing 工作流可操作性（2026-08 第二批） --- */

/* 三步流程引导条 */
.mkt-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -10px 0 20px 0; }
.mkt-flow-step {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
  color: var(--ls-text-muted); font-size: var(--ls-t-caption);
  cursor: pointer; transition: all 0.15s ease;
}
.mkt-flow-step:hover { color: var(--ls-text-2); border-color: rgba(225,29,72,0.35); }
.mkt-flow-step.active {
  background: rgba(225,29,72,0.12); border-color: rgba(225,29,72,0.40);
  color: #FB7185; font-weight: 600;
}
.mkt-flow-num {
  width: 16px; height: 16px; border-radius: 999px; flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.mkt-flow-step.active .mkt-flow-num { background: rgba(225,29,72,0.30); }
.mkt-flow-arrow { color: var(--ls-text-muted); opacity: 0.35; font-size: 11px; }

/* 内容卡快捷操作条 */
.mkt-card-actions {
  display: flex; gap: 6px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mkt-card-action {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 8px; border-radius: var(--ls-radius);
  font-size: var(--ls-t-caption); font-weight: 500; white-space: nowrap;
  color: var(--ls-text-muted);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer; transition: all 0.15s ease;
}
.mkt-card-action:hover { color: #FB7185; border-color: rgba(225,29,72,0.40); background: rgba(225,29,72,0.08); }
.mkt-card-action.danger:hover { color: #F87171; border-color: rgba(239,68,68,0.40); background: rgba(239,68,68,0.08); }
.mkt-card-action.mkt-on { color: #34D399; border-color: rgba(16,185,129,0.35); background: rgba(16,185,129,0.08); }
.mkt-card-action.mkt-on:hover { color: #34D399; border-color: rgba(16,185,129,0.5); background: rgba(16,185,129,0.12); }

/* 编辑器标签点选 chips */
.mkt-tag-pick {
  padding: 4px 12px; border-radius: 999px;
  font-size: var(--ls-t-caption);
  border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04);
  color: var(--ls-text-3); cursor: pointer; transition: all 0.15s ease;
}
.mkt-tag-pick:hover { border-color: rgba(225,29,72,0.40); color: #FB7185; }
.mkt-tag-pick.selected { background: rgba(225,29,72,0.15); border-color: rgba(225,29,72,0.45); color: #FB7185; }

[data-theme=light] .mkt-flow-step { background: rgba(0,0,0,0.03); border-color: var(--ls-border); }
[data-theme=light] .mkt-flow-step.active { background: rgba(225,29,72,0.08); }
[data-theme=light] .mkt-flow-num { background: rgba(0,0,0,0.08); }
[data-theme=light] .mkt-card-actions { border-top-color: var(--ls-border); }
[data-theme=light] .mkt-card-action { background: rgba(0,0,0,0.03); border-color: var(--ls-border); }
[data-theme=light] .mkt-tag-pick { background: rgba(0,0,0,0.03); border-color: var(--ls-border); }
[data-theme=light] .mkt-tag-pick.selected { background: rgba(225,29,72,0.08); }

/* ===== Unify 全局统一（2026-08 第三轮，全站通用组件补齐）===== */

/* --- 统一页头：标题竖条 + 主副标题 + 右侧操作区 --- */
.ls-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.ls-page-header-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.ls-page-header-bar {
  width: 4px; height: 40px; border-radius: 999px; flex-shrink: 0; margin-top: 2px;
  background: linear-gradient(180deg, #FB7185, #991B1B);
  box-shadow: 0 0 12px rgba(225,29,72,0.5);
}
.ls-page-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* --- 统一筛选 chip --- */
.ls-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 999px;
  font-size: var(--ls-t-caption); font-weight: 500;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04);
  color: var(--ls-text-muted); cursor: pointer; transition: all 0.15s ease;
}
.ls-chip:hover { color: var(--ls-text-2); border-color: rgba(225,29,72,0.35); }
.ls-chip.active {
  background: rgba(225,29,72,0.15); border-color: rgba(225,29,72,0.40);
  color: #FB7185;
}
[data-theme=light] .ls-chip { background: rgba(0,0,0,0.03); border-color: var(--ls-border); }
[data-theme=light] .ls-chip.active { background: rgba(225,29,72,0.08); }

/* --- 导航分组标签 --- */
.ls-nav-group {
  padding: 14px 24px 4px;
  font-size: var(--ls-t-caption); color: var(--ls-text-muted);
  opacity: 0.6; letter-spacing: 1px;
}

/* --- 危险按钮 --- */
.ls-btn-danger {
  background: rgba(239,68,68,0.12); color: #F87171;
  padding: 10px 20px; border-radius: var(--ls-radius);
  border: 1px solid rgba(239,68,68,0.30);
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s; font-size: 14px;
}
.ls-btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.20); }
.ls-btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- 统一模态壳 --- */
.ls-modal-card {
  background: var(--ls-surface); border: 1px solid var(--ls-border);
  border-radius: 16px; padding: 24px;
  width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: lsModalIn 0.2s ease;
}
@keyframes lsModalIn {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.ls-modal-title {
  font-size: var(--ls-t-title); font-weight: 700; color: var(--ls-text);
  display: flex; align-items: center; gap: 10px;
}

/* --- 统一确认弹窗 --- */
.ls-confirm-card { max-width: 400px; }
.ls-confirm-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}

/* --- toast v2：表面色卡片 + 类型色左条 + 图标 --- */
.ls-toast-v2 {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  min-width: 220px; max-width: min(420px, calc(100vw - 40px));
  padding: 12px 16px 12px 14px;
  background: var(--ls-surface-2); border: 1px solid var(--ls-border);
  border-left: 3px solid var(--toast-color, #3B82F6);
  border-radius: var(--ls-radius);
  color: var(--ls-text); font-size: var(--ls-t-body);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  animation: lsToastIn 0.25s ease;
}
.ls-toast-v2 i { color: var(--toast-color, #3B82F6); flex-shrink: 0; }
.ls-toast-v2.ls-toast-out { animation: lsToastOut 0.25s ease forwards; }
@keyframes lsToastIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes lsToastOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(24px); opacity: 0; }
}

/* --- 全局搜索弹层 --- */
.ls-search-pop {
  position: absolute; right: 0; top: 44px; width: 320px; max-width: calc(100vw - 32px);
  padding: 12px; border-radius: var(--ls-radius);
  background: var(--ls-surface); border: 1px solid var(--ls-border);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5); z-index: 60;
  animation: lsModalIn 0.18s ease;
}
.ls-search-pop-hint {
  margin-top: 8px; font-size: var(--ls-t-caption); color: var(--ls-text-muted);
  display: flex; align-items: center; gap: 6px;
}
.ls-search-pop-hint kbd {
  padding: 1px 6px; border-radius: 6px; font-size: 11px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  color: var(--ls-text-3); font-family: inherit;
}
[data-theme=light] .ls-search-pop-hint kbd { background: rgba(0,0,0,0.04); border-color: var(--ls-border); }

/* --- 用户区链接按钮化 --- */
.ls-nav-user-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 10px;
  font-size: var(--ls-t-caption); color: var(--ls-text-muted);
  transition: all 0.15s ease; text-decoration: none;
  background: transparent; border: none; cursor: pointer; width: 100%; text-align: left;
}
.ls-nav-user-link:hover { background: var(--ls-hover-bg); color: var(--ls-text); }

/* ===== 客群画像页（2026-08 portrait 高级感）===== */
.pt-sec { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; }
.pt-sec-bar {
  width: 4px; height: 34px; border-radius: 999px; flex-shrink: 0; margin-top: 1px;
  background: linear-gradient(180deg, #FB7185, #991B1B);
  box-shadow: 0 0 10px rgba(225,29,72,0.45);
}
.pt-sec-title { font-size: 16px; font-weight: 700; color: var(--ls-text); }
.pt-sec-sub { font-size: 12px; color: var(--ls-text-muted); margin-top: 2px; }

.pt-stat { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.pt-stat:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.28); }
.pt-stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; }
.pt-stat-label { font-size: 12px; letter-spacing: 2px; color: var(--ls-text-muted); margin-top: 4px; }
.pt-stat-sub { font-size: 12px; opacity: 0.75; margin-top: 2px; }

.pt-funnel-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pt-funnel-row:last-child { margin-bottom: 0; }
.pt-funnel-label { width: 176px; flex-shrink: 0; font-size: 12px; color: var(--ls-text-muted); text-align: right; }
.pt-funnel-bar {
  min-width: 72px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; gap: 6px; padding: 0 10px;
  font-size: 12px; color: #fff; white-space: nowrap;
  transition: width 0.5s ease;
}
.pt-funnel-bar b { font-size: 13px; }
.pt-funnel-bar span { opacity: 0.85; }

.pt-rank-no {
  width: 24px; height: 24px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--ls-text-muted); background: var(--ls-hover-bg);
}
.pt-rank-no.top {
  background: linear-gradient(135deg, #E11D48, #991B1B); color: #fff;
  box-shadow: 0 2px 8px rgba(225,29,72,0.4);
}

.pt-advice { border-left: 3px solid #E11D48; }
.pt-advice-title { font-size: 14px; font-weight: 600; color: var(--ls-text); margin-bottom: 4px; }

/* --- 客群画像：下钻交互 --- */
.pt-click { cursor: pointer; transition: background 0.15s ease; }
.pt-click:hover { background: var(--ls-hover-bg); }
.pt-stat.pt-click:hover { background: var(--ls-card-bg); box-shadow: 0 8px 24px rgba(0,0,0,0.32); }
.pt-drill-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; border-radius: 10px; cursor: pointer;
  border-top: 1px solid var(--ls-border); transition: background 0.15s ease;
}
.pt-drill-row:first-child { border-top: none; }
.pt-drill-row:hover { background: var(--ls-hover-bg); }

/* ===== P3 配色统一（方案C，仅 body.embed 作用域）：embed 内结构色对齐 wave 外壳 =====
   wave globals.css: --background #0a0a0f / --card #12121a / --border #27273a。
   只改结构色（卡片底色/边框），品牌色（玫红按钮/徽章）保留；直开 sight 无 body.embed，零影响。
   P18（2026-08-18）：此段原未按主题区分，body.embed 上的变量优先级高于 <html data-theme=light>，
   导致亮色模式下 embed 卡片仍强制暗色（AI 配镜师黑卡问题）；已收敛为仅暗色生效。 */
[data-theme=dark] body.embed {
  --ls-surface: #12121a;      /* 对齐 wave --card */
  --ls-card-bg: #12121a;      /* 对齐 wave --card（原 rgba(255,255,255,0.03)） */
  --ls-card-border: #27273a;  /* 对齐 wave --border（原 rgba(255,255,255,0.08)） */
}
/* 内容区大面积 bg-white/5 面板在 embed 内同样对齐卡片色（直开不受影响） */
[data-theme=dark] body.embed .bg-white\/5 { background-color: #12121a !important; }

/* P18 亮色补齐：bg-white/5 面板与 #16161f 下拉在亮色下用浅灰/白底（原只在暗色 embed 有定义） */
[data-theme=light] .bg-white\/5 { background-color: var(--ls-surface-2) !important; }
[data-theme=light] .bg-\[#16161f\] { background-color: var(--ls-surface) !important; }

/* P9 整体优化（2026-08-13）：embed 内隐藏 sight 页面级标题（外壳已有面包屑/标题），
   并把玫红品牌色转成外壳绿色，消除"双主题割裂"；直开 sight 无 body.embed，零影响。 */
body.embed .ls-page-header { display: none !important; }
body.embed .text-rose-300,
body.embed .text-rose-400,
body.embed .text-rose-500 { color: #10B981 !important; }
body.embed .bg-rose-500\/5,
body.embed .bg-rose-500\/10,
body.embed .bg-rose-500\/15,
body.embed .bg-rose-500\/20 { background-color: rgba(16, 185, 129, 0.12) !important; }
body.embed .border-rose-500\/20,
body.embed .border-rose-500\/30,
body.embed .border-rose-500\/40 { border-color: rgba(16, 185, 129, 0.35) !important; }
