:root {
  --bg: #fafafa;
  --fg: #111;
  --muted: #666;
  --line: #e5e5e5;
  --accent: #111;
  --error: #b91c1c;
  --ok: #047857;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* login 页面有独立的左右分栏布局，不需要 body 级居中 */
body:has(.page) {
  display: block;
  padding: 0;
}

/* ── Split layout ── */
.page {
  display: flex;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.left-panel {
  flex: 0 0 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.right-panel {
  flex: 0 0 50%;
  min-width: 0;
  background: url('/auth/images/bg.webp') no-repeat 90% 10% / cover;
  border-left: 1px solid #E8E8E8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Logo ── */
.logo {
  position: absolute;
  top: 32px;
  left: 32px;
  height: 48px;
}

/* ── Card ── */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
}

.title {
  margin: 0 0 24px;
  font-size: 25px;
  text-align: center;
}

h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

.sub {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 15px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin: 12px 0 6px;
}

input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  background: white;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

button {
  width: 100%;
  padding: 11px 16px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 20px;
}

button:hover { opacity: 0.9; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

button.secondary {
  background: white;
  color: var(--fg);
  border: 1px solid var(--line);
}

/* ── Social buttons ── */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

button.google-btn {
  background: #000000 !important;
  color: #ffffff;
  border-color: #000000 !important;
}

.google-btn:hover {
  opacity: 0.85;
}

button.github-btn {
  background: #E5E3DF !important;
  color: #000000;
  border-color: #E5E3DF !important;
}

.github-btn:hover {
  opacity: 0.85;
}

/* ── Terms ── */
.terms {
  margin-top: 50px;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.terms a {
  color: var(--fg);
  text-decoration: underline;
}

/* ── Dividers & misc ── */
.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--muted);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.divider::before { margin-right: 12px; }
.divider::after { margin-left: 12px; }

.turnstile-slot {
  margin: 16px 0;
  min-height: 65px;
}

/* ── Messages ── */
.msg {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  display: none;
}
.msg.error { background: #fef2f2; color: var(--error); display: block; }
.msg.ok { background: #ecfdf5; color: var(--ok); display: block; }

/* ── Links ── */
.links {
  margin-top: 24px;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}
.links a { color: var(--fg); }

/* ── OTP ── */
.otp-input {
  text-align: center;
  font-size: 24px;
  letter-spacing: 8px;
  font-variant-numeric: tabular-nums;
}

/* ── Verify button ── */
.btn-verify {
  background: #3272D5;
}

/* ── Right panel line images ── */
.lines-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 70vh;
  overflow: hidden;
}

.line-img {
  flex: 1 1 0;
  min-height: 0;
  object-fit: contain;
}
