/* Login page v2: always dark. Near-black field, the mycelium network glowing behind, a large rounded card with a thin
   border and a light edge, uppercase letter-spaced monospace labels, mint accents (proportions follow the
   BotCommander workspace UI). Self-contained; no light variant and no theme toggle on this page. */
:root {
  color-scheme: dark;
  --bg: #05070d; --card: #0a0f1a; --line: rgba(255, 255, 255, .10); --line-2: rgba(255, 255, 255, .18);
  --text: #f1f5f9; --text-2: #aab6c8; --text-3: #6f7d93; --mint: #2dd4af; --blue: #4bc9ff;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --head: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body.login { margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px;
  font-family: var(--font); color: var(--text); line-height: 1.5; position: relative; overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 50% 46%, rgba(45, 212, 175, .07), transparent 70%),
    radial-gradient(700px 420px at 88% 0%, rgba(75, 107, 255, .16), transparent 70%),
    radial-gradient(600px 380px at 8% 100%, rgba(75, 201, 255, .08), transparent 70%), var(--bg); }
/* delicate mycelium: many hair-thin hyphae, light and semi-transparent, no glow */
body.login::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .30;
  background: url("/static/login-hyphae.svg") center / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 50%, #000 25%, transparent 92%); mask-image: radial-gradient(ellipse 80% 75% at 50% 50%, #000 25%, transparent 92%); }
.lg-wrap { position: relative; z-index: 1; width: 100%; max-width: 560px; }
.lg-card { position: relative; padding: 52px 56px 48px; border-radius: 28px; background: linear-gradient(180deg, rgba(16, 23, 38, .86), rgba(8, 12, 21, .92));
  border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .02) inset, 0 1px 0 rgba(255, 255, 255, .14) inset, 0 40px 120px rgba(0, 0, 0, .65), 0 0 90px rgba(45, 212, 175, .10); }
/* light catching the top edge of the card */
.lg-card::before { content: ""; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 175, .9), rgba(75, 201, 255, .9), transparent); }
.lg-logo { display: flex; justify-content: flex-start; margin-bottom: 14px; }
.lg-logo img { height: 44px; width: auto; display: block; filter: drop-shadow(0 0 22px rgba(45, 212, 175, .35)); }
.lg-title { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin: 0 0 30px; font-family: var(--mono); font-size: .8rem; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase; color: var(--text-2); }
.lg-title::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.lg-form { display: grid; gap: 24px; }
.lg-field { display: grid; gap: 10px; font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); }
.lg-field input { width: 100%; height: 56px; padding: 0 18px; font-family: var(--font); font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text);
  background: rgba(3, 6, 12, .75); border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s ease, box-shadow .2s ease; }
.lg-field input:hover { border-color: var(--line-2); }
.lg-field input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(45, 212, 175, .16), 0 0 28px rgba(45, 212, 175, .12); }
.lg-btn { margin-top: 6px; width: 100%; height: 56px; cursor: pointer; font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #04201c;
  border: 0; border-radius: 16px; background: linear-gradient(90deg, var(--mint), var(--blue)); box-shadow: 0 0 40px rgba(45, 212, 175, .25);
  transition: filter .2s ease, box-shadow .2s ease, transform .1s ease; }
.lg-btn:hover { filter: brightness(1.08); box-shadow: 0 0 60px rgba(45, 212, 175, .42); }
.lg-btn:active { transform: scale(.985); }
.lg-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.lg-error { margin: 0; font-size: .8rem; line-height: 1.4; color: #f97066; }
.lg-msg { font-family: var(--font); font-size: .78rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: #f97066; }
.lg-msg[hidden] { display: none; }
.lg-field { gap: 8px; }
.lg-field input.lg-bad { border-color: rgba(249, 112, 102, .6); }
@media (max-width: 560px) { .lg-card { padding: 36px 24px 32px; border-radius: 22px; } .lg-logo img { height: 36px; } }
/* second step (2FA code) */
.lg-lead { margin: -14px 0 28px; font-size: .9375rem; line-height: 1.5; color: var(--text-2); }
.lg-field input.lg-code { font-family: var(--mono); font-size: 1.25rem; letter-spacing: .3em; text-align: center; }
.lg-back { justify-self: center; font-family: var(--mono); font-size: .6875rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); text-decoration: none; }
.lg-back:hover { color: var(--mint); }
