/*
 * SHEQ24 sign-in theme (LOGIN_THEME=sheq24). Loaded after sheq-auth.css, and only when the theme is on: see
 * frontend/templates/auth/themes/sheq24/. Every rule is scoped to .sq-auth, so the standard page cannot change.
 *
 * The picture uploaded in Super Admin › Login Page fills the screen (.sq-auth__photo). A navy tint over it, darkest
 * behind the headline, is what keeps the white words readable on ANY photo, light or dark: do not make it lighter
 * because today's picture happens to be dark. Colours come from the SHEQ24 logo (navy #1C3F59, blue #3680A7).
 * Contrast on white: navy 11.0:1, the link blue #2C6E91 5.6:1, the grey #4A5563 7.6:1, placeholders #6B7785 4.6:1.
 *
 * Desktop (980px and wider): the headline on the left, the card on the right, as the mockup at 1440 x 900.
 * Narrower: the picture becomes a band across the top and the card sits below it, overlapping its edge.
 */
.sq-auth {
  --sq-navy: #1C3F59;
  --sq-navy-deep: #10222F;
  --sq-blue: #3680A7;
  --sq-blue-text: #2C6E91;
  --sq-blue-light: #9FD3EE;
  --sq-ink: #1F2A36;
  --sq-muted: #4A5563;
  --sq-placeholder: #6B7785;
  --sq-field-line: #C9D3DD;
  --sq-hairline: #DBDFE9;
  --sq-mist: #F3F6F9;
  --sq-white: #FFFFFF;

  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--sq-navy-deep);
  color: var(--sq-ink);
  font-family: "Inter", "Poppins", system-ui, sans-serif;
  font-weight: 400;
  font-size: 14px;
}

/* --- the uploaded picture and its tint --------------------------------------------------------------------------- */
.sq-auth__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.sq-auth__photo,
.sq-auth__tint {
  position: absolute;
  inset: 0;
  display: block;
}
.sq-auth__photo {
  background-color: var(--sq-navy);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.sq-auth__tint {
  background:
    linear-gradient(0deg, rgba(10, 24, 36, 0.7) 0%, rgba(10, 24, 36, 0) 24%),
    linear-gradient(90deg, rgba(12, 30, 44, 0.95) 0%, rgba(18, 44, 64, 0.86) 30%, rgba(28, 63, 89, 0.46) 58%, rgba(28, 63, 89, 0.18) 100%);
}
/* The rounded frame of the SHEQ24 logo, drawn large and faint behind the headline. */
.sq-auth__frame {
  position: absolute;
  left: 4.4vw;
  top: 21.8vh;
  width: 48.6vw;
  height: 56.4vh;
  box-sizing: border-box;
  border: 1.5px solid rgba(159, 211, 238, 0.28);
  border-radius: 56px;
  pointer-events: none;
}

/* --- the headline ------------------------------------------------------------------------------------------------ */
.sq-auth__brand {
  position: absolute;
  z-index: 1;
  left: 7.8vw;
  top: 0;
  bottom: 0;
  width: min(600px, 42vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}
.sq-auth .sq-auth__eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sq-blue-light);
}
.sq-auth__bar {
  display: block;
  width: 120px;
  height: 5px;
  border-radius: 3px;
  background: var(--sq-blue);
}
.sq-auth .sq-auth__headline {
  margin: 0;
  font-family: "Poppins", "Inter", sans-serif;
  font-weight: 600;
  font-size: clamp(38px, 3.75vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--sq-white);
}
.sq-auth .sq-auth__lede {
  margin: 0;
  max-width: 460px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

/* --- the card ---------------------------------------------------------------------------------------------------- */
.sq-auth__panel {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-height: 100vh;
  width: min(456px, calc(39.4vw - 32px));
  margin-left: 60.6vw;
  padding: 48px 0 80px;
  display: flex;
  align-items: center;
}
.sq-auth__card {
  width: 100%;
  box-sizing: border-box;
  padding: 40px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 0 var(--sq-white), 0 34px 90px rgba(6, 16, 26, 0.5);
  display: flex;
  flex-direction: column;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sq-auth__card {
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
            backdrop-filter: blur(24px) saturate(150%);
  }
}
.sq-auth__logo {
  display: block;
  align-self: center;
  width: auto;
  max-width: 100%;
  height: 96px;
}
.sq-auth .sq-auth__title {
  margin: 28px 0 0;
  font-family: "Poppins", "Inter", sans-serif;
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  color: var(--sq-navy);
}
.sq-auth__rule {
  display: block;
  width: 44px;
  height: 4px;
  margin: 12px 0 14px;
  border-radius: 2px;
  background: var(--sq-blue);
}
.sq-auth .sq-auth__sub {
  margin: 0 0 26px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--sq-muted);
}

/* --- the shared form, restyled (its markup is the page's own and the same under every theme) ------------------- */
.sq-auth .login100-form {
  display: block;
}
.sq-auth .wrap-input100 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  border-bottom: 0;
}
.sq-auth .m-b-23 {
  margin-bottom: 20px;
}
.sq-auth .label-input100,
.sq-auth .label-input100--muted {
  padding-left: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--sq-ink);
}
.sq-auth .sheq-auth-hint {
  color: var(--sq-muted);
}
.sq-auth .auth-aside-link,
.sq-auth .auth-aside-link:hover,
.sq-auth .auth-aside-link:focus {
  font-size: 13px;
  font-weight: 600;
  color: var(--sq-blue-text);
}
.sq-auth .auth-aside-link:hover {
  color: var(--sq-navy);
  text-decoration: underline;
}
.sq-auth .auth-aside-link:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 3px rgba(54, 128, 167, 0.35);
}
.sq-auth .input100 {
  flex: 1 0 100%;
  height: 52px;
  padding: 0 16px 0 48px;
  border: 1px solid var(--sq-field-line);
  border-radius: 12px;
  background: var(--sq-white);
  color: var(--sq-ink);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sq-auth .input100::placeholder {
  color: var(--sq-placeholder);
}
.sq-auth .input100:focus {
  border-color: var(--sq-blue-text);
  box-shadow: 0 0 0 4px rgba(54, 128, 167, 0.2);
}
/* A browser that autofills a saved login paints its own pale-blue field: an inset shadow is the only lever it honours. */
.sq-auth .input100:-webkit-autofill,
.sq-auth .input100:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--sq-ink);
  caret-color: var(--sq-ink);
  box-shadow: 0 0 0 1000px var(--sq-white) inset;
}
.sq-auth .input100:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--sq-ink);
  caret-color: var(--sq-ink);
  box-shadow: 0 0 0 1000px var(--sq-white) inset, 0 0 0 4px rgba(54, 128, 167, 0.2);
}
.sq-auth .focus-input100 {
  top: auto;
  bottom: 0;
  height: 52px;
}
.sq-auth .focus-input100::before {
  display: none;
}
.sq-auth .focus-input100::after,
.sq-auth .input100:focus + .focus-input100::after,
.sq-auth .has-val.input100 + .focus-input100::after {
  left: 16px;
  top: 0;
  bottom: 0;
  height: 100%;
  color: var(--sq-blue-text);
}
.sq-auth .m-t-50,
.sq-auth .m-t-30 {
  margin-top: 28px;
}
.sq-auth .login100-form-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  border-radius: 12px;
  background: var(--sq-navy);
  color: var(--sq-white);
  font-family: "Poppins", "Inter", sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 30px rgba(28, 63, 89, 0.4);
  transition: background-color 0.2s;
}
.sq-auth .login100-form-btn::after {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--sq-blue-light);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sq-auth .login100-form-btn:hover {
  background: var(--sq-blue-text);
}
.sq-auth .login100-form-btn:focus-visible {
  outline: 3px solid var(--sq-blue);
  outline-offset: 3px;
}

/* --- credit and version ------------------------------------------------------------------------------------------ */
.sq-auth .sq-auth__credit {
  position: absolute;
  z-index: 1;
  left: 7.8vw;
  bottom: 30px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}
.sq-auth .sq-auth__version {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: 24px;
  margin: 0;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--sq-hairline);
  background: var(--sq-white);
  font-size: 12px;
  line-height: 1.5;
  color: var(--sq-muted);
}

/* --- narrower screens: the picture becomes a band across the top ------------------------------------------------- */
@media (max-width: 979px) {
  .sq-auth {
    background: var(--sq-mist);
  }
  .sq-auth__media {
    bottom: auto;
    height: 300px;
    border-radius: 0 0 36px 36px;
  }
  .sq-auth__tint {
    background: linear-gradient(180deg, rgba(12, 30, 44, 0.9) 0%, rgba(18, 44, 64, 0.72) 55%, rgba(28, 63, 89, 0.55) 100%);
  }
  .sq-auth__frame,
  .sq-auth .sq-auth__lede,
  .sq-auth .sq-auth__credit {
    display: none;
  }
  .sq-auth__brand {
    left: 24px;
    right: 24px;
    top: 52px;
    bottom: auto;
    width: auto;
    max-width: 560px;
    justify-content: flex-start;
    gap: 12px;
  }
  .sq-auth .sq-auth__eyebrow {
    font-size: 11px;
  }
  .sq-auth__bar {
    width: 64px;
    height: 4px;
  }
  .sq-auth .sq-auth__headline {
    font-size: 26px;
    line-height: 1.15;
  }
  .sq-auth__panel {
    display: block;
    width: auto;
    max-width: 476px;
    margin: 0 auto;
    padding: 222px 16px 76px;
  }
  .sq-auth__card {
    padding: 24px 22px 22px;
    border-radius: 24px;
    box-shadow: inset 0 1px 0 var(--sq-white), 0 24px 60px rgba(12, 30, 44, 0.28);
  }
  .sq-auth__logo {
    height: 70px;
  }
  .sq-auth .sq-auth__title {
    margin-top: 20px;
    font-size: 26px;
  }
  .sq-auth .sq-auth__version {
    left: 0;
    right: 0;
    bottom: 22px;
    width: max-content;
    margin: 0 auto;
  }
}
