.sign {
  min-height: 100vh;
  background:
    radial-gradient(
      ellipse at 18% 70%,
      rgba(60, 42, 138, 0.16),
      transparent 36%
    ),
    radial-gradient(
      ellipse at 80% 18%,
      rgba(48, 79, 174, 0.12),
      transparent 32%
    ),
    var(--bg);
}

.sign > .header {
  position: relative;
}

.auth-main {
  min-height: calc(100vh - 74px);
  padding: 54px 24px;
  display: grid;
  place-items: center;
}

.auth-layout {
  width: min(100%, 1060px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: center;
  gap: clamp(44px, 8vw, 112px);
}

.auth-aside {
  position: relative;
  padding: 38px 0;
}

.auth-aside-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 30px;
  border: 1px solid rgba(172, 101, 255, 0.5);
  border-radius: 15px;
  background: rgba(147, 69, 255, 0.1);
  color: #d4a8ff;
  font:
    700 19px "JetBrains Mono",
    monospace;
  box-shadow: 0 0 42px rgba(145, 61, 255, 0.2);
}

.auth-aside-kicker {
  margin-bottom: 16px;
  color: #c18bff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.auth-aside h1 {
  max-width: 570px;
  margin: 0 0 18px;
  color: #f5f7ff;
  font-size: clamp(40px, 5.2vw, 66px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1.04;
}

.auth-aside h1 span {
  background: linear-gradient(95deg, #c57dff 5%, #6386ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-aside-copy {
  max-width: 445px;
  margin: 0;
  color: #96a6bf;
  font-size: 15px;
  line-height: 1.8;
}

.auth-benefits {
  display: grid;
  gap: 14px;
  margin-top: 34px;
  padding: 0;
  list-style: none;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #c9d4e6;
  font-size: 13px;
}

.auth-benefits li::before {
  content: "✓";
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  border: 1px solid rgba(94, 230, 168, 0.27);
  border-radius: 50%;
  background: rgba(94, 230, 168, 0.08);
  color: #71e8b1;
  font-size: 11px;
  font-weight: 800;
}

.auth-card.login-box {
  width: 100%;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgba(144, 163, 194, 0.2);
  border-radius: 20px;
  background: linear-gradient(
    145deg,
    rgba(12, 22, 39, 0.97),
    rgba(7, 14, 27, 0.97)
  );
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.34),
    0 0 60px rgba(100, 64, 190, 0.08);
  backdrop-filter: blur(20px);
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #c18bff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
}

.auth-card.login-box h2 {
  margin: 0;
  color: #f5f7ff;
  font-size: clamp(25px, 3vw, 31px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.2;
  text-align: left;
}

.auth-card .auth-description {
  margin: 10px 0 26px;
  color: #93a2b8;
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
}

.auth-card .auth-message {
  margin: 18px 0 !important;
  padding: 12px 14px;
  border: 1px solid rgba(240, 180, 180, 0.2);
  border-radius: 10px;
  background: rgba(240, 90, 90, 0.08);
  color: #ffc1c1 !important;
  font-size: 13px;
  text-align: left;
}

.auth-card .auth-message.success {
  border-color: rgba(94, 230, 168, 0.22);
  background: rgba(94, 230, 168, 0.07);
  color: #a9f0ca !important;
}

.auth-card .auth-message .auth-action {
  margin: 7px 0 0;
  color: #d6acff;
  font-size: 13px;
}

.auth-card .input-box {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.auth-card .input-box label {
  position: static;
  color: #c7d2e3;
  font-size: 12px;
  font-weight: 600;
  pointer-events: auto;
}

.auth-card .input-box input {
  box-sizing: border-box;
  width: 100%;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid #26344a;
  border-radius: 10px;
  outline: none;
  background: #080f1d;
  color: #f5f7ff;
  font-size: 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.auth-card .input-box input::placeholder {
  color: #66758b;
}

.auth-card .input-box input:focus {
  border-color: #9b59ff;
  background: #0a1222;
  box-shadow: 0 0 0 3px rgba(155, 89, 255, 0.15);
}

.auth-card .input-box input:focus + label,
.auth-card .input-box input:valid + label {
  position: static;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #c7d2e3;
  font-size: 12px;
}

.password-strength {
  display: grid;
  gap: 7px;
  margin-top: -5px;
}

.password-strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.password-strength-bars span {
  height: 4px;
  border-radius: 4px;
  background: #26344a;
  transition: background-color 160ms ease;
}

.password-strength-label {
  color: #8997ab;
  font-size: 11px;
}

.password-strength[data-strength="weak"]
  .password-strength-bars
  span:nth-child(-n + 2) {
  background: #f87171;
}

.password-strength[data-strength="weak"] .password-strength-label {
  color: #fca5a5;
}

.password-strength[data-strength="fair"]
  .password-strength-bars
  span:nth-child(-n + 3) {
  background: #fbbf24;
}

.password-strength[data-strength="fair"] .password-strength-label {
  color: #fcd34d;
}

.password-strength[data-strength="strong"] .password-strength-bars span {
  background: #4ade80;
}

.password-strength[data-strength="strong"] .password-strength-label {
  color: #86efac;
}

.password-rules {
  display: grid;
  gap: 6px;
  margin: -7px 0 18px;
  padding: 0;
  list-style: none;
}

.password-rules li {
  position: relative;
  padding-left: 17px;
  color: #8997ab;
  font-size: 11px;
}

.password-rules li::before {
  position: absolute;
  left: 0;
  content: "○";
  color: #748198;
}

.password-rules li.met {
  color: #86efac;
}

.password-rules li.met::before {
  content: "✓";
  color: #4ade80;
}

.auth-card button {
  width: 100%;
  min-height: 49px;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(100deg, #963cff, #586cff);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(106, 66, 225, 0.25);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.auth-card button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 13px 30px rgba(106, 66, 225, 0.34);
}

.auth-card button:disabled,
.auth-card button:disabled:hover {
  transform: none;
  filter: none;
  background: #26344a;
  color: #8997ab;
  box-shadow: none;
  cursor: not-allowed;
}

.auth-card button:focus-visible,
.auth-card a:focus-visible {
  outline: 2px solid #c18bff;
  outline-offset: 3px;
}

.auth-switch.links {
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(144, 163, 194, 0.14);
  color: #95a4ba;
  font-size: 12px;
}

.auth-switch.links a {
  color: #d1a2ff;
  font-size: 12px;
  font-weight: 700;
}

.auth-switch.links a:hover {
  color: #e5c9ff;
}

body.light.sign {
  background:
    radial-gradient(
      ellipse at 18% 70%,
      rgba(114, 39, 232, 0.08),
      transparent 36%
    ),
    radial-gradient(
      ellipse at 80% 18%,
      rgba(49, 95, 232, 0.07),
      transparent 32%
    ),
    var(--bg);
}

body.light .auth-aside h1,
body.light .auth-card.login-box h2 {
  color: #172033;
}

body.light .auth-aside-copy,
body.light .auth-benefits li,
body.light .auth-switch.links {
  color: #596579;
}

body.light .auth-card.login-box {
  border-color: #dce3ed;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 80px rgba(38, 52, 78, 0.12);
}

body.light .auth-card .auth-description {
  color: #667085;
}

body.light .auth-card .auth-message {
  border-color: #fda29b;
  background: #fef3f2;
  color: #b42318 !important;
}

body.light .auth-card .auth-message.success {
  border-color: #86efac;
  background: #ecfdf3;
  color: #166534 !important;
}

body.light .auth-card .auth-message .auth-action {
  color: #5b21b6;
}

body.light .auth-card .input-box label {
  color: #344054;
}

body.light .auth-card .input-box input {
  border-color: #d5dce8;
  background: #f8f9fc;
  color: #172033;
}

body.light .auth-card .input-box input:focus {
  border-color: #8a48e7;
  background: #fff;
}

body.light .password-strength-bars span {
  background: #d5dce8;
}

body.light .password-strength-label,
body.light .password-rules li {
  color: #667085;
}

body.light .password-strength[data-strength="weak"] .password-strength-label {
  color: #b42318;
}

body.light .password-strength[data-strength="fair"] .password-strength-label {
  color: #9a6700;
}

body.light .password-strength[data-strength="strong"] .password-strength-label,
body.light .password-rules li.met {
  color: #16803c;
}

body.light .auth-card button:disabled,
body.light .auth-card button:disabled:hover {
  background: #e4e7ec;
  color: #667085;
}

@media (max-width: 820px) {
  .auth-main {
    min-height: calc(100vh - 74px);
    padding: 40px 22px;
  }

  .auth-layout {
    width: min(100%, 520px);
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .auth-aside {
    padding: 0;
    text-align: center;
  }

  .auth-aside-mark {
    width: 44px;
    height: 44px;
    margin: 0 auto 18px;
  }

  .auth-aside-kicker {
    margin-bottom: 10px;
  }

  .auth-aside h1 {
    margin: 0 auto 10px;
    font-size: clamp(32px, 8vw, 44px);
  }

  .auth-aside-copy {
    margin: 0 auto;
    font-size: 13px;
  }

  .auth-benefits {
    display: none;
  }
}

@media (max-width: 560px) {
  .auth-main {
    min-height: calc(100vh - 65px);
    padding: 30px 12px 40px;
  }

  .auth-layout {
    gap: 20px;
  }

  .auth-card.login-box {
    padding: 26px 22px;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card *,
  .auth-card *::before,
  .auth-card *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
