/* 登录页专用样式 —— 刻意独立，不引用 tokens.css / components.css 等主页资源。
   自带一套最小调色板，深浅色随系统自动切换。 */

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --line: #e4e8f0;
  --accent: #2f6bff;
  --accent-ink: #ffffff;
  --err: #d9362b;
  --err-bg: #fdecea;
  --shadow: 0 18px 48px rgba(20, 30, 60, 0.14);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1320;
    --card: #171c2b;
    --text: #e8ecf5;
    --muted: #97a0b5;
    --line: #2a3145;
    --accent: #4f86ff;
    --accent-ink: #0f1320;
    --err: #ff7a6e;
    --err-bg: #3a1d1b;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.login-page {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px
    max(16px, env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.login-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 12px;
  padding: 7px;
}

.login-title {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.login-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

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

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

.login-label {
  font-size: 13px;
  color: var(--muted);
}

.login-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.login-field input::placeholder { color: var(--muted); }

.login-err {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--err);
  background: var(--err-bg);
  border-radius: 10px;
}

.login-submit {
  height: 46px;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.15s, opacity 0.15s;
}

.login-submit:hover { filter: brightness(1.05); }
.login-submit:disabled { opacity: 0.6; cursor: default; }

.login-hint {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
