/* ==========================================================================
   Auth pages -- split screen. Left/start side: an animated visual of
   tokens orbiting a core, directly illustrating "your tokens, tracked in
   real time" rather than a generic illustration -- this is the signature
   element for these pages specifically. Right/end side: the actual form,
   kept quiet and precise so it doesn't compete with the visual.
   ========================================================================== */

.auth-body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}

/* ---- Visual side ---- */
.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  background:
    radial-gradient(ellipse 70% 60% at 30% 20%, rgba(124, 58, 237, 0.35), transparent 60%),
    linear-gradient(160deg, #120A1F, #0B0612 70%);
  overflow: hidden;
}

.auth-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  z-index: 2;
}

.auth-orbit {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-ring {
  position: absolute;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}
.orbit-ring-1 { width: 280px; height: 280px; animation: orbit-spin 28s linear infinite; }
.orbit-ring-2 { width: 420px; height: 420px; border-color: var(--border); animation: orbit-spin 44s linear infinite reverse; }

.orbit-core {
  position: relative;
  z-index: 3;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-dim));
  box-shadow: 0 0 60px -10px rgba(124, 58, 237, 0.8), 0 0 0 1px rgba(255,255,255,0.08) inset;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.orbit-core-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; }
.orbit-core-label { font-size: 0.7rem; color: rgba(255,255,255,0.8); margin-top: 4px; }

.orbit-token {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  font-size: 0.8rem;
  white-space: nowrap;
  box-shadow: 0 8px 24px -12px rgba(0,0,0,0.7);
}
[dir="rtl"] .orbit-token { padding: 8px 10px 8px 14px; }

.orbit-token-1 { animation: float-1 7s ease-in-out infinite; top: 12%; inset-inline-start: 8%; }
.orbit-token-2 { animation: float-2 8.5s ease-in-out infinite; bottom: 16%; inset-inline-end: 4%; }
.orbit-token-3 { animation: float-3 6.5s ease-in-out infinite; bottom: 8%; inset-inline-start: 14%; }

.orbit-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.orbit-dot.online { background: var(--gold); box-shadow: 0 0 8px 1px var(--gold); }
.orbit-dot.offline { background: var(--text-dim); }

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes float-1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes float-2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
@keyframes float-3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .orbit-ring, .orbit-token { animation: none; }
}

.auth-visual-caption {
  position: relative;
  z-index: 2;
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 420px;
  margin: 0;
}

/* ---- Form side ---- */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
}

.auth-form-inner {
  width: 100%;
  max-width: 380px;
}

.auth-lang-toggle {
  position: absolute;
  top: 32px;
  inset-inline-end: 32px;
}
.auth-lang-toggle a {
  font-size: 0.82rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
}
.auth-lang-toggle a:hover { color: var(--lavender); border-color: var(--border-strong); }

.auth-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.auth-subtitle {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0 0 32px;
}

.auth-error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #FCA5A5;
  font-size: 0.86rem;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field span { font-size: 0.82rem; color: var(--text-dim); }
.auth-field input {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--purple-glow);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.auth-checkbox input { accent-color: var(--purple); }

.auth-submit { width: 100%; margin-top: 6px; }

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.auth-switch a { color: var(--lavender); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { min-height: 280px; padding: 32px; }
  .auth-orbit { display: none; }
}
