#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.site-noise,
.cursor-glow {
  z-index: 1;
}

body.is-leaving .auth-shell {
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
  filter: blur(8px);
}

.orb-lights {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  width: 32vw;
  min-width: 230px;
  max-width: 460px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 141, 255, 0.24), rgba(111, 44, 163, 0.08) 42%, transparent 70%);
  filter: blur(18px);
  opacity: 0.8;
  animation: orb-drift 14s ease-in-out infinite alternate;
}

.orb-one {
  top: -12%;
  left: -8%;
}

.orb-two {
  right: -10%;
  top: 10%;
  animation-delay: -4s;
}

.orb-three {
  left: 42%;
  bottom: -24%;
  animation-delay: -8s;
}

.auth-shell {
  position: relative;
  z-index: 2;
  width: min(1120px, 94vw);
  min-height: calc(100vh - 6rem);
  min-height: calc(100dvh - 6rem);
  margin: 3rem auto;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 1.1rem;
  align-items: stretch;
  transition: opacity 420ms ease, transform 420ms ease, filter 420ms ease;
  animation: shell-in 560ms ease both;
}

.auth-card,
.auth-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 192, 214, 0.18);
  background:
    linear-gradient(145deg, rgba(24, 21, 38, 0.86), rgba(8, 7, 14, 0.74)),
    rgba(19, 17, 31, 0.78);
  backdrop-filter: blur(18px);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.5),
    0 0 58px rgba(178, 87, 255, 0.12);
}

.auth-card::before,
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(209, 141, 255, 0.72), transparent 30%, rgba(126, 87, 255, 0.44) 68%, transparent);
  opacity: 0.42;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: border-glow 7s linear infinite;
}

.auth-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 600px;
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.auth-card:hover {
  transform: translateY(-4px);
  border-color: rgba(209, 141, 255, 0.34);
  box-shadow:
    0 28px 82px rgba(0, 0, 0, 0.55),
    0 0 68px rgba(178, 87, 255, 0.17);
}

.card-aura {
  position: absolute;
  inset: auto -20% -32% 14%;
  height: 280px;
  background: radial-gradient(circle, rgba(178, 87, 255, 0.22), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  animation: fade-up 520ms ease both;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 24px rgba(209, 141, 255, 0.24),
    inset 0 0 18px rgba(255, 255, 255, 0.08);
}

.brand h1 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
}

.intro-copy {
  position: relative;
  margin-top: clamp(1.25rem, 4vw, 2.4rem);
  animation: fade-up 560ms 80ms ease both;
}

.time-greeting {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  margin: 0 0 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(209, 141, 255, 0.24);
  background: rgba(178, 87, 255, 0.11);
  color: var(--silver);
  padding: 0.32rem 0.72rem;
  font-size: 0.82rem;
  line-height: 1.25;
  box-shadow: 0 0 24px rgba(178, 87, 255, 0.11);
}

.intro-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.45rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.wave-emoji {
  display: inline-block;
  transform-origin: 70% 70%;
  filter: drop-shadow(0 0 14px rgba(209, 141, 255, 0.35));
  animation: wave 1.8s ease-in-out infinite;
}

.studio-quote {
  position: relative;
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  margin: 0.85rem 0 0;
  padding: 0 0 0.72rem;
  color: rgba(218, 212, 229, 0.62);
  text-shadow:
    0 0 16px rgba(209, 141, 255, 0.22),
    0 0 26px rgba(207, 210, 220, 0.08);
  font-size: clamp(0.84rem, 1.6vw, 0.95rem);
  line-height: 1.5;
  animation: quote-float 4.8s ease-in-out infinite, fade-up 620ms 160ms ease both;
}

.studio-quote::after {
  content: "";
  position: absolute;
  left: 1.36rem;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(209, 141, 255, 0.62), rgba(207, 210, 220, 0.22), transparent);
  box-shadow: 0 0 14px rgba(209, 141, 255, 0.32);
  opacity: 0.78;
}

.quote-pulse {
  position: relative;
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  background: rgba(209, 141, 255, 0.88);
  box-shadow:
    0 0 12px rgba(209, 141, 255, 0.72),
    0 0 22px rgba(207, 210, 220, 0.16);
  flex: 0 0 auto;
}

.quote-pulse::after {
  content: "";
  position: absolute;
  inset: -0.34rem;
  border-radius: inherit;
  border: 1px solid rgba(209, 141, 255, 0.28);
  animation: quote-pulse 2.4s ease-out infinite;
}

.intro-copy p:last-child {
  max-width: 35rem;
  min-height: 4.8rem;
  margin: 1rem 0 0;
  color: rgba(242, 240, 247, 0.78);
  font-size: clamp(1rem, 2vw, 1.12rem);
}

.typing-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 0.08rem;
  border-right: 2px solid var(--purple-bright);
  transform: translateY(0.18em);
  animation: cursor-blink 0.8s step-end infinite;
}

.session-notice {
  position: relative;
  margin-top: 1.25rem;
  border: 1px solid rgba(209, 141, 255, 0.28);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: fade-up 520ms ease both;
}

.session-notice p {
  margin: 0;
}

.session-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.login-form {
  position: relative;
  z-index: 2;
  margin-top: 1.1rem;
  display: grid;
  gap: 0.95rem;
  animation: fade-up 600ms 140ms ease both;
}

.field {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.45rem;
}

label {
  font-size: 0.9rem;
  color: var(--silver);
}

input {
  position: relative;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid rgba(201, 192, 214, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(5, 4, 10, 0.42);
  color: var(--text-strong);
  -webkit-text-fill-color: var(--text-strong);
  caret-color: var(--purple-bright);
  padding: 0.9rem 1rem;
  font-size: 16px;
  line-height: 1.3;
  outline: none;
  opacity: 1;
  user-select: text;
  transition: border-color 180ms ease, box-shadow 220ms ease, background 220ms ease, transform 180ms ease;
}

input::placeholder {
  color: rgba(192, 187, 204, 0.62);
}

input:hover {
  border-color: rgba(209, 141, 255, 0.34);
  background: rgba(255, 255, 255, 0.055);
}

input:focus-visible {
  border-color: rgba(209, 141, 255, 0.7);
  box-shadow:
    0 0 0 4px rgba(178, 87, 255, 0.12),
    0 0 28px rgba(178, 87, 255, 0.18);
  transform: translateY(-1px);
}

.primary-btn {
  position: relative;
  z-index: 2;
  min-height: 54px;
  isolation: isolate;
  touch-action: manipulation;
  color: #100816;
  background: linear-gradient(120deg, #f0d7ff, var(--purple-bright), #8d55ff, var(--purple-bright));
  background-size: 260% 260%;
  box-shadow:
    0 14px 34px rgba(178, 87, 255, 0.38),
    0 0 30px rgba(209, 141, 255, 0.16);
  overflow: hidden;
  animation: button-gradient 6s ease infinite, button-pulse 2.8s ease-in-out infinite;
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: translateX(-120%);
  transition: transform 480ms ease;
  z-index: -1;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 18px 42px rgba(178, 87, 255, 0.48),
    0 0 42px rgba(209, 141, 255, 0.24);
}

.primary-btn:hover::after {
  transform: translateX(120%);
}

.primary-btn:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.primary-btn.is-loading {
  animation: button-gradient 6s ease infinite;
}

.ghost-btn,
.secondary-btn {
  text-decoration: none;
}

.message {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.message:not(:empty) {
  padding: 0.05rem 0.1rem;
}

.message.is-error {
  color: var(--danger);
}

.message.is-success {
  color: var(--success);
}

.auth-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 600px;
  background:
    radial-gradient(circle at 72% 16%, rgba(209, 141, 255, 0.25), transparent 34%),
    radial-gradient(circle at 18% 86%, rgba(111, 44, 163, 0.28), transparent 40%),
    linear-gradient(145deg, rgba(24, 21, 38, 0.9), rgba(7, 6, 13, 0.72));
  animation: fade-up 600ms 90ms ease both;
}

.preview-orbit {
  position: absolute;
  top: clamp(1rem, 4vw, 2rem);
  right: clamp(1rem, 4vw, 2rem);
  width: min(54%, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(209, 141, 255, 0.16);
  background: radial-gradient(circle, rgba(209, 141, 255, 0.13), transparent 58%);
  animation: slow-spin 18s linear infinite;
}

.preview-orbit span {
  position: absolute;
  border-radius: 50%;
  background: rgba(209, 141, 255, 0.82);
  box-shadow: 0 0 24px rgba(209, 141, 255, 0.78);
}

.preview-orbit span:nth-child(1) {
  width: 10px;
  height: 10px;
  top: 16%;
  left: 48%;
}

.preview-orbit span:nth-child(2) {
  width: 7px;
  height: 7px;
  right: 18%;
  bottom: 27%;
}

.preview-orbit span:nth-child(3) {
  width: 12px;
  height: 12px;
  left: 15%;
  bottom: 18%;
}

.auth-panel .eyebrow,
.auth-panel h2,
.auth-panel .panel-copy,
.feature-list,
.panel-pulse {
  position: relative;
  z-index: 1;
}

.auth-panel h2 {
  max-width: 33rem;
  margin: 0.7rem 0;
  font-size: clamp(1.55rem, 3.2vw, 2.65rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.panel-copy {
  max-width: 29rem;
  margin-top: 0;
}

.feature-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.62rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(242, 240, 247, 0.82);
}

.feature-list li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 18px rgba(209, 141, 255, 0.75);
  flex: 0 0 auto;
}

.panel-pulse {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.35rem;
  color: var(--purple-bright);
}

.panel-pulse span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 rgba(133, 241, 198, 0.6);
  animation: signal-pulse 1.8s ease-out infinite;
}

@keyframes shell-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes border-glow {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

@keyframes orb-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(38px, -24px, 0) scale(1.08);
  }
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(14deg);
  }
  40% {
    transform: rotate(-8deg);
  }
  60% {
    transform: rotate(10deg);
  }
  80% {
    transform: rotate(-4deg);
  }
}

@keyframes quote-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes quote-pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.72;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@keyframes cursor-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes button-gradient {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes button-pulse {
  0%,
  100% {
    box-shadow:
      0 14px 34px rgba(178, 87, 255, 0.34),
      0 0 30px rgba(209, 141, 255, 0.14);
  }
  50% {
    box-shadow:
      0 16px 42px rgba(178, 87, 255, 0.5),
      0 0 44px rgba(209, 141, 255, 0.24);
  }
}

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes signal-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(133, 241, 198, 0.52);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(133, 241, 198, 0);
  }
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .auth-card,
  .auth-panel {
    min-height: auto;
  }

  .auth-panel {
    padding-top: 8rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .auth-card:hover,
  .primary-btn:hover,
  .ghost-btn:hover,
  .secondary-btn:hover {
    transform: none;
  }
}

@media (max-width: 560px) {
  body {
    min-height: 100dvh;
  }

  .auth-shell {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .auth-card {
    min-height: auto;
    flex: 1 1 auto;
    justify-content: center;
    border-radius: 18px;
    padding: clamp(1rem, 5vw, 1.35rem);
  }

  .brand {
    gap: 0.7rem;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand h1 {
    font-size: 1.08rem;
  }

  .intro-copy {
    margin-top: 1rem;
  }

  .intro-copy h2 {
    font-size: clamp(2rem, 12vw, 3rem);
    line-height: 1.02;
  }

  .studio-quote {
    margin-top: 0.65rem;
    padding-bottom: 0.55rem;
  }

  .session-actions {
    flex-direction: column;
  }

  .intro-copy p:last-child {
    min-height: auto;
    margin-top: 0.75rem;
    font-size: 0.98rem;
  }

  .login-form {
    margin-top: 1rem;
    gap: 0.78rem;
  }

  input,
  .primary-btn {
    min-height: 52px;
  }

  .auth-panel {
    display: none;
  }

  .preview-orbit {
    width: 210px;
  }

  .orb {
    opacity: 0.55;
  }

  .site-noise {
    opacity: 0.045;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
