/* Modern Dashboard Styles - ZitouniLAB Green Theme */

:root {
  --primary-50: #f0fdf4;
  --primary-100: #dcfce7;
  --primary-200: #bbf7d0;
  --primary-300: #86efac;
  --primary-400: #4ade80;
  --primary-500: #026635;
  --primary-600: #025429;
  --primary-700: #01421f;
  --primary-800: #013318;
  --primary-900: #012714;
}

body {
  background: linear-gradient(135deg, #f1f5f9 0%, #ffffff 50%, #f1f5f9 100%);
  min-height: 100vh;
}

/* Sidebar Styling */
.drawer-side aside {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-right: 1px solid #e2e8f0;
}

/* Card Enhancements */
.card {
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Stats Cards */
.stats .stat {
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  transition: all 0.2s ease;
}

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

/* Icon Containers */
.stat-figure {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-center;
}

/* Primary Color Variants */
.bg-primary-light {
  background-color: rgba(2, 102, 53, 0.1);
  color: var(--primary-600);
}

.bg-amber-light {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.bg-emerald-light {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.bg-violet-light {
  background-color: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

/* Buttons */
.btn {
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  border: none;
  box-shadow: 0 4px 6px -1px rgba(2, 102, 53, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  box-shadow: 0 10px 15px -3px rgba(2, 102, 53, 0.4);
}

/* Tables */
.table {
  border-radius: 1rem;
  overflow: hidden;
}

.table thead {
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.table tbody tr {
  transition: background-color 0.15s ease;
}

.table tbody tr:hover {
  background-color: rgba(2, 102, 53, 0.05);
}

/* Inputs */
.input, .select, .textarea {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(2, 102, 53, 0.1);
}

/* Badges */
.badge {
  border-radius: 9999px;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
}

/* Sidebar Menu */
.menu li > a {
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.menu li > a:hover {
  background-color: rgba(2, 102, 53, 0.1);
  color: var(--primary-600);
}

.menu li > a.active {
  background-color: rgba(2, 102, 53, 0.15);
  color: var(--primary-700);
  box-shadow: 0 1px 3px 0 rgba(2, 102, 53, 0.3);
  border: 1px solid rgba(2, 102, 53, 0.3);
}

/* Logo Container */
.logo-container {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(2, 102, 53, 0.4);
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
}

/* Alert */
.alert {
  border-radius: 0.75rem;
  border: 1px solid;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #059669;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #d97706;
}

.alert-info {
  background-color: rgba(2, 102, 53, 0.1);
  border-color: rgba(2, 102, 53, 0.3);
  color: var(--primary-600);
}

/* Progress Bar */
.progress {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-400) 0%, var(--primary-600) 100%);
  border-radius: 9999px;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.slide-in {
  animation: slideIn 0.4s ease-out;
}

/* Hover animations */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

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

/* Stagger animation for lists */
.stagger-item {
  animation: fadeIn 0.4s ease-out backwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }

/* Shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* ============================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ============================================ */

/* Prevent horizontal scroll globally */
html {
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Ensure all elements respect viewport */
* {
  box-sizing: border-box;
}

/* Main content container */
main {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Grid layouts - Mobile First */
.grid {
  width: 100%;
}

/* Force single column on mobile for detail pages */
@media (max-width: 1023px) {
  /* Force flex-col on mobile */
  .lg\:flex-row {
    flex-direction: column !important;
  }
  
  /* Force full width on mobile */
  .lg\:w-1\/3,
  .lg\:w-2\/3 {
    width: 100% !important;
  }
  
  /* Reduce padding on mobile */
  .lg\:p-8 {
    padding: 1rem !important;
  }
  
  .lg\:space-y-8 {
    gap: 1.5rem !important;
  }
  
  /* Make cards less rounded on mobile */
  .lg\:rounded-3xl {
    border-radius: 1rem !important;
  }
  
  /* Reduce gaps */
  .lg\:gap-8 {
    gap: 1.5rem !important;
  }
}

/* Tablet adjustments */
@media (min-width: 640px) and (max-width: 1023px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Ensure images and media don't overflow */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Table responsive wrapper */
.overflow-x-auto {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.overflow-x-auto::-webkit-scrollbar {
  height: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

/* Mobile card layouts */
@media (max-width: 767px) {
  /* Hide desktop tables, show mobile cards */
  .md\:block {
    display: none !important;
  }
  
  .md\:hidden {
    display: block !important;
  }
  
  /* Optimize spacing for mobile */
  .p-8 {
    padding: 1.5rem !important;
  }
  
  .gap-8 {
    gap: 1.5rem !important;
  }
  
  /* Make buttons stack on mobile */
  .flex.gap-3 {
    flex-wrap: wrap;
  }
}

/* Desktop: Show tables, hide cards */
@media (min-width: 768px) {
  .md\:block {
    display: block !important;
  }
  
  .md\:hidden {
    display: none !important;
  }
}


/* Version: 1763467202 - Force reload for Railway deployment */
