/* uGitSafe Modern - Professional Dashboard Styles */

/* Import Inter font for modern typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Global styles following the color palette */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.5;
  color: #374151; /* grey-700 */
  background-color: #f9fafb; /* grey-50 */
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f3f4f6; /* grey-100 */
}

::-webkit-scrollbar-thumb {
  background: #d1d5db; /* grey-300 */
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af; /* grey-400 */
}

/* Logo animation */
.ugitsafe-logo {
  transition: transform 0.2s ease;
}

.ugitsafe-logo:hover {
  transform: scale(1.05);
}

/* Status indicator pulse animation */
#status-indicator {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Card hover effects */
.bg-white:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

/* Navigation active state enhancement */
.bg-green-600 {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  position: relative;
}

.bg-green-600::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #4ade80;
  border-radius: 0 2px 2px 0;
}

/* Button enhancements */
button {
  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Form input enhancements */
input:focus {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Modal backdrop blur effect */
#scan-modal {
  backdrop-filter: blur(4px);
}

#scan-modal > div {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translate(-50%, -60%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* Stats cards with subtle gradient backgrounds */
.stats-card-1 {
  background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

.stats-card-2 {
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.stats-card-3 {
  background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

.stats-card-4 {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

/* Icon containers with subtle shadows */
.icon-container {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Table styles for audit results */
.audit-table {
  border-collapse: separate;
  border-spacing: 0;
}

.audit-table th {
  background-color: #f9fafb; /* grey-50 */
  border-bottom: 1px solid #e5e7eb; /* grey-200 */
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  color: #374151; /* grey-700 */
}

.audit-table td {
  border-bottom: 1px solid #e5e7eb; /* grey-200 */
  padding: 12px 16px;
  color: #6b7280; /* grey-500 */
}

.audit-table tr:hover {
  background-color: #f9fafb; /* grey-50 */
}

/* Severity badges */
.severity-critical {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.severity-high {
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: white;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.severity-medium {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: white;
  font-weight: 500;
}

.severity-low {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  font-weight: 500;
}

/* Loading states */
.loading-spinner {
  border: 2px solid #f3f4f6; /* grey-100 */
  border-top: 2px solid #22c55e; /* ugitsafe-500 */
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Notification styles */
.notification {
  animation: slideInRight 0.3s ease-out;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

/* Chart container styles */
.chart-container {
  position: relative;
  height: 300px;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
}

/* Activity timeline styles */
.activity-item {
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  padding-left: 16px;
}

.activity-item:hover {
  border-left-color: #22c55e;
  background-color: #f0fff4;
  padding-left: 20px;
}

/* Header search and actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
  .grid-cols-1 {
    gap: 1rem;
  }
  
  .sidebar {
    width: 100%;
    position: absolute;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles would be implemented here */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-grey-50 {
    background-color: #ffffff;
  }
  
  .text-grey-500 {
    color: #000000;
  }
  
  .border-grey-200 {
    border-color: #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
a:focus {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .sidebar,
  .no-print {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* Custom utilities */
.shadow-card {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-card-hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.text-gradient {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Performance optimizations */
.will-change-transform {
  will-change: transform;
}

.gpu-accelerated {
  transform: translateZ(0);
}