/*
 * Login page. Self-contained on purpose — app.css stays behind the gate
 * (_middleware.ts), so the palette tokens are repeated here rather than
 * imported. Four public files, and this is one of them.
 */

:root {
  /* PLAN.md §8. Light only, committed to deliberately: --bg is #ffffff, so
     letting a dark-mode browser half-invert it would show a palette nobody
     designed. */
  color-scheme: light;

  --red:   #d02528;
  --blue:  #27a0ed;
  --ink:   #111315;
  --ink-2: #3d4247;
  --ink-3: #8b9298;
  --line:  #e6e8ea;
  --bg:    #ffffff;
  --bg-2:  #fafbfc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-2);
  color: var(--ink-2);
  /* System stack, no web font: one less origin to allow in the CSP and no
     flash of unstyled text. */
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: 1rem;
}

.card {
  width: 100%;
  max-width: 22rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem;
  /* The one shadow in the project. It lifts the only thing on the page. */
  box-shadow: 0 1px 2px rgba(17, 19, 21, .04), 0 8px 24px rgba(17, 19, 21, .06);
}

h1 {
  margin: 0 0 .2rem;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  /* --ink, not --red. Red is reserved for critical states so that a red badge
     still means something — PLAN.md §8. */
  color: var(--ink);
}

.sub {
  margin: 0 0 1.4rem;
  font-size: .85rem;
  color: var(--ink-3);
}

label {
  display: block;
  margin-bottom: .35rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .04em;
}

input {
  width: 100%;
  margin-bottom: 1rem;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

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

button {
  width: 100%;
  padding: .65rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) { background: #b81f22; }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button:disabled { opacity: .6; cursor: progress; }

.err {
  margin: 0 0 1rem;
  padding: .6rem .7rem;
  border: 1px solid var(--red);
  border-radius: 8px;
  background: #fdf3f3;
  color: #8f1a1c;   /* darkened for contrast on the tint, not the raw --red */
  font-size: .85rem;
}

.foot {
  margin: 0;
  max-width: 22rem;
  font-size: .75rem;
  color: var(--ink-3);
  text-align: center;
}

[hidden] { display: none !important; }
