/* login.css — 登录页独立样式（不依赖 style.css，未登录时只有本文件可访问） */
:root {
  color-scheme: dark;
  --bg: #151617;
  --bg-elev: #1b1d1f;
  --surface: #202224;
  --border: #2c2f33;
  --border-strong: #3b3f44;
  --text: #eceef0;
  --text-2: #a7adb5;
  --text-3: #6d737c;
  --accent: #4d6bfe;
  --accent-hover: #607dff;
  --danger: #f05b5b;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  display: grid;
  place-items: center;
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(77, 107, 254, .16), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 24px;
}

[hidden] { display: none !important; }

.login-wrap { width: 100%; display: grid; place-items: center; }

.login-card {
  width: 100%;
  max-width: 372px;
  padding: 26px 26px 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(32, 34, 36, .96), rgba(27, 29, 31, .96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 10px; flex: 0 0 30px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, #4d6bfe, #8a5cff);
  box-shadow: 0 6px 20px rgba(77, 107, 254, .25);
}
.brand-text { line-height: 1.25; }
.brand-text b { display: block; font-size: 14px; font-weight: 600; }
.brand-text span { display: block; font-size: 10.5px; color: var(--text-3); }

.title { font-size: 19px; font-weight: 600; letter-spacing: .01em; }
.sub { margin-top: 4px; font-size: 12.5px; color: var(--text-2); }

.field { display: block; margin-top: 20px; }
.field-label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--text-2); }

.input-wrap { position: relative; display: block; }
.input {
  width: 100%; height: 40px; padding: 0 58px 0 12px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); outline: none;
  font: inherit; font-size: 13.5px;
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: var(--border-strong); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77, 107, 254, .18); }

.eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  height: 28px; padding: 0 9px; border-radius: 7px;
  border: none; background: none; color: var(--text-3);
  font: inherit; font-size: 11.5px; cursor: pointer;
}
.eye:hover { background: var(--surface); color: var(--text-2); }

.err {
  min-height: 20px; margin-top: 8px;
  font-size: 12px; color: var(--danger);
}

.submit {
  width: 100%; height: 40px; margin-top: 6px;
  border: none; border-radius: 10px;
  background: var(--accent); color: #fff;
  font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  transition: background .12s, opacity .12s;
}
.submit:hover:not(:disabled) { background: var(--accent-hover); }
.submit:disabled { background: var(--surface); color: var(--text-3); cursor: not-allowed; }
.submit:focus-visible { outline: 2px solid rgba(77, 107, 254, .55); outline-offset: 2px; }

.foot { margin-top: 16px; text-align: center; font-size: 10.5px; color: var(--text-3); }

@media (max-width: 480px) {
  body { padding: 16px; }
  .login-card { padding: 22px 18px 18px; border-radius: 16px; }
}
