@layer pages {
  .login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 32px;
    background: radial-gradient(circle at 8% 12%, #dceaff 0, transparent 30%),
      radial-gradient(circle at 95% 88%, #e1e8ff 0, transparent 32%), #f3f6fb;
  }

  .login-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    width: min(100%, 960px);
    min-height: 560px;
    overflow: hidden;
    border: 1px solid #e2e9f3;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(23, 47, 91, 0.12), 0 4px 14px rgba(23, 47, 91, 0.05);
  }

  .login-brand {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    overflow: hidden;
    padding: 42px;
    color: #fff;
    background: linear-gradient(145deg, #101c43 0%, #142e71 58%, #1850a8 100%);
  }

  .login-brand::before,
  .login-brand::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(183, 218, 255, 0.16);
    border-radius: 50%;
    pointer-events: none;
  }

  .login-brand::before {
    width: 440px;
    height: 440px;
    right: -230px;
    top: 70px;
    box-shadow: 0 0 0 74px rgba(149, 205, 255, 0.055), 0 0 0 148px rgba(149, 205, 255, 0.035);
  }

  .login-brand::after {
    width: 210px;
    height: 210px;
    left: -150px;
    bottom: -100px;
    background: rgba(102, 173, 255, 0.08);
  }

  .login-logo-frame {
    align-self: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(4, 17, 47, 0.15);
  }

  .login-logo {
    width: 220px;
    height: auto;
  }

  .login-brand-copy {
    max-width: 320px;
  }

  .login-eyebrow,
  .login-brand-footer,
  .login-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
  }

  .login-eyebrow {
    color: #9fd5ff;
  }

  .login-brand h2 {
    margin: 16px 0;
    font-size: clamp(30px, 3.5vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.045em;
  }

  .login-brand-copy p {
    color: #c5d8f4;
    line-height: 1.6;
  }

  .login-brand-footer {
    color: #8eb8ec;
  }

  .login-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 6vw, 68px);
  }

  .login-heading-mark {
    display: block;
    width: 32px;
    height: 4px;
    margin-bottom: 26px;
    border-radius: 4px;
    background: #2870e8;
  }

  .login-kicker {
    color: #2863c3;
  }

  .login-heading h1 {
    margin: 10px 0 8px;
    color: #14213c;
    font-size: clamp(28px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.035em;
  }

  .login-heading > p:last-child,
  .login-help {
    color: #687790;
  }

  .login-form {
    display: grid;
    gap: 20px;
    margin-top: 34px;
  }

  .login-field {
    display: grid;
    gap: 8px;
  }

  .login-field label {
    color: #243654;
    font-size: 14px;
    font-weight: 700;
  }

  .login-field input {
    min-height: 50px;
    padding: 12px 15px;
    border: 1px solid #cdd8e8;
    border-radius: 10px;
    background: #f9fbff;
    color: #172744;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  }

  .login-field input::placeholder {
    color: #8794a9;
  }

  .login-field input:focus {
    outline: none;
    border-color: #3275e8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(50, 117, 232, 0.16);
  }

  .login-password-field {
    position: relative;
  }

  .login-password-field input {
    padding-right: 94px;
  }

  .login-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    min-height: 36px;
    padding: 6px 9px;
    border-radius: 7px;
    background: transparent;
    color: #2863c3;
    font-size: 13px;
    font-weight: 700;
  }

  .login-password-toggle:hover {
    background: #eaf1ff;
    filter: none;
  }

  .login-submit {
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    margin-top: 6px;
    padding: 12px 18px;
    border-radius: 10px;
    background: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.19);
  }

  .login-submit:hover {
    background: #1d4ed8;
    filter: none;
  }

  .login-submit span {
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
  }

  .login-help {
    margin-top: 28px;
    font-size: 12px;
    text-align: center;
  }

  .login-error {
    margin-top: 24px;
    padding: 12px 14px;
    border: 1px solid #fac5c5;
    border-radius: 9px;
    background: #fff2f2;
    color: #9c2424;
    font-size: 14px;
  }

  @media (max-width: 680px) {
    .login-page {
      padding: 16px;
    }

    .login-shell {
      grid-template-columns: 1fr;
      min-height: 0;
      border-radius: 18px;
    }

    .login-brand {
      gap: 12px;
      padding: 25px 28px;
    }

    .login-brand-copy,
    .login-brand-footer {
      display: none;
    }

    .login-logo-frame {
      padding: 9px 11px;
    }

    .login-logo {
      width: 175px;
    }

    .login-content {
      padding: 34px 28px 36px;
    }

    .login-heading-mark {
      margin-bottom: 22px;
    }
  }

  @media (max-width: 380px) {
    .login-page {
      padding: 10px;
    }

    .login-content {
      padding-inline: 22px;
    }
  }
}
