/* ==========================================================================
   Authentication experience ("au") — cinematic split layout.
   Start side: an immersive brand scene (layered aurora, grain, floating
   glass objects). End side: the auth panel with floating-label fields,
   premium button and inline status banners. The error pages (.err-*) reuse
   the app chrome and its --nv tokens, everything else is self-contained.
   RTL comes free: the grid and all spacing follow the writing direction.
   ========================================================================== */

:root {
  --au-night: #081727;
  --au-night-2: #0c2438;
  --au-ink: #0d1f38;
  --au-ink-2: #52627b;
  --au-ink-3: #8291a6;
  --au-surface: #ffffff;
  --au-surface-2: #f4f7f9;
  --au-surface-3: #eaeff3;
  --au-border: rgba(13, 35, 63, 0.1);
  --au-border-strong: rgba(13, 35, 63, 0.2);
  --au-teal: #2a9d9d;
  --au-teal-bright: #44b4b4;
  /* button-gradient start: keeps white labels at WCAG AA (≈4.6:1) */
  --au-teal-btn: #1a8384;
  --au-teal-deep: #14787a;
  --au-teal-soft: rgba(68, 180, 180, 0.12);
  --au-plum: #980065;
  --au-danger: #b3253a;
  --au-danger-soft: #fdf1f2;
  --au-ok: #2e7d5b;
  --au-ok-soft: #eaf6f0;
  --au-radius: 16px;
  --au-shadow:
    0 2px 6px rgba(8, 23, 39, 0.06), 0 24px 48px -24px rgba(8, 23, 39, 0.35);
}

/* the auth pages own the whole viewport */
.main-container:has(.au) {
  padding: 0;
  height: auto;
  background: none;
}

/* fallback for engines without :has() */
.au-body .main-container {
  padding: 0;
  height: auto;
  background: none;
}

/* --------------------------------------------------------------------------
   Split scaffold
   -------------------------------------------------------------------------- */

.au {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--au-surface);
}

@media (max-width: 991.98px) {
  .au {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Brand scene
   -------------------------------------------------------------------------- */

.au-scene {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 3.2rem);
  background:
    radial-gradient(
      1200px 800px at 85% 110%,
      rgba(68, 180, 180, 0.22),
      transparent 60%
    ),
    linear-gradient(
      160deg,
      var(--au-night) 10%,
      var(--au-night-2) 55%,
      #0d3a46 100%
    );
  color: #eaf4f6;
}

/* Photograph layer (all auth pages). The campus photo fills the whole panel
   (cover, centred — the picture is 16:9, so tall desktop panels trim the sides
   and the tablet band trims top/bottom, never distorting). The aurora, grain
   and a directional wash sit over it so the copy stays readable. Same look
   in light and dark mode (the auth pages carry their own palette). */
.au-scene__photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.au-scene__photo-img {
  position: absolute;
  inset: 0;
  background: url("../../images/backgrounds/background3.jpg") center / cover
    no-repeat;
}

/* wash: heavier on the copy side (inline-start), lifting toward the far edge;
   plus a soft foot vignette. Mirrored for RTL — the photo itself never flips. */
.au-scene__photo-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(8, 23, 39, 0.78) 0%,
      rgba(8, 23, 39, 0.55) 45%,
      rgba(12, 36, 56, 0.36) 100%
    ),
    linear-gradient(to top, rgba(8, 23, 39, 0.45), transparent 34%);
}

html[dir="rtl"] .au-scene__photo-img::after {
  background:
    linear-gradient(
      to left,
      rgba(8, 23, 39, 0.78) 0%,
      rgba(8, 23, 39, 0.55) 45%,
      rgba(12, 36, 56, 0.36) 100%
    ),
    linear-gradient(to top, rgba(8, 23, 39, 0.45), transparent 34%);
}

/* aurora layers */
.au-scene::before,
.au-scene::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32; /* calmer behind the photograph */
  pointer-events: none;
}

.au-scene::before {
  width: 480px;
  height: 480px;
  inset-inline-start: -140px;
  top: -160px;
  background: radial-gradient(
    circle,
    rgba(68, 180, 180, 0.55),
    transparent 65%
  );
  animation: auDrift1 16s ease-in-out infinite alternate;
}

.au-scene::after {
  width: 420px;
  height: 420px;
  inset-inline-end: -120px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(152, 0, 101, 0.4), transparent 65%);
  animation: auDrift2 20s ease-in-out infinite alternate;
}

@keyframes auDrift1 {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(60px, 40px, 0) scale(1.15);
  }
}

@keyframes auDrift2 {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-50px, -30px, 0) scale(1.12);
  }
}

/* fine grain so the gradients never band */
.au-scene__grain {
  position: absolute;
  inset: 0;
  z-index: 1; /* above the photo so it never looks pasted on */
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.au-scene__top {
  position: relative;
  z-index: 2;
}

.au-logo {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5);
}

.au-logo img {
  height: 44px;
  width: auto;
  display: block;
}

.au-scene__mid {
  position: relative;
  z-index: 2;
  /*max-width: 30ch;*/
}

.au-scene__headline {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #f2f9fa;
  text-wrap: balance;
}

.au-scene__rule {
  width: 64px;
  height: 3px;
  border: 0;
  margin: 1.2rem 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--au-teal-bright), var(--au-plum));
  opacity: 1;
}

/* floating glass objects — abstract product illustration */
.au-float {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(
    8,
    23,
    39,
    0.28
  ); /* a touch more contrast against photo detail */
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
  color: rgba(234, 244, 246, 0.85);
  animation: auFloat 9s ease-in-out infinite;
}

.au-float--a {
  width: 84px;
  height: 84px;
  font-size: 1.7rem;
  inset-inline-end: 14%;
  top: 18%;
}

.au-float--b {
  width: 62px;
  height: 62px;
  font-size: 1.25rem;
  inset-inline-end: 30%;
  top: 42%;
  animation-delay: -3s;
}

.au-float--c {
  width: 48px;
  height: 48px;
  font-size: 1rem;
  inset-inline-end: 12%;
  top: 58%;
  animation-delay: -6s;
}

@keyframes auFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(2deg);
  }
}

/* trust row */
.au-scene__foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  font-size: 0.7rem;
  color: rgba(234, 244, 246, 0.68);
}

.au-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.au-trust i {
  color: var(--au-teal-bright);
}

.au-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  animation: auPulse 2.4s ease-out infinite;
}

@keyframes auPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(74, 222, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

/* --------------------------------------------------------------------------
   Auth panel
   -------------------------------------------------------------------------- */

.au-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--au-surface);
}

.au-panel__top {
  display: flex;
  justify-content: flex-end;
}

/* language segmented control (two POST forms, one pill) */
.au-lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--au-surface-2);
  border: 1px solid var(--au-border);
}

.au-lang form {
  margin: 0;
}

.au-lang button {
  border: 0;
  background: transparent;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--au-ink-3);
  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.au-lang button:hover {
  color: var(--au-ink);
}

.au-lang button.is-current {
  background: var(--au-surface);
  color: var(--au-teal-deep);
  box-shadow: 0 1px 3px rgba(8, 23, 39, 0.12);
}

.au-lang button:focus-visible {
  outline: 2px solid var(--au-teal);
  outline-offset: 2px;
}

.au-panel__mid {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 2rem;
}

.au-card {
  width: min(400px, 100%);
  animation: auEnter 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes auEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.au-head {
  margin-bottom: 1.6rem;
}

.au-head__eyebrow {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--au-teal-deep);
}

.au-head__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--au-ink);
  text-wrap: balance;
}

.au-panel__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.66rem;
  color: var(--au-ink-3);
}

/* --------------------------------------------------------------------------
   Fields — floating labels
   -------------------------------------------------------------------------- */

.au-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.au-field {
  position: relative;
  display: block;
  margin: 0;
}

.au-field__input {
  width: 100%;
  padding: 1.35rem 1rem 0.55rem;
  padding-inline-end: 2.8rem;
  border: 1.5px solid var(--au-border);
  border-radius: 14px;
  background: var(--au-surface-2);
  color: var(--au-ink);
  font-size: 0.95rem;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.au-field__input:hover {
  border-color: var(--au-border-strong);
}

.au-field__input:focus {
  outline: none;
  background: var(--au-surface);
  border-color: var(--au-teal);
  box-shadow: 0 0 0 4px var(--au-teal-soft);
}

.au-field__label {
  position: absolute;
  inset-inline-start: 1rem;
  top: 50%;
  translate: 0 -50%;
  color: var(--au-ink-3);
  font-size: 0.9rem;
  pointer-events: none;
  transition: all 0.16s ease;
  max-width: calc(100% - 3.4rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.au-field__input:focus + .au-field__label,
.au-field__input:not(:placeholder-shown) + .au-field__label {
  top: 0.68rem;
  translate: 0 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--au-teal-deep);
}

.au-field__icon {
  position: absolute;
  inset-inline-end: 1rem;
  top: 50%;
  translate: 0 -50%;
  color: var(--au-ink-3);
  pointer-events: none;
  transition: color 0.18s ease;
}

.au-field__input:focus ~ .au-field__icon {
  color: var(--au-teal-deep);
}

/* password visibility toggle replaces the passive icon */
.au-eye {
  position: absolute;
  inset-inline-end: 0.5rem;
  top: 50%;
  translate: 0 -50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--au-ink-3);
  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.au-eye:hover {
  background: var(--au-surface-3);
  color: var(--au-ink);
}

.au-eye:focus-visible {
  outline: 2px solid var(--au-teal);
  outline-offset: 2px;
}

/* verification code gets a deliberate, spaced treatment */
.au-field--code .au-field__input {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Field-level + form-level status
   -------------------------------------------------------------------------- */

.au-error {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--au-danger);
}

/* Neutral helper line for instructions too long to live in a floating label */
.au-hint {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--au-ink-2, #52627b);
}

.au-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
}

.au-alert i {
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.au-alert--danger {
  background: var(--au-danger-soft);
  border: 1px solid rgba(179, 37, 58, 0.25);
  color: var(--au-danger);
  animation: auShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.au-alert--success {
  background: var(--au-ok-soft);
  border: 1px solid rgba(46, 125, 91, 0.3);
  color: var(--au-ok);
}

@keyframes auShake {
  10%,
  90% {
    transform: translateX(-1px);
  }
  20%,
  80% {
    transform: translateX(2px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }
  40%,
  60% {
    transform: translateX(4px);
  }
}

/* --------------------------------------------------------------------------
   Row helpers, switch, links
   -------------------------------------------------------------------------- */

.au-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.au-check {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--au-ink-2);
  user-select: none;
}

.au-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.au-check__track {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--au-surface-3);
  border: 1px solid var(--au-border);
  position: relative;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
  flex: 0 0 auto;
}

.au-check__track::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(8, 23, 39, 0.3);
  transition: translate 0.18s ease;
}

.au-check input:checked + .au-check__track {
  background: var(--au-teal);
  border-color: var(--au-teal);
}

.au-check input:checked + .au-check__track::after {
  translate: 14px 0;
}

html[dir="rtl"] .au-check input:checked + .au-check__track::after {
  translate: -14px 0;
}

.au-check input:focus-visible + .au-check__track {
  outline: 2px solid var(--au-teal);
  outline-offset: 2px;
}

.au-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--au-teal-deep);
  text-decoration: none;
}

.au-link:hover {
  color: var(--au-teal-deep);
  text-decoration: underline;
}

.au-link:focus-visible {
  outline: 2px solid var(--au-teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Primary button
   -------------------------------------------------------------------------- */

.au-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.85rem 1.2rem;
  margin-top: 0.25rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    var(--au-teal-btn, var(--au-teal)) 0%,
    var(--au-teal-deep) 100%
  );
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px -12px rgba(20, 120, 122, 0.65);
  transition:
    box-shadow 0.18s ease,
    transform 0.12s ease,
    filter 0.18s ease;
}

.au-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 16px 30px -12px rgba(20, 120, 122, 0.75);
}

.au-btn:active {
  transform: scale(0.985);
}

.au-btn:focus-visible {
  outline: 2px solid var(--au-teal-deep);
  outline-offset: 3px;
}

.au-btn:disabled {
  filter: saturate(0.6) brightness(0.95);
  box-shadow: none;
  cursor: default;
}

.au-btn__arrow {
  transition: transform 0.18s ease;
}

.au-btn:hover .au-btn__arrow {
  transform: translateX(3px);
}

html[dir="rtl"] .au-btn__arrow {
  transform: scaleX(-1);
}

html[dir="rtl"] .au-btn:hover .au-btn__arrow {
  transform: scaleX(-1) translateX(3px);
}

/* loading state (added by auth.js on submit) */
.au-btn.is-loading {
  color: transparent;
  pointer-events: none;
}

.au-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: auSpin 0.7s linear infinite;
}

@keyframes auSpin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   Captcha block
   -------------------------------------------------------------------------- */

.au-captcha {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem;
  border-radius: 14px;
  background: var(--au-surface-2);
  border: 1.5px dashed var(--au-border-strong);
}

.au-captcha img {
  border-radius: 10px;
  margin: 0 !important;
  max-width: 100%;
}

.au-captcha__refresh {
  margin-inline-start: auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--au-surface);
  color: var(--au-ink-2);
  font-size: 1.05rem;
  box-shadow: 0 1px 3px rgba(8, 23, 39, 0.12);
  transition:
    color 0.16s ease,
    transform 0.3s ease;
}

.au-captcha__refresh:hover {
  color: var(--au-teal-deep);
  transform: rotate(180deg);
}

.au-captcha__refresh:focus-visible {
  outline: 2px solid var(--au-teal);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Password strength meter (change-password page, filled by auth.js)
   -------------------------------------------------------------------------- */

.au-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: -0.25rem;
}

.au-meter span {
  height: 4px;
  border-radius: 999px;
  background: var(--au-surface-3);
  transition: background-color 0.25s ease;
}

.au-meter[data-score="1"] span:nth-child(-n + 1) {
  background: #d9534f;
}
.au-meter[data-score="2"] span:nth-child(-n + 2) {
  background: #e8a13c;
}
.au-meter[data-score="3"] span:nth-child(-n + 3) {
  background: #6fbf73;
}
.au-meter[data-score="4"] span:nth-child(-n + 4) {
  background: var(--au-teal);
}

/* --------------------------------------------------------------------------
   Responsive — the scene becomes a compact hero band
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
  .au-scene {
    min-height: 200px;
    padding: 1.25rem 1.5rem;
    gap: 0.8rem;
  }

  .au-scene__mid {
    max-width: none;
  }

  .au-scene__headline {
    font-size: clamp(1.15rem, 4.5vw, 1.6rem);
  }

  .au-scene__rule {
    margin-top: 0.7rem;
  }

  .au-float {
    display: none;
  }

  /* hero band: show the upper part of the tower; the wash fades from the copy
     side toward the far edge and darkens a little toward the seam */
  .au-scene__photo-img {
    background-position: center 30%;
  }

  .au-scene__photo-img::after {
    background:
      linear-gradient(
        to right,
        rgba(8, 23, 39, 0.82),
        rgba(8, 23, 39, 0.38) 60%
      ),
      linear-gradient(to bottom, rgba(8, 23, 39, 0.1), rgba(8, 23, 39, 0.35));
  }

  html[dir="rtl"] .au-scene__photo-img::after {
    background:
      linear-gradient(
        to left,
        rgba(8, 23, 39, 0.82),
        rgba(8, 23, 39, 0.38) 60%
      ),
      linear-gradient(to bottom, rgba(8, 23, 39, 0.1), rgba(8, 23, 39, 0.35));
  }

  .au-panel__mid {
    align-items: flex-start;
    padding-block: 1.25rem 2rem;
  }
}

@media (max-width: 575.98px) {
  .au-scene {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
  }

  .au-logo img {
    height: 34px;
  }

  .au-scene__rule,
  .au-scene__foot {
    display: none;
  }

  .au-scene__headline {
    font-size: 0.95rem;
    font-weight: 600;
  }

  /* compact strip: heavier even wash so the logo + title stay crisp */
  .au-scene__photo-img::after,
  html[dir="rtl"] .au-scene__photo-img::after {
    background: linear-gradient(
      to bottom,
      rgba(8, 23, 39, 0.7),
      rgba(8, 23, 39, 0.78)
    );
  }
}

/* --------------------------------------------------------------------------
   Error pages (403/404) — rendered inside the app chrome, so they use the
   nv tokens from nav.css
   -------------------------------------------------------------------------- */

.err {
  min-height: 62vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.err__inner {
  text-align: center;
  max-width: 460px;
  animation: auEnter 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.err__code {
  margin: 0;
  font-size: clamp(5rem, 16vw, 8.5rem);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--nv-ink, #0d1f38);
  background: linear-gradient(
    135deg,
    var(--nv-teal, #2a9d9d),
    var(--nv-ink, #0d1f38)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.err__title {
  margin: 0.5rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--nv-ink, #0d1f38);
}

.err__text {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: var(--nv-ink-2, #52627b);
}

.err__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.err__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    filter 0.16s ease,
    background-color 0.16s ease,
    transform 0.12s ease;
}

.err__btn:active {
  transform: scale(0.98);
}

.err__btn--primary {
  background: linear-gradient(
    135deg,
    var(--nv-teal-btn, #1a8384),
    var(--nv-teal-deep, #14787a)
  );
  color: #fff;
}

.err__btn--primary:hover {
  color: #fff;
  filter: brightness(1.06);
}

.err__btn--ghost {
  background: var(--nv-surface-2, #f4f7f9);
  border: 1px solid var(--nv-border, rgba(13, 35, 63, 0.08));
  color: var(--nv-ink-2, #52627b);
}

.err__btn--ghost:hover {
  color: var(--nv-ink, #0d1f38);
  background: var(--nv-surface-3, #eaeff3);
}

/* the Back chevron points into the page flow, so it mirrors in Arabic */
html[dir="rtl"] .err__btn .bi-chevron-left {
  transform: scaleX(-1);
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .au-scene::before,
  .au-scene::after,
  .au-float,
  .au-pulse {
    animation: none;
  }

  .au-card,
  .err__inner {
    animation: none;
  }

  .au-alert--danger {
    animation: none;
  }

  .au-field__input,
  .au-field__label,
  .au-btn,
  .au-btn__arrow,
  .au-check__track,
  .au-check__track::after,
  .au-captcha__refresh {
    transition: none;
  }
}
