/* ============================================
   带货指挥室 - 视觉重做版（匹配原站 coze.site 截图）
   核心变化：左侧边栏导航 + 页面头部 + 原站配色/间距/组件
   ============================================ */
:root {
  --brand: #FF6B4A;
  --brand-dark: #E85530;
  --brand-soft: #FFF1EC;
  --page: #F5F7FA;
  --ink: #1A1F2C;
  --ink-2: #4A5568;
  --ink-3: #8B95A5;
  --line: #E8ECF1;
  --card: #ffffff;
  --ok: #12B76A;
  --warn: #FAAD14;
  --danger: #FF4D4F;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06);
  --sidebar-w: 200px;
  /* 平台色 */
  --dy: #00A1D6; --ks: #FF6B4A; --sp: #07C160; --xhs: #FE2C55;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.6;
}
.hidden { display: none !important; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ 左侧边栏 ============ */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 100;
}
.sb-brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.sb-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #FF9A6C);
  color: #fff; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sb-title { font-size: 15px; font-weight: 700; white-space: nowrap; }

.sb-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sb-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px;
  color: var(--ink-2); text-decoration: none; font-size: 14px;
  cursor: pointer; transition: .15s; border-left: 3px solid transparent;
}
.sb-item:hover { background: var(--page); color: var(--ink); }
.sb-item.active {
  background: var(--brand-soft); color: var(--brand); font-weight: 600;
  border-left-color: var(--brand);
}
.sb-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }

.sb-footer {
  padding: 14px 20px; border-top: 1px solid var(--line);
}
.sb-credits { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.sb-credits strong { color: var(--brand); font-size: 16px; }
.sb-logout {
  width: 100%; padding: 7px; background: var(--page); border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; cursor: pointer; transition: .15s; font-family: inherit;
}
.sb-logout:hover { border-color: var(--brand); color: var(--brand); }

/* ============ 主内容区 ============ */
.main-content {
  margin-left: var(--sidebar-w); min-height: 100vh;
}

/* ============ 页面头部（原站风格） ============ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 0 16px; flex-wrap: wrap; gap: 12px;
}
.ph-left { min-width: 200px; }
.ph-title { font-size: 20px; font-weight: 700; margin: 0 4px 0 0; }
.ph-sub { font-size: 13px; color: var(--ink-3); margin: 2px 0 0; }
.ph-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 平台标签 */
.ph-tags { display: flex; gap: 6px; }
.ptag {
  padding: 3px 12px; border-radius: 14px; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.ptag-dy { background: #E6F7FD; color: var(--dy); }
.ptag-ks { background: var(--brand-soft); color: var(--ks); }
.ptag-sp { background: #E8F7EF; color: var(--sp); }
.ptag-xhs { background: #FFF0F3; color: var(--xhs); }
.ptag-gray { background: var(--page); color: var(--ink-3); }
.ptag-hot { background: #FFF7E6; color: #FA8C16; }

.ph-search {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 20px;
  font-size: 13px; width: 140px; outline: none; font-family: inherit;
  transition: border-color .2s;
}
.ph-search:focus { border-color: var(--brand); }

.btn-recharge {
  padding: 7px 18px; background: var(--brand); color: #fff; border: none;
  border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn-recharge:hover { background: var(--brand-dark); }

.ph-date {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 20px;
  font-size: 13px; outline: none; font-family: inherit; background: #fff; cursor: pointer;
}
.btn-icon {
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%;
  background: #fff; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: .15s; color: var(--ink-2);
}
.btn-icon:hover { border-color: var(--brand); color: var(--brand); }

/* ============ 页面容器 ============ */
.page { padding: 0 24px 32px; max-width: 1400px; }

/* ============ 通用组件 ============ */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.card-header h3 { font-size: 15px; font-weight: 600; margin: 0; flex-shrink: 0; }
.card-hint { font-size: 12px; color: var(--ink-3); }
.link-sm { font-size: 12px; color: var(--brand); cursor: pointer; margin-left: auto; white-space: nowrap; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.panel h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
input, textarea, select {
  width: 100%; padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; color: var(--ink); background: #fff; outline: none; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,107,74,.08); }
textarea { resize: vertical; min-height: 80px; line-height: 1.7; }

.btn-primary {
  padding: 10px 20px; background: var(--brand); color: #fff; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .2s, transform .1s; width: 100%;
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-primary:disabled { background: #F2B8A4; cursor: not-allowed; transform: none; }

.btn-ghost {
  padding: 8px 14px; background: var(--brand-soft); color: var(--brand);
  border: 1px solid #FFD9C8; border-radius: 8px; font-size: 13px;
  cursor: pointer; white-space: nowrap; font-family: inherit; transition: .2s;
}
.btn-ghost:hover { background: #FFE6DA; }
.btn-line {
  padding: 7px 14px; background: #fff; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
  cursor: pointer; font-family: inherit; transition: .2s;
}
.btn-line:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-danger { background: #FFF2F0; color: var(--danger); border-color: #FFCCC7; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 500;
}
.tag-brand { background: var(--brand-soft); color: var(--brand); }
.tag-dy { background: #E6F7FD; color: var(--dy); }
.tag-ks { background: var(--brand-soft); color: var(--ks); }
.tag-sp { background: #E8F7EF; color: var(--sp); }
.tag-xhs { background: #FFF0F3; color: var(--xhs); }
.tag-gray { background: var(--page); color: var(--ink-3); }
.tag-green { background: #E8F7EF; color: var(--ok); }
.tag-hot { background: #FFF7E6; color: #FA8C16; }
.tag-new { background: #E6F7FF; color: #1890FF; }

.cost-note { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.empty { text-align: center; color: var(--ink-3); padding: 36px 0; font-size: 13px; }
.row-flex { display: flex; gap: 8px; align-items: center; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2, .grid3, .grid4, .split-grid { grid-template-columns: 1fr; } }

.result-box {
  background: #FAFBFC; border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; white-space: pre-wrap; word-break: break-word;
  font-size: 14px; line-height: 1.85; min-height: 120px;
}

/* 警告条 */
.alert { padding: 12px 14px; border-radius: 8px; font-size: 13px; display: flex; align-items: flex-start; gap: 10px; }
.alert-warn { background: #FFFBE6; border: 1px solid #FFE58F; color: #D48806; }
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ============ 数据看板 - 汇总卡片 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-label { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.stat-value .unit { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.stat-trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 6px; margin-top: 8px; }
.trend-up { background: #FFF2F0; color: var(--danger); }
.trend-down { background: #F0FDF4; color: var(--ok); }

.mini-bars { display: flex; gap: 3px; margin-top: 10px; align-items: flex-end; height: 24px; }
.mini-bar { width: 8px; border-radius: 4px; background: var(--brand-soft); transition: height .3s; }
.mini-bar.active { background: var(--brand); }

/* ============ 图表 ============ */
.chart-section { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 900px) { .chart-section { grid-template-columns: 1fr; } }
.chart-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.chart-box h4 { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; font-weight: 600; }
.chart-box .sub { font-size: 12px; color: var(--ink-3); margin-left: 8px; font-weight: 400; }
.pie-legend { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pie-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pie-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.pie-pct { font-weight: 600; margin-left: auto; }

/* ============ 表格 ============ */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--ink-3); font-weight: 500; font-size: 12px; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #FAFBFD; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { min-width: 500px; }
.linkbtn { color: var(--brand); cursor: pointer; background: none; border: none; padding: 0; font-size: 13px; font-family: inherit; }
.linkbtn.danger { color: var(--danger); }

/* ============ TOP5 排行 ============ */
.top-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.top-rank { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.top-rank.r3 { background: #FFB84D; }
.top-body { flex: 1; min-width: 0; }
.top-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-tags { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.top-bar { height: 6px; background: var(--page); border-radius: 3px; overflow: hidden; width: 100%; margin-top: 6px; }
.top-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), #FF9A6C); }
.top-val { font-size: 14px; font-weight: 700; color: var(--brand); white-space: nowrap; }

/* 快捷操作 */
.quick-actions { display: flex; flex-direction: column; gap: 10px; }
.qa-card {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: .15s;
}
.qa-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.qa-icon { font-size: 24px; flex-shrink: 0; }
.qa-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.qa-arrow { margin-left: auto; color: var(--ink-3); font-size: 16px; }
.daily-tip { font-size: 12px; color: var(--ink-3); padding: 10px; background: var(--page); border-radius: 8px; margin-top: 10px; }

/* ============ 爆款拆解 ============ */
.analysis-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; }
@media (max-width: 1000px) { .analysis-layout { grid-template-columns: 1fr; } }

.ai-search-bar {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.ais-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #FF9A6C);
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ais-info { flex: 1; min-width: 0; }
.ais-info strong { font-size: 14px; }
.ais-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-left: 6px; vertical-align: middle; }
.ais-tag-hot { background: var(--brand-soft); color: var(--brand); }
.ais-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.formula-bar {
  background: linear-gradient(135deg, #FFF9F5, #FFF2EC); border: 1px solid #FFD9C8;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.fb-icon { font-size: 14px; }
.fb-text { color: var(--ink-2); }
.fb-note { font-size: 11px; color: var(--ink-3); margin-left: auto; }

.video-list-item {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; cursor: default;
}
.video-list-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.vli-score {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--brand); flex-shrink: 0;
}
.vli-body { flex: 1; min-width: 0; }
.vli-title { font-size: 13px; font-weight: 600; }
.vli-meta { font-size: 11px; color: var(--ink-3); margin-top: 3px; }

/* 开头拆解建议 */
.opening-tip {
  background: #FAFBFD; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; font-size: 13px; color: var(--ink-2); line-height: 1.7;
}
.opening-stats { display: flex; gap: 16px; margin-top: 10px; }
.os-item { font-size: 12px; color: var(--ink-2); }
.os-val { font-weight: 700; margin-left: 4px; }
.os-val.up { color: var(--danger); }

/* 核心亮点勾选 */
.check-list { display: flex; flex-direction: column; gap: 6px; }
.cl-item { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.cl-check { color: var(--ok); font-weight: 700; flex-shrink: 0; }

/* 热词条形图 */
.hw-bar { margin-bottom: 8px; }
.hw-label { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; display: flex; justify-content: space-between; }
.hw-track { height: 18px; background: var(--page); border-radius: 4px; overflow: hidden; }
.hw-fill { height: 100%; border-radius: 4px; display: flex; align-items: center; padding: 0 8px; font-size: 11px; color: #fff; font-weight: 600; }

/* GPM 潜力榜 */
.gpm-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.gpm-title { flex: 1; font-size: 13px; color: var(--ink-2); }
.gpm-val { font-size: 18px; font-weight: 700; color: var(--brand); }
.gpm-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-left: 6px; }

/* 拆解结果卡片 */
.a-blocks { display: flex; flex-direction: column; gap: 10px; }
.a-block {
  background: #FAFBFC; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; border-left: 3px solid var(--brand);
}
.a-block-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.a-block-body { font-size: 13px; line-height: 1.8; color: var(--ink-2); }

/* Chip 选择器 */
.chip-group { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 14px; border: 1px solid var(--line); border-radius: 16px;
  font-size: 12px; cursor: pointer; background: #fff; transition: .15s;
}
.chip:hover { border-color: var(--brand); }
.chip-active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); font-weight: 600; }

/* ============ 工作流看板 ============ */
.kanban-header { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.kh-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 20px; display: flex; align-items: center; gap: 10px; flex: 1; min-width: 130px;
}
.kh-num { font-size: 24px; font-weight: 700; }
.kh-num.c-done { color: var(--ok); }
.kh-num.c-doing { color: var(--warn); }
.kh-num.c-todo { color: var(--ink-3); }
.kh-label { font-size: 13px; color: var(--ink-3); }

/* AI 智本助手条 */
.ai-assist-bar {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 14px;
}
.aia-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #FF9A6C);
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.aia-info { flex: 1; }
.aia-info strong { font-size: 14px; }
.aia-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.btn-new-task {
  width: 100%; padding: 12px; background: none; border: 1px dashed var(--line);
  border-radius: 10px; font-size: 14px; color: var(--brand); font-weight: 600;
  cursor: pointer; transition: .15s; margin-bottom: 14px;
}
.btn-new-task:hover { background: var(--brand-soft); border-color: var(--brand); }

.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol {
  background: #F7F8FA; border-radius: 10px; padding: 12px; min-width: 260px; flex: 1 0 260px;
  border: 1px solid var(--line);
}
.kcol-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kcol-header h4 { font-size: 13px; color: var(--ink-2); margin: 0; font-weight: 600; }
.kcol-header .count { background: var(--page); padding: 2px 8px; border-radius: 10px; font-size: 12px; color: var(--ink-3); }

.kcard {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.kcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kc-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.kc-meta { font-size: 11px; color: var(--ink-3); }
.kc-ops { display: flex; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.kc-ops button { background: none; border: none; color: var(--ink-3); cursor: pointer; font-size: 12px; padding: 0; font-family: inherit; }
.kc-ops button:hover { color: var(--brand); }

/* ============ 数字人带货 ============ */
.digital-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; }
@media (max-width: 900px) { .digital-layout { grid-template-columns: 1fr; } }

.avatar-select { display: flex; gap: 14px; margin-bottom: 16px; }
.avatar-opt { width: 82px; text-align: center; cursor: pointer; }
.avatar-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #667EEA, #764BA2);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px; border: 3px solid transparent; transition: .2s;
  color: #fff; font-size: 22px;
}
.avatar-circle.selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,107,74,.2); }
.avatar-name { font-size: 12px; color: var(--ink-2); }

.duration-chips { display: flex; gap: 8px; margin-bottom: 14px; }
.dur-chip {
  padding: 6px 18px; border: 1px solid var(--line); border-radius: 20px;
  font-size: 13px; cursor: pointer; background: #fff; transition: .2s;
}
.dur-chip.selected { background: var(--brand); color: #fff; border-color: var(--brand); }

.gen-btn-large {
  width: 100%; padding: 13px; background: linear-gradient(135deg, var(--brand), #FF9A6C);
  color: #fff; border: none; border-radius: 10px; font-size: 15px;
  font-weight: 600; cursor: pointer; transition: .2s; margin-top: 12px;
}
.gen-btn-large:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,74,.25); }

/* ============ 短视频管理 ============ */
.filter-bar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.filter-bar input { flex: 1; min-width: 180px; }
.filter-bar select { width: auto; min-width: 90px; }

.video-summary { font-size: 12px; color: var(--ink-3); margin-bottom: 12px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }

.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1200px) { .video-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .video-grid { grid-template-columns: 1fr; } }

.vcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.vthumb {
  height: 130px; display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
}
.vthumb-bg-1 { background: linear-gradient(135deg, #FFCDD2, #F8BBD0); }
.vthumb-bg-2 { background: linear-gradient(135deg, #FFE0B2, #FFCC80); }
.vthumb-bg-3 { background: linear-gradient(135deg, #B3E5FC, #81D4FA); }
.vthumb-bg-4 { background: linear-gradient(135deg, #C8E6C9, #A5D6A7); }
.vthumb-bg-5 { background: linear-gradient(135deg, #E1BEE7, #CE93D8); }
.vplay {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
}
.vtag-pos {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 600; color: #fff;
}
.vtag-pos.hot { background: var(--danger); }
.vtag-pos.new { background: var(--dy); }
.vtag-pos.trending { background: var(--sp); }
.vgmvs {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.4); color: #fff; padding: 2px 8px;
  border-radius: 6px; font-size: 10px; font-weight: 600;
}
.vbody { padding: 10px; }
.vbody .vt { font-size: 13px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vbody .va { font-size: 11px; color: var(--ink-3); margin-bottom: 8px; }
.vstats { display: flex; gap: 10px; }
.vs-item { display: flex; flex-direction: column; }
.vs-val { font-weight: 600; color: var(--ink); font-size: 13px; }
.vs-lbl { font-size: 10px; color: var(--ink-3); }
.vs-val.gmv { color: var(--brand); }
.vs-val.cvr { color: var(--sp); }

/* ============ 内容库 ============ */
.lib-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.lib-stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.lib-stat-card .ls-icon { font-size: 22px; margin-bottom: 6px; }
.lib-stat-card .ls-val { font-size: 26px; font-weight: 700; }
.lib-stat-card .ls-val.orange { color: var(--brand); }
.lib-stat-card .ls-val.blue { color: #1890FF; }
.lib-stat-card .ls-val.green { color: var(--sp); }
.lib-stat-card .ls-lbl { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.lib-stat-card .ls-sub { font-size: 11px; color: var(--ink-3); }

.invite-box {
  background: linear-gradient(135deg, #FFF9F5, #FFF2EC); border: 1px solid #FFD9C8;
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.invite-code {
  background: var(--brand); color: #fff; padding: 4px 12px; border-radius: 6px;
  font-weight: 700; font-size: 14px; letter-spacing: 1px;
}

.content-list { display: flex; flex-direction: column; gap: 8px; }
.content-item {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px;
  box-shadow: var(--shadow); transition: .15s;
}
.content-item:hover { box-shadow: var(--shadow-md); }
.ci-body { flex: 1; }
.ci-title { font-size: 14px; font-weight: 600; cursor: pointer; }
.ci-title:hover { color: var(--brand); }
.ci-preview { font-size: 12px; color: var(--ink-3); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-time { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.ci-ops { display: flex; gap: 6px; }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--page); border-radius: 8px; padding: 4px; }
.tab-btn {
  padding: 6px 14px; border: none; background: none; font-size: 13px;
  color: var(--ink-3); cursor: pointer; border-radius: 6px; transition: .15s; font-family: inherit;
}
.tab-btn.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.04); }

/* ============ 管理后台表格 ============ */
.action-btns { display: flex; gap: 6px; }
.abtn {
  padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; font-family: inherit; transition: .15s;
}
.abtn:hover { border-color: var(--brand); color: var(--brand); }
.abtn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.abtn.danger { color: var(--danger); border-color: #FFCCC7; }
.role-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.role-admin { background: #FFF7E6; color: #FA8C16; }
.role-user { background: var(--page); color: var(--ink-3); }

/* 卡密/用户统计小卡 */
.mini-stat { background: var(--page); border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; }
.ms-val { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.ms-val.ok { color: var(--ok, #18A058); }
.ms-val.warn { color: var(--warn, #FA8C16); }
.ms-lbl { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* 数据表格 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { position: sticky; top: 0; background: var(--card); text-align: left; padding: 8px 10px; color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--line); }
.data-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.data-table tr:hover td { background: var(--page); }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, Menlo, monospace; font-size: 12px; }
.tag-used { color: var(--ok, #18A058); font-weight: 600; }
.tag-unused { color: var(--warn, #FA8C16); font-weight: 600; }

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D0D5DC; border-radius: 3px; }

/* ============ 视频链接解析 ============ */
.link-parse-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.lp-input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: var(--card); color: var(--ink); }
.lp-input:focus { outline: none; border-color: var(--brand); }
.parse-result { margin-bottom: 16px; }
.parse-result .card { padding: 12px 14px; }
.parse-result img { display: block; }
.parse-result .btn-primary { margin-top: 6px; }
::-webkit-scrollbar-thumb:hover { background: #B0B5BC; }

/* ============ 旧布局兼容（选品/达人/素材/趋势/脚本/课程仍用两栏） ============ */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; max-width: 1200px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

/* checkbox */
.checkbox-label { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; cursor: pointer; }

/* ============ 邀请/分销区 ============ */
.inv-stats { display: flex; gap: 24px; margin-top: 14px; }
.inv-big { font-size: 26px; font-weight: 700; line-height: 1.1; }
.inv-cap { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.inv-rec-title { margin-top: 16px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.inv-records { margin-top: 8px; font-size: 12px; }
.inv-rec-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.inv-rec-who { font-weight: 600; }
.inv-rec-amt { font-weight: 700; }
.inv-rec-cap { color: var(--ink-2); }
.green { color: #07A35A !important; }
.orange { color: #FF6B4A !important; }
