/* ChengID browser pages. One stylesheet, no framework: these pages exist so
   other products can sign a person in, not to be a design system. */

:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #5b6472;
  --line: #dfe3e8;
  --accent: #2f6feb;
  --accent-ink: #ffffff;
  --danger: #b3261e;
  --ok: #1a7f37;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a;
    --card: #1a1d24;
    --ink: #e8eaed;
    --muted: #9aa4b2;
    --line: #2b303a;
    --accent: #5b8df6;
    --accent-ink: #0d1117;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

.card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
}

h1 { margin: 0 0 4px; font-size: 20px; }
.subtitle { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--muted); }

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
}

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

.button {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:disabled { opacity: 0.6; cursor: default; }

.button--secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
  margin-top: 8px;
}

.divider {
  margin: 20px 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.status--error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.status--ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.status--info { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }

.footnote { margin-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.footnote a { color: var(--accent); }

.scopes { margin: 16px 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.scopes li { margin: 4px 0; }

.actions { display: flex; gap: 10px; }
.actions .button { margin-top: 16px; }
