:root {
  --surface: #f9f9fb;
  --surface-panel: rgba(255, 255, 255, 0.78);
  --text: #1a1c1d;
  --text-muted: #666b75;
  --text-soft: #8f949f;
  --primary: #0f5ec4;
  --primary-deep: #004e9f;
  --outline-soft: rgba(0, 0, 0, 0.06);
  --outline-faint: rgba(114, 119, 132, 0.16);
  --shadow-card: 0 30px 60px -36px rgba(15, 23, 42, 0.28);
  --shadow-button: 0 16px 34px rgba(15, 23, 42, 0.2);
  --shadow-panel: 0 40px 90px -52px rgba(15, 23, 42, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(170, 199, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #fbfbfd 0%, #f3f6fb 100%);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
}

.topbar-inner {
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 0 36px;
}

.brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-layout {
  display: flex;
  min-height: 100vh;
}

.hero-panel,
.form-panel {
  position: relative;
}

.hero-panel {
  display: flex;
  align-items: center;
  width: 56%;
  overflow: hidden;
  padding: 128px 88px 88px;
  background:
    radial-gradient(circle at 82% 12%, rgba(170, 199, 255, 0.78), transparent 24%),
    radial-gradient(circle at 6% 46%, rgba(232, 239, 252, 0.96), transparent 40%),
    radial-gradient(circle at 84% 100%, rgba(193, 217, 255, 0.84), transparent 28%),
    linear-gradient(135deg, rgba(251, 252, 255, 0.99), rgba(240, 246, 255, 0.98));
}

.hero-blur {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(120px);
}

.hero-content,
.form-shell {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 590px;
  margin: 0 auto;
}

.hero-icon-card {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  margin-bottom: 56px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.55));
  color: var(--primary);
  box-shadow: var(--shadow-card);
  animation: floatY 6s ease-in-out infinite;
}

.hero-icon-card svg {
  width: 56px;
  height: 56px;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(3.5rem, 5vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.hero-content h1 span {
  display: block;
  margin-top: 8px;
  color: transparent;
  background: linear-gradient(135deg, var(--primary-deep), #2d7ce0);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-content p {
  max-width: 500px;
  margin: 30px 0 50px;
  color: rgba(26, 28, 29, 0.68);
  font-size: 1.08rem;
  line-height: 1.78;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: rgba(26, 28, 29, 0.72);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.09em;
}

.hero-kicker .line {
  width: 48px;
  height: 1px;
  background: rgba(114, 119, 132, 0.45);
}

.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 44%;
  padding: 96px 72px 88px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(252, 252, 253, 0.98));
}

.form-shell {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 52px 24px 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

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

.form-heading h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 2.4vw, 2.9rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.form-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.03rem;
}

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

.field {
  display: grid;
  gap: 10px;
}

.field span {
  color: #747b86;
  font-size: 0.95rem;
  font-weight: 500;
}

.field input {
  height: 56px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(26, 28, 29, 0.28);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.15rem;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field input:focus {
  border-bottom-color: var(--primary-deep);
  box-shadow: inset 0 -1px 0 var(--primary-deep);
}

.password-stage {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    grid-template-rows 320ms ease,
    opacity 240ms ease,
    transform 320ms ease,
    margin-top 320ms ease;
}

.password-stage-inner {
  display: grid;
  gap: 28px;
  overflow: hidden;
}

.password-stage.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  margin-top: 28px;
}

.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-deep);
}

.form-meta a {
  color: var(--text-muted);
  transition: color 180ms ease;
}

.form-meta a:hover {
  color: var(--primary-deep);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 30px;
  height: 66px;
  border: 0;
  border-radius: 18px;
  background: #1d1f21;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-button);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #111214;
}

.primary-button.is-hidden {
  display: none;
}

.panel-footer {
  position: absolute;
  right: 80px;
  bottom: 30px;
  left: 80px;
  text-align: center;
}

.panel-footer nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  color: var(--text-soft);
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-footer p {
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 1100px) {
  .login-layout {
    flex-direction: column;
  }

  .hero-panel,
  .form-panel {
    width: 100%;
  }

  .hero-panel {
    min-height: 48vh;
    padding: 124px 28px 56px;
  }

  .form-panel {
    padding: 56px 28px 110px;
  }

  .form-shell {
    max-width: 560px;
    padding: 40px 12px 36px;
  }

  .panel-footer {
    right: 28px;
    left: 28px;
    bottom: 26px;
  }
}

@media (max-width: 767px) {
  .topbar-inner {
    min-height: 68px;
    padding: 0 20px;
  }

  .hero-panel {
    padding: 102px 20px 46px;
  }

  .hero-icon-card {
    width: 96px;
    height: 96px;
    margin-bottom: 40px;
    border-radius: 28px;
  }

  .hero-content p {
    margin: 26px 0 38px;
    font-size: 1rem;
  }

  .form-panel {
    padding: 42px 20px 110px;
  }

  .form-shell {
    padding: 30px 8px 28px;
  }

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

  .field input {
    height: 50px;
    font-size: 1.02rem;
  }

  .primary-button {
    height: 58px;
    border-radius: 16px;
  }

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