/* ========== 自媒体总控台 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f6fa;
  --bg-card: #ffffff;
  --bg-sidebar: #1a1d29;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --text-sidebar: #b0b8c8;
  --text-sidebar-active: #ffffff;
  --primary: #5b6af0;
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --border: #e8ecf1;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 10px;
  --sidebar-width: 240px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  position: fixed;
  left: 0; top: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sidebar-logo small {
  color: var(--text-sidebar);
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--text-sidebar);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-sidebar-active);
}

.nav-item.active {
  background: rgba(91,106,240,0.15);
  color: var(--text-sidebar-active);
  border-left-color: var(--primary);
}

.nav-item .icon { font-size: 18px; width: 24px; text-align: center; }
.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--text-sidebar);
  font-size: 12px;
}

/* ===== MAIN ===== */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 24px;
  max-width: calc(100vw - var(--sidebar-width));
}

.page { display: none; }
.page.active { display: block; }

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.page-header .subtitle {
  color: var(--text-light);
  font-size: 14px;
  margin-top: 4px;
}

/* ===== CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.stat-card .label { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.stat-card .value { font-size: 28px; font-weight: 700; }
.stat-card .change { font-size: 12px; margin-top: 4px; }
.stat-card .change.up { color: var(--success); }
.stat-card .change.down { color: var(--danger); }

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1200px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ===== PLATFORM CARDS ===== */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.platform-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--border);
  transition: all 0.2s;
}

.platform-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.platform-card .p-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.platform-card .p-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.platform-card .p-name {
  font-weight: 600;
  font-size: 15px;
}

.platform-card .p-status {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 10px;
  margin-left: auto;
}

.status-active { background: #eafaf1; color: var(--success); }
.status-pending { background: #fef9e7; color: var(--warning); }
.status-error { background: #fdedec; color: var(--danger); }

.platform-card .p-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-card .p-meta span {
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 4px;
}

.platform-card .p-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #4a5ae0; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #219a52; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 4px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); outline: none; }
.form-group textarea { min-height: 120px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
th { font-weight: 600; color: var(--text-light); font-size: 12px; text-transform: uppercase; }
tr:hover { background: #fafbfc; }

/* ===== BRIEFS ===== */
.trend-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  margin: 4px;
}

.trend-high { background: #fdedec; color: var(--danger); }
.trend-medium { background: #fef9e7; color: var(--warning); }
.trend-low { background: #eafaf1; color: var(--success); }

.brief-section {
  margin-bottom: 20px;
}

.brief-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

/* ===== CONTENT EDITOR ===== */
.editor-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.editor-textarea {
  width: 100%;
  min-height: 300px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.preview-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 300px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.platform-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.platform-tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.2s;
}

.platform-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== SETTINGS LAYOUT (v3.5)：左侧 tab + 右侧内容 ===== */
.settings-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.settings-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow);
}
.settings-tab {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s;
  white-space: nowrap;
}
.settings-tab:hover {
  background: var(--bg);
  color: var(--text);
}
.settings-tab.active {
  background: var(--primary);
  color: #fff;
}
.settings-content {
  flex: 1;
  min-width: 0;
}
.settings-panel {
  display: none;
}
.settings-panel.active {
  display: block;
}
@media (max-width: 768px) {
  .settings-layout { flex-direction: column; }
  .settings-tabs { flex-direction: row; min-width: 0; width: 100%; overflow-x: auto; }
  .settings-tab { white-space: nowrap; }
}

/* ===== CHAT ===== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 500px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.chat-msg {
  margin-bottom: 16px;
  max-width: 80%;
}

.chat-msg.user {
  margin-left: auto;
  text-align: right;
}

.chat-msg .content {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.chat-msg.user .content {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.ai .content {
  background: var(--bg);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-msg .time {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.chat-input-area input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  outline: none;
}

.chat-input-area input:focus { border-color: var(--primary); }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  width: 520px;
  max-width: 90vw;
  box-shadow: var(--shadow-md);
}

.modal h3 { margin-bottom: 20px; }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-card);
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  font-size: 14px;
  z-index: 300;
  animation: slideIn 0.3s ease;
  max-width: 360px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== UTILS ===== */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-light { color: var(--text-light); }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Article list */
.article-list-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.article-list-item:hover {
  border-color: var(--primary);
  background: #f8f9ff;
}

.article-list-item.selected {
  border-color: var(--primary);
  background: #eef0ff;
}

.article-list-item .title {
  font-weight: 500;
  margin-bottom: 4px;
}

.article-list-item .meta {
  font-size: 12px;
  color: var(--text-light);
}

/* ===== INDUSTRY TAGS ===== */
.industry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.industry-tag {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.industry-tag:hover {
  border-color: var(--primary);
  background: #f8f9ff;
}

.industry-tag.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.industry-tag.custom {
  border-style: dashed;
}

.industry-tag .remove-btn {
  margin-left: 4px;
  cursor: pointer;
  opacity: 0.6;
  font-size: 14px;
}

.industry-tag .remove-btn:hover { opacity: 1; }

/* ===== MCP STATUS ===== */
.mcp-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
}

.mcp-status-indicator.online {
  background: #eafaf1;
  color: #27ae60;
}

.mcp-status-indicator.offline {
  background: #fdedec;
  color: #e74c3c;
}

.mcp-status-indicator.unknown {
  background: #f0f0f0;
  color: #999;
}
.mcp-status-indicator.manual {
  background: #f0f1ff;
  color: #5b6af0;
}

.mcp-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.mcp-dot.online { background: #27ae60; }
.mcp-dot.offline { background: #e74c3c; }
.mcp-dot.unknown { background: #ccc; }
.mcp-dot.manual { background: #5b6af0; }

/* ===== PLATFORM PREVIEW ===== */
.platform-preview {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.8;
  border: 1px solid var(--border);
}

/* ===== EDITOR PANEL (refined) ===== */
.editor-left, .editor-right {
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ACTIONS ===== */
.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== MODAL LG ===== */
.modal-lg {
  width: 640px;
  max-width: 95vw;
}

/* ===== STRATEGY PANEL ===== */
.strategy-item {
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.strategy-item input[type="checkbox"] {
  width: 18px; height: 18px;
  cursor: pointer;
}

.strategy-item .strategy-label {
  flex: 1;
  font-size: 14px;
}

/* ===== DISCUSS DATA PANEL ===== */
.discuss-data-section {
  margin-bottom: 16px;
}

.discuss-data-section h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary);
}

.discuss-data-item {
  font-size: 12px;
  padding: 4px 0;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
}

.discuss-data-item strong { color: var(--text); }

/* ===== BRIEF LOADING OVERLAY ===== */
.brief-loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.brief-loading-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 40px;
  max-width: 520px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.brief-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: var(--primary, #4f46e5);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-platform {
  display: inline-block;
  padding: 3px 10px;
  margin: 3px;
  font-size: 12px;
  border-radius: 12px;
  background: #f0f1ff;
  color: var(--primary, #4f46e5);
  font-weight: 500;
  animation: pulse 1.5s ease infinite;
}
.loading-platform:nth-child(2) { animation-delay: 0.1s; }
.loading-platform:nth-child(3) { animation-delay: 0.2s; }
.loading-platform:nth-child(4) { animation-delay: 0.3s; }
.loading-platform:nth-child(5) { animation-delay: 0.4s; }
.loading-platform:nth-child(6) { animation-delay: 0.5s; }
.loading-platform:nth-child(7) { animation-delay: 0.6s; }
.loading-platform:nth-child(8) { animation-delay: 0.7s; }
.loading-platform:nth-child(9) { animation-delay: 0.8s; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== CONTENT FILTER ===== */
.content-filter-tab {
  cursor: pointer;
  font-size: 13px;
}

/* ===== BRIEF HOTSPOT CARDS (v3) ===== */
.brief-industry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.hotspot-card {
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #f8f9fb;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  transition: all 0.2s;
}
.hotspot-card:hover {
  background: #f0f1ff;
  border-left-color: #4a57d9;
}

.hotspot-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.5;
}

.hotspot-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.hotspot-summary {
  font-size: 13px;
  color: #555;
  line-height: 1.9;
}

/* Hotspot actions (view original link) */
.hotspot-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.hotspot-actions .btn-xs {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 4px;
}

/* Clickable hotspot title links */
.hotspot-link {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s;
}
.hotspot-link:hover {
  color: #3b4fd6;
  text-decoration: underline;
}

/* High impact hotspot card */
.hotspot-card.high-impact {
  border-left-color: #dc2626;
  background: #fff5f5;
}
.hotspot-card.high-impact:hover {
  background: #fef0f0;
}

/* No result card */
.hotspot-card.no-result {
  background: #fff3cd;
  border-left: 3px solid #ffc107;
}

/* Search link card */
.hotspot-card.search-link {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-left-width: 1px;
}

/* ===== IMPACT BADGES ===== */
.impact-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.media-pick-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #dbeafe;
  color: #1d4ed8;
  margin-right: 4px;
}
.impact-high {
  background: #fee2e2;
  color: #dc2626;
}
.impact-medium {
  background: #fef3c7;
  color: #d97706;
}
.impact-general {
  background: #e5e7eb;
  color: #6b7280;
}

/* Brief badge */
.brief-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  margin-left: 8px;
  font-weight: 500;
}
.brief-badge.real {
  background: #dcfce7;
  color: #16a34a;
}
.brief-badge.warn {
  background: #fff3cd;
  color: #856404;
}

/* ===== HEAT BADGES ===== */
.heat-badge-high {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #fee2e2;
  color: #dc2626;
}
.heat-badge-medium {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #fef3c7;
  color: #d97706;
}
.heat-badge-low {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  background: #e5e7eb;
  color: #6b7280;
}

/* ===== TOPIC SELECT ITEMS ===== */
.topic-select-item {
  padding: 14px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-card);
}
.topic-select-item:hover {
  border-color: var(--primary);
  background: #f8f9ff;
  box-shadow: var(--shadow);
}
.topic-select-item.selected {
  border-color: var(--primary);
  background: #f0f1ff;
  box-shadow: 0 0 0 2px rgba(91,106,240,0.15);
}

.topic-select-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.topic-select-summary {
  font-size: 12px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 4px;
}
.topic-select-meta {
  font-size: 11px;
  color: var(--text-light);
}

/* ===== AI RECOMMENDATION BADGES ===== */
.recommend-item {
  border-left: 3px solid var(--primary);
}
.rec-strong {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  background: #dcfce7;
  color: #16a34a;
}
.rec-normal {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 11px;
  background: #e5e7eb;
  color: #6b7280;
}
.rec-optional {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 11px;
  background: #f3f4f6;
  color: #9ca3af;
}

/* ===== PUBLISH RESULT MODAL ===== */
#publishResultModal .modal {
  max-height: 80vh;
  overflow-y: auto;
}

/* ===== CONTENT TABLE BUTTON GAP ===== */
#contentDetailActions {
  flex-wrap: wrap;
}

/* ===== TEMPLATE MANAGER (v3.1) ===== */
#templateManagerModal .modal {
  max-height: 85vh;
  overflow-y: auto;
}

#templateEditArea .form-group textarea {
  min-height: 60px;
  resize: vertical;
}

#templateEditArea .form-group input {
  font-size: 13px;
}

.template-status-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}

.template-status-badge.has {
  background: #dcfce7;
  color: #16a34a;
}

.template-status-badge.missing {
  background: #fef3c7;
  color: #d97706;
}

/* ===== LOGIN OVERLAY (v3.5) ===== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.login-overlay.show { display: flex; }
.login-card {
  width: 340px;
  max-width: 92vw;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  text-align: center;
}
.login-card h2 { font-size: 18px; }
.login-card .form-group { text-align: left; margin-bottom: 12px; }
.login-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}
.login-card input:focus { outline: none; border-color: var(--primary); }

/* ===== INDIE SITE CONFIG (v3.2) ===== */
#indieSiteConfigModal .modal {
  max-height: 80vh;
  overflow-y: auto;
}

.indie-site-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 8px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ===== INDIE SITE STATUS (v3.2) ===== */
#indieSiteStatus {
  font-size: 11px;
  color: var(--text-light);
  padding: 4px 0;
  margin-bottom: 8px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ===== GENERATION PROGRESS CHIPS (v3.9) ===== */
.gen-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}
.gen-chip-done { background: #e8f8ee; color: #1a9e4e; border: 1px solid #bfe8cf; }
.gen-chip-active {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  animation: genPulse 1.2s ease-in-out infinite;
}
.gen-chip-todo { background: #eef1f7; color: #8a94a6; border: 1px solid #e0e4ee; }
.gen-chip-fail { background: #fdeeee; color: #e74c3c; border: 1px solid #f5c6c0; }
@keyframes genPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
