/* WS ZHANG — Auth pages (login / register) */

:root {
  --auth-bg: #04060c;
  --auth-panel: #0a0f1c;
  --auth-panel-2: #0d1424;
  --auth-line: rgba(0, 255, 242, 0.14);
  --auth-cyan: #00fff2;
  --auth-magenta: #ff2ec4;
  --auth-green: #00ff9d;
  --auth-text: #e8f4ff;
  --auth-dim: #5c7290;
}

.auth-page {
  font-family: 'Rajdhani', sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

.auth-page * {
  box-sizing: border-box;
}

/* Background — semua elemen dekoratif: pointer-events none, tidak ganggu klik */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
}

.auth-bg-grid {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image:
    linear-gradient(rgba(0, 255, 242, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 242, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, black 15%, transparent 72%);
}

.auth-bg-grid-a {
  animation: auth-grid-drift-a 28s linear infinite;
  opacity: 0.85;
}

.auth-bg-grid-b {
  background-size: 42px 42px;
  background-image:
    linear-gradient(rgba(255, 46, 196, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 46, 196, 0.04) 1px, transparent 1px);
  animation: auth-grid-drift-b 36s linear infinite;
  opacity: 0.6;
}

@keyframes auth-grid-drift-a {
  0% { transform: translate(0, 0); }
  100% { transform: translate(42px, 42px); }
}

@keyframes auth-grid-drift-b {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-42px, -21px) rotate(0.5deg); }
}

.auth-bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(0, 255, 242, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 100%, rgba(255, 46, 196, 0.12), transparent 55%);
  animation: auth-glow-pulse 10s ease-in-out infinite alternate;
}

@keyframes auth-glow-pulse {
  0% { opacity: 0.75; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.03); }
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  pointer-events: none;
}

.auth-orb-1 {
  width: 220px;
  height: 220px;
  top: 8%;
  left: -60px;
  background: rgba(0, 255, 242, 0.28);
  animation: auth-float 8s ease-in-out infinite;
}

.auth-orb-2 {
  width: 180px;
  height: 180px;
  bottom: 10%;
  right: -40px;
  background: rgba(255, 46, 196, 0.22);
  animation: auth-float 10s ease-in-out infinite;
  animation-delay: -3s;
}

.auth-orb-3 {
  width: 140px;
  height: 140px;
  top: 45%;
  left: 55%;
  background: rgba(168, 85, 247, 0.18);
  animation: auth-float 12s ease-in-out infinite;
  animation-delay: -6s;
}

/* Scan beam — garis cahaya vertikal berjalan */
.auth-beam {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 255, 242, 0.03) 40%,
    rgba(0, 255, 242, 0.12) 50%,
    rgba(0, 255, 242, 0.03) 60%,
    transparent 100%
  );
  animation: auth-beam-scan 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes auth-beam-scan {
  0% { transform: translateY(-10%); opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translateY(120vh); opacity: 0; }
}

/* Laser horizontal */
.auth-laser {
  position: absolute;
  left: -100%;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 242, 0.5), transparent);
  box-shadow: 0 0 12px rgba(0, 255, 242, 0.35);
  pointer-events: none;
}

.auth-laser-1 {
  top: 22%;
  animation: auth-laser-run 9s linear infinite;
}

.auth-laser-2 {
  top: 58%;
  width: 40%;
  animation: auth-laser-run 13s linear infinite;
  animation-delay: -4s;
  opacity: 0.6;
}

.auth-laser-3 {
  top: 78%;
  animation: auth-laser-run 11s linear infinite;
  animation-delay: -7s;
  opacity: 0.45;
}

@keyframes auth-laser-run {
  0% { transform: translateX(0); opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { transform: translateX(280%); opacity: 0; }
}

/* Partikel floating */
.auth-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--auth-cyan);
  box-shadow: 0 0 6px var(--auth-cyan);
  opacity: 0;
  top: calc(5% + (var(--i) * 4.7%) * 1%);
  left: calc(3% + ((var(--i) * 17) % 94) * 1%);
  animation: auth-particle-rise calc(8s + (var(--i) * 0.35s)) linear infinite;
  animation-delay: calc(var(--i) * -0.65s);
}

.auth-register .auth-particle {
  background: var(--auth-green);
  box-shadow: 0 0 6px var(--auth-green);
}

@keyframes auth-particle-rise {
  0% {
    transform: translateY(100vh) scale(0.5);
    opacity: 0;
  }
  10% { opacity: 0.7; }
  90% { opacity: 0.5; }
  100% {
    transform: translateY(-15vh) scale(1.2);
    opacity: 0;
  }
}

.auth-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 242, 0.018) 2px,
    rgba(0, 255, 242, 0.018) 4px
  );
  opacity: 0.45;
  pointer-events: none;
  animation: auth-scanline-flicker 4s steps(2) infinite;
}

@keyframes auth-scanline-flicker {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.55; }
}

.auth-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(4, 6, 12, 0.75) 100%);
  pointer-events: none;
}

@keyframes auth-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.05); }
}

/* Konten di atas background — selalu bisa diklik */
.auth-wrap {
  position: relative;
  z-index: 2;
  isolation: isolate;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 100dvh;
  min-height: 100vh;
  justify-content: center;
}

@media (min-width: 900px) {
  .auth-wrap {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    padding: 2.5rem 2rem;
  }
}

.auth-card-wrap,
.auth-brand,
.auth-form,
.auth-btn,
.auth-link,
.auth-input,
.auth-toggle-pw {
  position: relative;
  z-index: 1;
}

/* Matikan animasi jika user prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .auth-bg,
  .auth-bg *,
  .auth-status-dot {
    animation: none !important;
  }
  .auth-bg-grid-b { display: none; }
}

/* Hemat GPU di HP kecil — kurangi partikel */
@media (max-width: 480px) {
  .auth-particle:nth-child(n+13) { display: none; }
  .auth-laser-3 { display: none; }
  .auth-orb-3 { opacity: 0.25; }
}

/* Brand panel */
.auth-brand {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0;
}

@media (min-width: 900px) {
  .auth-brand {
    text-align: left;
    padding-right: 1rem;
  }
}

.auth-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--auth-green);
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.auth-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--auth-green);
  box-shadow: 0 0 8px var(--auth-green);
  animation: auth-blink 1.6s ease-in-out infinite;
}

@keyframes auth-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.auth-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 8vw, 3.25rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--auth-cyan), var(--auth-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(0, 255, 242, 0.25);
  margin-bottom: 0.75rem;
}

.auth-tagline {
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  color: var(--auth-dim);
  font-weight: 600;
  max-width: 420px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}

@media (min-width: 900px) {
  .auth-tagline {
    margin-left: 0;
    margin-right: 0;
  }
}

.auth-features {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (min-width: 900px) {
  .auth-features {
    display: flex;
  }
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #94a3b8;
}

.auth-feature-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(0, 255, 242, 0.06);
  border: 1px solid var(--auth-line);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.auth-version {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #334155;
  margin-top: 2rem;
}

/* Form card */
.auth-card-wrap {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .auth-card-wrap {
    flex-shrink: 0;
    margin: 0;
  }
}

.auth-card {
  position: relative;
  background: linear-gradient(155deg, var(--auth-panel) 0%, var(--auth-panel-2) 100%);
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  padding: 1.5rem 1.25rem 1.75rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 48px -24px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

@media (min-width: 480px) {
  .auth-card {
    padding: 2rem 1.75rem 2.25rem;
  }
}

.auth-corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-corners i {
  position: absolute;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
}

.auth-corners i:nth-child(1) {
  top: -1px; left: -1px;
  border-top: 2px solid var(--auth-cyan);
  border-left: 2px solid var(--auth-cyan);
}
.auth-corners i:nth-child(2) {
  top: -1px; right: -1px;
  border-top: 2px solid var(--auth-cyan);
  border-right: 2px solid var(--auth-cyan);
}
.auth-corners i:nth-child(3) {
  bottom: -1px; left: -1px;
  border-bottom: 2px solid var(--auth-cyan);
  border-left: 2px solid var(--auth-cyan);
}
.auth-corners i:nth-child(4) {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--auth-cyan);
  border-right: 2px solid var(--auth-cyan);
}

.auth-register .auth-corners i {
  border-color: var(--auth-green);
}

.auth-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--auth-cyan);
  opacity: 0.75;
  margin-bottom: 0.35rem;
}

.auth-register .auth-eyebrow {
  color: var(--auth-green);
}

.auth-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--auth-dim);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* Alert */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.auth-alert-error {
  background: rgba(255, 56, 96, 0.1);
  border: 1px solid rgba(255, 56, 96, 0.35);
  color: #ffb3c2;
}

.auth-alert-ref {
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.3);
  color: #b5ffd9;
  margin-bottom: 1.25rem;
}

.auth-alert-ref code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--auth-green);
  font-weight: 700;
}

/* Form fields */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.auth-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.45rem;
}

.auth-field label span.optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #475569;
  font-size: 0.75rem;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 0.9rem;
  font-size: 1rem;
  opacity: 0.45;
  pointer-events: none;
  line-height: 1;
}

.auth-input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem 0.75rem 2.65rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--auth-text);
  background: #060a13;
  border: 1px solid var(--auth-line);
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.auth-input::placeholder {
  color: #475569;
  font-weight: 500;
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-cyan);
  box-shadow: 0 0 0 3px rgba(0, 255, 242, 0.12);
}

.auth-register .auth-input:focus {
  border-color: var(--auth-green);
  box-shadow: 0 0 0 3px rgba(0, 255, 157, 0.12);
}

.auth-toggle-pw {
  position: absolute;
  right: 0.65rem;
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.35rem;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-toggle-pw:hover {
  color: var(--auth-cyan);
}

.auth-register .auth-toggle-pw:hover {
  color: var(--auth-green);
}

/* Button */
.auth-btn {
  position: relative;
  width: 100%;
  min-height: 50px;
  margin-top: 0.35rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.auth-btn-login {
  background: linear-gradient(135deg, #00fff2, #00aeff);
  color: #001417;
  box-shadow: 0 0 20px rgba(0, 255, 242, 0.35);
}

.auth-btn-register {
  background: linear-gradient(135deg, #00ff9d, #00c97e);
  color: #00160d;
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.35);
}

.auth-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn.cp-btn-loading {
  pointer-events: none;
  opacity: 0.85;
}

.auth-btn .cp-spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

.auth-btn.cp-btn-loading .btn-text { display: none; }
.auth-btn.cp-btn-loading .cp-spinner { display: inline-block !important; }

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

/* Footer link */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--auth-line);
  font-size: 0.9rem;
  color: var(--auth-dim);
}

.auth-link {
  color: var(--auth-cyan);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-link:hover {
  color: #7ffff8;
  text-decoration: underline;
}

.auth-register .auth-link {
  color: var(--auth-green);
}

.auth-register .auth-link:hover {
  color: #7fffd4;
}

/* Mobile chips under logo */
.auth-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (min-width: 900px) {
  .auth-chips {
    display: none;
  }
}

.auth-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  background: rgba(0, 255, 242, 0.06);
  border: 1px solid var(--auth-line);
  color: #94a3b8;
}

.auth-register .auth-chip {
  background: rgba(0, 255, 157, 0.06);
  border-color: rgba(0, 255, 157, 0.2);
}
