/* ============================================================
   AEGISX — Auth Pages Stylesheet
   Neurotex Labs | 2026
   Login & Signup Premium Design
   ============================================================ */

/* ---------- Auth Page Layout ---------- */
.auth-page {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}

/* ---------- Animated Background Orbs ---------- */
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.auth-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
  top: -15%;
  left: -10%;
  animation: auth-orb-float-1 15s ease-in-out infinite alternate;
}

.auth-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
  bottom: -10%;
  right: -10%;
  animation: auth-orb-float-2 18s ease-in-out infinite alternate;
}

.auth-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.04) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: auth-orb-float-3 12s ease-in-out infinite alternate;
}

@keyframes auth-orb-float-1 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(40px, 30px) scale(1.1); opacity: 0.8; }
  100% { transform: translate(-20px, 50px) scale(0.95); opacity: 0.6; }
}

@keyframes auth-orb-float-2 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  50% { transform: translate(-30px, -40px) scale(1.15); opacity: 0.7; }
  100% { transform: translate(20px, -20px) scale(0.9); opacity: 0.5; }
}

@keyframes auth-orb-float-3 {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.6; }
}

/* ---------- Decorative Grid Lines ---------- */
.auth-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.3) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 30%, transparent 70%);
}

/* ---------- Auth Container ---------- */
.auth-container {
  display: grid;
  grid-template-columns: 420px 480px;
  gap: 0;
  max-width: 900px;
  width: 100%;
  position: relative;
  z-index: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 120px rgba(0, 229, 255, 0.03);
}

/* ---------- Brand Panel (Left) ---------- */
.auth-brand {
  background:
    linear-gradient(145deg, rgba(0, 229, 255, 0.04) 0%, rgba(139, 92, 246, 0.03) 50%, rgba(0, 0, 0, 0) 100%),
    rgba(8, 13, 28, 0.95);
  padding: var(--space-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 229, 255, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.auth-brand-content {
  position: relative;
  z-index: 1;
}

/* Brand Icon / Lock Visual */
.auth-brand-icon {
  margin-bottom: var(--space-xl);
}

.auth-icon-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 229, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: auth-ring-pulse 4s ease-in-out infinite;
}

.auth-icon-ring-inner {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.12);
  animation: ring-rotate 20s linear infinite reverse;
}

.auth-icon-core {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.12) 0%, rgba(139, 92, 246, 0.06) 60%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.3));
}

@keyframes auth-ring-pulse {
  0%, 100% { border-color: rgba(0, 229, 255, 0.15); box-shadow: 0 0 20px rgba(0, 229, 255, 0.05); }
  50% { border-color: rgba(0, 229, 255, 0.25); box-shadow: 0 0 30px rgba(0, 229, 255, 0.1); }
}

.auth-brand-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
  filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.15));
}

.auth-brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  font-weight: 400;
}

.auth-brand-divider {
  width: 60px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  margin: var(--space-xl) 0;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
  position: relative;
}

.auth-brand-divider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: inherit;
  filter: blur(4px);
  opacity: 0.6;
}

/* Feature list */
.auth-brand-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: var(--space-xl);
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease-out);
}

.auth-feature-item:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

.auth-feature-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

.auth-feature-item:nth-child(2) .auth-feature-dot {
  animation-delay: 0.5s;
  background: var(--purple);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.auth-feature-item:nth-child(3) .auth-feature-dot {
  animation-delay: 1s;
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.auth-feature-item:nth-child(4) .auth-feature-dot {
  animation-delay: 1.5s;
}

/* Status Indicator */
.auth-brand-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.1);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.auth-brand-status strong {
  color: var(--emerald);
}

.auth-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ---------- Form Panel (Right) ---------- */
.auth-form-panel {
  background: rgba(12, 18, 37, 0.9);
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  padding: var(--space-2xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.auth-form-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.1), rgba(139, 92, 246, 0.08), transparent);
}

.auth-form-inner {
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

/* Form Header */
.auth-form-header {
  margin-bottom: var(--space-xl);
}

.auth-form-header h2 {
  font-size: 1.6rem;
  margin-bottom: var(--space-sm);
  text-align: left;
}

.auth-form-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- Form Styles ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.auth-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-input-group label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-forgot-link {
  font-size: 0.75rem;
  color: var(--cyan);
  opacity: 0.7;
  transition: opacity 0.3s var(--ease-out);
  text-transform: none;
  font-weight: 400;
}

.auth-forgot-link:hover {
  opacity: 1;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Input Wrapper */
.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  transition: color 0.3s var(--ease-out);
  pointer-events: none;
  z-index: 2;
}

.auth-input-wrapper.focused .auth-input-icon {
  color: var(--cyan);
}

.auth-input-wrapper input {
  width: 100%;
  padding: 13px 14px 13px 44px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.4s var(--ease-out);
}

.auth-input-wrapper input:focus {
  border-color: rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.03);
  box-shadow:
    0 0 0 3px rgba(0, 229, 255, 0.06),
    0 0 20px rgba(0, 229, 255, 0.04),
    inset 0 0 20px rgba(0, 229, 255, 0.02);
}

.auth-input-wrapper input::placeholder {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Toggle Password Button */
.auth-toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s var(--ease-out);
  z-index: 2;
}

.auth-toggle-password:hover,
.auth-toggle-password.active {
  color: var(--cyan);
}

/* Password Strength */
.auth-password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.auth-strength-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}

.auth-strength-bar {
  height: 3px;
  flex: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.4s var(--ease-out);
}

.auth-strength-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  min-width: 100px;
  text-align: right;
  transition: color 0.3s var(--ease-out);
}

/* Checkbox */
.auth-remember-row {
  display: flex;
  align-items: center;
}

.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary);
  user-select: none;
  line-height: 1.4;
}

.auth-checkbox-label input[type="checkbox"] {
  display: none;
}

.auth-checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
  flex-shrink: 0;
  position: relative;
}

.auth-checkbox-custom::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s var(--ease-spring);
}

.auth-checkbox-label input[type="checkbox"]:checked + .auth-checkbox-custom {
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.06);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

.auth-checkbox-label input[type="checkbox"]:checked + .auth-checkbox-custom::after {
  opacity: 1;
  transform: scale(1);
}

.auth-terms-link {
  color: var(--cyan);
  opacity: 0.8;
  transition: opacity 0.3s;
}

.auth-terms-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ---------- Submit Button ---------- */
.auth-submit-btn {
  width: 100%;
  justify-content: center;
  padding: 15px 30px;
  font-size: 0.92rem;
  position: relative;
  overflow: hidden;
}

.auth-btn-text {
  transition: all 0.4s var(--ease-out);
}

.auth-btn-arrow {
  transition: all 0.4s var(--ease-out);
  font-size: 1.1rem;
}

.auth-submit-btn:hover .auth-btn-arrow {
  transform: translateX(4px);
}

.auth-btn-loader {
  position: absolute;
  display: none;
  animation: spin 1s linear infinite;
}

/* Loading state */
.auth-submit-btn.loading .auth-btn-text,
.auth-submit-btn.loading .auth-btn-arrow {
  opacity: 0;
  transform: translateY(10px);
}

.auth-submit-btn.loading .auth-btn-loader {
  display: block;
}

/* Success state */
.auth-submit-btn.success {
  background: linear-gradient(135deg, var(--emerald) 0%, #00e5ff 100%);
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.3);
}

/* ---------- Divider ---------- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.auth-divider span {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ---------- Social Buttons ---------- */
.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.auth-social-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

.auth-social-btn:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.auth-social-btn:hover::before {
  opacity: 1;
}

.auth-social-btn svg {
  flex-shrink: 0;
}

/* ---------- Footer Text ---------- */
.auth-footer-text {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-footer-text a {
  color: var(--cyan);
  font-weight: 500;
  transition: all 0.3s var(--ease-out);
  position: relative;
}

.auth-footer-text a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.3s var(--ease-out);
}

.auth-footer-text a:hover::after {
  width: 100%;
}

.auth-footer-text a:hover {
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* ---------- Auth Notification ---------- */
.auth-notification {
  position: fixed;
  top: 90px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  z-index: 10000;
  opacity: 0;
  transform: translateX(20px) translateY(-10px);
  transition: all 0.4s var(--ease-out);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-width: 400px;
}

.auth-notification.visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

.auth-notification-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--emerald);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.1);
}

.auth-notification-error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: var(--rose);
  box-shadow: 0 8px 32px rgba(244, 63, 94, 0.1);
}

.auth-notification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .auth-container {
    grid-template-columns: 380px 440px;
  }
}

@media (max-width: 900px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .auth-brand {
    display: none;
  }

  .auth-form-panel {
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
  }

  .auth-form-header {
    text-align: center;
  }

  .auth-form-header .section-label {
    display: block;
    text-align: center;
  }

  .auth-form-header h2 {
    text-align: center;
  }

  .auth-form-header p {
    text-align: center;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: var(--space-md);
    align-items: flex-start;
    padding-top: var(--space-xl);
  }

  .auth-form-panel {
    padding: var(--space-lg) var(--space-md);
  }

  .auth-input-row {
    grid-template-columns: 1fr;
  }

  .auth-social-row {
    grid-template-columns: 1fr;
  }

  .auth-submit-btn {
    padding: 14px 24px;
  }

  .auth-container {
    border-radius: var(--radius-lg);
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.04);
  }
}

/* ---------- Scanline Animation (Decorative) ---------- */
.auth-brand::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.15), transparent);
  animation: auth-scanline 6s ease-in-out infinite;
  z-index: 2;
}

@keyframes auth-scanline {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
