/* Sign-in page on the .system tokens (CLAUDE.md, design/mockups/Login.dc.html). */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/shared/fonts/jetbrains-mono-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/shared/fonts/jetbrains-mono-cyrillic-wght.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #000;
  --panel: #0a0a0a;
  --bar: #101010;
  --line: #262626;
  --line-strong: #3a3a3a;
  --text: #e8e8e8;
  --muted: #8a8a8a;
  --faint: #5c5c5c;
  --down: #ef5350;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--mono); }
button, input { font-family: var(--mono); }
[hidden] { display: none !important; }

.auth-page { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; }

.auth-card { position: relative; z-index: 1; width: 300px; max-width: 100%; border: 1px solid var(--line-strong); background: var(--panel); }
.auth-bar { display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--bar); }
.auth-bar h1 { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.language { height: 18px; padding: 0 6px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--muted); font-size: 9px; font-weight: 600; cursor: pointer; }
.language:hover { color: var(--text); }

.auth-body { padding: 12px 10px 10px; }
.mode-switch { display: flex; margin-bottom: 12px; border: 1px solid var(--line-strong); }
.mode-switch button { flex: 1; height: 22px; border: 0; background: transparent; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.mode-switch button:hover { color: var(--text); }
.mode-switch button.active { background: var(--text); color: #000; }

form { display: flex; flex-direction: column; gap: 8px; }
label { display: flex; flex-direction: column; gap: 3px; }
label > span { font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
input { width: 100%; height: 26px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--bg); color: var(--text); font-size: 10.5px; outline: none; }
input:focus { border-color: var(--muted); }
input::placeholder { color: var(--faint); }
input.code { letter-spacing: .25em; }

.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.link-button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 9px; text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--text); }
.submit { height: 24px; margin-left: auto; padding: 0 14px; border: 0; background: var(--text); color: #000; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.submit:hover { background: #fff; }
.submit:disabled { opacity: .5; cursor: default; }
.auth-status { min-height: 12px; margin: 0; font-size: 9px; line-height: 1.4; color: var(--muted); }
.auth-status.error { color: var(--down); }

/* ASCII butterfly and the sprig it lands on (animated by butterfly.js, positioned from the centre). */
.sprig, .butterfly { position: absolute; left: 50%; top: 50%; margin: 0; white-space: pre; pointer-events: none; font-family: var(--mono); }
.sprig { font-size: 6px; line-height: 6px; color: var(--faint); }
.butterfly { font-size: 4.6px; line-height: 4.6px; color: var(--text); }

.system-state { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

@media (prefers-reduced-motion: reduce) { .butterfly { transition: none; } }
@media (max-height: 560px) { .sprig, .butterfly { display: none; } }
