:root {
  --login-bg: linear-gradient(135deg, #7A5197 0%, #916ec2 50%, #bb5098 100%);
}

.auth-bg {
  background: var(--login-bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

/* A subtle glow layer to make it look premium */
.auth-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 20% 10%, rgba(255, 255, 255, 0.20), transparent 60%),
    radial-gradient(700px 400px at 80% 20%, rgba(0, 0, 0, 0.18), transparent 60%),
    radial-gradient(800px 500px at 50% 90%, rgba(255, 255, 255, 0.10), transparent 60%);
  pointer-events: none;
}

/* Keep the actual content above the glow layer */
.auth-bg>* {
  position: relative;
  z-index: 1;
}

.auth-logo {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.25));
}

.auth-header {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.30);
}

/* The card look */
.auth-card {
  border-radius: 18px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.45) inset;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
}

@media (min-width: 640px) {
  .auth-card {
    padding: 40px;
  }
}

/* Inputs */
.auth-input {
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  outline: none;
  transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.auth-input:focus {
  border-color: rgba(122, 81, 151, 0.55);
  box-shadow:
    0 0 0 4px rgba(122, 81, 151, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

/* Buttons */
.auth-button {
  background: linear-gradient(135deg, #7A5197, #916ec2);
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 14px 30px rgba(122, 81, 151, 0.35);
  border: 0;
}

.auth-button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(122, 81, 151, 0.42);
}

.auth-button:active {
  transform: translateY(0px);
  box-shadow: 0 10px 22px rgba(122, 81, 151, 0.32);
}

/* Links */
.auth-link {
  color: var(--primary-color);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Checkbox */
.auth-checkbox {
  accent-color: var(--primary-color);
}

/* Flash messages */
.auth-flash {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.875rem;
  border: 1px solid transparent;
  margin-bottom: 16px;
}

.auth-flash--ok {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.25);
  color: rgb(6, 95, 70);
}

.auth-flash--error {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.25);
  color: rgb(127, 29, 29);
}
/* A highlight that sweeps across the logo every few seconds. The sweep is
   masked by the logo bitmap itself (--auth-logo-mask, set inline in the auth
   layout), so the shine only ever touches the glyphs — never the transparent
   space around them.

   The band is shaped like a silver reflection rather than a plain white
   glow: the wordmark is already pure white, so brightness has to come from
   contrast, not from adding light. Two cool grey flanks ride either side of
   a white-hot core — the eye reads the untouched white between them as the
   gleam, the way a highlight travels across brushed metal. */
.auth-logo-sheen {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.auth-logo-sheen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(100deg,
      transparent 32%,
      rgba(162, 176, 201, 0.16) 38%,
      rgba(162, 176, 201, 0.58) 45%,
      rgba(255, 255, 255, 0.95) 50%,
      rgba(162, 176, 201, 0.58) 55%,
      rgba(162, 176, 201, 0.16) 62%,
      transparent 68%);
  background-repeat: no-repeat;
  background-size: 220% 100%;
  -webkit-mask-image: var(--auth-logo-mask);
  mask-image: var(--auth-logo-mask);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: auth-logo-sheen 8s linear 1.2s infinite;
}

/* Oversized background, so 105% parks the band just left of the logo and -5%
   just past its right edge. One cycle: a sweep left to right, a beat at the
   far edge, the same sweep back, then a long rest. Both travels span 19% of
   the cycle with identical easing, so they run at the same speed. The base
   timing is linear, which keeps the holds still. */
@keyframes auth-logo-sheen {
  /* rest before the sweep */
  0%, 7% {
    background-position: 105% 0;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* left to right, ~1.5s, then a beat at the far edge */
  26%, 30% {
    background-position: -5% 0;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* back again at the same pace, then hold for the rest of the cycle */
  49%, 100% {
    background-position: 105% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-logo-sheen::after {
    animation: none;
    opacity: 0;
  }
}
