:root {
  color-scheme: light;
  --bg: #f4f4f5;
  --surface: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --text: #1f1f1f;
  --muted: #666;
  --accent: #0071e3;
  --danger: #bf4800;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

.auth-page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.auth-brand {
  margin-bottom: 20px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.auth-brand p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

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

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

.field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.field input:focus {
  outline: 2px solid rgba(0, 113, 227, 0.25);
  border-color: var(--accent);
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.btn-primary {
  background: #2c2c2c;
  color: #fff;
}

.btn-primary:hover { background: #1a1a1a; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-msg {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  display: none;
}

.auth-msg.error {
  display: block;
  background: #fff4f0;
  color: var(--danger);
}

.auth-msg.success {
  display: block;
  background: #f0faf0;
  color: #1b7f3b;
}

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

.auth-foot a {
  color: var(--accent);
  text-decoration: none;
}

.auth-foot a:hover { text-decoration: underline; }

.code-input {
  letter-spacing: 6px;
  font-size: 20px;
  text-align: center;
  font-weight: 600;
}
