/* ─── Login page layout ─────────────────────────────────────────────────── */

.grid.min-h-svh {
  grid-template-columns: 1fr 1fr !important;
}

/* Left panel: relative so absolute children (heading, privacy) anchor to it */
.grid.min-h-svh > div:first-child {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Hide the top-left logo section */
.grid.min-h-svh > div:first-child > div:first-child {
  display: none !important;
}

/* ─── Watermark — repeating logo tiles, left panel only ─────────────────── */

.grid.min-h-svh > div:first-child::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/public/favicon.svg");
  background-repeat: repeat;
  background-size: 60px auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0.07;
}

/* Light theme: darken the tiles */
@media (prefers-color-scheme: light) {
  .grid.min-h-svh > div:first-child::before {
    opacity: 0.06;
    filter: brightness(0);
  }
}

html.light .grid.min-h-svh > div:first-child::before {
  opacity: 0.06;
  filter: brightness(0);
}

/* Ensure form sits above watermark */
.grid.min-h-svh > div:first-child > * {
  position: relative;
  z-index: 1;
}

/* ─── "Welcome back." — top of left panel ───────────────────────────────── */

#magnus-welcome {
  position: absolute !important;
  top: 4rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

/* ─── Privacy policy — bottom of left panel ─────────────────────────────── */

#magnus-privacy {
  position: absolute !important;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  opacity: 0.55;
  white-space: nowrap;
  z-index: 2;
}

#magnus-privacy a {
  text-decoration: underline;
  color: inherit;
}

/* ─── Right panel: gradient + Magnus logo ───────────────────────────────── */

div:has(> img[alt="Image"]) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(
    to bottom,
    #1a001a 0%,
    #4d0024 35%,
    #7a0020 65%,
    #8b0000 100%
  ) !important;
  position: relative !important;
  overflow: hidden !important;
}

div:has(> img[alt="Image"]) > img[alt="Image"] {
  display: none !important;
}

div:has(> img[alt="Image"])::after {
  content: "";
  display: block;
  width: 55%;
  max-width: 360px;
  height: 55%;
  max-height: 360px;
  background-image: url("/public/logo_dark.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
