@layer components {
  .auth-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    color: #172033;
    background:
      radial-gradient(circle at top left, rgba(14, 116, 144, 0.16), transparent 28rem),
      linear-gradient(135deg, #f8fafc 0%, #eef2f7 46%, #f8f7f2 100%);
  }

  .auth-card {
    width: min(100%, 26rem);
    padding: clamp(1.5rem, 5vw, 2.25rem);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    box-shadow: 0 1.5rem 4rem rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(16px);
  }

  .auth-title {
    margin-bottom: 1.25rem;
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 720;
    letter-spacing: 0;
  }

  .auth-title:empty {
    display: none;
  }

  .login {
    display: grid;
    gap: 1rem;
  }

  .login h1:not(.visually-hidden) {
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 720;
    letter-spacing: 0;
  }

  .login p {
    color: #475569;
  }

  .login form {
    display: grid;
    gap: 0.8rem;
  }

  .login input[type="email"],
  .login input[type="password"],
  .login input[type="text"],
  .login select {
    min-height: 2.85rem;
    padding-inline: 0.85rem;
    border-radius: 8px;
    background-color: #ffffff;
  }

  .auth-button,
  .login input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.85rem;
    padding: 0.65rem 1rem;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    background: #0f766e;
    border: 1px solid #0f766e;
    border-radius: 8px;
    box-shadow: 0 0.55rem 1.2rem rgba(15, 118, 110, 0.18);
    transition:
      background-color 0.15s ease,
      border-color 0.15s ease,
      box-shadow 0.15s ease,
      transform 0.15s ease;
  }

  .auth-button:hover,
  .login input[type="submit"]:hover {
    background: #115e59;
    border-color: #115e59;
    box-shadow: 0 0.75rem 1.35rem rgba(15, 118, 110, 0.22);
  }

  .auth-button:focus-visible,
  .login input[type="submit"]:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.28);
    outline-offset: 3px;
  }

  .auth-button:active,
  .login input[type="submit"]:active {
    transform: translateY(1px);
  }

  .auth-form-links,
  .login .forgot-password-link {
    color: #0f766e;
    font-size: 0.95rem;
    font-weight: 650;
  }

  .auth-form-links {
    display: flex;
    justify-content: center;
    margin-top: 0.25rem;
  }

  .auth-link,
  .forgot-password-link {
    text-decoration: none;
    text-underline-offset: 0.2em;
  }

  .auth-link:hover,
  .forgot-password-link:hover {
    text-decoration: underline;
  }

  .login .alert,
  .login .notice {
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .login .alert {
    color: #7f1d1d;
    background: #fef2f2;
    border: 1px solid #fecaca;
  }

  .login .notice {
    color: #164e63;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
  }

  @media (max-width: 520px) {
    .auth-layout {
      align-items: start;
      padding-inline: 0.75rem;
    }

    .auth-card {
      margin-top: 1rem;
    }
  }
}
