/* ─────────────────────────────
   Base
───────────────────────────── */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f7f7f9;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
}

/* ─────────────────────────────
   Layout
───────────────────────────── */
.auth-container {
  min-height: 100dvh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────
   Card
───────────────────────────── */
.card {
  width: 100%;
  max-width: 440px;
  background: white;
  padding: 40px 32px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Brand */
.brand-mark {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

/* Headings */
.card h1 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.card p {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 24px;
}

.card .muted {
  color: #6b7280;
}

/* ─────────────────────────────
   Form elements
───────────────────────────── */
label {
  display: block;
  margin-top: 16px;
  font-size: 0.9rem;
}

input {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  padding: 0 16px;
  font-size: 1rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #111827;
  outline: none;
}

input::placeholder {
  color: #9ca3af;
}

input:focus {
  border-color: #24b47e;
  box-shadow: 0 0 0 3px rgba(36, 180, 126, 0.2);
}

input:disabled {
  background: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

/* Username field */
.username-field {
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding-left: 14px;
  margin-top: 6px;
}

.username-field .prefix {
  color: #9ca3af;
  font-size: 0.95rem;
}

.username-field input {
  border: none;
  box-shadow: none;
  margin: 0;
  padding-left: 6px;
  height: 46px;
}

.username-field:focus-within {
  border-color: #24b47e;
  box-shadow: 0 0 0 3px rgba(36, 180, 126, 0.2);
}

/* Helper text */
.hint {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: #6b7280;
}

/* Checkbox */
.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.9rem;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
}

/* Button */
button {
  width: 100%;
  margin-top: 24px;
  height: 52px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 999px;
  background: #24b47e;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

button:hover {
  background: #1b8a61;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.sent-state {
  margin-top: 18px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
}

.sent-tick {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
}

.sent-title {
  font-weight: 700;
  color: #065f46;
  font-size: 1.02rem;
}

.sent-copy {
  margin-top: 4px;
  color: #166534;
  font-size: 0.92rem;
}

/* ─────────────────────────────
   Status / errors
───────────────────────────── */
.status {
  margin-top: 16px;
  font-size: 0.95rem;
  color: #065f46;
}

.error {
  margin-top: 16px;
  font-size: 0.95rem;
  color: #b00020;
}

.hidden {
  display: none;
}

.checkbox a {
  text-decoration: underline;
}

/* ─────────────────────────────
   Mobile (full-screen)
───────────────────────────── */

@media (max-width: 640px) {
  body {
    background: white;
  }

  .auth-container {
    padding: 16px;
    align-items: stretch;
  }

  .brand-mark {
    font-size: 1rem;
    color: #374151;
  }

  .card {
    max-width: none;
    margin: auto 0;
    padding: 24px;
    border-radius: 0;
    box-shadow: none;
  }

  .card h1 {
    font-size: 1.6rem;
  }
}
