/* InfyStrat look for the Documenso sign-in pages (sign.infystrat.com).
   Injected by nginx on /signin and /forgot-password only. Every rule is scoped
   to the sign-in layout (the page with the Documenso background pattern), so the
   rest of the app is untouched even after navigating away.
   Brand: navy #002369, blue #2256a2, ink #16203a, rule #d8dfea. */

@font-face { font-family: "InfyPlex"; src: url("/infystrat-brand/plex.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "InfyArchivo"; src: url("/infystrat-brand/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

body:has(main img[alt="background pattern"]) { background: #f7f9fc; }

main:has(img[alt="background pattern"]) {
  font-family: "InfyPlex", "IBM Plex Sans", system-ui, sans-serif;
  color: #16203a;
  background: #f7f9fc;
  padding-left: calc(44vw + 48px) !important;
  padding-right: 48px !important;
}
main:has(img[alt="background pattern"]) img[alt="background pattern"] { display: none; }

/* Brand panel: navy, dotted world map, logo, colour strip */
main:has(img[alt="background pattern"])::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: 44vw;
  background:
    linear-gradient(90deg, #ef5999 0 20%, #f36e23 20% 40%, #fcc218 40% 60%, #7da83f 60% 80%, #2256a2 80% 100%) bottom / 100% 6px no-repeat,
    url("/infystrat-brand/logo-white.svg") 64px 56px / auto 76px no-repeat,
    linear-gradient(rgba(0, 35, 105, 0.8), rgba(0, 35, 105, 0.8)),
    url("/infystrat-brand/world-dots.svg") center 58% / 150% auto no-repeat,
    #002369;
  z-index: 0;
}
main:has(img[alt="background pattern"])::after {
  content: "Review, sign and send documents securely.";
  position: fixed;
  left: 64px;
  bottom: 80px;
  width: calc(44vw - 128px);
  color: #ffffff;
  font-family: "InfyArchivo", "InfyPlex", sans-serif;
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  z-index: 1;
}

/* Form card */
main:has(img[alt="background pattern"]) .rounded-xl.border:has(form) {
  position: relative;
  z-index: 2;
  background: #ffffff !important;
  border: 1px solid #d8dfea !important;
  border-radius: 20px !important;
  padding: 40px !important;
  box-shadow: 0 24px 60px -32px rgba(0, 23, 74, 0.35);
}
main:has(img[alt="background pattern"]) .rounded-xl.border:has(form)::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #2256a2;
  margin-bottom: 20px;
}
main:has(img[alt="background pattern"]) h1 {
  font-family: "InfyArchivo", "InfyPlex", sans-serif;
  font-stretch: 112%;
  font-weight: 600;
  font-size: 30px !important;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #002369;
}
main:has(img[alt="background pattern"]) h1 + p { font-size: 15.5px !important; color: #556079 !important; }
main:has(img[alt="background pattern"]) hr { border-color: #eef2f8; margin-top: 24px; margin-bottom: 24px; }
main:has(img[alt="background pattern"]) label { font-size: 14px; font-weight: 500; color: #16203a; }
main:has(img[alt="background pattern"]) input[type="email"],
main:has(img[alt="background pattern"]) input[type="password"],
main:has(img[alt="background pattern"]) input[type="text"] {
  height: 48px;
  border-radius: 12px;
  border-color: #d8dfea;
  background: #ffffff;
  font-size: 15.5px;
  color: #16203a;
}
main:has(img[alt="background pattern"]) input:focus-visible {
  outline: none;
  border-color: #2256a2;
  box-shadow: 0 0 0 3px rgba(34, 86, 162, 0.18) !important;
}
main:has(img[alt="background pattern"]) button[type="submit"] {
  height: 50px;
  border-radius: 999px;
  background: #002369 !important;
  color: #ffffff !important;
  font-size: 15.5px;
  font-weight: 600;
}
main:has(img[alt="background pattern"]) button[type="submit"]:hover { background: #2256a2 !important; opacity: 1; }
main:has(img[alt="background pattern"]) form button[type="button"]:not([aria-label]):not([data-testid]) {
  height: 50px !important;
  border-radius: 999px !important;
  border: 1px solid #d8dfea !important;
  background: #ffffff !important;
  color: #002369 !important;
  font-size: 15px;
  font-weight: 500;
  width: 100%;
}
main:has(img[alt="background pattern"]) form button[type="button"]:not([aria-label]):not([data-testid]):hover { background: #eef2f8 !important; border-color: #2256a2 !important; }
main:has(img[alt="background pattern"]) a { color: #2256a2 !important; }
main:has(img[alt="background pattern"]) a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* Sign-up: hide Documenso's promotional panel and keep the form column in the white area */
main:has(img[alt="background pattern"]) .rounded-xl.border:not(:has(form)) { display: none !important; }
main:has(img[alt="background pattern"]) .w-screen {
  width: 100% !important;
  max-width: 34rem !important;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
main:has(img[alt="background pattern"]) .rounded-xl.border:has(form) .h-20 { height: auto; }
main:has(img[alt="background pattern"]) .aspect-signature-pad { border-color: #d8dfea; border-radius: 12px; }

/* Phones and tablets: the panel becomes a navy band at the top */
@media (max-width: 1023px) {
  main:has(img[alt="background pattern"]) {
    padding: 168px 16px 40px !important;
    justify-content: flex-start !important;
  }
  main:has(img[alt="background pattern"])::before {
    position: absolute;
    inset: 0 0 auto 0;
    width: auto;
    height: 128px;
    background:
      linear-gradient(90deg, #ef5999 0 20%, #f36e23 20% 40%, #fcc218 40% 60%, #7da83f 60% 80%, #2256a2 80% 100%) bottom / 100% 5px no-repeat,
      url("/infystrat-brand/logo-white.svg") center 22px / auto 72px no-repeat,
      #002369;
  }
  main:has(img[alt="background pattern"])::after { display: none; }
  main:has(img[alt="background pattern"]) .rounded-xl.border:has(form) { padding: 28px 22px !important; }
}
