:root {
  --bg: #f4efe7;
  --panel: rgba(255, 253, 248, 0.9);
  --ink: #1d1c19;
  --muted: #615d56;
  --border: rgba(29, 28, 25, 0.1);
  --accent: #0f8b7a;
  --accent-strong: #0a6e61;
  --warm: #ef7d57;
  --shadow: 0 24px 80px rgba(33, 26, 11, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(239, 125, 87, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(15, 139, 122, 0.18), transparent 32%),
    var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
}

a,
button {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.auth-shell {
  width: min(460px, 100%);
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.auth-card {
  padding: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 28px;
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--warm));
}

.eyebrow {
  margin: 24px 0 10px;
  color: var(--accent-strong);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.05em;
}

h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 0.98;
}

.subcopy {
  color: var(--muted);
  line-height: 1.7;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 15px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
}

.form-message {
  margin: 0;
  color: #cc5333;
  font-size: 14px;
  line-height: 1.5;
}

.form-message.success {
  color: var(--accent-strong);
}

.primary-button,
.ghost-link {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.full-width-button {
  width: 100%;
}

.primary-button {
  background: var(--ink);
  color: white;
  border-color: transparent;
}

.primary-button:disabled,
.ghost-link:disabled {
  cursor: wait;
  opacity: 0.78;
}

.button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: button-spin 0.8s linear infinite;
}

.button-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ghost-link {
  background: rgba(255, 255, 255, 0.58);
}

.auth-divider {
  position: relative;
  margin: 18px 0;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid var(--border);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 12px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.text-action {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2d6cdf;
  font-size: 14px;
  font-weight: 600;
}

.inline-link {
  justify-self: end;
  text-decoration: none;
}

.text-action:disabled {
  cursor: default;
  opacity: 1;
  color: rgba(45, 108, 223, 0.55);
}

.inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.auth-stack {
  display: grid;
  gap: 14px;
}

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