/* Sign-in gate for the private (employee) hosts. This is the ONLY page an unauthenticated visitor
   is ever sent (see server-private/index.js, "Sign-in gate"): no app code, no data. Kept tiny and
   dependency-free on purpose. Colours mirror the app's tokens (styles.css). */
:root {
  --bg: #f4f6f8; --surface: #fff; --text: #16232e; --dim: #5b6b78;
  --accent: #123c69; --border: #dde3e8; --danger: #b3261e; --ok: #1e7d47;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1720; --surface: #16232e; --text: #e7edf2; --dim: #93a2ae; --accent: #4f8fd0; --border: #26333f; --danger: #ff6b60; --ok: #5cc98a; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.gate {
  max-width: 400px; margin: 0 auto;
  padding: clamp(24px, 7vh, 72px) 16px calc(48px + env(safe-area-inset-bottom));
}
.brand { display: flex; flex-direction: column; gap: 2px; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 2px solid var(--border); }
.wordmark {
  font-family: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  font-size: 2.1rem; font-weight: 700; line-height: 1; letter-spacing: .01em; text-transform: uppercase;
}
.sub { font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
h1 { font-size: 1.4rem; margin: 0 0 4px; }
.help { color: var(--dim); font-size: .95rem; margin: 0 0 16px; }
form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--dim); }
input {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; min-height: 44px; width: 100%;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button {
  font: inherit; font-weight: 700; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; cursor: pointer; align-self: flex-start;
}
@media (prefers-color-scheme: dark) { button { color: #0e1720; } }
button:disabled { opacity: .6; cursor: default; }
.err { color: var(--danger); font-size: .92rem; margin: 0; }
.ok { color: var(--ok); }
.note { color: var(--dim); }
.links { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
a { color: var(--accent); }

.gate-legal { max-width: 420px; margin: 16px auto 24px; padding: 0 16px; text-align: center; font-size: 0.8rem; color: var(--dim); }
.gate-legal a { color: var(--accent); }
.map-link { display: inline-block; margin: -8px 0 16px; font-size: .92rem; font-weight: 600; }

/* Legal pages shown signed out (gate.js) */
.gate.legal-open { max-width: 720px; }
.legal-draft { margin: 0 0 12px; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--dim); font-size: .85rem; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.legal-tabs a { padding: 8px 12px; min-height: 44px; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: .88rem; }
.legal-tabs a[aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .legal-tabs a[aria-current="page"] { color: #0e1720; } }
.legal-updated { color: var(--dim); font-size: .85rem; margin: 0 0 12px; }
.legal-p { margin: 0 0 12px; }
.legal-bullet { padding-left: 14px; }
.gate h2 { font-size: 1.05rem; margin: 20px 0 6px; }
.legal-row { padding: 10px 0; border-top: 1px solid var(--border); font-size: .9rem; overflow-wrap: anywhere; }
.legal-meta { color: var(--dim); font-size: .82rem; margin-top: 2px; }

label.remember { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; margin: 4px 0 12px; }
label.remember input { width: auto; margin-top: 3px; }
