/* Appended separately so hosted header and sidebar corrections remain intact. */
.field-error,
.form-error-summary {
  color: #b42318;
  display: block;
  font-size: 0.875rem;
}
.field-error {
  margin-top: 0.3rem;
}
.form-error-summary {
  background: #fff1f0;
  border: 1px solid #f2b8b5;
  border-radius: 0.5rem;
  padding: 0.8rem;
}
[aria-invalid="true"] {
  border-color: #b42318 !important;
  outline-color: #b42318;
  animation: validation-attention 160ms ease-in-out 2;
}
button,
.outline,
.primary {
  transition:
    transform 100ms ease,
    background-color 120ms ease;
}
button:active:not(:disabled) {
  transform: scale(0.98);
}
[aria-busy="true"] {
  cursor: progress;
}
@keyframes validation-attention {
  25% {
    transform: translateX(-2px);
  }
  75% {
    transform: translateX(2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  button,
  .outline,
  .primary,
  [aria-invalid="true"] {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
.mfa-setup .mfa-qr {
  display: block;
  width: min(100%, 288px);
  height: auto;
  margin: 20px auto;
  background: white;
}

.mfa-setup input[name="code"] {
  font-size: 1.4rem;
  letter-spacing: 0.25em;
  max-width: 240px;
}

.mfa-setup details {
  margin: 20px 0;
}

.mfa-setup summary {
  cursor: pointer;
  color: #007c89;
}

.mfa-setup .mfa-secret {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Account access only: preserve dashboard, header and sidebar styling. */
.auth-mode #main {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 24px;
}
.auth-card {
  max-width: 520px;
  padding: clamp(20px, 4vw, 32px);
  margin: 32px auto;
}
.auth-card form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.auth-card .field {
  margin: 0;
}
.auth-card form > .primary {
  width: 100%;
  min-height: 46px;
  margin: 0;
}
.auth-card .check-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.auth-card .check-field input {
  flex: 0 0 auto;
  width: 16px;
  margin-top: 4px;
}
.auth-recovery {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}
.auth-card .text-button {
  padding: 4px 0;
  background: none;
  border: 0;
  color: #007c89;
  cursor: pointer;
}
.auth-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 0.9rem;
}
.auth-switch a,
.auth-switch button {
  font-weight: 600;
}
.google-signin {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #637177;
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: #dde4e3;
  flex: 1;
}
.google-button {
  display: flex;
  justify-content: center;
  min-height: 44px;
}
.google-status {
  margin: 0;
  line-height: 1.5;
  font-size: 0.9rem;
}
.google-status:empty {
  display: none;
}
.google-status-error {
  padding: 12px;
  background: #fff1f0;
  color: #b42318;
  border: 1px solid #f2b8b5;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.google-retry {
  min-height: 44px;
  width: 100%;
}
.google-email-fallback {
  justify-self: center;
  font-size: 0.9rem;
}
.auth-intro {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .auth-mode #main {
    padding: 16px;
  }
  .auth-card {
    margin: 16px auto;
  }
  .auth-switch {
    gap: 6px;
  }
}
