:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --line: #e2e5ea;
  --text: #1b1f26;
  --muted: #6b7280;
  --accent: #3b6cf6;
  --accent-text: #ffffff;
  --err: #c0392b;
  --shadow: 0 12px 40px rgba(20, 30, 60, .10);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101318;
    --surface: #191e26;
    --line: #2b3340;
    --text: #e8ecf2;
    --muted: #98a2b3;
    --accent: #5b86ff;
    --accent-text: #0d1117;
    --err: #ff8a80;
    --shadow: 0 16px 48px rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.box {
  width: 100%;
  max-width: 372px;
  padding: 30px 30px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted);
  margin-bottom: 24px;
}
.mark {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent); color: var(--accent-text);
  font-size: 14px; font-weight: 800;
}
h1 { margin: 0 0 4px; font-size: 21px; font-weight: 650; letter-spacing: -.01em; }
.sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.err {
  margin: 0 0 14px; padding: 9px 11px;
  border: 1px solid var(--err); border-radius: 8px;
  color: var(--err); font-size: 13px;
}
form { display: grid; gap: 7px; }
label { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 7px; }
input[type=text], input[type=password] {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 14px; outline: none;
}
input[type=text]:focus, input[type=password]:focus { border-color: var(--accent); }
button {
  margin-top: 16px; height: 40px; width: 100%;
  border: 0; border-radius: 9px;
  background: var(--accent); color: var(--accent-text);
  font: inherit; font-weight: 650; cursor: pointer;
}
button:hover { filter: brightness(1.07); }
.hint { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
