/* ══════════════ 登录页 ══════════════ */
:root {
  --bg: #f5f6f8;
  --surface: #fff;
  --surface-2: #fafbfc;
  --surface-3: #f0f2f5;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #1c2024;
  --text-2: #5a6472;
  --text-3: #8a94a3;
  --accent: #3b6ef6;
  --accent-hover: #2f5ce0;
  --accent-soft: #eaf0ff;
  --danger: #e5484d;
  --ok: #2ba36a;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* 背景装饰 */
body::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(59, 110, 246, 0.13), transparent 60%),
    radial-gradient(760px 460px at 92% 108%, rgba(123, 92, 245, 0.12), transparent 62%);
  pointer-events: none;
}
body::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(28, 32, 36, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 32, 36, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 25%, transparent 78%);
  pointer-events: none;
}

.card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.05), 0 22px 60px rgba(16, 24, 40, 0.11);
  padding: 38px 34px 30px;
  position: relative;
  z-index: 1;
  animation: rise 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
}

.brand {
  text-align: center;
  margin-bottom: 26px;
}
.brand .logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 15px;
  background: linear-gradient(135deg, #3b6ef6, #7b5cf5);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(59, 110, 246, 0.32);
}
.brand h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 660;
  letter-spacing: 0.2px;
}
.brand p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

.step {
  display: none;
}
.step.on {
  display: block;
  animation: fade 0.25s;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
}

.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-2);
  margin-bottom: 7px;
}
.field .row {
  display: flex;
  gap: 8px;
}
input.phone {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: 10px;
  outline: none;
  font-size: 16px;
  letter-spacing: 0.6px;
  transition: all 0.16s;
}
input.phone:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(59, 110, 246, 0.16);
}
input.phone::placeholder {
  color: #b3bac4;
  letter-spacing: normal;
}

.btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 550;
  transition: all 0.16s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--text);
}
.btn:hover:not(:disabled) {
  background: var(--surface-3);
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn.primary {
  width: 100%;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 110, 246, 0.28);
}
.btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
  font-weight: 500;
}
.btn.ghost:hover {
  background: var(--surface-3);
}

/* 验证码六格 */
.code-row {
  display: flex;
  gap: 9px;
  justify-content: space-between;
}
.code-row input {
  width: 100%;
  height: 52px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  font-family: var(--mono);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: 10px;
  outline: none;
  transition: all 0.14s;
  padding: 0;
  color: var(--text);
}
.code-row input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(59, 110, 246, 0.16);
}
.code-row input.filled {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tip {
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.7;
}
.tip b {
  color: var(--text);
}
.tip a {
  cursor: pointer;
  color: var(--accent);
  text-decoration: none;
}
.tip a:hover {
  text-decoration: underline;
}

.dev-hint {
  margin-top: 16px;
  padding: 11px 14px;
  background: rgba(232, 147, 12, 0.09);
  border: 1px dashed rgba(232, 147, 12, 0.45);
  border-radius: 10px;
  font-size: 12.5px;
  color: #9a6400;
  text-align: center;
  line-height: 1.6;
}
.dev-hint b {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 2px;
  display: inline-block;
  margin-top: 3px;
}

.err {
  margin-top: 12px;
  padding: 9px 13px;
  background: rgba(229, 72, 77, 0.08);
  border: 1px solid rgba(229, 72, 77, 0.3);
  border-radius: 9px;
  font-size: 12.5px;
  color: #c22a2f;
  display: none;
  line-height: 1.6;
}
.err.show {
  display: block;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--text-3);
  font-size: 11.5px;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.foot {
  text-align: center;
  margin-top: 22px;
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.7;
}
.foot .lock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.foot svg {
  width: 12px;
  height: 12px;
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
