:root {
  color-scheme: dark;
  --navy-950: #030817;
  --navy-900: #071126;
  --navy-800: #0b1a35;
  --line: rgba(135, 172, 218, 0.18);
  --text: #f3f7fc;
  --muted: #8fa2bd;
  --cyan: #69d8ee;
  --blue: #4e8dff;
  --danger: #ffb4b8;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--navy-950);
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(2, 7, 20, 0.38), rgba(2, 7, 20, 0.3) 42%, rgba(2, 7, 20, 0.68) 72%, rgba(2, 7, 20, 0.88)),
    linear-gradient(0deg, rgba(2, 7, 20, 0.7), transparent 58%),
    url("/assets/neural-network-hero.jpg") center / cover fixed no-repeat,
    var(--navy-950);
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  filter: blur(1px);
}

.ambient::before {
  width: 34rem;
  height: 34rem;
  right: -18rem;
  top: -17rem;
  border: 1px solid rgba(96, 194, 229, 0.12);
  box-shadow: 0 0 100px rgba(54, 141, 198, 0.08);
}

.ambient::after {
  width: 18rem;
  height: 18rem;
  left: 36%;
  bottom: -12rem;
  background: rgba(40, 110, 180, 0.08);
  filter: blur(60px);
}

.site-header,
.layout,
footer {
  position: relative;
  z-index: 1;
  width: min(100% - 96px, 1320px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 7px);
  gap: 5px;
  width: 27px;
  height: 27px;
  transform: rotate(45deg);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  z-index: -1;
  content: "";
  background: rgba(105, 216, 238, 0.45);
}

.brand-mark::before {
  width: 1px;
  height: 88%;
  left: 50%;
  top: 6%;
}

.brand-mark::after {
  width: 88%;
  height: 1px;
  left: 6%;
  top: 50%;
}

.brand-mark span {
  border: 1px solid rgba(160, 231, 244, 0.75);
  background: #0d2a48;
  box-shadow: 0 0 12px rgba(105, 216, 238, 0.35);
}

.brand-name {
  font-size: 17px;
  font-weight: 660;
  letter-spacing: 0.2em;
}

.brand-name span {
  color: var(--cyan);
}

.system-state {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #9aabc2;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.08), 0 0 12px rgba(110, 231, 183, 0.45);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  align-items: center;
  gap: clamp(64px, 10vw, 160px);
  min-height: calc(100svh - 182px);
  padding-block: 72px;
}

.intro {
  max-width: 680px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 25px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 34px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(105, 216, 238, 0.65);
}

h1 {
  max-width: 690px;
  margin: 0;
  font-size: clamp(42px, 5.2vw, 75px);
  font-weight: 520;
  letter-spacing: -0.048em;
  line-height: 1.04;
  text-wrap: balance;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.intro-copy {
  max-width: 530px;
  margin: 30px 0 0;
  color: #9cabc0;
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 350;
  line-height: 1.7;
}

.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}

.capabilities span {
  padding: 8px 13px;
  border: 1px solid rgba(139, 184, 226, 0.18);
  border-radius: 999px;
  color: #9eb1c8;
  background: rgba(11, 27, 53, 0.34);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.login-card {
  position: relative;
  overflow: hidden;
  padding: 38px;
  border: 1px solid rgba(148, 183, 224, 0.2);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(12, 27, 51, 0.88), rgba(5, 14, 31, 0.95));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36), inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(20px);
}

.card-accent {
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 18px rgba(105, 216, 238, 0.6);
  opacity: 0.72;
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.lock-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(105, 216, 238, 0.22);
  border-radius: 12px;
  background: rgba(38, 112, 161, 0.1);
}

.lock-icon svg {
  width: 21px;
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.card-kicker {
  margin: 0 0 5px;
  color: #7489a5;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 550;
  letter-spacing: -0.015em;
}

.field + .field {
  margin-top: 20px;
}

label {
  display: block;
  margin-bottom: 9px;
  color: #a9b8cb;
  font-size: 12px;
  font-weight: 520;
  letter-spacing: 0.025em;
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: #6f829d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
  pointer-events: none;
  transition: stroke 180ms ease;
}

input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 45px;
  border: 1px solid rgba(130, 164, 204, 0.2);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: rgba(2, 9, 23, 0.55);
  font: inherit;
  font-size: 14px;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

input::placeholder {
  color: #546781;
}

input:hover {
  border-color: rgba(130, 181, 223, 0.34);
}

input:focus {
  border-color: rgba(105, 216, 238, 0.65);
  background: rgba(4, 13, 30, 0.75);
  box-shadow: 0 0 0 3px rgba(105, 216, 238, 0.07), 0 0 22px rgba(55, 155, 206, 0.07);
}

.input-wrap:focus-within svg {
  stroke: var(--cyan);
}

button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  height: 52px;
  margin-top: 27px;
  border: 1px solid rgba(123, 222, 240, 0.34);
  border-radius: 9px;
  color: #effcff;
  background: linear-gradient(110deg, #165d87, #236c9d 58%, #275f8d);
  box-shadow: 0 10px 28px rgba(4, 53, 91, 0.32), inset 0 1px rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: 0.055em;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

button:hover {
  filter: brightness(1.12);
  box-shadow: 0 12px 32px rgba(4, 62, 104, 0.4), inset 0 1px rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

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

button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: wait;
  filter: saturate(0.72);
}

button > svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button-loader {
  display: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

button.is-loading .button-loader {
  display: block;
}

button.is-loading > svg {
  display: none;
}

.form-status {
  min-height: 0;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(-4px);
  transition: min-height 180ms ease, margin 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.form-status.is-visible {
  min-height: 38px;
  margin-top: 15px;
  opacity: 1;
  transform: translateY(0);
}

.access-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 27px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(127, 160, 199, 0.12);
  color: #647791;
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0.035em;
}

.access-notice svg {
  flex: 0 0 auto;
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

footer {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  border-top: 1px solid var(--line);
  color: #5e7089;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.footer-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #43536a;
}

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

@media (max-width: 960px) {
  .site-header,
  .layout,
  footer {
    width: min(100% - 48px, 720px);
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 54px;
    padding-block: 64px;
  }

  .intro {
    max-width: 630px;
  }

  .login-card {
    width: min(100%, 480px);
  }

  body {
    background:
      linear-gradient(0deg, rgba(2, 7, 20, 0.88), rgba(2, 7, 20, 0.48)),
      url("/assets/neural-network-hero.jpg") 35% center / cover fixed no-repeat,
      var(--navy-950);
  }
}

@media (max-width: 560px) {
  .site-header,
  .layout,
  footer {
    width: min(100% - 32px, 720px);
  }

  .site-header {
    min-height: 82px;
  }

  .system-state {
    overflow: hidden;
    width: 7px;
    font-size: 0;
  }

  .layout {
    gap: 42px;
    min-height: auto;
    padding-block: 52px 48px;
  }

  h1 {
    font-size: clamp(38px, 12.5vw, 54px);
  }

  .intro-copy {
    margin-top: 23px;
    font-size: 16px;
  }

  .capabilities {
    margin-top: 30px;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 15px;
  }

  footer {
    min-height: 68px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
