/* ============================================================
   笔迹 — 登录 / 注册 / 安装
   ============================================================ */

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 700px at 8% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(255, 122, 92, 0.07), transparent 55%),
    var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* 淡淡的墨色纸纹：几笔极浅的手写笔触铺在整页下面，
   和全站纸张纹理叠在一起，登录页像一张刚写过字的纸 */
.auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cg fill='none' stroke='%233a3630' stroke-linecap='round'%3E%3Cpath d='M36 72c40-22 84-26 128-8' stroke-width='12' opacity='.05'/%3E%3Cpath d='M24 190c56-10 104-6 150 8' stroke-width='8' opacity='.04'/%3E%3Cpath d='M56 250c48-14 92-16 136-6' stroke-width='14' opacity='.04'/%3E%3Cpath d='M210 150c30 8 56 22 78 42' stroke-width='6' opacity='.04'/%3E%3Cpath d='M120 30c26 6 46 18 60 36' stroke-width='5' opacity='.035'/%3E%3C/g%3E%3Ccircle cx='300' cy='86' r='24' fill='%233a3630' opacity='.035'/%3E%3Ccircle cx='70' cy='300' r='14' fill='%233a3630' opacity='.03'/%3E%3C/svg%3E");
  background-size: 360px 360px;
}

[data-theme="dark"] .auth-body::before {
  filter: invert(1);
  opacity: 0.4;
}

.auth-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px 40px;
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.1fr);
  width: min(1160px, 100%);
  min-height: min(760px, calc(100vh - var(--nav-h) - 68px));
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: authShellIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-shell.is-single {
  grid-template-columns: 1fr;
  width: min(520px, 100%);
  min-height: auto;
}

@keyframes authShellIn {
  from { opacity: 0; transform: translateY(16px) scale(0.994); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 品牌侧 ---------- */
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 46px 44px;
  color: #fff;
  background:
    radial-gradient(700px 520px at 100% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    radial-gradient(600px 500px at 0% 100%, rgba(255, 122, 92, 0.2), transparent 55%),
    linear-gradient(150deg, #5d4ce4 0%, #4435c2 52%, #2f2596 100%);
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -170px;
  bottom: -190px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.035), 0 0 0 150px rgba(255, 255, 255, 0.025);
}

.auth-brand::after {
  content: "b";
  position: absolute;
  right: -30px;
  bottom: -120px;
  font-family: var(--font-ui);
  font-size: 430px;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.045);
  letter-spacing: -0.06em;
  pointer-events: none;
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  padding-top: 10px;
}

/* 安装向导没有顶部导航条，品牌仍留在左侧色块里 */
.install-body .auth-brand .brand-lockup {
  position: relative;
  z-index: 1;
  align-self: flex-start;
}

.install-body .auth-brand .brand-mark {
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.install-body .auth-brand .brand-word b {
  color: #fff;
}

.install-body .auth-brand .brand-word em {
  color: rgba(255, 255, 255, 0.55);
}

.install-body .auth-brand-copy {
  margin-top: auto;
  padding-top: 60px;
}

.install-body .auth-quote {
  margin-top: 40px;
}

.auth-brand .eyebrow {
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.22em;
}

.auth-brand-copy h2 {
  margin: 0 0 20px;
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-brand-copy p:last-child {
  margin: 0;
  max-width: 360px;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.72);
}

.auth-features {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.82);
}

.auth-features span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.08em;
}

.auth-quote {
  position: relative;
  z-index: 1;
  margin: auto 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.66);
}

.quote-mark {
  display: block;
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 0.6;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 8px;
}

.auth-brand-foot {
  position: relative;
  z-index: 1;
  margin: 26px 0 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- 表单侧 ---------- */
.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(36px, 5.2vw, 78px);
  background: var(--surface);
  overflow-y: auto;
}

.auth-panel > * {
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
}

.auth-logo {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  font-size: 17px;
  font-weight: 700;
}

.auth-logo img {
  border-radius: 11px;
}

.auth-logo span {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.auth-logo em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: 4px;
}

.auth-heading {
  margin-bottom: 28px;
  animation: fadeUp 0.5s 0.08s both;
}

.auth-heading h1,
.install-panel h1 {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.auth-heading .eyebrow {
  margin-bottom: 10px;
}

.auth-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.auth-form {
  animation: fadeUp 0.5s 0.14s both;
}

.auth-form .btn-block {
  margin-top: 6px;
}

.auth-switch {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.auth-switch a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent);
}

.auth-fineprint {
  margin: 28px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--faint);
}

.checkline-agree {
  margin: 4px 0 18px;
  line-height: 1.7;
}

/* 蜜罐：真人看不见也点不到，脚本填了就被拦下 */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 26px;
}

/* ---------- 安装页 ---------- */
.install-body {
  align-items: flex-start;
  padding: 24px;
}

.install-panel {
  justify-content: flex-start;
  padding-top: 44px;
  padding-bottom: 50px;
}

.install-panel > * {
  max-width: 500px;
}

.install-checks {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 16px 18px;
  margin-bottom: 26px;
}

.install-checks h3,
.install-form h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.install-checks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.install-checks li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.check-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 9.5px;
  font-weight: 700;
  flex: none;
}

.is-ok .check-icon {
  background: var(--ok-soft);
  color: var(--ok);
}

.is-warn .check-icon {
  background: rgba(209, 138, 53, 0.14);
  color: #b97c26;
}

.check-label {
  font-weight: 500;
}

.check-note {
  margin-left: auto;
  font-size: 11px;
  color: var(--faint);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42%;
}

.install-form {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.install-form h3 {
  margin: 18px 0 10px;
}

.install-form h3:first-of-type {
  margin-top: 0;
}

.driver-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.driver-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.driver-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.driver-card.is-active {
  border-color: color-mix(in srgb, var(--accent) 62%, transparent);
  background: var(--accent-softer);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 9%, transparent);
}

.driver-name {
  font-size: 14px;
  font-weight: 650;
}

.driver-note {
  font-size: 11.5px;
  color: var(--muted);
}

.install-form .field {
  margin-bottom: 13px;
}

.install-form .btn-block {
  margin-top: 20px;
}

.form-foot {
  margin: 12px 0 0;
  font-size: 11.5px;
  color: var(--faint);
  text-align: center;
  line-height: 1.7;
}

.callout {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-softer);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.callout code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.install-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 24px;
  margin-bottom: 20px;
}

.install-success h1 {
  margin-bottom: 10px;
}

.install-next {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.install-next:first-of-type {
  margin-top: 24px;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  flex: none;
  margin-top: 1px;
}

.install-next strong {
  display: block;
  font-size: 13.5px;
}

.install-next p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.install-success .auth-actions {
  margin-top: 30px;
}

.install-panel code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-3);
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
    width: min(560px, 100%);
    min-height: auto;
  }

  .auth-brand {
    display: none;
  }

  .auth-logo {
    display: flex;
  }

  .auth-panel {
    padding: 40px clamp(24px, 6vw, 48px) 44px;
    justify-content: flex-start;
  }

  .auth-heading h1,
  .install-panel h1 {
    font-size: 27px;
  }

  .install-body {
    align-items: center;
  }
}

@media (max-width: 560px) {
  .auth-stage {
    padding: 0;
  }

  .auth-shell {
    border-radius: 0;
    border: 0;
    min-height: calc(100vh - var(--nav-h));
  }

  .auth-panel {
    padding: 30px 22px 40px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-row > .field-sm {
    flex: 1;
  }

  .driver-switch {
    grid-template-columns: 1fr;
  }

  .install-body {
    padding: 0;
  }

  .check-note {
    display: none;
  }
}

/* ---------- 手机号登录 / 验证码 / 图形码 ---------- */
.cap-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cap-row input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.3em;
  text-align: center;
}

.cap-row input::placeholder {
  letter-spacing: 0.12em;
}

.cap-img {
  flex: 0 0 auto;
  width: 132px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f2ec;
  cursor: pointer;
  user-select: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.cap-img:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  box-shadow: var(--shadow-sm);
}

.cap-img:active {
  transform: scale(0.985);
}

.cap-tip {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--faint);
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.code-row input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
}

.btn-code {
  flex: 0 0 auto;
  min-width: 116px;
  padding: 0 14px;
  font-size: 12.5px;
  border-radius: 11px;
  --btn-bg: var(--accent-soft);
  --btn-ink: var(--accent-strong);
  --btn-border: color-mix(in srgb, var(--accent) 14%, transparent);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.btn-code:hover:not(:disabled) {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.btn-code:disabled,
.btn-code.is-wait {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.btn-code.is-flash {
  --btn-bg: var(--danger-soft);
  --btn-ink: var(--danger);
  --btn-border: color-mix(in srgb, var(--danger) 26%, transparent);
}

.alert-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: color-mix(in srgb, var(--coral) 12%, var(--surface));
  color: var(--ink-2);
  border: 1px solid color-mix(in srgb, var(--coral) 34%, transparent);
}

.alert-notice::before {
  content: "①";
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--coral);
}

.alert-ok {
  background: var(--ok-soft);
  color: color-mix(in srgb, var(--ok) 78%, var(--ink) 22%);
  border: 1px solid color-mix(in srgb, var(--ok) 26%, transparent);
}

.sms-hint {
  margin: -8px 0 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--faint);
}

@media (max-width: 560px) {
  .code-row {
    flex-wrap: wrap;
  }

  .btn-code {
    flex: 1 1 100%;
    min-width: 0;
    padding: 10px 14px;
  }

  .cap-img {
    width: 118px;
  }
}

