/* 药师帮品类周报 - 共用样式 */
:root {
  --primary: #1a1a2e;
  --accent: #4a6cf7;
  --accent-light: #f0f4ff;
  --danger: #ff4757;
  --warning: #ff9f43;
  --success: #00b894;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #888;
  --border: #e8ecf1;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

/* 侧边栏 */
.sidebar {
  width: 260px;
  background: var(--primary);
  color: #fff;
  padding: 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 12px;
}
.sidebar-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.sidebar-header .subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.nav-section {
  padding: 8px 20px 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.nav-item {
  display: block;
  padding: 10px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.nav-item.active {
  background: rgba(74,108,247,0.2);
  color: #fff;
  border-left-color: var(--accent);
  font-weight: 600;
}
.nav-item .date {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
.nav-link {
  display: block;
  padding: 10px 20px;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 8px;
}
.nav-link:hover { background: rgba(255,255,255,0.05); }

/* 主内容区 */
.main {
  margin-left: 260px;
  flex: 1;
  padding: 24px 32px 48px;
  max-width: 960px;
}

/* 报告容器 */
.report { background: var(--card); border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); overflow: hidden; }

/* Header */
.header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 36px 40px;
  position: relative;
  overflow: hidden;
}
.header::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.header h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.header .subtitle { font-size: 14px; color: rgba(255,255,255,0.7); }
.header .meta { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: rgba(255,255,255,0.5); }

/* 内容区 */
.content { padding: 28px 40px 36px; }

/* 板块 */
.section { margin-bottom: 32px; }
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.section-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.section-title { font-size: 17px; font-weight: 700; }
.badge {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  font-weight: 600; color: #fff;
}
.badge.hot { background: var(--danger); }
.badge.warn { background: var(--warning); }
.badge.info { background: #2196f3; }
.badge.green { background: var(--success); }

/* 数据卡片 */
.data-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.data-card {
  flex: 1; min-width: 120px;
  background: #f7f8fa; border-radius: 10px;
  padding: 12px 14px; border-left: 3px solid var(--border);
}
.data-card.highlight { border-left-color: #2196f3; background: #f0f7ff; }
.data-card.warning { border-left-color: var(--warning); background: #fff8f0; }
.data-card.danger { border-left-color: var(--danger); background: #fff0f0; }
.data-card .label { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.data-card .value { font-size: 14px; font-weight: 600; }

/* 表格 */
.info-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px; }
.info-table th {
  background: #f0f2f5; padding: 9px 12px; text-align: left;
  font-weight: 600; color: #555; border-bottom: 2px solid var(--border);
}
.info-table td { padding: 9px 12px; border-bottom: 1px solid #f0f2f5; vertical-align: top; }

/* 分析框 */
.analysis-box {
  background: linear-gradient(135deg, #f8f9ff, #f0f4ff);
  border: 1px solid #d0d8f0; border-radius: 10px;
  padding: 18px 20px; margin-top: 10px; position: relative;
}
.analysis-box::before {
  content: '🔍 分析'; position: absolute; top: -10px; left: 16px;
  background: var(--accent); color: #fff; font-size: 11px;
  font-weight: 600; padding: 2px 10px; border-radius: 8px;
}
.analysis-box p { font-size: 13px; line-height: 1.8; color: #333; margin-bottom: 8px; }
.analysis-box p:last-child { margin-bottom: 0; }

/* 预测框 */
.prediction-box {
  background: linear-gradient(135deg, #fff8f0, #fff3e6);
  border: 1px solid #ffe0b2; border-radius: 10px;
  padding: 16px 20px; margin-top: 10px; position: relative;
}
.prediction-box::before {
  content: '📈 预测'; position: absolute; top: -10px; left: 16px;
  background: #ff6b35; color: #fff; font-size: 11px;
  font-weight: 600; padding: 2px 10px; border-radius: 8px;
}
.prediction-box p { font-size: 13px; line-height: 1.8; color: #333; margin-bottom: 6px; }
.prediction-box p:last-child { margin-bottom: 0; }

/* 药品影响卡片 */
.drug-impact { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.drug-card {
  flex: 1; min-width: 180px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
}
.drug-card .drug-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.drug-card .drug-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.drug-card .drug-forecast { font-size: 12px; padding: 5px 8px; border-radius: 6px; line-height: 1.5; }
.drug-card .drug-forecast.drop { background: #fff0f0; color: #c0392b; }
.drug-card .drug-forecast.flat { background: #fff8e6; color: #e67e22; }

/* 关键事件 */
.key-events {
  background: var(--primary); color: #fff;
  border-radius: 10px; padding: 20px 24px;
}
.key-events h3 { font-size: 15px; margin-bottom: 12px; }
.event-item {
  display: flex; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  align-items: flex-start;
}
.event-item:last-child { border-bottom: none; }
.event-num {
  width: 22px; height: 22px; background: var(--accent);
  border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.event-text { font-size: 13px; line-height: 1.6; }
.event-text strong { color: #ffd43b; }

/* 页脚 */
.footer {
  text-align: center; padding: 16px;
  font-size: 11px; color: #aaa;
  border-top: 1px solid var(--border);
}

/* 数据源标注 */
.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #999;
  background: #f5f5f5;
  padding: 3px 10px;
  border-radius: 12px;
}
.source-tag a {
  color: #666;
  text-decoration: none;
  border-bottom: 1px dotted #ccc;
}
.source-tag a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.section-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #eee;
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 16px; }
  .data-row { flex-direction: column; }
  .drug-impact { flex-direction: column; }
}
