:root {
  --bg: #eef4ff;
  --bg-accent: #dbeafe;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-border: rgba(37, 99, 235, 0.14);
  --text: #132238;
  --muted: #5f728d;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --success: #0f9f6e;
  --danger: #d93c3c;
  --shadow: 0 24px 56px rgba(37, 99, 235, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 34%),
    linear-gradient(180deg, var(--bg) 0%, #f8fbff 100%);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(100%, 560px);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--primary);
  text-align: center;
}

h1 {
  margin: 18px 0 10px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  text-align: center;
}

.lede,
.body-copy,
.hint,
.field-label {
  color: var(--muted);
}

.lede,
.body-copy {
  margin: 0;
  line-height: 1.55;
  text-align: center;
}

.status {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--text);
  font-weight: 600;
}

.status.success {
  background: rgba(15, 159, 110, 0.12);
  color: #0f7a58;
}

.status.error {
  background: rgba(217, 60, 60, 0.12);
  color: #9e2626;
}

.actions,
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(180deg, #3b82f6 0%, var(--primary) 100%);
  color: white;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.button-secondary {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-dark);
}

.button-link {
  background: transparent;
  color: var(--primary-dark);
}

.hidden {
  display: none !important;
}

.password-form {
  margin-top: 22px;
}

.field-group {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.field-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.input {
  width: 100%;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
}

.hint {
  margin-top: 18px;
  font-size: 0.92rem;
  text-align: center;
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 4px solid rgba(37, 99, 235, 0.16);
  border-top-color: var(--primary);
  margin: 24px auto 0;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .card {
    padding: 24px 18px;
    border-radius: 22px;
  }
}
