/* 机构入驻流程页样式（后台登录页 → 入驻申请） */
:root {
  --brand: #2f6bf0;
  --brand-light: #eaf1ff;
  --danger: #f5222d;
  --danger-light: #fff1f0;
  --warn: #fa8c16;
  --warn-light: #fff7e6;
  --success: #10b981;
  --text: #1f2933;
  --muted: #8a94a6;
  --line: #e8ecf3;
  --bg: #f4f6fb;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }

/* ---------------- 顶部 header ---------------- */
.reg-header {
  height: 64px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}
.reg-header .logo { display: flex; align-items: center; height: 40px; }
.reg-header .logo img { height: 100%; object-fit: contain; }
.reg-header .slogan { color: #6b7280; font-size: 14px; letter-spacing: 2px; }
.reg-header .reg-login-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--brand); color: var(--brand); background: #fff;
  font-size: 13px; transition: .2s;
}
.reg-header .reg-login-btn:hover { background: var(--brand); color: #fff; }

/* ---------------- 步骤条 ---------------- */
.reg-steps {
  background: #fff;
  margin: 16px 40px 0;
  border-radius: var(--radius);
  padding: 18px 26px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 2px 10px rgba(28, 38, 50, .04);
}
.reg-steps .steps { flex: 1; display: flex; align-items: center; }
.reg-steps .step { display: flex; align-items: center; color: var(--muted); font-size: 13px; }
.reg-steps .step .no {
  width: 20px; height: 20px; border-radius: 50%;
  background: #d7dce5; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; margin-right: 6px; flex: none;
}
.reg-steps .step.active { color: var(--brand); font-weight: 600; }
.reg-steps .step.active .no { background: var(--brand); }
.reg-steps .step.done { color: var(--brand); }
.reg-steps .step.done .no { background: var(--brand); }
.reg-steps .line { flex: 1; height: 1px; background: #e3e7ef; margin: 0 14px; min-width: 24px; }
.reg-steps .service-wrap { position: relative; flex: none; }
.reg-steps .service {
  display: inline-block;
  border: 1px solid var(--warn);
  color: var(--warn);
  background: var(--warn-light);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
}
/* 联系客服：鼠标移入显示二维码，移出隐藏 */
.reg-steps .service-qr {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 150px; padding: 12px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 20px rgba(28, 38, 50, .12);
  display: none; z-index: 30;
}
.reg-steps .service-wrap:hover .service-qr { display: block; }
/* 小三角 + 鼠标移入过渡区（避免指针穿过空隙时闪烁） */
.reg-steps .service-qr::before {
  content: ""; position: absolute; top: -6px; right: 26px;
  width: 10px; height: 10px; background: #fff;
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.reg-steps .service-qr::after {
  content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px;
}
.reg-steps .service-qr .qr-img {
  width: 120px; height: 120px; border-radius: 8px; background: #f4f6fb;
  display: flex; align-items: center; justify-content: center;
  color: #b6bfcd; font-size: 12px; margin: 0 auto 8px;
}
.reg-steps .service-qr .qr-text { font-size: 12px; color: #6b7280; }

/* ---------------- 主内容 ---------------- */
/* 白色圆角面只在 .reg-main：留白用 margin（若用 padding + background-clip，圆角会被 padding 抵消掉） */
.reg-main { margin: 16px 40px 90px; background: #fff; border-radius: var(--radius); }
.reg-card {
  padding: 28px 40px 36px;
  min-height: 380px;
  max-width: 1000px;
  margin: 0 auto;
}
.reg-card h2 { font-size: 18px; margin: 0 0 6px; }
.reg-card .sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }

/* 表单：标题在输入框上方 */
.form-row { display: block; margin-bottom: 18px; }
.form-row > label {
  display: block; color: #4b5563; line-height: 1.6; margin-bottom: 8px;
}
.form-row > label .req { color: var(--danger); margin-right: 3px; }
.form-row .field .tip { color: var(--muted); font-size: 12px; margin-top: 6px; }
.form-control {
  width: 100%; height: 40px; line-height: 40px;
  border: 1px solid #d9dee8; border-radius: 6px;
  padding: 0 12px; background: #fff; color: var(--text);
}
.form-control:focus { border-color: var(--brand); outline: none; }
.form-control[readonly] { background: #f7f8fa; }
select.form-control { height: 40px; padding: 0 8px; }

/* 单选/多选选项组：入驻方式、应用程序（min-height 与 form-control 的 40px 对齐） */
.opt-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-height: 40px; }
.opt-item {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  font-weight: 400; font-size: 13px; color: #374151; cursor: pointer; white-space: nowrap;
}
.opt-item input { margin: 0; cursor: pointer; }

.captcha-field { display: flex; gap: 10px; }
.captcha-field .btn-sms {
  flex: none; height: 40px; padding: 0 16px; border-radius: 6px;
  background: var(--brand-light); color: var(--brand); white-space: nowrap;
}
.captcha-field .btn-sms:disabled { color: #a5adba; background: #f2f4f8; cursor: not-allowed; }

.grider { display: flex; flex-wrap: wrap; column-gap: 24px; }
.grider > .form-row { width: calc(50% - 12px); }

.block-title { font-weight: 600; margin: 26px 0 14px; font-size: 14px; }
.block-title .note { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }

/* 上传 */
.uploader {
  display: flex; align-items: center; gap: 12px;
  border: 1px dashed #d9dee8; border-radius: 8px;
  padding: 14px 16px; text-align: left; color: var(--muted);
  cursor: pointer; background: #fff; transition: .2s;
}
.uploader:hover { border-color: var(--brand); }
.uploader .u-icon {
  flex: none; width: 42px; height: 42px; border-radius: 8px;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.uploader .u-text { min-width: 0; }
.uploader .u-name { color: var(--text); font-weight: 500; word-break: break-all; }
.uploader .u-tip { font-size: 12px; margin-top: 4px; }
.uploader .thumb { flex: none; max-height: 56px; max-width: 120px; border-radius: 6px; }
.uploader .u-file { color: var(--brand); word-break: break-all; }
/* 身份证上传框：卡片底图 + 右下角蓝色加号 */
.uploader .u-icon-card {
  width: 66px; height: 42px; border-radius: 5px; padding: 0;
  background: none; display: block; position: relative; overflow: visible; color: #fff;
}
.uploader .u-icon-card img { width: 100%; height: 100%; display: block; border-radius: 5px; }
.uploader .u-icon-card .u-plus {
  position: absolute; right: -7px; bottom: -7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-style: normal;
}
.uploader .u-icon-card .u-plus svg { width: 10px; height: 10px; }
.hidden-file { display: none; }

/* 证件拍摄提示条 */
.cert-note {
  display: flex; align-items: center; gap: 8px;
  background: var(--brand-light); color: var(--text);
  border-radius: 8px; padding: 10px 14px; font-size: 13px;
  margin: 20px 0 4px;
}
.cert-note .n-icon { flex: none; width: 16px; height: 16px; color: var(--brand); }
.cert-note .n-icon svg { width: 100%; height: 100%; display: block; }

/* 版本卡片 */
.versions { display: flex; gap: 14px; }
.version-card {
  flex: 1; border: 1px solid var(--line); border-radius: 8px;
  padding: 16px 18px 18px; cursor: pointer; position: relative; transition: .2s;
  background: #fff;
}
.version-card:hover { border-color: #b9c8ea; }
.version-card.selected { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }
.version-card .v-name { font-weight: 600; font-size: 15px; }
.version-card .v-sub { color: var(--muted); font-size: 12px; margin: 6px 0 12px; }
.version-card .v-price { font-size: 20px; font-weight: 700; color: var(--danger); }
.version-card .v-price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.version-card .v-check {
  position: absolute; top: 12px; right: 12px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 12px;
  display: none; align-items: center; justify-content: center;
}
.version-card.selected .v-check { display: flex; }
.version-bar {
  margin-top: 16px; background: var(--brand-light); color: var(--brand);
  border-radius: 6px; padding: 10px 14px; font-size: 13px;
}

/* 支付 */
.pay-types { display: flex; gap: 14px; }
.pay-type {
  flex: 1; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; align-items: center;
}
.pay-type.selected { border-color: var(--brand); }
.pay-type .p-icon { flex: none; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; }
.pay-type .p-icon img { width: 100%; height: 100%; display: block; }
.pay-type .p-text { min-width: 0; }
.pay-type .p-title { font-weight: 600; font-size: 14px; }
.pay-type .p-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
/* 勾选圈：未选中＝空心灰圈，选中＝品牌色实心＋白勾 */
.pay-type .p-check {
  flex: none; margin-left: auto; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid #d9dee8; background: #fff; color: transparent;
  font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.pay-type.selected .p-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.qr-box {
  width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 8px;
  margin: 22px auto 8px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); background: #fafbfd; text-align: center; font-size: 12px; padding: 10px;
}
/* 二维码下方品牌提示行 */
.qr-tip {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 6px; color: #8a94a6; font-size: 13px;
}
.qr-tip .qr-ico { width: 18px; height: 18px; display: inline-flex; }
.qr-tip .qr-ico img { width: 100%; height: 100%; display: block; }
/* 服务端生成的二维码图片（data-uri PNG） */
.qr-box.has-qr { background: #fff; padding: 0; border-color: var(--brand); }
.qr-box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 6px; }
/* 扫码支付兜底入口：回调/轮询都没确认到账时，改为上传支付记录转人工确认 */
.qr-fallback { text-align: center; color: var(--muted); font-size: 12px; margin-top: 14px; }
.qr-fallback .link { color: var(--brand); cursor: pointer; }
.bank-table { margin: 22px auto 0; max-width: 560px; }
.bank-table .b-row { display: flex; align-items: center; margin-bottom: 14px; }
.bank-table .b-label { width: 90px; text-align: right; color: #4b5563; padding-right: 16px; }
.bank-table .b-value { flex: 1; }
.bank-table .btn-copy { color: var(--brand); font-size: 13px; margin-left: 10px; }
.amount-line { text-align: center; margin-top: 26px; color: var(--muted); }
.amount-line b { color: var(--danger); font-size: 20px; margin-left: 6px; }

/* 支付凭证（等待页上传） */
.voucher-list { display: flex; flex-wrap: wrap; gap: 12px; }
.voucher-list .v-item {
  position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #fafbfd;
}
.voucher-list .v-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.voucher-list .v-del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(15, 23, 42, .55); color: #fff; font-size: 13px; line-height: 18px;
  text-align: center; text-decoration: none;
}
.voucher-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.voucher-add {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px dashed #d9dee8; border-radius: 8px; padding: 9px 16px;
  color: var(--muted); cursor: pointer; background: #fff; transition: .2s; font-size: 13px;
}
.voucher-add:hover { border-color: var(--brand); color: var(--brand); }
.voucher-add .va-plus { font-size: 16px; line-height: 1; }

/* 状态页 */
.state-box { text-align: center; padding: 40px 0 20px; }
.state-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.state-icon.wait { background: var(--brand-light); color: var(--brand); }
.state-icon.fail { background: var(--danger-light); color: var(--danger); }
.state-icon.ok { background: #e8f8f1; color: var(--success); }
.state-box h2 { font-size: 20px; margin: 0 0 10px; }
.state-box .desc { color: var(--muted); font-size: 13px; line-height: 1.9; }
.state-badge {
  display: inline-block; margin: 18px 0 8px; padding: 6px 18px; border-radius: 999px;
  font-size: 13px;
}
.state-badge.wait { background: var(--warn-light); color: var(--warn); }
.state-badge.fail { background: var(--danger-light); color: var(--danger); }
.reason-box {
  max-width: 640px; margin: 18px auto 0; background: #fafbfd;
  border: 1px solid var(--line); border-radius: 8px; padding: 18px 22px; text-align: left;
}
.reason-box .r-title { font-weight: 600; margin-bottom: 10px; }
.reason-box .r-content {
  background: var(--danger-light); border-radius: 6px; padding: 12px 14px;
  color: #8c1a1a; line-height: 1.8; font-size: 13px;
}
.info-table { max-width: 640px; margin: 22px auto 0; text-align: left; }
.info-table .i-row {
  display: flex; justify-content: space-between; padding: 14px 4px;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.info-table .i-label { color: var(--muted); }
.info-table .i-value { color: var(--text); font-weight: 500; }
.info-table .i-value.brand { color: var(--brand); }
.info-table .i-value.danger { color: var(--danger); }

/* 底部按钮条 */
.reg-footer {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff;
  border-top: 1px solid var(--line); padding: 14px 40px;
  display: flex; justify-content: center; gap: 16px;
  box-shadow: 0 -2px 10px rgba(28, 38, 50, .04);
}
.btn {
  min-width: 120px; height: 40px; border-radius: 20px; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: #4a80f5; }
.btn.ghost { background: #fff; border: 1px solid #d9dee8; color: #4b5563; }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }

/* 功能清单弹窗（info 资料页 / pay 付款页共用，结构见 register.js::initFeatureModal） */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none;
  align-items: center; justify-content: center; z-index: 999;
}
.modal-mask.show { display: flex; }
.modal-box {
  background: #fff; border-radius: 16px; width: 520px; max-width: 92vw;
  max-height: 78vh; overflow: auto; padding: 24px 26px 18px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .18);
}
.modal-box.wide { width: 860px; }
.modal-head { margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-sub { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.modal-box .m-foot { text-align: right; margin-top: 18px; }

/* 功能对比表：所有版本并排，选中版本整列高亮（结构见 register.js::initFeatureModal） */
.cmp-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.cmp-table th, .cmp-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.cmp-table thead th { background: #f6f8fc; vertical-align: top; padding: 14px 8px 12px; }
.cmp-table thead th:first-child {
  width: 34%; text-align: left; padding-left: 14px;
  border-radius: 12px 0 0 0;
}
.cmp-table thead th .cmp-corner { color: var(--muted); font-size: 13px; font-weight: 500; }
.cmp-table thead th:last-child { border-radius: 0 12px 0 0; }
.cmp-table tbody td { vertical-align: middle; }
.cmp-table tbody td.cmp-name {
  text-align: left; padding-left: 14px; font-size: 13px; color: #475467;
}
.cmp-table tbody tr:nth-child(even) td { background: #fafbfd; }
.cmp-table tbody tr:last-child td { border-bottom: 0; }
/* 选中版本列 */
.cmp-table thead th.cur { background: var(--brand); }
.cmp-table tbody td.cur {
  background: var(--brand-light);
  box-shadow: inset 1px 0 0 rgba(47, 107, 240, .14), inset -1px 0 0 rgba(47, 107, 240, .14);
}
.cmp-vname { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; }
.cmp-vprice { margin-top: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cmp-vprice small { font-size: 11px; }
.cmp-badge {
  display: inline-block; margin-top: 8px; padding: 0 8px; border-radius: 9px;
  height: 18px; line-height: 18px; font-size: 11px; font-weight: 600;
  visibility: hidden;
}
.cmp-badge.on { visibility: visible; background: rgba(255, 255, 255, .92); color: var(--brand); }
.cmp-table thead th.cur .cmp-vname { color: #fff; }
.cmp-table thead th.cur .cmp-vprice { color: rgba(255, 255, 255, .82); }
/* 是否包含：品牌色圆形勾 / 浅灰短横 */
.cmp-yes, .cmp-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 12px;
}
.cmp-yes { background: var(--brand-light); color: var(--brand); font-weight: 700; }
.cmp-no { color: #c8d0de; }
.cmp-table tbody td.cur .cmp-yes { background: var(--brand); color: #fff; }

/* 协议弹窗（注册第一步《机构账号服务协议》《个人信息保护规则》，正文为后台富文本） */
.modal-box.doc { width: 760px; }
.doc-body { color: #475467; font-size: 13px; line-height: 1.9; word-break: break-word; }
.doc-body img { max-width: 100%; height: auto; }
.doc-body p { margin: 0 0 10px; }
.doc-body h1, .doc-body h2, .doc-body h3, .doc-body h4 { margin: 16px 0 8px; font-size: 15px; color: var(--text); }
.doc-body ul, .doc-body ol { margin: 0 0 10px; padding-left: 22px; }
.doc-body table { width: 100%; border-collapse: collapse; }
.doc-body table td, .doc-body table th { border: 1px solid var(--line); padding: 6px 8px; }

/* 账号密码提示卡（第二步提交成功后展示） */
.account-tip {
  max-width: 560px; margin: 18px auto 0; background: var(--brand-light);
  border: 1px dashed var(--brand); border-radius: 8px; padding: 14px 18px;
  color: #1a3f8f; font-size: 13px; line-height: 1.9;
}
.account-tip b { font-size: 14px; }

@media (max-width: 900px) {
  .reg-header, .reg-steps { padding-left: 16px; padding-right: 16px; }
  .reg-main { margin-left: 16px; margin-right: 16px; }
  .reg-steps { margin: 12px 16px 0; overflow-x: auto; }
  .grider > .form-row { width: 100%; }
  .versions, .pay-types { flex-direction: column; }
}
