/*
 * The leader's sign-in page, from the locked canvas's board 0.2: a dark panel
 * with the landing page's sun drawn in dots, and the door beside it.
 *
 * ⚠ A COPY OF THE CONSOLE'S COLOURS (admin-console/tokens.css). Everything
 * under /admin* is sent to sign in while signed out (Secrets.guardAdminPages),
 * so this page cannot load the console's stylesheet or fonts. Keep the two in
 * step. Geist lives under /admin-console too, so the sans here is the system's.
 */

:root {
  --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Newsreader, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

:root,
[data-theme="light"] {
  --bg: #f6f5f1;
  --line: #e3e0d9;
  --surface: #ffffff;
  --ink: #17181c;
  --muted: #5e6068;
  --accent: #3341e6;
  --accent-ink: #2a36c2;
  --btn: #17181c;
  --btn-ink: #f6f5f1;
  --bad: #9f2f22;
  --hover: rgba(23, 24, 28, 0.05);
  --shadow: 0 1px 2px rgba(23, 24, 28, 0.04), 0 10px 28px rgba(23, 24, 28, 0.07);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0d0e10;
  --line: #25272c;
  --surface: #16171a;
  --ink: #eceae5;
  --muted: #9a9ca3;
  --accent: #8089ff;
  --accent-ink: #aeb4ff;
  --btn: #eceae5;
  --btn-ink: #0d0e10;
  --bad: #f08b7e;
  --hover: rgba(255, 255, 255, 0.05);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 14px 36px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
}

a { color: var(--accent); }
a:hover { color: var(--accent-ink); }

/* ---- the panel: always night, whatever the theme ---- */

.face {
  flex: 1 1 560px;
  min-height: 520px;
  position: relative;
  overflow: hidden;
  background: #111215;
  color: #eceae5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 40px 44px;
}

.face canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.face > :not(canvas) { position: relative; z-index: 1; }

.wordmark {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c9c6bf;
}

.wordmark::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f09a5c; }

.poster { max-width: 440px; display: flex; flex-direction: column; gap: 12px; }

.poster p { margin: 0; }

.poster__line {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: #f4f1ea;
}

.poster__note { font-size: 14px; line-height: 1.55; color: #b7b4ad; }

/* ---- the door ---- */

.door {
  flex: 1 1 420px;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 48px;
}

.theme {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme:hover { background: var(--hover); }

.theme svg { width: 15px; height: 15px; }

[data-theme="light"] .theme .sun,
[data-theme="dark"] .theme .moon { display: none; }

.door__in { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 22px; }

.step { display: flex; flex-direction: column; gap: 22px; }

.eyebrow,
label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.head { display: flex; flex-direction: column; gap: 10px; }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.lede { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

form { display: flex; flex-direction: column; gap: 8px; }

input {
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  box-shadow: var(--shadow);
}

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

.code-field { font-family: var(--mono); font-size: 22px; letter-spacing: 0.28em; text-align: center; }

.hint { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.btn {
  margin-top: 14px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--btn);
  color: var(--btn-ink);
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
}

.btn:disabled { opacity: 0.6; cursor: default; }

.linkish { margin: 0; font-size: 13px; }

.linkish button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.foot {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.aside { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

.error { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--bad); }

/* A phone: the panel shrinks to a band above the door. */
@media (max-width: 760px) {
  .face { min-height: 280px; padding: 22px 24px 28px; }
  .poster__line { font-size: 24px; }
  .door { padding: 56px 16px 40px; }
}
