/* Premium split login for the public SedaFlow build. Scoped to login mode only. */
.auth-visual-panel {
  display: none;
}

body.public-login-mode {
  background: #f6faff;
}

body.public-login-mode .auth-gate {
  min-height: 100dvh;
  display: grid;
  place-items: stretch;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(82, 137, 255, 0.15), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

body.public-login-mode .auth-card {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(460px, 1fr);
  grid-template-rows: minmax(24px, 1fr) auto auto minmax(24px, 1fr);
  grid-template-areas:
    "visual top"
    "visual brand"
    "visual form"
    "visual bottom";
  align-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.public-login-mode .auth-visual-panel {
  grid-area: visual;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(23, 87, 240, 0.16), rgba(48, 115, 255, 0.08)),
    url("/assets/login-side-image.png"),
    url("/assets/login-side-image.svg"),
    radial-gradient(circle at 22% 14%, rgba(255, 255, 255, 0.25), transparent 18%),
    linear-gradient(145deg, #2f7bff 0%, #2459dc 100%);
  background-position: center, center, center, center, center;
  background-size: cover, cover, cover, cover, cover;
  background-repeat: no-repeat;
  box-shadow: 34px 0 92px rgba(19, 63, 150, 0.18);
}

body.public-login-mode .auth-visual-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 45, 132, 0.08), transparent 38%),
    radial-gradient(circle at 68% 50%, rgba(255, 255, 255, 0.08), transparent 34%);
  pointer-events: none;
}

body.public-login-mode .auth-branding,
body.public-login-mode .auth-form,
body.public-login-mode .auth-connection {
  width: min(520px, calc(100% - 72px));
  justify-self: center;
}

body.public-login-mode .auth-branding {
  grid-area: brand;
  display: block;
  margin: 0 0 26px;
  text-align: left;
}

body.public-login-mode .auth-logo {
  display: block;
  width: clamp(160px, 16vw, 230px);
  max-width: 100%;
  height: auto;
  margin: 0 0 22px;
  object-fit: contain;
}

body.public-login-mode .auth-brand-copy h2 {
  margin: 0;
  color: #10294f;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

body.public-login-mode .auth-brand-copy p {
  margin: 12px 0 0;
  color: #6b82aa;
  font-size: clamp(0.96rem, 1.1vw, 1.08rem);
  font-weight: 600;
  line-height: 1.5;
}

body.public-login-mode .auth-form {
  grid-area: form;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 14px;
  max-width: 520px;
  padding: 0;
}

body.public-login-mode .auth-back-button {
  justify-self: start;
  min-height: 42px;
  padding: 0 16px;
  border-color: rgba(82, 137, 255, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: #244b87;
  box-shadow: 0 10px 24px rgba(37, 86, 166, 0.08);
}

body.public-login-mode .auth-field {
  position: relative;
  display: grid;
  gap: 8px;
}

body.public-login-mode .auth-field > span:first-child {
  margin-left: 16px;
  color: #16345f;
  font-size: 0.88rem;
  font-weight: 800;
}

body.public-login-mode .auth-field::before {
  content: "";
  position: absolute;
  left: 20px;
  bottom: 17px;
  z-index: 2;
  width: 21px;
  height: 21px;
  background: #4f82ff;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  opacity: 0.9;
  pointer-events: none;
}

body.public-login-mode .auth-field-email::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.75 6.5h14.5a1.75 1.75 0 0 1 1.75 1.75v7.5a1.75 1.75 0 0 1-1.75 1.75H4.75A1.75 1.75 0 0 1 3 15.75v-7.5A1.75 1.75 0 0 1 4.75 6.5Zm.05 1.75 6.1 4.45a1.85 1.85 0 0 0 2.2 0l6.1-4.45' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.75 6.5h14.5a1.75 1.75 0 0 1 1.75 1.75v7.5a1.75 1.75 0 0 1-1.75 1.75H4.75A1.75 1.75 0 0 1 3 15.75v-7.5A1.75 1.75 0 0 1 4.75 6.5Zm.05 1.75 6.1 4.45a1.85 1.85 0 0 0 2.2 0l6.1-4.45' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body.public-login-mode .auth-field-password::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.5 10V8.3a4.5 4.5 0 0 1 9 0V10m-10.25 0h11.5c.97 0 1.75.78 1.75 1.75v6A1.75 1.75 0 0 1 17.75 19.5H6.25a1.75 1.75 0 0 1-1.75-1.75v-6c0-.97.78-1.75 1.75-1.75Zm5.75 3.25v2.2' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.5 10V8.3a4.5 4.5 0 0 1 9 0V10m-10.25 0h11.5c.97 0 1.75.78 1.75 1.75v6A1.75 1.75 0 0 1 17.75 19.5H6.25a1.75 1.75 0 0 1-1.75-1.75v-6c0-.97.78-1.75 1.75-1.75Zm5.75 3.25v2.2' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body.public-login-mode .auth-field input,
body.public-login-mode .password-input-shell input {
  width: 100%;
  min-height: 60px;
  padding: 0 22px 0 56px;
  border: 1px solid rgba(153, 189, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #10294f;
  font-size: 1rem;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 14px 40px rgba(24, 83, 181, 0.08);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

body.public-login-mode .password-input-shell input {
  padding-right: 92px;
}

body.public-login-mode .auth-field input::placeholder,
body.public-login-mode .password-input-shell input::placeholder {
  color: rgba(83, 110, 154, 0.62);
  font-weight: 650;
}

body.public-login-mode .auth-field:focus-within input,
body.public-login-mode .password-input-shell:focus-within input {
  border-color: rgba(66, 121, 255, 0.95);
  background: #ffffff;
  box-shadow:
    0 0 0 5px rgba(82, 137, 255, 0.12),
    0 18px 44px rgba(24, 83, 181, 0.12);
  outline: none;
}

body.public-login-mode .password-toggle-button {
  right: 12px;
  min-width: 66px;
  min-height: 38px;
  border: 1px solid rgba(82, 137, 255, 0.22);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.92);
  color: #3466c7;
  font-size: 0.82rem;
  font-weight: 850;
  box-shadow: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

body.public-login-mode .password-toggle-button:hover {
  background: rgba(82, 137, 255, 0.12);
  color: #174ea6;
  transform: translateY(-50%) scale(1.03);
}

body.public-login-mode .auth-link-button {
  justify-self: end;
  grid-column: auto;
  margin: -2px 8px 2px 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #173b72;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 160ms ease;
}

body.public-login-mode .auth-link-button:hover {
  color: #3f75ee;
  text-decoration: underline;
  text-underline-offset: 4px;
}

body.public-login-mode .auth-form .primary-button {
  width: 100%;
  min-height: 60px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5da3ff 0%, #3156df 100%);
  color: #ffffff;
  font-size: 1.03rem;
  font-weight: 900;
  box-shadow: 0 22px 48px rgba(45, 91, 222, 0.28);
  transition: transform 170ms ease, box-shadow 170ms ease, filter 170ms ease;
}

body.public-login-mode .auth-form .primary-button:hover:not(:disabled) {
  filter: saturate(1.04) brightness(0.98);
  transform: translateY(-1px);
  box-shadow: 0 26px 54px rgba(45, 91, 222, 0.34);
}

body.public-login-mode .auth-form .primary-button:disabled {
  cursor: wait;
  filter: grayscale(0.08) brightness(0.96);
  opacity: 0.78;
}

body.public-login-mode .auth-brand-line,
body.public-login-mode .auth-brand-note {
  margin: 0;
  text-align: center;
}

body.public-login-mode .auth-brand-line {
  margin-top: 8px;
  color: #11305d;
  font-size: 0.98rem;
  font-weight: 850;
}

body.public-login-mode .auth-brand-note {
  color: #6d83aa;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
}

body.public-login-mode .auth-error {
  margin: 2px 0 0;
  padding: 11px 14px;
  border: 1px solid rgba(232, 112, 132, 0.34);
  border-radius: 18px;
  background: rgba(255, 238, 242, 0.82);
  color: #a24658;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

body.public-login-mode .auth-connection {
  grid-column: 2;
  grid-row: 4;
  max-width: 520px;
  margin: 18px 0 0;
}

@media (max-width: 1080px) {
  body.public-login-mode .auth-card {
    grid-template-columns: minmax(280px, 0.42fr) minmax(420px, 0.58fr);
  }
}

@media (max-width: 860px) {
  body.public-login-mode .auth-gate {
    overflow: auto;
  }

  body.public-login-mode .auth-card {
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: 150px auto auto auto;
    grid-template-areas:
      "visual"
      "brand"
      "form"
      "bottom";
    padding: 0 0 28px;
  }

  body.public-login-mode .auth-visual-panel {
    min-height: 150px;
    height: 150px;
    box-shadow: 0 24px 60px rgba(19, 63, 150, 0.14);
  }

  body.public-login-mode .auth-branding,
  body.public-login-mode .auth-form,
  body.public-login-mode .auth-connection {
    width: min(520px, calc(100% - 42px));
  }

  body.public-login-mode .auth-branding {
    margin-top: 28px;
    margin-bottom: 20px;
    text-align: center;
  }

  body.public-login-mode .auth-logo {
    width: clamp(138px, 42vw, 190px);
    margin: 0 auto 16px;
  }

  body.public-login-mode .auth-brand-copy h2 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  body.public-login-mode .auth-connection {
    grid-column: 1;
  }
}

@media (max-width: 520px) {
  body.public-login-mode .auth-card {
    grid-template-rows: 104px auto auto auto;
  }

  body.public-login-mode .auth-visual-panel {
    min-height: 104px;
    height: 104px;
  }

  body.public-login-mode .auth-field input,
  body.public-login-mode .password-input-shell input,
  body.public-login-mode .auth-form .primary-button {
    min-height: 56px;
  }

  body.public-login-mode .auth-field::before {
    bottom: 16px;
  }
}
