/* 资料下载 */

.page-downloads {
  background: var(--green-mint);
}

.dl {
  padding: 24px 0 56px;
}

.dl__crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: #4b5563;
  flex-wrap: wrap;
}

.dl__crumb a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4b5563;
}

.dl__crumb img {
  width: 10.67px;
  height: 12px;
}

.dl__crumb span {
  color: #bdcabe;
}

.dl__crumb em {
  font-style: normal;
  color: var(--green);
}

.dl__head {
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  padding: 24px 0;
}

.dl__head .wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.dl__title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dl__title i {
  display: block;
  width: 6px;
  height: 28px;
  border-radius: 9999px;
  background: #006a3f;
}

.dl__title h1 {
  font-size: 28px;
  font-weight: 500;
  color: #1f2937;
  line-height: 36px;
}

.dl__title em {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-left: 8px;
}

.dl__sub {
  margin: 8px 0 0 20px;
  font-size: 14px;
  line-height: 22px;
  color: #4b5563;
}

.dl__search {
  position: relative;
  width: 320px;
  flex-shrink: 0;
}

.dl__search input {
  width: 100%;
  height: 40px;
  border: 0;
  background: #e3f9ed;
  border-radius: 8px;
  padding: 0 88px 0 16px;
  font-size: 12px;
  color: #1f2937;
  font-family: inherit;
}

.dl__search button {
  position: absolute;
  right: 4px;
  top: 4px;
  height: 32px;
  width: 80px;
  border: 0;
  border-radius: 8px;
  background: #006a3f;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.dl__tabs-wrap {
  padding: 24px 0 0;
}

.dl__tabs,
.dl__types {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.dl__types {
  margin-top: 12px;
}

.dl__tab,
.dl__type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
}

.dl__tab em,
.dl__type em {
  font-style: normal;
  font-size: 12px;
  color: #9ca3af;
}

.dl__tab.is-active,
.dl__type.is-active {
  background: #006a3f;
  color: #fff;
}

.dl__tab.is-active em,
.dl__type.is-active em {
  color: #fff;
}

.dl__meta {
  margin: 16px 0 12px;
  font-size: 12px;
  color: #9ca3af;
}

.dl__meta strong {
  color: #006a3f;
}

.dl-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 10px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.dl-item__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.dl-item__icon--pdf { background: #e2574c; }
.dl-item__icon--word { background: #2b579a; }
.dl-item__icon--ppt { background: #d04423; }
.dl-item__icon--excel { background: #217346; }
.dl-item__icon--archive { background: #6b7280; }
.dl-item__icon--other { background: #006a3f; }

.dl-item__body {
  flex: 1;
  min-width: 0;
}

.dl-item__body h3 {
  font-size: 16px;
  font-weight: 500;
  color: #1f2937;
  line-height: 24px;
}

.dl-item__body p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 20px;
  color: #4b5563;
}

.dl-item__meta {
  margin-top: 6px;
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.dl-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.dl-btn--ghost {
  background: #e3f9ed;
  color: #006a3f;
}

.dl-btn--primary {
  background: #006a3f;
  color: #fff;
}

.dl-empty {
  background: #fff;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  color: #6b7280;
}

.dl-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: #4b5563;
}

.dl-pager__pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dl-pager__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  background: #fff;
  color: #4b5563;
  text-decoration: none;
}

.dl-pager__link.is-active {
  background: #006a3f;
  color: #fff;
}

/* 预览页 */
.page-download-preview {
  background: #eef6f1;
}

.dl-preview {
  padding: 16px 0 32px;
}

.dl-preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  margin-bottom: 12px;
}

.dl-preview__info h1 {
  font-size: 18px;
  font-weight: 500;
  color: #1f2937;
}

.dl-preview__info p {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.dl-preview__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.dl-preview__frame-wrap {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  min-height: 72vh;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.dl-preview__frame {
  width: 100%;
  height: calc(100vh - 280px);
  min-height: 640px;
  border: 0;
  display: block;
  background: #525659;
}

.dl-preview__fallback {
  padding: 64px 24px;
  text-align: center;
}

.dl-preview__fallback h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.dl-preview__fallback p {
  color: #6b7280;
  margin-bottom: 20px;
}

@media print {
  .topbar,
  .header,
  .nav,
  .footer,
  .dl-preview__bar,
  .dl__crumb {
    display: none !important;
  }

  .dl-preview__frame-wrap,
  .dl-preview__frame {
    height: 100vh !important;
    min-height: 0;
    box-shadow: none;
    border-radius: 0;
  }
}

@media (max-width: 900px) {
  .dl {
    padding: 16px 0 40px;
  }

  .dl__head {
    padding: 16px 0;
  }

  .dl__head .wrap,
  .dl-item,
  .dl-preview__bar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .dl__title {
    flex-wrap: wrap;
  }

  .dl__title h1 {
    font-size: 22px;
    line-height: 30px;
  }

  .dl__title em {
    display: block;
    margin: 4px 0 0;
  }

  .dl__sub {
    margin-left: 0;
  }

  .dl__search {
    width: 100%;
  }

  .dl__tabs-wrap {
    padding-top: 16px;
  }

  .dl__tabs,
  .dl__types {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dl__tabs::-webkit-scrollbar,
  .dl__types::-webkit-scrollbar {
    display: none;
  }

  .dl__tab,
  .dl__type {
    flex: 0 0 auto;
  }

  .dl-preview__frame {
    width: 100%;
    height: 70vh;
    min-height: 420px;
  }

  .dl-item__actions,
  .dl-preview__actions {
    width: 100%;
  }

  .dl-btn {
    flex: 1;
  }
}
