:root {
  --bg: #e7eef6;
  --panel: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #0284c7;
  --red: #e11d48;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(2, 132, 199, 0.16), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(217, 119, 6, 0.1), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

button, input { font: inherit; }

[hidden] { display: none !important; }

.top {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
}

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
  gap: 28px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 28px 64px;
}

html:has(.wrap.login-only),
body:has(.wrap.login-only) {
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(2, 8, 23, 0.72) 0%, rgba(2, 8, 23, 0.5) 42%, rgba(2, 8, 23, 0.74) 100%),
    url("../brand/login-bg.jpg") center / cover no-repeat fixed;
}

body:has(.wrap.login-only) .top {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  height: auto;
  padding: 28px 28px 8px;
  color: #fff;
}

body:has(.wrap.login-only) .logo {
  width: 72px;
  height: 72px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

body:has(.wrap.login-only) .brand {
  font-size: 22px;
}

.wrap.login-only {
  grid-template-columns: minmax(280px, 420px);
  justify-content: center;
  align-content: center;
  min-height: 100vh;
  padding-top: 0;
  padding-bottom: 0;
}

.login-title {
  margin: 0 0 22px;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

body:has(.wrap.login-only) .account {
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.2;
}

.lead, .fine, .form-lead, .signed-meta {
  color: var(--muted);
  line-height: 1.7;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.card, .account {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.card { padding: 18px; }
.card-name { color: var(--muted); font-size: 13px; }
.card-price { font-size: 28px; font-weight: 700; margin: 6px 0; }
.card-meta { color: var(--muted); font-size: 13px; }

.account { padding: 22px; align-self: start; }
.account h2 { margin: 0 0 6px; font-size: 22px; }

form, .signed { display: flex; flex-direction: column; gap: 12px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }

input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #f8fafc;
  color: var(--text);
}

.submit, .text-btn { cursor: pointer; }

.submit {
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--cyan);
  color: #fff;
  font-weight: 700;
}

.submit.link {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--cyan);
  padding: 0;
  text-align: left;
}
.sms-send { white-space: nowrap; font-size: 13px; }
.sms-send:disabled { color: #94a3b8; cursor: not-allowed; }
.auth-links { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.auth-links .text-btn { font-size: 12px; }

.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-row img { height: 48px; width: 140px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; object-fit: contain; }
.lab { display: inline-flex; align-items: flex-start; line-height: 1.2; }
.req { color: var(--red); font-weight: 700; font-size: 11px; line-height: 1; margin-left: 1px; }
.form-error { min-height: 1.2em; margin: 0; color: var(--red); font-size: 13px; }
.password-box {
  display: grid;
  gap: 10px;
  margin: 4px 0 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.password-box label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.password-box input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
}
.signed-name { font-size: 24px; font-weight: 700; }
.module-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.module-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.module-card b { font-size: 16px; }
.module-card span:last-child { color: var(--muted); font-size: 12px; line-height: 1.4; }
.module-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e0f2fe;
  color: var(--cyan);
  font-weight: 700;
}

.beian {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 2;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}
.beian:empty { display: none; }
html:not([data-brand="public"]) .brief-link { display: none; }
.brief-link { font-weight: 600; }
.beian a {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}
.beian img { width: 14px; height: 15px; margin-right: 4px; }
.beian a + a { margin-left: 14px; }
.beian a:hover { text-decoration: underline; }

.wx-support {
  position: fixed;
  right: 16px;
  bottom: 56px;
  z-index: 5;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #1e4d6b;
  color: #f4f8fb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.wx-support-card {
  position: fixed;
  right: 16px;
  bottom: 100px;
  z-index: 5;
  width: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.wx-support-qr { display: block; width: 100%; height: auto; margin-top: 8px; background: #fff; }
.wx-support-title { font-size: 13px; font-weight: 700; }
.wx-support-id { margin-top: 8px; font-size: 16px; font-weight: 700; word-break: break-all; }
.wx-support-note { margin-top: 6px; color: var(--muted); font-size: 12px; }
.wx-support-copy {
  margin-top: 12px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

@media (max-width: 800px) {
  h1 { font-size: 32px; }
  .wrap, .cards { grid-template-columns: 1fr; }
  .top, .wrap { padding-left: 16px; padding-right: 16px; }
}
html[data-brand="public"] body:has(.wrap.login-only) .brand { font-size: 16px; }
html[data-brand="public"] .login-title { font-size: 22px; }
html[data-brand="public"] h1 { font-size: 24px; }
html[data-brand="public"] .account h2 { font-size: 16px; }
html[data-brand="public"] .card-price { font-size: 18px; }
html[data-brand="public"] .signed-name { font-size: 16px; }
html[data-brand="public"] label,
html[data-brand="public"] .form-lead,
html[data-brand="public"] .lead,
html[data-brand="public"] .fine { font-size: 12px; }
html[data-brand="public"] input { height: 34px; font-size: 13px; }
html[data-brand="public"] .submit { height: 36px; font-size: 13px; }
