/* Radiant Dashboard - Modern UI Enhancements */

/* Custom Tailwind utilities and components */
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

/* Custom CSS Variables for Radiant Theme */
:root {
  --radiant-primary: #6366f1;
  --radiant-primary-dark: #4f46e5;
  --radiant-secondary: #8b5cf6;
  --radiant-accent: #06b6d4;
  --radiant-success: #10b981;
  --radiant-warning: #f59e0b;
  --radiant-error: #ef4444;
  --radiant-surface: #ffffff;
  --radiant-surface-dark: #1f2937;
  --radiant-text: #111827;
  --radiant-text-dark: #f9fafb;
}

/* Dark mode variables */
.dark {
  --radiant-surface: #1f2937;
  --radiant-text: #f9fafb;
}

/* Custom gradient backgrounds */
.bg-radiant-gradient {
  background: linear-gradient(135deg, var(--radiant-primary) 0%, var(--radiant-secondary) 100%);
}

.bg-radiant-gradient-subtle {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

/* Enhanced card hover effects */
.card-hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift: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);
}

/* Smooth transitions for all interactive elements */
* {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

/* Custom scrollbar for sidebar */
.sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.3);
  border-radius: 2px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 163, 175, 0.5);
}

/* Enhanced button styles */
.btn-radiant {
  @apply inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-lg shadow-sm;
  @apply bg-gradient-to-r from-indigo-600 to-purple-600 text-white;
  @apply hover:from-indigo-700 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500;
  @apply transition-all duration-200 transform hover:scale-105;
}

.btn-radiant-outline {
  @apply inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-lg;
  @apply bg-white text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500;
  @apply dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700;
}

/* Status indicators */
.status-active {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800;
  @apply dark:bg-green-900/20 dark:text-green-400;
}

.status-pending {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800;
  @apply dark:bg-yellow-900/20 dark:text-yellow-400;
}

.status-suspended {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800;
  @apply dark:bg-red-900/20 dark:text-red-400;
}

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

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

/* Fade in animation */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide in animation for sidebar */
.slide-in-left {
  animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Enhanced focus styles */
.focus-ring {
  @apply focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500;
  @apply dark:focus:ring-offset-gray-800;
}

/* Glass morphism effect */
.glass-effect {
  backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(209, 213, 219, 0.3);
}

.dark .glass-effect {
  background-color: rgba(31, 41, 55, 0.75);
  border-color: rgba(75, 85, 99, 0.3);
}

/* Custom grid layouts */
.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Enhanced shadows */
.shadow-radiant {
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.1), 0 2px 4px -1px rgba(99, 102, 241, 0.06);
}

.shadow-radiant-lg {
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.1), 0 4px 6px -2px rgba(99, 102, 241, 0.05);
}

/* Responsive text scaling */
.text-responsive {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
}

.text-responsive-lg {
  font-size: clamp(1.125rem, 3vw, 1.25rem);
}

.text-responsive-xl {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

/* Custom border gradients */
.border-gradient {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--radiant-primary), var(--radiant-secondary)) border-box;
}

.dark .border-gradient {
  background: linear-gradient(rgb(31, 41, 55), rgb(31, 41, 55)) padding-box,
              linear-gradient(135deg, var(--radiant-primary), var(--radiant-secondary)) border-box;
}

/* Mobile-first responsive utilities */
@media (max-width: 640px) {
  .mobile-stack > * + * {
    margin-top: 1rem;
  }
  
  .mobile-full {
    width: 100% !important;
  }
  
  .mobile-center {
    text-align: center !important;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-break-before {
    break-before: page;
  }
  
  .print-break-after {
    break-after: page;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card-hover-lift {
    border: 2px solid currentColor;
  }
  
  .btn-radiant {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .card-hover-lift:hover {
    transform: none;
  }
}

/* Custom utilities for spacing */
.space-y-safe > * + * {
  margin-top: max(1rem, env(safe-area-inset-top));
}

.px-safe {
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

/* Enhanced table styles */
.table-radiant {
  @apply w-full text-sm text-left text-gray-500 dark:text-gray-400;
}

.table-radiant thead {
  @apply text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400;
}

.table-radiant tbody tr {
  @apply bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600;
}

.table-radiant tbody td {
  @apply px-6 py-4;
}

/* Custom form styles */
.form-radiant {
  @apply block w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm;
  @apply focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent;
  @apply dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:focus:ring-indigo-400;
}

.form-radiant:invalid {
  @apply border-red-300 focus:ring-red-500 focus:border-red-500;
}

/* Notification styles */
.notification-success {
  @apply bg-green-50 border border-green-200 text-green-800 dark:bg-green-900/20 dark:border-green-800 dark:text-green-400;
}

.notification-warning {
  @apply bg-yellow-50 border border-yellow-200 text-yellow-800 dark:bg-yellow-900/20 dark:border-yellow-800 dark:text-yellow-400;
}

.notification-error {
  @apply bg-red-50 border border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-400;
}

.notification-info {
  @apply bg-blue-50 border border-blue-200 text-blue-800 dark:bg-blue-900/20 dark:border-blue-800 dark:text-blue-400;
}
