/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a3a6b;
  --primary-light: #2a5298;
  --primary-bright: #1a73e8;
  --danger: #d93025;
  --warning: #f9ab00;
  --success: #1e8e3e;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #666;
  --border: #e0e0e0;
  --radius: 12px;
  --sidebar-width: 240px;
}

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

.hidden { display: none !important; }

/* ========================================
   Login Screen
   ======================================== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a1a3a 0%, #0f2649 30%, #1a3a6b 60%, #2a5298 100%);
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 400px; height: 400px;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 50%;
}

.login-screen::after {
  content: "";
  position: absolute;
  bottom: -150px; left: -80px;
  width: 500px; height: 500px;
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 50%;
}

.login-container {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 48px 40px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.login-logo p {
  font-size: 13px;
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-group input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #fce8e6;
  border-radius: 6px;
}

.login-submit-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 6px;
  transition: opacity 0.2s, transform 0.15s;
  font-family: inherit;
}

.login-submit-btn:hover { opacity: 0.92; }
.login-submit-btn:active { transform: scale(0.98); }
.login-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ========================================
   Admin Layout
   ======================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0a1a3a 0%, #0f2649 50%, #1a3a6b 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo { font-size: 28px; }

.sidebar-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 24px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  user-select: none;
}

.nav-item:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #4d9fff;
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.user-name {
  font-size: 13px;
  opacity: 0.7;
}

/* === Main Content === */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

/* === Topbar === */
.topbar {
  height: 56px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  margin-right: 12px;
  color: var(--text);
}

.topbar-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.topbar-back {
  color: var(--primary-bright);
  cursor: pointer;
  margin-right: 8px;
  font-size: 18px;
}

.topbar-back:hover { opacity: 0.7; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-user {
  font-size: 13px;
  color: var(--text-secondary);
}

.logout-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.logout-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* === Content Area === */
.content-area {
  flex: 1;
  padding: 24px;
}

/* === Sidebar Overlay (Mobile) === */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

/* === Views === */
.view {
  display: none;
}

.view.active { display: block; }

#reportDetailView {
  background: #dde1e7;
  margin: -24px;
  padding: 24px;
}

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

.page-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.action-btn:hover { opacity: 0.9; }
.action-btn:active { transform: scale(0.97); }
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* === Dashboard === */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.dash-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.dash-card-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(26, 58, 107, 0.06);
}

.dash-card-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.dash-card-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.dashboard-actions {
  margin-bottom: 24px;
}

.dashboard-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.empty-hint {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 32px 0;
}

/* === Settings Sections === */
.settings-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.settings-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.settings-section-desc {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

/* === Monitor Page === */
.monitor-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.monitor-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.monitor-input:focus {
  border-color: var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

/* === User Management === */
.user-mgmt-add {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.user-mgmt-input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  min-width: 140px;
}

.user-mgmt-input:focus {
  border-color: var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.user-mgmt-select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: white;
}

.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.user-item:last-child { border-bottom: none; }

.user-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-item-name {
  font-weight: 600;
  font-size: 14px;
}

.user-item-role {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 500;
}

.role-admin {
  background: #e8f0fe;
  color: #1967d2;
}

.role-user {
  background: #f0f0f0;
  color: #666;
}

.user-item-date {
  font-size: 12px;
  color: #bbb;
}

.user-item-actions {
  display: flex;
  gap: 6px;
}

.user-action-btn {
  padding: 5px 12px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.user-action-btn:hover { background: #f5f5f5; }

.user-action-btn.danger {
  color: var(--danger);
  border-color: #f0c0be;
}

.user-action-btn.danger:hover {
  background: #fce8e6;
}

/* === Generate Button (reusable) === */
.generate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26, 58, 107, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.generate-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(26, 58, 107, 0.2);
}

.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* === Mobile Responsive === */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .main-content {
    margin-left: 0;
  }

  .hamburger-btn {
    display: block;
  }

  .content-area {
    padding: 16px;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .dash-card {
    padding: 14px;
  }

  .dash-card-value {
    font-size: 20px;
  }

  .user-mgmt-add {
    flex-direction: column;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .monitor-add-row {
    flex-direction: column;
  }
}

/* === Report List === */
.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-left: 2px;
  color: var(--text-secondary);
}

.report-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: box-shadow 0.2s;
  position: relative;
  border-left: 4px solid var(--primary-light);
}

.report-card:active {
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

.report-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  padding-right: 28px;
}

.report-card-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: #999;
}

.status-badge {
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.status-completed { background: #e6f4ea; color: var(--success); }
.status-generating { background: #fef7e0; color: #d17b00; }
.status-failed { background: #fce8e6; color: var(--danger); }

.report-card-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #bbb;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}

.report-card-delete:active { background: #f0f0f0; color: #888; }

.load-more-btn {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 14px;
  color: var(--primary-light);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
}

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

.empty-state p {
  color: #999;
  font-size: 15px;
}

.empty-sub {
  font-size: 13px !important;
  margin-top: 4px;
}

/* === Generating View === */
.gen-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px 20px 24px;
  margin: 20px 0 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.gen-status-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: inline-block;
}

.gen-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.gen-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 20px;
}

.progress-bar-wrapper {
  height: 6px;
  background: #e8eaed;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-bright));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-percent {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.stream-output {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stream-output h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.stream-content {
  font-size: 12px;
  line-height: 1.7;
  color: #888;
  max-height: 360px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
}

/* ========================================
   A4 Report Detail — Multi-page
   ======================================== */
.a4-paper {
  background: var(--card-bg);
  width: 794px;
  max-width: 100%;
  margin: 0 auto 24px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.12);
  border-radius: 2px;
  position: relative;
}

/* 仅封面保留 A4 满高 */
.a4-cover-page {
  min-height: 1123px;
  display: flex;
  flex-direction: column;
}

/* 封面页：渐变铺满整页，内容垂直居中 */
.a4-cover-page .report-cover {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 续页标题 */
.section-heading-cont {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d0d5dd;
}

.section-heading-cont .section-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-light);
  letter-spacing: 0.5px;
}

/* Cover */
.report-cover {
  background: linear-gradient(135deg, #0f2649 0%, #1a3a6b 35%, #2a5298 70%, #3568b2 100%);
  color: white;
  padding: 52px 40px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.report-cover::before {
  content: "";
  position: absolute;
  top: -80px; right: -80px;
  width: 240px; height: 240px;
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: 50%;
}

.report-cover::after {
  content: "";
  position: absolute;
  bottom: -100px; left: -50px;
  width: 300px; height: 300px;
  border: 1.5px solid rgba(255,255,255,0.04);
  border-radius: 50%;
}

.cover-org {
  font-size: 12px;
  letter-spacing: 6px;
  opacity: 0.7;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.cover-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 10px;
}

.cover-subtitle {
  font-size: 18px;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 28px;
  letter-spacing: 1px;
}

.cover-divider {
  width: 48px;
  height: 2px;
  background: rgba(255,255,255,0.4);
  margin: 0 auto 20px;
}

.cover-date {
  font-size: 13px;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

.cover-badge {
  display: inline-block;
  margin-top: 18px;
  padding: 4px 18px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  font-size: 11px;
  opacity: 0.6;
  letter-spacing: 3px;
}

/* Report Body */
.report-body {
  padding: 40px 44px 52px;
}

/* Section Headings */
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.section-heading:first-child {
  margin-top: 0;
}

.section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.section-label {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}

/* Summary */
.report-summary-box {
  background: linear-gradient(135deg, #f4f7fd 0%, #eaf0fa 100%);
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  line-height: 2;
  font-size: 14.5px;
  color: #333;
}

/* Topic Group */
.topic-group {
  margin-bottom: 32px;
  background: #fafbfd;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eef1f6;
}

.topic-group-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: white;
  border-bottom: 2px solid #2a5298;
}

.topic-group-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.topic-group-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topic-group-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.topic-group-count {
  font-size: 12px;
  color: #999;
}

/* Event Cards */
.event-item {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #eef1f6;
  transition: background 0.15s;
}

.event-item:last-child { border-bottom: none; }

.event-item-index {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Impact 分数圆圈（替代序号） */
.event-item-impact {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 1;
}

.event-item-body {
  flex: 1;
  min-width: 0;
}

.event-item-title {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
  line-height: 1.5;
}

.event-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #999;
}

.event-item-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #888;
}

.event-item-time::before {
  content: "\1F4C5";
  font-size: 11px;
}

.event-item-summary {
  font-size: 13.5px;
  color: #555;
  line-height: 1.9;
  margin-bottom: 10px;
}

.event-item-opinion {
  background: linear-gradient(135deg, #f8f4ff, #f0ecfa);
  border-left: 3px solid #7c5cbf;
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: #555;
}

.opinion-label {
  display: inline-block;
  background: #7c5cbf;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}

.event-item-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.event-item-source {
  font-size: 12px;
  color: #999;
}

.event-item-source a {
  color: var(--primary-bright);
  text-decoration: none;
}

.event-item-tags {
  display: flex;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.tag-positive { background: #e6f4ea; color: #1e8e3e; }
.tag-negative { background: #fce8e6; color: #d93025; }
.tag-neutral  { background: #f1f3f4; color: #666; }
.tag-high     { background: #fce8e6; color: #d93025; }
.tag-medium   { background: #fef7e0; color: #c67a00; }
.tag-low      { background: #e6f4ea; color: #1e8e3e; }
/* 敏感度标签 */
.tag-sensitivity-high   { background: #fce8e6; color: #c5221f; }
.tag-sensitivity-medium { background: #fef7e0; color: #b06000; }
.tag-sensitivity-low    { background: #e6f4ea; color: #137333; }

/* 传播趋势标签 */
.tag-trend-rising  { background: #fce8e6; color: #c5221f; }
.tag-trend-peak    { background: #fce8e6; color: #a50e0e; font-weight: 700; }
.tag-trend-fading  { background: #e8f0fe; color: #1967d2; }
.tag-trend-stable  { background: #f1f3f4; color: #666; }

/* Sentiment Section */
.sentiment-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
  background: #fafbfd;
  border-radius: 10px;
  border: 1px solid #eef1f6;
  overflow: hidden;
}

.sentiment-chart-box {
  flex: 0 0 220px;
  background: white;
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sentiment-ring {
  position: relative;
  width: 140px; height: 140px;
  margin-bottom: 16px;
}

.sentiment-ring svg { transform: rotate(-90deg); }

.sentiment-ring-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.sentiment-ring-center .ring-label {
  font-size: 11px;
  color: #999;
}

.sentiment-ring-center .ring-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.sentiment-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot-positive { background: #1e8e3e; }
.legend-dot-neutral  { background: #9aa0a6; }
.legend-dot-negative { background: #d93025; }

.sentiment-detail-box {
  flex: 1;
  padding: 28px 24px;
  font-size: 14.5px;
  line-height: 2;
  color: #444;
  display: flex;
  align-items: center;
}

/* Risk Warning */
.risk-item {
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 14px;
}

.risk-item-high {
  background: linear-gradient(135deg, #fff5f5, #fff0f0);
  border: 1px solid #fcd5d5;
}

.risk-item-medium {
  background: linear-gradient(135deg, #fffcf0, #fff8e6);
  border: 1px solid #f5e6b8;
}

.risk-item-low {
  background: linear-gradient(135deg, #f0faf2, #e8f6eb);
  border: 1px solid #c8e6cd;
}

.risk-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.risk-item-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  flex: 1;
}

.risk-item-header-tags {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.risk-item-topic {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

.risk-item-reason {
  font-size: 13.5px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 14px;
}

.risk-item-suggestion {
  background: rgba(255,255,255,0.8);
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--primary-light);
  border-left: 3px solid var(--primary-light);
}

.risk-item-suggestion strong {
  color: var(--primary);
}

/* Print Button */
.print-bar {
  text-align: center;
  padding: 12px 0 16px;
}

.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  background: white;
  border: 1px solid #ccc;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.print-btn:active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Footer */
.report-footer {
  text-align: center;
  padding: 24px 40px;
  border-top: 1px solid #eef1f6;
  font-size: 12px;
  color: #bbb;
  letter-spacing: 0.5px;
}

/* ========================================
   Topic & Monitor Components
   ======================================== */

.topic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.topic-item:last-child { border-bottom: none; }

.topic-info { flex: 1; }

.topic-name {
  font-size: 15px;
  font-weight: 500;
}

.topic-keywords {
  font-size: 12px;
  color: #bbb;
  margin-top: 4px;
}

.toggle {
  position: relative;
  width: 48px; height: 28px;
  flex-shrink: 0;
  margin-left: 12px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 28px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }


.custom-monitor-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #f8faff;
  border: 1px solid #eef1f6;
  border-radius: 8px;
  margin-bottom: 8px;
  gap: 10px;
}

.custom-monitor-keyword {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.custom-monitor-desc {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
  font-weight: 400;
}

.custom-monitor-delete {
  width: 28px;
  height: 28px;
  border: none;
  background: #fee2e2;
  color: #c5221f;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* === RSSHub Status Indicator === */
.rsshub-status {
  background: #f8faff;
  border: 1px solid #eef1f6;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 8px;
}

.rsshub-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rsshub-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rsshub-dot-connected {
  background: var(--success);
  box-shadow: 0 0 6px rgba(30, 142, 62, 0.5);
}

.rsshub-dot-disconnected {
  background: var(--danger);
  box-shadow: 0 0 6px rgba(217, 48, 37, 0.4);
}

.rsshub-dot-checking {
  background: var(--warning);
  animation: rsshub-pulse 1s ease-in-out infinite;
}

@keyframes rsshub-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.rsshub-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.rsshub-url {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

/* === Data Source Badges (特定舆情) === */
.ca-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.ca-source-weibo {
  background: rgba(255, 70, 70, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(255, 70, 70, 0.3);
}

.ca-source-ai {
  background: rgba(74, 158, 255, 0.2);
  color: #4a9eff;
  border: 1px solid rgba(74, 158, 255, 0.3);
}

/* ========================================
   Custom Analysis Dashboard (特定舆情分析 - 深色主题)
   ======================================== */
.ca-dashboard {
  margin-bottom: 20px;
}

/* --- 卡片主体 --- */
.ca-card {
  background: linear-gradient(135deg, #0a1628 0%, #0f2038 40%, #0d1a30 100%);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* --- 深色渐变头部 --- */
.ca-header {
  position: relative;
  padding: 20px 22px 16px;
  background: linear-gradient(135deg, #0d1f3c 0%, #142d54 50%, #0f2444 100%);
  border-bottom: 1px solid rgba(0,212,255,0.12);
}
.ca-header-glow {
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(0,212,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.ca-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.ca-keyword-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px rgba(0,212,255,0.3);
  flex: 1;
  line-height: 1.4;
}
.ca-header-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 10px;
}
.ca-badge-dark {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid;
}
.ca-risk-high { background: rgba(255,71,87,0.15); color: #ff4757; border-color: rgba(255,71,87,0.4); }
.ca-risk-medium { background: rgba(255,165,2,0.15); color: #ffa502; border-color: rgba(255,165,2,0.4); }
.ca-risk-low { background: rgba(46,213,115,0.15); color: #2ed573; border-color: rgba(46,213,115,0.4); }
.ca-trend-rising { background: rgba(255,71,87,0.12); color: #ff6b81; border-color: rgba(255,71,87,0.3); }
.ca-trend-stable { background: rgba(0,212,255,0.12); color: #00d4ff; border-color: rgba(0,212,255,0.3); }
.ca-trend-fading { background: rgba(46,213,115,0.12); color: #7bed9f; border-color: rgba(46,213,115,0.3); }

.ca-header-overview {
  font-size: 12.5px;
  line-height: 1.9;
  color: rgba(255,255,255,0.65);
  position: relative;
  z-index: 1;
}

/* --- 核心指标条 --- */
.ca-metrics-strip {
  display: flex;
  align-items: center;
  padding: 16px 22px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(0,212,255,0.08);
}
.ca-metric {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.ca-metric-num {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ca-metric-num.glow-cyan { color: #00d4ff; text-shadow: 0 0 12px rgba(0,212,255,0.4); }
.ca-metric-num.glow-red { color: #ff4757; text-shadow: 0 0 12px rgba(255,71,87,0.4); }
.ca-metric-num.glow-orange { color: #ffa502; text-shadow: 0 0 12px rgba(255,165,2,0.4); }
.ca-metric-num.glow-purple { color: #a29bfe; text-shadow: 0 0 12px rgba(162,155,254,0.4); }
.ca-metric-lbl {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
  letter-spacing: 1px;
}
.ca-metric-bar {
  width: 60%;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin: 6px auto 0;
  overflow: hidden;
}
.ca-metric-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #4a9eff);
  border-radius: 2px;
}
.ca-metric-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  margin-top: 4px;
  border: 1px solid;
}
.ca-metric-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

/* --- 图表区 --- */
.ca-charts-row {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(0,212,255,0.08);
}
.ca-chart-panel {
  flex: 1;
  padding: 14px 18px;
}
.ca-chart-panel + .ca-chart-panel {
  border-left: 1px solid rgba(0,212,255,0.08);
}
.ca-chart-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

/* 7日趋势柱状图 */
.ca-trend-panel { flex: 1.2; }
.ca-trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 24px,
      rgba(255,255,255,0.03) 24px,
      rgba(255,255,255,0.03) 25px
    );
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ca-trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.ca-trend-val {
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 3px;
  font-weight: 600;
}
.ca-trend-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.ca-trend-bar-inner {
  width: 100%;
  min-height: 3px;
  background: linear-gradient(180deg, #00d4ff, #0066cc);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 8px rgba(0,212,255,0.25);
  transition: height 0.6s ease;
}
.ca-trend-day {
  font-size: 9px;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
}

/* 来源分布环形图 */
.ca-src-chart-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ca-src-svg {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  transform: rotate(0deg);
}
.ca-src-legend {
  flex: 1;
}
.ca-src-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}
.ca-src-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ca-src-name {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  flex: 1;
}
.ca-src-pct {
  font-size: 11px;
  color: #fff;
  font-weight: 700;
}

/* 情感分布条 */
.ca-sent-panel {
  border-bottom: 1px solid rgba(0,212,255,0.08);
}
.ca-sent-bar {
  display: flex;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.ca-sent-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  transition: width 0.6s ease;
}
.ca-sent-seg span {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.ca-sent-pos { background: linear-gradient(90deg, #2ed573, #26de81); }
.ca-sent-neu { background: linear-gradient(90deg, #ffa502, #ffbe76); }
.ca-sent-neg { background: linear-gradient(90deg, #ff4757, #ff6b81); }
.ca-sent-legend {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  justify-content: center;
}
.ca-sent-legend-item {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  gap: 4px;
}
.ca-sent-legend-item i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* 传播关键节点 */
.ca-nodes-section {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0,212,255,0.08);
}
.ca-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.ca-node-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  position: relative;
  transition: border-color 0.3s;
}
.ca-node-card:hover {
  border-color: rgba(0,212,255,0.3);
}
.ca-node-icon {
  font-size: 22px;
  margin-bottom: 6px;
}
.ca-node-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ca-node-type {
  font-size: 9px;
  color: #00d4ff;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ca-node-inf-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0 auto 4px;
}
.ca-node-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ca-node-inf-val {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 800;
  color: #00d4ff;
  text-shadow: 0 0 8px rgba(0,212,255,0.4);
}
.ca-node-desc {
  font-size: 9px;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
  margin-top: 4px;
}

/* --- 文本区块（关键发现、舆论、建议等） --- */
.ca-text-block {
  padding: 14px 22px;
  border-bottom: 1px solid rgba(0,212,255,0.08);
}
.ca-text-block:last-child {
  border-bottom: none;
}
.ca-text-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,212,255,0.1);
}
.ca-text-body {
  font-size: 12.5px;
  line-height: 1.9;
  color: rgba(255,255,255,0.6);
}

/* 关键发现列表 */
.ca-findings-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ca-finding-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  padding: 6px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  border-left: 3px solid #00d4ff;
}
.ca-finding-dot {
  width: 6px;
  height: 6px;
  background: #00d4ff;
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(0,212,255,0.5);
}

/* 双栏布局 */
.ca-dual-row {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(0,212,255,0.08);
}
.ca-dual-block {
  flex: 1;
  border-bottom: none !important;
}
.ca-dual-block + .ca-dual-block {
  border-left: 1px solid rgba(0,212,255,0.08);
}
.ca-risk-block .ca-text-title {
  color: #ff6b81;
}

/* 建议列表 */
.ca-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ca-suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  padding: 6px 12px;
  background: rgba(46,213,115,0.04);
  border-radius: 6px;
}
.ca-sug-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(0,212,255,0.15);
  color: #00d4ff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

/* 关联事件标签 */
.ca-related-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ca-event-tag {
  padding: 4px 12px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  transition: background 0.2s;
}
.ca-event-tag:hover {
  background: rgba(0,212,255,0.15);
}

/* 深色卡片内扫描线动画背景 */
.ca-header::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,212,255,0.015) 2px,
    rgba(0,212,255,0.015) 4px
  );
  pointer-events: none;
}

/* 节点卡片进入动效 */
@keyframes ca-node-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.ca-node-card {
  animation: ca-node-fadein 0.5s ease both;
  animation-delay: var(--node-delay, 0s);
}

/* 趋势柱条动画 */
@keyframes ca-bar-grow {
  from { height: 0; }
}
.ca-trend-bar-inner {
  animation: ca-bar-grow 0.8s ease both;
}

/* ========================================
   Timeline Page (舆情发展时间轴 - 深色主题)
   ======================================== */
.tl-page {
  background: linear-gradient(180deg, #0a1628 0%, #0d1a30 30%, #0f2038 70%, #0a1628 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,212,255,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  min-height: 500px;
}

/* 页头 */
.tl-page-header {
  position: relative;
  padding: 24px 28px 18px;
  background: linear-gradient(135deg, #0d1f3c, #142d54);
  border-bottom: 1px solid rgba(0,212,255,0.12);
}
.tl-page-glow {
  position: absolute;
  top: -30px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 80px;
  background: radial-gradient(ellipse, rgba(0,212,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.tl-page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px rgba(0,212,255,0.3);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.tl-page-icon {
  font-size: 22px;
}
.tl-page-keyword {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.tl-kw-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tl-kw-name {
  font-size: 15px;
  font-weight: 700;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0,212,255,0.3);
}
.tl-kw-badge {
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid;
}

/* 时间轴主体 */
.tl-body {
  position: relative;
  padding: 24px 20px 30px;
}

/* 中轴线 */
.tl-axis {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0,212,255,0.3) 5%,
    rgba(0,212,255,0.15) 50%,
    rgba(0,212,255,0.3) 95%,
    transparent 100%
  );
  transform: translateX(-50%);
}
.tl-axis::before,
.tl-axis::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #0d1a30;
  border: 2px solid rgba(0,212,255,0.4);
  border-radius: 50%;
}
.tl-axis::before { top: 8px; }
.tl-axis::after { bottom: 8px; }

/* 日期标记 */
.tl-date-marker {
  text-align: center;
  margin: 16px 0 8px;
  position: relative;
  z-index: 2;
}
.tl-date-marker span {
  display: inline-block;
  padding: 3px 16px;
  background: linear-gradient(135deg, #142d54, #1a3a6b);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #00d4ff;
  letter-spacing: 1px;
  box-shadow: 0 0 12px rgba(0,212,255,0.1);
}

/* 时间轴条目 */
.tl-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 6px;
  position: relative;
}
.tl-left {
  flex-direction: row;
  padding-right: 52%;
}
.tl-right {
  flex-direction: row-reverse;
  padding-left: 52%;
}

/* 连接器：圆点 */
.tl-connector {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  top: 14px;
}
.tl-dot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dot-color, #00d4ff);
  box-shadow: 0 0 12px color-mix(in srgb, var(--dot-color, #00d4ff) 40%, transparent);
}
.tl-dot-icon {
  position: relative;
  z-index: 1;
  line-height: 1;
}
.tl-node-lg { width: 34px; height: 34px; font-size: 16px; }
.tl-node-md { width: 28px; height: 28px; font-size: 13px; }
.tl-node-sm { width: 22px; height: 22px; font-size: 11px; }

/* 脉冲动画 */
.tl-dot-pulse {
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border: 2px solid;
  border-radius: 50%;
  animation: tl-pulse 2s ease-out infinite;
  opacity: 0;
}
@keyframes tl-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* 事件卡片 */
.tl-card {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 12px;
  position: relative;
  transition: border-color 0.3s;
  border-left: 3px solid var(--card-accent, #00d4ff);
}
.tl-right .tl-card {
  border-left: 1px solid rgba(0,212,255,0.1);
  border-right: 3px solid var(--card-accent, #00d4ff);
}
.tl-card::before {
  content: "";
  position: absolute;
  top: 16px;
  width: 12px;
  height: 1px;
  background: rgba(0,212,255,0.2);
}
.tl-left .tl-card::before {
  right: -12px;
}
.tl-right .tl-card::before {
  left: -12px;
}

.tl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tl-type-tag {
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  border: 1px solid;
  letter-spacing: 0.5px;
}
.tl-time {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tl-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 4px;
}
.tl-card-desc {
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
}

.tl-card-source {
  font-size: 10px;
  color: rgba(0,212,255,0.5);
  margin-top: 6px;
}

.tl-card-source::before {
  content: "来源：";
}

.tl-card-source a {
  color: rgba(0,212,255,0.7);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0,212,255,0.3);
  transition: color 0.2s, border-color 0.2s;
}

.tl-card-source a:hover {
  color: #00d4ff;
  border-bottom-color: #00d4ff;
}

/* 页脚图例 */
.tl-page-footer {
  padding: 12px 28px 16px;
  border-top: 1px solid rgba(0,212,255,0.08);
}
.tl-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.tl-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: rgba(255,255,255,0.45);
}
.tl-legend-item i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* 时间轴入场动画 */
@keyframes tl-slide-left {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes tl-slide-right {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
.tl-left .tl-card {
  animation: tl-slide-left 0.5s ease both;
}
.tl-right .tl-card {
  animation: tl-slide-right 0.5s ease both;
}
.tl-item:nth-child(2) .tl-card { animation-delay: 0.05s; }
.tl-item:nth-child(3) .tl-card { animation-delay: 0.1s; }
.tl-item:nth-child(4) .tl-card { animation-delay: 0.15s; }
.tl-item:nth-child(5) .tl-card { animation-delay: 0.2s; }
.tl-item:nth-child(6) .tl-card { animation-delay: 0.25s; }
.tl-item:nth-child(7) .tl-card { animation-delay: 0.3s; }
.tl-item:nth-child(8) .tl-card { animation-delay: 0.35s; }

/* ========================================
   Domain Heat Ranking Enhanced (领域热度排行增强)
   ======================================== */
.heat-comparison-chart {
  background: #fafbfd;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.heat-comp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.heat-comp-row:last-child { margin-bottom: 0; }

.heat-comp-name {
  width: 56px;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  text-align: right;
  flex-shrink: 0;
}

.heat-comp-bar-wrap {
  flex: 1;
  height: 24px;
  background: #eef1f6;
  border-radius: 6px;
  overflow: hidden;
}

.heat-comp-bar {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  min-width: 36px;
  transition: width 0.6s ease;
}

.heat-comp-score {
  font-size: 12px;
  font-weight: 800;
  color: white;
}

.heat-ranking-item-enhanced {
  background: #fafbfd;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  padding: 16px 18px;
}

.heat-detail-grid {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 10px 0;
}

.heat-detail-stats {
  display: flex;
  gap: 10px;
}

.heat-mini-stat {
  text-align: center;
  padding: 6px 10px;
  background: white;
  border: 1px solid #e8ecf3;
  border-radius: 6px;
  min-width: 56px;
}

.hms-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.hms-value.hms-danger { color: var(--danger); }
.hms-value.hms-warning { color: #e8710a; }
.hms-value.hms-neg { color: #c5221f; }

.hms-label {
  display: block;
  font-size: 10px;
  color: #999;
  margin-top: 2px;
}

.heat-sentiment-bar-wrap {
  flex: 1;
}

.heat-sentiment-mini-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: #eee;
}

.hsb-segment {
  height: 100%;
  min-width: 2px;
}

.hsb-segment.hsb-pos { background: #1e8e3e; }
.hsb-segment.hsb-neu { background: #9aa0a6; }
.hsb-segment.hsb-neg { background: #d93025; }

.heat-sentiment-legend {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 10px;
  color: #888;
}

.hsb-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: middle;
}

.heat-top-event {
  font-size: 12px;
  color: #c5221f;
  font-weight: 600;
  margin-top: 6px;
  padding: 4px 0;
  border-top: 1px dashed #eee;
}

/* ========================================
   Topic Stats Bar (每领域统计条)
   ======================================== */
.topic-stats-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #f8faff, #f0f4fc);
  border-bottom: 1px solid #eef1f6;
}

.topic-stat-chip {
  text-align: center;
  min-width: 50px;
}

.tsc-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.tsc-label {
  display: block;
  font-size: 10px;
  color: #999;
  margin-top: 1px;
}

.topic-sentiment-bar {
  flex: 1;
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: #eee;
}

.tsb-fill {
  height: 100%;
  min-width: 1px;
}

.tsb-fill.tsb-pos { background: #1e8e3e; }
.tsb-fill.tsb-neu { background: #9aa0a6; }
.tsb-fill.tsb-neg { background: #d93025; }

.topic-sentiment-labels {
  display: flex;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  min-width: 120px;
}

/* ========================================
   Domain Heat Ranking (领域热度排行 — 原版保留)
   ======================================== */
.heat-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.heat-ranking-item {
  background: #fafbfd;
  border-radius: 10px;
  padding: 16px 20px;
  border: 1px solid #eef1f6;
}

.heat-ranking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.heat-ranking-rank {
  display: flex;
  align-items: center;
  gap: 10px;
}

.heat-rank-number {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.heat-rank-number.rank-1 { background: #d93025; }
.heat-rank-number.rank-2 { background: #e8710a; }
.heat-rank-number.rank-3 { background: #f9ab00; }

.heat-ranking-domain {
  font-size: 15px;
  font-weight: 700;
  color: #222;
}

.heat-ranking-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.heat-ranking-score {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.heat-bar {
  height: 8px;
  background: #e8eaed;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.heat-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-bright));
  transition: width 0.6s ease;
}

.heat-ranking-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #888;
  flex-wrap: wrap;
}

.heat-ranking-info .tag {
  font-size: 10px;
}

.heat-event-count {
  color: #666;
  font-weight: 500;
}

.heat-trend-arrow {
  font-weight: 700;
}

.heat-trend-arrow.rising { color: #d93025; }
.heat-trend-arrow.stable { color: #666; }
.heat-trend-arrow.fading { color: #1967d2; }

.heat-ranking-analysis {
  margin-top: 8px;
  font-size: 13px;
  color: #555;
  line-height: 1.7;
}

/* ========================================
   Deep Analysis (重点事件深度研判)
   ======================================== */
.deep-analysis-card {
  background: #fafbfd;
  border-radius: 10px;
  border: 1px solid #eef1f6;
  margin-bottom: 20px;
  overflow: hidden;
}

.deep-analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid #eef1f6;
}

.deep-analysis-title {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  flex: 1;
  line-height: 1.5;
}

.deep-analysis-badges {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

.attention-index {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #e8f0fe;
  color: #1967d2;
}

.deep-analysis-body {
  padding: 20px;
}

.deep-section {
  margin-bottom: 16px;
}

.deep-section:last-child {
  margin-bottom: 0;
}

.deep-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.deep-section-content {
  font-size: 13.5px;
  line-height: 1.8;
  color: #444;
}

.stakeholder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stakeholder-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  background: #f0edfa;
  color: #6b4fb8;
  border: 1px solid #e0d8f0;
}

.deep-suggestion-list {
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 2;
  color: var(--primary-light);
}

.deep-cases-box {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.8;
  color: #555;
  border-left: 3px solid #9aa0a6;
}

/* ========================================
   Opinion Field Comparison (舆论场对比)
   ======================================== */
.opinion-comparison {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.opinion-column {
  flex: 1;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid;
}

.opinion-column.official {
  background: linear-gradient(135deg, #f0f6ff, #e8f0fe);
  border-color: #c4d8f5;
}

.opinion-column.social {
  background: linear-gradient(135deg, #fff8f0, #fff2e6);
  border-color: #f5dfc4;
}

.opinion-column-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.opinion-column.official .opinion-column-title { color: #1967d2; }
.opinion-column.social .opinion-column-title { color: #e8710a; }

.opinion-tone {
  font-size: 13px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 12px;
}

.opinion-tone-label {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  margin-bottom: 4px;
}

.opinion-focus-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.opinion-focus-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.opinion-column.official .opinion-focus-tag {
  background: #d2e3fc;
  color: #1967d2;
}

.opinion-column.social .opinion-focus-tag {
  background: #fce8cd;
  color: #c67a00;
}

.divergence-box {
  background: linear-gradient(135deg, #f4f7fd 0%, #eaf0fa 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.divergence-box-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.divergence-box-content {
  font-size: 13.5px;
  line-height: 1.8;
  color: #444;
}

.convergence-topics {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.convergence-label {
  font-size: 13px;
  font-weight: 600;
  color: #666;
}

.convergence-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  background: #e6f4ea;
  color: #137333;
}

/* ========================================
   Keyword Analysis (关键词分析)
   ======================================== */
.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  padding: 24px 16px;
  background: #fafbfd;
  border-radius: 10px;
  border: 1px solid #eef1f6;
  margin-bottom: 20px;
  min-height: 100px;
}

.keyword-cloud-item {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  cursor: default;
  transition: transform 0.15s;
  line-height: 1.4;
}

.keyword-cloud-item:hover {
  transform: scale(1.1);
}

.keyword-cloud-item.sentiment-positive { color: #1e8e3e; }
.keyword-cloud-item.sentiment-negative { color: #d93025; }
.keyword-cloud-item.sentiment-neutral { color: #5f6368; }

.keyword-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13px;
}

.keyword-table th {
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
}

.keyword-table th:first-child { border-radius: 6px 0 0 0; }
.keyword-table th:last-child { border-radius: 0 6px 0 0; }

.keyword-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #eef1f6;
  color: #444;
}

.keyword-table tr:nth-child(even) td {
  background: #fafbfd;
}

.keyword-table .keyword-word {
  font-weight: 600;
  color: #222;
}

.keyword-table .keyword-freq {
  font-weight: 700;
  color: var(--primary);
}

.keyword-related-events {
  font-size: 11px;
  color: #888;
  max-width: 200px;
  line-height: 1.5;
}

.emerging-keywords-section {
  margin-top: 16px;
}

.emerging-keywords-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.emerging-keyword-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff5f5, #fff0f0);
  border: 1px solid #fcd5d5;
  border-radius: 8px;
  margin-bottom: 10px;
}

.emerging-keyword-word {
  font-size: 15px;
  font-weight: 700;
  color: #d93025;
  flex-shrink: 0;
  min-width: 60px;
}

.emerging-keyword-info {
  flex: 1;
  font-size: 12px;
  color: #666;
  line-height: 1.7;
}

.emerging-keyword-risk {
  font-size: 12px;
  color: #c5221f;
  font-weight: 500;
}

/* ========================================
   Sentiment by Domain (分领域情感)
   ======================================== */
.sentiment-by-domain {
  margin-top: 20px;
}

.sentiment-by-domain-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.stacked-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.stacked-bar-label {
  width: 72px;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  text-align: right;
  flex-shrink: 0;
}

.stacked-bar {
  flex: 1;
  height: 20px;
  display: flex;
  border-radius: 4px;
  overflow: hidden;
}

.stacked-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: white;
  min-width: 0;
  transition: width 0.4s ease;
}

.stacked-segment.positive { background: #1e8e3e; }
.stacked-segment.neutral { background: #9aa0a6; }
.stacked-segment.negative { background: #d93025; }

.stacked-bar-highlight {
  flex-shrink: 0;
  width: 160px;
  font-size: 11px;
  color: #888;
  padding-left: 4px;
}

/* ========================================
   Enhanced Risk Warning (增强风险预警)
   ======================================== */
.risk-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 14px;
}

.risk-meta-item {
  background: rgba(255,255,255,0.6);
  border-radius: 6px;
  padding: 10px 12px;
  text-align: center;
}

.risk-meta-label {
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
}

.risk-meta-value {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.risk-depts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.risk-dept-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 11px;
  background: rgba(26,58,107,0.08);
  color: var(--primary);
}

/* ========================================
   Cover Stats Strip (封面底部数据条)
   ======================================== */
.cover-stats-strip {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

.cover-stat-item {
  text-align: center;
  padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,0.15);
}

.cover-stat-item:last-child {
  border-right: none;
}

.cover-stat-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
}

.cover-stat-label {
  font-size: 11px;
  opacity: 0.65;
  margin-top: 4px;
  letter-spacing: 1px;
}

.cover-stat-value.stat-events { color: #7ec8e3; }
.cover-stat-value.stat-impact { color: #ffd166; }
.cover-stat-value.stat-risk { color: #ff6b6b; }
.cover-stat-value.stat-domains { color: #a0e8af; }

/* Cover 装饰增强 */
.cover-deco-ring {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}

.cover-deco-ring.ring-1 { width: 300px; height: 300px; top: -120px; right: -100px; }
.cover-deco-ring.ring-2 { width: 200px; height: 200px; top: -60px; right: -40px; border-color: rgba(255,255,255,0.08); }
.cover-deco-ring.ring-3 { width: 400px; height: 400px; bottom: -180px; left: -150px; }
.cover-deco-ring.ring-4 { width: 160px; height: 160px; bottom: 80px; right: 60px; border-color: rgba(255,255,255,0.04); }

.cover-line-deco {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15) 20%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.15) 80%, transparent);
}

/* ========================================
   Executive Gauge (舆情态势总评仪表)
   ======================================== */
.exec-overview-header {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  align-items: stretch;
}

.exec-gauge-box {
  width: 180px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0f2649, #1a3a6b);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.exec-gauge-svg {
  width: 110px;
  height: 66px;
  margin-bottom: 8px;
}

.exec-gauge-label {
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.exec-gauge-rating {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
}

.exec-gauge-rating.rating-high { color: #ff6b6b; }
.exec-gauge-rating.rating-medium { color: #ffd166; }
.exec-gauge-rating.rating-low { color: #a0e8af; }

.exec-stats-right {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.exec-stat-card {
  background: linear-gradient(135deg, #f4f7fd 0%, #eaf0fa 100%);
  border: 1px solid #dde5f2;
  border-radius: 10px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.exec-stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
}

.exec-stat-card.stat-events::before { background: var(--primary-bright); }
.exec-stat-card.stat-impact::before { background: #e8710a; }
.exec-stat-card.stat-risk::before { background: var(--danger); }
.exec-stat-card.stat-negative::before { background: #c5221f; }
.exec-stat-card.stat-rising::before { background: #f9ab00; }
.exec-stat-card.stat-sensitive::before { background: #9c27b0; }

.exec-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exec-stat-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.exec-stat-card.stat-events .exec-stat-value { color: var(--primary-bright); }
.exec-stat-card.stat-impact .exec-stat-value { color: #e8710a; }
.exec-stat-card.stat-risk .exec-stat-value { color: var(--danger); }
.exec-stat-card.stat-negative .exec-stat-value { color: #c5221f; }
.exec-stat-card.stat-rising .exec-stat-value { color: #f9ab00; }
.exec-stat-card.stat-sensitive .exec-stat-value { color: #9c27b0; }

.exec-stat-icon {
  font-size: 20px;
  opacity: 0.7;
}

.exec-stat-label {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  font-weight: 500;
}

.exec-stat-sub {
  font-size: 10px;
  color: #aaa;
  margin-top: 2px;
}

/* ========================================
   Executive Summary Dual Layout
   ======================================== */
.exec-summary-dual {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
}

.exec-summary-text {
  flex: 1;
  background: linear-gradient(135deg, #f4f7fd 0%, #eaf0fa 100%);
  border-left: 4px solid var(--primary);
  padding: 18px 20px;
  border-radius: 0 8px 8px 0;
  line-height: 2;
  font-size: 14px;
  color: #333;
}

.exec-sentiment-mini {
  width: 200px;
  flex-shrink: 0;
  background: #fafbfd;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.exec-sentiment-mini .mini-donut-label {
  font-size: 11px;
  color: #888;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.exec-sentiment-mini svg {
  margin-bottom: 8px;
}

.mini-sentiment-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.mini-legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #666;
}

.mini-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mini-legend-pct {
  margin-left: auto;
  font-weight: 700;
  color: #333;
}

/* ========================================
   Enhanced Key Insights (增强核心发现)
   ======================================== */
.key-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.key-insight-card {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.key-insight-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-bright), var(--primary));
  opacity: 0.3;
}

.key-insight-card .ki-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.key-insight-card:nth-child(1) .ki-icon { background: #fee2e2; }
.key-insight-card:nth-child(2) .ki-icon { background: #fef3c7; }
.key-insight-card:nth-child(3) .ki-icon { background: #dbeafe; }
.key-insight-card:nth-child(4) .ki-icon { background: #d1fae5; }
.key-insight-card:nth-child(5) .ki-icon { background: #ede9fe; }

.key-insight-card .ki-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: #333;
}

/* ========================================
   Dashboard (数据总览仪表板) — 升级版
   ======================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.dashboard-card {
  background: linear-gradient(135deg, #f8faff, #eef3fc);
  border: 1px solid #dde5f2;
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dashboard-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
}

.dashboard-card.card-danger::after { background: var(--danger); }
.dashboard-card.card-warning::after { background: var(--warning); }
.dashboard-card.card-success::after { background: var(--success); }
.dashboard-card.card-rising::after { background: #e8710a; }
.dashboard-card.card-info::after { background: var(--primary-bright); }

.dashboard-card-icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.dashboard-card-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.dashboard-card-value.value-danger { color: var(--danger); }
.dashboard-card-value.value-warning { color: var(--warning); }
.dashboard-card-value.value-success { color: var(--success); }
.dashboard-card-value.value-rising { color: #e8710a; }

.dashboard-card-label {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  font-weight: 500;
}

.dashboard-card-sub {
  font-size: 10px;
  color: #aaa;
  margin-top: 2px;
}

/* Dashboard dual layout */
.dashboard-dual {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-dual-left {
  flex: 1;
}

.dashboard-dual-right {
  width: 240px;
  flex-shrink: 0;
}

.dashboard-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin: 16px 0 10px;
}

.dashboard-subtitle:first-child {
  margin-top: 0;
}

/* Inline sentiment donut in dashboard */
.dashboard-sentiment-box {
  background: #fafbfd;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dashboard-sentiment-box svg {
  margin-bottom: 10px;
}

.dashboard-sentiment-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.dashboard-sentiment-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.dashboard-sentiment-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dashboard-sentiment-pct {
  margin-left: auto;
  font-weight: 700;
}

/* Heat distribution enhanced */
.heat-level-dist-enhanced {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.heat-level-enhanced {
  flex: 1;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.heat-level-enhanced.hl-high {
  background: linear-gradient(135deg, #fde8e8, #fbd5d5);
  border: 1px solid #f8b4b4;
}

.heat-level-enhanced.hl-medium {
  background: linear-gradient(135deg, #fef3e2, #fde8c8);
  border: 1px solid #f5d5a0;
}

.heat-level-enhanced.hl-low {
  background: linear-gradient(135deg, #e8f5e9, #d4edda);
  border: 1px solid #b8ddbf;
}

.heat-level-enhanced .hl-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.heat-level-enhanced.hl-high .hl-value { color: #c5221f; }
.heat-level-enhanced.hl-medium .hl-value { color: #b06000; }
.heat-level-enhanced.hl-low .hl-value { color: #137333; }

.heat-level-enhanced .hl-label {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
  font-weight: 600;
}

.heat-level-enhanced .hl-pct {
  font-size: 20px;
  font-weight: 700;
  opacity: 0.3;
  position: absolute;
  top: 8px;
  right: 10px;
}

.heat-level-enhanced.hl-high .hl-pct { color: #c5221f; }
.heat-level-enhanced.hl-medium .hl-pct { color: #b06000; }
.heat-level-enhanced.hl-low .hl-pct { color: #137333; }

/* Domain bars enhanced */
.dashboard-domain-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-domain-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-domain-name {
  width: 64px;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  text-align: right;
  flex-shrink: 0;
}

.dashboard-domain-bar-wrapper {
  flex: 1;
  height: 22px;
  background: #eef1f6;
  border-radius: 4px;
  overflow: hidden;
}

.dashboard-domain-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-bright));
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 28px;
  transition: width 0.6s ease;
}

.dashboard-domain-bar-value {
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.dashboard-domain-impact {
  font-size: 11px;
  color: #999;
  width: 60px;
  flex-shrink: 0;
}

/* TOP Event Ranking Table */
.top-events-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 4px;
}

.top-events-table th {
  background: linear-gradient(135deg, #1a3a6b, #2a5298);
  color: white;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.top-events-table th:first-child {
  border-radius: 6px 0 0 0;
  width: 32px;
  text-align: center;
}

.top-events-table th:last-child {
  border-radius: 0 6px 0 0;
  width: 60px;
  text-align: center;
}

.top-events-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f6;
  color: #333;
}

.top-events-table tr:last-child td {
  border-bottom: none;
}

.top-events-table tr:nth-child(even) {
  background: #f8faff;
}

.top-event-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.top-event-rank.rank-1 { background: linear-gradient(135deg, #d93025, #ff6b6b); }
.top-event-rank.rank-2 { background: linear-gradient(135deg, #e8710a, #f9ab00); }
.top-event-rank.rank-3 { background: linear-gradient(135deg, #f9ab00, #ffd166); }
.top-event-rank.rank-other { background: #9aa0a6; }

.top-event-impact {
  font-weight: 700;
  font-size: 13px;
}

.top-event-impact.impact-high { color: var(--danger); }
.top-event-impact.impact-medium { color: #e8710a; }
.top-event-impact.impact-low { color: var(--success); }

.top-event-sentiment-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

.top-event-sentiment-tag.tag-negative { background: #fee2e2; color: #c5221f; }
.top-event-sentiment-tag.tag-positive { background: #d1fae5; color: #137333; }
.top-event-sentiment-tag.tag-neutral { background: #f3f4f6; color: #666; }

/* ========================================
   Key Insights (核心发现)
   ======================================== */
.key-insights-box {
  background: linear-gradient(135deg, #f0f6ff, #e6eefa);
  border: 1px solid #c4d8f5;
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 20px;
}

.key-insights-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.key-insight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(42,82,152,0.1);
}

.key-insight-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.key-insight-number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.key-insight-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: #333;
}

/* ========================================
   Trend Prediction (趋势预判)
   ======================================== */
.trend-prediction-box {
  background: linear-gradient(135deg, #fff8f0, #fff2e6);
  border: 1px solid #f5dfc4;
  border-left: 4px solid #e8710a;
  border-radius: 0 10px 10px 0;
  padding: 20px 24px;
  margin-top: 20px;
}

.trend-prediction-title {
  font-size: 14px;
  font-weight: 700;
  color: #c67a00;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trend-prediction-content {
  font-size: 14px;
  line-height: 2;
  color: #444;
}

/* ========================================
   Analysis Panels (影响力与传播态势)
   ======================================== */
.analysis-panels {
  display: flex;
  gap: 16px;
}

.analysis-panel {
  flex: 1;
  background: #fafbfd;
  border-radius: 10px;
  border: 1px solid #eef1f6;
  padding: 18px;
}

.analysis-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef1f6;
}

.analysis-panel-divider {
  height: 1px;
  background: #eef1f6;
  margin: 14px 0;
}

.impact-dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.impact-dist-label {
  width: 68px;
  font-size: 11px;
  font-weight: 600;
  color: #555;
  line-height: 1.3;
  flex-shrink: 0;
}

.impact-dist-label small {
  color: #999;
  font-weight: 400;
}

.impact-dist-bar-wrapper {
  flex: 1;
  height: 22px;
  background: #eef1f6;
  border-radius: 4px;
  overflow: hidden;
}

.impact-dist-bar {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  min-width: 0;
  transition: width 0.5s ease;
}

.trend-dist-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.trend-dist-icon {
  width: 18px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  flex-shrink: 0;
}

.trend-dist-label {
  width: 40px;
  font-size: 11px;
  font-weight: 600;
  color: #555;
  flex-shrink: 0;
}

.trend-dist-bar-wrapper {
  flex: 1;
  height: 14px;
  background: #eef1f6;
  border-radius: 3px;
  overflow: hidden;
}

.trend-dist-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.trend-dist-count {
  width: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #444;
  text-align: right;
  flex-shrink: 0;
}

/* ========================================
   Risk Matrix (风险评估矩阵)
   ======================================== */
.risk-matrix {
  margin-bottom: 24px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eef1f6;
}

.risk-matrix-header {
  display: grid;
  grid-template-columns: 80px repeat(3, 1fr);
  background: var(--primary);
}

.risk-matrix-corner {
  padding: 10px 8px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.risk-matrix-col-header {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  color: white;
  text-align: center;
}

.risk-matrix-row {
  display: grid;
  grid-template-columns: 80px repeat(3, 1fr);
}

.risk-matrix-row-header {
  padding: 14px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #444;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #e0e0e0;
}

.risk-matrix-cell {
  padding: 10px 8px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.3);
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.risk-matrix-cell-count {
  font-size: 20px;
  font-weight: 800;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.risk-matrix-cell-text {
  font-size: 10px;
  color: rgba(255,255,255,0.9);
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   Heat Distribution (热度等级分布)
   ======================================== */
.heat-level-dist {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.heat-level-card {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  border-radius: 8px;
  border: 1px solid;
}

.heat-level-card.heat-high {
  background: linear-gradient(135deg, #fff5f5, #fff0f0);
  border-color: #fcd5d5;
}

.heat-level-card.heat-medium {
  background: linear-gradient(135deg, #fffcf0, #fff8e6);
  border-color: #f5e6b8;
}

.heat-level-card.heat-low {
  background: linear-gradient(135deg, #f0faf2, #e8f6eb);
  border-color: #c8e6cd;
}

.heat-level-value {
  font-size: 24px;
  font-weight: 800;
}

.heat-level-card.heat-high .heat-level-value { color: var(--danger); }
.heat-level-card.heat-medium .heat-level-value { color: #c67a00; }
.heat-level-card.heat-low .heat-level-value { color: var(--success); }

.heat-level-label {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  font-weight: 500;
}

/* ========================================
   Propagation Analysis (传播力评估)
   ======================================== */
.propagation-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.prop-metric-card {
  text-align: center;
  padding: 16px 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0f6ff, #e6eefa);
  border: 1px solid #c4d8f5;
  position: relative;
}

.prop-metric-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.prop-metric-label {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}

.prop-metric-bar {
  height: 4px;
  background: #dde5f2;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.prop-metric-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--primary-bright);
  transition: width 0.6s ease;
}

/* Cascade / Funnel */
.propagation-cascade {
  margin-bottom: 20px;
}

.cascade-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.cascade-level {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.cascade-level-label {
  width: 180px;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  flex-shrink: 0;
}

.cascade-level-bar-wrapper {
  flex: 1;
  height: 28px;
  background: #eef1f6;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.cascade-level-bar {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  transition: width 0.6s ease;
}

.cascade-level-bar span {
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.cascade-level:nth-child(1) .cascade-level-bar { background: linear-gradient(90deg, #1a3a6b, #2a5298); }
.cascade-level:nth-child(2) .cascade-level-bar { background: linear-gradient(90deg, #2a5298, #3b7ddd); }
.cascade-level:nth-child(3) .cascade-level-bar { background: linear-gradient(90deg, #e8710a, #f59e3f); }
.cascade-level:nth-child(4) .cascade-level-bar { background: linear-gradient(90deg, #f9ab00, #fcc934); }

.cascade-level-count {
  width: 50px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: #444;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Trigger Points */
.trigger-timeline {
  position: relative;
  padding-left: 24px;
  margin-top: 8px;
}

.trigger-timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--danger), var(--warning), var(--success));
  border-radius: 1px;
}

.trigger-point {
  position: relative;
  padding: 10px 16px;
  margin-bottom: 10px;
  background: #fafbfd;
  border-radius: 8px;
  border: 1px solid #eef1f6;
}

.trigger-point::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--danger);
}

.trigger-point:nth-child(n+3)::before { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.trigger-point:nth-child(n+5)::before { background: var(--success); box-shadow: 0 0 0 2px var(--success); }

.trigger-point-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.trigger-point-event {
  font-size: 13px;
  font-weight: 700;
  color: #222;
}

.trigger-point-time {
  font-size: 11px;
  color: #999;
}

.trigger-point-type {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  background: #fce8e6;
  color: #c5221f;
  margin-bottom: 4px;
}

.trigger-point-effect {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
}

/* ========================================
   Geographic Analysis (地域热度分析)
   ======================================== */
.geo-spread-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.geo-spread-badge.nationwide { background: #fce8e6; color: #c5221f; }
.geo-spread-badge.regional { background: #fef7e0; color: #b06000; }
.geo-spread-badge.local { background: #e6f4ea; color: #137333; }

.geo-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.geo-ranking-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.geo-rank {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.geo-rank.rank-1 { background: #d93025; }
.geo-rank.rank-2 { background: #e8710a; }
.geo-rank.rank-3 { background: #f9ab00; }

.geo-region-name {
  width: 50px;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  flex-shrink: 0;
}

.geo-bar-wrapper {
  flex: 1;
  height: 18px;
  background: #eef1f6;
  border-radius: 3px;
  overflow: hidden;
}

.geo-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-bright));
  transition: width 0.5s ease;
}

.geo-percentage {
  width: 36px;
  font-size: 11px;
  font-weight: 700;
  color: #444;
  text-align: right;
  flex-shrink: 0;
}

.geo-topics {
  font-size: 11px;
  color: #888;
  width: 120px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-analysis-box {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #444;
  border-left: 3px solid var(--primary);
}

/* ========================================
   Audience Profile (受众画像)
   ======================================== */
.audience-section {
  margin-bottom: 20px;
}

.audience-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.media-breakdown-bar {
  display: flex;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.media-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: white;
  min-width: 0;
  transition: width 0.4s ease;
}

.media-segment:nth-child(1) { background: #1a3a6b; }
.media-segment:nth-child(2) { background: #2a5298; }
.media-segment:nth-child(3) { background: #e8710a; }
.media-segment:nth-child(4) { background: #f9ab00; }

.media-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.media-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #555;
}

.media-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.kol-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.kol-card {
  flex: 1;
  min-width: 140px;
  padding: 12px;
  background: #fafbfd;
  border-radius: 8px;
  border: 1px solid #eef1f6;
}

.kol-card-type {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.kol-card-count {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.kol-card-action {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.kol-card-influence {
  font-size: 11px;
  color: #555;
  margin-top: 4px;
  line-height: 1.5;
}

/* Bot Risk */
.bot-risk-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid;
}

.bot-risk-container.risk-low {
  background: linear-gradient(135deg, #f0faf2, #e8f6eb);
  border-color: #c8e6cd;
}

.bot-risk-container.risk-medium {
  background: linear-gradient(135deg, #fffcf0, #fff8e6);
  border-color: #f5e6b8;
}

.bot-risk-container.risk-high {
  background: linear-gradient(135deg, #fff5f5, #fff0f0);
  border-color: #fcd5d5;
}

.bot-risk-gauge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: white;
}

.bot-risk-gauge.risk-low { background: var(--success); }
.bot-risk-gauge.risk-medium { background: var(--warning); }
.bot-risk-gauge.risk-high { background: var(--danger); }

.bot-risk-info {
  flex: 1;
}

.bot-risk-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.bot-risk-label.risk-low { color: var(--success); }
.bot-risk-label.risk-medium { color: #b06000; }
.bot-risk-label.risk-high { color: var(--danger); }

.bot-risk-text {
  font-size: 13px;
  line-height: 1.7;
  color: #555;
}

/* ========================================
   Emotion Analysis (情感细分)
   ======================================== */
.emotion-bars {
  margin-bottom: 16px;
}

.emotion-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.emotion-bar-label {
  width: 64px;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  text-align: right;
  flex-shrink: 0;
}

.emotion-bar-wrapper {
  flex: 1;
  height: 24px;
  background: #eef1f6;
  border-radius: 4px;
  overflow: hidden;
}

.emotion-bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  transition: width 0.5s ease;
}

.emotion-bar-pct {
  width: 36px;
  font-size: 12px;
  font-weight: 700;
  color: #444;
  text-align: right;
  flex-shrink: 0;
}

.emotion-keywords-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.emotion-keywords-col {
  flex: 1;
  padding: 14px;
  border-radius: 8px;
}

.emotion-keywords-col.positive {
  background: linear-gradient(135deg, #f0faf2, #e8f6eb);
  border: 1px solid #c8e6cd;
}

.emotion-keywords-col.negative {
  background: linear-gradient(135deg, #fff5f5, #fff0f0);
  border: 1px solid #fcd5d5;
}

.emotion-keywords-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.emotion-keywords-col.positive .emotion-keywords-title { color: var(--success); }
.emotion-keywords-col.negative .emotion-keywords-title { color: var(--danger); }

.emotion-keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.emotion-keyword-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.emotion-keywords-col.positive .emotion-keyword-tag {
  background: #c8e6cd;
  color: #137333;
}

.emotion-keywords-col.negative .emotion-keyword-tag {
  background: #fcd5d5;
  color: #c5221f;
}

.emotion-trend-box {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #444;
  border-left: 3px solid #7c5cbf;
}

/* ========================================
   Animations
   ======================================== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.generating-pulse { animation: pulse 1.5s ease-in-out infinite; }

/* ========================================
   Print Styles
   ======================================== */
@page {
  size: A4;
  margin: 12mm 10mm;
}

@media print {
  body { background: white; max-width: none; margin: 0; }

  .header, .print-bar, #homeView, #generatingView,
  .settings-panel { display: none !important; }

  #detailView { display: block !important; padding: 0; background: white; }

  /* 内容页不强制分页，让内容自然流动填满每页 */
  .a4-paper {
    box-shadow: none;
    max-width: none;
    width: 100%;
    min-height: auto;
    margin: 0;
    border-radius: 0;
  }

  /* 隐藏重复的页脚（打印不需要每页都有） */
  .report-footer { display: none; }
  /* 只保留最后一页的页脚 */
  .a4-paper:last-child .report-footer { display: block; }

  /* 封面独占一页 */
  .a4-cover-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    break-after: page;
  }
  .a4-cover-page .report-cover { flex: 1; }

  .report-cover, .risk-item, .tag, .section-number,
  .report-summary-box, .sentiment-chart-box, .sentiment-detail-box,
  .legend-dot, .event-item, .event-item-opinion, .topic-group-header,
  .event-item-impact, .heat-rank-number, .heat-bar-fill,
  .opinion-column, .deep-analysis-header, .stacked-segment,
  .keyword-table th, .emerging-keyword-card, .divergence-box,
  .stakeholder-tag, .risk-meta-item, .attention-index,
  .dashboard-card, .dashboard-card::after, .dashboard-domain-bar,
  .impact-dist-bar, .trend-dist-bar, .risk-matrix-header,
  .risk-matrix-cell, .risk-matrix-row-header, .key-insights-box,
  .key-insight-number, .trend-prediction-box,
  .heat-level-card, .heat-level-card.heat-high, .heat-level-card.heat-medium,
  .heat-level-card.heat-low, .prop-metric-card, .prop-metric-bar-fill,
  .cascade-level-bar, .trigger-point, .trigger-point::before,
  .geo-rank, .geo-bar, .media-segment, .media-legend-dot,
  .kol-card, .bot-risk-gauge, .bot-risk-container,
  .emotion-bar-fill, .emotion-keywords-col,
  .cover-stats-strip, .cover-stat-item, .cover-line-deco,
  .exec-gauge-box, .exec-stat-card, .exec-stat-card::before,
  .key-insight-card, .key-insight-card::after, .key-insight-card .ki-icon,
  .heat-level-enhanced, .top-events-table th, .top-event-rank,
  .top-event-sentiment-tag, .dashboard-sentiment-box,
  .dashboard-sentiment-dot, .exec-sentiment-mini,
  .heat-comp-bar, .heat-ranking-item-enhanced, .heat-mini-stat,
  .hsb-segment, .heat-top-event, .ca-card,
  .ca-header, .ca-metrics-strip, .ca-trend-bar-inner,
  .ca-sent-seg, .ca-node-card, .ca-badge-dark, .ca-finding-item,
  .ca-suggestion-item, .ca-event-tag,
  .tl-page, .tl-page-header, .tl-card, .tl-dot, .tl-date-marker span,
  .tl-type-tag, .tl-axis, .tl-legend-item i, .tl-dot-pulse,
  .topic-stats-bar, .tsb-fill, .topic-stat-chip {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-body { padding: 30px 36px 40px; }

  /* 关键分页控制：防止元素内部被撕裂 */
  .section-heading       { break-after: avoid; }
  .section-heading-cont  { break-after: avoid; }
  .topic-group-header    { break-after: avoid; }
  .event-item            { break-inside: avoid; }
  .risk-item             { break-inside: avoid; }
  .sentiment-row         { break-inside: avoid; }
  .report-summary-box    { break-inside: avoid; }
  .topic-group           { break-inside: auto; }
  .deep-analysis-card    { break-inside: avoid; }
  .heat-ranking-item     { break-inside: avoid; }
  .heat-ranking-item-enhanced { break-inside: avoid; }
  .heat-comparison-chart { break-inside: avoid; }
  .ca-card               { break-inside: avoid; }
  .tl-page               { break-inside: avoid; }
  .tl-item               { break-inside: avoid; }
  .topic-stats-bar       { break-inside: avoid; }
  .opinion-comparison    { break-inside: avoid; }
  .divergence-box        { break-inside: avoid; }
  .emerging-keyword-card { break-inside: avoid; }
  .keyword-cloud         { break-inside: avoid; }
  .stacked-bar-row       { break-inside: avoid; }
  .dashboard-grid        { break-inside: avoid; }
  .analysis-panels       { break-inside: avoid; }
  .risk-matrix           { break-inside: avoid; }
  .key-insights-box      { break-inside: avoid; }
  .trend-prediction-box  { break-inside: avoid; }
  .heat-level-dist       { break-inside: avoid; }
  .exec-overview-header  { break-inside: avoid; }
  .exec-summary-dual     { break-inside: avoid; }
  .key-insights-grid     { break-inside: avoid; }
  .heat-level-dist-enhanced { break-inside: avoid; }
  .top-events-table      { break-inside: avoid; }
  .dashboard-dual        { break-inside: avoid; }
  .cover-stats-strip     { break-inside: avoid; }
  .propagation-metrics   { break-inside: avoid; }
  .propagation-cascade   { break-inside: avoid; }
  .trigger-point         { break-inside: avoid; }
  .bot-risk-container    { break-inside: avoid; }
  .emotion-keywords-row  { break-inside: avoid; }
  .geo-analysis-box      { break-inside: avoid; }
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 600px) {
  .a4-paper { min-height: auto; width: 100%; margin-bottom: 16px; }
  .report-cover { padding: 36px 20px 32px; }
  .cover-title { font-size: 24px; letter-spacing: 2px; }
  .cover-subtitle { font-size: 16px; }
  .report-body { padding: 24px 18px 36px; }
  .section-heading { margin: 28px 0 14px; }
  .section-label { font-size: 15px; }
  .report-summary-box { padding: 16px 18px; font-size: 14px; }
  .sentiment-row { flex-direction: column; }
  .sentiment-chart-box { flex: auto; }
  .event-item { padding: 14px 14px; }
  .topic-group-header { padding: 14px 16px; gap: 10px; }
  .topic-group-name { font-size: 15px; }
  .topic-group-icon { font-size: 24px; }
  .risk-item { padding: 14px 16px; }
  .report-footer { padding: 20px 16px; }
  .opinion-comparison { flex-direction: column; }
  .opinion-column { flex: auto; }
  .heat-ranking-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .heat-detail-grid { flex-direction: column; }
  .heat-detail-stats { flex-wrap: wrap; }
  .topic-stats-bar { flex-wrap: wrap; }
  .ca-charts-row { flex-direction: column; }
  .ca-chart-panel + .ca-chart-panel { border-left: none; border-top: 1px solid rgba(0,212,255,0.08); }
  .ca-dual-row { flex-direction: column; }
  .ca-dual-block + .ca-dual-block { border-left: none; border-top: 1px solid rgba(0,212,255,0.08); }
  .ca-metrics-strip { flex-wrap: wrap; gap: 8px; }
  .ca-metric-divider { display: none; }
  .ca-metric { min-width: 40%; }
  .ca-nodes-grid { grid-template-columns: repeat(2, 1fr); }
  .ca-keyword-title { font-size: 15px; }
  /* 时间轴移动端：单列布局 */
  .tl-axis { left: 20px; }
  .tl-left, .tl-right { flex-direction: row; padding-right: 0; padding-left: 44px; }
  .tl-connector { left: 20px; transform: translateX(-50%); }
  .tl-right .tl-card { border-right: 1px solid rgba(0,212,255,0.1); border-left: 3px solid var(--card-accent, #00d4ff); }
  .tl-date-marker { text-align: left; padding-left: 44px; }
  .tl-card::before { display: none; }
  .risk-meta-grid { grid-template-columns: 1fr; }
  .stacked-bar-highlight { width: auto; }
  .keyword-table { font-size: 12px; }
  .keyword-table th, .keyword-table td { padding: 8px 10px; }
  .cover-stats-strip { flex-wrap: wrap; gap: 12px; }
  .cover-stat-item { padding: 0 16px; }
  .cover-stat-value { font-size: 24px; }
  .exec-overview-header { flex-direction: column; }
  .exec-gauge-box { width: 100%; flex-direction: row; gap: 16px; padding: 16px; }
  .exec-stats-right { grid-template-columns: repeat(2, 1fr); }
  .exec-summary-dual { flex-direction: column; }
  .exec-sentiment-mini { width: 100%; flex-direction: row; gap: 16px; }
  .key-insights-grid { grid-template-columns: 1fr; }
  .dashboard-dual { flex-direction: column; }
  .dashboard-dual-right { width: 100%; }
  .heat-level-dist-enhanced { flex-wrap: wrap; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-card-value { font-size: 22px; }
  .analysis-panels { flex-direction: column; }
  .analysis-panel { flex: auto; }
  .risk-matrix-corner { font-size: 9px; }
  .risk-matrix-col-header { font-size: 11px; }
  .risk-matrix-cell-count { font-size: 16px; }
  .heat-level-dist { flex-direction: column; }
  .propagation-metrics { grid-template-columns: repeat(2, 1fr); }
  .prop-metric-value { font-size: 22px; }
  .cascade-level-label { width: 140px; font-size: 11px; }
  .geo-topics { display: none; }
  .emotion-keywords-row { flex-direction: column; }
  .kol-cards { flex-direction: column; }
  .bot-risk-container { flex-direction: column; text-align: center; }
  .keyword-related-events { max-width: 120px; }
}

/* ============================================================
   领导简报 & 导出Excel — 新增按钮样式
   ============================================================ */
.brief-btn {
  background: #1a6b3a;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.brief-btn:hover { background: #145c30; }

.excel-btn {
  background: #217346;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.excel-btn:hover { background: #1a5c38; }

/* ============================================================
   领导简报弹窗
   ============================================================ */
.brief-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.brief-modal.hidden { display: none; }

.brief-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.brief-modal-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 780px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}

.brief-modal-actions {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid #eee;
  background: #f8f9fb;
  border-radius: 12px 12px 0 0;
}

.brief-close-btn {
  background: #e0e0e0;
  color: #333;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.2s;
}
.brief-close-btn:hover { background: #ccc; }

/* ============================================================
   简报内容样式
   ============================================================ */
.brief-paper {
  padding: 32px 36px;
}
.brief-header {
  text-align: center;
  border-bottom: 3px solid #0f2649;
  padding-bottom: 16px;
  margin-bottom: 22px;
}
.brief-org {
  font-size: 12px;
  color: #888;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.brief-title {
  font-size: 26px;
  font-weight: 700;
  color: #0f2649;
  margin-bottom: 6px;
}
.brief-range {
  font-size: 14px;
  color: #444;
}
.brief-generated {
  font-size: 11px;
  color: #aaa;
  margin-top: 4px;
}
.brief-stats {
  display: flex;
  justify-content: space-around;
  background: #f5f7fa;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 22px;
}
.brief-stat {
  text-align: center;
}
.brief-stat-val {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: #0f2649;
}
.brief-stat-lbl {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 3px;
}
.brief-section {
  margin-bottom: 18px;
}
.brief-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f2649;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e8ecf0;
}
.brief-summary {
  font-size: 13px;
  line-height: 1.9;
  color: #333;
}
.brief-list {
  margin: 0;
  padding-left: 18px;
}
.brief-list li {
  font-size: 13px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 4px;
}
.brief-risk-list li { color: #c0392b; }
.brief-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.brief-table th {
  background: #0f2649;
  color: #fff;
  padding: 7px 10px;
  text-align: left;
  font-weight: 600;
}
.brief-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #eef0f2;
  vertical-align: top;
}
.brief-table tr:nth-child(even) td { background: #fafbfc; }
.brief-footer {
  text-align: center;
  font-size: 11px;
  color: #bbb;
  border-top: 1px solid #eee;
  padding-top: 14px;
  margin-top: 24px;
}

@media print {
  .brief-modal-actions { display: none !important; }
  .brief-modal-backdrop { display: none !important; }
  .brief-modal-box { box-shadow: none; border-radius: 0; max-width: 100%; }
}
