body:has(> .portal-sign-in-title) {
  --foreground: #e9f2ff;
  --muted-foreground: #9cacc3;
  --input: #33465f;
  --border: #2d4159;
  --primary: #6edcff;
  --primary-foreground: #061529;
  --ring: #66caff;
  --accent: #182b44;
  --panel: #101d30;
  --panel-border: #294059;
  color-scheme: dark;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 26rem);
  grid-template-rows: auto auto;
  place-content: center;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 2.25rem 1rem 4.25rem;
  color: var(--foreground);
  background:
    radial-gradient(ellipse at 50% 34%, #152d4b 0%, transparent 55%),
    radial-gradient(ellipse at 70% 105%, #10243e 0%, transparent 52%),
    #080f1c;
}

body:has(> .portal-sign-in-title)::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(90deg, #74b8ff12 1px, transparent 1px),
    linear-gradient(#74b8ff12 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 39%, #000, transparent 72%);
}

.portal-sign-in-title {
  z-index: 0;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem .8rem;
  border: 1px solid var(--panel-border);
  border-bottom: 0;
  border-radius: 1.25rem 1.25rem 0 0;
  background: linear-gradient(180deg, #15273e, var(--panel));
  text-align: center;
}

.portal-sign-in-title::before {
  display: block;
  width: 3rem;
  height: 3rem;
  border: 1px solid #76dcff69;
  border-radius: .85rem;
  background:
    linear-gradient(90deg, #98edff 0 24%, transparent 24% 38%, #98edff 38% 100%) center 35% / 1.4rem 2px no-repeat,
    linear-gradient(90deg, #6ccfff 0 62%, transparent 62% 77%, #6ccfff 77% 100%) center 50% / 1.4rem 2px no-repeat,
    linear-gradient(90deg, #489af9 0 24%, transparent 24% 38%, #489af9 38% 100%) center 65% / 1.4rem 2px no-repeat,
    linear-gradient(145deg, #215576, #152a46);
  box-shadow: 0 0 1.6rem #4bacff30, inset 0 0 0 3px #0e223861;
  content: "";
}

.portal-sign-in-title::after {
  position: absolute;
  inset: 0 18% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8ee8ffb8, transparent);
  content: "";
}

.portal-sign-in-title h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4.5vw, 1.8rem);
  font-weight: 650;
  letter-spacing: .055em;
  line-height: 1.3;
}

body:has(> .portal-sign-in-title) > #root {
  z-index: 0;
  min-width: 0;
  padding: 0 1.875rem 1.75rem;
  border: 1px solid var(--panel-border);
  border-top: 0;
  border-radius: 0 0 1.25rem 1.25rem;
  background: var(--panel);
  box-shadow: 0 24px 68px -26px #000b;
}

.portal-sign-in-title + #root .mx-auto.flex.items-center.px-4.pb-4.pt-2,
.portal-sign-in-title + #root .w-full.p-2:has(> #UserSvg),
.portal-sign-in-title + #root .items-stretch:has(#form-login) > .w-full:has(> h5),
.portal-sign-in-title + #root a[href="https://www.authelia.com"] {
  display: none;
}

.portal-sign-in-title + #root :is([class*="min-h-[90vh]"], .min-h-screen, .min-h-dvh) {
  min-height: 0;
}

.portal-sign-in-title + #root [class*="max-w-[444px]"] {
  max-width: none;
  padding: 0;
}

.portal-sign-in-title + #root form > .grid {
  gap: 1.1rem;
}

.portal-sign-in-title + #root form input:not([type="checkbox"]) {
  border-color: var(--input);
  border-radius: .65rem;
  background: #0c1728;
  color: var(--foreground);
}

.portal-sign-in-title + #root form input:not([type="checkbox"]):focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px #66caff24;
}

.portal-sign-in-title + #root form input:-webkit-autofill {
  -webkit-text-fill-color: var(--foreground);
  box-shadow: inset 0 0 0 100px #14253d;
}

.portal-sign-in-title + #root form button[type="submit"] {
  height: 2.85rem;
  border-radius: .65rem;
  background: linear-gradient(105deg, #83e5ff, #71b8ff 70%, #73a7ff);
  color: #081b32;
  font-size: .95rem;
  font-weight: 700;
  box-shadow: 0 6px 20px #479cff24;
}

.portal-sign-in-title + #root form button[type="submit"]:not(:disabled):hover {
  filter: brightness(1.08);
}

.portal-sign-in-footer {
  position: absolute;
  inset: auto 1rem max(1rem, env(safe-area-inset-bottom));
  color: #8190a7;
  font-size: .7rem;
  letter-spacing: .025em;
  text-align: center;
}

.portal-sign-in-footer a {
  color: inherit;
  text-decoration: none;
}

.portal-sign-in-footer a:is(:hover, :focus-visible) {
  color: #cad9ed;
  text-decoration: underline;
  text-underline-offset: .18em;
}

@media (max-width: 430px) {
  .portal-sign-in-title {
    padding-top: 1.55rem;
  }

  body:has(> .portal-sign-in-title) > #root {
    padding-inline: 1rem;
  }
}
