/* P3/P4 增值与深化分析模块通用样式（补充 style.css，不覆盖其基础类） */
:root {
  --primary: #1B6FBA;
  --accent: #0E4A85;
}
.proj-wrap { margin-left: 8px; }
.proj-sel {
  background: rgba(255,255,255,.12); color: #e8f1fb; border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px; padding: 4px 8px; font-size: 12px; max-width: 160px;
}
.lang-btn {
  margin-left: 8px; background: rgba(255,255,255,.12); color: #e8f1fb;
  border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 4px 10px;
  cursor: pointer; font-size: 12px;
}
.lang-btn:hover { background: rgba(255,255,255,.22); }

.module-wrap { padding: 4px 2px; }
.page-tools {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 4px 0 14px;
}
.tabs { display: inline-flex; gap: 4px; background: #f1f4f8; border-radius: 10px; padding: 3px; }
.tabs button {
  border: none; background: transparent; padding: 6px 14px; border-radius: 8px;
  cursor: pointer; color: #5b6b7b; font-size: 13px;
}
.tabs button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 600; }
.rt-badge { margin-left: auto; color: #8aa0b6; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.rt-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #2dd4bf; box-shadow: 0 0 0 3px rgba(45,212,191,.2); }

.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.btn {
  background: var(--primary); color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; cursor: pointer; font-size: 13px;
}
.btn:hover { background: var(--accent); }
.btn.ghost { background: #eef2f7; color: #41566b; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.danger { background: #ef4444; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 6px 0 18px; }
.kpi {
  background: #fff; border: 1px solid #eef1f5; border-left: 4px solid var(--primary);
  border-radius: 12px; padding: 14px 16px;
}
.kpi .k-label { color: #7c8da0; font-size: 12px; }
.kpi .k-val { font-size: 24px; font-weight: 700; margin-top: 6px; color: #1f2d3d; }
.kpi .k-sub { color: #9aa9b8; font-size: 12px; margin-top: 2px; }

.panel-card {
  background: #fff; border: 1px solid #eef1f5; border-radius: 12px; padding: 16px; margin-bottom: 16px;
}
.panel-card > h3 { margin: 0 0 12px; font-size: 15px; color: #243; }

.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 70px; align-items: center; gap: 10px; font-size: 13px; }
.bar-row .bl { color: #5b6b7b; }
.bar-track { background: #eef2f7; border-radius: 6px; height: 16px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; }
.bar-row .bv { text-align: right; color: #41566b; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 10px; overflow: hidden; }
table.tbl th, table.tbl td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #f0f3f7; }
table.tbl th { background: #f7f9fc; color: #5b6b7b; font-weight: 600; }
table.tbl tr:hover td { background: #fafcff; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.badge.ok { background: #e6f7f1; color: #0f9d76; }
.badge.warn { background: #fff3e0; color: #d9822b; }
.badge.danger { background: #fde8e8; color: #d64545; }
.badge.info { background: #e7f0ff; color: #1B6FBA; }
.badge.mute { background: #eef2f7; color: #7c8da0; }

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .split-2 { grid-template-columns: 1fr; } }

.chat { display: flex; flex-direction: column; gap: 12px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.chat .bubble { max-width: 82%; padding: 10px 14px; border-radius: 12px; line-height: 1.6; font-size: 13px; white-space: pre-wrap; }
.chat .me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 2px; }
.chat .ai { align-self: flex-start; background: #f1f4f8; color: #243; border-bottom-left-radius: 2px; }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }
.chat-input input { flex: 1; padding: 10px 12px; border: 1px solid #dde3ea; border-radius: 10px; font-size: 13px; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.dash-card { background: #fff; border: 1px solid #eef1f5; border-radius: 12px; padding: 14px; position: relative; }
.dash-card .dc-title { font-size: 13px; color: #5b6b7b; margin-bottom: 8px; }
.dash-card .dc-remove { position: absolute; top: 8px; right: 8px; cursor: pointer; color: #c2ccd6; font-size: 14px; }
.dash-card .dc-remove:hover { color: #d64545; }
.dash-card.size-lg { grid-column: span 2; }
@media (max-width: 700px) { .dash-card.size-lg { grid-column: span 1; } }

.hd-modal-bg {
  position: fixed; inset: 0; background: rgba(15,30,50,.45); display: flex;
  align-items: center; justify-content: center; z-index: 999;
}
.hd-modal { background: #fff; border-radius: 14px; padding: 20px 22px; width: 460px; max-width: 92vw; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.hd-modal h3 { margin: 0 0 14px; color: #1f2d3d; }
.hd-f { display: block; margin-bottom: 12px; font-size: 13px; color: #5b6b7b; }
.hd-f input, .hd-f select { width: 100%; margin-top: 5px; padding: 8px 10px; border: 1px solid #dde3ea; border-radius: 8px; font-size: 13px; box-sizing: border-box; }
.hd-modal .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.note { color: #9aa9b8; font-size: 12px; }
.empty { padding: 40px; text-align: center; color: #9aa9b8; }
