/* SaaS 安装向导样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #2c3e50;
}
a { color: #667eea; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 容器 */
.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

/* 头部 logo */
.logo {
  text-align: center;
  color: #fff;
  margin-bottom: 24px;
}
.logo h1 { font-size: 28px; font-weight: 600; letter-spacing: 2px; }
.logo p { font-size: 14px; opacity: .85; margin-top: 6px; }

/* 主卡片 */
.card {
  width: 100%;
  max-width: 880px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  overflow: hidden;
}

/* 步骤条 */
.stepper {
  display: flex;
  align-items: flex-start;
  background: linear-gradient(180deg, #fafbff 0%, #f5f6fb 100%);
  border-bottom: 1px solid #ebedf2;
  padding: 24px 28px 20px;
}
.step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  color: #b5bcc9;
  font-size: 13px;
  line-height: 1.4;
}
.step-item .num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e4e7ee;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  transition: all .35s ease;
  position: relative;
  z-index: 2;
}
.step-item .label {
  margin-top: 8px;
  font-weight: 500;
  transition: color .3s;
}
.step-item.active { color: #667eea; }
.step-item.active .num {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: scale(1.05);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, .15);
}
.step-item.active .label { font-weight: 600; color: #4c51bf; }
.step-item.done { color: #52c41a; }
.step-item.done .num {
  background: linear-gradient(135deg, #73d13d 0%, #52c41a 100%);
}
.step-item.done .label { color: #52c41a; }
.step-item::after {
  content: "";
  position: absolute;
  left: calc(50% + 22px);
  top: 17px;
  right: calc(-50% + 22px);
  height: 2px;
  background: #e4e7ee;
  z-index: 0;
  transition: background .3s;
}
.step-item:last-child::after { display: none; }
.step-item.done::after {
  background: linear-gradient(90deg, #52c41a, #73d13d);
}
.step-item.active::after {
  background: linear-gradient(90deg, #b8c0e8, #e4e7ee);
}

/* 内容区 */
.body { padding: 32px 40px 8px; min-height: 380px; }
.body h2 {
  font-size: 20px;
  margin-bottom: 6px;
  color: #1f2d3d;
}
.body .desc { color: #8492a6; font-size: 13px; margin-bottom: 24px; }

/* 协议内容 */
.protocol {
  background: #f7f8fc;
  border: 1px solid #eef0f5;
  border-radius: 8px;
  padding: 20px;
  height: 320px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  color: #4a5568;
}
.agree {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

/* 检测表 */
.check-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.check-table th {
  text-align: left;
  padding: 10px 14px;
  background: #f7f8fc;
  color: #8492a6;
  font-weight: 600;
  border-bottom: 1px solid #eef0f5;
  font-size: 13px;
}
.check-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f2f7;
}
.check-table .ok { color: #52c41a; font-weight: 600; }
.check-table .fail { color: #f5222d; font-weight: 600; }
.check-table .warn { color: #faad14; font-weight: 600; }
.tag-required { color: #f5222d; font-size: 12px; }
.tag-optional { color: #8492a6; font-size: 12px; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.form-grid .full { grid-column: 1 / -1; }
.form-item { display: flex; flex-direction: column; }
.form-item label {
  font-size: 13px;
  color: #5a6a7d;
  margin-bottom: 6px;
  font-weight: 500;
}
.form-item label .req { color: #f5222d; margin-left: 4px; }
.form-item input,
.form-item select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.form-item input:focus,
.form-item select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,.12);
}
.form-item .tip { font-size: 12px; color: #aab2bd; margin-top: 4px; }
.form-item input.readonly { background: #f7f8fc; }

.fieldset {
  border: 1px solid #eef0f5;
  border-radius: 8px;
  padding: 18px 20px 4px;
  margin-bottom: 20px;
}
.fieldset legend {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  padding: 0 8px;
}

/* 底部操作 */
.footer {
  padding: 18px 40px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eef0f5;
  background: #fafbfd;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.btn-primary { background: #667eea; color: #fff; }
.btn-primary:hover { background: #5568d3; }
.btn-primary:disabled { background: #b8c0e8; cursor: not-allowed; }
.btn-default { background: #fff; color: #5a6a7d; border: 1px solid #dfe3ea; }
.btn-default:hover { border-color: #667eea; color: #667eea; }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #46a814; }
.btn-link { background: transparent; color: #667eea; padding: 0 8px; height: auto; }

/* 提示框 */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.alert-info { background: #e6f4ff; color: #1c6dc1; border: 1px solid #b4dcff; }
.alert-warn { background: #fff7e6; color: #d48806; border: 1px solid #ffd591; }
.alert-error { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.alert-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.alert .dev-code { font-weight: 700; font-size: 16px; letter-spacing: 2px; }

/* 日志输出 */
.log-box {
  background: #1e1e2e;
  color: #a6e3a1;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 13px;
  line-height: 1.7;
  padding: 18px;
  border-radius: 8px;
  height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
}
.log-box .err { color: #f38ba8; }
.log-box .ok { color: #a6e3a1; }

/* 进度条 */
.progress {
  height: 6px;
  background: #eef0f5;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 18px;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  width: 0%;
  transition: width .4s;
}

/* 完成页 */
.success-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: #52c41a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  margin: 20px auto 18px;
}
.complete-box { text-align: center; padding: 20px 0 10px; }
.complete-box h2 { margin-bottom: 8px; }
.complete-box .info-list {
  text-align: left;
  max-width: 460px;
  margin: 20px auto;
  background: #f7f8fc;
  border-radius: 8px;
  padding: 16px 22px;
  font-size: 13px;
  line-height: 2;
}
.complete-box .info-list b { color: #5a6a7d; display: inline-block; width: 110px; }
.warning-tips {
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #d48806;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  margin-top: 18px;
  text-align: left;
}

/* 加载遮罩 */
.mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.mask.show { display: flex; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .body, .footer { padding-left: 20px; padding-right: 20px; }
  .step-item .label { display: none; }
  .stepper { padding: 20px 12px 16px; }
}
