:root {
  color-scheme: dark;
  --bg: #07090a;
  --surface: #0e1213;
  --paper: #f4f2eb;
  --text: #f3f5f0;
  --muted: #929b96;
  --mint: #a8efc5;
  --mint-strong: #6be2a1;
  --gold: #d7bd79;
  --line: rgba(239, 244, 237, 0.1);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Manrope", "Segoe UI Variable Text", "SF Pro Text", Inter, Roboto, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -30%, rgba(103, 172, 136, 0.11), transparent 42%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.auth-atmosphere { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-atmosphere::after {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, #000, transparent 76%);
  content: "";
}

.aurora { position: absolute; width: 46vw; min-width: 520px; aspect-ratio: 1; border-radius: 50%; filter: blur(150px); }
.aurora-one { top: -36vw; left: -15vw; background: rgba(88, 211, 144, 0.13); }
.aurora-two { right: -30vw; bottom: -38vw; background: rgba(214, 187, 115, 0.08); }
.orbit { position: absolute; border: 1px solid rgba(219, 233, 223, 0.045); border-radius: 50%; }
.orbit-one { width: 42vw; height: 42vw; top: -20vw; right: 4vw; }
.orbit-two { width: 62vw; height: 62vw; right: -35vw; bottom: -42vw; }
.auth-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 16px rgba(244, 242, 235, 0.8); }
.star-one { top: 13%; left: 73%; }
.star-two { top: 68%; left: 8%; opacity: 0.6; }
.star-three { right: 6%; bottom: 20%; background: var(--gold); }

.login-shell {
  position: relative;
  display: grid;
  width: min(1280px, calc(100% - 40px));
  min-height: min(780px, calc(100dvh - 40px));
  grid-template-columns: minmax(0, 1.17fr) minmax(390px, 0.83fr);
  margin: 20px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(10, 13, 14, 0.9);
  box-shadow: 0 60px 180px rgba(0, 0, 0, 0.64), inset 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(30px) saturate(115%);
}

.identity-panel,
.credential-panel { position: relative; padding: clamp(32px, 4.5vw, 64px); }
.identity-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 38px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 48%, rgba(167, 239, 196, 0.085), transparent 27%),
    radial-gradient(circle at 8% 0%, rgba(167, 239, 196, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(20, 29, 26, 0.98), rgba(10, 14, 15, 0.98));
}
.identity-panel::after {
  position: absolute;
  width: 430px;
  height: 430px;
  top: 50%;
  right: -210px;
  border: 1px solid rgba(167, 239, 196, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(167, 239, 196, 0.018), 0 0 0 104px rgba(167, 239, 196, 0.012);
  content: "";
  transform: translateY(-50%);
}
.identity-header,
.credential-topline { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.identity-brand { display: inline-flex; width: max-content; align-items: center; gap: 13px; color: var(--text); text-decoration: none; }
.identity-brand > span:first-child,
.credential-mark {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(167, 239, 196, 0.35);
  border-radius: 14px;
  color: var(--mint);
  background: rgba(167, 239, 196, 0.025);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  font-size: 22px;
  font-weight: 760;
}
.identity-brand > span:last-child { display: grid; gap: 2px; }
.identity-brand strong { font-size: 15px; letter-spacing: 0.12em; }
.identity-brand small { color: #78827d; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.identity-live { display: inline-flex; align-items: center; gap: 8px; color: #8e9993; font-size: 10px; font-weight: 800; letter-spacing: 0.13em; }
.identity-live i,
.login-context > i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-strong); box-shadow: 0 0 0 5px rgba(107, 226, 161, 0.07), 0 0 18px rgba(107, 226, 161, 0.24); }

.identity-copy { position: relative; z-index: 2; max-width: 650px; }
.identity-copy p,
.credential-head p { margin: 0 0 17px; color: var(--mint); font-size: 10px; font-weight: 850; letter-spacing: 0.2em; }
.identity-copy h1 { margin: 0 0 24px; font-size: clamp(48px, 5.4vw, 76px); line-height: 0.94; letter-spacing: -0.068em; }
.identity-copy h1 em { color: var(--mint); font-style: normal; font-weight: inherit; }
.identity-copy > span,
.credential-head > span:last-child { display: block; max-width: 560px; color: var(--muted); font-size: 14px; line-height: 1.72; }

.ecosystem-map { position: absolute; z-index: 1; width: 240px; height: 240px; right: 30px; top: 50%; border: 1px solid rgba(167, 239, 196, 0.08); border-radius: 50%; opacity: 0.62; transform: translateY(-28%); }
.ecosystem-map::before,
.ecosystem-map::after { position: absolute; inset: 37px; border: 1px solid rgba(167, 239, 196, 0.08); border-radius: inherit; content: ""; }
.ecosystem-map::after { inset: 84px; background: rgba(167, 239, 196, 0.025); }
.ecosystem-core,
.service { position: absolute; z-index: 2; }
.ecosystem-core { inset: 50%; color: var(--mint); font-size: 18px; font-weight: 800; transform: translate(-50%, -50%); }
.service { color: #7d8e84; font-size: 10px; font-weight: 850; letter-spacing: 0.12em; }
.service-reactor { top: 10px; left: 50%; transform: translateX(-50%); }
.service-atlas { top: 50%; right: -14px; }
.service-consensus { bottom: 8px; left: 50%; transform: translateX(-50%); }
.service-sgl { top: 50%; left: -5px; }

.community-card { position: relative; z-index: 3; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 17px 18px; border: 1px solid rgba(167, 239, 196, 0.12); border-radius: 18px; background: rgba(167, 239, 196, 0.035); }
.community-symbol { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(215, 189, 121, 0.25); border-radius: 12px; color: var(--gold); background: rgba(215, 189, 121, 0.04); }
.community-card div { display: grid; gap: 3px; }
.community-card small { color: var(--mint); font-size: 10px; font-weight: 850; letter-spacing: 0.14em; }
.community-card strong { font-size: 13px; }
.community-card p { margin: 0; color: #87918c; font-size: 10px; line-height: 1.5; }
.community-card code { color: #c5d5ca; }
.community-card > a { display: inline-flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 14px; border: 1px solid rgba(167, 239, 196, 0.18); border-radius: 12px; color: #eaf5ed; text-decoration: none; font-size: 10px; font-weight: 800; transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease); }
.community-card > a:hover { border-color: rgba(167, 239, 196, 0.42); background: rgba(167, 239, 196, 0.06); transform: translateY(-1px); }

.credential-panel { display: grid; align-content: center; background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 20%), rgba(7, 10, 11, 0.82); }
.credential-panel::before { position: absolute; width: 1px; inset: 24px auto 24px 0; background: linear-gradient(transparent, rgba(167, 239, 196, 0.15), transparent); content: ""; }
.credential-topline { position: absolute; inset: 32px clamp(30px, 4.5vw, 64px) auto; color: #68716d; font-size: 10px; font-weight: 850; letter-spacing: 0.13em; }
.credential-topline a { color: #8a958f; text-decoration: none; letter-spacing: 0.02em; }
.credential-topline a:hover { color: var(--mint); }
.credential-mark { margin-bottom: 29px; }
.credential-head h2 { margin: 0 0 13px; color: var(--paper); font-size: clamp(34px, 3.4vw, 45px); line-height: 1; letter-spacing: -0.052em; white-space: nowrap; }

form { display: grid; gap: 17px; margin-top: 32px; }
label { display: grid; gap: 8px; }
label > span:first-child { color: #b9c0bc; font-size: 11px; font-weight: 760; }
input { width: 100%; height: 55px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; outline: none; color: var(--text); background: rgba(255, 255, 255, 0.027); box-shadow: inset 0 1px rgba(255, 255, 255, 0.012); font: inherit; font-size: 15px; transition: border-color 170ms ease, box-shadow 170ms ease, background 170ms ease; }
input:hover { border-color: rgba(239, 244, 237, 0.16); }
input:focus { border-color: rgba(167, 239, 196, 0.48); background: rgba(167, 239, 196, 0.025); box-shadow: 0 0 0 4px rgba(167, 239, 196, 0.055); }
.pin-field { position: relative; }
.pin-field input { padding-right: 52px; letter-spacing: 0.22em; }
.pin-field button { position: absolute; top: 7px; right: 7px; width: 40px; height: 40px; border: 0; border-radius: 10px; color: var(--mint); background: transparent; cursor: pointer; }
.pin-field button:hover { background: rgba(167, 239, 196, 0.05); }

.login-submit { display: flex; min-height: 57px; align-items: center; justify-content: space-between; margin-top: 5px; padding: 0 19px; border: 1px solid var(--mint); border-radius: 14px; color: #07110b; background: linear-gradient(110deg, #b7f4cd, #8ceab3); box-shadow: 0 12px 35px rgba(89, 201, 139, 0.09); font: inherit; font-size: 10px; font-weight: 900; letter-spacing: 0.13em; cursor: pointer; transition: box-shadow 180ms ease, transform 180ms var(--ease), filter 180ms ease; }
.login-submit:hover { box-shadow: 0 17px 42px rgba(89, 201, 139, 0.16); filter: brightness(1.04); transform: translateY(-2px); }
.login-submit i { font-size: 20px; font-style: normal; transition: transform 180ms var(--ease); }
.login-submit:hover i { transform: translateX(3px); }
.submitting .login-submit { opacity: 0.68; cursor: wait; transform: none; }
.login-feedback { padding: 12px 14px; border: 1px solid rgba(255, 140, 133, 0.2); border-radius: 12px; color: #ffaca6; background: rgba(255, 140, 133, 0.055); font-size: 12px; }

.login-context { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding: 13px 14px; border: 1px solid rgba(167, 239, 196, 0.08); border-radius: 13px; background: rgba(167, 239, 196, 0.022); }
.login-context span { display: grid; gap: 2px; }
.login-context b { color: #bec9c2; font-size: 10px; }
.login-context small { color: #707a75; font-size: 10px; line-height: 1.35; }
.credential-footer { display: grid; gap: 6px; margin-top: 25px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.credential-footer a { width: max-content; max-width: 100%; color: #c4cec8; text-decoration: none; font-weight: 700; }
.credential-footer a:hover { color: var(--mint); }
.credential-footer i { color: var(--gold); font-style: normal; }

@media (prefers-reduced-motion: no-preference) {
  .login-shell { animation: shell-in 760ms var(--ease) both; }
  .identity-copy > * { animation: reveal-up 720ms var(--ease) both; }
  .identity-copy h1 { animation-delay: 70ms; }
  .identity-copy > span { animation-delay: 130ms; }
  .community-card { animation: reveal-up 780ms 180ms var(--ease) both; }
  .ecosystem-map { animation: map-breathe 8s ease-in-out infinite; }
  .identity-live i,
  .login-context > i { animation: status-pulse 2.1s ease-out infinite; }
  .star-one { animation: star-drift 8s ease-in-out infinite; }
  .star-two { animation: star-drift 11s 1s ease-in-out infinite reverse; }
  .star-three { animation: star-drift 9s 0.4s ease-in-out infinite; }
}

@keyframes shell-in { from { opacity: 0; transform: translateY(16px) scale(0.992); } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(16px); } }
@keyframes map-breathe {
  0%, 100% { opacity: 0.45; transform: translateY(-28%) scale(0.98); }
  50% { opacity: 0.7; transform: translateY(-28%) scale(1.02); }
}
@keyframes status-pulse { 75% { box-shadow: 0 0 0 12px rgba(107, 226, 161, 0), 0 0 18px rgba(107, 226, 161, 0.12); } }
@keyframes star-drift {
  0%, 100% { opacity: 0.35; transform: translate3d(0, 0, 0) scale(0.8); }
  50% { opacity: 0.9; transform: translate3d(8px, -11px, 0) scale(1.2); }
}

@media (max-width: 980px) {
  .login-shell { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr); }
  .ecosystem-map { opacity: 0.25; right: -70px; }
  .community-card { grid-template-columns: auto 1fr; }
  .community-card > a { grid-column: 2; width: max-content; }
}

@media (max-width: 760px) {
  .login-shell { width: min(100% - 20px, 620px); grid-template-columns: 1fr; margin: 10px auto; border-radius: 24px; }
  .identity-panel { min-height: 470px; gap: 28px; }
  .identity-copy h1 { font-size: clamp(43px, 13vw, 64px); }
  .identity-copy > span { max-width: 520px; font-size: 13px; }
  .ecosystem-map { right: -80px; top: 52%; }
  .credential-panel { min-height: 650px; padding-top: 92px; }
  .credential-panel::before { width: auto; height: 1px; inset: 0 20px auto; background: linear-gradient(90deg, transparent, rgba(167, 239, 196, 0.15), transparent); }
}

@media (max-width: 480px) {
  .identity-panel,
  .credential-panel { padding: 27px 22px; }
  .identity-panel { min-height: 510px; }
  .identity-live { display: none; }
  .identity-copy h1 { font-size: 45px; }
  .identity-copy > span { font-size: 12px; }
  .community-card { grid-template-columns: auto 1fr; padding: 15px; }
  .community-card p { display: none; }
  .community-card > a { grid-column: 1 / -1; justify-content: center; }
  .credential-panel { min-height: 630px; padding-top: 84px; }
  .credential-topline { inset: 28px 22px auto; }
  .credential-topline > span { display: none; }
  .credential-topline a { margin-left: auto; }
  .credential-head h2 { font-size: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
