/* Base Styles */
body {
  font-family: "Inter", system-ui, sans-serif;
  margin: 0;
}

/* Sidebar Styles */
.sidebar-collapsed {
  width: 64px !important;
}
.sidebar-expanded {
  width: 220px !important;
}
.sidebar-icon {
  min-width: 2rem;
}
.sidebar-logo {
  transition: opacity 0.2s ease;
}

/* Sidebar Links */
.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #374151;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.sidebar-link:hover {
  background-color: #f3f4f6;
}

.sidebar-link.text-primary-700 {
  color: #1d4ed8;
  font-weight: 600;
}

/* Main Layout */
#mainContent {
  transition: margin-left 0.3s ease;
}

#topHeader {
  transition: left 0.3s ease;
}

main {
  margin-top: 80px;
  padding: 1.5rem;
  min-height: calc(100vh - 80px);
}

/* Mobile Sidebar Behavior */
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    width: 280px !important;
  }

  #sidebar.mobile-open {
    transform: translateX(0);
  }

  #mainContent {
    margin-left: 0 !important;
  }

  #topHeader {
    left: 0 !important;
  }

  /* Responsive Grid */
  .md\:grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .md\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  .sm\:px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Vulnerability Specific Styles */
.bg-red-50 {
  background-color: #fef2f2;
}
.bg-orange-50 {
  background-color: #fff7ed;
}
.bg-yellow-50 {
  background-color: #fefce8;
}
.bg-green-50 {
  background-color: #f0fdf4;
}

/* Table Styles */
.overflow-x-auto {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

tbody tr:hover {
  background-color: #f9fafb;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

/* AI Search Styles */
.ai-search-container {
  position: relative;
}

.ai-search-input {
  padding-right: 3rem;
}

.ai-search-button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-search-button:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-50%) scale(1.05);
}

.ai-search-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: translateY(-50%);
}

.ai-search-loading {
  animation: spin 1s linear infinite;
}

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

.ai-search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
}

.ai-search-suggestion {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

.ai-search-suggestion:hover {
  background-color: #f9fafb;
}

.ai-search-suggestion:last-child {
  border-bottom: none;
}

.ai-search-example {
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
}
