/* Custom styles for Medical B2B Dashboard */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Sidebar transitions */
.sidebar-link {
  transition: all 0.2s ease-in-out;
}

.sidebar-link:hover {
  background-color: rgba(59, 130, 246, 0.1);
  border-left: 4px solid #3B82F6;
}

.sidebar-link.active {
  background-color: #3B82F6;
  color: white;
  border-left: 4px solid #1D4ED8;
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Badge styles */
.badge-done {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  margin-left: 8px;
  display: inline-block;
}

/* Loader animation */
.loader {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3B82F6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

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

/* Toast animations */
.toast {
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

/* Modal backdrop */
.modal {
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Chart containers */
.chart-container {
  min-height: 400px;
  position: relative;
}

/* Table hover effects */
table tbody tr {
  transition: background-color 0.15s ease;
}

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

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

/* Pulse animation for notification badge */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Line clamp utility */
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Focus styles */
input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: none;
  ring: 2px;
  ring-color: #3B82F6;
}

/* Transition utilities */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Gradient backgrounds */
.gradient-blue {
  background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
}

.gradient-green {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.gradient-purple {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

/* Responsive utilities */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -280px;
    transition: left 0.3s ease;
    z-index: 40;
  }

  .sidebar.open {
    left: 0;
  }

  .chart-container {
    min-height: 300px;
  }
}

/* Print styles */
@media print {
  .sidebar,
  header,
  button,
  .no-print {
    display: none !important;
  }

  .chart-container {
    break-inside: avoid;
  }
}
