:root {
  --bg: #08090d;
  --panel: #101218;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #e9eaf1;
  --muted: #8e93a6;
  --dim: #5c6072;
  --accent: #a78bfa;
  --accent-2: #7c5cff;
  --err: #fb7185;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}
::selection { background: rgba(167, 139, 250, 0.35); }

.auth-glow {
  position: fixed; inset: -20% 20% auto -10%; height: 520px; pointer-events: none;
  background:
    radial-gradient(50% 60% at 30% 20%, rgba(124, 92, 255, 0.16), transparent 70%),
    radial-gradient(40% 50% at 80% 10%, rgba(103, 232, 249, 0.08), transparent 70%);
  filter: blur(10px);
}

.auth-wrap { position: relative; width: min(400px, 100%); }

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px 22px;
  background: linear-gradient(180deg, var(--panel) 0%, #0d0f15 100%);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #1d2030, #12141c);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 26px rgba(124, 92, 255, 0.22);
}
.auth-mark svg { width: 21px; height: 21px; fill: var(--accent); filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.8)); }

.auth-title { margin: 2px 0 0; font-size: 19px; font-weight: 650; letter-spacing: 0.1px; }
.auth-title span { color: var(--accent); }
.auth-sub { margin: 0; font-size: 12.5px; color: var(--muted); }

.auth-field { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.auth-field span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.9px; color: var(--dim); }
.auth-field input {
  width: 100%;
  padding: 11px 13px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  background: #0a0c11;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.auth-field input:focus {
  border-color: rgba(167, 139, 250, 0.7);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
}

.auth-trust {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; color: var(--muted);
  cursor: pointer; user-select: none;
}
.auth-trust input {
  appearance: none;
  width: 16px; height: 16px; border-radius: 5px; margin: 0;
  border: 1px solid var(--line-strong);
  background: #0a0c11;
  display: grid; place-items: center;
  cursor: pointer;
}
.auth-trust input:checked { border-color: var(--accent-2); background: rgba(124, 92, 255, 0.22); }
.auth-trust input:checked::after {
  content: ""; width: 8px; height: 4px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translateY(-1px);
}

.auth-submit {
  margin-top: 2px;
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 620;
  color: #0b0714;
  background: linear-gradient(135deg, #c4b5fd, #8b6cff);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  cursor: pointer;
  transition: filter 120ms, transform 60ms;
}
.auth-submit:hover { filter: brightness(1.07); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { opacity: 0.55; cursor: progress; }

.auth-msg {
  font-size: 12px;
  color: var(--err);
  background: rgba(251, 113, 133, 0.08);
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-radius: 9px;
  padding: 9px 11px;
  white-space: pre-wrap;
}
.auth-msg[hidden] { display: none; }
.auth-msg.info { color: var(--muted); background: rgba(255, 255, 255, 0.03); border-color: var(--line); }

.auth-foot {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  text-align: center;
  letter-spacing: 0.4px;
}
