/* ============================================================
   文档中心 document.html · 布局重做 2026-11-27
   主色 #0A4EF2 · 左分类导航 + 右文档卡片 · 浅灰底白卡
   ============================================================ */

/* ---------- 顶部：左文字 + 右插图 ---------- */
.doc-hero {
  position: relative;
  background:
    url("../assets/img/document/banner.png") right bottom / auto 100% no-repeat,
    linear-gradient(100deg, #EAF1FE 0%, #F3F7FE 42%, #F8F8F6 72%);
  background-blend-mode: normal, normal;
  min-height: 320px;
  display: flex;
  align-items: center;
}
.doc-hero-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.doc-hero-text {
  max-width: 560px;
  padding: 56px 0;
}
.doc-hero-text h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  color: rgba(0, 0, 0, 0.90);
  margin: 0 0 14px;
}
.doc-hero-desc {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(0, 0, 0, 0.55);
  margin: 0 0 28px;
}
.doc-hero .input-search {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 520px;
  height: 50px;
  background: #FFFFFF;
  border: 1px solid #E6EAED;
  border-radius: 8px;
  padding: 0 6px 0 16px;
  box-shadow: 0 6px 20px rgba(10, 78, 242, 0.06);
  transition: border-color .16s, box-shadow .16s;
}
.doc-hero .input-search:focus-within {
  border-color: #0A4EF2;
  box-shadow: 0 6px 22px rgba(10, 78, 242, 0.14);
}
.doc-hero .input-search input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: none;
  outline: none;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.85);
  background: transparent;
}
.doc-hero .input-search input::placeholder {
  color: rgba(0, 0, 0, 0.32);
}
.doc-hero .search-btn {
  flex: 0 0 auto;
  height: 38px;
  line-height: 38px;
  padding: 0 26px;
  background: #0A4EF2;
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.doc-hero .search-btn:hover {
  background: #0839C4;
}
/* 插图已在 background 里铺好，这层只做小屏时的裁切占位 */
.doc-hero-art {
  flex: 0 0 0;
}

/* ---------- 主体两栏 ---------- */
.doc-body {
  background: #F7F8FA;
  padding: 36px 0 72px;
}
.doc-body-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* 左：分类导航 */
.doc-rail {
  position: sticky;
  top: 20px;
  background: #FFFFFF;
  border: 1px solid #E6EAED;
  border-radius: 8px;
  padding: 18px 12px;
}
.doc-rail-title {
  font-size: 12px;
  letter-spacing: .08em;
  color: rgba(0, 0, 0, 0.38);
  padding: 0 10px 10px;
  border-bottom: 1px solid #F0F1F3;
  margin-bottom: 8px;
}
.doc-rail-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.doc-rail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.70);
  text-decoration: none !important;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.doc-rail-item:hover {
  background: #F3F7FE;
  color: #0A4EF2;
}
.doc-rail-item.is-active {
  background: #EAF1FE;
  color: #0A4EF2;
  font-weight: 600;
}
.doc-rail-item .doc-rail-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.doc-rail-item .doc-rail-count {
  flex: 0 0 auto;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.32);
  font-variant-numeric: tabular-nums;
}
.doc-rail-item.is-active .doc-rail-count {
  color: #0A4EF2;
}

/* 右：卡片网格 */
.doc-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  min-height: 208px;
  background: #FFFFFF;
  border: 1px solid #E6EAED;
  border-radius: 8px;
  padding: 22px 24px 18px;
  scroll-margin-top: 20px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.doc-card:hover {
  border-color: #0A4EF2;
  box-shadow: 0 8px 24px rgba(10, 78, 242, 0.10);
  transform: translateY(-2px);
}
.doc-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #F0F1F3;
}
.doc-card-head img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}
.doc-card-head h3 {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.90);
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.doc-card-count {
  flex: 0 0 auto;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.32);
  font-variant-numeric: tabular-nums;
}

.doc-links {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  flex: 1;
}
.doc-links li {
  margin: 0;
}
.doc-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.65);
  text-decoration: none !important;
  border-radius: 4px;
  transition: color .12s, background .12s;
}
.doc-links a::before {
  content: "";
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #CFE2FE;
  transition: background .12s;
}
.doc-links a:hover {
  color: #0A4EF2;
  background: #F7FAFF;
}
.doc-links a:hover::before {
  background: #0A4EF2;
}
.doc-links .doc-link-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.doc-links .doc-none {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.32);
  padding: 8px 2px;
}

.doc-card-more {
  display: inline-block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F0F1F3;
  font-size: 13px;
  color: #0A4EF2 !important;
  text-decoration: none !important;
}
.doc-card-more:hover {
  color: #0839C4 !important;
}
.doc-card-more::after {
  content: " →";
}

/* 空状态 / 错误 */
.doc-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(0, 0, 0, 0.40);
  background: #FFFFFF;
  border: 1px dashed #E6EAED;
  border-radius: 8px;
  padding: 64px 20px;
  font-size: 14px;
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 1100px) {
  .doc-hero {
    min-height: 280px;
    background:
      url("../assets/img/document/banner.png") right bottom / auto 118% no-repeat,
      linear-gradient(100deg, #EAF1FE 0%, #F3F7FE 55%, #F8F8F6 100%);
  }
  .doc-hero-text {
    max-width: 460px;
  }
  .doc-body-inner {
    grid-template-columns: 1fr;
  }
  .doc-rail {
    position: static;
  }
  .doc-rail-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .doc-rail-item {
    border: 1px solid #E6EAED;
    border-radius: 20px;
    padding: 7px 14px;
  }
}
@media screen and (max-width: 860px) {
  .doc-main {
    grid-template-columns: 1fr;
  }
}
@media screen and (max-width: 750px) {
  .doc-hero {
    background: linear-gradient(160deg, #EAF1FE 0%, #F3F7FE 60%, #F8F8F6 100%);
    min-height: 0;
  }
  .doc-hero-text {
    max-width: 100%;
    padding: 32px 0;
  }
  .doc-hero-text h1 {
    font-size: 26px;
  }
  .doc-hero-desc {
    font-size: 14px;
    margin-bottom: 22px;
  }
  .doc-hero .input-search {
    max-width: 100%;
    height: 46px;
  }
  .doc-hero .input-search input {
    height: 44px;
    font-size: 14px;
  }
  .doc-hero .search-btn {
    height: 34px;
    line-height: 34px;
    padding: 0 18px;
    font-size: 14px;
  }
  .doc-body {
    padding: 24px 0 48px;
  }
  .doc-card {
    padding: 18px 18px 14px;
  }
}

/* ============================================================
   详情页（document-view / document-details）保持原结构，仅配色
   ============================================================ */
.page .nav-left {
  background: #FFFFFF;
  border-right: 1px solid #E6EAED;
  padding-top: 100px;
  width: 300px;
}
.page .nav-left .nav-head {
  background: #F7F8FA;
  height: 100px;
  padding-top: 30px;
  font-size: 16px;
}
.page .nav-left .nav-div {
  background: #FFFFFF;
}
.page .search-input {
  background: #F7F8FA;
  border: 1px solid #E6EAED;
  border-radius: 6px;
  height: 36px;
  line-height: 36px;
}

.page .nav-right {
  padding-left: 300px;
}
.page .nav-top {
  height: 60px;
  padding: 14px 24px;
  box-shadow: 0 1px 0 #F0F1F3;
}
.page .content-page {
  top: 60px;
  left: 300px;
  background: #F7F8FA;
  margin: 20px;
  border-radius: 8px;
}
.page .page-content {
  margin-left: 0;
  padding: 36px 48px;
  height: auto;
  min-height: calc(100vh - 100px);
  background: #fff;
  border-radius: 8px;
}
.page .page-content .document-head h1,
.page .page-content .document-head h2 {
  font-size: 24px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.90);
}
.page .page-content .document-head .document-time {
  margin-top: 12px;
  margin-bottom: 0;
  color: rgba(0, 0, 0, 0.40);
  font-size: 13px;
}
.page .page-content .document-cont {
  border-top: 1px solid #F0F1F3;
  border-bottom: none;
  padding: 24px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(0, 0, 0, 0.75);
}
.page .page-content .document-cont img {
  max-width: 100%;
  border-radius: 6px;
}
.page .page-content .document-cont a {
  color: #0A4EF2;
}
.page .page-content .document-cont pre {
  background: #F7F8FA;
  border: 1px solid #E6EAED;
  border-radius: 6px;
  padding: 12px 16px;
  overflow-x: auto;
}
.page .page-content .document-cont h2,
.page .page-content .document-cont h3 {
  color: rgba(0, 0, 0, 0.90);
  font-weight: 600;
}
.page .page-content .document-cont table th,
.page .page-content .document-cont table td {
  border: 1px solid #E6EAED;
  padding: 6px 12px;
}

/* 左侧导航激活态用主色 */
.page .nav-left .nav-div .nav-list ul .a_active .active,
.page .nav-left .nav-div .nav-list ul .nav-show .nav-box .active-li-a {
  color: #0A4EF2;
}
.page .nav-left .nav-div .nav-list .li-a:hover {
  color: #0A4EF2;
}
.page .nav-left .nav-div .nav-list ul .nav-show .nav-box a:hover {
  color: #0A4EF2;
}

/* 右侧目录（guide-box） */
.page .guide-box {
  border-left: 2px solid #F0F1F3;
  padding-left: 14px;
}
.page .guide-box a {
  color: rgba(0, 0, 0, 0.55);
  font-size: 13px;
  line-height: 28px;
}
.page .guide-box a:hover {
  color: #0A4EF2;
}
.page .guide-box .active a,
.page .guide-box .active::before {
  color: #0A4EF2;
  font-weight: 600;
}

@media screen and (max-width: 750px) {
  .page .nav-left {
    display: none;
  }
  .page .nav-right {
    padding-left: 0;
  }
  .page .content-page {
    left: 0;
    margin: 10px;
  }
  .page .page-content {
    padding: 20px;
  }
}
