/* Invomera — premium auth (login + registration) */

:root {
  --auth-brand: #56bbff;
  --auth-brand-dark: #2596d8;
  --auth-brand-glow: rgba(86, 187, 255, 0.45);
  --auth-bg-deep: #020617;
  --auth-bg-mid: #0b1120;
  --auth-surface: #0f172a;
  --auth-border: rgba(148, 163, 184, 0.22);
  --auth-text: #f1f5f9;
  --auth-muted: #94a3b8;
}

/* ── Animated background orbs ── */
.auth-hero__orbs,
.auth-panel__orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  will-change: transform;
}

.auth-orb--1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: -8%;
  right: -5%;
  animation: auth-float-1 14s ease-in-out infinite;
}

.auth-orb--2 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  bottom: 15%;
  left: -8%;
  animation: auth-float-2 18s ease-in-out infinite;
}

.auth-orb--3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  top: 45%;
  right: 20%;
  animation: auth-float-3 12s ease-in-out infinite;
  opacity: 0.35;
}

.auth-panel__orbs .auth-orb--1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: -5%;
  animation-duration: 16s;
}

.auth-panel__orbs .auth-orb--2 {
  width: 160px;
  height: 160px;
  bottom: 20%;
  right: -3%;
  animation-duration: 20s;
}

@keyframes auth-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-24px, 32px) scale(1.08); }
  66% { transform: translate(18px, -20px) scale(0.95); }
}

@keyframes auth-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(28px, -24px) scale(1.1); }
}

@keyframes auth-float-3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-16px, 20px); }
}

/* Moving grid overlay */
.auth-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(86, 187, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 187, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 85%);
  animation: auth-grid-drift 40s linear infinite;
  z-index: 0;
}

@keyframes auth-grid-drift {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

/* Shimmer line on hero */
.auth-hero__shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.04) 50%, transparent 60%);
  animation: auth-shine 8s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes auth-shine {
  0%, 100% { left: -100%; }
  50% { left: 120%; }
}

/* Card entrance */
.auth-card {
  animation: auth-card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--auth-brand), #06b6d4, #8b5cf6, var(--auth-brand));
  background-size: 200% 100%;
  animation: auth-gradient-line 4s linear infinite;
}

@keyframes auth-gradient-line {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-panel__card {
  animation: auth-panel-in 0.5s ease-out both;
  position: relative;
  z-index: 1;
}

@keyframes auth-panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero content stagger */
.auth-hero__inner > * {
  animation: auth-fade-up 0.7s ease-out both;
}

.auth-hero__inner > *:nth-child(1) { animation-delay: 0.05s; }
.auth-hero__inner > *:nth-child(2) { animation-delay: 0.12s; }
.auth-hero__inner > *:nth-child(3) { animation-delay: 0.19s; }
.auth-hero__inner > *:nth-child(4) { animation-delay: 0.26s; }
.auth-hero__inner > *:nth-child(5) { animation-delay: 0.33s; }
.auth-hero__inner > *:nth-child(6) { animation-delay: 0.4s; }

@keyframes auth-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-hero__features li {
  animation: auth-fade-up 0.5s ease-out both;
}

.auth-hero__features li:nth-child(1) { animation-delay: 0.35s; }
.auth-hero__features li:nth-child(2) { animation-delay: 0.42s; }
.auth-hero__features li:nth-child(3) { animation-delay: 0.49s; }
.auth-hero__features li:nth-child(4) { animation-delay: 0.56s; }

/* Demo card hover glow */
.auth-demo-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}

.auth-demo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(86, 187, 255, 0.45);
  box-shadow: 0 16px 40px rgba(86, 187, 255, 0.12);
}

/* Premium button shimmer */
.auth-btn {
  position: relative;
  overflow: hidden;
}

.auth-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: auth-btn-shimmer 3.5s ease-in-out infinite;
}

@keyframes auth-btn-shimmer {
  0%, 100% { left: -120%; }
  50% { left: 140%; }
}

/* Input focus pulse */
.auth-input:focus {
  animation: auth-input-glow 2s ease-in-out infinite;
}

@keyframes auth-input-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(86, 187, 255, 0.2); }
  50% { box-shadow: 0 0 0 4px rgba(86, 187, 255, 0.28); }
}

/* Logo subtle float */
.auth-hero__brand img,
.auth-panel__mobile-brand img {
  animation: auth-logo-float 4s ease-in-out infinite;
}

@keyframes auth-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Trust badges row */
.auth-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.auth-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(8px);
}

.auth-trust-pill i {
  color: var(--auth-brand);
  font-size: 0.7rem;
}

/* Panel position for orbs */
.auth-panel {
  position: relative;
  overflow: hidden;
}

/* Registration steps pulse */
.reg-step.is-active {
  animation: reg-step-pulse 2.5s ease-in-out infinite;
}

@keyframes reg-step-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(86, 187, 255, 0); }
  50% { box-shadow: 0 0 0 4px rgba(86, 187, 255, 0.15); }
}

/* ── Switch CTA (login ↔ register) — always visible at top ── */
.auth-switch-cta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(135deg, rgba(86, 187, 255, 0.14), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(86, 187, 255, 0.35);
  box-shadow: 0 8px 24px rgba(86, 187, 255, 0.12);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.auth-switch-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(86, 187, 255, 0.55);
  box-shadow: 0 12px 32px rgba(86, 187, 255, 0.2);
  color: inherit;
}

.auth-switch-cta__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #56bbff, #2596d8);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 6px 16px rgba(86, 187, 255, 0.35);
}

.auth-switch-cta__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.auth-switch-cta__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.auth-switch-cta__action {
  font-size: 0.92rem;
  font-weight: 700;
  color: #e0f2fe;
  line-height: 1.35;
}

.auth-switch-cta__arrow {
  flex-shrink: 0;
  color: #56bbff;
  font-size: 0.95rem;
  transition: transform 0.2s;
}

.auth-switch-cta:hover .auth-switch-cta__arrow {
  transform: translateX(4px);
}

/* Sticky bottom bar — always visible */
.auth-sticky-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 0.65rem 1.25rem;
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  background: rgba(2, 6, 23, 0.96);
  border-top: 1px solid rgba(86, 187, 255, 0.35);
  backdrop-filter: blur(14px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}

body.auth-body {
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
}

.auth-sticky-bar__text {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.auth-sticky-bar__text strong {
  display: block;
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-sticky-bar__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #56bbff, #2596d8);
  box-shadow: 0 6px 20px rgba(86, 187, 255, 0.4);
  white-space: nowrap;
  transition: transform 0.15s;
}

.auth-sticky-bar__btn:hover {
  transform: translateY(-1px);
  color: #fff;
}

.auth-mobile-demo {
  display: none !important;
}

@media (min-width: 992px) {
  .auth-sticky-bar {
    left: 50%;
    right: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Language toggle */
.auth-lang-toggle {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.22);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.auth-lang-btn {
  flex: 1;
  border: none;
  border-radius: 9px;
  padding: 0.45rem 0.75rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: #94a3b8;
  background: transparent;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.auth-lang-btn:hover {
  color: #e2e8f0;
}

.auth-lang-btn.is-active {
  background: linear-gradient(135deg, #56bbff, #2596d8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(86, 187, 255, 0.35);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .auth-orb,
  .auth-hero__grid,
  .auth-hero__shine,
  .auth-card,
  .auth-card::before,
  .auth-btn::after,
  .auth-input:focus,
  .auth-hero__brand img,
  .reg-step.is-active {
    animation: none !important;
  }
}
