:root {
  color-scheme: dark;
  --ink: #f5fbff;
  --muted: #9eb5c4;
  --soft: #d5e8f1;
  --cyan: #44f2ff;
  --cyan-strong: #00c8e8;
  --amber: #ffb86b;
  --panel: rgba(7, 20, 29, 0.72);
  --line: rgba(143, 234, 255, 0.24);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #06151f;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(3, 11, 18, 0.62), rgba(3, 11, 18, 0.1) 44%, rgba(3, 11, 18, 0.9)),
    url("assets/background.webp");
  background-size: cover;
  background-position: center;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  color: #fff;
}

button,
input {
  font: inherit;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  min-height: 100vh;
  overflow: hidden;
}

.brand-panel,
.auth-panel {
  position: relative;
  z-index: 1;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(24px, 4vw, 56px);
}

.brand-panel::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(rgba(68, 242, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(68, 242, 255, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.75), transparent 74%);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 12px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(68, 242, 255, 0.34));
}

.hero-copy {
  max-width: 720px;
  padding-bottom: 8vh;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1,
.form-heading h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.45rem, 6vw, 5.8rem);
  line-height: 0.97;
  text-wrap: balance;
}

.hero-copy p:last-child {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 1.02rem;
  line-height: 1.75;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 126px));
  gap: 10px;
  width: fit-content;
  margin: 0;
}

.signal-strip div {
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid rgba(143, 234, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(3, 14, 22, 0.48);
  backdrop-filter: blur(16px);
}

.signal-strip dt {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
}

.signal-strip dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.auth-panel {
  display: grid;
  align-items: center;
  padding: clamp(18px, 4vw, 56px);
  background:
    linear-gradient(180deg, rgba(68, 242, 255, 0.12), transparent 24%),
    rgba(2, 10, 16, 0.58);
  box-shadow: -28px 0 90px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px);
}

.login-card {
  width: min(100%, 430px);
  margin-inline: auto;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 28%),
    var(--panel);
  box-shadow: var(--shadow);
}

.form-heading {
  margin-bottom: 28px;
}

.form-heading h2 {
  font-size: clamp(1.6rem, 4vw, 2rem);
}

.field {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  color: var(--soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(143, 234, 255, 0.2);
  border-radius: var(--radius);
  outline: 0;
  padding: 0 15px;
  color: #fff;
  background: rgba(5, 18, 27, 0.84);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.field input::placeholder {
  color: #7894a4;
}

.field input:focus {
  border-color: rgba(68, 242, 255, 0.74);
  background: rgba(8, 28, 41, 0.95);
  box-shadow:
    0 0 0 3px rgba(68, 242, 255, 0.13),
    0 0 28px rgba(68, 242, 255, 0.17);
}

.password-control {
  position: relative;
  display: block;
}

.password-control input {
  padding-right: 56px;
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  color: var(--cyan);
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(68, 242, 255, 0.12);
  outline: 0;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 0.88rem;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  cursor: pointer;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan-strong);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  color: #031016;
  background: linear-gradient(90deg, var(--cyan), #dffcff 55%, var(--amber));
  box-shadow:
    0 18px 42px rgba(68, 242, 255, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
  cursor: pointer;
  font-weight: 900;
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.primary-action:hover,
.primary-action:focus-visible {
  filter: brightness(1.08);
  outline: 0;
  transform: translateY(-1px);
}

.signup-copy {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

@media (max-width: 920px) {
  body {
    background-position: 38% center;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 46vh;
    padding-bottom: 20px;
  }

  .hero-copy {
    max-width: 620px;
    padding: 10vh 0 0;
  }

  .hero-copy h1 {
    max-width: 14ch;
  }

  .signal-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 480px;
    margin-top: 24px;
  }

  .auth-panel {
    min-height: 54vh;
    box-shadow: none;
  }
}

@media (max-width: 560px) {
  body {
    background:
      linear-gradient(180deg, rgba(3, 11, 18, 0.68), rgba(3, 11, 18, 0.96) 52%),
      url("assets/background.webp") center top / auto 55vh no-repeat,
      #06151f;
  }

  .login-shell {
    grid-template-rows: auto auto auto auto;
    overflow: visible;
  }

  .brand-panel {
    display: contents;
  }

  .brand-panel::before {
    content: none;
  }

  .brand {
    order: 1;
    margin: 22px 18px 0;
    font-size: 0.95rem;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .hero-copy {
    order: 3;
    max-width: none;
    padding: 26px 18px 0;
  }

  .hero-copy p:last-child {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .signal-strip {
    order: 4;
    grid-template-columns: 1fr;
    gap: 8px;
    width: auto;
    max-width: none;
    margin: 20px 18px 28px;
  }

  .signal-strip div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    min-height: 58px;
  }

  .signal-strip dd {
    margin: 0;
  }

  .auth-panel {
    order: 2;
    min-height: auto;
    margin-top: 40px;
    padding: 18px;
    background: rgba(2, 10, 16, 0.28);
  }

  .login-card {
    padding: 20px;
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
