:root {
  --bg: #050914;
  --surface: #0c111d;
  --ink: #f7f9fc;
  --muted: #8e99aa;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #2d6bff;
  --accent-2: #1d52d6;
  --danger: #ff5d57;
  --radius: 12px;
  --radius-sm: 8px;
  --font-text: 'DM Sans', system-ui, sans-serif;
  --font-display: 'DM Sans', system-ui, sans-serif;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

html,
body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
}

body { overflow-x: hidden; }
.auth-glyph-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.auth-page,
.auth-lang { position: relative; z-index: 2; }
.auth-page { padding: 88px 16px 42px; }
.auth-card {
  max-width: 460px;
  padding: 32px;
  background: rgba(12, 17, 29, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.auth-head { text-align: left; }
.auth-head h1 {
  margin: 0 0 6px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.auth-form { gap: 16px; }
.field { color: #d8deea; font-size: 14px; font-weight: 500; }
.input {
  min-height: 48px;
  background: #090e18;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
}
.input::placeholder { color: #667085; }
.input:hover { border-color: rgba(255, 255, 255, 0.22); }
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 107, 255, 0.16);
}
.auth-card .tabs {
  justify-content: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #090e18;
  padding: 3px;
}
.auth-card .tab {
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}
.auth-card .tab--active { color: #fff; background: var(--surface-raised, #111827); }
.btn {
  min-height: 48px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.btn:hover { background: var(--accent-2); }
.btn-google,
.btn--ghost {
  background: #090e18;
  color: #fff;
  border: 1px solid var(--line);
}
.btn-google:hover,
.btn--ghost:hover { background: #111827; border-color: rgba(255, 255, 255, 0.22); }
.auth-sep { color: var(--muted); }
.auth-sep::before,
.auth-sep::after { background: var(--line); }
.auth-foot,
.auth-foot a { color: var(--muted); }
.auth-foot a { color: var(--accent); }
.auth-error { background: rgba(255, 93, 87, 0.12); color: var(--danger); }
.auth-lang { position: fixed; z-index: 4; }
.lang-switch { background: rgba(12, 17, 29, 0.94); border-color: var(--line); }
.lang-switch button { color: var(--muted); }
.lang-switch button.on { background: var(--accent); color: #fff; }

.auth-brand {
  position: fixed;
  top: 28px;
  left: 36px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  width: 180px;
  height: 38px;
}
.auth-brand img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}
.auth-brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 8px;
}

/* The visible brand is a real link, not a decorative pseudo-element. */
.auth-brand {
  pointer-events: auto;
}

@media (max-width: 600px) {
  .auth-brand { left: 16px; top: 18px; width: 140px; height: 38px; }
  .auth-lang { top: 14px; right: 12px; }
  .auth-page { width: 100%; max-width: 100%; padding: 86px 16px 28px; box-sizing: border-box; }
  .auth-card { width: calc(100vw - 32px); max-width: calc(100vw - 32px); min-width: 0; padding: 24px 20px; box-sizing: border-box; }
  .auth-card .tabs,
  .auth-form,
  .auth-form .input,
  .auth-form .btn,
  .btn-google { width: 100%; max-width: 100%; min-width: 0; }
  .auth-head h1 { font-size: 30px; }
}

@media (max-width: 420px) {
  .auth-lang { display: none; }
  .auth-brand { width: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-glyph-field { opacity: 1; }
}
