/* ============================================================================
   AUTH PAGES — sign in, forgot password, reset password
   ----------------------------------------------------------------------------
   Shared by resources/views/vendor-login/* and resources/views/admin-login/*.
   Extracted from the login page so the three auth screens cannot drift apart.
   Depends on tokens.css; load it after tokens + base.
   ========================================================================== */

/* Page-specific: a split sign-in. Scoped here rather than added to the
   shared component sheet, since nothing else in the panel is a split. */
.vp-auth {
    min-block-size: 100dvh;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--vp-bg);
}
@media (min-width: 960px) {
    .vp-auth { grid-template-columns: 1.05fr .95fr; }
}

/* --- brand side --- */
.vp-auth__brand {
    display: none;
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 5vw, 64px);
    color: #fff;
    background: linear-gradient(135deg, #2A1A66 0%, #4A2EB4 45%, #6C4CF1 100%);
    flex-direction: column;
    justify-content: space-between;
}
@media (min-width: 960px) { .vp-auth__brand { display: flex; } }

/* Two soft light blooms; purely decorative, so they are aria-hidden in
   the markup and cost nothing but a gradient. */
.vp-auth__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    pointer-events: none;
}
.vp-auth__glow--a {
    inline-size: 380px; block-size: 380px;
    background: #8B5CF6;
    inset-block-start: -120px; inset-inline-end: -100px;
    animation: vp-float 14s var(--vp-ease) infinite alternate;
}
.vp-auth__glow--b {
    inline-size: 300px; block-size: 300px;
    background: #06B6D4;
    inset-block-end: -110px; inset-inline-start: -80px;
    opacity: .35;
    animation: vp-float 18s var(--vp-ease) infinite alternate-reverse;
}
@keyframes vp-float {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(0, 28px, 0) scale(1.12); }
}

.vp-auth__brandinner { position: relative; z-index: 1; }
.vp-auth__wordmark { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.vp-auth__wordmark span { color: #FDB022; }

.vp-auth__headline {
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    margin-block: 0 14px;
}
.vp-auth__sub { font-size: 1.02rem; line-height: 1.6; opacity: .82; max-inline-size: 46ch; }

.vp-auth__points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.vp-auth__points li { display: flex; align-items: center; gap: 12px; font-weight: 500; opacity: .95; }
.vp-auth__tick {
    flex: 0 0 auto;
    inline-size: 26px; block-size: 26px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .16);
    font-size: 13px;
}
.vp-auth__foot { position: relative; z-index: 1; font-size: .85rem; opacity: .7; }


/* ----------------------------------------------------------------------------
   SPECIFICITY NOTE
   base.css resets form controls with `body.vp button`, `body.vp input`, … —
   selectors that score (0,1,2). A bare class like `.vp-submit` scores (0,1,0)
   and therefore LOSES to the reset, which is why the sign-in button rendered
   transparent with no gradient. The interactive rules below are prefixed with
   `body.vp` so they outrank the reset instead of fighting it with !important.
   -------------------------------------------------------------------------- */

/* --- form side --- */
.vp-auth__panel {
    display: grid;
    place-items: center;
    padding: clamp(24px, 5vw, 56px);
}
.vp-auth__card {
    inline-size: min(100%, 420px);
    animation: vp-view-in var(--vp-dur-slow) var(--vp-ease-out);
}
.vp-auth__mobilebrand {
    font-size: 1.4rem; font-weight: 800; color: var(--vp-primary);
    margin-block-end: 28px; letter-spacing: -.02em;
}
@media (min-width: 960px) { .vp-auth__mobilebrand { display: none; } }

.vp-auth__title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; color: var(--vp-text); }
.vp-auth__hint  { color: var(--vp-text-muted); margin: 0 0 28px; line-height: 1.55; }

.vp-field { margin-block-end: 20px; }
.vp-field label {
    display: block;
    font-size: .8rem; font-weight: 600;
    color: var(--vp-text); margin-block-end: 7px;
}
body.vp .vp-input {
    inline-size: 100%;
    padding: 12px 14px;
    font: inherit;
    color: var(--vp-text);
    background: var(--vp-surface);
    border: 1px solid var(--vp-border);
    border-radius: var(--vp-radius-md, 10px);
    transition: border-color var(--vp-dur-fast) var(--vp-ease),
                box-shadow  var(--vp-dur-fast) var(--vp-ease);
}
body.vp .vp-input::placeholder { color: var(--vp-neutral-400, #9CA3AF); }
body.vp .vp-input:focus { outline: none; border-color: var(--vp-primary); box-shadow: var(--vp-focus-ring); }
body.vp .vp-input.is-invalid { border-color: var(--vp-danger, #EF4444); }

/* The toggle shares the input's grid cell instead of being absolutely
   positioned against the field.

   It used to sit at `inset-block-end: 5px` of `.vp-field--pw`. That is the
   bottom of the WHOLE field — label, input and any error message — so it only
   lined up with the input by coincidence, off by 1.5px because the input is
   46px and the button 34px. The moment `@error('password')` renders a message
   the field grows and the button drops away from the input entirely.

   Putting the label, input and error in explicit rows and placing the button in
   the input's own row makes the centring exact and independent of both the
   label height and the presence of an error. `align-self: center` does the
   vertical work; `justify-self: end` is logical, so it stays on the correct
   side in Arabic. */
.vp-field--pw {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
}
/* grid-column must be pinned too. With only `grid-row: 2` the button is
   auto-placed into the NEXT free column of that row, which creates an implicit
   second track — the field became `380px 40px` and the toggle sat outside the
   input rather than on top of it. */
.vp-field--pw > label          { grid-row: 1; grid-column: 1; }
.vp-field--pw > .vp-input      { grid-row: 2; grid-column: 1; }
.vp-field--pw > .vp-err        { grid-row: 3; grid-column: 1; }
body.vp .vp-field--pw .vp-input { padding-inline-end: 46px; }
body.vp .vp-pwtoggle {
    grid-row: 2;
    grid-column: 1;
    justify-self: end;
    align-self: center;
    margin-inline-end: 6px;
    inline-size: 34px; block-size: 34px;
    display: grid; place-items: center;
    border: 0; background: transparent; cursor: pointer;
    color: var(--vp-text-muted);
    border-radius: var(--vp-radius-sm, 8px);
    transition: color var(--vp-dur-fast) var(--vp-ease), background var(--vp-dur-fast) var(--vp-ease);
}
body.vp .vp-pwtoggle:hover { color: var(--vp-primary); background: var(--vp-primary-soft); }

.vp-auth__row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-block: 6px 24px;
}
.vp-check { display: inline-flex; align-items: center; gap: 8px; color: var(--vp-text-muted); font-size: .9rem; cursor: pointer; }
body.vp .vp-check input { inline-size: 16px; block-size: 16px; accent-color: var(--vp-primary); cursor: pointer; }
.vp-link { color: var(--vp-blue, #1A73E8); text-decoration: none; font-size: .9rem; font-weight: 600; }
.vp-link:hover { text-decoration: underline; }

body.vp .vp-submit {
    inline-size: 100%;
    margin-block-start: 8px;
    padding: 13px 18px;
    font: inherit; font-weight: 700;
    color: #fff; cursor: pointer;
    border: 0;
    border-radius: var(--vp-radius-md, 10px);
    background: linear-gradient(135deg, #4A2EB4 0%, #6C4CF1 55%, #8B5CF6 100%);
    box-shadow: 0 4px 14px -3px rgba(108, 76, 241, .5);
    transition: transform var(--vp-dur-fast) var(--vp-ease), box-shadow var(--vp-dur-base) var(--vp-ease);
}
body.vp .vp-submit:hover  { transform: var(--vp-lift); box-shadow: 0 10px 24px -5px rgba(108, 76, 241, .6); }
body.vp .vp-submit:active { transform: var(--vp-press); }

.vp-alert {
    display: flex; gap: 10px;
    padding: 12px 14px;
    border-radius: var(--vp-radius-md, 10px);
    background: var(--vp-danger-soft);
    color: var(--vp-danger-text);
    border: 1px solid var(--vp-danger-soft-border);
    font-size: .9rem;
    margin-block-end: 20px;
    animation: vp-view-in var(--vp-dur-base) var(--vp-ease-out);
}
.vp-alert--ok {
    background: var(--vp-success-soft);
    color: var(--vp-success-text);
    border-color: var(--vp-success-soft-border);
}
.vp-err { display: block; color: var(--vp-danger, #EF4444); font-size: .82rem; margin-block-start: 6px; }

.vp-auth__cta { text-align: center; margin-block-start: 26px; color: var(--vp-text-muted); font-size: .9rem; }

/* ============================================================================
   MOTION LAYER
   ----------------------------------------------------------------------------
   Thesis: Hayat In is a product about a city that is ALIVE — offers going live,
   events starting, stamps being collected. So the brand panel is an ambient
   activity field, and the form arrives on top of it as one orchestrated
   sequence rather than a scatter of independent effects.

   Rules this layer holds itself to:
     * transform and opacity only — nothing here triggers layout or paint on the
       main thread, so the ambient loops stay free even on a counter tablet.
     * one signature (the activity field). Everything else is short, functional
       feedback: focus, press, submit, error.
     * every entrance animation uses `backwards` fill, so an element is invisible
       BEFORE its delay elapses rather than flashing at full opacity first.
     * the whole layer collapses to a finished, static state under
       prefers-reduced-motion — see the cutout at the bottom.
   ========================================================================== */

/* ---------------------------------------------------------------- timings */
:root {
  --auth-in:      760ms;   /* a hero entrance can afford to be slower than UI */
  --auth-step:    90ms;    /* stagger between siblings in a sequence */
  --auth-ease:    cubic-bezier(.16, 1, .3, 1);
  --auth-spring:  cubic-bezier(.34, 1.4, .5, 1);
}

/* ============================ 1. THE BRAND PANEL ========================= */

/* The gradient itself drifts. Very slow (28s) and small — this should read as
   "the surface is alive", never as "something is moving". */
.vp-auth__brand {
  background: linear-gradient(135deg, #2A1A66 0%, #4A2EB4 45%, #6C4CF1 100%);
  background-size: 160% 160%;
  /* Fixed. No sweep, no pulse — the panel is a stable ground for the activity
     field to move against. */
  background-position: 30% 50%;
}

/* The panel wipes in from its inline-start edge on load. clip-path rather than
   transform so the glows inside are revealed rather than dragged. */
/* The only animation left on the panel is its one-off entrance wipe. */
.vp-auth__brand { animation: auth-wipe 900ms var(--auth-ease, ease) both; }
@keyframes auth-wipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
[dir="rtl"] .vp-auth__brand { animation-name: auth-wipe-rtl; }
@keyframes auth-wipe-rtl {
  from { clip-path: inset(0 0 0 100%); }
  to   { clip-path: inset(0 0 0 0); }
}

/* ------------------------------------------------- 1a. the activity field */

/* THE SIGNATURE. Chips carrying real product moments drift up through the
   panel, each on its own duration and delay so the field never visibly loops.
   Positioned in a container that ignores pointer events entirely. */
.vp-auth__field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.vp-auth__pulse {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
  white-space: nowrap;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
  opacity: 0;
  /* Parked one panel-height BELOW the visible area and travelling the whole way
     up. Previously these had no block position at all, so they defaulted to the
     container's top edge and the translate percentages (which resolve against
     the ELEMENT's own height, not the container's) gave roughly two chip-heights
     of travel — all of it bunched at the top of the panel. */
  inset-block-start: 100%;
  animation: auth-drift var(--dur, 26s) linear var(--delay, 0s) infinite;
  will-change: transform, opacity;
}
.vp-auth__pulse i {
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--dot, #22C55E);
  box-shadow: 0 0 0 0 var(--dot, #22C55E);
  animation: auth-ping 2.4s var(--vp-ease) infinite;
}

/* Rises the full panel height, fading in and out at the ends so nothing pops.
   dvh rather than vh so a mobile browser's collapsing toolbar does not leave a
   chip stranded mid-screen. */
@keyframes auth-drift {
  0%   { transform: translate3d(0, 0, 0) scale(.94); opacity: 0; }
  6%   { opacity: 1; }
  94%  { opacity: 1; }
  100% { transform: translate3d(0, calc(-100dvh - 100%), 0) scale(1); opacity: 0; }
}
@supports not (height: 100dvh) {
  @keyframes auth-drift {
    0%   { transform: translate3d(0, 0, 0) scale(.94); opacity: 0; }
    6%   { opacity: 1; }
    94%  { opacity: 1; }
    100% { transform: translate3d(0, calc(-100vh - 100%), 0) scale(1); opacity: 0; }
  }
}
@keyframes auth-ping {
  0%   { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70%  { box-shadow: 0 0 0 7px transparent; opacity: .75; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

/* The glows already float; give them different rhythms so they never sync. */
.vp-auth__glow--a { animation: vp-float 14s var(--vp-ease) infinite alternate; }
.vp-auth__glow--b { animation: vp-float 19s var(--vp-ease) infinite alternate-reverse; }

/* ------------------------------------------------ 1b. staged brand content */

.vp-auth__wordmark,
.vp-auth__headline,
.vp-auth__sub,
.vp-auth__points li,
.vp-auth__foot {
  animation: auth-rise var(--auth-in) var(--auth-ease) backwards;
}
.vp-auth__wordmark  { animation-delay: 260ms; }
.vp-auth__headline  { animation-delay: 420ms; }
.vp-auth__sub       { animation-delay: 520ms; }
.vp-auth__points li { animation-delay: calc(600ms + var(--i, 0) * var(--auth-step)); }
.vp-auth__foot      { animation-delay: 900ms; }

@keyframes auth-rise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to   { opacity: 1; transform: none; }
}

/* The headline reveals line by line behind a mask — the one piece of type
   choreography on the page, so it stays the thing you notice. */
.vp-auth__headline span {
  display: block;
  overflow: hidden;
}
.vp-auth__headline span > b {
  display: block;
  font-weight: inherit;
  animation: auth-line var(--auth-in) var(--auth-ease) backwards;
  animation-delay: calc(430ms + var(--i, 0) * 110ms);
}
@keyframes auth-line {
  from { transform: translate3d(0, 110%, 0); }
  to   { transform: none; }
}

/* The sparkle ticks draw themselves in. */
.vp-auth__tick { animation: auth-pop 520ms var(--auth-spring) backwards; animation-delay: calc(720ms + var(--i, 0) * var(--auth-step)); }
@keyframes auth-pop {
  from { opacity: 0; transform: scale(.4) rotate(-25deg); }
  to   { opacity: 1; transform: none; }
}

/* ============================== 2. THE FORM ============================== */

.vp-auth__card { animation: auth-card var(--auth-in) var(--auth-ease) backwards; animation-delay: 160ms; }
@keyframes auth-card {
  from { opacity: 0; transform: translate3d(0, 26px, 0) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.vp-auth__mobilebrand,
.vp-auth__title,
.vp-auth__hint,
.vp-auth__card .vp-field,
.vp-auth__row,
.vp-submit,
.vp-auth__cta {
  animation: auth-rise 620ms var(--auth-ease) backwards;
}
.vp-auth__mobilebrand      { animation-delay: 260ms; }
.vp-auth__title            { animation-delay: 320ms; }
.vp-auth__hint             { animation-delay: 380ms; }
.vp-auth__card .vp-field:nth-of-type(1) { animation-delay: 460ms; }
.vp-auth__card .vp-field:nth-of-type(2) { animation-delay: 530ms; }
.vp-auth__row              { animation-delay: 600ms; }
.vp-submit                 { animation-delay: 660ms; }
.vp-auth__cta              { animation-delay: 740ms; }

/* --------------------------------------------------- 2a. field behaviour */

/* The label lifts and tints while its field has focus. Uses :focus-within on
   the wrapper so it also fires when focus lands via the password toggle. */
.vp-field { position: relative; }
.vp-field label {
  transition: color var(--vp-dur-fast) var(--vp-ease),
              transform var(--vp-dur-base) var(--auth-ease);
  transform-origin: inline-start center;
}
.vp-field:focus-within label {
  color: var(--vp-primary);
  transform: translateY(-1px);
}

.vp-input {
  transition: border-color var(--vp-dur-fast) var(--vp-ease),
              box-shadow  var(--vp-dur-base) var(--vp-ease),
              background  var(--vp-dur-fast) var(--vp-ease),
              transform   var(--vp-dur-fast) var(--vp-ease);
}
.vp-input:focus { transform: translateY(-1px); }

/* A hairline sweeps along the field's bottom edge on focus — scaleX from the
   inline-start edge, so it grows the correct way under RTL. */
.vp-field::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  block-size: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--vp-primary), #8B5CF6);
  transform: scaleX(0);
  transform-origin: inline-start;
  transition: transform var(--vp-dur-slow) var(--auth-ease);
  pointer-events: none;
}
.vp-field:focus-within::after { transform: scaleX(1); }

.vp-pwtoggle svg { transition: transform var(--vp-dur-base) var(--auth-spring), opacity var(--vp-dur-fast) var(--vp-ease); }
.vp-pwtoggle[aria-pressed="true"] svg { transform: scale(1.12) rotate(-8deg); }

.vp-check input { transition: transform var(--vp-dur-fast) var(--auth-spring); }
.vp-check input:checked { transform: scale(1.12); }

/* Links get a sweep rather than a static underline. */
.vp-link { position: relative; text-decoration: none; }
.vp-link::after {
  content: "";
  position: absolute;
  inset-block-end: -2px;
  inset-inline-start: 0;
  inline-size: 100%;
  block-size: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: inline-end;
  transition: transform var(--vp-dur-base) var(--auth-ease);
}
.vp-link:hover { text-decoration: none; }
.vp-link:hover::after { transform: scaleX(1); transform-origin: inline-start; }

/* --------------------------------------------------- 2b. the submit button */

.vp-submit {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* A light sheen crosses on hover. */
.vp-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.28) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 780ms var(--auth-ease);
}
.vp-submit:hover::after { transform: translateX(120%); }

/* Submitting: the label leaves, a spinner takes its place, the button narrows.
   Driven by a class rather than :disabled so the state is explicit. */
.vp-submit.is-busy { color: transparent; pointer-events: none; }
.vp-submit.is-busy::before {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 18px; block-size: 18px;
  margin-block-start: -9px; margin-inline-start: -9px;
  border: 2px solid rgba(255,255,255,.45);
  border-block-start-color: #fff;
  border-radius: 50%;
  animation: vp-spin .62s linear infinite;
}

/* ------------------------------------------------------- 2c. error states */

.vp-alert { animation: auth-shake 520ms var(--vp-ease) both; }
@keyframes auth-shake {
  0%   { opacity: 0; transform: translate3d(0, -8px, 0); }
  40%  { opacity: 1; transform: translate3d(0, 0, 0); }
  55%  { transform: translate3d(-6px, 0, 0); }
  70%  { transform: translate3d(5px, 0, 0); }
  85%  { transform: translate3d(-3px, 0, 0); }
  100% { transform: none; }
}
.vp-input.is-invalid { animation: auth-nudge 380ms var(--vp-ease) both; }
@keyframes auth-nudge {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-5px); }
  60%     { transform: translateX(4px); }
}

/* ============================ 3. REDUCED MOTION ========================== */

/* Everything above resolves to its finished state. Note the animations are not
   merely shortened — `animation: none` would leave `backwards`-filled elements
   stuck at opacity 0, so they are explicitly reset to visible. */
@media (prefers-reduced-motion: reduce) {
  .vp-auth__brand,
  .vp-auth__glow--a,
  .vp-auth__glow--b,
  .vp-auth__wordmark,
  .vp-auth__headline,
  .vp-auth__headline span > b,
  .vp-auth__sub,
  .vp-auth__points li,
  .vp-auth__tick,
  .vp-auth__foot,
  .vp-auth__card,
  .vp-auth__mobilebrand,
  .vp-auth__title,
  .vp-auth__hint,
  .vp-auth__card .vp-field,
  .vp-auth__row,
  .vp-submit,
  .vp-auth__cta,
  .vp-alert {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  /* The activity field is decorative; remove it rather than freeze it. */
  .vp-auth__field { display: none; }
  .vp-field::after,
  .vp-link::after { transition: none; }
}

/* ======================= 4. THE ANIMATED GROUND ==========================
   The brand half already breathes. This gives the FORM half a living ground
   too — but a quiet one: a soft mesh of colour blooms drifting on three
   different cycles, plus a slow-moving grid that gives the drift something to
   read against.

   Kept deliberately faint. The form is the job of this screen; the background
   is allowed to be noticed once and then ignored. In light mode the blooms sit
   at a few percent opacity; dark mode can carry more, because a glow on a dark
   ground reads as depth rather than as haze.
   ======================================================================== */

.vp-auth {
  position: relative;
  isolation: isolate;
  background: var(--vp-bg);
}

/* --- the mesh ---------------------------------------------------------- */
.vp-auth::before {
  content: "";
  position: absolute;
  inset: -20%;                       /* overscan, so a drifting bloom never
                                        exposes a hard edge at the viewport */
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 22% 28%, color-mix(in srgb, var(--vp-primary) 22%, transparent) 0%, transparent 70%),
    radial-gradient(34% 38% at 78% 66%, color-mix(in srgb, #06B6D4 18%, transparent) 0%, transparent 70%),
    radial-gradient(30% 34% at 58% 12%, color-mix(in srgb, #EC4899 14%, transparent) 0%, transparent 70%);
  opacity: .5;
  filter: blur(12px);
  /* Static. This started as a drift, then as a periodic brighten — both were
     wrong for a screen you sit and type on. The colour is the point; the
     movement was not. The only thing that moves on this page now is the
     activity field. */
}

/* Browsers without color-mix() get a flat, still-pleasant fallback rather than
   three invisible gradients. */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
  .vp-auth::before {
    background:
      radial-gradient(38% 42% at 22% 28%, rgba(108, 76, 241, .20) 0%, transparent 70%),
      radial-gradient(34% 38% at 78% 66%, rgba(6, 182, 212, .16) 0%, transparent 70%),
      radial-gradient(30% 34% at 58% 12%, rgba(236, 72, 153, .12) 0%, transparent 70%);
  }
}



/* --- the grid ----------------------------------------------------------- */
/* A faint lattice drifting diagonally. It is what makes the mesh above read as
   MOVEMENT rather than as a static wash — the eye needs an edge to measure
   against. Masked to fade out towards the centre so it never sits behind the
   form's text. */
.vp-auth::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--vp-text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--vp-text) 6%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: .26;   /* static — see the note on the mesh above */
  -webkit-mask-image: radial-gradient(70% 60% at 50% 50%, transparent 20%, #000 85%);
          mask-image: radial-gradient(70% 60% at 50% 50%, transparent 20%, #000 85%);
}
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
  .vp-auth::after {
    background-image:
      linear-gradient(to right, rgba(120,120,140,.08) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(120,120,140,.08) 1px, transparent 1px);
  }
}



/* Dark mode carries the blooms harder — on a near-black ground a 22% bloom is
   barely visible, and the depth is the point. */
:root[data-theme="dark"] .vp-auth::before,
:root[data-vp-theme="dark"] .vp-auth::before { opacity: .8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-vp-theme="light"]) .vp-auth::before { opacity: .8; }
}

/* The brand panel paints its own gradient over all of this, so the mesh only
   ever shows through on the form half — which is the intent. */
.vp-auth__brand { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .vp-auth::before,
  .vp-auth::after { animation: none !important; }
  /* Left visible but still: the ground is part of the composition, and a
     static mesh is not a motion hazard. */
}
