html,
body {
  height: 100%;
}

.login_page_new_ui {
  display: flex;
  font-weight: 400;
  height: 100%;
  font-family: 'Hellix', sans-serif;
  background-color: var(--color-neutral-background-bold);
  color: var(--color-neutral-content);
}

.login_page_new_ui .left {
  flex: 1;
  background: linear-gradient(109.47deg, rgba(255, 166, 99, 0.15) 0%, rgba(255, 117, 87, 0.15) 51.56%, rgba(227, 123, 211, 0.15) 100%);
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.login_page_new_ui .left:after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 179px;
  height: 239px;
  background: url("../images/login-bg.2c7fadf7bd88.svg") no-repeat center center;
  background-size: contain;
}

.login_page_new_ui .ls-logo {
  width: 414px;
  height: 64px;
  color: var(--color-neutral-content);
}

.login_page_new_ui .hs-logo {
  width: 152px;
  height: 22px;
  color: var(--color-neutral-content);
}

.login_page_new_ui .left h2 {
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: 0em;
  text-align: center;
  margin: 0;
}

.login_page_new_ui .left h3 {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  text-align: center;
  margin: 8px 0 0 0;
}

.login_page_new_ui .left .by {
  position: absolute;
  bottom: 60px;
  left: 60px;
  display: flex;
  flex-direction: column;
  font-size: .75rem;
  font-style: normal;
  font-weight: 400;
  line-height: 28px;
}

.login_page_new_ui .left img {
  color: var(--color-neutral-content);
}

.login_page_new_ui .tips {
  max-width: 520px;
  border-radius: 8px;
  border: 1px solid var(--color-neutral-border);
  background: var(--color-neutral-surface);
  box-shadow: 0 2px 6px 0 rgb(var(--color-neutral-shadow) / 20%);
  padding: 16px;
  margin: 18vh 60px 0 60px;
  position: relative;
  z-index: 3;
}

.login_page_new_ui .tips:after {
  content: 'EF';
  width: 72px;
  height: 72px;
  position: absolute;
  bottom: -58px;
  left: 16px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #29aae1, #4285f4);
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 18px 36px rgba(41, 170, 225, 0.24);
}

.login_page_new_ui .tips .title {
  font-size: 16px;
  font-style: normal;
  font-weight: bold;
  line-height: 24px;
  letter-spacing: 0.15px;
  margin-bottom: 8px;
}

.login_page_new_ui .tips .description {
  font-size: .875rem;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.25px;
}

.login_page_new_ui .tips .description a {
  color: var(--color-primary-content);
  font-size: .875rem;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
  text-decoration: underline;
}

.login_page_new_ui .tips .description a:hover {
  text-decoration: none;
}

.login_page_new_ui .right {
  display: flex;
  flex-direction: column;
  flex: 1;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.login_page_new_ui .toggle {
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: stretch;
}

.login_page_new_ui .toggle>* {
  flex-grow: 1;
  text-align: center;
  padding: .75rem 0;
  font-size: 1rem;
  color: var(--color-neutral-border);
  border-top: 2px solid transparent;
  transition: all 150ms ease-out;
}

.login_page_new_ui .toggle>*.active {
  border-color: var(--color-primary-surface);
  color: var(--color-primary-content);
}

.login_page_new_ui .toggle>*:hover {
  color: var(--color-primary-surface-hover);
  border-color: var(--color-primary-surface-hover);
}

.form-wrapper {
  position: relative;
  background: var(--color-neutral-surface);
  margin-top: 1.5rem;
  border: 1px solid var(--color-neutral-border);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0px 0px 12px rgba(23, 20, 13, 0.16);
  width: 22rem;
}

.form-wrapper h2 {
  font-size: 2rem;
  font-weight: 500;
  margin: 0 0 1rem 0;
  width: 100;
  text-align: center;
}

.login_page_new_ui form {
  display: grid;
  flex-direction: column;
  grid-auto-flow: rows;
  grid-gap: 1rem;
}

.login_page_new_ui form>* {
  position: relative;
}

.login_page_new_ui form p {
  margin: 0;
}

.login_page_new_ui form .error {
  color: var(--color-negative-content);
  font-size: .875rem;
}

.login_page_new_ui form input,
.login_page_new_ui form button,
.login_page_new_ui form select {
  width: 100%;
  font-family: 'Hellix', sans-serif;
}

.login_page_new_ui form input {
  padding: 10px 15px;
  border-radius: var(--corner-radius-smaller);
  box-sizing: border-box;
  border: 1px solid var(--color-neutral-border);
}

.login_page_new_ui form button {
  border-radius: 4rem;
  color: var(--color-neutral-inverted-content);
  padding: 10px 0;
  border: none;
  background: var(--color-neutral-inverted-surface);
  cursor: pointer;
}

.login_page_new_ui form button:hover {
    color: var(--color-neutral-inverted-content);
    background: var(--color-neutral-inverted-surface-hover);
}

.login_page_new_ui .field_errors {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: .875rem;
  line-height: 16px;
  color: var(--color-negative-content);
}

.login_page_new_ui .field_errors li {
  margin-top: .25rem;
}

.auto-generated form {
  width: 100%;
}

.auto-generated form label {
  display: block;
}

.auto-generated form input {
  height: 40px;
  min-height: 40px;
  background: var(--color-neutral-surface);
  font-size: 1rem;
  line-height: 22px;
  border: 1px solid var(--color-neutral-border);
  box-sizing: border-box;
  border-radius: 5px;
  padding: 0 16px;
  transition: box-shadow 80ms ease;
}

.auto-generated p:empty {
  display: none;
}

.auto-generated form ul li:not(:last-child) {
  margin-bottom: 0.5em;
}

.auto-generated form ul {
  margin-bottom: 0;
}

.input-wrapper label {
  font-size: .825rem !important;
  margin-bottom: .2rem;
  font-family: 'Hellix', sans-serif !important;
  font-weight: 500;
}

label {
  font-family: 'Hellix', sans-serif !important;
  font-weight: 500;
  font-size: .825rem !important;
  margin-bottom: .2rem;
  display: block;
}

.login-button {
  font-size: var(--font-size-body-medium);
}

.form-group {
  display: block;
  margin-bottom: .5rem;
}

.form-group input {
  padding: 0;
  height: initial;
  width: initial;
  margin-bottom: 0;
  display: none;
  cursor: pointer;
}

.form-group label {
  position: relative;
  cursor: pointer;
  font-size: .875rem;
}

.form-group label a {
  font-family: 'Hellix', sans-serif !important;
  font-weight: 500;
}

.form-group label:before {
  content: '';
  -webkit-appearance: none;
  background-color: transparent;
  border: 1px solid #CAC5B8;
  padding: 10px;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  vertical-align: middle;
  cursor: pointer;
  margin-right: 5px;
  top: -1px;
}

.form-group input:checked+label:before {
  background: var(--primary_link);
  border: 1px solid var(--primary_link);
}

.form-group input:checked+label:after {
  content: '';
  display: block;
  position: absolute;
  top: 2px;
  left: 8px;
  width: 5px;
  height: 10px;
  border: solid var(--color-primary-surface-content);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.text-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .875rem;
}

.text-wrapper a {
  color: var(--primary_link);
  text-decoration: underline;
  font-weight: 500;
}

.text-wrapper a:hover {
  text-decoration: none;
}

/* EntroFix auth experience, ported onto the existing Django auth forms so
   login/signup keep Label Studio's proven backend, CSRF, and invite flow. */
.login_page_new_ui {
  --entrefix-bg: #eff6ff;
  --entrefix-card: #ffffff;
  --entrefix-ink: #111827;
  --entrefix-muted: #6b7280;
  --entrefix-primary: #29aae1;
  --entrefix-primary-dark: #111827;
  --entrefix-border: rgba(17, 24, 39, 0.12);
  --entrefix-input: #f8fafc;
  --entrefix-shell-width: 1120px;
  min-height: 100vh;
  height: auto;
  padding: 108px clamp(16px, 4vw, 48px) 52px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(41, 170, 225, 0.18), transparent 28%),
    linear-gradient(180deg, #f5fbff 0%, var(--entrefix-bg) 100%);
  color: var(--entrefix-ink);
  overflow-x: hidden;
}

.entrefix-auth-nav {
  position: fixed;
  z-index: 20;
  top: clamp(12px, 2vw, 18px);
  left: 50%;
  width: min(calc(var(--entrefix-shell-width) + 64px), calc(100% - clamp(28px, 8vw, 112px)));
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(10px, 2.4vw, 22px);
  min-height: 58px;
  padding: 7px clamp(14px, 2.4vw, 22px);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.38));
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  animation: entrefixNavIn 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  isolation: isolate;
}

.entrefix-auth-nav::before {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.24)),
    radial-gradient(circle at 12% 20%, rgba(41, 170, 225, 0.16), transparent 34%);
  pointer-events: none;
}

.entrefix-auth-logo,
.entrefix-auth-logo:hover {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--entrefix-ink);
  text-decoration: none;
  transition: transform 180ms ease;
}

.entrefix-auth-logo:hover {
  transform: translateY(-1px);
}

.entrefix-auth-logo-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #29aae1, #4285f4);
  box-shadow: 0 12px 22px rgba(41, 170, 225, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.entrefix-auth-logo:hover .entrefix-auth-logo-icon {
  transform: rotate(-6deg) scale(1.04);
  box-shadow: 0 16px 28px rgba(41, 170, 225, 0.34);
}

.entrefix-auth-logo-icon svg {
  width: 18px;
  height: 18px;
}

.entrefix-auth-logo-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.entrefix-auth-logo-copy strong {
  font-size: 17px;
  letter-spacing: -0.35px;
}

.entrefix-auth-logo-copy small {
  margin-top: 3px;
  font-size: 10px;
  color: var(--entrefix-muted);
  text-transform: lowercase;
}

.entrefix-auth-nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 12px);
  flex: 0 0 auto;
}

.entrefix-auth-nav-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(86px, 9vw, 120px);
  min-height: 44px;
  padding: 0 clamp(14px, 2vw, 20px);
  border-radius: 15px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.entrefix-auth-nav-login {
  color: #fff;
  background: linear-gradient(135deg, #111827, #172033);
  box-shadow: 0 12px 22px rgba(17, 24, 39, 0.2);
}

.entrefix-auth-nav-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(17, 24, 39, 0.28);
}

.entrefix-auth-nav-contact {
  color: #111827;
}

.entrefix-auth-nav-contact:hover {
  transform: translateY(-1px);
  background: rgba(41, 170, 225, 0.08);
}

.login_page_new_ui .left,
.login_page_new_ui .right {
  width: min(calc(var(--entrefix-shell-width) / 2), calc((100vw - clamp(32px, 8vw, 96px)) / 2));
  height: auto;
  min-height: clamp(560px, calc(100vh - 180px), 720px);
  flex: 0 1 560px;
  box-sizing: border-box;
  overflow: hidden;
  animation: entrefixPanelIn 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login_page_new_ui .left {
  background: linear-gradient(135deg, #29aae1, #2faee2 52%, #4285f4);
  border-radius: 42px;
  color: #fff;
  box-shadow: 0 24px 70px rgba(41, 170, 225, 0.22);
  padding: clamp(34px, 4vw, 60px);
}

.login_page_new_ui .left:after {
  display: none;
}

.login_page_new_ui .right {
  background: var(--entrefix-card);
  border-radius: 42px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.12);
  padding: clamp(34px, 4vw, 60px);
  animation-delay: 80ms;
}

.login_page_new_ui.entrefix-login .left {
  order: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.login_page_new_ui.entrefix-login .right {
  order: 1;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.login_page_new_ui.entrefix-signup .right {
  order: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.login_page_new_ui.entrefix-signup .left {
  order: 1;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.login_page_new_ui.entrefix-signup {
  align-items: stretch;
}

.login_page_new_ui.entrefix-signup .left,
.login_page_new_ui.entrefix-signup .right {
  min-height: clamp(700px, calc(100vh - 180px), 860px);
}

.login_page_new_ui .left > .ls-logo,
.login_page_new_ui .left > h3,
.login_page_new_ui .left > .by,
.login_page_new_ui .left > .tips {
  display: none !important;
}

.entrefix-auth-brand {
  width: min(100%, 420px);
  max-width: 420px;
  padding: 0;
  text-align: center;
  color: #fff;
}

.entrefix-auth-hero-logo,
.entrefix-auth-hero-logo:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 42px;
  padding: 12px 18px;
  border-radius: 22px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.entrefix-auth-hero-logo .entrefix-auth-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.entrefix-auth-hero-logo .entrefix-auth-logo-copy {
  text-align: left;
}

.entrefix-auth-hero-logo .entrefix-auth-logo-copy strong {
  color: #fff;
  font-size: 20px;
}

.entrefix-auth-hero-logo .entrefix-auth-logo-copy small {
  color: rgba(255, 255, 255, 0.82);
}

.entrefix-auth-brand h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(48px, 5.2vw, 72px);
  line-height: 0.94;
  font-weight: 800;
  letter-spacing: -2.8px;
  text-align: center;
  text-wrap: balance;
}

.entrefix-copy-login,
.entrefix-copy-signup {
  display: none;
}

.login_page_new_ui.entrefix-login .entrefix-copy-login,
.login_page_new_ui.entrefix-signup .entrefix-copy-signup {
  display: block;
}

.entrefix-auth-brand h2 .entrefix-copy-login,
.entrefix-auth-brand h2 .entrefix-copy-signup,
.entrefix-auth-brand p .entrefix-copy-login,
.entrefix-auth-brand p .entrefix-copy-signup {
  width: 100%;
}

.entrefix-auth-brand p {
  margin: 0 0 34px;
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.94);
  text-align: center;
  text-wrap: balance;
}

.entrefix-auth-powered {
  display: inline-flex;
  padding: 12px 26px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.18);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.form-wrapper {
  width: min(424px, 100%);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.entrefix-form-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 14px;
  color: var(--entrefix-primary);
  background: #eff6ff;
}

.entrefix-form-icon svg {
  width: 26px;
  height: 26px;
}

.form-wrapper h2 {
  margin: 0;
  color: var(--entrefix-ink);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  text-align: center;
}

.entrefix-form-subtitle {
  margin: 8px 0 34px !important;
  color: var(--entrefix-muted);
  text-align: center;
}

.login_page_new_ui form {
  gap: 18px;
}

.input-wrapper label,
label {
  color: #374151;
  font-size: 14px !important;
  font-weight: 700;
}

.login_page_new_ui form input,
.login_page_new_ui form select {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: #111827;
  background: var(--entrefix-input);
  font-size: 16px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.login_page_new_ui form input:focus,
.login_page_new_ui form select:focus {
  border-color: var(--entrefix-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(41, 170, 225, 0.12);
}

.login_page_new_ui form button,
.login_page_new_ui form .lsf-button-ls {
  min-height: 56px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #29aae1, #4285f4);
  box-shadow: 0 16px 28px rgba(41, 170, 225, 0.26);
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login_page_new_ui form button:hover,
.login_page_new_ui form .lsf-button-ls:hover {
  background: linear-gradient(135deg, #2399cb, #3476df);
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(41, 170, 225, 0.3);
}

.form-group {
  margin-bottom: 0;
}

.form-group label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: var(--entrefix-muted);
  font-weight: 600;
}

.entrefix-security-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 13px;
  line-height: 1.45;
}

.entrefix-security-note span {
  width: 20px;
  height: 20px;
  display: grid;
  flex: 0 0 20px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--entrefix-primary);
  font-size: 12px;
  font-weight: 800;
}

.entrefix-security-note p {
  margin: 0 !important;
}

.text-wrapper {
  margin-top: 24px;
  color: var(--entrefix-muted);
}

.text-wrapper a {
  color: var(--entrefix-primary);
  text-decoration: none;
}

@media (max-width: 920px) {
  .login_page_new_ui {
    padding: 92px 16px 32px;
    flex-direction: column;
  }

  .entrefix-auth-nav {
    top: 10px;
    width: calc(100% - 20px);
    min-height: 54px;
    padding: 6px 10px;
    gap: 10px;
  }

  .entrefix-auth-nav-actions a {
    min-width: auto;
    min-height: 36px;
    padding: 0 11px;
    border-radius: 12px;
    font-size: 13px;
  }

  .entrefix-auth-nav-contact {
    display: inline-flex !important;
  }

  .login_page_new_ui .left,
  .login_page_new_ui .right {
    width: min(100%, 560px);
    min-height: auto;
    flex: 0 0 auto;
    border-radius: 28px !important;
  }

  .login_page_new_ui .left {
    min-height: 260px;
  }

  .login_page_new_ui.entrefix-signup .left {
    min-height: 340px;
  }

  .login_page_new_ui.entrefix-signup .right {
    min-height: auto;
  }

  .login_page_new_ui.entrefix-login .left,
  .login_page_new_ui.entrefix-signup .right {
    order: 0;
  }

  .login_page_new_ui.entrefix-login .right,
  .login_page_new_ui.entrefix-signup .left {
    order: 1;
  }

  .login_page_new_ui .right {
    padding: 36px 0;
    margin-top: 16px;
  }

  .entrefix-auth-brand {
    width: min(100%, 380px);
  }

  .entrefix-auth-brand h2 {
    font-size: 38px;
    letter-spacing: -1.5px;
  }
}

@media (max-width: 560px) {
  .login_page_new_ui {
    padding-top: 88px;
  }

  .entrefix-auth-logo {
    gap: 8px;
  }

  .entrefix-auth-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .entrefix-auth-logo-copy strong {
    font-size: 14px;
  }

  .entrefix-auth-logo-copy small {
    font-size: 9px;
  }

  .entrefix-auth-nav-actions a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  .entrefix-auth-logo-copy small,
  .entrefix-auth-nav-contact {
    display: none !important;
  }
}

@keyframes entrefixNavIn {
  from {
    opacity: 0;
    transform: translate(-50%, -14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes entrefixPanelIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .entrefix-auth-nav,
  .login_page_new_ui .left,
  .login_page_new_ui .right {
    animation: none;
  }

  .entrefix-auth-logo,
  .entrefix-auth-logo-icon,
  .entrefix-auth-nav-actions a,
  .login_page_new_ui form button,
  .login_page_new_ui form .lsf-button-ls {
    transition: none;
  }
}
