/* style.css — shared styles for the auth web pages (login/register/account).
   Self-contained: no external fonts or CDNs. Theme-aware via
   prefers-color-scheme. Served same-origin by FastAPI's static mount. */

:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #5b6470;
  --border: #d9dee5;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --error: #b3261e;
  --ok: #1a7f37;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --card: #1e2329;
    --text: #e8eaed;
    --muted: #9aa4b0;
    --border: #343b44;
    --accent: #4c8dff;
    --accent-text: #0b1220;
    --error: #ff6b61;
    --ok: #4cc38a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

main.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  width: 100%;
  max-width: 24rem;
  margin-top: 10vh;
}

h1 {
  font-size: 1.3rem;
  margin: 0 0 0.25rem;
}

p.sub {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

label {
  display: block;
  font-size: 0.85rem;
  margin: 0.9rem 0 0.3rem;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}

button {
  width: 100%;
  margin-top: 1.3rem;
  padding: 0.6rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: wait; }

button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  font-weight: 500;
}

.msg {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.msg.error { color: var(--error); }
.msg.ok { color: var(--ok); }

.links {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  text-align: center;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Account page */
dl.profile { margin: 0 0 0.5rem; }
dl.profile dt { color: var(--muted); font-size: 0.8rem; margin-top: 0.8rem; }
dl.profile dd { margin: 0.1rem 0 0; font-size: 1rem; overflow-wrap: anywhere; }

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--error) 15%, transparent); color: var(--error); }

hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
