:root {
  --sk-bg: #030014;
  --sk-bg2: #09001f;
  --sk-purple: #7c19ff;
  --sk-purple2: #a94cff;
  --sk-purple3: #c77dff;
  --sk-gold: #D4AF37;
  --sk-white: #fff;
  /* Alias historiques (sikavo) conservés pour compatibilité. */
  --nx-bg: var(--sk-bg);
  --nx-bg2: var(--sk-bg2);
  --nx-purple: var(--sk-purple);
  --nx-purple2: var(--sk-purple2);
  --nx-purple3: var(--sk-purple3);
  --nx-white: var(--sk-white);
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: var(--nx-bg);
  color: #fff
}

body {
  overflow-x: hidden
}

.nx-page {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(123, 24, 255, .18), transparent 27%),
    radial-gradient(circle at 5% 90%, rgba(95, 0, 190, .20), transparent 30%),
    radial-gradient(circle at 95% 8%, rgba(168, 65, 255, .14), transparent 28%),
    linear-gradient(135deg, #02000d, #07001b 48%, #11002b);
}

.nx-bg-glow {
  position: absolute;
  inset: -30%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(132, 38, 255, .10), transparent 45%);
  animation: nxGlow 8s ease-in-out infinite alternate
}

@keyframes nxGlow {
  from {
    transform: scale(.9);
    opacity: .5
  }

  to {
    transform: scale(1.12);
    opacity: 1
  }
}

.nx-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(167, 77, 255, .40);
  box-shadow: 0 0 25px rgba(124, 25, 255, .16), inset 0 0 25px rgba(124, 25, 255, .06);
  animation: nxSpin 22s linear infinite, nxPulse 5s ease-in-out infinite
}

.nx-ring:after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  top: -4px;
  left: 50%;
  background: #e4c7ff;
  box-shadow: 0 0 16px 5px #8d27ff
}

.nx-ring.r1 {
  width: 30vw;
  height: 30vw;
  min-width: 280px;
  min-height: 280px
}

.nx-ring.r2 {
  width: 52vw;
  height: 52vw;
  min-width: 450px;
  min-height: 450px;
  animation-duration: 29s, 6s;
  animation-direction: reverse, normal
}

.nx-ring.r3 {
  width: 78vw;
  height: 78vw;
  min-width: 650px;
  min-height: 650px;
  animation-duration: 39s, 7s
}

.nx-ring.r4 {
  width: 110vw;
  height: 110vw;
  min-width: 850px;
  min-height: 850px;
  animation-duration: 56s, 8s;
  opacity: .45
}

@keyframes nxSpin {
  to {
    transform: translate(-50%, -50%) rotate(360deg)
  }
}

@keyframes nxPulse {

  0%,
  100% {
    opacity: .35
  }

  50% {
    opacity: .9
  }
}

.nx-logo {
  display: block;
  width: min(82vw, 560px);
  height: auto;
  margin: auto;
  filter: drop-shadow(0 0 24px rgba(139, 39, 255, .30))
}

.nx-center {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px
}

.nx-splash {
  text-align: center;
  width: 100%;
  max-width: 720px
}

.nx-splash .nx-logo {
  animation: nxLogoIn 1.1s ease both
}

@keyframes nxLogoIn {
  from {
    opacity: 0;
    transform: scale(.88);
    filter: blur(8px) drop-shadow(0 0 5px rgba(139, 39, 255, .1))
  }

  to {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 24px rgba(139, 39, 255, .30))
  }
}

.nx-progress {
  width: min(370px, 76vw);
  height: 5px;
  margin: 42px auto 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  overflow: hidden
}

.nx-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6410e8, #a94cff, #fff, #7c19ff);
  box-shadow: 0 0 18px #9e48ff;
  animation: nxProgress 5s linear forwards
}

@keyframes nxProgress {
  to {
    width: 100%
  }
}

.nx-loading {
  font-size: 14px;
  color: rgba(255, 255, 255, .68);
  letter-spacing: .05em
}

.nx-auth {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px 16px 40px
}

.nx-auth-inner {
  width: 100%;
  max-width: 470px
}

.nx-auth-logo {
  width: min(75vw, 390px);
  margin: 0 auto 20px
}

.nx-card {
  border: 1px solid rgba(178, 91, 255, .55);
  border-radius: 27px;
  padding: 26px;
  background: linear-gradient(145deg, rgba(20, 3, 47, .90), rgba(4, 0, 16, .80));
  backdrop-filter: blur(18px);
  box-shadow: 0 0 60px rgba(103, 16, 224, .20), inset 0 0 35px rgba(169, 75, 255, .04)
}

.nx-title {
  text-align: center;
  margin: 0;
  font-size: 27px;
  font-weight: 800
}

.nx-sub {
  text-align: center;
  color: rgba(255, 255, 255, .58);
  font-size: 14px;
  margin: 8px 0 23px
}

.nx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px
}

.nx-field {
  margin-bottom: 11px
}

.nx-field input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(157, 69, 255, .52);
  border-radius: 14px;
  background: rgba(0, 0, 12, .52);
  color: #fff;
  padding: 0 15px;
  outline: none;
  transition: .2s
}

.nx-field input::placeholder {
  color: rgba(255, 255, 255, .46)
}

.nx-field input:focus {
  border-color: #bd7aff;
  box-shadow: 0 0 0 3px rgba(124, 25, 255, .14), 0 0 22px rgba(124, 25, 255, .15)
}

.nx-check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: rgba(255, 255, 255, .57);
  font-size: 12px;
  line-height: 1.45;
  margin: 4px 0 17px
}

.nx-check input {
  margin-top: 2px;
  accent-color: #8d27ff
}

.nx-btn {
  width: 100%;
  height: 53px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, #6b10e9, #9c39ff, #6b10e9);
  background-size: 200% 100%;
  box-shadow: 0 10px 32px rgba(100, 0, 220, .34);
  transition: .25s
}

.nx-btn:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(124, 25, 255, .45)
}

.nx-btn-secondary {
  width: 100%;
  height: 53px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, .05);
  transition: .25s
}

.nx-btn-secondary:hover {
  border-color: rgba(189, 122, 255, .55);
  background: rgba(124, 25, 255, .12)
}

.nx-link {
  text-align: center;
  color: rgba(255, 255, 255, .58);
  font-size: 14px;
  margin: 19px 0 0
}

.nx-link a {
  color: #c77dff;
  font-weight: 700;
  text-decoration: none
}

.nx-error {
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 70, 90, .28);
  background: rgba(255, 35, 60, .08);
  color: #ffd9de;
  font-size: 13px
}

.nx-success {
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, .35);
  background: rgba(212, 175, 55, .10);
  color: #f3dfa0;
  font-size: 13px
}

.nx-dashboard {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  min-height: 100svh;
  padding: 28px
}

.nx-dashboard-head {
  max-width: 1120px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px
}

.nx-dashboard-logo {
  width: 220px;
  height: auto
}

.nx-logout {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(170, 80, 255, .35);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04)
}

.nx-content {
  max-width: 1120px;
  margin: 55px auto
}

.nx-welcome {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 8px
}

.nx-muted {
  color: rgba(255, 255, 255, .56)
}

.nx-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px
}

.nx-stat {
  border: 1px solid rgba(178, 91, 255, .30);
  border-radius: 22px;
  padding: 22px;
  background: rgba(15, 2, 35, .66);
  backdrop-filter: blur(14px)
}

.nx-stat small {
  color: rgba(255, 255, 255, .5)
}

.nx-stat strong {
  display: block;
  font-size: 28px;
  margin-top: 10px
}

@media(max-width:600px) {
  .nx-grid {
    grid-template-columns: 1fr
  }

  .nx-card {
    padding: 20px 15px;
    border-radius: 21px
  }

  .nx-auth-logo {
    width: min(86vw, 350px)
  }

  .nx-ring.r1 {
    width: 72vw;
    height: 72vw
  }

  .nx-ring.r2 {
    width: 112vw;
    height: 112vw
  }

  .nx-ring.r3 {
    width: 155vw;
    height: 155vw
  }

  .nx-ring.r4 {
    width: 210vw;
    height: 210vw
  }

  .nx-dashboard {
    padding: 18px
  }

  .nx-dashboard-head {
    align-items: flex-start
  }

  .nx-dashboard-logo {
    width: 170px
  }

  .nx-content {
    margin: 38px auto
  }

  .nx-welcome {
    font-size: 28px
  }

  .nx-stats {
    grid-template-columns: 1fr
  }
}

@media(prefers-reduced-motion:reduce) {

  .nx-ring,
  .nx-bg-glow,
  .nx-splash .nx-logo,
  .nx-progress span {
    animation: none
  }

  .nx-progress span {
    width: 100%
  }
}