/* The login page is served to callers who have not authenticated yet, so it
   is kept apart from the application's own stylesheet: nothing here may
   describe, name or hint at the inventory behind it. Same-origin only — no
   external stylesheet, font or url() to a third-party host. */

:root {
  color-scheme: light dark;
  --fg: #1b1f23;
  --bg: #ffffff;
  --muted: #5b6570;
  --border: #d0d7de;
  --error: #cf222e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6edf3;
    --bg: #0d1117;
    --muted: #9198a1;
    --border: #30363d;
  }
}

* {
  box-sizing: border-box;
}

.login-body {
  margin: 0;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--fg);
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 22rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem;
}

.login-title {
  margin: 0;
  font-size: 1.5rem;
}

.login-subtitle {
  margin: 0.25rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.login-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.login-input {
  font: inherit;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
}

.login-submit {
  font: inherit;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
}

.login-submit:hover {
  border-color: var(--fg);
}

.login-submit[disabled] {
  cursor: progress;
  color: var(--muted);
}

.login-input:focus-visible,
.login-submit:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.login-status {
  margin: 0.75rem 0 0;
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* State is never carried by colour alone: the status line always holds a
   readable sentence, and this rule only emphasises it. */
.login-status.is-error {
  color: var(--error);
}

@media (max-width: 30rem) {
  .login-body {
    padding: 0.5rem;
  }
}
