/* ===== 独立页面表单弹窗（沿用站点表单与人工验证样式） ===== */
.sf-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.sf-modal.open { display: flex; }
.sf-mask { position: absolute; inset: 0; background: rgba(10,28,46,.55); }
.sf-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 640px;
  max-width: 94vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(5,20,35,.35);
  overflow: hidden;
}
.sf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid #eef2f6;
  flex-shrink: 0;
}
.sf-head b { font-size: 16px; color: #16324f; }
.sf-close { border: 0; background: none; font-size: 24px; color: #94a3b8; line-height: 1; cursor: pointer; padding: 0 4px; }
.sf-close:hover { color: #334155; }
.sf-body { padding: 10px 24px 24px; overflow-y: auto; }
.sf-loading, .sf-error { text-align: center; color: #94a3b8; padding: 42px 10px; font-size: 14px; }
.sf-error { color: #c0392b; }

/* ===== 触发按钮 ===== */
.sf-btn {
  display: inline-block;
  background: #ffd814;
  border: 1px solid #fcd200;
  color: #131921;
  border-radius: 22px;
  padding: 10px 28px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s;
}
.sf-btn:hover { background: #f7ca00; }
.sf-btn-ghost { background: transparent; border: 1px solid #00a8e1; color: #00a8e1; }
.sf-btn-ghost:hover { background: rgba(0,168,225,.08); }
.newdiy { cursor: pointer; }

/* ===== 表单样式（作用域限定在弹窗内） ===== */
.sf-body .form-card {
  max-width: 100%;
  margin: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: none;
  padding: 18px 4px 8px;
}
.sf-body .form-head { text-align: center; margin-bottom: 20px; }
.sf-body .form-head h3 { color: #16324f; font-size: 20px; margin-bottom: 6px; }
.sf-body .form-head p { color: #7a8ba0; font-size: 13px; }
/* 弹窗内不显示表单自带的标题（仅保留模态头部） */
.sf-body .form-head { display: none; }
.sf-body .form-row { margin-bottom: 16px; }
.sf-body .form-row.span-half { display: inline-block; width: 49%; vertical-align: top; }
.sf-body .form-row.span-half:nth-of-type(odd) { margin-right: 1.8%; }
.sf-body .field-label { display: block; font-size: 13px; color: #44566a; margin-bottom: 7px; }
.sf-body .field-label .req { color: #e5533d; font-style: normal; margin-right: 3px; }
.sf-body input[type="text"],
.sf-body input[type="tel"],
.sf-body input[type="email"],
.sf-body input[type="number"],
.sf-body input[type="date"],
.sf-body select,
.sf-body textarea {
  width: 100%;
  border: 1px solid #d8e2ec;
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  background: #fbfcfe;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  box-sizing: border-box;
}
.sf-body textarea { resize: vertical; min-height: 88px; }
.sf-body input:focus, .sf-body select:focus, .sf-body textarea:focus {
  border-color: #1d5c9e;
  box-shadow: 0 0 0 3px rgba(29,92,158,.12);
  background: #fff;
}
.sf-body input.invalid, .sf-body select.invalid, .sf-body textarea.invalid { border-color: #e5533d; }
.sf-body .field-help { display: block; margin-top: 5px; color: #9aa9ba; font-size: 12px; }
.sf-body .choice-list { padding-top: 4px; }
.sf-body .choice { display: inline-flex; align-items: center; gap: 7px; margin: 4px 18px 4px 0; cursor: pointer; font-size: 14px; color: #44566a; }
.sf-body .choice input { width: 16px; height: 16px; accent-color: #1d5c9e; }
.sf-body .form-submit-row { margin-top: 22px; }
.sf-body .form-err { color: #e5533d; font-size: 12px; margin-top: 5px; display: block; }

/* 弹窗内按钮 */
.sf-body .btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 22px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}
.sf-body .btn-primary { background: #1d5c9e; border-color: #1d5c9e; color: #fff; }
.sf-body .btn-primary:hover { background: #16497f; }
.sf-body .btn-block { display: block; width: 100%; }

/* 成功与人工验证面板 */
.sf-body .form-success { text-align: center; padding: 30px 10px; }
.sf-body .success-icon {
  width: 62px; height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #22b573;
  color: #fff;
  font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
.sf-body .success-msg { color: #44566a; font-size: 15px; }
.sf-body .form-verify { border-top: 1px dashed #e2eaf3; padding-top: 22px; }
.sf-body .verify-head { text-align: center; margin-bottom: 16px; }
.sf-body .verify-head h4 { font-size: 16px; color: #16324f; margin-bottom: 4px; }
.sf-body .verify-head p { font-size: 13px; color: #94a3b8; }
.sf-body .verify-state { text-align: center; padding: 8px 4px 14px; }
.sf-body .verify-title { font-size: 15px; color: #334155; margin-bottom: 6px; }
.sf-body .verify-tip { font-size: 13px; color: #94a3b8; line-height: 1.7; }
.sf-body .verify-notice {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 14px;
  border-radius: 8px;
  background: #fff7e8;
  color: #a3661a;
  font-size: 13px;
}
.sf-body .verify-spinner {
  width: 30px; height: 30px;
  margin: 0 auto 14px;
  border: 3px solid #dbe6f0;
  border-top-color: #1d5c9e;
  border-radius: 50%;
  animation: sf-verify-rotate 0.8s linear infinite;
}
@keyframes sf-verify-rotate { to { transform: rotate(360deg); } }
.sf-body .verify-challenge {
  max-width: 460px;
  margin: 14px auto 16px;
  padding: 16px 18px;
  border: 1px solid #cfe4f8;
  border-radius: 10px;
  background: #f0f7fe;
  text-align: left;
}
.sf-body .verify-challenge .verify-kind {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  background: #1d5c9e;
  color: #fff;
  font-size: 12px;
  margin-bottom: 8px;
}
.sf-body .verify-challenge p { font-size: 14px; color: #334155; line-height: 1.7; }
.sf-body .verify-state .verify-input {
  display: block;
  width: 100%;
  max-width: 460px;
  margin: 0 auto 12px;
  border: 1px solid #d8e2ec;
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  background: #fbfcfe;
  outline: none;
}
.sf-body .verify-state .verify-input:focus {
  border-color: #1d5c9e;
  box-shadow: 0 0 0 3px rgba(29,92,158,.12);
  background: #fff;
}
.sf-body .verify-state .verify-submit { max-width: 460px; margin: 0 auto; }
.sf-body .verify-fail {
  width: 62px; height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #e5533d;
  color: #fff;
  font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
.sf-body .widget-form-empty { max-width: 100%; margin: 0; text-align: center; color: #9aa9ba; border: 1px dashed #cbd8e6; border-radius: 12px; padding: 24px; }

@media (max-width: 640px) {
  .sf-body { padding: 8px 16px 18px; }
  .sf-body .form-row.span-half { display: block; width: 100%; }
  .sf-body .form-row.span-half:nth-of-type(odd) { margin-right: 0; }
}
