:root {
  --auth-bg: #f4f7fa;
  --auth-surface: #ffffff;
  --auth-line: #e3e9f0;
  --auth-text: #1f2a37;
  --auth-muted: #5b6b7b;
  --auth-faint: #8a99a8;
  --auth-primary: #33a6f0;
  --auth-primary-strong: #1483d8;
  --auth-primary-soft: #eaf6ff;
  --auth-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --auth-radius: 10px;
  --auth-error-bg: #fef3f2;
  --auth-error-text: #b42318;
  --auth-info-bg: #eaf6ff;
  --auth-info-text: #1483d8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--auth-text);
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.06), transparent 42%),
    var(--auth-bg);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 30px 16px;
}

.auth-brand {
  position: fixed;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--auth-text);
}

.auth-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-strong));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
}

.auth-card {
  width: min(440px, 100%);
  background: var(--auth-surface);
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  overflow: hidden;
}

.auth-panel {
  padding: 24px 24px 20px;
  display: grid;
  gap: 14px;
}

.auth-head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.auth-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--auth-muted);
}

.auth-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6faf9;
  border: 1px solid var(--auth-line);
  font-size: 12px;
  color: var(--auth-muted);
  line-height: 1.5;
}

.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--auth-text);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-faint);
  pointer-events: none;
}

.auth-input-wrap input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  padding: 0 12px 0 38px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-input-wrap input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px var(--auth-primary-soft);
}

.auth-otp-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.auth-otp-row .auth-input-wrap {
  flex: 1;
}

.auth-code-btn {
  flex-shrink: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--auth-primary-strong);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  white-space: nowrap;
}

.auth-code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-btn {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--auth-radius);
  background: var(--auth-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease;
}

.auth-btn:hover:not(:disabled) {
  background: var(--auth-primary-strong);
}

.auth-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.auth-btn-secondary {
  background: #fff;
  color: var(--auth-text);
  border: 1px solid var(--auth-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-btn-secondary:hover:not(:disabled) {
  background: var(--auth-primary-soft);
  border-color: var(--auth-primary);
}

.auth-btn-secondary.is-soon {
  opacity: 0.72;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--auth-faint);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-line);
}

.auth-feedback {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.auth-feedback.info {
  background: var(--auth-info-bg);
  color: var(--auth-info-text);
}

.auth-feedback.error {
  background: var(--auth-error-bg);
  color: var(--auth-error-text);
}

.auth-privacy {
  margin: 0;
  padding: 0 24px 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--auth-faint);
}

.auth-privacy svg {
  flex-shrink: 0;
}

.auth-footer {
  flex-shrink: 0;
  padding: 14px 16px;
  border-top: 1px solid var(--auth-line);
  background: #f0f4f5;
  text-align: center;
  font-size: 12px;
  color: var(--auth-muted);
}

@media (max-width: 640px) {
  .auth-brand {
    position: static;
    justify-content: center;
    margin-bottom: 8px;
  }

  .auth-main {
    place-items: start center;
    padding-top: 20px;
  }
}
