/**
 * 填报端「模板下载」弹窗（须由 common-css 引入；勿放在 Vue x-template 内）
 */
.ftg-download-modal-wrap.ant-modal-centered .ant-modal,
.ftg-download-modal-wrap .ant-modal {
  width: min(calc(100vw - 32px), 520px) !important;
  max-width: min(calc(100vw - 32px), 520px) !important;
  flex: 0 0 auto !important;
  margin: 0 auto;
  padding-bottom: 0;
  top: 0;
}

@media (max-width: 767px) {
  .ftg-download-modal-wrap.ant-modal-centered .ant-modal {
    flex: 0 1 auto !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }
}

.ftg-download-modal-wrap .ant-modal-content {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.ftg-download-modal-wrap .ant-modal-header {
  flex-shrink: 0;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e8eef5;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.ftg-download-modal-wrap .ant-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.02em;
  line-height: 1.45;
  word-break: break-word;
}

.ftg-download-modal-wrap .ant-modal-close-x {
  width: 44px;
  height: 52px;
  line-height: 52px;
  color: #64748b;
}

.ftg-download-modal-wrap .ant-modal-body {
  flex: 1 1 auto;
  min-height: 140px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

.ftg-download-modal-wrap .ant-modal-footer {
  flex-shrink: 0;
  border-top: 1px solid #e8eef5;
  padding: 12px 20px 16px;
  background: #fafbfc;
}

.ftg-download-modal-wrap .ant-modal-footer .ant-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
}

.ftg-download-modal-wrap .ant-modal-footer .ant-btn-primary {
  min-width: 128px;
  font-weight: 500;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.ftg-download-modal-wrap .ant-modal-footer .ant-btn-primary:hover,
.ftg-download-modal-wrap .ant-modal-footer .ant-btn-primary:focus {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
}

.ftg-download-modal-wrap .ant-modal-footer .ant-btn-default {
  border-color: #cbd5e1;
  color: #475569;
}

.ftg-download-modal-wrap .ant-modal-footer .ant-btn-default:hover {
  color: #2563eb;
  border-color: #93c5fd;
}

.ftg-download-modal {
  padding: 4px 4px 4px;
  max-width: 100%;
  box-sizing: border-box;
}

.ftg-download-modal__top {
  margin-bottom: 16px;
}

.ftg-download-modal__chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.ftg-download-modal__lead {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #64748b;
}

.ftg-download-modal__block {
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  background: #fff;
}

.ftg-download-modal__block:last-child {
  margin-bottom: 0;
}

.ftg-download-modal__block--intro {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #f5f7ff 0%, #fff 48%);
}

.ftg-download-modal__block--guide {
  border-color: #e2e8f0;
  background: #fafbfc;
}

.ftg-download-modal__block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #e8eef5;
  background: rgba(255, 255, 255, 0.88);
}

.ftg-download-modal__block--intro .ftg-download-modal__block-head {
  border-bottom-color: #e0e7ff;
  background: rgba(238, 242, 255, 0.65);
}

.ftg-download-modal__block-title {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.ftg-download-modal__block-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}

.ftg-download-modal__block-icon--intro {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

.ftg-download-modal__block-icon--guide {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.35);
}

.ftg-download-modal__block-body {
  padding: 14px 14px 16px;
  font-size: 14px;
  line-height: 1.75;
  color: #1e293b;
}

.ftg-download-modal__pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.ftg-download-modal__scroll {
  max-height: min(40vh, 280px);
  overflow-y: auto;
  padding-right: 6px;
}

.ftg-download-modal__scroll::-webkit-scrollbar {
  width: 6px;
}

.ftg-download-modal__scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}

.ftg-download-modal__scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.ftg-download-modal__empty {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 14px 18px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.ftg-download-modal__empty p {
  margin: 0;
  flex: 1;
}

.ftg-download-modal__empty-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  line-height: 22px;
  text-align: center;
  flex-shrink: 0;
  font-family: Georgia, 'Times New Roman', serif;
}
