:root {
  --chloe-background-art: url('/assets/chloe-background.svg?v=2');
}

/* Chloé ambient artwork - intentionally subtle so forms and data remain easy to read. */
.content {
  position: relative;
  isolation: isolate;
}

.content::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--chloe-background-art);
  background-position: 64% center;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  filter: saturate(.94) contrast(.98);
  opacity: 0;
  transform: scale(1.025);
  animation: chloe-background-reveal 1.55s cubic-bezier(.22,.72,.22,1) .08s forwards;
}

.auth-identity {
  position: relative;
  isolation: isolate;
}

.auth-identity::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--chloe-background-art);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  filter: saturate(.96) contrast(.98);
  opacity: 0;
  transform: scale(1.035);
  animation: chloe-auth-background-reveal 1.7s cubic-bezier(.22,.72,.22,1) .05s forwards;
}

.auth-brand-lockup {
  position: relative;
  z-index: 2;
}

/*
 * Login page - full browser viewport background.
 * The artwork sits behind the complete login layout, including the empty left and
 * right viewport areas. The existing authentication markup and behaviour are untouched.
 */
body.auth-login {
  position: relative;
  isolation: isolate;
  min-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #F8FAFD !important;
}

body.auth-login::before {
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  background-color: #F8FAFD !important;
  background-image: var(--chloe-background-art) !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  content: "" !important;
  filter: saturate(.92) contrast(.98) brightness(1.02);
  opacity: 0;
  transform: scale(1.025);
  transform-origin: center center;
  animation: chloe-login-background-reveal 1.65s cubic-bezier(.22,.72,.22,1) .04s forwards !important;
}

body.auth-login::after {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,.08), rgba(255,255,255,.20) 58%, rgba(255,255,255,.27) 100%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.08));
  content: "";
}

body.auth-login .auth-shell {
  position: relative;
  z-index: 2;
}

/* Prevent the artwork being rendered a second time inside the left login panel. */
body.auth-login .auth-identity::before {
  display: none !important;
}

/* Keep the current layout while allowing the full-page artwork to read through softly. */
body.auth-login .auth-identity {
  background:
    radial-gradient(circle at 12% 82%, rgba(155,198,251,.10), transparent 36%),
    radial-gradient(circle at 84% 18%, rgba(253,202,197,.08), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.78), rgba(248,250,253,.72) 62%, rgba(244,232,249,.42)) !important;
  border-color: rgba(127,163,207,.24) !important;
  box-shadow: 0 24px 60px rgba(52,72,105,.10) !important;
  backdrop-filter: blur(13px) saturate(112%);
  -webkit-backdrop-filter: blur(13px) saturate(112%);
}

body.auth-login .auth-shell > .card,
body.auth-login .auth-purpose {
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(248,250,253,.80)) !important;
  border-color: rgba(127,163,207,.28) !important;
  box-shadow: 0 18px 46px rgba(52,72,105,.12) !important;
  backdrop-filter: blur(18px) saturate(116%);
  -webkit-backdrop-filter: blur(18px) saturate(116%);
}

body.auth-login .auth-benefits li {
  background: rgba(255,255,255,.76) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@keyframes chloe-background-reveal {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: .18; transform: scale(1); }
}

@keyframes chloe-auth-background-reveal {
  from { opacity: 0; transform: scale(1.035); }
  to { opacity: .34; transform: scale(1); }
}

@keyframes chloe-login-background-reveal {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: .82; transform: scale(1); }
}

@media (max-width: 1200px) {
  body.auth-login::before { background-position: 58% center !important; }
}

@media (max-width: 820px) {
  .content::before { background-position: 70% center; }
  .auth-identity::before { background-position: 62% center; opacity: .3; }
  body.auth-login::before { background-position: 66% center !important; }
  body.auth-login::after {
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.20));
  }
  body.auth-login .auth-identity {
    background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(248,250,253,.68)) !important;
  }
}

@media (max-width: 560px) {
  body.auth-login::before { background-position: 72% center !important; }
  body.auth-login .auth-shell > .card,
  body.auth-login .auth-purpose {
    background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(248,250,253,.86)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content::before,
  .auth-identity::before {
    animation: none;
    transform: none;
  }
  .content::before { opacity: .18; }
  .auth-identity::before { opacity: .34; }
  body.auth-login::before {
    animation: none !important;
    opacity: .82;
    transform: none;
  }
}
