:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #6b7280;
  --border: #e2e5ea;
  --accent: #2f6f4f;
  --error: #b3261e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1c1f25;
    --text: #e8eaed;
    --muted: #9aa1ab;
    --border: #2c313a;
    --accent: #6fcf97;
    --error: #f2b8b5;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.center {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.page { max-width: 48rem; margin: 0 auto; padding: 1.5rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
}

.login { width: min(22rem, 100%); }
.login h1 { margin: 0 0 1.25rem; font-size: 1.25rem; font-weight: 600; }

.field {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.field:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

button:hover { filter: brightness(1.07); }

.hint { margin: 0.9rem 0 0; font-size: 0.8125rem; color: var(--muted); }

.error {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--error);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 600; }

button.link {
  width: auto;
  margin: 0;
  padding: 0;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--muted);
  background: none;
}
