* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f4f6fb; color: #2b2f3a; height: 100vh; overflow: hidden;
}
.layout { display: flex; height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 200px; background: #1f2a44; color: #fff; display: flex; flex-direction: column;
  flex-shrink: 0;
}
.brand { padding: 16px 18px; display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid #2c3a5c; }
.logo { font-size: 20px; font-weight: 700; letter-spacing: 1px; color: #ffd666; }
.sub { font-size: 12px; opacity: .7; }
.nav { padding: 10px 8px; }
.nav-item {
  display: block; padding: 10px 12px; border-radius: 8px; cursor: pointer; color: #c6cfe0;
  font-size: 14px; margin-bottom: 2px; transition: background .15s;
}
.nav-item i { font-style: normal; margin-right: 8px; opacity: .8; }
.nav-item:hover { background: #2c3a5c; color: #fff; }
.nav-item.active { background: #3b5bdb; color: #fff; }

/* ---------- 主区 ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 20px; padding: 14px 20px; flex-wrap: wrap; }
.searchbox { position: relative; flex: 1; min-width: 240px; max-width: 520px; }
#searchInput {
  width: 100%; padding: 9px 14px; border-radius: 20px; border: 1px solid #e2e6ee; font-size: 14px; outline: none; background: #fff;
}
#searchInput:focus { border-color: #3b5bdb; }
.suggest {
  position: absolute; top: 42px; left: 0; right: 0; z-index: 30; background: #fff; color: #2b2f3a;
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.18); max-height: 320px; overflow: auto;
}
.suggest .item { padding: 9px 14px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.suggest .item:hover, .suggest .item.active { background: #eef2ff; }
.suggest .item small { color: #8a8f9c; margin-left: 8px; }
.hidden { display: none !important; }

.stats { display: flex; gap: 12px; }
.card { background: #fff; border-radius: 10px; padding: 10px 18px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.06); min-width: 90px; }
.card .num { font-size: 22px; font-weight: 700; color: #1f2a44; }
.card .label { font-size: 11px; color: #8a8f9c; margin-top: 2px; }

/* ---------- 视图 ---------- */
.view { display: none; flex: 1; padding: 0 20px 20px; min-height: 0; }
.view.active { display: flex; }
#view-knowledgeSearch.active { flex-direction: row; gap: 16px; }
.graph-wrap { flex: 1; position: relative; background: #fff; border-radius: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.06); min-height: 0; }
.graph { width: 100%; height: 100%; }
.graph-tip { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: #a0a5b0; }
.detail { width: 330px; background: #fff; border-radius: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.06); padding: 18px; overflow: auto; }
.detail-empty { color: #a0a5b0; text-align: center; margin-top: 40px; }
.detail h2 { font-size: 20px; color: #1f2a44; margin-bottom: 4px; }
.detail .tag { display: inline-block; background: #eef2ff; color: #3b5bdb; font-size: 12px; padding: 2px 10px; border-radius: 10px; margin-bottom: 12px; }
.detail .sec { font-size: 13px; font-weight: 600; color: #1f2a44; margin: 14px 0 6px; }
.detail .attrs { font-size: 13px; }
.detail .attrs .row { display: flex; gap: 8px; padding: 3px 0; }
.detail .attrs .k { color: #8a8f9c; min-width: 72px; }
.detail .desc { font-size: 13px; line-height: 1.7; color: #4a4f5c; }
.detail .recalls { }
.detail .recall-item { background: #f7f9ff; border-left: 3px solid #3b5bdb; border-radius: 0 6px 6px 0; padding: 8px 12px; margin-bottom: 8px; }
.detail .recall-time { font-size: 11px; color: #3b5bdb; font-weight: 600; }
.detail .recall-text { font-size: 12px; color: #4a4f5c; line-height: 1.7; margin-top: 3px; }
.detail .rel { list-style: none; }
.detail .rel li { padding: 5px 0; border-bottom: 1px dashed #eee; font-size: 13px; cursor: pointer; }
.detail .rel li:hover { color: #3b5bdb; }
.detail .rel .rp { color: #3b5bdb; }
.detail .rel .rt { color: #8a8f9c; }

/* ---------- 面板（各功能页） ---------- */
.panel { flex: 1; background: #fff; border-radius: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.06); padding: 20px; overflow: auto; }
.panel h3 { font-size: 16px; color: #1f2a44; margin-bottom: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inp { flex: 1; min-width: 160px; padding: 9px 12px; border: 1px solid #e2e6ee; border-radius: 8px; font-size: 14px; outline: none; }
.inp.small { flex: 0 0 120px; min-width: 0; }
.inp:focus { border-color: #3b5bdb; }
.btn { padding: 9px 18px; background: #3b5bdb; color: #fff; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; }
.btn:hover { background: #2f4bb8; }
.result { margin-top: 16px; }
.result .empty { color: #a0a5b0; text-align: center; padding: 30px; }
.item-card { border: 1px solid #eef0f5; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.item-card:hover { border-color: #3b5bdb; background: #fafbff; }
.item-card .t { font-size: 14px; font-weight: 600; color: #1f2a44; }
.item-card .tg { font-size: 11px; color: #3b5bdb; background: #eef2ff; padding: 1px 8px; border-radius: 8px; margin-left: 8px; }
.item-card .y { font-size: 12px; color: #8a8f9c; margin-left: 8px; }
.item-card .s { font-size: 12px; color: #7a7f8c; margin-top: 6px; line-height: 1.6; }
.item-card .s mark { background: #fff3cd; color: #d48806; padding: 1px 3px; border-radius: 3px; font-weight: 600; }

/* 关系路径 */
.path { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 16px; background: #f7f9ff; border-radius: 10px; }
.path .node { background: #3b5bdb; color: #fff; padding: 6px 12px; border-radius: 16px; font-size: 13px; }
.path .rel { color: #8a8f9c; font-size: 12px; }

/* 时间线 */
.tline { position: relative; padding-left: 24px; }
.tline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: #e2e6ee; }
.tline .tl-item { position: relative; padding: 8px 0 8px 6px; }
.tline .tl-item::before { content: ""; position: absolute; left: -22px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: #3b5bdb; }
.tline .tl-year { font-weight: 700; color: #3b5bdb; font-size: 14px; margin-right: 10px; }
.tline .tl-name { font-size: 14px; color: #1f2a44; }
.tline .tl-type { font-size: 11px; color: #8a8f9c; margin-left: 8px; }
.tline .tl-desc { font-size: 12px; color: #7a7f8c; margin-top: 3px; line-height: 1.6; }

/* 问答 / 抽取 */
.qa-answer { background: #eef2ff; border-radius: 10px; padding: 14px 16px; font-size: 14px; color: #1f2a44; line-height: 1.7; }
.chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border: 1px solid #dbe1f5; background: #fff; border-radius: 16px; font-size: 12px; color: #3b5bdb; cursor: pointer; }
.chip:hover { background: #eef2ff; }
.ta { width: 100%; padding: 10px 12px; border: 1px solid #e2e6ee; border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; resize: vertical; }
.ta:focus { border-color: #3b5bdb; }
.ts-chart { width: 100%; height: 420px; margin-top: 16px; background: #fbfcff; border: 1px solid #eef0f5; border-radius: 10px; }
.tl-controls { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.tl-controls .btn.small { padding: 7px 16px; font-size: 13px; }
.tl-year-label { font-size: 15px; font-weight: 700; color: #3b5bdb; min-width: 52px; }
.tl-slider { flex: 1; accent-color: #3b5bdb; }
.tl-chart { width: 100%; height: 420px; margin-top: 10px; background: #fbfcff; border: 1px solid #eef0f5; border-radius: 10px; }
.tl-map-chart { width: 100%; height: 600px; margin-top: 12px; background: #013954; border: 1px solid #013954; border-radius: 10px; }
.trip { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: #f7f9ff; border-radius: 8px; margin-bottom: 8px; font-size: 13px; }
.trip .s { color: #3b5bdb; font-weight: 600; }
.trip .r { color: #8a8f9c; }
.trip .o { color: #1f2a44; font-weight: 600; }

/* API 列表 */
.api-row { display: flex; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #f0f2f7; font-size: 13px; align-items: center; }
.api-row .m { width: 52px; font-weight: 700; color: #3b5bdb; }
.api-row .p { font-family: Consolas, monospace; color: #1f2a44; flex: 1; }
.api-row .d { color: #8a8f9c; width: 160px; }

.about p { margin: 10px 0; font-size: 14px; line-height: 1.8; color: #4a4f5c; }
.about .muted { color: #a0a5b0; font-size: 12px; }
.about-banner {
  background: linear-gradient(135deg, #1f2a44 0%, #2c5a8c 50%, #1f2a44 100%);
  border-radius: 12px; padding: 40px 30px; text-align: center; color: #fff; margin-bottom: 24px;
}
.about-banner h2 { font-size: 24px; margin-bottom: 8px; color: #ffd666; }
.about-banner p { color: rgba(255,255,255,0.8); font-size: 14px; margin: 4px 0; }
.about-banner .about-zh { font-size: 13px; opacity: 0.7; margin-top: 8px; }
.about-section { margin-bottom: 24px; }
.about-section h3 { font-size: 18px; color: #1f2a44; margin-bottom: 12px; border-bottom: 2px solid #eef0f5; padding-bottom: 8px; }
.about-section p { font-size: 14px; line-height: 1.8; color: #4a4f5c; }
.about-footer { margin-top: 30px; padding-top: 16px; border-top: 1px solid #eef0f5; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.member-card {
  background: #fff; border: 1px solid #eef0f5; border-radius: 10px; padding: 20px;
  text-align: center; transition: box-shadow .2s, border-color .2s;
}
.member-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); border-color: #3b5bdb; }
.member-avatar {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 3px solid #eef2ff; margin-bottom: 10px;
}
.member-role { font-size: 11px; color: #3b5bdb; background: #eef2ff; display: inline-block; padding: 2px 10px; border-radius: 10px; margin-bottom: 6px; }
.member-name { font-size: 16px; font-weight: 600; color: #1f2a44; margin-bottom: 4px; }
.member-desc { font-size: 12px; color: #8a8f9c; line-height: 1.6; margin-bottom: 8px; }
.member-interests { font-size: 12px; color: #7a7f8c; line-height: 1.6; margin-bottom: 8px; }
.member-card a { font-size: 12px; color: #3b5bdb; text-decoration: none; }
.member-card a:hover { text-decoration: underline; }