/* 
  Enterprise-Grade AI Lead Intelligence System v2.0 Styling
  Theme: Modern Ultra-Sleek Glassmorphism Dark Mode
*/

@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

:root {
  --bg-dark: #090D16;
  --panel-dark: #0F172A;
  --accent-indigo: #6366F1;
  --accent-blue: #3B82F6;
  --accent-cyan: #06B6D4;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-rose: #F43F5E;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #090D16;
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Base Body Styles */
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: #F8FAFC;
  min-height: 100vh;
  overflow-x: hidden;
}

.font-outfit {
  font-family: 'Outfit', sans-serif;
}

/* Glassmorphism utility */
.glass-panel {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Navigation Item Styling */
.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
  color: #FFFFFF;
  border-left: 3px solid #6366F1;
  font-weight: 600;
}

/* Score Badges */
.badge-hot {
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.badge-qualified {
  background: rgba(59, 130, 246, 0.12);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-nurture,
.badge-warm {
  background: rgba(6, 182, 212, 0.12);
  color: #22D3EE;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-low {
  background: rgba(100, 116, 139, 0.12);
  color: #94A3B8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Pipeline Stage Cards */
.stage-card {
  transition: all 0.25s ease-in-out;
}

.stage-card.stage-running {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.15);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
  animation: pulseGlow 1.5s infinite alternate;
}

.stage-card.stage-complete {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}

.stage-card.stage-complete .stage-icon-bg {
  background: #10B981;
  color: #FFFFFF;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.2); }
  100% { box-shadow: 0 0 25px rgba(99, 102, 241, 0.5); }
}

/* Table Hover & Transitions */
tbody tr {
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background-color: rgba(30, 41, 59, 0.6);
}

/* Modal and Drawer Layering Rules to Prevent Dashboard Overlap */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: rgba(4, 7, 14, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
}

.modal-overlay.hidden {
  display: none !important;
}

/* Slide Over Drawer */
#modal-lead-detail {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99998 !important;
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  transition: opacity 0.25s ease-in-out;
}

#modal-lead-detail > div {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#modal-lead-detail.open > div {
  transform: translateX(0);
}

/* Fullscreen Deep Dive Report Modal */
#modal-deep-dive {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: #090D16 !important;
  overflow-y: auto !important;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success {
  background: #064E3B;
  color: #34D399;
  border: 1px solid #059669;
}

.toast-error {
  background: #7F1D1D;
  color: #FCA5A5;
  border: 1px solid #DC2626;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Mobile Responsive Tweaks */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    width: 100%;
    z-index: 9000;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  main {
    padding-bottom: 70px;
  }
}
