/* =========================================================
   Nexus MLM — Auth Pages (Login / Register)
   Matches dashboard theme: lime + ink, rounded, premium
   ========================================================= */

:root {
  --lime: #d7ff43;
  --ink: #111111;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --soft: #eaeaea;
  --muted: #f0f0f0;
  --muted-fg: #6b6b6b;
  --border: #e5e5e5;
  --fg: #111111;
  --radius: 1.25rem;
}

[data-theme="dark"] {
  --bg: #0c0c0c;
  --surface: #161616;
  --soft: #222222;
  --muted: #1c1c1c;
  --muted-fg: #a8a8a8;
  --border: #2a2a2a;
  --fg: #f5f5f5;
  --ink: #f5f5f5;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
}

/* ============ Layout ============ */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: start;
}

@media (max-width: 992px) {
  .auth-wrap {
    grid-template-columns: 1fr;
  }
}

/* ============ Visual side ============ */
.auth-visual {
  background: #111111;
  color: #fff;
  height: 100vh;
  min-height: 560px;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0 32px 32px 0;
  position: sticky;
  top: 0;
}

@media (max-width: 992px) {
  .auth-visual {
    display: none;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -.02em;
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  width: 55px;
  height: 40px;
  display: grid;
  place-items: center;
  font-weight: 800;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand .muted {
  opacity: .6;
  font-weight: 400;
}

.auth-hero {
  position: relative;
  z-index: 2;
  margin: auto 0;
  max-width: 500px;
}

.auth-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1;
  letter-spacing: -.03em;
  font-weight: 600;
  margin: 0 0 16px;
}

.auth-hero h1 .lime {
  color: var(--lime);
}

.auth-hero p {
  opacity: .75;
  max-width: 380px;
  margin: 0 0 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lime);
  color: #111;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 460px;
}

.auth-stats>div {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
}

.stat-mini {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--lime);
  letter-spacing: -.02em;
}

.stat-mini-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .55;
  margin-top: 2px;
}

.auth-glow {
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--lime) 0%, transparent 65%);
  opacity: .25;
  filter: blur(20px);
}

/* ============ Form side ============ */
.auth-form {
  display: grid;
  place-items: center;
  align-items: start;
  min-height: 100vh;
  padding: 32px 20px;
  position: relative;
}

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  cursor: pointer;
  font-size: 1rem;
  display: grid;
  place-items: center;
  transition: all .2s;
}

.theme-toggle:hover {
  background: var(--muted);
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 18px;
  color: var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -.02em;
}

.auth-mobile-brand .brand-text {
  font-size: 1.2rem;
}

.auth-mobile-brand .muted {
  opacity: .6;
  font-weight: 400;
}

@media (max-width: 992px) {
  .auth-mobile-brand {
    display: flex;
  }
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 36px 32px;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .2);
  animation: rise .5s ease both;
}

.auth-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -.02em;
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 600;
}

.auth-card .sub {
  color: var(--muted-fg);
  font-size: .9rem;
  margin: 0 0 24px;
}

/* ============ Fields ============ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 14px;
}

.field>.label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-fg);
  font-weight: 500;
}

.field .label .opt {
  font-weight: 400;
  opacity: .7;
  margin-left: 4px;
}

.field input {
  width: 100%;
  background: var(--muted);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: .95rem;
  color: var(--fg) !important;
  transition: all .2s;
  font-family: inherit;
}

.field input::placeholder {
  color: var(--muted-fg);
  opacity: .6;
}

.field input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(215, 255, 67, .35);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-wrap {
  position: relative;
}

.eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--muted-fg);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.eye:hover {
  background: var(--muted);
  color: var(--fg);
}

/* ============ Buttons ============ */
.btn-ink {
  width: 100%;
  background: var(--ink);
  color: var(--lime);
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .2s;
}

[data-theme="dark"] .btn-ink {
  color: #111;
}

.btn-ink:hover {
  background: var(--lime);
  color: #111;
  transform: translateY(-1px);
}

.btn-ghost {
  flex: 1;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .2s;
  font-size: 1rem;
}

.btn-ghost:hover {
  background: var(--muted);
}

/* ============ Misc ============ */
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  margin-bottom: 18px;
}

.row-between .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-fg);
}

.link {
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid var(--lime);
}

.link:hover {
  opacity: .8;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--muted-fg);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.socials {
  display: flex;
  gap: 10px;
}

.terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .82rem;
  color: var(--muted-fg);
  margin-bottom: 18px;
}

.terms input {
  margin-top: 3px;
}

.foot {
  text-align: center;
  font-size: .85rem;
  color: var(--muted-fg);
  margin-top: 22px;
}

/* ============ Password strength ============ */
.pw-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.pw-meter span {
  height: 4px;
  background: var(--muted);
  border-radius: 999px;
  transition: background .25s;
}

.pw-meter span.on.s1 {
  background: #ff6b6b;
}

.pw-meter span.on.s2 {
  background: #ffa94d;
}

.pw-meter span.on.s3 {
  background: #ffd93d;
}

.pw-meter span.on.s4 {
  background: var(--lime);
}

/* ============ Animations ============ */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}