:root {
  --green: #07c160;
  --green-dark: #06ad56;
  --green-deep: #059648;
  --bg: #f2f3f5;
  --card: #ffffff;
  --text: #181818;
  --text-2: #6b7280;
  --text-3: #9aa0a6;
  --line: #eceef1;
  --danger: #fa5151;
  --warn: #ff9f0a;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(17, 24, 39, .06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.phone {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* ---------- 头部 ---------- */
.hero {
  background: linear-gradient(165deg, #0ad06b 0%, #07c160 45%, #04a851 100%);
  color: #fff;
  padding: 18px 20px 26px;
  border-radius: 0 0 26px 26px;
  position: relative;
  box-shadow: 0 10px 30px rgba(7, 193, 96, .25);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 85% 0%, rgba(255, 255, 255, .28), transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .5px;
}

.hero-date {
  font-size: 12px;
  opacity: .85;
}

.steps-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0 2px;
  position: relative;
  z-index: 1;
}

.ring { position: relative; width: 200px; height: 200px; }

.ring svg { transform: rotate(-90deg); }

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, .22);
  stroke-width: 12;
}

.ring-fg {
  fill: none;
  stroke: #fff;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 553;
  stroke-dashoffset: 553;
  transition: stroke-dashoffset .9s cubic-bezier(.2, .8, .2, 1);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .12));
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.steps-num {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.steps-unit { font-size: 12px; opacity: .82; }

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}

.meta-item { display: flex; flex-direction: column; align-items: center; }
.meta-item b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.meta-item span { font-size: 11px; opacity: .8; }
.meta-divider { width: 1px; height: 22px; background: rgba(255, 255, 255, .3); }

/* ---------- 内容 ---------- */
.body { padding: 16px 14px 30px; display: flex; flex-direction: column; gap: 14px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 4px;
  height: 14px;
  border-radius: 3px;
  background: var(--green);
  display: inline-block;
}

.card-hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
}

.card-hint a {
  color: var(--green-deep);
  font-weight: 600;
  text-decoration: none;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; flex: 1; }
.field > span { font-size: 12px; color: var(--text-2); }

.field input {
  border: 1px solid var(--line);
  background: #fafbfc;
  border-radius: 11px;
  padding: 11px 13px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color .2s, background .2s;
  width: 100%;
  font-family: inherit;
}

.field input:focus { border-color: var(--green); background: #fff; }

.field-row { display: flex; gap: 10px; }

.tip {
  font-size: 11.5px;
  color: var(--text-3);
  margin: -2px 0 12px;
  line-height: 1.6;
}

.tip code, .notice code {
  background: #f2f4f6;
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 11px;
  color: #374151;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  position: relative;
  cursor: pointer;
}

.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch {
  width: 46px;
  height: 27px;
  border-radius: 20px;
  background: #d7dbe0;
  position: relative;
  transition: background .2s;
  flex: 0 0 auto;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s;
}

.switch-row input:checked + .switch { background: var(--green); }
.switch-row input:checked + .switch::after { transform: translateX(19px); }

.btn-primary {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  padding: 13px;
  background: linear-gradient(180deg, #0ad06b, var(--green-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(7, 193, 96, .28);
  transition: transform .12s, opacity .2s;
}

.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.notice {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.7;
  margin: 12px 0 0;
  background: #fffaf0;
  border: 1px solid #ffeccc;
  border-radius: 10px;
  padding: 9px 11px;
}

/* ---------- 账号卡片 ---------- */
.accounts { display: flex; flex-direction: column; gap: 10px; }

.acc {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.acc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.acc-phone { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.acc-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #eef1f4;
  color: var(--text-2);
  white-space: nowrap;
}

.acc-status.ok { background: #e7f8ee; color: var(--green-deep); }
.acc-status.error { background: #feecec; color: var(--danger); }
.acc-status.running { background: #fff5e6; color: #b26a00; }

.acc-meta { font-size: 12px; color: var(--text-3); line-height: 1.6; word-break: break-all; }

.acc-actions { display: flex; gap: 8px; align-items: center; }

.btn-ghost {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 9px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.btn-ghost.primary { border-color: var(--green); color: var(--green-deep); font-weight: 600; }
.btn-ghost.danger { flex: 0 0 62px; color: var(--danger); border-color: #f7dede; }
.btn-ghost:disabled { opacity: .55; }

.mini-switch { transform: scale(.82); transform-origin: right center; }

.empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 18px 0; }

/* ---------- 日志 ---------- */
.link-btn {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--green-deep);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 4px;
}

.logs {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 12px;
}

.log { display: flex; gap: 7px; align-items: flex-start; line-height: 1.55; }
.log-time { color: var(--text-3); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.log-msg { color: #4b5563; word-break: break-word; }
.log.ok .log-msg { color: var(--green-deep); }
.log.error .log-msg { color: var(--danger); }
.log.warn .log-msg { color: #b26a00; }

.foot {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  padding: 6px 0 10px;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 12px);
  background: rgba(24, 24, 24, .9);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 99;
  max-width: 80vw;
  text-align: center;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 登录 / 注册 ---------- */
.auth {
  min-height: 100vh;
  background: linear-gradient(170deg, #0ad06b 0%, #07c160 38%, #f2f3f5 38.1%, #f2f3f5 100%);
  padding: 0 22px 40px;
}

.auth-brand {
  padding: 54px 0 26px;
  color: #fff;
  text-align: center;
}

.brand-logo {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin: 0 auto 12px;
  backdrop-filter: blur(6px);
}

.auth-brand h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: .5px; }
.auth-brand p { margin: 6px 0 0; font-size: 12px; opacity: .85; }

.auth-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px 18px 22px;
  box-shadow: 0 12px 34px rgba(17, 24, 39, .1);
  margin-top: 6px;
}

.auth-card h2 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
}

.auth-card .field { margin-bottom: 14px; }

.auth-alt {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
}

.auth-alt a { color: var(--green-deep); text-decoration: none; font-weight: 600; }

.auth-foot {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 22px;
  line-height: 1.7;
}

/* 顶部用户条 */.hero-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  padding: 4px 10px;
  border-radius: 20px;
  position: relative;
  z-index: 2;
}

.hero-user button {
  border: 0;
  background: none;
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  opacity: .9;
  cursor: pointer;
  padding: 0 0 0 6px;
  border-left: 1px solid rgba(255, 255, 255, .35);
  margin-left: 2px;
}

/* ---------- 验证码输入行 ---------- */
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1; letter-spacing: 2px; }

.btn-code {
  flex: 0 0 108px;
  border: 1px solid var(--green);
  background: #f0fdf5;
  color: var(--green-deep);
  border-radius: 11px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .2s;
}

.btn-code:disabled { opacity: .5; cursor: not-allowed; border-color: var(--line); color: var(--text-3); background: #f7f8fa; }

.dev-hint {
  margin: -6px 0 12px;
  font-size: 11.5px;
  color: #b26a00;
  background: #fff8ec;
  border: 1px dashed #ffd79a;
  border-radius: 9px;
  padding: 7px 10px;
  line-height: 1.6;
  display: none;
}

.dev-hint.show { display: block; }

.dev-hint b { font-variant-numeric: tabular-nums; letter-spacing: 2px; }

/* ---------- 图形验证码 ---------- */
.captcha {
  flex: 0 0 110px;
  width: 110px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f3f7f4;
  cursor: pointer;
  display: block;
  object-fit: cover;
  user-select: none;
}

.captcha-tip {
  font-size: 11px;
  color: var(--text-3);
  margin: -6px 0 12px;
}

/* ---------- 注册引导页 ---------- */
.guide-head {
  background: linear-gradient(165deg, #0ad06b 0%, #07c160 50%, #04a851 100%);
  color: #fff;
  padding: 16px 18px 22px;
  border-radius: 0 0 22px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.guide-head h1 { margin: 0; font-size: 17px; font-weight: 600; }
.guide-head p { margin: 3px 0 0; font-size: 12px; opacity: .88; }

.steps { padding: 16px 14px 0; display: flex; flex-direction: column; gap: 12px; }

.step {
  background: #fff;
  border-radius: 15px;
  padding: 15px 15px 16px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
}

.step-num {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 1px;
}

.step-body { flex: 1; }
.step-body h3 { margin: 0 0 5px; font-size: 15px; font-weight: 600; }
.step-body p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.65; }
.step-body p + p { margin-top: 6px; }

.path {
  display: inline-block;
  background: #f0fdf5;
  border: 1px solid #cdeedd;
  color: var(--green-deep);
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 12px;
  margin: 3px 3px 0 0;
}

.phone-mock {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fafbfc;
}

.mock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #4b5563;
  padding: 7px 0;
  border-bottom: 1px dashed #e9ecef;
}

.mock-row:last-child { border-bottom: 0; }
.mock-row span:last-child { color: var(--text-3); font-size: 12px; }

.guide-actions { padding: 16px 14px 26px; display: flex; flex-direction: column; gap: 10px; }
.btn-block { padding: 14px; }

.tip-box {
  margin: 0 14px 26px;
  background: #fff8ec;
  border: 1px solid #ffe0b2;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: #8a5a00;
  line-height: 1.75;
}

/* ---------- 微信绑定状态 ---------- */
.acc-wx {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff8ec;
  border: 1px solid #ffe6c2;
  font-size: 12px;
  color: #8a5a00;
}

.acc-wx.on {
  background: #f0fdf5;
  border-color: #cdeedd;
  color: var(--green-deep);
}

.wx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0a020;
  flex: 0 0 auto;
}

.acc-wx.on .wx-dot { background: var(--green); }

.acc-wx-text { flex: 1; line-height: 1.5; }

.btn-wx {
  border: 1px solid rgba(0, 0, 0, .08);
  background: rgba(255, 255, 255, .8);
  color: inherit;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .45);
  animation: fadeIn .2s ease;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 20px 18px 22px;
  animation: slideUp .24s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .12);
}

.modal-box h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }

.modal-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }

.modal-steps {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 13.5px;
  color: #374151;
  line-height: 2;
}

.modal-steps b { color: var(--green-deep); }

.modal-tip {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.65;
  background: #f7f8fa;
  border-radius: 9px;
  padding: 9px 11px;
}

.btn-link {
  width: 100%;
  margin-top: 8px;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  font-family: inherit;
  padding: 8px;
  cursor: pointer;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); } to { transform: translateY(0); } }

/* ---------- 微信绑定弹窗内的二维码 ---------- */
.wx-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 0 6px;
}

.wx-qr img, .wx-qr canvas {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 8px;
  background: #fff;
}

.wx-qr p {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

.btn-outline {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--green);
  background: #f0fdf5;
  color: var(--green-deep);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.btn-outline:disabled { opacity: .55; }

/* 卡密状态条 */
.card-info {
  margin-top: 10px;
  text-align: center;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .8);
  position: relative;
  z-index: 1;
  min-height: 16px;
}

/* 随机生成按钮 */
.rand-btn {
  border: 1px solid var(--green);
  background: #f0fdf5;
  color: var(--green-deep);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
}
.rand-btn:hover { background: #e3fbee; }

/* ---------- 绑定入口 ---------- */
.bind-grid { display: flex; flex-direction: column; gap: 10px; }

.bind-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.bind-item:active { background: #f7f9fa; }

.bind-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  flex: 0 0 auto;
}

.bind-icon.wx { background: #07c160; }
.bind-icon.ali { background: #1677ff; }

.bind-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bind-text b { font-size: 14px; color: var(--text-1); font-weight: 600; }
.bind-text em { font-style: normal; font-size: 12px; color: var(--text-3); }
.bind-text em.ok { color: var(--green-deep); }

.bind-arrow { color: #c9ced6; font-size: 20px; line-height: 1; }

/* 绑定弹窗内的账号选择 */
.bind-acc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.bind-acc span { color: var(--text-2); }

.mini-bind {
  border: 1px solid var(--green);
  background: #f0fdf5;
  color: var(--green-deep);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

/* 支付宝授权串 */
.ali-box {
  margin: 10px 0 0;
  background: #0f172a;
  color: #a7f3d0;
  border-radius: 10px;
  padding: 10px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  max-height: 150px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
