:root {
  --bg0: #02050b;
  --bg1: #050913;
  --bg2: #08111f;
  --panel-border: rgba(173, 197, 243, 0.18);
  --text: #f5f7fb;
  --muted: rgba(220, 228, 242, 0.74);
  --muted-strong: rgba(233, 239, 249, 0.88);
  --line: rgba(229, 236, 246, 0.12);
  --red: #ff5b63;
  --blue: #2d66ff;
  --blue-2: #66b6ff;
  --orange: #ff7d31;
  --green: #34c759;
  --shadow-deep: 0 30px 70px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 69%, rgba(86, 158, 255, 0.22), transparent 12%),
    radial-gradient(circle at 17% 73%, rgba(155, 211, 255, 0.12), transparent 6%),
    radial-gradient(circle at 84% 67%, rgba(255, 120, 41, 0.18), transparent 13%),
    radial-gradient(circle at 86% 60%, rgba(255, 181, 129, 0.10), transparent 8%),
    radial-gradient(circle at 50% 35%, rgba(40, 82, 166, 0.18), transparent 28%),
    linear-gradient(180deg, #01040a 0%, #030711 46%, #02050b 100%);
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image:
    radial-gradient(circle at 5% 38%, rgba(255,255,255,0.75) 0 1px, transparent 1.5px),
    radial-gradient(circle at 10% 71%, rgba(255,255,255,0.70) 0 1px, transparent 1.5px),
    radial-gradient(circle at 13% 76%, rgba(255,255,255,0.68) 0 1px, transparent 1.5px),
    radial-gradient(circle at 79% 22%, rgba(255, 152, 82, 0.75) 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 86% 31%, rgba(255, 184, 126, 0.78) 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 90% 75%, rgba(255,255,255,0.70) 0 1px, transparent 1.5px),
    radial-gradient(circle at 94% 67%, rgba(255,255,255,0.62) 0 1px, transparent 1.4px),
    radial-gradient(circle at 6% 62%, rgba(128, 188, 255, 0.66) 0 1px, transparent 1.5px);
  opacity: 0.65;
}

body::after {
  background: linear-gradient(transparent 96%, rgba(255,255,255,0.012) 100%);
  background-size: 100% 4px;
  opacity: 0.11;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.page-glow {
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(34px);
  z-index: 0;
}

.page-glow-left {
  left: 3%;
  top: 47%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(88, 176, 255, 0.56), rgba(88, 176, 255, 0));
}

.page-glow-right {
  right: 3%;
  top: 47%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 128, 61, 0.48), rgba(255, 128, 61, 0));
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(1262px, calc(100% - 64px));
  margin: 28px auto 36px;
}

.auth-shell::before {
  content: "";
  position: absolute;
  left: 24%;
  top: 124px;
  width: 40%;
  height: 74%;
  background: radial-gradient(circle, rgba(40, 115, 255, 0.13), transparent 70%);
  filter: blur(34px);
  pointer-events: none;
}

.auth-shell::after {
  content: "";
  position: absolute;
  right: 0;
  top: 178px;
  width: 30%;
  height: 52%;
  background: radial-gradient(circle, rgba(255, 118, 42, 0.12), transparent 72%);
  filter: blur(28px);
  pointer-events: none;
}

.glass {
  background: linear-gradient(180deg, rgba(22, 33, 55, 0.56), rgba(7, 11, 20, 0.78));
  border: 1px solid var(--panel-border);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    inset 0 0 0 1px rgba(255,255,255,0.018),
    var(--shadow-deep);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topbar {
  min-height: 78px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(8, 12, 23, 0.92) 0%, rgba(22, 40, 74, 0.92) 34%, rgba(12, 21, 38, 0.9) 69%, rgba(7, 11, 20, 0.92) 100%);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.45),
    0 0 38px rgba(42, 108, 255, 0.11);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 10px rgba(86, 154, 255, 0.18));
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-block { color: var(--red); text-shadow: 0 0 14px rgba(255, 91, 99, 0.12); }
.brand-cord { color: #5ea7ff; text-shadow: 0 0 14px rgba(94, 167, 255, 0.14); }
.brand-s { color: #4fd76a; text-shadow: 0 0 14px rgba(79, 215, 106, 0.16); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 46px;
}

.nav-links a,
.nav-button {
  color: rgba(244, 247, 255, 0.94);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.chevron {
  display: inline-block;
  margin-left: 3px;
  transform: translateY(-1px);
  opacity: 0.7;
}

.nav-button {
  min-width: 114px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(167, 192, 255, 0.32);
  background: linear-gradient(180deg, rgba(28, 38, 64, 0.96), rgba(14, 20, 35, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 10px 22px rgba(0, 0, 0, 0.34),
    0 0 16px rgba(63, 104, 226, 0.14);
  font-weight: 700 !important;
}

.auth-main {
  display: grid;
  grid-template-columns: minmax(420px, 1.03fr) minmax(470px, 528px);
  gap: 56px;
  align-items: start;
  padding: 56px 34px 18px;
}

.auth-copy {
  padding-top: 72px;
}

.auth-copy__eyebrow {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(142, 178, 255, 0.88);
  font-weight: 700;
}

.auth-copy h1 {
  margin: 12px 0 0;
  max-width: 500px;
  font-size: clamp(44px, 4.15vw, 58px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.auth-copy p {
  margin: 24px 0 28px;
  max-width: 520px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(239, 244, 253, 0.9);
  font-size: 15px;
  font-weight: 500;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 12px rgba(45, 102, 255, 0.6);
}

.session-inline,
.auth-note {
  color: var(--muted);
  line-height: 1.65;
}

.session-inline {
  margin-top: 18px;
  min-height: 24px;
  max-width: 600px;
  font-size: 14px;
}

.auth-copy__actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.secondary-link,
.ghost-inline-button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(167, 192, 255, 0.16);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}

.ghost-inline-button:hover,
.secondary-link:hover,
.btn:hover,
.btn--ghost:hover,
.nav-button:hover {
  transform: translateY(-1px);
}

.auth-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}

.auth-card__hero {
  position: relative;
  height: 248px;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(95, 143, 255, 0.32) 0%, rgba(28, 48, 93, 0.10) 55%, rgba(255, 119, 41, 0.26) 100%),
    linear-gradient(180deg, rgba(47, 73, 131, 0.22), rgba(12, 16, 26, 0.32));
  border-bottom: 1px solid rgba(222, 233, 250, 0.08);
}

.auth-card__hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(22px);
}

.auth-card__hero-glow--left {
  left: 14%;
  top: 36%;
  width: 130px;
  height: 130px;
  background: rgba(113, 167, 255, 0.22);
}

.auth-card__hero-glow--right {
  right: 9%;
  top: 22%;
  width: 150px;
  height: 150px;
  background: rgba(255, 132, 61, 0.2);
}

.auth-card__hero-frame {
  position: relative;
  z-index: 1;
  margin-left: auto;
  width: min(82%, 360px);
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 25, 44, 0.8), rgba(8, 11, 20, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 20px 38px rgba(0, 0, 0, 0.26);
}

.auth-card__hero-frame--register {
  width: min(78%, 340px);
}

.auth-card__hero-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.auth-card__body {
  padding: 22px 24px 24px;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.44), rgba(5, 9, 18, 0.76));
}

.auth-card__kicker {
  color: rgba(142, 178, 255, 0.88);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.auth-card h2 {
  margin: 10px 0 8px;
  font-size: 36px;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.auth-card__lead {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.stack { display: grid; gap: 14px; }
label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(226, 234, 247, 0.84);
}
input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 10, 18, 0.56);
  color: var(--text);
  outline: none;
}
input::placeholder { color: rgba(159,176,208,.55); }
input:focus {
  border-color: rgba(101, 166, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(52, 118, 255, 0.12);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid rgba(162, 194, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1c62f4 0%, #0f338f 100%);
  color: #f7f9ff;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 14px 28px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(41, 109, 255, 0.16);
}

.btn--ghost {
  background: rgba(255,255,255,0.04);
  border-color: rgba(167, 192, 255, 0.16);
  color: var(--text);
  box-shadow: none;
}

.btn[disabled],
.ghost-inline-button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.alert[hidden] { display: none; }
.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(122, 164, 255, 0.2);
  background: rgba(42, 107, 255, 0.08);
  color: #e8efff;
  font-size: 14px;
}

.alert[data-kind="error"] {
  border-color: rgba(255, 109, 109, 0.26);
  background: rgba(255, 79, 79, 0.08);
  color: #ffdede;
}

.auth-note {
  margin-top: 18px;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .auth-main {
    grid-template-columns: minmax(320px, 1fr) minmax(420px, 500px);
    gap: 34px;
    padding-top: 42px;
  }

  .auth-copy {
    padding-top: 36px;
  }
}

@media (max-width: 920px) {
  .auth-shell {
    width: min(1120px, calc(100% - 28px));
  }

  .auth-main {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0 10px;
  }

  .auth-copy {
    padding-top: 8px;
  }

  .auth-card__hero {
    height: 220px;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    width: calc(100% - 18px);
    margin-top: 10px;
  }

  .topbar {
    padding: 14px 16px;
    min-height: 76px;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    gap: 18px;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .nav-button {
    min-width: 98px;
  }

  .brand-name {
    font-size: 19px;
  }

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

  .auth-main {
    padding-top: 24px;
  }

  .auth-copy h1 {
    font-size: 42px;
  }

  .auth-copy p {
    font-size: 17px;
  }

  .auth-card__hero {
    height: 180px;
    padding: 14px;
  }

  .auth-card__hero-frame,
  .auth-card__hero-frame--register {
    width: 72%;
  }

  .auth-card__body {
    padding: 20px;
  }

  .auth-card h2 {
    font-size: 30px;
  }

  .actions > * {
    width: 100%;
  }

  .secondary-link,
  .ghost-inline-button {
    width: 100%;
  }
}
