:root {
  --bg: #0f1115;
  --card: #171a21;
  --border: #262b36;
  --text: #f2f4f8;
  --muted: #9aa3b2;
  --accent: #22c55e;
  --error: #f87171;
}

* {
  box-sizing: border-box;
}

/* Author `display` rules below would otherwise beat the browser default for
   `[hidden]`, leaving hidden elements visible. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.brand {
  margin: 0 0 24px;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 14px;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--text);
  background: #0f1319;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}

input::placeholder {
  color: #5b6473;
}

input:focus {
  border-color: var(--accent);
}

input[aria-invalid="true"] {
  border-color: var(--error);
}

.submit {
  margin-top: 8px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #06210f;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.submit:hover:not(:disabled) {
  background: #16a34a;
}

.submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error {
  margin: 0;
  font-size: 13px;
  color: var(--error);
}

.form-error {
  margin-top: 4px;
  text-align: center;
}

.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px 0 4px;
  text-align: center;
}

.checkmark {
  width: 88px;
  height: 88px;
}

.checkmark-circle {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.55s forwards;
}

@keyframes stroke {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .checkmark-circle,
  .checkmark-check {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.success-text {
  margin: 0;
  font-size: 17px;
  color: var(--accent);
}

.tagline {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
