.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  overflow-x: hidden;
}

.back-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.auth-shell {
  flex: 1;
  min-height: auto;
  padding: clamp(26px, 4vh, 42px) 20px;
  display: grid;
  place-items: center;
  overflow-x: hidden;
}

.auth-card {
  width: min(100%, 520px);
  max-width: calc(100vw - 40px);
  padding: 35px 38px 32px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-card .modal-mark {
  margin-bottom: 12px;
}

.auth-logo {
  width: 38px;
  height: 38px;
  display: block;
  margin-bottom: 12px;
}

.auth-card h1 {
  max-width: 100%;
  margin: 0 0 10px;
  color: #30443c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 2.4vw, 34px);
  line-height: 1.12;
  font-weight: 500;
  overflow-wrap: normal;
  text-wrap: balance;
}

.auth-copy {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form label {
  margin-top: 5px;
  color: #53645d;
  font-size: 11px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  border: 1px solid #ccd7ca;
  border-radius: 3px;
  padding: 12px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.auth-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 170, 64, 0.14);
}

.auth-form input[aria-invalid="true"] {
  border-color: #c87867;
  box-shadow: 0 0 0 3px rgba(200, 120, 103, 0.12);
}

.auth-form .primary-button {
  margin-top: 11px;
}

.auth-feedback {
  min-height: 18px;
  margin: 16px 0 0;
  color: var(--gold-dark);
  font-size: 11px;
  line-height: 1.45;
}

.form-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.auth-feedback.is-error {
  color: #b35f4f;
}

.auth-feedback.is-success {
  color: #426159;
}

.signup-ambient {
  display: none;
}

.signup-ambient-image {
  position: absolute;
  width: min(28vw, 420px);
  max-height: 76vh;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  mix-blend-mode: screen;
  filter: saturate(0.95) contrast(1.03) drop-shadow(0 22px 42px rgba(170, 123, 21, 0.12));
  animation: signupAmbientFade 60s ease-in-out infinite;
  animation-delay: calc(var(--step) * 6s);
}

.signup-ambient-image.is-left {
  --ambient-enter: -18px;
  --ambient-exit: 10px;
  left: max(26px, calc(50vw - 720px));
  top: 52%;
}

.signup-ambient-image.is-right {
  --ambient-enter: 18px;
  --ambient-exit: -10px;
  right: max(26px, calc(50vw - 720px));
  top: 52%;
}

@keyframes signupAmbientFade {
  0%, 100% {
    opacity: 0;
    transform: translate3d(var(--ambient-enter), -50%, 0) scale(0.96);
  }

  5%, 15% {
    opacity: 0.48;
    transform: translate3d(0, -50%, 0) scale(1);
  }

  22% {
    opacity: 0;
    transform: translate3d(var(--ambient-exit), -50%, 0) scale(1.015);
  }
}

@media (min-width: 1180px) {
  .signup-ambient {
    position: fixed;
    inset: 64px 0 0;
    display: block;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
  }

  .auth-shell {
    position: relative;
    z-index: 1;
  }
}

@media (min-width: 1500px) {
  .signup-ambient-image {
    width: min(30vw, 500px);
  }

  .signup-ambient-image.is-left {
    left: max(48px, calc(50vw - 820px));
  }

  .signup-ambient-image.is-right {
    right: max(48px, calc(50vw - 820px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .signup-ambient-image {
    animation: none;
  }
}
.confirm-email-shell {
  width: 100%;
  position: relative;
  grid-template-columns: 1fr;
  justify-content: center;
  align-items: center;
  justify-items: center;
}

.confirm-email-card {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
}

.confirm-email-card .auth-copy {
  margin-bottom: 20px;
}

.confirm-email-steps {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
}

.confirm-email-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 11px 0;
  border-top: 1px solid #e6ebe5;
}

.confirm-email-step span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-size: 11px;
  font-weight: 700;
}

.confirm-email-step p {
  margin: 0;
  color: #65736c;
  font-size: 12px;
  line-height: 1.55;
}

.confirm-email-step strong {
  color: #30443c;
}

.confirm-resend-form {
  padding-top: 4px;
}

.confirm-email-support {
  margin: 8px 0 0;
  color: #87948d;
  font-size: 11px;
  line-height: 1.5;
}

.confirm-email-support a {
  color: var(--gold-dark);
  font-weight: 700;
  text-decoration: none;
}

.confirm-email-support a:hover {
  text-decoration: underline;
}

.confirm-email-visual {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: calc(50% + 275px);
  transform: translateY(-50%);
  margin: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.confirm-email-visual img {
  width: clamp(420px, 38vw, 620px);
  max-height: calc(100svh - 120px);
  object-fit: contain;
  mix-blend-mode: screen;
  filter: saturate(0.96) contrast(1.03) drop-shadow(0 24px 46px rgba(170, 123, 21, 0.14));
}

@media (max-width: 1080px) {
  .confirm-email-visual {
    display: none;
  }
}
@media (max-width: 560px) {
  .auth-shell {
    flex: 1;
    min-height: auto;
    padding: 24px 16px 34px;
  }

  .auth-card {
    max-width: calc(100vw - 32px);
    padding: 29px 22px 25px;
  }

  .auth-card h1 {
    font-size: clamp(27px, 8vw, 30px);
  }
}
.admin-mfa-panel[hidden] {
  display: none;
}

.admin-mfa-panel h2 {
  margin: 0 0 10px;
  color: #30443c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 2.4vw, 34px);
  line-height: 1.12;
  font-weight: 500;
}

.admin-mfa-panel .auth-copy {
  margin-bottom: 22px;
}

.admin-mfa-panel .auth-copy strong {
  color: #30443c;
  overflow-wrap: anywhere;
}

.admin-mfa-code {
  text-align: center;
  letter-spacing: 0.28em;
  font-size: 20px !important;
  font-weight: 700;
}

.admin-mfa-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
}

.admin-mfa-links .quiet-button {
  color: var(--gold-dark);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-mfa-links .quiet-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

/* Auth mobile polish 20260820 */
@media (max-width: 760px) {
  .auth-page {
    overflow-x: hidden;
  }

  .signup-ambient {
    display: none;
  }

  .auth-shell {
    width: min(100% - 28px, 540px);
    min-height: auto;
    padding: 26px 0 38px;
    align-items: flex-start;
  }

  .auth-card {
    width: 100%;
    max-width: none;
    padding: 29px 22px 26px;
  }

  .auth-card h1 {
    font-size: clamp(29px, 8.5vw, 36px);
    line-height: 1.08;
    overflow-wrap: normal;
  }

  .auth-copy {
    font-size: 13px;
    line-height: 1.62;
  }

  .auth-form input {
    min-height: 44px;
    font-size: 16px;
  }

  .auth-form .primary-button {
    min-height: 46px;
  }

  .confirm-email-shell {
    width: min(100% - 28px, 560px);
    padding-right: 0;
    padding-left: 0;
  }

  .confirm-email-card {
    width: 100%;
  }

  .confirm-email-step {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }

  .admin-mfa-links {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
}

@media (max-width: 420px) {
  .auth-shell {
    width: min(100% - 22px, 520px);
    padding-top: 18px;
  }

  .auth-card {
    padding: 25px 18px 23px;
  }

  .confirm-email-step p,
  .confirm-email-support {
    font-size: 11px;
  }
}
