/* ===== PMF 评估表单页 专用样式 ===== */

.form-page {
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== 主内容 ===== */
.form-main {
  flex: 1;
  padding: 127px 0 176px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Hero 区 */
.form-hero {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.form-hero__title {
  font-size: 48px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.96px;
  line-height: 1.2;
  margin: 0;
}

.form-hero__subtitle {
  font-size: 16px;
  font-weight: 300;
  color: #434653;
  line-height: 1.5;
  max-width: 672px;
  margin: 0;
}

/* 表单容器 */
.form-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-container__title {
  font-size: 36px;
  font-weight: 700;
  color: #003c90;
  line-height: 1.5;
  margin: 0;
}

.form-container__meta {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 400;
  color: #737784;
}

.accordion-header__progress-check {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.accordion-header__progress-check.is-hidden {
  display: none;
}

.form-file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.evaluation-field--note {
  margin-top: 4px;
}

.form-upload-zone.drag-over {
  border-color: #0f52ba;
  background: #f0f7ff;
}

.form-score {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 200px;
}

.form-score__input {
  width: 88px;
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 16px;
  color: #111827;
  background: #fff;
}

.form-score__input:focus {
  outline: none;
  border-color: #0f52ba;
  box-shadow: 0 0 0 3px rgba(15, 82, 186, 0.12);
}

.form-score__max {
  font-size: 15px;
  color: #737784;
}

/* 手风琴列表 */
.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 单个手风琴区块 */
.accordion-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

/* 手风琴头部 */
.accordion-header {
  background: #0f52ba;
  border-bottom: 1px solid rgba(229,231,235,.5);
  padding: 24px 24px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.accordion-header__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.accordion-header__icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.2);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accordion-header__icon img {
  width: 15px;
  height: auto;
}

.accordion-header__title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.accordion-header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.accordion-header__progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.accordion-header__progress-text {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  opacity: .8;
}

.accordion-header__progress-bar {
  width: 96px;
  height: 6px;
  background: rgba(255,255,255,.2);
  border-radius: 9999px;
  overflow: hidden;
}

.accordion-header__progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 9999px;
  transition: width .3s ease;
}

.accordion-chevron {
  width: 11px;
  height: auto;
  transition: transform .2s;
}

.accordion-section.is-open .accordion-chevron {
  transform: rotate(180deg);
}

/* 手风琴内容 — 平滑展开/收起 */
.accordion-body {
  background: #fff;
  padding: 0 32px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.3s ease,
              opacity 0.3s ease;
  opacity: 0;
}

.accordion-section.is-open .accordion-body {
  max-height: 2000px;
  padding: 32px;
  opacity: 1;
}

/* 表单字段组 */
.form-group {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group.is-hidden,
.form-group.is-conditional-field.is-hidden {
  display: none !important;
}

.form-group.is-conditional-field:not(.is-hidden) {
  display: flex;
}

.form-group__label {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.form-group__label-hint {
  font-size: 15px;
  font-weight: 400;
  color: #737784;
}

/* 单选/复选组 */
.form-radio-group,
.form-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-radio-label,
.form-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 300;
  color: #191c1e;
  line-height: 1.6;
}

.form-radio-label input[type="radio"],
.form-check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1px solid #c3c6d5;
  cursor: pointer;
  accent-color: #0f52ba;
  flex-shrink: 0;
}

.form-radio-label input[type="radio"] {
  border-radius: 50%;
}

.form-check-label input[type="checkbox"] {
  border-radius: 4px;
}

/* 文件上传区 */
.form-upload-zone {
  border: 2px dashed #e5e7eb;
  border-radius: 12px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.form-upload-zone:hover {
  border-color: #0f52ba;
  background: #f0f7ff;
}

.form-upload-zone img {
  width: 42px;
  height: auto;
}

.form-upload-zone__text {
  font-size: 15px;
  font-weight: 300;
  color: #434653;
  text-align: center;
}

.form-upload-zone.is-uploading {
  pointer-events: none;
  border-color: #93c5fd;
  background: #f8fbff;
}

.form-upload-zone.is-uploaded {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.form-upload-zone.is-error {
  border-color: #fca5a5;
  background: #fef2f2;
}

/* 文件列表项 */
.form-file-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-file-item__info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-file-item__icon {
  width: 15px;
  height: auto;
}

.form-file-item__name {
  font-size: 15px;
  font-weight: 300;
  color: #111827;
  margin-bottom: 2px;
}

.form-file-item__size {
  font-size: 13px;
  font-weight: 300;
  color: #737784;
}

.form-file-item__delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  transition: background .2s;
}

.form-file-item__delete:hover {
  background: #fee2e2;
}

.form-file-item__delete img {
  width: 15px;
  height: auto;
}

/* 文本域 */
.form-textarea {
  width: 100%;
  border: 1px solid #c3c6d5;
  border-radius: 12px;
  padding: 17px;
  font-size: 15px;
  font-weight: 300;
  font-family: 'Noto Sans SC', sans-serif;
  color: #111827;
  min-height: 120px;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}

.form-textarea::placeholder {
  color: #c3c6d5;
}

.form-textarea:focus {
  border-color: #0f52ba;
}

/* 底部操作栏 */
.form-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 32px;
}

.btn--outline-primary {
  background: #fff;
  border: 1px solid #0f52ba;
  border-radius: 9999px;
  padding: 13px 41px;
  font-size: 16px;
  font-weight: 700;
  color: #0f52ba;
  cursor: pointer;
  font-family: 'Noto Sans SC', sans-serif;
  transition: background .2s, color .2s;
}

.btn--outline-primary:hover {
  background: #0f52ba;
  color: #fff;
}

.btn--primary {
  background: #0f52ba;
  border: none;
  border-radius: 9999px;
  padding: 12px 40px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: 'Noto Sans SC', sans-serif;
  transition: background .2s;
}

.btn--primary:hover {
  background: #0d47a1;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .form-hero__title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .form-main {
    padding: 80px 0 80px;
  }

  .form-hero__title {
    font-size: 28px;
    letter-spacing: -0.5px;
  }

  .form-hero__subtitle {
    font-size: 14px;
  }

  .form-container__title {
    font-size: 24px;
  }

  .accordion-header {
    padding: 16px 20px;
  }

  .accordion-header__title {
    font-size: 16px;
  }

  .accordion-body {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn--outline-primary,
  .btn--primary {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .form-radio-group,
  .form-check-group {
    flex-direction: column;
    gap: 8px;
  }
}

/* ===== 动态效果 ===== */

/* 手风琴头部悬停 */
.accordion-header {
  transition: filter 0.2s ease;
}

.accordion-header:hover {
  filter: brightness(1.06);
}

/* 进度条动画填充 */
.accordion-header__progress-fill {
  width: 0 !important;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.accordion-header__progress-fill.anim-filled {
  width: var(--fill-width, 0) !important;
}

/* 文件上传区域悬停 */
.form-upload-zone {
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.form-upload-zone:hover {
  border-color: #0f52ba;
  background: rgba(15, 82, 186, 0.04);
  transform: scale(1.01);
}

/* 文件拖入高亮 */
.form-upload-zone.drag-over {
  border-color: #0f52ba;
  background: rgba(15, 82, 186, 0.08);
  transform: scale(1.02);
}

/* radio / checkbox 悬停 */
.form-radio-item,
.form-check-item {
  transition: background 0.2s ease, transform 0.15s ease;
}

.form-radio-item:hover,
.form-check-item:hover {
  background: rgba(15, 82, 186, 0.04);
  transform: translateX(2px);
}

/* 选中状态脉冲 */
@keyframes selectPulse {
  0%   { box-shadow: 0 0 0 0 rgba(15, 82, 186, 0.35); }
  70%  { box-shadow: 0 0 0 6px rgba(15, 82, 186, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 82, 186, 0); }
}

.form-radio-item input:checked + label,
.form-check-item input:checked + label {
  animation: selectPulse 0.4s ease;
}

/* 手风琴区块入场 */
@keyframes accordionIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.accordion-section {
  animation: accordionIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.accordion-section:nth-child(1) { animation-delay: 0.05s; }
.accordion-section:nth-child(2) { animation-delay: 0.12s; }
.accordion-section:nth-child(3) { animation-delay: 0.19s; }
.accordion-section:nth-child(4) { animation-delay: 0.26s; }
.accordion-section:nth-child(5) { animation-delay: 0.33s; }

/* Repeater */
.form-repeater {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-repeater-row {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  background: #fafafa;
}

.form-repeater-row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.form-repeater-remove {
  border: none;
  background: transparent;
  color: #dc2626;
  cursor: pointer;
  font-size: 13px;
}

.form-repeater-row__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.form-repeater-subfield label {
  display: block;
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 4px;
}

.form-repeater-add {
  align-self: flex-start;
  border: 1px dashed #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
}

.form-risk-banner,
.form-unlock-banner {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.form-risk-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.form-unlock-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.accordion-section.is-locked .accordion-body {
  opacity: 0.55;
}

@media (max-width: 768px) {
  .form-repeater-row__fields {
    grid-template-columns: 1fr;
  }
}

/* 按钮悬停 */
.btn--outline-primary,
.btn--primary {
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn--outline-primary:hover {
  background: rgba(15, 82, 186, 0.06);
  transform: translateY(-1px);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 82, 186, 0.25);
}

.btn--primary:active,
.btn--outline-primary:active {
  transform: scale(0.97);
}

/* 模块标题 */
.form-module-header {
  margin: 8px 0 4px;
  padding: 14px 0 6px;
  border-top: 1px solid #eef2f7;
}
.form-module-header:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.form-module-header__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #003c90;
}
.form-module-header__subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.form-text-input,
.form-select {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: #111827;
  background: #fff;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-star-desc {
  margin: 0 0 8px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}
.form-star-group {
  display: flex;
  gap: 8px;
}
.form-star-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}
.form-star-icon {
  font-size: 28px;
  color: #d1d5db;
  transition: color 0.15s ease;
}
.form-star-btn.is-active .form-star-icon,
.form-star-btn:hover .form-star-icon {
  color: #f59e0b;
}

.form-group.is-invalid .form-text-input,
.form-group.is-invalid .form-textarea,
.form-group.is-invalid .form-select {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}
.form-group.is-invalid .form-star-group {
  outline: 2px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 4px;
}
