/* ============================================================
   龙兵AI 爆款获客系统 · 专业 UI 设计系统
   用途：高保真页面原型 / 后续可复用到正式页面
   ============================================================ */

:root {
  /* Brand */
  --brand-50: #eef4ff;
  --brand-100: #dbe8ff;
  --brand-200: #b9d3ff;
  --brand-300: #8cb8ff;
  --brand-400: #5a97ff;
  --brand-500: #3478f6;
  --brand-600: #2362e5;
  --brand-700: #1e4fc4;

  /* Neutral */
  --bg: #f4f7fb;
  --bg-soft: #f8fafd;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --border: #e6ebf3;
  --border-strong: #d5dce8;

  /* Semantic */
  --success: #12b76a;
  --success-bg: #ecfdf3;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;

  /* Layout */
  --sidebar-w: 260px;
  --sidebar-bg: #101b2e;
  --sidebar-bg-2: #0b1524;
  --sidebar-text: #8ea0bd;
  --sidebar-text-strong: #eef4ff;
  --topbar-h: 68px;
  --content-max: 1480px;

  /* Shape */
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-brand: 0 10px 24px rgba(52, 120, 246, 0.22);

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --bg: #0c1526;
  --bg-soft: #0f1a2f;
  --surface: #111f36;
  --surface-2: #17263f;
  --surface-3: #1d2d49;
  --text: #e8eef9;
  --text-2: #b4c3da;
  --text-3: #7185a5;
  --border: #223350;
  --border-strong: #2d405f;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.dp-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.dp-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color: var(--sidebar-text);
  padding: 20px 14px 18px;
  display: flex;
  flex-direction: column;
}

.dp-sidebar::-webkit-scrollbar {
  width: 5px;
}

.dp-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 99px;
}

.dp-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 22px;
}

.dp-brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #5a97ff, #3478f6);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(52, 120, 246, .28);
}

.dp-brand-name {
  min-width: 0;
}

.dp-brand-name strong {
  display: block;
  color: var(--sidebar-text-strong);
  font-size: 16px;
  letter-spacing: -.2px;
  white-space: nowrap;
}

.dp-brand-name span {
  display: block;
  margin-top: 2px;
  color: var(--sidebar-text);
  font-size: 11px;
  white-space: nowrap;
}

.dp-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dp-nav-group-title {
  padding: 0 10px 7px;
  color: #6f83a4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: 13px;
  text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.dp-nav-item:hover {
  background: rgba(255, 255, 255, .06);
  color: var(--sidebar-text-strong);
}

.dp-nav-item.active {
  background: linear-gradient(90deg, rgba(52, 120, 246, .24), rgba(52, 120, 246, .12));
  color: #fff;
  font-weight: 600;
}

.dp-nav-item .ico {
  width: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  opacity: .9;
}

.dp-nav-item .count {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  color: #b7c7e2;
  font-size: 10px;
  font-weight: 700;
}

.dp-nav-item.active .count {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.dp-sidebar-footer {
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.dp-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #3478f6);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.dp-user-info {
  min-width: 0;
  flex: 1;
}

.dp-user-info strong {
  display: block;
  color: #e8eef9;
  font-size: 12px;
  font-weight: 600;
}

.dp-user-info span {
  display: block;
  margin-top: 1px;
  color: #7185a5;
  font-size: 10px;
}

/* ---------- Main ---------- */
.dp-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dp-topbar {
  height: var(--topbar-h);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.dp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 13px;
}

.dp-breadcrumb strong {
  color: var(--text);
  font-weight: 600;
}

.dp-breadcrumb .sep {
  color: var(--border-strong);
}

.dp-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dp-search {
  width: 260px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-3);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}

.dp-search:focus-within {
  border-color: var(--brand-400);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(52, 120, 246, .08);
}

.dp-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.dp-search input::placeholder {
  color: var(--text-3);
}

.dp-icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  display: grid;
  place-items: center;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}

.dp-icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.dp-theme-toggle {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}

.dp-theme-toggle:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.dp-content {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 30px 32px 48px;
}

.dp-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.dp-page-title {
  font-size: 24px;
  letter-spacing: -.4px;
  margin: 0 0 5px;
}

.dp-page-subtitle {
  color: var(--text-3);
  font-size: 13px;
  margin: 0;
}

/* ---------- Stats ---------- */
.dp-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.dp-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.dp-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.dp-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dp-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.dp-stat-icon.blue { background: var(--brand-50); color: var(--brand-600); }
.dp-stat-icon.green { background: var(--success-bg); color: var(--success); }
.dp-stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.dp-stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.dp-stat-icon.violet { background: #f4f1ff; color: #7c3aed; }
.dp-stat-icon.cyan { background: #ecfeff; color: #0891b2; }

.dp-stat-trend {
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
}

.dp-stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.4px;
  line-height: 1;
}

.dp-stat-label {
  margin-top: 7px;
  color: var(--text-3);
  font-size: 11px;
}

/* ---------- Cards ---------- */
.dp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.dp-card-head {
  min-height: 64px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}

.dp-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 650;
}

.dp-card-desc {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 400;
}

.dp-card-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dp-toolbar {
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.dp-input,
.dp-select {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  padding: 0 12px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.dp-input {
  width: 100%;
}

.dp-select {
  min-width: 110px;
}

.dp-input:focus,
.dp-select:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(52, 120, 246, .08);
}

/* ---------- Buttons ---------- */
.dp-btn {
  height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}

.dp-btn:active {
  transform: translateY(1px);
}

.dp-btn-primary {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.dp-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(52, 120, 246, .28);
}

.dp-btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-2);
}

.dp-btn-secondary:hover {
  background: var(--surface-2);
}

.dp-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

.dp-btn-ghost:hover {
  background: var(--surface-2);
}

.dp-btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

/* ---------- List ---------- */
.dp-list {
  display: block;
}

.dp-list-head,
.dp-list-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 120px 110px 150px;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
}

.dp-list-head {
  min-height: 40px;
  padding-top: 10px;
  padding-bottom: 10px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.dp-list-row {
  border-bottom: 1px solid var(--border);
  transition: background .16s var(--ease);
}

.dp-list-row:last-child {
  border-bottom: 0;
}

.dp-list-row:hover {
  background: var(--surface-2);
}

.dp-thumb {
  width: 48px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbe8ff, #f1f5ff);
  display: grid;
  place-items: center;
  color: var(--brand-500);
  font-weight: 700;
  font-size: 12px;
}

.dp-list-main {
  min-width: 0;
}

.dp-list-title {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dp-list-meta {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 11px;
}

.dp-list-cell {
  color: var(--text-2);
  font-size: 12px;
}

.dp-list-cell strong {
  color: var(--text);
  font-weight: 700;
}

.dp-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

/* ---------- Badges / Tags ---------- */
.dp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
}

.dp-badge.blue { background: var(--brand-50); color: var(--brand-600); }
.dp-badge.green { background: var(--success-bg); color: var(--success); }
.dp-badge.amber { background: var(--warning-bg); color: var(--warning); }
.dp-badge.red { background: var(--danger-bg); color: var(--danger); }
.dp-badge.gray { background: var(--surface-3); color: var(--text-2); }

.dp-tag {
  height: 28px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}

.dp-tag:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
  background: var(--brand-50);
}

.dp-tag.active {
  border-color: transparent;
  background: var(--brand-500);
  color: #fff;
}

.dp-pagination {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 11px;
}

.dp-pagination-pages {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dp-page-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
}

.dp-page-btn.active {
  border-color: var(--brand-500);
  background: var(--brand-500);
  color: #fff;
}

.dp-note {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #f3f7ff;
  color: #4f6f9f;
  font-size: 11px;
  line-height: 1.7;
}

[data-theme="dark"] .dp-note {
  border-color: #24406e;
  background: #152744;
  color: #9db5d8;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .dp-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dp-list-head,
  .dp-list-row {
    grid-template-columns: 54px minmax(0, 1fr) 100px 140px;
  }

  .dp-list-row > *:nth-child(4),
  .dp-list-head > *:nth-child(4) {
    display: none;
  }
}

@media (max-width: 860px) {
  .dp-app {
    grid-template-columns: 1fr;
  }

  .dp-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    width: min(280px, 84vw);
    transform: translateX(-102%);
    transition: transform .25s var(--ease);
  }

  .dp-sidebar.open {
    transform: translateX(0);
  }

  .dp-topbar {
    padding: 0 16px;
  }

  .dp-content {
    padding: 24px 16px 40px;
  }

  .dp-search {
    width: 160px;
  }

  .dp-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .dp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dp-search,
  .dp-theme-toggle {
    display: none;
  }
}

/* ============================================================
   现有系统类名 → dp 设计系统映射
   仅视觉布局，不改变功能逻辑
   ============================================================ */

.bg-orb,
.grid-overlay { display: none !important; }

body {
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color: var(--sidebar-text);
  padding: 20px 14px 18px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: none;
  z-index: 100;
}

.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 22px;
  border-bottom: 0;
  margin-bottom: 0;
  cursor: pointer;
}

.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: linear-gradient(135deg,#5a97ff,#3478f6);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(52,120,246,.28);
  display: grid;
  place-items: center;
}

.sidebar-logo .logo-text {
  color: var(--sidebar-text-strong);
  font-size: 16px;
  letter-spacing: -.2px;
}

.sidebar-logo .logo-sub {
  color: var(--sidebar-text);
  font-size: 11px;
  margin-top: 2px;
}

.sidebar-section { margin-bottom: 14px; }
.sidebar-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 7px;
  color: #6f83a4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
.sidebar-section-header:hover { color: var(--sidebar-text); }
.sidebar-section-header .arrow { font-size: 7px; opacity: .55; transition: transform .18s var(--ease); }
.sidebar-section-header.collapsed .arrow { transform: rotate(-90deg); }

.sidebar-items { display: flex; flex-direction: column; gap: 1px; max-height: 600px; overflow: hidden; transition: max-height .25s var(--ease); }
.sidebar-items.collapsed { max-height: 0; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  margin: 0;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: 13px;
  cursor: pointer;
  font-weight: 400;
  position: relative;
}

.sidebar-item:hover { background: rgba(255,255,255,.06); color: var(--sidebar-text-strong); }
.sidebar-item.act {
  background: linear-gradient(90deg, rgba(52,120,246,.24), rgba(52,120,246,.12));
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}

.sidebar-item .si-icon { width: 20px; flex: 0 0 20px; display: grid; place-items: center; font-size: 15px; opacity: .9; }
.sidebar-item .si-badge {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  color: #b7c7e2;
  font-size: 10px;
  font-weight: 700;
}
.sidebar-item.act .si-badge { background: rgba(255,255,255,.14); color: #fff; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #7185a5;
  font-size: 12px;
}
.sidebar-footer span { color: var(--sidebar-text-strong); }
.sidebar-footer .logout-btn {
  color: #fda4af;
  border: 1px solid rgba(239,68,68,.32);
  background: transparent;
}
.sidebar-footer .logout-btn:hover { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.5); color: #fecaca; }

/* ---------- 严格参考 design_preview 的侧边栏细节 ---------- */
.sidebar-logo {
  padding: 4px 8px 22px;
  border-bottom: 0;
  margin-bottom: 0;
}
.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5a97ff, #3478f6);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(52,120,246,.28);
}
.sidebar-logo .logo-copy { min-width: 0; }
.sidebar-logo .logo-text {
  display: block;
  color: var(--sidebar-text-strong);
  font-size: 16px;
  letter-spacing: -.2px;
  line-height: 1.25;
}
.sidebar-logo .logo-sub {
  display: block;
  margin-top: 2px;
  color: var(--sidebar-text);
  font-size: 11px;
}
.sidebar-section { margin-bottom: 14px; }
.sidebar-section-header {
  padding: 0 10px 7px;
  color: #6f83a4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-section-header:hover { color: var(--sidebar-text); }
.sidebar-section-header .arrow { font-size: 7px; opacity: .55; transition: transform .18s var(--ease); }
.sidebar-section-header.collapsed .arrow { transform: rotate(-90deg); }
.sidebar-items { display: flex; flex-direction: column; gap: 1px; max-height: 600px; overflow: hidden; transition: max-height .25s var(--ease); }
.sidebar-items.collapsed { max-height: 0; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  margin: 0;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: 13px;
  cursor: pointer;
  font-weight: 400;
  position: relative;
}
.sidebar-item:hover { background: rgba(255,255,255,.06); color: var(--sidebar-text-strong); }
.sidebar-item.act {
  background: linear-gradient(90deg, rgba(52,120,246,.24), rgba(52,120,246,.12));
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}
.sidebar-item .si-icon { width: 20px; flex: 0 0 20px; display: grid; place-items: center; font-size: 15px; opacity: .9; }
.sidebar-item .si-badge {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  color: #b7c7e2;
  font-size: 10px;
  font-weight: 700;
}
.sidebar-item.act .si-badge { background: rgba(255,255,255,.14); color: #fff; }
.sidebar-footer {
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #7185a5;
  font-size: 12px;
}
.sidebar-footer span { color: var(--sidebar-text-strong); }
.sidebar-footer .logout-btn {
  color: #fda4af;
  border: 1px solid rgba(239,68,68,.32);
  background: transparent;
}
.sidebar-footer .logout-btn:hover { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.5); color: #fecaca; }

/* ---------- 主区域 ---------- */
.main { min-width: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

.main-header {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.main-header .breadcrumb { color: var(--text-3); font-size: 13px; font-weight: 500; }
.main-header .breadcrumb strong { color: var(--text); font-weight: 600; }
.main-header .breadcrumb .sep { color: var(--border-strong); margin: 0 2px; }
.main-header .header-actions { display: flex; align-items: center; gap: 8px; font-size: 12px; }

.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 30px 32px 48px;
}
.main-content::-webkit-scrollbar { width: 8px; }
.main-content::-webkit-scrollbar-thumb { background: rgba(15,23,42,.16); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
.main-content::-webkit-scrollbar-track { background: transparent; }

/* ---------- 页面头部（对齐设计预览页） ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.page-head-title {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.4px;
  line-height: 1.25;
}
.page-head-subtitle {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.6;
}
.page-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 顶部面板统一为白色卡片，避免整块铺满；保留原功能和内部结构 */
.main-content > .panel > .section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 20px;
  margin-bottom: 18px;
  overflow: hidden;
}
.main-content > .panel > .section .section-header {
  min-height: 0;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.main-content > .panel > .section .section-header h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.2px;
  color: var(--text);
}
.main-content > .panel > .section > h2:first-child,
.main-content > .panel > .section > p:first-child {
  margin-top: 0;
}

/* ---------- 统一列表结构：全网爆款 ---------- */
.hs-list .dp-list-head,
.hs-list .dp-list-row {
  grid-template-columns: 72px minmax(0, 1fr) 210px 190px;
}
.hs-list .dp-list-row {
  min-height: 88px;
}
.hs-thumb,
.hs-list .dp-thumb {
  position: relative;
  width: 56px;
  height: 72px;
}
.hs-list .dp-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.hs-duration {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 10px;
}
.hs-interactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--text-2);
  font-size: 12px;
}
.hs-like { color: #ef4444; }
#hsResults { overflow: hidden; }

@media (max-width: 980px) {
  .hs-list .dp-list-head,
  .hs-list .dp-list-row {
    grid-template-columns: 60px minmax(0,1fr) 130px;
  }
  .hs-list .dp-list-head > *:nth-child(4),
  .hs-list .dp-list-row > *:nth-child(4) { display: none; }
}

/* ---------- 统一工具栏 ---------- */
.ui-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.ui-toolbar .dp-input {
  height: 38px;
}
.ui-toolbar .dp-select {
  height: 38px;
}

/* ---------- 首页素材库列表裂变样式 ---------- */
.home-material-shell { overflow: hidden; }
.home-material-shell > .empty { grid-column: auto; }
.home-material-list .dp-list-head,
.home-material-list .dp-list-row {
  grid-template-columns: 72px minmax(0, 1fr) 250px 260px;
}
.home-material-list .dp-list-row { min-height: 88px; }
.home-material-list .dp-thumb {
  width: 56px;
  height: 72px;
  position: relative;
  padding: 0;
}
.home-material-list .dp-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.home-material-list .dp-list-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-material-list .hs-interactions { display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--text-2); font-size: 12px; }

@media (max-width: 980px) {
  .home-material-list .dp-list-head,
  .home-material-list .dp-list-row {
    grid-template-columns: 60px minmax(0,1fr) 140px;
  }
  .home-material-list .dp-list-head > *:nth-child(4),
  .home-material-list .dp-list-row > *:nth-child(4) { display: none; }
}

/* ---------- 面板与卡片 ---------- */

.panel { display: none; animation: fadeIn .35s ease; }
.panel.act { display: block; }

.section { margin-bottom: 18px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-header h2 { font-size: 15px; font-weight: 650; letter-spacing: -.2px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 20px;
  overflow: hidden;
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.card-row { border-bottom-color: var(--border); }
.card-row:hover { background: var(--surface-2); }

/* ---------- 统计卡 ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stats-bar .stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.stats-bar .stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.stats-bar .stat-card .st-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }
.stats-bar .stat-card .st-info { min-width: 0; }
.stats-bar .stat-card .st-num { font-size: 22px; font-weight: 700; letter-spacing: -.4px; line-height: 1; color: var(--text); }
.stats-bar .stat-card .st-label { margin-top: 7px; color: var(--text-3); font-size: 11px; }
.stats-bar .st-acct .st-icon { background: var(--brand-50); color: var(--brand-600); }
.stats-bar .st-copy .st-icon { background: var(--warning-bg); color: var(--warning); }
.stats-bar .st-done .st-icon { background: var(--success-bg); color: var(--success); }
.stats-bar .st-boom .st-icon { background: #fef3c7; color: #b45309; }
.stats-bar .st-article .st-icon { background: #ecfeff; color: #0891b2; }
.stats-bar .st-trans .st-icon { background: #f4f1ff; color: #7c3aed; }
.stats-bar .st-total .st-icon { background: var(--brand-50); color: var(--brand-600); }
.stats-bar .st-new .st-icon { background: var(--success-bg); color: var(--success); }
.stats-bar .st-dh .st-icon { background: #f4f1ff; color: #7c3aed; }
.stats-bar .st-remake .st-icon { background: #ecfeff; color: #0891b2; }
.stats-bar .st-vlog .st-icon { background: #fff7ed; color: #ea580c; }

/* ---------- 表单控件 ---------- */
input, select, textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 9px 12px;
  outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(52,120,246,.08);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-pri { background: linear-gradient(135deg,var(--brand-400),var(--brand-600)); color: #fff; box-shadow: var(--shadow-brand); }
.btn-pri:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(52,120,246,.28); }
.btn-out { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
.btn-out:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 11px; border-radius: 8px; }
.btn-ok { background: var(--success-bg); color: var(--success); border-color: rgba(18,183,106,.2); }
.btn-ok:hover { background: #d1fae5; }
.btn-err { background: var(--danger-bg); color: var(--danger); border-color: rgba(239,68,68,.2); }
.btn-err:hover { background: #fee2e2; }
.btn-purple { background:#f4f1ff; color:#7c3aed; border-color:rgba(124,58,237,.2); }
.btn-purple:hover { background:#ede9fe; }
.btn-green { background: var(--success-bg); color: var(--success); border-color: rgba(18,183,106,.2); }
.btn-green:hover { background:#d1fae5; }
.btn-orange { background: var(--warning-bg); color:#ea580c; border-color:rgba(234,88,12,.2); }
.btn-orange:hover { background:#ffedd5; }

/* ---------- 标签 ---------- */
.cat-tag, .tag {
  height: 28px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.cat-tag:hover, .tag:hover { border-color: var(--brand-300); color: var(--brand-600); background: var(--brand-50); transform:none; box-shadow:none; }
.cat-tag.active, .tag.sel { border-color: transparent; background: var(--brand-500); color: #fff; box-shadow: var(--shadow-brand); }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.modal-header {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}
.modal-header h3 { color: var(--text); margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.2px; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 17px;
  display: grid;
  place-items: center;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body {
  background: var(--surface);
  color: var(--text);
}
.modal-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
}
.toast { background: #0f172a; color: #fff; border-radius: 12px; box-shadow: var(--shadow-md); }
.cfm-overlay { background: rgba(15,23,42,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.cfm-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  padding: 26px 28px;
}
.cfm-title { color: var(--text); }
.cfm-msg { color: var(--text-2); }
.cfm-btn-cancel { background: var(--surface-3); color: var(--text-2); }
.cfm-btn-cancel:hover { background: var(--border); color: var(--text); }
.vv-preview-overlay { background: rgba(15,23,42,.74); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.vv-preview-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.vv-preview-hd { background: var(--surface-2); border-bottom-color: var(--border); }
.vv-preview-title { color: var(--text); }
.vv-preview-close { background: var(--surface-3); color: var(--text-2); }
.vv-preview-close:hover { background: var(--danger); color: #fff; }
.vv-preview-ft { background: var(--surface-2); border-top-color: var(--border); }

/* ---------- 动态组件统一 ---------- */
.geo-plat-label {
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
  transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease) !important;
}
.geo-plat-label:hover { border-color: var(--brand-300) !important; background: var(--brand-50) !important; }
.geo-plat-label:has(input:checked) { border-color: var(--brand-500) !important; background: var(--brand-50) !important; box-shadow:0 0 0 3px rgba(52,120,246,.08) !important; }
.voice-card { background: var(--surface) !important; border:1px solid var(--border) !important; border-radius:14px !important; box-shadow:var(--shadow-xs) !important; }
.voice-card:hover { border-color:var(--border-strong) !important; box-shadow:var(--shadow-sm) !important; }
.vv-voice-item { color:var(--text-2); font-weight:500; }
.sent-person-badge { border-radius:999px !important; box-shadow:var(--shadow-xs) !important; }

/* ---------- 全站子页面视觉统一 ---------- */
.main-content > .panel > .section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 20px;
  margin-bottom: 18px;
  overflow: visible;
}
.main-content > .panel > .section > .section-header,
.main-content > .panel > .section .section-header.ui-card-head {
  min-height: 48px;
  padding: 0 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.main-content > .panel > .section .section-header h2,
.main-content > .panel > .section .section-header h3,
.main-content > .panel > .section .section-header > h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.2px;
  color: var(--text);
}
.main-content > .panel > .section > h2:first-child,
.main-content > .panel > .section > h3:first-child {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
}
.main-content > .panel > .section > .ui-toolbar,
.main-content > .panel > .section .ui-toolbar {
  margin: -6px 0 16px;
}
/* 卡片内部再嵌套的 card，视觉统一但避免双层边框 */
.main-content > .panel > .section .card {
  background: var(--surface-2);
  border-color: var(--border);
  box-shadow: none;
  border-radius: var(--radius-md);
}
.main-content > .panel > .section .card:hover { border-color: var(--border-strong); }
/* 所有动态列表容器统一留白和边界 */
.main-content > .panel > .section > div:last-child:not(.section-header):not(.card) {
  min-width: 0;
}
/* 表单、输入、select 统一圆角和高度 */
.main-content input,
.main-content select,
.main-content textarea {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.main-content input:focus,
.main-content select:focus,
.main-content textarea:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(52,120,246,.08);
}
/* 按钮在卡片里不挤变形 */
.main-content .section-header .btn,
.main-content .section-header button { white-space: nowrap; }

/* ---------- 深色模式兼容：真实系统类名 ---------- */
[data-theme="dark"] .sidebar { background: linear-gradient(180deg, #0b1524, #08101d); }
[data-theme="dark"] .main-header { background: rgba(17,31,54,.9); border-bottom-color: #223350; }
[data-theme="dark"] .main-header .breadcrumb strong { color: #e8eef9; }
[data-theme="dark"] .main-content > .panel > .section,
[data-theme="dark"] .card,
[data-theme="dark"] .dp-card,
[data-theme="dark"] .stats-bar .stat-card {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="dark"] .section-header h2,
[data-theme="dark"] .page-head-title { color: var(--text); }

/* ---------- 通用响应式调整 ---------- */
@media (max-width: 768px) {
  .main-content > .panel > .section { padding: 14px; border-radius: var(--radius-md); }
  .main-content > .panel > .section .section-header { align-items: flex-start; flex-direction: column; }
  .main-content > .panel > .section .section-header .btn,
  .main-content > .panel > .section .section-header button { width: 100%; }
}

/* ---------- 响应式 ---------- */
/* ---------- 响应式 ---------- */
/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .stats-bar { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .stats-bar { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .sidebar { position: fixed; left:0; top:0; bottom:0; z-index:200; transform:translateX(-100%); transition:transform .3s var(--ease); }
  .sidebar.open { transform:translateX(0); box-shadow:8px 0 32px rgba(0,0,0,.12); }
  .main-header { padding:0 16px; height:60px; min-height:60px; }
  .main-content { padding:20px 16px 36px; }
  .page-head { flex-direction:column; align-items:flex-start; gap:12px; margin-bottom:18px; }
  .stats-bar { grid-template-columns:1fr; gap:8px; }
}
