/* Applies only while the page contains a password input. */
body:has(input[type="password"]) {
  margin: 0 !important;
  min-height: 100vh;
  min-height: 100svh;
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 28px !important;
  color: #173247;
  background:
    radial-gradient(ellipse at top left, #28546b 0, transparent 55%),
    linear-gradient(135deg, #102b40, #1c3b52) !important;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif !important;
}

body:has(input[type="password"]) *,
body:has(input[type="password"]) *::before,
body:has(input[type="password"]) *::after {
  box-sizing: border-box;
}

/* Select the existing panel surrounding the sign-in form. */
body:has(input[type="password"])
:is(div, section, main):has(> form input[type="password"]),
body:has(input[type="password"]) > form:has(input[type="password"]) {
  width: 100% !important;
  max-width: 480px !important;
  padding: clamp(24px, 5vw, 44px) !important;
  border: 1px solid #ffffff60 !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 28px 80px #06172440 !important;
}

body:has(input[type="password"]) :is(h1, h2, h3) {
  color: #142e43 !important;
  font-size: clamp(23px, 4vw, 28px) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: -.035em;
  margin: 0 0 16px !important;
}

body:has(input[type="password"]) p {
  color: #65788a !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
}

body:has(input[type="password"]) label {
  display: block;
  margin: 22px 0 8px !important;
  color: #344f63 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

body:has(input[type="password"])
:is(input[type="text"], input[type="email"], input[type="password"]) {
  display: block;
  width: 100% !important;
  height: 50px !important;
  padding: 12px 14px !important;
  border: 1px solid #cad7e1 !important;
  border-radius: 9px !important;
  color: #173247 !important;
  background: #f9fbfd !important;
  font: inherit !important;
  font-size: 16px !important;
  box-shadow: none !important;
}

body:has(input[type="password"]) input:focus-visible {
  outline: 3px solid #a7ded2 !important;
  outline-offset: 2px;
  border-color: #227d6c !important;
  background: white !important;
}

body:has(input[type="password"])
:is(button[type="submit"], input[type="submit"], form button:not([type])) {
  width: 100% !important;
  min-height: 50px !important;
  margin-top: 24px !important;
  padding: 12px 20px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #176d5d !important;
  color: white !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  cursor: pointer;
}

body:has(input[type="password"])
:is(button[type="submit"], input[type="submit"]):hover {
  background: #105547 !important;
}

body:has(input[type="password"]) a {
  color: #176d5d !important;
  font-size: 13px !important;
  text-underline-offset: 4px;
}

body:has(input[type="password"]) :is(a, button):focus-visible {
  outline: 3px solid #83cdbb !important;
  outline-offset: 4px;
}

@media (max-width: 520px) {
  body:has(input[type="password"]) {
    padding: 18px !important;
  }
}

body:has(input[type="password"]) form input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]) {
  height: 50px !important;
  background: #f9fbfd !important;
}

/* Full-height split login layout */
body:has(input[type="password"]) {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  align-items: center !important;
  padding: 0 !important;
  background: #fbfcfd !important;
  position: relative;
  isolation: isolate;
}

/* Navy background and decorative rings */
body:has(input[type="password"])::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  z-index: -1;
  background:
    radial-gradient(
      circle at 115% 110%,
      transparent 0 34%,
      #ffffff03 34% 43%,
      transparent 43% 52%,
      #ffffff03 52% 61%,
      transparent 61%
    ),
    #112e42;
}

/* Branding panel */
body:has(input[type="password"])::after {
  content: "PERFORMANCE DASHBOARD\A\A A clearer view.\A A stronger business.\A\A Your workspace for parts and paint performance.\A Focus on what matters, all in one place.";
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  white-space: pre-line;
  color: #eef7fb;
  font-size: clamp(18px, 2.3vw, 30px);
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: -.025em;
  padding: 64px clamp(28px, 5vw, 80px);
}

/* Existing login panel */
body:has(input[type="password"])
:is(div, section, main):has(> form input[type="password"]),
body:has(input[type="password"]) > form:has(input[type="password"]) {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: calc(100% - 80px) !important;
  max-width: 440px !important;
  margin: 70px 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Decorative lock above the heading */
body:has(input[type="password"])
:is(div, section, main):has(> form input[type="password"])::before {
  content: "";
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 32px;
  border: 1px solid #d8e4ec;
  border-radius: 14px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23176d5d' stroke-width='1.5'%3E%3Crect x='5' y='10' width='14' height='11' rx='3'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3m-4 5v2'/%3E%3C/svg%3E")
    center / 24px no-repeat,
    white;
}

body:has(input[type="password"]) :is(h1, h2, h3) {
  font-size: 30px !important;
  margin-bottom: 12px !important;
}

body:has(input[type="password"]) form {
  margin-top: 32px;
}

body:has(input[type="password"]) form input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]) {
  height: 50px !important;
  background: #fff !important;
}

body:has(input[type="password"]) label {
  margin-top: 24px !important;
}

body:has(input[type="password"])
:is(button[type="submit"], input[type="submit"], form button:not([type])) {
  margin-top: 24px !important;
}

/* Stack the panels on smaller screens */
@media (max-width: 760px) {
  body:has(input[type="password"]) {
    grid-template-columns: 1fr !important;
  }

  body:has(input[type="password"])::before {
    display: none;
  }

  body:has(input[type="password"])::after {
    grid-column: 1;
    grid-row: 1;
    background: #112e42;
    padding: 32px 24px;
    font-size: 19px;
  }

  body:has(input[type="password"])
  :is(div, section, main):has(> form input[type="password"]),
  body:has(input[type="password"]) > form:has(input[type="password"]) {
    grid-column: 1;
    grid-row: 2;
    width: calc(100% - 48px) !important;
    margin: 40px 0 !important;
  }
}

/* Replace the previous generated text with structured branding. */
body.arc-split::after {
  content: none !important;
}

body.arc-split .arc-brand-panel {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  min-height: 100svh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 72px clamp(32px, 4.7vw, 90px) 150px;
  color: white;
}

body.arc-split .arc-brand-copy {
  max-width: 570px;
}

body.arc-split .arc-eyebrow {
  margin: 0 0 26px !important;
  color: #8ee0df !important;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

body.arc-split .arc-brand-panel h1 {
  margin: 0 0 26px !important;
  color: white !important;
  font-size: clamp(34px, 3.4vw, 56px) !important;
  font-weight: 700 !important;
  line-height: 1.12 !important;
  letter-spacing: -.045em;
}

body.arc-split .arc-description {
  margin: 0 !important;
  color: #bbcfdd !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
}

.arc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.arc-tags span {
  padding: 9px 15px;
  border: 1px solid #ffffff24;
  border-radius: 100px;
  color: #e6eff4;
  font-size: 12px;
}

.arc-brand-footer {
  position: absolute;
  bottom: 42px;
  left: clamp(32px, 4.7vw, 90px);
  right: 24px;
  color: #adc6d7;
  font-size: 12px;
  line-height: 1.8;
}

body.arc-split .arc-login-panel {
  max-width: 400px !important;
}

body.arc-split .arc-login-panel :is(h1,h2,h3) {
  font-size: 32px !important;
  letter-spacing: -.04em;
}

body.arc-split .arc-access-footer {
  margin: 32px 0 0 !important;
  padding-top: 24px;
  border-top: 1px solid #dae4ec;
  color: #718496 !important;
  font-size: 12px !important;
  text-align: center;
  line-height: 1.8 !important;
}

@media (max-width: 760px) {
  body.arc-split .arc-brand-panel {
    min-height: auto;
    background: #112e42;
    padding: 38px 24px;
  }

  body.arc-split .arc-brand-panel h1 {
    font-size: 34px !important;
  }

  body.arc-split .arc-brand-footer {
    display: none;
  }

  body.arc-split .arc-description {
    font-size: 14px !important;
  }
}
