.popup {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999;
      }
  .pop-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1000;
    border-radius:20px;
    width:610px;
    text-align: center;
    color: #333;
    background-color: #fff;
    animation: fadeInBack 0.5s ease-in;
    animation-delay: 0s;
    /* 始终留在独立合成层，避免被 .masker 的 backdrop-filter 影响导致输入框发虚 */
    -webkit-transform: translate(-50%, -50%) translateZ(0);
    transform: translate(-50%, -50%) translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
  }
  .pop-title {
    height: 45px;
    font-size: 14px;
    line-height: 45px;
    border-bottom: 1px solid #e8e3e3;
    font-weight: 600;
  }
  .pop-title:after {
     border-bottom: 1px solid  #f2f2f2
  }
  
  .pop-content {
    padding: 20px 25px;
    font-size: 13px;
    line-height: 23px;
  }
  .btns {
    display: flex;

    position: relative;

    width: 100%;
    height: 50px;

    line-height: 50px;
    border-top: 1px solid #e8e3e3;
  }
    .btns:before {
        content: "";
    position: absolute;
    transform-origin: 0 0;
    -webkit-transform-origin: 0 0;
    top: 0;
    left: 0;
    right: 0;
    border-top: 1px solid #f2f2f2;
    transform: scaleY(0.5);
    -webkit-transform: scaleY(0.5);
    }
    .btns button {
      display: block;

      position: relative;

      margin: 0;
      border: 0;
      padding: 0;
      height: 100%;

      font-size: 17px;

      background-color: transparent;

      flex: 1;
      color: #999;
      outline: none;
      cursor: pointer;
    }
      .btns button:nth-child(2) {
        content: "";
    border-left: 1px solid #f2f2f2;

        
      }
      .btns button:last-child {
        color: #0b6ab5;
      }
.masker {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999;
  background-color: rgba(0, 0, 0, .5);
}

@keyframes fadeInBack {
  0% {
      opacity: 0;
      /*transform: translate(-51%, -80%);*/
      /* transform: skew(40deg); */
  }
  50% {
      opacity: 0.3;
      /*transform: translate(-50%, -80%);*/
      /* transform: skew(0deg); */
  }
  100% {
      opacity: 1;
      /*transform: translate(-49%, -80%);*/
      /* transform: skew(40deg); */
  }
}

    /* ===== Loading 遮罩层 ===== */
    .loading-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 9999;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
    .loading-overlay.show {
        display: flex;
    }
    .loading-spinner {
        width: 50px;
        height: 50px;
        border: 4px solid rgba(255, 255, 255, 0.3);
        border-top-color: #fff;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    .loading-text {
        margin-top: 20px;
        color: #fff;
        font-size: 16px;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
        text-align: center;
    }
    @keyframes spin {
        to { transform: rotate(360deg); }
    }

/* ===== 统一提示弹窗（Util.popup 生成的 .popup.component-dialog）===== */
.component-dialog {
  z-index: 9998;
  display: flex;
  /* 用 flex-start + 面板 margin:auto 实现居中：既不会被拉伸，
     面板高度也始终跟随内容（老页面里的 height:100% 子元素也不会被撑开） */
  align-items: flex-start;
  justify-content: center;
  justify-content: safe center;
  /* 弹窗高于视口时可滚动，避免顶部被裁掉 */
  overflow: auto;
}
/* 老页面（如 newui/buyer/*Update.jsp）通过 el.style.display='block' 显隐弹窗，
   内联 display 会覆盖上面的 display:flex，导致面板掉到左上角；这里在“已显示”状态下恢复 flex */
.component-dialog[style*="display: block"],
.component-dialog[style*="display:block"] {
  display: flex !important;
}
.component-dialog .masker {
  background: rgba(6, 16, 36, .52);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: cdMaskIn .18s ease-out both;
  /* 遮罩必须在面板之下，否则会吞掉面板上的点击（表现为按钮没反应） */
  z-index: 0;
}
.component-dialog .pop-wrapper {
  position: relative;
  top: auto;
  left: auto;
  z-index: 1;
  min-width: 300px;
  max-width: calc(100vw - 40px);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 48px rgba(8, 24, 58, .28), 0 2px 6px rgba(8, 24, 58, .12);
  transform: none;
  -webkit-transform: none;
  will-change: auto;
  /* 居中由 auto 外边距完成；高度只跟内容，不参与父级的百分比撑高 */
  margin: auto;
  height: fit-content;
  animation: cdPopInFlex .22s cubic-bezier(.22, .8, .28, 1) both;
}
.component-dialog .pop-title {
  height: 46px;
  line-height: 46px;
  /*padding: 0 18px;*/
  font-size: 15px;
  font-weight: 600;
  color: #1f2a3d;
  text-align: center;
  letter-spacing: .5px;
  background: linear-gradient(180deg, #f8fbff, #f1f6fd);
  border-bottom: 1px solid #e9eef6;
}
.component-dialog .pop-content {
  padding: 26px 22px;
  font-size: 14px;
  line-height: 1.8;
  color: #33415c;
  word-break: break-word;
}
/* 老页面弹窗里的 .form_box / .box 带内联 height:100%，会把内容区撑高、和下一个 .box 之间留出大片空白；
   弹窗内这两类容器一律按内容高度排布（.box 自带的 max-height/overflow 内联仍生效） */
.component-dialog .form_box,
.component-dialog .box {
  height: auto !important;
}
/* ===== 老页面标题栏右侧的“关闭”按钮 =====
   老 markup 是 .pop-title 下第三个 div > button，并带内联样式
   （width:8%、height:50px、float:right、灰底 #ccc8c8、text-shadow、border-top-right-radius:20px），
   这里用 !important 覆盖，统一成标题栏内右上角的浅色胶囊按钮 */
.component-dialog .pop-title > div:last-child:has(> button) {
  height: 100% !important;
  float: none !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  padding: 0 12px 0 0;
  border: 0;
  background: none;
}
/* 关闭按钮：浅灰蓝底 + 描边，在白色标题栏上清晰可辨；hover 变实心蓝 */
.component-dialog .pop-title > div:last-child > button {
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
  min-width: 32px !important;
  height: 30px !important;
  padding: 0 12px !important;
  border: 1px solid #cdd6e3 !important;
  border-radius: 10px !important;
  background: #eef2f8 !important;
  background-image: none !important;
  box-shadow: 0 2px 5px rgb(8 24 58 / 16%) !important;;
  color: #2b3a55 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 28px !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.component-dialog .pop-title > div:last-child > button:hover {
  background: #1668dc !important;
  border-color: #1668dc !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(22, 104, 220, .3) !important;
}
.component-dialog .pop-title > div:last-child > button:active {
  transform: scale(.96);
}
.component-dialog .pop-title > div:last-child > button:focus-visible {
  box-shadow: 0 0 0 2px rgba(22, 104, 220, .35) !important;
}
.component-dialog .btns {
  height: 48px;
  line-height: 48px;
  background: #fbfcfe;
  border-top: 1px solid #e9eef6;
}
.component-dialog .btns button {
  font-size: 15px;
  color: #5b6b85;
  transition: background-color .16s ease, color .16s ease;
}
.component-dialog .btns button:hover { background: #f1f6fd; color: #2f6fd0; }
.component-dialog .btns button:active { background: #e7f0fb; }
.component-dialog .btns button + button { border-left: 1px solid #e9eef6; }
.component-dialog .btns button:last-child { color: #1668dc; font-weight: 600; }
.component-dialog .btns button:last-child:hover { background: #eaf2ff; }
.component-dialog.pop-closing .masker { animation: cdMaskOut .17s ease-in both; }
.component-dialog.pop-closing .pop-wrapper { animation: cdPopOutFlex .17s ease-in both; }
@keyframes cdMaskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cdMaskOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes cdPopIn {
  from { opacity: 0; transform: translate(-50%, -50%) translateZ(0) scale(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) translateZ(0) scale(1); }
}
@keyframes cdPopOut {
  from { opacity: 1; transform: translate(-50%, -50%) translateZ(0) scale(1); }
  to { opacity: 0; transform: translate(-50%, -50%) translateZ(0) scale(.96); }
}
/* flex 居中专用动画：仅做 scale，不再用 translate(-50%, -50%)，保证文字像素对齐 */
@keyframes cdPopInFlex {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes cdPopOutFlex {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(.96); }
}
@media screen and (max-width: 520px) {
  .component-dialog .pop-wrapper { width: calc(100vw - 40px) !important; }
}
