/* Uses the project palette from variables.css. Don't redefine --color-*
   tokens here — the palette lives in that one file. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-ui, 'Satoshi', system-ui, sans-serif);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 12px);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

h1 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 600;
}

h2 {
  margin: 32px 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

label {
  display: block;
  margin-bottom: 16px;
}

label span {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--color-text-muted);
}

input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: var(--radius-sm, 8px);
  font-family: inherit;
  font-size: 14px;
}

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

small {
  display: block;
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 12px;
}

button {
  width: 100%;
  padding: 10px 16px;
  background: var(--color-primary);
  color: var(--color-on-primary, white);
  border: none;
  border-radius: var(--radius-sm, 8px);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--color-primary-hover, var(--color-primary));
  filter: brightness(1.05);
}

/* De loginpagina is sinds 16 augustus 2026 één knop naar Virtuagym, en die knop
   is een link (een gewone navigatie, geen fetch). Ziet eruit als `button`. */
.btn-link {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: var(--color-primary);
  color: var(--color-on-primary, white);
  border-radius: var(--radius-sm, 8px);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.btn-link:hover {
  filter: brightness(1.05);
}

.lead {
  margin: -8px 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* `wacht()` (public/shared/knop.mjs) zet hier zelf een span.ui-spinner in de
   knop en het label "Bezig…", op login en beheer net zo goed als overal
   elders. Alleen: deze twee schermen laden app.css niet (ze zijn de smalle
   inlogkaart, geen app-shell), en daar staat de opmaak van .ui-spinner. Zonder
   deze regels zou de knop wel "Bezig…" tonen maar zonder draaiend schijfje —
   vandaar hetzelfde stukje hier, niet een nieuwe variant. */
.ui-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .ui-spinner { animation: none; }
}

button[aria-busy="true"],
.btn-link[aria-busy="true"] { cursor: progress; }

button.ghost {
  width: auto;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.msg {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
}

.msg.ok {
  background: var(--color-accent-20, rgba(138, 162, 109, 0.15));
  color: var(--color-accent);
}

.msg.error, .error {
  background: var(--color-error-bg, var(--color-primary-20, rgba(207, 94, 63, 0.12)));
  color: var(--color-error, var(--color-primary));
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
}

.muted {
  margin-top: 24px;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

code {
  font-family: var(--font-code, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 12px;
  background: var(--color-bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

section { margin-top: 8px; }
