/* Account pages (Views/Shared/_AuthLayout.cshtml): Log in, password recovery and reset, and Access denied. Styled after
   the sign-up screens of the "Website redesign" reference mockup in docs/ (its centred 480px column, 44px fields, 13.5px
   labels, 32px title and the marketing site's colours and Geist type). Registration, verification and plan confirmation
   keep _SignupLayout and wwwroot/css/signup.css.

   SCOPE: every rule is under .auth-page (the layout's body), so no other page is affected; links and focus rings only
   inside .auth-main, so the shared header and footer (_MarketingHeader / _MarketingFooter, styled by
   marketing-shell.css, which also declares the Geist faces) look exactly as on Home. Bootstrap stays loaded underneath
   (form validation classes), restyled here only inside .auth-page. */

/* ---- Page frame: the shared header, a centred column, the shared footer at the bottom of short pages */
.auth-page {
  --auth-ink: #0B1220;
  --auth-body: #3B4350;
  --auth-sub: #5B6472;
  --auth-muted: #6B7380;
  --auth-line: #E4E7EC;
  --auth-field: #D0D5DD;
  --auth-blue: #1A5CFF;
  --auth-blue-hover: #0F4FEF;
  --auth-link: #1448CC;
  --auth-error: #B42318;
  --auth-error-line: #D92D20;
  --auth-bg: #F6F7F9;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  /* White behind the shared header and footer (as on Home, so the translucent header looks identical); grey only in
     the content area below. */
  background: #fff;
  color: var(--auth-body);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.auth-page .auth-main a {
  color: var(--auth-link);
  font-weight: 500;
  text-decoration: none;
}

.auth-page .auth-main a:hover {
  text-decoration: underline;
}

.auth-page .auth-main a:focus-visible,
.auth-page .auth-main button:focus-visible,
.auth-page .auth-main:focus-visible {
  outline: 2px solid var(--auth-blue);
  outline-offset: 2px;
}

.auth-page .auth-main:focus:not(:focus-visible) {
  outline: none;
}

.auth-page .auth-skip {
  position: absolute;
  z-index: 1100;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--auth-line);
  transform: translateY(-200%);
}

.auth-page .auth-skip:focus {
  transform: none;
}

.auth-page .auth-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* The shared footer keeps its 90px top margin (marketing-shell.css, .mk.mk-foot); the grey runs under it, so the card
     area meets the footer's border with no white band. */
  margin-bottom: -90px;
  padding: 40px 16px 64px;
  background: var(--auth-bg);
}

/* ---- The card */
.auth-page .auth-card {
  width: 100%;
  max-width: 480px;
  padding: 36px 36px 32px;
  border: 1px solid var(--auth-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 40px -24px rgba(16, 24, 40, .18);
}

/* A status (reset link sent, expired link, access denied): compact and centred, not a form-shaped box. */
.auth-page .auth-card-status {
  max-width: 440px;
  text-align: center;
}

.auth-page .auth-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: #EAF0FF;
  color: var(--auth-blue);
}

.auth-page .auth-status-icon-warn {
  background: #FFF4E5;
  color: #B54708;
}

.auth-page .auth-title {
  margin: 0 0 8px;
  color: var(--auth-ink);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.auth-page .auth-subtitle {
  margin: 0 0 26px;
  color: var(--auth-sub);
  font-size: 15px;
  line-height: 1.55;
}

.auth-page .auth-subtitle strong {
  color: var(--auth-ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.auth-page .auth-card-status .auth-subtitle {
  margin-bottom: 24px;
}

/* ---- Fields (Bootstrap's classes, restyled in scope) */
.auth-page .auth-field {
  margin-bottom: 18px;
}

.auth-page .form-label {
  margin-bottom: 6px;
  color: #2B3340;
  font-size: 13.5px;
  font-weight: 500;
}

.auth-page .auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.auth-page .form-control,
.auth-page .form-select {
  min-height: 44px;
  border: 1px solid var(--auth-field);
  border-radius: 10px;
  color: var(--auth-ink);
  font-size: 15px;
  box-shadow: none;
}

.auth-page .form-control-lg {
  min-height: 52px;
  font-size: 20px;
}

.auth-page .form-control:focus,
.auth-page .form-select:focus {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 3px rgba(26, 92, 255, .16);
}

.auth-page .form-control.is-invalid,
.auth-page .form-select.is-invalid,
.auth-page .form-control.input-validation-error {
  border-color: var(--auth-error-line);
}

.auth-page .form-control.is-invalid:focus,
.auth-page .form-select.is-invalid:focus,
.auth-page .form-control.input-validation-error:focus {
  border-color: var(--auth-error-line);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, .14);
}

/* Field messages: server (.invalid-feedback) and client (jQuery unobtrusive's .field-validation-error) alike. Long
   messages wrap; nothing overflows the card. */
.auth-page .invalid-feedback,
.auth-page .field-validation-error {
  display: block;
  margin-top: 6px;
  color: var(--auth-error);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.auth-page .invalid-feedback:empty,
.auth-page .field-validation-valid {
  display: none !important;
}

/* ---- Actions */
.auth-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
}

.auth-page .btn-lg,
.auth-page .auth-submit {
  min-height: 50px;
  border-radius: 13px;
  font-size: 16px;
}

.auth-page .btn-primary {
  border-color: var(--auth-blue);
  background: var(--auth-blue);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 6px 16px rgba(26, 92, 255, .22);
}

.auth-page .btn-primary:hover,
.auth-page .btn-primary:focus-visible {
  border-color: var(--auth-blue-hover);
  background: var(--auth-blue-hover);
  color: #fff;
}

.auth-page .btn-primary:disabled {
  border-color: var(--auth-blue);
  background: var(--auth-blue);
  opacity: .7;
}

.auth-page .btn-outline-primary,
.auth-page .btn-outline-secondary {
  border: 1px solid var(--auth-field);
  background: #fff;
  color: var(--auth-ink);
}

.auth-page .btn-outline-primary:hover,
.auth-page .btn-outline-secondary:hover {
  border-color: #B9C0CA;
  background: #FAFBFC;
  color: var(--auth-ink);
}

.auth-page .btn:focus-visible {
  outline: 2px solid var(--auth-blue);
  outline-offset: 2px;
  box-shadow: none;
}

.auth-page .btn-link {
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--auth-link);
  font-size: inherit;
  font-weight: 600;
  text-decoration: none;
  vertical-align: baseline;
}

.auth-page .btn-link:hover {
  text-decoration: underline;
}

/* Secondary links and prompts, grouped beneath the primary action. */
.auth-page .auth-secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin: 20px 0 0;
  color: var(--auth-sub);
  font-size: 14px;
  text-align: center;
}

.auth-page .auth-secondary a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.auth-page .auth-note {
  margin: 16px 0 0;
  color: var(--auth-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

/* ---- Alerts: the form-level summary and notices (Bootstrap's .alert, recoloured in scope) */
.auth-page .alert,
.auth-page .auth-alert {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.auth-page .auth-alert p {
  margin: 0;
}

.auth-page .auth-alert ul {
  margin: 0;
  padding-left: 18px;
}

.auth-page .auth-alert-error,
.auth-page .alert-danger {
  border-color: #FECDCA;
  background: #FEF3F2;
  color: var(--auth-error);
}

.auth-page .auth-alert-error:focus {
  outline: 2px solid var(--auth-error-line);
  outline-offset: 2px;
}

.auth-page .alert-success {
  border-color: #ABEFC6;
  background: #ECFDF3;
  color: #067647;
}

.auth-page .alert-warning {
  border-color: #FEDF89;
  background: #FFFAEB;
  color: #93370D;
}

.auth-page .alert-info {
  border-color: #C7D7FE;
  background: #EFF4FF;
  color: var(--auth-link);
}

.auth-page .alert-secondary {
  border-color: var(--auth-line);
  background: #F9FAFB;
  color: var(--auth-body);
}

/* ---- Narrow screens: one column, the card's padding shrinks so a 320px viewport keeps the full field width. */
@media (max-width: 575.98px) {
  .auth-page .auth-main {
    padding: 20px 16px 40px;
  }

  .auth-page .auth-card {
    padding: 28px 20px 24px;
    border-radius: 18px;
  }

  .auth-page .auth-title {
    font-size: 26px;
  }
}
