:root {
  --bg: #0b0c0e;
  --panel: #12141a;
  --text: #e8e6e1;
  --muted: #8b8983;
  --dim: #6a6863;
  --accent: #8ab4f8;
  --line: rgba(232, 230, 225, .1);
  --line-strong: rgba(232, 230, 225, .2);
  --hot: #ff7b72;
  --good: #8fd19e;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--mono);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(138, 180, 248, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 180, 248, .045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 40%, #000, transparent 78%);
}

.shell { position: relative; z-index: 1; width: min(100%, 440px); }
.panel {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(18, 20, 26, .96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .8rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, .25);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.path { margin-left: .6rem; color: var(--dim); font-size: .72rem; letter-spacing: .04em; }
.body { padding: 1.6rem 1.5rem 1.4rem; }
.logo { color: var(--accent); font-size: .82rem; line-height: 1.25; margin: 0 0 .8rem; }
.muted { color: var(--muted); margin: 0 0 1.5rem; font-size: .82rem; }

label { display: block; color: var(--dim); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; margin: .9rem 0 .35rem; }
input {
  width: 100%;
  padding: .65rem .75rem;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, .35);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 180, 248, .12); }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
button:disabled { opacity: .55; cursor: wait; }
#pw-form button, .primary {
  width: 100%;
  margin-top: 1.2rem;
  padding: .65rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
}
#pw-form button:hover:not(:disabled), .primary:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.arrow { float: right; }

.divider { display: flex; align-items: center; gap: .8rem; color: var(--dim); font-size: .72rem; margin: 1.4rem 0 1rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ghost {
  width: 100%;
  padding: .6rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
}
.ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: rgba(138, 180, 248, .06); }
.key { color: var(--accent); margin-right: .4rem; }

.status { margin: 1.3rem 0 0; min-height: 1.6em; color: var(--good); font-size: .78rem; }
.status.err { color: var(--hot); }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hint { color: var(--dim); font-size: .7rem; line-height: 1.6; margin: 1.2rem 0 0; border-top: 1px solid var(--line); padding-top: .9rem; }
.hint code { color: var(--muted); }
footer { text-align: center; color: var(--dim); font-size: .7rem; margin-top: 1.2rem; }
.home { display: block; text-align: center; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
