body { background: #f3f4f6; }

.kb-header {
  background: #fff;
  padding: 18px 0 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.kb-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.kb-hero-left { display: flex; align-items: flex-start; gap: 12px; }

.kb-avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(145deg, #7f1d1d, #991b1b);
  box-shadow: 0 10px 18px rgba(0,0,0,.12);
}

.kb-title { font-weight: 800; font-size: 22px; letter-spacing: .2px; color: #111; }
.kb-subtitle { margin-top: 6px; color: #6b7280; font-size: 14px; }
.kb-meta { margin-top: 8px; color: #9ca3af; font-size: 13px; }

.kb-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.kb-link { color: #2563eb; text-decoration: none; font-weight: 700; font-size: 13px; }
.kb-link:hover { text-decoration: underline; }

.kb-cta { margin-top: 14px; }
.kb-cta-btn {
  display: block;
  width: 100%;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
  background: #111827;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 18px rgba(0,0,0,.12);
}
.kb-cta-btn:hover { color: #fff; background: #0b1220; }
.kb-cta-btn-disabled { opacity: .92; cursor: default; }

.kb-list {
  margin-top: 14px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  overflow: hidden;
}

.kb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  text-decoration: none;
  color: #111;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.kb-item:last-child { border-bottom: none; }
.kb-item:hover { background: #f9fafb; color: #111; }

.kb-item-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kb-item-meta { min-width: 0; }
.kb-item-title { font-weight: 800; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-item-sub { color: #6b7280; font-size: 13px; white-space: nowrap; margin-top: 2px; }
.kb-item-right { display: flex; align-items: center; gap: 10px; }
.kb-chevron {
  width: 8px; height: 8px;
  border-right: 2px solid #c7cdd6;
  border-top: 2px solid #c7cdd6;
  transform: rotate(45deg);
}

.kb-topbar {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: 10px 0;
  margin-bottom: 14px;
}
.kb-topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kb-back { color: #2563eb; text-decoration: none; font-weight: 800; }
.kb-topbar-title { font-weight: 900; color: #111; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-topbar-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.search-input {
  width: min(320px, 52vw);
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.14);
  color: #fff;
}
.search-input::placeholder { color: rgba(255,255,255,.85); }
.search-input:focus {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.55);
  box-shadow: 0 0 0 .2rem rgba(255,255,255,.18);
  color: #fff;
}

.folder-icon {
  width: 22px;
  height: 18px;
  display: inline-block;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  border-radius: 4px 4px 3px 3px;
  position: relative;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.10);
}
.folder-icon:before {
  content: "";
  position: absolute;
  left: 2px;
  top: -4px;
  width: 10px;
  height: 7px;
  background: linear-gradient(180deg, #fde68a, #fbbf24);
  border-radius: 4px 4px 0 0;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.08);
}

.folder-icon.folder-icon-green {
  background: linear-gradient(180deg, #c7f9cc, #86efac);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
}
.folder-icon.folder-icon-green:before {
  background: linear-gradient(180deg, #ecfdf5, #bbf7d0);
}

.kb-filelist { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 992px) { .kb-filelist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.kb-file {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 12px;
  border-radius: 12px;
  background:#fff;
  border: 1px solid rgba(0,0,0,.06);
  text-decoration:none;
  color:#111;
}
.kb-file:hover { background:#f9fafb; color:#111; }
.badge-type { font-size:.72rem; letter-spacing: .4px; }

/* 文件名在手机上过长时截断显示 */
.kb-file span.text-truncate {
  display:inline-block;
  max-width: 70vw;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media (min-width: 768px) {
  .kb-file span.text-truncate {
    max-width: 340px;
  }
}

