/* GitHub 登录结构 + Noto Sans SC 统一中英字重 */
:root {
  --bg: #0d1117;
  --card: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #9198a1;
  --link: #4493f8;
  --green: #238636;
  --green-hover: #2ea043;
  --danger: #f85149;
  --ok: #3fb950;
  --warn: #d29922;
  --focus: #1f6feb;
  --font: "Noto Sans SC", "Segoe UI", "PingFang SC", "Microsoft YaHei UI",
    sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
}

.back {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
}
.back:hover { color: var(--link); }

.page {
  width: min(340px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 48px;
  text-align: center;
}

.logo-link { display: inline-block; margin-bottom: 22px; }
.logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* 不用 300 细体：中文一细就发虚、发廉价 */
h1 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1.25;
}

.auth-card {
  text-align: left;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
}

.card-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}

.form {
  display: grid;
  gap: 14px;
}

.section-title {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

input {
  width: 100%;
  padding: 5px 12px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.1s, box-shadow 0.1s;
}
input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.3);
}

.btn-primary {
  width: 100%;
  margin-top: 2px;
  min-height: 32px;
  padding: 5px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-primary:hover { background: var(--green-hover); }

.auth-footer {
  margin-top: 16px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.text-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--link);
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  cursor: pointer;
}
.text-link:hover { text-decoration: underline; }

.footnote {
  margin: 18px 4px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

.hello {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 400;
}
.meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost:hover {
  background: #21262d;
  border-color: #8b949e;
}

.msg {
  min-height: 1.2em;
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.msg.ok { color: var(--ok); }
.msg.err { color: var(--danger); }
.msg.warn { color: var(--warn); }

.hidden { display: none !important; }
