:root {
  --black: #000;
  --white: #fff;
  --dim: rgba(255, 255, 255, 0.45);
  --faint: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.22);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --hud: 'Share Tech Mono', 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--white);
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
}

.auth-shell {
  position: relative;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.82);
  padding: 2rem 1.75rem 1.75rem;
}

.auth-shell::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--white);
}

.auth-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  font-family: var(--hud);
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}

.auth-top a {
  color: var(--dim);
  text-decoration: none;
}

.auth-top a:hover { color: var(--white); }

.auth-brand {
  font-family: var(--hud);
  font-size: 2rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  color: var(--dim);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.auth-error {
  display: none;
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.72rem;
}

.auth-error.show { display: block; }

.auth-field { margin-bottom: 1rem; }

.auth-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font: inherit;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--line);
  outline: none;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  border-color: var(--white);
}

.auth-field input::placeholder { color: rgba(255, 255, 255, 0.25); }

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0.25rem 0 1.25rem;
  font-size: 0.72rem;
  color: var(--dim);
}

.auth-row label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.btn-auth-primary,
.btn-auth-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.7rem 1rem;
  font: inherit;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid var(--white);
  background: transparent;
  color: var(--white);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-auth-primary {
  background: var(--white);
  color: var(--black);
  margin-bottom: 0.75rem;
}

.btn-auth-primary:hover {
  background: transparent;
  color: var(--white);
}

.btn-auth-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-auth-secondary:hover {
  background: var(--white);
  color: var(--black);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--dim);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--faint);
}

.auth-foot {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--dim);
  font-size: 0.72rem;
}

.auth-foot a {
  color: var(--white);
  text-decoration: none;
  margin-left: 0.35rem;
}

.auth-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.auth-step {
  flex: 1;
  height: 2px;
  background: var(--faint);
}

.auth-step.is-done,
.auth-step.is-active {
  background: var(--white);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  font-family: var(--hud);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-overlay.show { display: flex; }

.auth-banner {
  margin-bottom: 1rem;
  padding: 0.55rem 0.65rem;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: var(--dim);
  font-size: 0.65rem;
  line-height: 1.45;
}

.auth-banner code {
  color: var(--white);
}
