:root {
  color-scheme: dark;
  --ref-bg: #010827;
  --ref-text: #eef5ff;
  --ref-muted: #a9bee2;
  --ref-field: rgba(7, 25, 70, .74);
  --ref-border: rgba(123, 178, 255, .42);
  --ref-border-focus: rgba(65, 194, 255, .86);
  --ref-cyan: #16b8f3;
  --ref-blue: #1550bd;
  --ref-red: #ff6b72;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
}

body {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  overflow-x: hidden;
  overflow-y: hidden;
  background:
    radial-gradient(ellipse 72% 58% at 50% 47%, rgba(19, 73, 173, .34) 0%, rgba(7, 34, 102, .15) 43%, transparent 72%),
    radial-gradient(circle at 12% 12%, rgba(0, 174, 255, .09), transparent 29%),
    radial-gradient(circle at 88% 86%, rgba(59, 76, 180, .12), transparent 31%),
    linear-gradient(142deg, #01051b 0%, #010827 48%, #020c31 100%);
  color: var(--ref-text);
  font-family: Arial, Helvetica, sans-serif;
}

body::before {
  position: absolute;
  z-index: -2;
  inset: -12%;
  content: "";
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(123, 178, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 178, 255, 0.035) 1px, transparent 1px);
  background-position: center;
  background-size: clamp(3rem, 7vw, 6rem) clamp(3rem, 7vw, 6rem);
  -webkit-mask-image: radial-gradient(ellipse 74% 66% at center, #000 18%, transparent 76%);
  mask-image: radial-gradient(ellipse 74% 66% at center, #000 18%, transparent 76%);
  transform: perspective(50rem) rotateX(58deg) translateY(22%);
  transform-origin: center;
  animation: grid-breathe 16s ease-in-out infinite alternate;
}

body::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.42;
  background:
    repeating-linear-gradient(116deg, transparent 0 8.75rem, rgba(45, 137, 255, 0.024) 8.8rem 8.9rem, transparent 8.95rem 15rem),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(142, 194, 255, 0.011) 6px, transparent 7px),
    radial-gradient(circle at 22% 31%, rgba(95, 188, 255, 0.35) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76% 23%, rgba(95, 188, 255, 0.24) 0 1px, transparent 1.8px),
    radial-gradient(circle at 84% 72%, rgba(95, 188, 255, 0.28) 0 1px, transparent 1.8px),
    radial-gradient(circle at 17% 79%, rgba(95, 188, 255, 0.2) 0 1px, transparent 1.8px);
  background-size: auto, auto, 13rem 13rem, 17rem 17rem, 19rem 19rem, 23rem 23rem;
  mix-blend-mode: screen;
  animation: texture-drift 32s ease-in-out infinite alternate;
}

    .ambient-field {
      position: fixed;
      z-index: 1;
      inset: 0;
      overflow: hidden;
      contain: strict;
      pointer-events: none;
      user-select: none;
    }

    .ambient-field::before,
    .ambient-field::after {
      position: absolute;
      content: "";
      pointer-events: none;
      mix-blend-mode: screen;
    }

    .ambient-field::before {
      inset: -24%;
      opacity: 0.32;
      background:
        linear-gradient(112deg, transparent 0 43%, rgba(0, 183, 255, 0.1) 48%, rgba(83, 113, 255, 0.15) 50%, rgba(0, 183, 255, 0.08) 52%, transparent 57%),
        repeating-radial-gradient(circle at 50% 50%, transparent 0 9.8rem, rgba(77, 155, 255, 0.045) 9.85rem 9.9rem, transparent 9.95rem 14rem);
      transform: rotate(-7deg) scale(1.08);
      animation: field-orbit 28s ease-in-out infinite alternate;
    }

    .ambient-field::after {
      top: -18%;
      right: 0;
      left: 0;
      height: 10%;
      opacity: 0;
      background: linear-gradient(180deg, transparent, rgba(47, 185, 255, 0.035) 47%, rgba(118, 128, 255, 0.065) 50%, transparent 56%);
      filter: blur(0.45px);
      animation: field-scan 28s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    }

    .ambient {
      --x: 50%;
      --y: 50%;
      --scale: 1;
      --tilt: 0deg;
      --delay: 0s;
      --duration: 18s;
      --drift-x: 1.2rem;
      --drift-y: -1.5rem;
      --drift-rotate: 5deg;
      --mid-x: -0.45rem;
      --mid-y: 0.35rem;
      --mid-rotate: -2deg;
      --peak-opacity: 0.44;
      --artifact-size: 2;
      position: absolute;
      top: var(--y);
      left: var(--x);
      color: rgba(105, 202, 255, 0.76);
      opacity: 0.28;
      transform: translate(-50%, -50%) rotate(var(--tilt)) scale(var(--scale)) scale(var(--artifact-size));
      transform-origin: center;
      filter: drop-shadow(0 0 0.55rem rgba(0, 174, 255, 0.24));
      mix-blend-mode: screen;
      will-change: transform, opacity;
      contain: layout style paint;
      animation: artifact-float var(--duration) ease-in-out var(--delay) infinite alternate;
    }

    .ambient:nth-child(3n) {
      --drift-x: -1.35rem;
      --drift-y: 1rem;
      --drift-rotate: -6deg;
      --mid-x: 0.55rem;
      --mid-y: -0.6rem;
      --mid-rotate: 3deg;
      color: rgba(118, 141, 255, 0.72);
    }

    .ambient:nth-child(4n) {
      --drift-x: 0.7rem;
      --drift-y: 1.65rem;
      --drift-rotate: 8deg;
      --mid-x: -0.75rem;
      --mid-y: -0.25rem;
      --mid-rotate: -4deg;
    }

    .ambient:nth-child(5n) {
      --drift-x: -0.9rem;
      --drift-y: -1.15rem;
      --drift-rotate: -3deg;
      color: rgba(46, 220, 255, 0.7);
    }

    .ambient:nth-child(7n) {
      --mid-x: 0.2rem;
      --mid-y: 0.9rem;
      --mid-rotate: 5deg;
      --peak-opacity: 0.52;
      color: rgba(164, 181, 255, 0.72);
    }

    .ambient:nth-child(11n) {
      --drift-x: 1.65rem;
      --drift-y: 0.45rem;
      --mid-x: -0.85rem;
      --mid-y: -0.7rem;
      --mid-rotate: -7deg;
      color: rgba(39, 229, 255, 0.74);
    }

    .ambient--metric {
      width: 3.15rem;
      height: 1.2rem;
      overflow: hidden;
      font: 650 0.78rem/1.2rem ui-monospace, SFMono-Regular, Consolas, monospace;
      letter-spacing: 0.12em;
      text-align: right;
      border-left: 1px solid rgba(126, 198, 255, 0.62);
      text-shadow: 0 0 0.55rem currentColor;
    }

    .metric-reel {
      display: block;
      padding-right: 0.18rem;
      animation: metric-rise 9s steps(8, end) var(--delay) infinite;
    }

    .ambient--bars {
      display: flex;
      width: 2.35rem;
      height: 1.65rem;
      align-items: end;
      gap: 0.22rem;
      border-bottom: 1px solid rgba(126, 198, 255, 0.58);
    }

    .ambient--bars i {
      display: block;
      width: 0.26rem;
      height: var(--bar-height, 45%);
      background: currentColor;
      box-shadow: 0 0 0.45rem currentColor;
      transform-origin: bottom;
      animation: bar-rise 5.8s ease-in-out calc(var(--delay) + var(--bar-delay, 0s)) infinite alternate;
    }

    .ambient--bars i:nth-child(2) {
      --bar-height: 78%;
      --bar-delay: -1.4s;
    }

    .ambient--bars i:nth-child(3) {
      --bar-height: 58%;
      --bar-delay: -2.7s;
    }

    .ambient--bars i:nth-child(4) {
      --bar-height: 92%;
      --bar-delay: -0.8s;
    }

    .ambient--morph {
      width: 1.45rem;
      height: 1.45rem;
      background: currentColor;
      clip-path: circle(48% at 50% 50%);
      animation:
        artifact-float var(--duration) ease-in-out var(--delay) infinite alternate,
        shape-morph 11s ease-in-out var(--delay) infinite;
    }

    .ambient--ring {
      width: 2rem;
      height: 2rem;
      border: 1px solid currentColor;
      border-radius: 50%;
    }

    .ambient--ring::before,
    .ambient--ring::after {
      position: absolute;
      content: "";
      border: 1px solid currentColor;
      border-radius: 50%;
      animation: ring-pulse 7s ease-out var(--delay) infinite;
    }

    .ambient--ring::before {
      inset: 0.3rem;
    }

    .ambient--ring::after {
      inset: -0.35rem;
      opacity: 0.35;
    }

    .ambient--cross {
      width: 1.45rem;
      height: 1.45rem;
    }

    .ambient--cross::before,
    .ambient--cross::after {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 100%;
      height: 1px;
      content: "";
      background: currentColor;
      transform: translate(-50%, -50%);
    }

    .ambient--cross::after {
      transform: translate(-50%, -50%) rotate(90deg);
    }

    .ambient--pulse {
      width: 3.1rem;
      height: 1.15rem;
      background:
        linear-gradient(125deg,
          transparent 0 12%, currentColor 13% 15%, transparent 16% 28%,
          currentColor 29% 32%, transparent 33% 45%, currentColor 46% 49%,
          transparent 50% 63%, currentColor 64% 67%, transparent 68% 100%);
      background-size: 200% 100%;
      animation:
        artifact-float var(--duration) ease-in-out var(--delay) infinite alternate,
        pulse-scan 6.5s linear var(--delay) infinite;
    }

    .ambient--gridlet {
      width: 1.8rem;
      height: 1.8rem;
      background-image:
        linear-gradient(currentColor 1px, transparent 1px),
        linear-gradient(90deg, currentColor 1px, transparent 1px);
      background-size: 0.45rem 0.45rem;
      -webkit-mask-image: linear-gradient(135deg, #000, transparent 88%);
      mask-image: linear-gradient(135deg, #000, transparent 88%);
      animation:
        artifact-float var(--duration) ease-in-out var(--delay) infinite alternate,
        gridlet-shift 9s steps(4, end) var(--delay) infinite;
    }

    .ambient--bracket {
      width: 1.65rem;
      height: 1.1rem;
      border-top: 1px solid currentColor;
      border-left: 1px solid currentColor;
    }

    .ambient--bracket::after {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 55%;
      height: 55%;
      content: "";
      border-right: 1px solid currentColor;
      border-bottom: 1px solid currentColor;
      animation: bracket-pulse 6.8s ease-in-out var(--delay) infinite;
    }

    .ambient--dots {
      width: 2.8rem;
      height: 0.35rem;
      background: radial-gradient(circle, currentColor 0 1px, transparent 1.6px) 0 50% / 0.55rem 100% repeat-x;
      animation:
        artifact-float var(--duration) ease-in-out var(--delay) infinite alternate,
        dots-travel 8s linear var(--delay) infinite;
    }

    .ambient--sparkline {
      width: 3.35rem;
      height: 1.55rem;
    }

    .ambient--sparkline svg {
      display: block;
      width: 100%;
      height: 100%;
      overflow: visible;
      fill: none;
      stroke: currentColor;
      stroke-dasharray: 64;
      stroke-linecap: square;
      stroke-linejoin: bevel;
      stroke-width: 1.4;
      vector-effect: non-scaling-stroke;
      animation: sparkline-draw 7.4s ease-in-out var(--delay) infinite;
    }

    .ambient--dial {
      width: 2.2rem;
      height: 2.2rem;
      border: 1px solid currentColor;
      border-radius: 50%;
      background:
        radial-gradient(circle, currentColor 0 0.11rem, transparent 0.13rem),
        conic-gradient(from 26deg, currentColor 0 3deg, transparent 3deg 30deg, currentColor 30deg 33deg, transparent 33deg 76deg, currentColor 76deg 80deg, transparent 80deg 100%);
      box-shadow: inset 0 0 0 0.35rem rgba(4, 18, 59, 0.72);
      animation:
        artifact-float var(--duration) ease-in-out var(--delay) infinite alternate,
        dial-turn 13s linear var(--delay) infinite;
    }

    .ambient--dial::after {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0.78rem;
      height: 1px;
      content: "";
      background: currentColor;
      box-shadow: 0 0 0.35rem currentColor;
      transform: rotate(-32deg);
      transform-origin: left center;
    }

    .ambient--nodes {
      width: 3.4rem;
      height: 1.45rem;
      background:
        radial-gradient(circle at 8% 68%, currentColor 0 0.12rem, transparent 0.14rem),
        radial-gradient(circle at 48% 22%, currentColor 0 0.14rem, transparent 0.16rem),
        radial-gradient(circle at 92% 58%, currentColor 0 0.12rem, transparent 0.14rem),
        linear-gradient(145deg, transparent 0 24%, currentColor 25% 27%, transparent 28% 100%),
        linear-gradient(28deg, transparent 0 56%, currentColor 57% 59%, transparent 60% 100%);
      filter: drop-shadow(0 0 0.4rem currentColor);
    }

    .ambient--nodes::after {
      position: absolute;
      top: 58%;
      left: 6%;
      width: 0.28rem;
      height: 0.28rem;
      content: "";
      background: #c5f6ff;
      border-radius: 50%;
      box-shadow: 0 0 0.55rem currentColor;
      animation: node-hop 6.2s cubic-bezier(0.45, 0, 0.55, 1) var(--delay) infinite;
    }

    .ambient--chevrons {
      width: 3rem;
      height: 1.25rem;
      background:
        linear-gradient(135deg, transparent 0 37%, currentColor 38% 45%, transparent 46%) 0 0 / 1rem 100% repeat-x;
      animation:
        artifact-float var(--duration) ease-in-out var(--delay) infinite alternate,
        chevron-travel 5.8s linear var(--delay) infinite;
    }

    .ambient--tag {
      overflow: hidden;
      min-width: 3.6rem;
      padding: 0.18rem 0.32rem 0.16rem;
      color: currentColor;
      font: 650 0.52rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
      letter-spacing: 0.12em;
      text-align: center;
      border-top: 1px solid currentColor;
      border-bottom: 1px solid currentColor;
      text-shadow: 0 0 0.4rem currentColor;
    }

    .ambient--tag::after {
      position: absolute;
      top: -20%;
      bottom: -20%;
      left: -25%;
      width: 18%;
      content: "";
      background: linear-gradient(90deg, transparent, rgba(208, 248, 255, 0.75), transparent);
      transform: skewX(-18deg);
      animation: tag-glint 8.5s ease-in-out var(--delay) infinite;
    }

    @keyframes grid-breathe {
      from {
        opacity: 0.42;
        transform: perspective(50rem) rotateX(58deg) translateY(23%) scale(0.98);
      }
      to {
        opacity: 0.62;
        transform: perspective(50rem) rotateX(58deg) translateY(20%) scale(1.02);
      }
    }

    @keyframes texture-drift {
      from {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
        opacity: 0.34;
      }
      to {
        background-position: 2.5rem -1.5rem, 0 1rem, 1rem 2rem, -2rem 1rem, 1.5rem -2rem, -1rem 1.5rem;
        opacity: 0.49;
      }
    }

    @keyframes artifact-float {
      0% {
        opacity: 0.16;
        transform: translate(-50%, -50%) rotate(var(--tilt)) scale(var(--scale)) scale(var(--artifact-size));
      }
      28% {
        opacity: var(--peak-opacity);
        transform: translate(calc(-50% + var(--mid-x)), calc(-50% + var(--mid-y))) rotate(calc(var(--tilt) + var(--mid-rotate))) scale(var(--scale)) scale(var(--artifact-size)) scale(1.035);
      }
      58% {
        opacity: 0.23;
        transform: translate(calc(-50% + var(--drift-x)), calc(-50% + var(--mid-y))) rotate(calc(var(--tilt) - var(--mid-rotate))) scale(var(--scale)) scale(var(--artifact-size)) scale(0.98);
      }
      79% {
        opacity: var(--peak-opacity);
        transform: translate(calc(-50% + var(--mid-x)), calc(-50% + var(--drift-y))) rotate(calc(var(--tilt) + var(--drift-rotate))) scale(var(--scale)) scale(var(--artifact-size)) scale(1.045);
      }
      100% {
        opacity: 0.24;
        transform: translate(calc(-50% + var(--drift-x)), calc(-50% + var(--drift-y))) rotate(calc(var(--tilt) + var(--drift-rotate))) scale(var(--scale)) scale(var(--artifact-size)) scale(1.06);
      }
    }

    @keyframes field-orbit {
      from {
        opacity: 0.22;
        transform: rotate(-9deg) scale(1.04) translate3d(-1.5%, 1%, 0);
      }
      to {
        opacity: 0.42;
        transform: rotate(-4deg) scale(1.12) translate3d(1.5%, -1%, 0);
      }
    }

    @keyframes field-scan {
      0% {
        top: -18%;
        opacity: 0;
      }
      16%, 72% {
        opacity: 0.26;
      }
      100% {
        top: 104%;
        opacity: 0;
      }
    }

    @keyframes metric-rise {
      from {
        transform: translateY(0);
      }
      to {
        transform: translateY(-8.4rem);
      }
    }

    @keyframes bar-rise {
      0% {
        opacity: 0.38;
        transform: scaleY(0.22);
      }
      65% {
        opacity: 0.92;
        transform: scaleY(1);
      }
      100% {
        opacity: 0.56;
        transform: scaleY(0.62);
      }
    }

    @keyframes shape-morph {
      0%, 100% {
        clip-path: circle(48% at 50% 50%);
      }
      34% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
      }
      67% {
        clip-path: polygon(50% 0, 100% 100%, 0 100%);
      }
    }

    @keyframes ring-pulse {
      0%, 100% {
        opacity: 0.2;
        transform: scale(0.78);
      }
      55% {
        opacity: 0.65;
        transform: scale(1.08);
      }
    }

    @keyframes pulse-scan {
      from {
        background-position: 100% 0;
      }
      to {
        background-position: -100% 0;
      }
    }

    @keyframes dots-travel {
      from {
        background-position: 0 50%;
      }
      to {
        background-position: 1.1rem 50%;
      }
    }

    @keyframes sparkline-draw {
      0%, 100% { stroke-dashoffset: 64; opacity: 0.32; }
      42%, 78% { stroke-dashoffset: 0; opacity: 1; }
    }

    @keyframes dial-turn {
      from { rotate: 0deg; }
      to { rotate: 360deg; }
    }

    @keyframes chevron-travel {
      from { background-position: 0 0; }
      to { background-position: 2rem 0; }
    }

    @keyframes gridlet-shift {
      0%, 100% { background-position: 0 0, 0 0; }
      50% { background-position: 0.45rem 0.45rem, 0.45rem 0.45rem; }
    }

    @keyframes bracket-pulse {
      0%, 100% { width: 55%; height: 55%; opacity: 0.35; }
      52% { width: 82%; height: 78%; opacity: 1; }
    }

    @keyframes node-hop {
      0%, 100% { transform: translate(0, 0); opacity: 0.3; }
      38% { transform: translate(1.35rem, -0.68rem); opacity: 1; }
      72% { transform: translate(2.7rem, -0.12rem); opacity: 0.64; }
    }

    @keyframes tag-glint {
      0%, 22% { left: -25%; opacity: 0; }
      42%, 54% { opacity: 0.82; }
      74%, 100% { left: 112%; opacity: 0; }
    }

    /* Keep the visual density, but animate a curated subset to protect mobile paint time. */
    .ambient-field .ambient,
    .ambient-field .ambient *,
    .ambient-field .ambient::before,
    .ambient-field .ambient::after {
      animation: none;
      will-change: auto;
    }

    .ambient:nth-child(3n + 1) {
      will-change: transform, opacity;
      animation: artifact-float var(--duration) ease-in-out var(--delay) infinite alternate;
    }

    .ambient:nth-child(1).ambient--metric .metric-reel { animation: metric-rise 9s steps(8, end) var(--delay) infinite; }
    .ambient:nth-child(2).ambient--bars i { animation: bar-rise 5.8s ease-in-out calc(var(--delay) + var(--bar-delay, 0s)) infinite alternate; }
    .ambient:nth-child(3).ambient--morph { animation: shape-morph 12s ease-in-out var(--delay) infinite; }
    .ambient:nth-child(14).ambient--ring::before,
    .ambient:nth-child(14).ambient--ring::after { animation: ring-pulse 7s ease-out var(--delay) infinite; }
    .ambient:nth-child(5).ambient--pulse { animation: pulse-scan 8s linear var(--delay) infinite; }
    .ambient:nth-child(9).ambient--gridlet { animation: gridlet-shift 10s ease-in-out var(--delay) infinite; }
    .ambient:nth-child(12).ambient--bracket::after { animation: bracket-pulse 6.8s ease-in-out var(--delay) infinite; }
    .ambient:nth-child(13).ambient--dots { animation: dots-travel 6s linear var(--delay) infinite; }
    .ambient:nth-child(18).ambient--sparkline path { animation: sparkline-draw 7.4s ease-in-out var(--delay) infinite; }
    .ambient:nth-child(22).ambient--dial { animation: dial-turn 18s linear var(--delay) infinite; }
    .ambient:nth-child(19).ambient--nodes::after { animation: node-hop 6.2s cubic-bezier(0.45, 0, 0.55, 1) var(--delay) infinite; }
    .ambient:nth-child(20).ambient--chevrons { animation: chevron-travel 6.8s linear var(--delay) infinite; }
    .ambient:nth-child(21).ambient--tag::after { animation: tag-glint 8.5s ease-in-out var(--delay) infinite; }

.login-shell {
  position: relative;
  z-index: 2;
  width: min(360px, 100%);
}

.login-brand {
  padding: 0 0 18px;
  text-align: center;
}

.login-brand::after {
  display: block;
  width: 68px;
  height: 2px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, var(--ref-cyan), transparent);
  content: "";
  opacity: .72;
}

.login-brand h1 {
  margin: 0;
  color: var(--ref-text);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: .22em;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0, 174, 255, .14);
  text-indent: .2em;
}

.login-form {
  display: grid;
  gap: 20px;
  padding: 0;
}

.login-form label.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-form input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 14px;
  border: 1px solid var(--ref-border);
  border-radius: 0;
  outline: 0;
  background: linear-gradient(180deg, rgba(9, 29, 78, .82), var(--ref-field));
  color: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  box-shadow:
    inset 0 2px 8px rgba(0, 4, 26, .36),
    inset 0 0 0 1px rgba(255, 255, 255, .02),
    0 4px 14px rgba(0, 0, 0, .08);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.login-form input::placeholder {
  color: var(--ref-muted);
  opacity: .86;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.login-form input:focus-visible {
  border-color: var(--ref-border-focus);
  background: linear-gradient(180deg, rgba(12, 37, 93, .88), rgba(6, 24, 66, .82));
  box-shadow:
    inset 0 2px 8px rgba(0, 4, 26, .34),
    0 0 0 2px rgba(22, 184, 243, .15),
    0 5px 16px rgba(0, 0, 0, .1);
}

.login-form button {
  min-height: 54px;
  margin-top: 6px;
  border: 1px solid rgba(91, 207, 255, .9);
  border-radius: 0;
  background: linear-gradient(135deg, var(--ref-cyan) 0%, #0c8fe0 100%);
  color: #03152f;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .16em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .16);
  text-transform: uppercase;
  box-shadow:
    0 8px 18px rgba(0, 89, 194, .24),
    inset 0 1px 0 rgba(255, 255, 255, .24);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, filter 160ms ease, transform 160ms ease;
}

.login-form button:hover {
  border-color: #94e2ff;
  background: linear-gradient(135deg, #42c8f7 0%, #1aa5eb 100%);
  box-shadow:
    0 10px 22px rgba(0, 89, 194, .3),
    inset 0 1px 0 rgba(255, 255, 255, .3);
  transform: translateY(-1px);
}

.login-form button:focus-visible {
  outline: 2px solid var(--ref-cyan);
  outline-offset: 3px;
}

.login-form button:active {
  box-shadow:
    0 4px 10px rgba(0, 89, 194, .22),
    inset 0 2px 4px rgba(0, 35, 85, .2);
  transform: translateY(0);
}

.login-form button:disabled {
  cursor: wait;
  filter: saturate(.55);
  opacity: .56;
  box-shadow: none;
  transform: none;
}

.login-error {
  margin: 0;
  color: var(--ref-red);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 42rem) {
  body {
    background:
      radial-gradient(ellipse 95% 46% at 50% 48%, rgba(19, 73, 173, 0.31) 0%, rgba(7, 34, 102, 0.12) 48%, transparent 76%),
      radial-gradient(circle at 15% 12%, rgba(0, 174, 255, 0.08), transparent 32%),
      linear-gradient(155deg, #01051b 0%, #010827 55%, #020c31 100%);
  }

  body::before {
    inset: -20%;
    background-size: 3.25rem 3.25rem;
  }

  .ambient {
    filter: drop-shadow(0 0 0.42rem rgba(0, 174, 255, 0.22));
  }
}

@media (max-width: 520px) {
  body { padding: 20px; }
  .login-shell { width: min(360px, calc(100vw - 40px)); }
  .login-brand h1 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .ambient-field::before,
  .ambient-field::after,
  .ambient,
  .ambient *,
  .ambient::before,
  .ambient::after {
    animation: none;
  }

  .ambient-field .ambient,
  .ambient-field .ambient *,
  .ambient-field .ambient::before,
  .ambient-field .ambient::after {
    animation: none !important;
    transition: none;
  }

  .ambient-field::after {
    display: none;
  }

  .login-form input,
  .login-form button {
    transition: none;
  }
}
