:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f7;
  color: #111827;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f5f5f7 0%, #e5eef8 100%);
}

main {
  width: min(420px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  padding: 28px;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

p {
  margin: 0;
  line-height: 1.5;
}

.stack {
  display: grid;
  gap: 16px;
}

.header-stack {
  gap: 8px;
}

.notice {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.95rem;
}

.notice.info {
  background: #eef5ff;
  color: #153e75;
}

.notice.error {
  background: #fff1f2;
  color: #9f1239;
}

.notice.success {
  background: #ecfdf3;
  color: #166534;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
}

input {
  font: inherit;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  background: #fff;
  color: #111827;
}

button,
.action-link {
  font: inherit;
  padding: 11px 14px;
  border: 0;
  border-radius: 8px;
  background: #0f62fe;
  color: white;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
}

form[hidden],
.action-link[hidden] {
  display: none;
}

button[disabled] {
  cursor: default;
  opacity: 0.6;
}

.muted {
  color: #4b5563;
  font-size: 0.92rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    background: #0f172a;
    color: #f8fafc;
  }

  body {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  }

  main {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
  }

  .notice.info {
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
  }

  .notice.error {
    background: rgba(190, 24, 93, 0.18);
    color: #fbcfe8;
  }

  .notice.success {
    background: rgba(22, 163, 74, 0.18);
    color: #bbf7d0;
  }

  input {
    background: #0b1220;
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.28);
  }

  .muted {
    color: #cbd5e1;
  }
}
