* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; display: flex; min-height: 100vh; background: #f0f2f5; color: #333; }

.sidebar { width: 200px; background: #1a1a2e; color: #fff; padding: 20px 0; flex-shrink: 0; position: fixed; height: 100vh; }
.sidebar-title { padding: 0 20px 20px; font-size: 18px; font-weight: 700; border-bottom: 1px solid #333; margin-bottom: 10px; }
.nav-item { display: block; padding: 12px 20px; color: #aaa; text-decoration: none; transition: all .2s; font-size: 14px; }
.nav-item:hover, .nav-item.active { color: #fff; background: #16213e; }

.content { flex: 1; padding: 24px; overflow-y: auto; margin-left: 200px; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-header h2 { font-size: 20px; font-weight: 600; }

.stats-bar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card { background: #fff; border-radius: 8px; padding: 14px 20px; min-width: 130px; box-shadow: 0 1px 3px rgba(0,0,0,.08); cursor: pointer; transition: all .2s; border: 2px solid transparent; }
.stat-card:hover { border-color: #4361ee; }
.stat-card.active { border-color: #4361ee; background: #f0f4ff; }
.stat-card .label { font-size: 12px; color: #888; }
.stat-card .value { font-size: 24px; font-weight: 700; margin-top: 4px; }

.toolbar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }

.btn { padding: 7px 14px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; transition: all .2s; display: inline-flex; align-items: center; gap: 5px; }
.btn-primary { background: #4361ee; color: #fff; }
.btn-primary:hover { background: #3a56d4; }
.btn-success { background: #2ec4b6; color: #fff; }
.btn-success:hover { background: #25a99d; }
.btn-danger { background: #e63946; color: #fff; }
.btn-danger:hover { background: #cc2f3b; }
.btn-secondary { background: #e9ecef; color: #555; }
.btn-secondary:hover { background: #dee2e6; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-warn { background: #f59e0b; color: #fff; }
.btn-warn:hover { background: #d97706; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 审核卡片 */
.review-cards { display: flex; flex-direction: column; gap: 16px; }
.review-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: hidden; transition: all .3s; }
.review-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.12); }
.review-card-focused { box-shadow: 0 0 0 2px #4361ee, 0 3px 12px rgba(67,97,238,.2); }

.review-card-header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #fafbfc; border-bottom: 1px solid #f0f0f0; }
.review-card-header input[type="checkbox"] { cursor: pointer; width: 16px; height: 16px; }
.review-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.review-badge.multi { background: #fee2e2; color: #dc2626; border: 2px solid #f87171; }
.review-badge.single { background: #f3e8ff; color: #7c3aed; }
.review-title { font-size: 14px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.review-card-body { display: flex; gap: 16px; padding: 16px 18px; }
.review-cover { width: 120px; height: 90px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: #f3f4f6; display: flex; align-items: center; justify-content: center; }
.review-cover img { width: 100%; height: 100%; object-fit: cover; }
.review-cover-placeholder { color: #ccc; font-size: 28px; }
.review-info { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.review-field { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.5; }
.review-label { color: #888; white-space: nowrap; min-width: 40px; flex-shrink: 0; }
.review-links { display: flex; flex-wrap: wrap; gap: 6px; }
.review-link-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: #f0f4ff; border: 1px solid #c7d2fe; border-radius: 4px; font-size: 12px; color: #4361ee; text-decoration: none; white-space: nowrap; }
.review-link-chip:hover { background: #e0e7ff; }
.review-link { color: #4361ee; text-decoration: none; word-break: break-all; }
.review-link:hover { text-decoration: underline; }

.source-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.source-badge.ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.source-badge.warn { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.source-badge.danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.review-actions { display: flex; gap: 8px; padding: 10px 18px; border-top: 1px solid #f0f0f0; background: #fafbfc; flex-wrap: wrap; }

/* 拆分审核 */
.review-split { padding: 0 18px 14px; }
.review-split-head { font-size: 12px; color: #888; margin-bottom: 8px; padding-top: 8px; border-top: 1px dashed #e5e7eb; }
.review-entry { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px; margin-bottom: 8px; }
.review-entry-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-entry-title { font-size: 13px; font-weight: 600; }
.review-entry-meta { font-size: 11px; color: #999; }
.review-entry-fields { display: flex; flex-direction: column; gap: 4px; }
.review-entry-actions { display: flex; gap: 6px; margin-top: 8px; }
.review-note { color: #e63946; font-style: italic; }

/* 分页 */
.review-pagination { display: flex; gap: 10px; margin-top: 20px; align-items: center; justify-content: center; padding: 16px; }

/* 表格通用 */
.table-wrap { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background: #fafafa; font-weight: 600; color: #666; }
tr:hover { background: #f8f9ff; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 10px; padding: 24px; min-width: 420px; max-width: 90vw; box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.modal h3 { margin-bottom: 16px; font-size: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 8px 10px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px; }
.form-group textarea { min-height: 60px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: #4361ee; box-shadow: 0 0 0 2px rgba(67,97,238,.15); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

/* Toast */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 18px; border-radius: 6px; font-size: 13px; color: #fff; animation: toastIn .3s; }
.toast.success { background: #2ec4b6; }
.toast.error { background: #e63946; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.empty-state { text-align: center; padding: 60px 20px; color: #999; }
.loading { text-align: center; padding: 40px; color: #999; }

/* 数据源管理 */
.source-card { background: #fff; border-radius: 8px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; align-items: center; gap: 16px; }
.source-card .source-info { flex: 1; }
.source-card .source-name { font-size: 15px; font-weight: 600; }
.source-card .source-meta { font-size: 12px; color: #888; margin-top: 4px; }
.source-card .source-url { font-size: 12px; color: #4361ee; word-break: break-all; margin-top: 4px; }
.source-card .source-stats { display: flex; gap: 12px; font-size: 12px; color: #666; }
.source-card .source-actions { display: flex; gap: 6px; }
.source-list { display: flex; flex-direction: column; gap: 12px; }
.source-status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.source-status.on { background: #2ec4b6; }
.source-status.off { background: #ccc; }

/* 内容分发 */
.dist-hero { background: linear-gradient(135deg, #0f172a, #1d4ed8); color: #fff; border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 6px 20px rgba(15,23,42,.2); }
.dist-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; margin-bottom: 8px; }
.dist-hero h3 { font-size: 22px; margin-bottom: 8px; }
.dist-hero p { color: rgba(255,255,255,.82); line-height: 1.6; max-width: 860px; }

.dist-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.dist-stat-card { background: #fff; border-radius: 10px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(0,0,0,.08); border: 2px solid transparent; cursor: pointer; transition: all .2s; }
.dist-stat-card:hover { border-color: #93c5fd; transform: translateY(-1px); }
.dist-stat-card.active { border-color: #2563eb; background: #eff6ff; }
.dist-stat-title { font-size: 13px; color: #64748b; }
.dist-stat-value { font-size: 28px; font-weight: 700; margin: 6px 0; color: #0f172a; }
.dist-stat-meta { font-size: 12px; color: #64748b; line-height: 1.5; }

.dist-panel { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 20px; }
.dist-batch-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.dist-card-list { display: flex; flex-direction: column; gap: 14px; }
.dist-card { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; background: #fcfcfd; }
.dist-card-head { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid #eef2f7; background: #fff; }
.dist-check { padding-top: 4px; }
.dist-card-title-wrap { flex: 1; min-width: 0; }
.dist-card-title-wrap h3 { font-size: 15px; line-height: 1.5; margin-bottom: 6px; word-break: break-word; }
.dist-card-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #64748b; }
.dist-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.dist-field { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.dist-label { min-width: 40px; color: #64748b; flex-shrink: 0; }
.dist-pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dist-card-actions { padding: 12px 16px; background: #fff; border-top: 1px solid #eef2f7; display: flex; gap: 8px; flex-wrap: wrap; }
.dist-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid transparent; }
.dist-pill.empty { background: #f8fafc; color: #64748b; border-color: #cbd5e1; }
.dist-pill.pending { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.dist-pill.done { background: #dcfce7; color: #166534; border-color: #86efac; }
.dist-pill.failed { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.dist-platform-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: #e0e7ff; color: #3730a3; font-size: 11px; font-weight: 700; }
.dist-table-title { font-weight: 600; color: #111827; }
.dist-table-sub { font-size: 12px; color: #64748b; margin-top: 3px; }

@media (max-width: 900px) {
  .dist-batch-bar { align-items: stretch; }
  .dist-card-head { flex-wrap: wrap; }
}
