/* Modern Mobile-First Admin CSS */
:root {
  --primary-color: #ec983e;
  --secondary-color: #002060;
  --primary-rgb: 236, 152, 62;
  --secondary-rgb: 0, 32, 96;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --info-color: #3b82f6;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Mobile-First Smooth Animations */
* {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glass Morphism Effects */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.dark .glass-card {
  background: rgba(31, 41, 55, 0.8);
  border-color: rgba(75, 85, 99, 0.3);
}

/* Modern Stats Cards */
.stat-card {
  background: linear-gradient(135deg, var(--primary-color), #f97316);
  border-radius: 20px;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

/* Primary color utilities */
.bg-primary { background-color: var(--primary-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }
.hover\:bg-primary:hover { background-color: var(--primary-color) !important; }
.hover\:text-primary:hover { color: var(--primary-color) !important; }

/* Secondary color utilities */
.bg-secondary { background-color: var(--secondary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.border-secondary { border-color: var(--secondary-color) !important; }
.hover\:bg-secondary:hover { background-color: var(--secondary-color) !important; }
.hover\:text-secondary:hover { color: var(--secondary-color) !important; }

/* Button styles */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary:hover {
  background-color: rgba(var(--primary-rgb), 0.9);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: rgba(var(--secondary-rgb), 0.9);
  transform: translateY(-1px);
}

/* Dark mode styles */
.dark {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
}

.dark .bg-white { background-color: var(--bg-primary) !important; }
.dark .bg-gray-100 { background-color: var(--bg-secondary) !important; }
.dark .text-gray-900 { color: var(--text-primary) !important; }
.dark .text-gray-700 { color: var(--text-secondary) !important; }

/* Custom animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* POS specific styles */
.pos-item {
  transition: all 0.2s;
  cursor: pointer;
}

.pos-item:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Messaging styles */
.message-bubble {
  max-width: 70%;
  word-wrap: break-word;
}

.message-sent {
  background-color: var(--primary-color);
  color: white;
  margin-left: auto;
}

.message-received {
  background-color: #f3f4f6;
  color: #374151;
  margin-right: auto;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

.toast.success { background-color: #10b981; }
.toast.error { background-color: #ef4444; }
.toast.warning { background-color: #f59e0b; }
.toast.info { background-color: var(--primary-color); }

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Line Clamp Utilities */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.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;
}

/* Enhanced Product Detail Page Styles */
.product-detail-container {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.dark .product-detail-container {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Enhanced hover effects for product cards */
.product-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dark .product-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Gradient backgrounds */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color), #f97316);
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, var(--secondary-color), #1e40af);
}

/* Enhanced button styles */
.btn-enhanced {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-enhanced:hover::before {
  left: 100%;
}

/* Scroll animations */
.animate-slide-up {
  animation: slideUpFade 0.6s ease-out forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced hover lift effect */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.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);
}

.dark .hover-lift:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Modern section spacing */
.section-spacing {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  .section-spacing {
    padding: 2rem 0;
  }
}

.mobile-spacing {
  padding: 2rem 0;
}

/* Enhanced focus styles for accessibility */
.focus-enhanced:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(236, 152, 62, 0.1);
}

/* Responsive text utilities */
@media (max-width: 640px) {
  .text-responsive-xl {
    font-size: 2rem;
    line-height: 2.5rem;
  }
  
  .text-responsive-lg {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

/* Custom scrollbar for webkit browsers */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #d97706;
}

/* Fixed Header Spacing for Mobile */
@media (max-width: 1023px) {
  /* Ensure all page content starts below the fixed mobile header */
  .admin-mobile-layout main {
    padding-top: 0; /* Reset any main padding */
  }
  
  /* The main content container already has inline style for mobile spacing */
}