/* =============================================================
   FarmAssist v2 — sign-in pages
   Areas/Identity/Pages/Account/_AuthLayout.cshtml. Builds on
   tokens.css + components.css (.card, .btn, .input, .t-*) and adds
   only what a standalone, shell-less form page needs.
   ============================================================= */

body.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app);
  /* One soft wash of the accent behind the card — the only colour on the page besides the buttons. */
  background-image: radial-gradient(900px 480px at 50% -120px, var(--accent-soft-2), transparent 70%);
  background-repeat: no-repeat;
}

.auth__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 48px 16px 16px;
}

/* ---------- Brand ---------- */
.auth__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  border-radius: var(--radius-md);
}
.auth__brand:hover { color: inherit; }
.auth__logo { width: 110px; height: 80px; object-fit: contain; flex-shrink: 0; }
.auth__brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.auth__brand-name { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--fg-strong); }
.auth__brand-sub { font-size: 12px; color: var(--fg-muted); }

/* ---------- Card ---------- */
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.auth-card--wide { max-width: 520px; }
.auth-card__head { margin-bottom: 20px; }
.auth-card__head h1 { margin: 0 0 4px; }
.auth-card__head p { margin: 0; font-size: 13px; }
.auth-card__foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 13px;
  color: var(--fg-muted);
}

/* Round badge above a heading on the confirmation / status pages. */
.auth-badge {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--fg-accent);
}
.auth-badge .auth-svg { width: 22px; height: 22px; }
.auth-badge--ok  { background: var(--status-ok-bg); color: var(--status-ok-fg); }
.auth-badge--err { background: var(--status-er-bg); color: var(--status-er-fg); }

/* ---------- Form ---------- */
.auth-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field__label { font-size: 13px; font-weight: 500; color: var(--fg-strong); }
.field__aside { font-size: 12.5px; }
.field__help { font-size: 12px; color: var(--fg-muted); }
.field__error { font-size: 12px; color: var(--status-er-fg); }
.field__error:empty { display: none; }
.field .input-validation-error { border-color: var(--status-er-bd); }

/* Comfortable touch targets. 16px text on phones stops iOS zooming into the field on focus. */
.auth .input { height: 40px; padding: 0 12px; font-size: 14px; }
@media (max-width: 540px) { .auth .input { font-size: 16px; } }
.auth .input--code { font-family: var(--font-mono); font-size: 18px; letter-spacing: 0.3em; text-align: center; }

.input-reveal { position: relative; }
.input-reveal .input { padding-right: 44px; }
.input-reveal__btn {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-muted);
}
.input-reveal__btn:hover { background: var(--bg-hover); color: var(--fg-default); }
.input-reveal__btn > span { display: flex; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-default); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }

.auth .btn--lg { height: 40px; }
.btn--block { width: 100%; }
.auth .btn .auth-svg { width: 16px; height: 16px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12px;
  color: var(--fg-subtle);
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-default); }

.auth-hint { margin: 12px 0 0; text-align: center; line-height: 1.5; }

/* ---------- Messages ---------- */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--status-in-bd);
  border-radius: var(--radius-md);
  background: var(--status-in-bg);
  color: var(--status-in-fg);
  font-size: 13px;
  line-height: 1.45;
}
.auth-alert .auth-svg { flex-shrink: 0; margin-top: 1px; }
.auth-alert p { margin: 0; }
.auth-alert p + p { margin-top: 4px; }
.auth-alert--err { border-color: var(--status-er-bd); background: var(--status-er-bg); color: var(--status-er-fg); }
.auth-alert--ok  { border-color: var(--status-ok-bd); background: var(--status-ok-bg); color: var(--status-ok-fg); }
.auth-alert--inline { margin: 12px 0 0; }

/* Prose on the confirmation pages. */
.auth-prose { font-size: 14px; color: var(--fg-default); }
.auth-prose p { margin: 0 0 12px; }
.auth-prose ol, .auth-prose ul { margin: 0 0 12px; padding-left: 20px; }
.auth-prose li { margin-bottom: 6px; }
.auth-prose li::marker { color: var(--fg-muted); }

.auth__foot { padding: 8px 0 0; text-align: center; }
