:root {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: #111827;
  --text: #e5e7eb;
  --border: #536580;
  --accent: #2563eb;
  --focus: #93c5fd;
  --error: #fca5a5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px;
  display: grid;
  place-items: center;
  font: 1rem/1.5 system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(165deg, var(--bg), #142039);
}
.network {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.card {
  position: relative;
  width: min(100%, 26rem);
  padding: clamp(1.375rem, 6vw, 2rem);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .44);
}
h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -.025em;
}
form { margin-top: 24px; }
.field + .field { margin-top: 14px; }
label {
  display: block;
  margin-bottom: 6px;
  font-size: .875rem;
  font-weight: 550;
}
input, button { font: inherit; }
input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  caret-color: var(--focus);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.password { position: relative; }
.password:has(.reveal:not([hidden])) input { padding-right: 5rem; }
button { cursor: pointer; }
.reveal {
  position: absolute;
  inset: 1px 1px 1px auto;
  min-width: 4.5rem;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: var(--bg);
  color: var(--focus);
  font-size: .875rem;
  font-weight: 600;
}
.reveal:focus-visible { outline-offset: -3px; }
.submit, .passkey {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 650;
}
.submit {
  margin-top: 20px;
  background: var(--accent);
  color: white;
}
.passkey {
  margin-top: 8px;
  border-color: var(--border);
  background: var(--bg);
  color: var(--text);
}
@media (hover: hover) {
  .submit:hover:not(:disabled) { background: #1d4ed8; }
  .passkey:hover:not(:disabled) { background: #182641; }
  .reveal:hover { background: #182641; }
}
.submit:active:not(:disabled) { background: #1e40af; }
.passkey:active:not(:disabled) { background: var(--panel); }
.submit:disabled, .passkey:disabled { opacity: .76; cursor: default; }
.status {
  min-height: 1.3125rem;
  margin: 8px 0 0;
  color: var(--error);
  font-size: .875rem;
}
::selection { color: white; background: #1d4ed8; }
