/* Login screen: the task's plasma shader behind frosted-glass panels.
   Loaded only by the login template and every rule is scoped under .auth-aurora on <body>, because
   authentication.css and presentation_banner.html are shared with Register — which keeps its
   existing light theme. Nothing here may leak out of that scope. */

.auth-aurora {
  /* Scoped palette, keyed to the onboarding Figma background #251237 (Lizo 2.0 node 392-364) —
     the same ground the shader now draws (0.145,0.071,0.216 lifting to 0.243,0.125,0.337). The
     page chrome matches that rather than the shared global.css greys, which are built for a
     white page. */
  --aurora-ink: #251237;
  --aurora-navy: #221540;
  --aurora-violet: #3E2056;

  /* Softening knob for the background. The task's effect is crisp — thin plasma lines and small
     travelling dots — and blur is what erases both, so this stays light: past ~10px the lines
     dissolve into an even wash and the effect is gone. */
  --aurora-blur: 7px;

  /* Accent for links, focus rings and required marks — the lit end of the shader's own violet. */
  --aurora-lilac: #B79CFF;

  /* Intro type, which sits straight on the dark field rather than on the card. */
  --aurora-text: rgba(255, 255, 255, 0.95);
  --aurora-text-dim: rgba(226, 224, 245, 0.68);

  background: var(--aurora-ink);
  color: var(--aurora-text);
  min-height: 100vh;
  overflow: hidden;

  /* global.css pins `body { min-width: 1024px !important }` as a floor for the app shell. The old
     login markup dodged it by sizing its own wrapper with Tailwind's w-screen; this layout is a
     flex container on <body>, so it would inherit the 1024px and push the card off a phone screen.
     `body.auth-aurora` outranks the bare `body` selector, so the floor lifts on this page only. */
  min-width: 0 !important;
}

/* ── the animated field ────────────────────────────────────────────────────
   Two stacked layers so the page still looks composed before (or without) WebGL:
   .auth-aurora__wash is a static gradient approximating the shader's ground that paints instantly,
   and the canvas fades in over it once the first frame is drawn. No WebGL, no fade-in. */
.auth-aurora__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--aurora-ink);
}

/* The onboarding Figma field itself (node 392-364), rebuilt in CSS: the #251237 plum ground, a
   soft slate-blue bloom just above and left of centre, a cooler teal breath at the very top, and
   a vignette pulling the corners down. This is not a stand-in for the shader's ground — it IS
   the background; the canvas above screen-blends only the plasma light onto it. */
.auth-aurora__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 120% at 50% 45%, rgba(16, 7, 26, 0) 55%, rgba(16, 7, 26, 0.55) 100%),
    radial-gradient(52% 44% at 44% 33%, rgba(101, 112, 165, 0.52) 0%, rgba(101, 112, 165, 0.20) 45%, rgba(37, 18, 55, 0) 72%),
    radial-gradient(60% 38% at 52% 0%, rgba(52, 88, 110, 0.28) 0%, rgba(37, 18, 55, 0) 60%),
    var(--aurora-ink);
}

.auth-aurora__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: blur(var(--aurora-blur));
  opacity: 0;
  transition: opacity 1.2s ease;
  /* The shader renders its plasma on black; screen keeps the wash underneath as the ground and
     only adds the light, so the Figma field shows through untinted. */
  mix-blend-mode: screen;
}

.auth-aurora__canvas.is-live { opacity: 1; }

/* A fine grain over the whole field — without it the shader's wide dark gradient bands on 8-bit
   displays. */
.auth-aurora__grain {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
}

/* ── page layout ───────────────────────────────────────────────────────────
   Intro reads directly off the animated field in the top-left; the card is centred in the
   viewport, not in a column, so it stays put regardless of how long the intro copy runs. */
.auth-aurora__main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.auth-aurora__intro {
  position: absolute;
  top: clamp(32px, 5vw, 64px);
  left: clamp(24px, 5vw, 64px);
  max-width: min(560px, 46vw);
  /* Purely decorative alongside the form — must not swallow clicks aimed at the card. */
  pointer-events: none;
}

.auth-aurora__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.auth-aurora__logo {
  /* The gradient hexagon mark (big-icon.svg), drawn in its own purples — no white-flattening
     filter, it would erase the gradient. Height set here because the source SVG is 1196x1312. */
  height: 46px;
  width: auto;
}

.auth-aurora__wordmark {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--aurora-text);
}

.auth-aurora__title {
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--aurora-text);
  margin: 0 0 14px;
  text-wrap: balance;
}

.auth-aurora__sub {
  font-weight: 400;
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.6;
  color: var(--aurora-text-dim);
  margin: 0;
}

.auth-aurora__center {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 444px;
}

/* Both cards are mounted, one [hidden]; the visible one gets a short settle when they swap.
   The animation also runs once on page load, which reads as the card arriving with the page.
   Transform ONLY — never opacity: a mid-fade ancestor becomes its own compositing group, inside
   which the card's backdrop-filter has no page behind it to blur, so the glass renders as a flat
   grey pane for the length of the fade. */
.auth-aurora__card {
  width: 100%;
}
.auth-aurora__card:not([hidden]) {
  animation: auth-card-in 200ms ease;
}
@keyframes auth-card-in {
  from { transform: translateY(10px); }
  to   { transform: translateY(0); }
}

/* ── glass card ────────────────────────────────────────────────────────────
   A tinted pane rather than a white one: barely-there white over a heavy backdrop blur, so the
   plasma still moves behind it but never resolves into legible detail under the form.

   The sheen is layered into the element's own `background` rather than an ::after overlay, because
   an overlay paints on top of the content and would veil the type. Two layers: a broad highlight
   falling from the top-left, and a gradient that thins toward the bottom so the pane reads as
   lit from above. */
.auth-aurora .form-wrapper {
  position: relative;
  border-radius: 24px;
  padding: 30px !important;
  background:
    radial-gradient(135% 85% at 6% -14%, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(158deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.055) 52%, rgba(255, 255, 255, 0.035) 100%);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 40px 90px rgba(3, 1, 14, 0.6),
    0 2px 10px rgba(3, 1, 14, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

/* Crisp specular hairline along the top edge — the detail that reads as a glass lip. */
.auth-aurora .form-wrapper::before {
  content: '';
  position: absolute;
  inset-inline: 14%;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

/* ── type on the glass ─────────────────────────────────────────────────────
   The shared authentication.css colours are greys chosen for a white card; on a tinted pane they
   go muddy, so the card's type is restated in white with its own hierarchy. */
.auth-aurora .form-wrapper h1 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
  padding-bottom: 6px;
}

/* 0.72, not lower: at 0.62 this line dropped to 4.2:1 where the plasma runs bright behind the
   pane, just under the 4.5:1 needed for body text. */
.auth-aurora .form-wrapper h2,
.auth-aurora .form-wrapper h2 span { color: rgba(255, 255, 255, 0.72); }

.auth-aurora .form-wrapper a { color: var(--aurora-lilac); font-weight: 600; }
.auth-aurora .form-wrapper a:hover { color: #fff; text-decoration: none; }

.auth-aurora .form-item label { color: rgba(255, 255, 255, 0.78); letter-spacing: 0.02em; }
.auth-aurora .form-item label .additional { color: rgba(255, 255, 255, 0.42); }
.auth-aurora .form-item label .required { color: var(--aurora-lilac); }

/* global.css ships .tooltip hidden with no reveal rule anywhere, so the hover and
   keyboard states live here. tabindex on the icon is what makes :focus-within fire. */
.auth-aurora .pw-hint { position: relative; display: inline-flex; align-items: center; }
.auth-aurora .pw-hint .material-symbols-outlined { font-size: 16px; cursor: help; }
.auth-aurora .pw-hint:hover .tooltip,
.auth-aurora .pw-hint:focus-within .tooltip { display: block; }
/* global.css sets width:max-content, which holds this on one line and pushes the
   page sideways on a phone; capping it lets the existing white-space:normal wrap. */
.auth-aurora .pw-hint .tooltip { max-width: 240px; }

/* Django emits a bare <ul>; muted and small so it reads as guidance, not a second error. */
.auth-aurora .password-help { display: block; }
.auth-aurora .password-help ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

/* The rule under the header is a Tailwind border colour in the markup; retint it for the pane. */
.auth-aurora .border-t-1 { border-color: rgba(255, 255, 255, 0.14) !important; }

/* ── fields ────────────────────────────────────────────────────────────────
   Recessed wells rather than raised boxes: darker than the pane, so they read as cut into it. */
.auth-aurora .form-wrapper input {
  background: rgba(10, 6, 28, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  box-shadow: inset 0 1px 3px rgba(3, 1, 14, 0.35);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-aurora .form-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.46);
  letter-spacing: 0;
  font-weight: 400;
}

.auth-aurora .form-wrapper input:hover { border-color: rgba(255, 255, 255, 0.24); }

.auth-aurora .form-wrapper input:focus {
  border-color: var(--aurora-lilac);
  background: rgba(10, 6, 28, 0.55);
  box-shadow:
    inset 0 1px 3px rgba(3, 1, 14, 0.35),
    0 0 0 3px rgba(169, 139, 255, 0.25);
}

/* Chrome paints a solid autofill background that would punch a hole in the glass; the inset
   shadow trick is the only way to override it. */
.auth-aurora .form-wrapper input:-webkit-autofill,
.auth-aurora .form-wrapper input:-webkit-autofill:hover,
.auth-aurora .form-wrapper input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(22, 14, 52, 0.98) inset;
  caret-color: #fff;
}

.auth-aurora .toggle-password { color: rgba(255, 255, 255, 0.42); transition: color 0.2s ease; }
.auth-aurora .toggle-password:hover { color: #fff; }

/* ── submit ────────────────────────────────────────────────────────────────
   The shared button colour is #1E033E, near-black — invisible as a "primary" against this pane.
   Lifted into the violet the shader's own lines use, with a glow so it reads as the lit element. */
.auth-aurora .submit-button {
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #8B5CF6 0%, #6D28D9 100%);
  box-shadow:
    0 10px 30px rgba(109, 40, 217, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-aurora .submit-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 16px 38px rgba(109, 40, 217, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.auth-aurora .submit-button:active { transform: translateY(0); filter: brightness(0.98); }

/* Keyboard focus has to stay visible against the glow. */
.auth-aurora .form-wrapper a:focus-visible,
.auth-aurora .submit-button:focus-visible {
  outline: 2px solid var(--aurora-lilac);
  outline-offset: 3px;
}

/* ── narrow widths ─────────────────────────────────────────────────────────
   The intro is absolutely positioned so the card can centre on the viewport. Once the two would
   overlap there is no room for that, so the page becomes a normal top-to-bottom flow: intro first,
   card under it. authentication.css's own phone block is keyed to .login-row / .login-form-col,
   which this layout no longer uses, so none of it applies and nothing has to be overridden. */
@media (max-width: 900px) {
  .auth-aurora {
    /* The page scrolls in this mode, so the fixed background has to stay put behind it. */
    overflow: auto;
  }

  .auth-aurora__main {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: clamp(28px, 6vw, 48px);
    padding: clamp(28px, 7vw, 56px) 24px 40px;
  }

  .auth-aurora__intro {
    position: static;
    max-width: 100%;
  }

  .auth-aurora__center {
    max-width: 444px;
    margin: 0 auto;
  }
}

/* ===== "Sign in with Google" (UI-only, ships disabled) + the "or" divider under it. ===== */
/* Glass pill in the card's own language — the dark twin of the standard white Google button.
   It is disabled until a user-login OAuth backend exists, but drawn at full strength: a greyed
   button would read as an error, and the title tooltip carries the "coming soon". Only the
   cursor says it is inert. */
.auth-aurora .google-signin-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--aurora-text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
/* Hover hangs off the wrapper, not the button: Google's transparent button sits on top and takes
   the pointer, so the button underneath never sees a hover of its own. */
.auth-aurora .google-signin:hover .google-signin-button {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.26);
}
/* Google's button is the real control and carries the focus ring; mirror it onto the visible one
   so keyboard users can see where they are. */
.auth-aurora .google-signin:focus-within .google-signin-button {
  border-color: rgba(255, 255, 255, 0.55);
}
.auth-aurora .google-signin {
  position: relative;
}
.auth-aurora .google-signin__gis {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
}
/* Stretch whatever Identity Services renders across the whole button, so a click anywhere on
   ours lands on theirs. */
.auth-aurora .google-signin__gis > div,
.auth-aurora .google-signin__gis iframe {
  width: 100% !important;
  height: 100% !important;
}
.auth-aurora .google-signin__error {
  margin-top: 10px;
  color: #ffb4b4;
  font-size: 13px;
}
/* The Google "G" is multicolor on a dark ground — give it the standard white coin so the brand
   colors keep their contrast. */
.auth-aurora .google-signin-button__logo {
  flex-shrink: 0;
  box-sizing: content-box;
  padding: 3px;
  border-radius: 50%;
  background: #fff;
}

.auth-aurora__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 13px;
}
.auth-aurora__or::before,
.auth-aurora__or::after {
  content: '';
  flex: 1 1 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* Register's paired fields (First/Last name, Password/Repeat) sit in .form-group rows —
   authentication.css lays them out as a fixed side-by-side flex row whose inputs have their own
   minimum widths, so on a phone the pair overflows the card and drags the whole page into
   horizontal scroll. Its old phone block was keyed to .login-row/.login-form-col, which this
   layout no longer uses, so the stack has to be restated here. */
@media (max-width: 560px) {
  .auth-aurora .form-group { flex-direction: column; }
}

/* ── motion preference ─────────────────────────────────────────────────────
   The script also stops its loop; this keeps the still frame from fading in with a transition. */
@media (prefers-reduced-motion: reduce) {
  .auth-aurora__canvas { transition: none; }
  .auth-aurora__card:not([hidden]) { animation: none; }
}

/* ── Review popup ─────────────────────────────────────────────────────────
   "We're reviewing your registration", shown to every new signup. A port of
   the app's trial-over card (.lz-trial-dlg__card--end in lizo-a2.css) with
   its values inlined: that sheet's --lz-* tokens are not loaded here, and
   pulling 4,400 lines onto the login page would restyle the aurora. Same
   plum/purple, same 43/57 split, same 720px stack. */
.auth-review { position: fixed; inset: 0; z-index: 10000; display: grid;
  place-items: center; padding: 16px; background: rgba(32, 2, 61, 0.55);
  animation: auth-review-fade 140ms ease-out; }
.auth-review__card { position: relative; width: min(880px, 100%); display: grid;
  grid-template-columns: 43fr 57fr; align-items: stretch; text-align: left;
  overflow: hidden; border-radius: 16px; background: #fff;
  box-shadow: 0 24px 64px rgba(32, 2, 61, 0.35);
  animation: auth-review-in 200ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.auth-review__left { padding: 36px 34px; color: #fff;
  background: radial-gradient(120% 140% at 85% 110%, rgb(91, 33, 182) 0%, transparent 55%),
              rgb(32, 2, 61); }
.auth-review__gem { display: block; width: 56px; height: 64px; margin-bottom: 22px; }
.auth-review__title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.2;
  letter-spacing: -0.02em; color: #fff; }
.auth-review__copy { margin: 14px 0 0; font-size: 14px; line-height: 1.6;
  color: rgba(255, 255, 255, 0.82); }
.auth-review__ask { margin: 14px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, 0.62); }
.auth-review__left a.auth-review__mail { color: #fff; font-weight: 600; text-decoration: none; }
.auth-review__left a.auth-review__mail:hover { text-decoration: underline; }
.auth-review__right { display: flex; flex-direction: column; justify-content: center;
  padding: 36px 34px; background: #fff; }
.auth-review__head { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em;
  color: rgb(32, 2, 61); }
.auth-review__lead { margin: 10px 0 30px; font-size: 14px; line-height: 1.6;
  color: rgb(74, 74, 74); }
.auth-review__right a.auth-review__primary { display: inline-block; align-self: flex-start;
  padding: 12px 20px; font-size: 14px; font-weight: 600; text-decoration: none;
  color: #fff; background: rgb(91, 33, 182); border-radius: 10px;
  transition: background 140ms ease; }
.auth-review__right a.auth-review__primary:hover { background: rgb(32, 2, 61); }
.auth-review__right a.auth-review__back { margin-top: 22px; align-self: flex-start;
  font-size: 13px; font-weight: 500; color: #615d56; text-decoration: none; }
.auth-review__right a.auth-review__back:hover { color: rgb(32, 2, 61);
  text-decoration: underline; }
.auth-review__x { position: absolute; top: 10px; right: 10px; display: grid;
  place-items: center; width: 32px; height: 32px; padding: 0; border: 0;
  border-radius: 8px; background: none; color: #615d56; cursor: pointer; }
.auth-review__x:hover { background: #f2f0ed; color: rgb(32, 2, 61); }
.auth-review__x .material-symbols-outlined { font-size: 18px; }
@media (max-width: 720px) {
  .auth-review__card { grid-template-columns: 1fr; }
  .auth-review__x { color: rgba(255, 255, 255, 0.7); }
}
@keyframes auth-review-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes auth-review-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
