/* Shared chrome for the unauthenticated pages (/login, /login/verify,
   /login/complete, /invitations/:token). Mirrors the email/code modal on
   the marketing website so moving between the two feels like one product. */

/* Compact footer text sits on top of the solid-blue auth body; override the
   default slate-400 colour so links stay legible and hover doesn't collapse
   into the brand-700 background stripe. */
.auth-page-body footer { color: rgba(255, 255, 255, 0.55); }
.auth-page-body footer a { color: rgba(255, 255, 255, 0.75); }
.auth-page-body footer a:hover { color: #fff; }
.auth-page-body footer .text-slate-300 { color: rgba(255, 255, 255, 0.25); }

.auth-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 32px 28px 26px;
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.55),
    0 20px 40px -20px rgba(0, 0, 0, 0.35);
  color: #0F172A;
}

.auth-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-brand-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.auth-title {
  font-size: 22px;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.01em;
  margin: 0 0 4px 0;
}
.auth-subtitle {
  font-size: 13.5px;
  color: #64748B;
  margin: 0 0 18px 0;
  line-height: 1.5;
}
.auth-subtitle strong { color: #0F172A; font-weight: 700; }

.auth-input {
  width: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid #CBD5E1;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.auth-input::placeholder { color: #94A3B8; font-weight: 500; }
.auth-input:hover { border-color: #94A3B8; }
.auth-input:focus {
  outline: none;
  border-color: var(--color-brand-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.15);
}
.auth-input[aria-invalid="true"] {
  border-color: #DC2626;
  background: #FEF2F2;
}
.auth-input:disabled {
  background: #F1F5F9;
  color: #64748B;
  cursor: not-allowed;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.02em;
  margin-bottom: 5px;
}

.auth-btn-primary {
  margin-top: 18px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  background: var(--color-brand-500);
  color: #fff;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  box-shadow: 0 8px 18px -8px rgba(21, 101, 192, 0.55);
}
.auth-btn-primary:hover { background: var(--color-brand-600); transform: translateY(-1px); }
.auth-btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.25), 0 8px 18px -8px rgba(21, 101, 192, 0.55);
}
.auth-btn-primary:disabled { opacity: 0.6; cursor: progress; transform: none; }

.auth-btn-secondary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: #fff;
  color: #334155;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.auth-btn-secondary:hover { border-color: #CBD5E1; background: #F8FAFC; color: #0F172A; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #E2E8F0;
}

.auth-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.6;
}
/* Inline the <form> that `button_to` generates so its button sits on the same
   text line as the surrounding copy instead of breaking to its own row. */
.auth-foot form { display: inline; margin: 0; padding: 0; }

.auth-foot-link {
  color: var(--color-brand-500);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.auth-foot-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.auth-foot-divider { color: #CBD5E1; font-size: 12.5px; margin: 0 4px; }
.auth-foot-prompt { margin-right: 8px; }

.auth-form-error {
  margin: 12px 0;
  padding: 10px 14px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

/* In-card flash banners — replaces the full-bleed FlashComponent on auth
   pages so the message sits inside the card instead of floating at the top
   of the viewport. */
.auth-flash {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
}
.auth-flash-notice {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #065F46;
}
.auth-flash-alert {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #B91C1C;
}
.auth-form-error ul {
  margin: 4px 0 0;
  padding-left: 18px;
  font-weight: 500;
}

.auth-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
}

.auth-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: #334155;
  line-height: 1.5;
  cursor: pointer;
}
.auth-checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-brand-500);
  cursor: pointer;
}
.auth-checkbox-row a {
  color: var(--color-brand-500);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-checkbox-row a:hover { color: var(--color-brand-600); }

/* ---- 6-box one-time code input ---- */
.auth-code-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 2px 0 4px;
}
.auth-code-box {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  min-height: 56px;
  padding: 0;
  background: #fff;
  border: 2px solid #CBD5E1;
  border-radius: 12px;
  font: inherit;
  font-size: 28px;
  font-weight: 800;
  color: #0F172A;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.auth-code-box:hover { border-color: #94A3B8; }
.auth-code-box:focus {
  outline: none;
  border-color: var(--color-brand-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.15);
}
.auth-code-box[aria-invalid="true"] {
  border-color: #DC2626;
  background: #FEF2F2;
}
@media (max-width: 420px) {
  .auth-card { padding: 28px 22px 22px; }
  .auth-title { font-size: 19px; }
  .auth-code-boxes { gap: 6px; }
  .auth-code-box { font-size: 22px; min-height: 46px; }
}
