/* 账号中心页面样式。默认一套颜色照公司官网（深海蓝、蓝青紫光谱、珊瑚橙收尾）；各软件的配色在下面按 data-brand 换 */
:root {
  color-scheme: light;
  --abyss: #050f33;
  --abyss-2: #0a1a4d;
  --brand-navy: #0f3498;
  --brand-blue: #237aff;
  --brand-cyan: #00b4f0;
  --brand-violet: #8239e6;
  --brand-coral: #f07848;
  --ink: #0a1c45;
  --ink-2: #4b5874;
  --ink-3: #6d7891;
  --mist: #f2f5fb;
  --line: #dde4f1;
  --line-strong: #c5d0e4;
  --ok: #1f7a54;
  --ok-soft: #e7f6ef;
  --bad: #a33131;
  --bad-soft: #fff0f0;
  --warn-soft: #fff4dc;
  --warn: #8a5b00;
  --gradient-brand: linear-gradient(135deg, #0f3498 0%, #4d4ed8 52%, #8239e6 100%);
  --spectrum: linear-gradient(90deg, #0f3498 0%, #237aff 28%, #00b4f0 50%, #8239e6 78%, #f07848 100%);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC",
    "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--mist);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

/* ---------- 登录页布局 ---------- */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
}

.brand {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(40px, 6vw, 88px);
  color: #fff;
  background:
    radial-gradient(60% 50% at 18% 20%, rgb(35 122 255 / 0.28), transparent 70%),
    radial-gradient(55% 55% at 85% 85%, rgb(130 57 230 / 0.32), transparent 70%),
    linear-gradient(160deg, var(--abyss-2) 0%, var(--abyss) 62%);
}

/* 一面光帆：两块半透明的三角，像帆 */
.brand__sail {
  position: absolute;
  right: -6%;
  bottom: 0;
  width: 62%;
  height: 92%;
  background: linear-gradient(180deg, rgb(0 180 240 / 0.20) 0%, rgb(130 57 230 / 0.16) 55%, rgb(240 120 72 / 0.10) 100%);
  clip-path: polygon(56% 0, 100% 100%, 8% 100%);
  pointer-events: none;
}
.brand__sail::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.10), rgb(255 255 255 / 0));
  clip-path: polygon(56% 0, 56% 100%, 8% 100%);
}

.brand__inner { position: relative; max-width: 520px; }

.brand__eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: rgb(255 255 255 / 0.72);
}

.brand__title {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand__title span { display: block; }
.brand__title span + span {
  background: linear-gradient(90deg, #8fd0ff 0%, #b9a6ff 70%, #ffb592 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand__sub {
  margin: 18px 0 0;
  font-size: 16px;
  color: rgb(255 255 255 / 0.78);
}

.brand__points {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.brand__points li {
  display: grid;
  gap: 2px;
  padding-left: 18px;
  border-left: 2px solid rgb(255 255 255 / 0.18);
}
.brand__points b { font-size: 15px; font-weight: 600; }
.brand__points span { font-size: 13px; color: rgb(255 255 255 / 0.62); }

.brand__line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--spectrum);
}

.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px 24px 32px;
}

/* ---------- 卡片和表单 ---------- */
.card {
  width: 100%;
  max-width: 420px;
  padding: 36px 36px 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgb(10 28 69 / 0.10);
}
.card--wide { max-width: 560px; }

.card__logo { display: block; width: 150px; height: auto; margin: 0 0 22px; }
.card__title { margin: 0; font-size: 24px; font-weight: 700; }
.card__sub { margin: 6px 0 0; font-size: 14px; color: var(--ink-3); }

.notice {
  margin: 18px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--warn);
  background: var(--warn-soft);
}

.form { margin-top: 24px; display: grid; gap: 18px; }

.field { display: grid; gap: 8px; }
.field__label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field__box {
  display: flex;
  align-items: center;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field__box:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgb(35 122 255 / 0.15);
}
.field__prefix {
  flex: none;
  padding: 0 12px 0 16px;
  font-size: 16px;
  color: var(--ink-2);
  border-right: 1px solid var(--line);
  line-height: 1.2;
}
.field__box input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.field__box input::placeholder { color: #9aa5bb; letter-spacing: 0; }

.field__btn {
  flex: none;
  margin-right: 6px;
  padding: 0 14px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: rgb(35 122 255 / 0.10);
  color: var(--brand-blue);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.field__btn:hover:not(:disabled) { background: rgb(35 122 255 / 0.16); }
.field__btn:disabled { color: var(--ink-3); background: var(--mist); cursor: default; }

.agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.agree input { flex: none; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--brand-blue); }
.agree a { white-space: nowrap; }
.agree--shake { animation: shake 0.4s; }
@keyframes shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.msg { margin: 0; min-height: 1.4em; font-size: 14px; }
.msg[data-kind="error"] { color: var(--bad); }
.msg[data-kind="ok"] { color: var(--ok); }

.btn-primary {
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--gradient-brand);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgb(77 78 216 / 0.30);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 34px rgb(77 78 216 / 0.36); }
.btn-primary:disabled { opacity: 0.65; cursor: default; }

.btn-ghost {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--brand-blue); color: var(--brand-blue); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--ink-3);
}
.foot a { color: var(--ink-3); }
.foot--center { padding: 32px 20px; }

/* ---------- 账号页 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 48px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar__logo { display: block; width: 120px; height: auto; }

.me { display: grid; justify-items: center; }
.me__hero {
  position: relative;
  width: 100%;
  padding: 44px 24px 96px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(50% 80% at 20% 0%, rgb(35 122 255 / 0.30), transparent 70%),
    radial-gradient(50% 80% at 85% 100%, rgb(130 57 230 / 0.30), transparent 70%),
    var(--abyss);
}
.me__hero .brand__eyebrow { margin-bottom: 8px; }
.me__title { margin: 0; font-size: clamp(24px, 3vw, 34px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.me .card { margin: -64px 20px 0; position: relative; }

.info { margin: 20px 0 0; display: grid; gap: 0; }
.info div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.info div:last-child { border-bottom: 0; }
.info dt { color: var(--ink-3); font-size: 14px; }
.info dd { margin: 0; font-weight: 600; font-size: 15px; text-align: right; word-break: break-all; }

/* ---------- 登录页、确认页：只有一张卡片（软件的标志 + 登录） ---------- */
.solo {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 16px 28px;
  background:
    radial-gradient(60% 45% at 50% 0%, rgb(35 122 255 / 0.10), transparent 70%),
    var(--mist);
}
.solo .card { margin-top: 0; }
.card__logo--app { width: 160px; }

/* 从软件进来的登录页：卡片左上方的“返回软件”（软件自己的窗口没有后退键）。
   点了回到软件自己的登录界面，照样要登录才能用；客户自己打开的登录页没有它 */
.solo__back { width: 100%; max-width: 420px; margin-bottom: -10px; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-left: -10px;
  padding: 4px 14px 4px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn-back::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: 3px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.btn-back:hover:not(:disabled) { color: var(--brand-blue); background: rgb(35 122 255 / 0.08); }
.btn-back:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.btn-back:disabled { opacity: 0.5; cursor: default; }

/* ---------- AceAI（新加坡版）：照 AceAI 色值表，深蓝 #0E142E、紫 #521EE5、页面白 #F7F8FC ---------- */
body[data-brand="aceai"] {
  --ink: #0e142e;
  --brand-navy: #0e142e;
  --brand-blue: #521ee5;
  --mist: #f7f8fc;
  --gradient-brand: linear-gradient(135deg, #521ee5 0%, #6a3df0 55%, #8b6cff 100%);
}
body[data-brand="aceai"] .solo { background: radial-gradient(60% 45% at 50% 0%, rgb(82 30 229 / 0.10), transparent 70%), #f7f8fc; }
body[data-brand="aceai"] .btn-primary { box-shadow: 0 12px 28px rgb(82 30 229 / 0.28); }
body[data-brand="aceai"] .btn-primary:hover:not(:disabled) { box-shadow: 0 16px 34px rgb(82 30 229 / 0.34); }
body[data-brand="aceai"] .field__box:focus-within { box-shadow: 0 0 0 3px rgb(82 30 229 / 0.14); }
body[data-brand="aceai"] .field__btn { background: rgb(82 30 229 / 0.08); }
body[data-brand="aceai"] .field__btn:hover:not(:disabled) { background: rgb(82 30 229 / 0.14); }
body[data-brand="aceai"] .who__icon { background: #0e142e url(apps/aceai-icon.png) center / cover; color: transparent; }
body[data-brand="aceai"] .btn-back:hover:not(:disabled) { background: rgb(82 30 229 / 0.08); }
.card__logo--aceai { width: 132px; }
/* 英文页：按钮字距收小（中文“登录”两个字才要拉开）；协议链接可以换行 */
html[lang="en"] .btn-primary { letter-spacing: 0.02em; }
html[lang="en"] .agree a { white-space: normal; }

/* ---------- 软件登录确认页 ---------- */
.app-name { color: var(--brand-navy); }
.who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--mist);
}
.who__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
}
.who__text { display: grid; gap: 2px; min-width: 0; }
.who__label { font-size: 12px; color: var(--ink-3); }
.who__phone { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }
.actions { display: grid; gap: 12px; margin-top: 22px; }
.actions .msg:empty { display: none; }
.actions__row { display: flex; justify-content: space-between; gap: 12px; }
.btn-link {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--brand-blue);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.btn-link--muted { color: var(--ink-3); }
.btn-link:hover:not(:disabled) { text-decoration: underline; }
.btn-link:disabled { opacity: 0.5; cursor: default; }
.fine { margin: 18px 0 0; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.spinner {
  width: 28px;
  height: 28px;
  margin: 22px 0 4px;
  border: 3px solid var(--line);
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 协议页 ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; }
.doc h1 { font-size: 26px; margin: 0 0 6px; }
.doc h2 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc li { font-size: 15px; color: var(--ink-2); }
.doc .draft {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 14px;
}

/* ---------- 手机 ---------- */
@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .brand { padding: 36px 24px 84px; align-items: flex-start; }
  .brand__title {
    font-size: clamp(24px, 7vw, 32px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  .brand__sub,
  .brand__points { display: none; }
  .brand__sail { width: 70%; height: 100%; right: -14%; }
  .panel { justify-content: flex-start; padding: 0 16px 28px; }
  .card { margin-top: -56px; position: relative; padding: 28px 22px 26px; }
  .card__logo { width: 128px; margin-bottom: 18px; }
  .card__title { font-size: 22px; }
}

@media (max-width: 359px) {
  .field__btn { padding: 0 10px; font-size: 13px; }
  .field__prefix { padding: 0 8px 0 12px; }
}
