.auth-page {
  align-items: center;
  background: radial-gradient(
    circle at top,
    var(--color-primary-soft),
    var(--color-bg-soft)
  );
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.auth-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  max-width: 460px;
  padding: 2rem;
  width: 100%;
}

.auth-card.wide {
  max-width: 720px;
}

.auth-card h1 {
  margin: 0 0 1.5rem;
}

.auth-link {
  color: var(--color-primary);
  display: block;
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
}

.auth-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.check-row {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.form-info {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  color: #78350f;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.75rem;
}

.form-info span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.24rem 0.58rem;
}

/* ════════════════════════════════════════════════════════════
   AUTH LOGIN 3.0  —  al-* namespace
   Single centered glass card over a dark aurora-night scene
   matching the landing hero. Animated canvas background + logo watermark.
   ════════════════════════════════════════════════════════════ */

@keyframes al-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes al-glow-pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}
@keyframes al-knowledge-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotateX(10deg) rotateY(-12deg)
      rotateZ(-3deg);
  }
  50% {
    transform: translate3d(0, -18px, 22px) rotateX(-7deg) rotateY(14deg)
      rotateZ(4deg);
  }
}
@keyframes al-knowledge-float-reverse {
  0%,
  100% {
    transform: translate3d(0, 0, 10px) rotateX(-8deg) rotateY(14deg)
      rotateZ(4deg);
  }
  50% {
    transform: translate3d(0, 16px, -12px) rotateX(11deg) rotateY(-10deg)
      rotateZ(-5deg);
  }
}

/* Root */
.al {
  align-items: center;
  background:
    radial-gradient(
      120% 120% at 50% 0%,
      rgba(14, 166, 120, 0.18),
      transparent 55%
    ),
    radial-gradient(
      100% 100% at 82% 100%,
      rgba(56, 189, 248, 0.14),
      transparent 52%
    ),
    linear-gradient(160deg, #08201d 0%, #0a2233 52%, #06141a 100%);
  display: flex;
  font-family: var(--font-family);
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 2rem 1rem;
  position: relative;
}

/* Animated canvas background */
.al-canvas {
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 0;
}

/* Floating learning objects share the canvas parallax, but retain their own
   gentle 3D motion so the scene feels alive without competing with the form. */
.al-knowledge-scene {
  --al-scene-rx: 0deg;
  --al-scene-ry: 0deg;
  --al-scene-x: 0px;
  --al-scene-y: 0px;
  inset: 0;
  perspective: 900px;
  pointer-events: none;
  position: absolute;
  transform: translate3d(var(--al-scene-x), var(--al-scene-y), 0)
    rotateX(var(--al-scene-rx)) rotateY(var(--al-scene-ry));
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.2, 0.75, 0.25, 1);
  z-index: 1;
}
.al-knowledge-item {
  align-items: center;
  animation: al-knowledge-float 7s ease-in-out infinite;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(
    145deg,
    rgba(94, 224, 178, 0.13),
    rgba(56, 189, 248, 0.045)
  );
  border: 1px solid rgba(151, 242, 211, 0.16);
  border-radius: 18px;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 0 30px rgba(14, 166, 120, 0.06);
  color: rgba(151, 242, 211, 0.48);
  display: flex;
  height: 58px;
  justify-content: center;
  position: absolute;
  transform-style: preserve-3d;
  width: 58px;
}
.al-knowledge-item::after {
  background: rgba(94, 224, 178, 0.12);
  border-radius: inherit;
  content: "";
  inset: 7px -7px -7px 7px;
  position: absolute;
  transform: translateZ(-14px);
}
.al-knowledge-item i {
  font-size: 1.55rem;
  transform: translateZ(18px);
}
.al-knowledge-item:nth-child(even) {
  animation-name: al-knowledge-float-reverse;
}
.al-knowledge-item:nth-child(1) {
  animation-delay: -1.1s;
  left: 10%;
  top: 19%;
}
.al-knowledge-item:nth-child(2) {
  animation-delay: -4.8s;
  right: 11%;
  top: 18%;
}
.al-knowledge-item:nth-child(3) {
  animation-delay: -3.2s;
  left: 7%;
  top: 48%;
}
.al-knowledge-item:nth-child(4) {
  animation-delay: -0.7s;
  right: 7%;
  top: 46%;
}
.al-knowledge-item:nth-child(5) {
  animation-delay: -5.5s;
  bottom: 14%;
  left: 15%;
}
.al-knowledge-item:nth-child(6) {
  animation-delay: -2.4s;
  bottom: 13%;
  right: 14%;
}
.al-knowledge-item:nth-child(7) {
  animation-delay: -6.2s;
  bottom: 5%;
  left: 38%;
}
.al-knowledge-item:nth-child(8) {
  animation-delay: -3.8s;
  bottom: 5%;
  right: 36%;
}

/* Ambient orbs */
.al-orb {
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  position: absolute;
  z-index: 0;
}
.al-orb--1 {
  background: rgba(14, 166, 120, 0.32);
  height: 520px;
  right: -140px;
  top: -160px;
  width: 520px;
  animation: al-glow-pulse 9s ease-in-out infinite;
}
.al-orb--2 {
  background: rgba(56, 189, 248, 0.12);
  height: 400px;
  bottom: -100px;
  left: -120px;
  width: 400px;
  animation: al-glow-pulse 14s ease-in-out infinite 3s;
}

/* Giant logo watermark behind the card */
.al-logo-watermark {
  align-items: center;
  display: flex;
  justify-content: center;
  left: calc(50% + 0px);
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}
.al-logo-watermark img {
  filter: brightness(0) invert(1);
  /* The source is a square canvas with the visible mark occupying only its
     middle third. Scale the canvas generously so the book fills the scene;
     keeping it static also leaves the road precisely on the page centreline. */
  height: clamp(850px, 90vw, 1300px);
  max-width: none;
  width: auto;
}

/* ─── Glass card ─── */
.al-card {
  background: rgba(10, 24, 30, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(94, 224, 178, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  max-width: 440px;
  padding: clamp(2rem, 5vw, 3rem);
  position: relative;
  width: 100%;
  z-index: 2;
}

/* Brand header */
.al-brand {
  align-items: center;
  display: inline-flex;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
  text-decoration: none;
}
.al-brand-logo {
  height: 50px;
  width: auto;
}
.al-brand-name strong {
  color: white;
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.25;
}
.al-brand-name small {
  color: rgba(180, 235, 220, 0.5);
  font-size: 0.73rem;
}

.al-eyebrow {
  background: rgba(94, 224, 178, 0.12);
  border: 1px solid rgba(94, 224, 178, 0.22);
  border-radius: 999px;
  color: #5ee0b2;
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  padding: 0.3rem 1rem;
}
.al-title {
  color: white;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.12;
  margin: 0 0 0.45rem;
}
.al-sub {
  color: rgba(224, 237, 236, 0.4);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 2rem;
}

/* Fields */
.al-form {
  display: flex;
  flex-direction: column;
}
.al-field {
  margin-bottom: 1.1rem;
}
.al-field-inner {
  position: relative;
}

.al-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: white;
  direction: rtl;
  font-family: inherit;
  font-size: 1rem;
  height: 60px;
  outline: none;
  padding: 22px 1.1rem 8px;
  transition:
    border-color 0.22s,
    background 0.22s,
    box-shadow 0.22s;
  width: 100%;
}
.al-input:focus {
  background: rgba(14, 166, 120, 0.07);
  border-color: #5ee0b2;
  box-shadow: 0 0 0 3px rgba(94, 224, 178, 0.14);
}
.al-input::placeholder {
  color: transparent;
}

.al-label {
  color: rgba(255, 255, 255, 0.32);
  font-size: 0.95rem;
  pointer-events: none;
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  transition:
    top 0.22s,
    font-size 0.22s,
    color 0.22s,
    transform 0.22s;
}
.al-input:focus ~ .al-label,
.al-input:not(:placeholder-shown) ~ .al-label {
  color: #5ee0b2;
  font-size: 0.7rem;
  font-weight: 700;
  top: 10px;
  transform: none;
}

.al-eye {
  align-items: center;
  background: none;
  border: none;
  bottom: 0;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  display: flex;
  justify-content: center;
  left: 0.85rem;
  padding: 0;
  position: absolute;
  top: 0;
  transition: color 0.15s;
  width: 36px;
}
.al-eye:hover {
  color: rgba(255, 255, 255, 0.72);
}
.al-eye span {
  align-items: center;
  display: flex;
}

.al-error {
  color: #f87171;
  font-size: 0.77rem;
  margin: 0.35rem 0.2rem 0;
}

/* Remember + forgot row */
.al-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0 1.5rem;
}
.al-check {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 0.55rem;
  user-select: none;
}
.al-check input[type="checkbox"] {
  display: none;
}
.al-check-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  flex-shrink: 0;
  height: 18px;
  position: relative;
  transition:
    background 0.15s,
    border-color 0.15s;
  width: 18px;
}
.al-check input:checked ~ .al-check-box {
  background: #0ea678;
  border-color: #0ea678;
}
.al-check input:checked ~ .al-check-box::after {
  border-bottom: 2px solid white;
  border-left: 2px solid white;
  content: "";
  height: 5px;
  left: 3px;
  position: absolute;
  top: 4px;
  transform: rotate(-45deg);
  width: 9px;
}
.al-check-label {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.85rem;
}
.al-forgot {
  color: rgba(94, 224, 178, 0.85);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.15s;
}
.al-forgot:hover {
  color: #5ee0b2;
  text-decoration: underline;
}

/* Submit */
.al-submit {
  align-items: center;
  background: linear-gradient(135deg, #10b882 0%, #0ea678 50%, #0b8c66 100%);
  border: none;
  border-radius: 14px;
  box-shadow: 0 10px 38px rgba(14, 166, 120, 0.44);
  color: white;
  cursor: pointer;
  display: flex;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 800;
  height: 58px;
  justify-content: center;
  transition: box-shadow 0.15s;
  width: 100%;
}
.al-submit:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.al-spin {
  animation: al-spin 0.7s linear infinite;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  display: block;
  height: 22px;
  width: 22px;
}

.al-foot {
  margin-top: 1.75rem;
  text-align: center;
}
.al-back {
  align-items: center;
  color: rgba(255, 255, 255, 0.27);
  display: inline-flex;
  font-size: 0.85rem;
  gap: 0.45rem;
  text-decoration: none;
  transition: color 0.15s;
}
.al-back:hover {
  color: rgba(255, 255, 255, 0.62);
}
.al-back i {
  font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .al {
    padding: 1rem;
  }
  .al-card {
    border-radius: 22px;
    padding: 1.75rem 1.5rem;
  }
  .al-brand {
    margin-bottom: 2rem;
  }
  .al-logo-watermark {
    left: 50%;
  }
  .al-knowledge-item {
    height: 44px;
    opacity: 0.55;
    width: 44px;
  }
  .al-knowledge-item i {
    font-size: 1.15rem;
  }
  .al-knowledge-item:nth-child(3),
  .al-knowledge-item:nth-child(4),
  .al-knowledge-item:nth-child(7),
  .al-knowledge-item:nth-child(8) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .al-knowledge-scene {
    transition: none;
  }
  .al-knowledge-item {
    animation: none;
  }
}
