/* =========================================================
   DYNEX — Auth Pages (Login / Register)
   Cyber Electric Sapphire Blue + Metallic Chrome Theme
   ========================================================= */

:root {
  --lime: #0066ff;
  --cyan: #00d2ff;
  --ink: #0a1120;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --soft: #eaf1f8;
  --muted: #e4edf6;
  --muted-fg: #62758d;
  --border: #dbe5f0;
  --fg: #0a1120;
  --radius: 1.25rem;
}

[data-theme="dark"] {
  --lime: #00d2ff;
  --cyan: #00e5ff;
  --bg: #070b12;
  --surface: #0e1626;
  --soft: #142138;
  --muted: #18253d;
  --muted-fg: #8ba2bf;
  --border: #1c2d47;
  --fg: #f1f5f9;
  --ink: #f1f5f9;
}

* {
  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: radial-gradient(circle at top right, #0d1a30 0%, #060a12 100%);
  border-right: 1px solid rgba(0, 210, 255, 0.2);
  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: #00d2ff;
  text-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

.auth-hero p {
  opacity: .75;
  max-width: 380px;
  margin: 0 0 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0052d4, #00d2ff);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35);
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 460px;
}

.auth-stats>div {
  background: rgba(14, 22, 38, 0.7);
  border: 1px solid rgba(0, 210, 255, 0.2);
  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: #00d2ff;
  letter-spacing: -.02em;
}

.stat-mini-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .65;
  margin-top: 2px;
}

.auth-glow {
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.4) 0%, transparent 65%);
  opacity: .4;
  filter: blur(24px);
}

/* ============ 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(--lime);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, .2);
}

.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: linear-gradient(135deg, #0052d4, #0066ff);
  color: #ffffff;
  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;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35);
}

.btn-ink:hover {
  background: linear-gradient(135deg, #0066ff, #00d2ff);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.45);
}

[data-theme="dark"] .btn-ink {
  background: linear-gradient(135deg, #0066ff, #00d2ff);
  color: #070b12;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.3);
}

[data-theme="dark"] .btn-ink:hover {
  background: #ffffff;
  color: #070b12;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.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;
  }
}