* { box-sizing: border-box; }
body { margin:0; font-family: -apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  background:#f4f6fa; color:#1f2430; }
header { display:flex; align-items:center; gap:18px; padding:10px 20px; background:#1f2740; color:#fff;
  position:sticky; top:0; z-index:10; }
.brand { font-weight:700; font-size:18px; }
nav { display:flex; gap:6px; flex:1; }
nav button { background:transparent; color:#c7cde0; border:0; padding:8px 14px; border-radius:8px;
  cursor:pointer; font-size:14px; }
nav button.active, nav button:hover { background:#354063; color:#fff; }
.token-box input { padding:6px 8px; border-radius:6px; border:1px solid #4a557a; background:#2a3350; color:#fff; }
.token-box button { padding:6px 10px; border-radius:6px; border:0; cursor:pointer; }
main { padding:20px; max-width:1280px; margin:0 auto; }
.tab { display:none; } .tab.active { display:block; }
.muted { color:#7a8194; font-size:13px; }
.cards { display:grid; grid-template-columns:repeat(6,1fr); gap:12px; margin-bottom:16px; }
.card { background:#fff; border-radius:12px; padding:14px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.card .num { font-size:26px; font-weight:700; color:#2f6bff; }
.card .lbl { color:#7a8194; font-size:13px; margin-top:4px; }
.charts { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.chart-box { background:#fff; border-radius:12px; padding:12px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.chart-box.wide { grid-column:1 / -1; }
.chart { height:280px; }
.layout { display:grid; grid-template-columns:260px 1fr; gap:16px; }
.tree, .content, .panel { background:#fff; border-radius:12px; padding:14px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.tree h3, .panel h3 { margin-top:0; }
.tree .top, .tree .sub { cursor:pointer; padding:4px 6px; border-radius:6px; font-size:14px; }
.tree .top:hover, .tree .sub:hover, .tree .sel { background:#eaf0ff; }
.tree .sub { padding-left:20px; font-size:13px; color:#4a5168; }
.filters { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; align-items:center; }
input,select,textarea { padding:8px 10px; border:1px solid #d4d9e6; border-radius:8px; font-size:14px; font-family:inherit; }
textarea { width:100%; }
button { padding:8px 14px; border-radius:8px; border:1px solid #d4d9e6; background:#fff; cursor:pointer; font-size:14px; }
button:hover { border-color:#2f6bff; color:#2f6bff; }
button.primary { background:#2f6bff; color:#fff; border-color:#2f6bff; }
button.danger { color:#d33; border-color:#e6a; }
.item-list { display:flex; flex-direction:column; gap:10px; }
.item { border:1px solid #e6e9f2; border-radius:10px; padding:10px 12px; }
.item .meta { display:flex; gap:8px; flex-wrap:wrap; font-size:12px; color:#7a8194; margin-bottom:6px; }
.tag { background:#eef2ff; color:#3358d4; border-radius:6px; padding:1px 8px; }
.tag.type { background:#e9f8ef; color:#1a9e54; }
.tag.review { background:#fff4e5; color:#c77700; }
.tag.deleted { background:#fdeaea; color:#d33; }
.item .text { font-size:14px; line-height:1.6; }
.item .ops { margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; }
.item .ops button { padding:4px 10px; font-size:12px; }
.pager { display:flex; gap:12px; align-items:center; justify-content:center; margin-top:14px; }
.row { display:flex; gap:10px; align-items:center; margin:10px 0; flex-wrap:wrap; }
.row.right { justify-content:flex-end; }
.jobs table { width:100%; border-collapse:collapse; font-size:13px; }
.jobs th,.jobs td { border-bottom:1px solid #eef0f6; padding:6px 8px; text-align:left; }
.st-queued{color:#888;} .st-running{color:#2f6bff;} .st-done{color:#1a9e54;} .st-error{color:#d33;}
.answer { white-space:pre-wrap; background:#f8faff; border:1px solid #e6ebfb; border-radius:10px;
  padding:14px; line-height:1.7; margin-top:12px; }
.prop-cats { display:flex; flex-direction:column; gap:8px; margin-bottom:18px; }
.prop { display:flex; gap:8px; align-items:center; border:1px dashed #e0c080; border-radius:8px; padding:8px; }
.modal { position:fixed; inset:0; background:rgba(20,24,40,.45); display:flex; align-items:center;
  justify-content:center; z-index:50; }
.modal.hidden { display:none; }
.modal-box { background:#fff; border-radius:12px; padding:20px; width:460px; max-width:92vw; }
.modal-box.wide { width:860px; }
.scroll { max-height:62vh; overflow:auto; margin:10px 0; }
.chunk { border-bottom:1px dashed #eef0f6; padding:8px 0; font-size:13px; line-height:1.75;
  white-space:pre-wrap; word-break:break-word; }
.chunk .pos { color:#7a8194; font-size:12px; margin-bottom:4px; }
.kb-row { display:flex; gap:10px; align-items:center; justify-content:space-between;
  border:1px solid #e6e9f2; border-radius:10px; padding:10px 12px; margin-bottom:8px; }
.kb-row .kb-name { font-weight:600; }
.kb-row .kb-ops { display:flex; gap:6px; flex-wrap:wrap; }
.kb-row .kb-ops button { padding:4px 10px; font-size:12px; }
a { color:#2f6bff; }
