/* RepSpheres Business Plan Auth Modal */
/* Same styling as CRM GlobalAuthModal */

#auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
}

#auth-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-container {
  position: relative;
  width: 90%;
  max-width: 450px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(159, 88, 250, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Animated Starfield Background */
#auth-modal .starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

#auth-modal .stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, white, transparent),
    radial-gradient(1px 1px at 50% 50%, white, transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(2px 2px at 90% 60%, white, transparent),
    radial-gradient(1px 1px at 33% 85%, white, transparent),
    radial-gradient(2px 2px at 75% 20%, white, transparent);
  background-size: 200% 200%;
  background-position: 0% 0%;
  animation: twinkle 20s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Logo Section */
.auth-logo-section {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 0 20px rgba(159, 88, 250, 0.5));
}

.auth-logo-icon svg {
  width: 100%;
  height: 100%;
}

.auth-logo-title {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-logo-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.5px;
}

/* Social Button */
.auth-social-btn {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  border: 2px solid rgba(159, 88, 250, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-social-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.15),
    0 0 0 2px rgba(159, 88, 250, 0.4);
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
}

.auth-social-btn:active {
  transform: translateY(0);
}

.auth-social-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-social-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.auth-modal-footer {
  margin-top: 32px;
  text-align: center;
}

.auth-security-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.auth-led-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4bd48e;
  box-shadow: 0 0 8px rgba(75, 212, 142, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Decorative Elements */
.auth-power-rail {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-power-node {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(159, 88, 250, 0.6);
  box-shadow: 0 0 8px rgba(159, 88, 250, 0.4);
}

/* Screws */
.auth-screw {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #666, #333);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.5);
}

.auth-screw::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 60%;
  height: 1px;
  background: rgba(0, 0, 0, 0.3);
}

.auth-screw::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 60%;
  height: 1px;
  background: rgba(0, 0, 0, 0.3);
}

.auth-screw-tl { top: 16px; left: 16px; }
.auth-screw-tr { top: 16px; right: 16px; }
.auth-screw-bl { bottom: 16px; left: 16px; }
.auth-screw-br { bottom: 16px; right: 16px; }

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loading-overlay .loading-content {
  text-align: center;
  color: white;
}

#loading-overlay .loading-jewel {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#loading-overlay .loading-text {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
}

/* Protected Content */
#protected-content {
  display: none;
}

/* Access Denied Message */
.access-denied-box {
  background: rgba(211, 47, 47, 0.1);
  border: 1px solid rgba(211, 47, 47, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
}

.access-denied-box h3 {
  color: #ff6b6b;
  font-size: 18px;
  margin-bottom: 8px;
}

.access-denied-box p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-modal-container {
    width: 95%;
    padding: 36px 24px;
  }

  .auth-logo-title {
    font-size: 24px;
  }

  .auth-social-btn {
    height: 52px;
    font-size: 15px;
  }
}
