@layer components {
  .auth-layout {
    position: fixed;
    inset: 0;
    display: flex;
    /* Column so the auth footer hint (yield :auth_footer) sits below the card. */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: auto;
  }

  .auth-card {
    width: min(24rem, 95vw);
    max-height: 95vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--dialog-border-color, lightgray);
    border-radius: 1rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
  }

  .auth-title {
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
  }

  .auth-form-actions {
    margin-top: 0.5rem;
  }

  .auth-form-links {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
    font-size: 0.9rem;
  }

  .auth-link {
    color: var(--color-primary, #8a2740);
    font-weight: 500;
    text-decoration: none;
  }

  .auth-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  /* Trovaro brand lock-up on the auth pages: gold-book logo beside the Fredoka
     wordmark, echoing the app header. */
  .auth-brand {
    margin-bottom: 1.5rem;
    gap: 0.55rem;
  }

  .auth-brand-logo {
    height: 2.5rem;
    width: 2.5rem;
  }

  .auth-brand-name {
    font-family: var(--font-brand);
    font-weight: 600;
    font-size: 1.75rem;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--wine);
  }

  /* The registration-closed notice, centred under the brand and title. */
  .auth-card:has(.registration-closed) .auth-title {
    text-align: center;
  }

  .registration-closed {
    text-align: center;
  }

  .registration-closed-body {
    color: var(--muted, #6a5560);
    line-height: 1.6;
  }
}
