.login-shell {
  width: min(1440px, calc(100% - 48px));
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 28px 0;
}

.login-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.46fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 14px;
  padding: clamp(28px, 4vw, 56px) clamp(28px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 249, 0.94) 64%, rgba(255, 251, 230, 0.82)),
    #fff;
  box-shadow: 0 24px 70px rgba(13, 27, 62, 0.12);
}

.login-visual {
  position: relative;
  align-self: center;
  min-height: 260px;
  max-height: 420px;
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(0, 128, 55, 0.12), rgba(255, 231, 0, 0.18)),
    url("../assets/portal-hero.png") center / cover no-repeat;
}

.login-ring {
  position: absolute;
  border: 1px solid rgba(0, 128, 55, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.login-ring.one {
  width: 170px;
  height: 170px;
  right: 24px;
  top: 28px;
}

.login-ring.two {
  width: 112px;
  height: 112px;
  left: 28px;
  bottom: 34px;
}

.login-lock {
  position: absolute;
  right: 42px;
  bottom: 42px;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #008037;
  box-shadow: 0 14px 34px rgba(0, 128, 55, 0.28);
  font-size: 2rem;
  font-weight: 900;
}

.login-copy {
  display: grid;
  align-content: center;
}

.login-eyebrow {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.login-card h1 {
  max-width: 640px;
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.login-intro {
  max-width: 640px;
  margin-bottom: 24px;
  color: #475268;
  font-size: 1.08rem;
  line-height: 1.5;
}

.remembered-portal {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 128, 55, 0.18);
  border-radius: 10px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(240, 250, 244, 0.96), rgba(255, 255, 255, 0.94)),
    #fff;
  box-shadow: 0 14px 34px rgba(13, 27, 62, 0.08);
}

.remembered-portal[hidden] {
  display: none;
}

.remembered-portal strong {
  display: block;
  color: #0d1b3e;
  font-size: 1.08rem;
  font-weight: 950;
}

.remembered-portal span {
  display: block;
  margin-top: 4px;
  color: #475268;
  line-height: 1.4;
}

.remembered-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #0d1b3e;
  font-weight: 900;
}

.login-form input {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(13, 27, 62, 0.14);
  border-radius: 8px;
  padding: 0 15px;
  background: #fff;
  color: #172033;
  font-size: 1rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(13, 27, 62, 0.03);
}

.login-form input:focus {
  border-color: rgba(0, 128, 55, 0.62);
  box-shadow: 0 0 0 4px rgba(0, 128, 55, 0.1);
}

.login-primary {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #fff;
  background: #008037;
  box-shadow: 0 14px 34px rgba(0, 128, 55, 0.2);
  font-weight: 950;
  cursor: pointer;
}

.login-message {
  min-height: 24px;
  margin-top: 12px;
  color: #b45309;
  font-weight: 900;
}

.login-help-toggle {
  margin-top: 18px;
}

.login-help-toggle summary {
  cursor: pointer;
  color: #475268;
  font-weight: 900;
  list-style: none;
}

.login-help-toggle summary::-webkit-details-marker {
  display: none;
}

.login-help-toggle summary span {
  color: #008037;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 950;
}

.login-help {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  border-left: 4px solid #ffe700;
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(255, 231, 0, 0.18);
  color: #172033;
}

.login-help strong {
  color: #0d1b3e;
}

.login-help span {
  display: block;
  margin-top: 4px;
  color: #475268;
  line-height: 1.45;
}

.link-request-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.link-request-form label {
  display: grid;
  gap: 7px;
  color: #0d1b3e;
  font-weight: 900;
}

.link-request-form input {
  min-height: 50px;
  border: 1px solid rgba(13, 27, 62, 0.14);
  border-radius: 8px;
  padding: 0 13px;
  background: #fff;
  outline: none;
}

.link-request-form input:focus {
  border-color: rgba(0, 128, 55, 0.62);
  box-shadow: 0 0 0 4px rgba(0, 128, 55, 0.1);
}

.login-secondary {
  min-height: 50px;
  border: 1px solid rgba(0, 128, 55, 0.2);
  border-radius: 999px;
  padding: 0 17px;
  color: #008037;
  background: #fff;
  font-weight: 950;
  cursor: pointer;
  white-space: nowrap;
}

.login-secondary:disabled {
  cursor: wait;
  opacity: 0.66;
}

.login-link-button {
  min-height: 44px;
  border: 0;
  padding: 0 8px;
  color: #008037;
  background: transparent;
  cursor: pointer;
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.link-request-message {
  min-height: 20px;
  margin: -4px 0 0;
  color: #475268;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.35;
}

.link-request-message[data-tone="success"] {
  color: #008037;
}

.link-request-message[data-tone="warning"] {
  color: #b45309;
}

@media (max-width: 760px) {
  .login-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
  }

  .login-visual {
    min-height: 150px;
  }

  /* Logo + "Your Loan Portal" move on top of the hero image as a small badge
     instead of sitting in their own row above the headline — keeps the
     headline, intro, and buttons higher on the screen. Desktop is untouched:
     .login-copy stays position:static there, so this rule has no effect. */
  .login-brand-mobile {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 18px rgba(13, 27, 62, 0.14);
  }

  .login-brand-mobile .brand-logo {
    width: min(110px, 34vw);
    margin-bottom: 0;
  }

  .login-brand-mobile .login-eyebrow {
    margin-bottom: 0;
    font-size: 0.82rem;
  }

  .login-card h1 {
    font-size: 2.25rem;
  }

  .link-request-form {
    grid-template-columns: 1fr;
  }

  .login-secondary {
    width: 100%;
  }

  .remembered-actions {
    display: grid;
  }

  .remembered-actions .login-primary {
    width: 100%;
  }
}
