/* AI媒体矩阵 - Modern SaaS Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #09090b;
  --bg-secondary: #0f0f12;
  --bg-card: rgba(22, 22, 28, 0.8);
  --bg-card-hover: rgba(30, 30, 38, 0.9);
  --bg-sidebar: #0c0c10;
  --border-color: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-pink: #ec4899;
  --gradient-1: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-2: linear-gradient(135deg, #10b981, #3b82f6);
  --gradient-3: linear-gradient(135deg, #f59e0b, #ef4444);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 240px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 布局 ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-brand h1 {
  font-size: 16px;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}
.sidebar-brand .brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}
.nav-section {
  margin-bottom: 8px;
}
.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(59,130,246,0.12);
  color: var(--accent-blue);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent-blue);
  border-radius: 0 3px 3px 0;
}
.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  opacity: 0.7;
}
.nav-item.active i { opacity: 1; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--text-muted); }
.btn-logout {
  display: block;
  margin-top: 10px;
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  text-align: center;
  border-radius: 6px;
  transition: var(--transition);
}
.btn-logout:hover {
  background: rgba(239,68,68,0.1);
  color: var(--accent-red);
}

/* ===== 主内容 ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px;
  min-height: 100vh;
}

/* ===== 页面头 ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.page-title .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ===== 卡片 ===== */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: var(--border-hover);
}
.glass-card .card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}
.glass-card .card-body {
  padding: 20px;
}

/* ===== 统计卡片 ===== */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.stat-card.blue::before { background: var(--gradient-1); }
.stat-card.green::before { background: var(--accent-green); }
.stat-card.amber::before { background: var(--accent-amber); }
.stat-card.purple::before { background: var(--accent-purple); }
.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}
.stat-icon.blue { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.stat-icon.green { background: rgba(16,185,129,0.12); color: var(--accent-green); }
.stat-icon.amber { background: rgba(245,158,11,0.12); color: var(--accent-amber); }
.stat-icon.purple { background: rgba(139,92,246,0.12); color: var(--accent-purple); }
.stat-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* ===== 流水线步骤 ===== */
.pipeline-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}
.pipeline-step {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: var(--transition);
}
.pipeline-step.done {
  background: rgba(16,185,129,0.08);
}
.pipeline-step .step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: var(--transition);
}
.pipeline-step.done .step-dot {
  background: rgba(16,185,129,0.2);
  color: var(--accent-green);
  box-shadow: 0 0 12px rgba(16,185,129,0.2);
}
.pipeline-step.pending .step-dot {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}
.pipeline-step .step-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.pipeline-step.done .step-name { color: var(--accent-green); }
.pipeline-connector {
  width: 20px;
  height: 2px;
  background: var(--border-color);
  flex-shrink: 0;
}
.pipeline-connector.done { background: rgba(16,185,129,0.3); }

/* ===== 表格 ===== */
.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.modern-table thead th {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}
.modern-table tbody td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.modern-table tbody tr {
  transition: var(--transition);
}
.modern-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}
.modern-table tbody tr:last-child td {
  border-bottom: none;
}

/* ===== 标签 ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.tag-blue { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.tag-green { background: rgba(16,185,129,0.12); color: var(--accent-green); }
.tag-amber { background: rgba(245,158,11,0.12); color: var(--accent-amber); }
.tag-red { background: rgba(239,68,68,0.12); color: var(--accent-red); }
.tag-purple { background: rgba(139,92,246,0.12); color: var(--accent-purple); }
.tag-pink { background: rgba(236,72,153,0.12); color: var(--accent-pink); }
.tag-gray { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

/* Platform tags */
.tag-weixin { background: rgba(7,193,96,0.12); color: #07c160; }
.tag-douyin { background: rgba(255,255,255,0.08); color: #fff; }
.tag-xiaohongshu { background: rgba(254,44,85,0.12); color: #fe2c55; }
.tag-shipinhao { background: rgba(250,157,59,0.12); color: #fa9d3b; }

/* Status dots */
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.status-dot.success { background: var(--accent-green); box-shadow: 0 0 6px rgba(16,185,129,0.4); }
.status-dot.warning { background: var(--accent-amber); box-shadow: 0 0 6px rgba(245,158,11,0.4); }
.status-dot.danger { background: var(--accent-red); box-shadow: 0 0 6px rgba(239,68,68,0.4); }
.status-dot.info { background: var(--accent-blue); box-shadow: 0 0 6px rgba(59,130,246,0.4); }
.status-dot.muted { background: var(--text-muted); }

/* ===== 按钮 ===== */
.btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary-glow {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 20px rgba(59,130,246,0.3);
}
.btn-primary-glow:hover {
  background: #2563eb;
  box-shadow: 0 0 30px rgba(59,130,246,0.4);
  transform: translateY(-1px);
  color: #fff;
}
.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: var(--border-hover);
}
.btn-success-glow {
  background: var(--accent-green);
  color: #fff;
  box-shadow: 0 0 20px rgba(16,185,129,0.3);
}
.btn-success-glow:hover {
  background: #059669;
  box-shadow: 0 0 30px rgba(16,185,129,0.4);
  color: #fff;
}
.btn-warning-glow {
  background: var(--accent-amber);
  color: #000;
  box-shadow: 0 0 20px rgba(245,158,11,0.3);
}
.btn-warning-glow:hover {
  background: #d97706;
  color: #000;
}

/* ===== 表单 ===== */
.form-modern {
  background: transparent;
}
.form-modern .form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-modern .form-control,
.form-modern .form-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 9px 12px;
  font-size: 13px;
  transition: var(--transition);
}
.form-modern .form-control:focus,
.form-modern .form-select:focus {
  background: rgba(255,255,255,0.06);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
  outline: none;
}
.form-modern textarea.form-control {
  resize: vertical;
}

/* ===== 终端日志 ===== */
.terminal {
  background: #0a0a0c;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--accent-green);
  overflow-y: auto;
}
.terminal .log-time {
  color: var(--text-muted);
}
.terminal .log-error {
  color: var(--accent-red);
}
.terminal .log-success {
  color: var(--accent-green);
}

/* ===== 选题卡片 ===== */
.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
  transition: var(--transition);
  height: 100%;
}
.topic-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.topic-card .topic-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 10px 0 6px;
  color: var(--text-primary);
}
.topic-card .topic-angle {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.topic-card .topic-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

/* ===== 内容预览 ===== */
.content-preview {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-secondary);
}
.content-preview h1 { font-size: 1.5rem; margin: 1.2rem 0 0.6rem; color: var(--text-primary); font-weight: 700; }
.content-preview h2 { font-size: 1.25rem; margin: 1rem 0 0.5rem; color: var(--text-primary); font-weight: 600; }
.content-preview h3 { font-size: 1.1rem; margin: 0.8rem 0 0.4rem; color: var(--text-primary); font-weight: 600; }
.content-preview p { margin: 0.5rem 0; }
.content-preview strong { color: var(--text-primary); }
.content-preview blockquote {
  border-left: 3px solid var(--accent-blue);
  padding: 10px 16px;
  margin: 12px 0;
  background: rgba(59,130,246,0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
}
.content-preview img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 8px 0;
}
.content-preview li { margin: 4px 0; }

/* ===== 模态框 ===== */
.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
}
.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
}

/* ===== 筛选栏 ===== */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.filter-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
  display: block;
}
.empty-state p {
  font-size: 14px;
  margin-top: 8px;
}

/* ===== 提示信息卡 ===== */
.info-card {
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: var(--radius);
  padding: 16px;
}
.info-card .info-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 8px;
}
.info-card ul {
  margin: 0;
  padding-left: 16px;
}
.info-card li {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0;
  line-height: 1.6;
}

/* ===== 日期选择 ===== */
.date-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 12px;
  font-size: 13px;
  outline: none;
}
.date-select:focus {
  border-color: var(--accent-blue);
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(59,130,246,0.3); }
  50% { box-shadow: 0 0 16px rgba(59,130,246,0.5); }
}
.animate-in {
  animation: fadeIn 0.4s ease forwards;
}

/* ===== 移动端 ===== */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

@media (max-width: 768px) {
  .mobile-toggle { display: flex; }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-overlay.open { display: block; }
  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: 56px;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .stat-value { font-size: 24px; }
  .pipeline-steps { flex-wrap: wrap; }
  .pipeline-connector { display: none; }
  .pipeline-step { flex: 0 0 calc(25% - 4px); }
}

/* ===== Alert覆盖 ===== */
.alert {
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 13px;
}
/* Topic/Content confirm/reject buttons */
.action-btns { display: flex; gap: 6px; margin-top: 8px; }
.btn-confirm {
  background: rgba(46,213,115,.15); color: #2ed573; border: 1px solid rgba(46,213,115,.3);
  padding: 4px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all .2s;
}
.btn-confirm:hover { background: rgba(46,213,115,.3); }
.btn-confirm:disabled { opacity: 0.4; cursor: default; }
.btn-reject {
  background: rgba(255,71,87,.15); color: #ff4757; border: 1px solid rgba(255,71,87,.3);
  padding: 4px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all .2s;
}
.btn-reject:hover { background: rgba(255,71,87,.3); }
.btn-reject:disabled { opacity: 0.4; cursor: default; }

.topic-card.confirmed { border-left: 3px solid #2ed573; }
.topic-card.rejected { opacity: 0.45; border-left: 3px solid #ff4757; }
.topic-card.pending { border-left: 3px solid rgba(255,255,255,.1); }

.status-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.status-pending { background: rgba(255,165,0,.15); color: #ffa500; }
.status-confirmed { background: rgba(46,213,115,.15); color: #2ed573; }
.status-rejected { background: rgba(255,71,87,.15); color: #ff4757; }
.status-edited { background: rgba(0,198,255,.15); color: #00c6ff; }
/* 人工确认关卡样式 */
.pipeline-step.manual .step-dot { background: rgba(255,165,0,.2); border-color: rgba(255,165,0,.5); }
.pipeline-step.manual .step-dot i { color: #ffa500; }
.pipeline-step.manual.done .step-dot { background: rgba(46,213,115,.2); border-color: #2ed573; }
.pipeline-step.manual.done .step-dot i { color: #2ed573; }
