:root {
  --navy: #0b2545;
  --navy-2: #1b4f8a;
  --bg: #f4f6fb;
  --card: #ffffff;
  --line: #e4e9f0;
  --ink: #1a1a1a;
  --muted: #4a5568;
  --weak: #94a3b8;
  --danger: #b3261e;
  --radius: 10px;
  --shadow: 0 10px 40px rgba(11, 37, 69, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

button, input { font-family: inherit; font-size: 15px; }

.hidden { display: none !important; }

/* 登录页：垂直+水平居中的卡片。修复此前 /styles.css 缺失导致的裸表单。 */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #0b2545 0%, #1b4f8a 100%);
}

.auth-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

img.brand-mark {
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 8px 18px rgba(11, 35, 61, 0.18));
}

.auth-brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .5px;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field span {
  font-size: 13px;
  color: var(--muted);
}

.field input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus {
  border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(27, 79, 138, 0.14);
}

.btn {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s, opacity .15s;
}

.btn.primary {
  height: 46px;
  background: var(--navy);
  color: #fff;
}

.btn.primary:hover { background: var(--navy-2); }
.btn.primary:disabled { opacity: .55; cursor: default; }

.auth-submit { width: 100%; }

.auth-resend {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--navy-2);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.link-btn:disabled { color: var(--weak); cursor: default; }

.auth-error {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fdecea;
  color: var(--danger);
  font-size: 13px;
}

.auth-dev {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff8e6;
  color: #b26a00;
  font-size: 13px;
}

/* 触控优先：手机端全宽、按钮足够高 */
@media (max-width: 480px) {
  .auth-page { padding: 16px; align-items: flex-start; padding-top: 8vh; }
  .auth-card { padding: 24px 20px; }
  .field input, .btn.primary { height: 48px; }
}
