:root {
  --sidebar-w: 220px;
  --primary: #2f54eb;
}
* { box-sizing: border-box; }
body { background: #f0f2f5; font-size: 14px; }

/* ===== 登录页 ===== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1d2b64 0%, #2f54eb 50%, #36d1dc 100%);
}
.login-card {
  width: 380px; background: #fff; border-radius: 16px; padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 16px;
  background: linear-gradient(135deg, #2f54eb, #36d1dc); color: #fff;
  font-size: 30px; display: flex; align-items: center; justify-content: center;
}

/* ===== 布局 ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: #001529; color: #fff;
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
}
.sidebar-brand {
  padding: 18px 20px; font-size: 16px; font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand i { color: #36d1dc; margin-right: 6px; }
.sidebar .nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.sidebar .nav-link {
  color: rgba(255,255,255,.72); padding: 10px 14px; border-radius: 8px; margin-bottom: 2px;
  display: flex; align-items: center; gap: 10px; font-size: 14px;
}
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar .nav-link.active { background: var(--primary); color: #fff; }
.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.admin-info { font-size: 13px; color: rgba(255,255,255,.8); }

.main { flex: 1; margin-left: var(--sidebar-w); padding: 24px; }

/* ===== 卡片 ===== */
.card { border: none; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.card-title { font-weight: 600; }

.stat-card { border-radius: 12px; color: #fff; padding: 20px; height: 100%; }
.stat-card .label { font-size: 13px; opacity: .9; }
.stat-card .value { font-size: 28px; font-weight: 700; margin-top: 6px; }
.stat-card .sub { font-size: 12px; opacity: .85; margin-top: 4px; }
.sc-1 { background: linear-gradient(135deg,#2f54eb,#6a5cff); }
.sc-2 { background: linear-gradient(135deg,#13c2c2,#36cfc9); }
.sc-3 { background: linear-gradient(135deg,#fa8c16,#ffc53d); }
.sc-4 { background: linear-gradient(135deg,#f5222d,#ff7875); }
.sc-5 { background: linear-gradient(135deg,#52c41a,#95de64); }
.sc-6 { background: linear-gradient(135deg,#722ed1,#b37feb); }

/* ===== 表格 ===== */
.table th { font-size: 13px; color: #666; font-weight: 600; white-space: nowrap; }
.table td { vertical-align: middle; }
.badge { font-weight: 500; }
.doc-title { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.desc-clamp {
  max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block;
}

/* ===== 弹窗 ===== */
.modal-content { border: none; border-radius: 14px; }
.modal-header { border-bottom: 1px solid #f0f0f0; }
.form-label { font-weight: 600; font-size: 13px; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(47,84,235,.12); }
textarea.form-control { font-size: 13px; }

/* 文档编辑 Markdown 框 */
.md-editor {
  font-family: "JetBrains Mono", Consolas, monospace; font-size: 13px;
  min-height: 320px; line-height: 1.7;
}

/* ===== 其他 ===== */
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.page-head h4 { font-weight: 700; margin: 0; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.empty-tip { text-align: center; color: #999; padding: 40px 0; }
.kv-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.kv-item:last-child { border: none; }
