/* Modern Design Improvements */
:root {
  --primary-color: #667eea;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-color: #f093fb;
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-color: #4facfe;
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --success-color: #43e97b;
  --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --warning-color: #fa709a;
  --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Enhanced Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.btn::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:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--secondary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-success {
  background: var(--success-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-danger {
  background: var(--warning-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Enhanced Card Styles */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Enhanced Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  transition: all 0.3s ease;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Enhanced Grid System */
.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Enhanced Header */
.header {
  background: var(--primary-gradient);
  color: white;
  padding: 1.5rem 0;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.header-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.header-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  font-weight: 400;
}

/* Enhanced Navigation */
.nav {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  padding: 1rem 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
  background: rgba(102, 126, 234, 0.1);
}

.nav-link.active {
  color: var(--primary-color);
  background: rgba(102, 126, 234, 0.1);
  font-weight: 600;
}

/* Enhanced Sidebar */
.sidebar {
  background: var(--bg-primary);
  width: 280px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  z-index: 1000;
  border-right: 1px solid var(--border-color);
}

.sidebar-header {
  padding: 2rem 1.5rem;
  background: var(--primary-gradient);
  color: white;
  text-align: center;
}

.sidebar-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.sidebar-subtitle {
  font-size: 0.875rem;
  opacity: 0.8;
}

.sidebar-nav {
  padding: 1.5rem 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar-item:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.sidebar-item.active {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

.sidebar-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Enhanced Main Content */
.main-content {
  margin-left: 280px;
  min-height: 100vh;
  background: var(--bg-secondary);
  padding: 2rem;
}

.section {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

.section.active {
  display: block;
}

/* Enhanced Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Enhanced Food Cards */
.food-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.food-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.food-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.food-card:hover .food-image {
  transform: scale(1.05);
}

.food-content {
  padding: 1.5rem;
}

.food-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.food-arabic {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.food-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Enhanced Order Cards */
.order-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.order-id {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.125rem;
}

.order-status {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.order-status.pending {
  background: rgba(251, 191, 36, 0.1);
  color: #d97706;
}

.order-status.ready {
  background: rgba(34, 197, 94, 0.1);
  color: #059669;
}

.order-status.completed {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.order-items {
  margin-bottom: 1rem;
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.order-total {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--primary-color);
  text-align: right;
  padding-top: 1rem;
  border-top: 2px solid var(--border-color);
}

/* Enhanced Progress Bar */
.progress-container {
  background: var(--border-color);
  border-radius: var(--radius-lg);
  height: 8px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-bar {
  background: var(--primary-gradient);
  height: 100%;
  border-radius: var(--radius-lg);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Enhanced Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--bg-primary);
  margin: 5% auto;
  padding: 0;
  border-radius: var(--radius-2xl);
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-xl);
  animation: slideIn 0.3s ease;
  overflow: hidden;
}

.modal-header {
  background: var(--primary-gradient);
  color: white;
  padding: 1.5rem 2rem;
  position: relative;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.close:hover {
  opacity: 1;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 0;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    padding: 0 1rem;
  }
  
  .header-title {
    font-size: 2rem;
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  /* Admin Panel Mobile Styles */
  .admin-sidebar {
    width: 100%;
    max-width: 280px;
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
  }

  .admin-sidebar.open {
    left: 0;
  }

  .admin-main-content {
    margin-left: 0;
    padding: 15px;
    width: 100%;
  }

  .admin-header {
    padding: 15px;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .admin-header-left h1 {
    font-size: 24px;
  }

  .admin-header-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .admin-header-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .mobile-menu-btn {
    display: block;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
  }

  .admin-content {
    padding: 15px;
  }

  .admin-content h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-card h3 {
    font-size: 16px;
  }

  .stat-card .stat-value {
    font-size: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .form-group label {
    font-size: 14px;
    margin-bottom: 5px;
  }

  .form-input, .form-select, .form-textarea {
    padding: 12px;
    font-size: 16px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .btn-group {
    flex-direction: column;
    gap: 10px;
  }

  .btn-group .btn {
    width: 100%;
  }

  .modal {
    padding: 10px;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    max-height: 100vh;
    overflow-y: auto;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .modal-body {
    padding: 15px;
  }

  .modal-footer {
    padding: 15px;
    flex-direction: column;
    gap: 10px;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 600px;
  }

  .table th, .table td {
    padding: 8px;
    font-size: 14px;
  }

  /* Kitchen Page Mobile Styles */
  .kitchen-header {
    padding: 15px 0;
  }

  .header-content {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    padding: 0 15px;
  }

  .header-left h1 {
    font-size: 24px;
  }

  .header-left p {
    font-size: 14px;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .kitchen-selector, .toggle-completed-btn, .refresh-btn {
    width: 100%;
    justify-content: center;
  }

  .kitchen-content {
    padding: 15px;
  }

  .kitchen-stations {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .kitchen-station {
    margin-bottom: 20px;
  }

  .station-header {
    padding: 15px;
  }

  .station-name {
    font-size: 18px;
  }

  .station-status {
    font-size: 12px;
    padding: 4px 8px;
  }

  .station-body {
    padding: 15px;
  }

  .station-info {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
  }

  .info-item {
    text-align: center;
  }

  .info-value {
    font-size: 18px;
  }

  .info-label {
    font-size: 12px;
  }

  .orders-container {
    max-height: 400px;
    overflow-y: auto;
  }

  .order-card {
    margin-bottom: 15px;
    padding: 15px;
  }

  .order-header {
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    margin-bottom: 10px;
  }

  .order-id {
    font-size: 14px;
    font-weight: 600;
  }

  .order-time {
    font-size: 12px;
  }

  .order-status {
    font-size: 11px;
    padding: 2px 6px;
  }

  .order-items {
    margin-bottom: 10px;
  }

  .order-item {
    padding: 8px 0;
    font-size: 14px;
  }

  .item-quantity {
    font-size: 12px;
    padding: 2px 6px;
  }

  .order-total {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
  }

  .order-actions {
    flex-direction: column;
    gap: 8px;
  }

  .action-btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
  }

  .no-orders {
    padding: 30px 15px;
    text-align: center;
  }

  .no-orders i {
    font-size: 32px;
    margin-bottom: 10px;
  }

  .no-orders p {
    font-size: 14px;
  }
  
  /* Enhanced Client Mobile Styles */
  .client-content {
    margin-top: 140px;
    padding: 15px;
    padding-bottom: 200px; /* Increased from 120px to 200px */
    min-height: calc(100vh - 140px - 200px); /* Adjusted for new padding */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }
  
  .navigation-buttons {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    padding: 20px 15px !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    gap: 15px !important;
    z-index: 9999 !important;
    margin: 0 !important;
    border-top: 2px solid #ff6b35 !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }
  
  .nav-btn {
    flex: 1 !important;
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  
  .nav-btn-primary {
    background: var(--primary-gradient) !important;
    color: white !important;
    box-shadow: var(--shadow-md) !important;
  }
  
  .nav-btn-secondary {
    background: var(--secondary-gradient) !important;
    color: white !important;
    box-shadow: var(--shadow-md) !important;
  }
  
  .bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    padding: 15px 20px !important; /* Increased padding */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
    z-index: 999 !important;
    border-top: 1px solid #e9ecef;
    display: flex !important;
    justify-content: space-around !important;
  }
  
  .nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important; /* Increased gap */
    padding: 10px !important; /* Increased padding */
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    font-size: 12px !important; /* Smaller font size */
  }
  
  .nav-item i {
    font-size: 18px !important; /* Slightly smaller icons */
  }
  
  .meal-options {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    max-width: none !important;
    margin-bottom: 20px !important; /* Added margin bottom */
  }
  
  .meal-card {
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: var(--shadow-md) !important;
    margin-bottom: 10px !important; /* Added margin bottom */
  }
  
  .items-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    margin-bottom: 20px !important; /* Added margin bottom */
  }
  
  .item-card {
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: var(--shadow-md) !important;
    margin-bottom: 10px !important; /* Added margin bottom */
  }
  
  .client-header {
    padding: 15px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--primary-gradient) !important;
    z-index: 999 !important;
    border-bottom: 1px solid #e9ecef !important;
  }
  
  .total-display {
    padding: 8px 15px !important;
    font-size: 14px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(10px) !important;
  }
  
  .progress-container {
    margin: 8px 0 !important;
  }
  
  /* Ensure content doesn't overlap with fixed elements */
  #mealOptions {
    margin-top: 20px !important;
    margin-bottom: 100px !important; /* Added margin bottom */
  }
  
  #orderingSteps {
    margin-top: 20px !important;
    padding-bottom: 160px !important; /* Increased padding bottom */
  }
  
  #orderSummary {
    margin-top: 20px !important;
    padding-bottom: 160px !important; /* Increased padding bottom */
  }
  
  /* Step reorder section mobile styles */
  .step-reorder-section {
    margin-top: 30px !important;
    padding: 20px !important;
    background: #f8f9fa !important;
    border-radius: 12px !important;
  }
  
  .step-drag-item {
    margin-bottom: 10px !important;
    padding: 15px !important;
    background: white !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    cursor: move !important;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

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

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

/* Loading Spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-xl);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  border-left: 4px solid var(--primary-color);
  max-width: 400px;
}

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

.toast.success {
  border-left-color: var(--success-color);
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.info {
  border-left-color: var(--accent-color);
}

/* Arabic Text Support */
.arabic {
  direction: rtl;
  text-align: right;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
} 

/* Enhanced Step Transitions */
.ordering-steps {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ordering-steps.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  padding-bottom: 120px; /* Add extra padding for fixed navigation buttons */
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  min-height: 200px; /* Ensure consistent height */
}

.item-card {
  background: var(--bg-primary);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

.item-card:nth-child(1) { animation-delay: 0.1s; }
.item-card:nth-child(2) { animation-delay: 0.2s; }
.item-card:nth-child(3) { animation-delay: 0.3s; }
.item-card:nth-child(4) { animation-delay: 0.4s; }
.item-card:nth-child(5) { animation-delay: 0.5s; }
.item-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.item-card.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
} 

/* Enhanced View Transitions */
.meal-selection,
.ordering-steps,
.order-summary {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.meal-selection.active,
.ordering-steps.active,
.order-summary.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Ensure proper spacing when sections are hidden */
.meal-selection:not(.active) {
  display: none !important;
}

.ordering-steps:not(.active) {
  display: none !important;
}

.order-summary:not(.active) {
  display: none !important;
} 

/* Order Summary Styles */
.order-summary {
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

.summary-header {
  text-align: center;
  margin-bottom: 30px;
}

.summary-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.summary-items {
  margin-bottom: 30px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 16px;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-total {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.summary-total-value {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 5px;
}

.summary-total-label {
  font-size: 14px;
  opacity: 0.9;
}

.summary-navigation {
  display: flex;
  flex-direction: column !important;
  gap: 15px;
  margin-top: 20px;
  width: 100%;
}

/* Force vertical layout on all mobile devices */
@media (max-width: 1024px) {
  .summary-navigation {
    flex-direction: column !important;
  }
}

/* Desktop: horizontal layout only on large screens */
@media (min-width: 1025px) {
  .summary-navigation {
    flex-direction: row;
  }
}

.summary-navigation .nav-btn {
  flex: 1;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
}

/* Force full width on all mobile devices */
@media (max-width: 1024px) {
  .summary-navigation .nav-btn {
    width: 100% !important;
    flex: none !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
}

.summary-navigation .nav-btn-secondary {
  background: var(--secondary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.summary-navigation .nav-btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.summary-navigation .nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
} 

/* Modern Admin Panel Styles */
.admin-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.logo-text {
  flex: 1;
}

.logo-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.logo-subtitle {
  font-size: 0.875rem;
  opacity: 0.8;
}

.sidebar-nav {
  flex: 1;
  padding: 1.5rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  margin: 0.25rem 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: white;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-left-color: white;
  font-weight: 600;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nav-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
}

.view-site-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.view-site-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.logout-btn {
  background: rgba(239, 68, 68, 0.8);
  color: white;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 1);
}

/* Main Content Area */
.admin-main-content {
  margin-left: 280px;
  min-height: 100vh;
  background: #f8fafc;
  overflow-x: hidden;
}

/* Header */
.admin-header {
  background: white;
  padding: 1rem 2rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #64748b;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: #f1f5f9;
  color: #475569;
}

.page-title h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.page-title p {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0.25rem 0 0 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.search-container {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.875rem;
}

.search-input {
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  width: 250px;
  background: #f8fafc;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-profile:hover {
  background: #f1f5f9;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.user-role {
  font-size: 0.75rem;
  color: #64748b;
}

.user-dropdown {
  color: #94a3b8;
  font-size: 0.75rem;
}

/* Content Container */
.content-container {
  padding: 2rem;
  min-height: calc(100vh - 80px);
  overflow-y: auto;
}

.content-section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.content-section.active {
  display: block;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.header-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.header-content p {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
}

/* Dashboard Stats */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.stat-period {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* Dashboard Content */
.dashboard-content {
  margin-top: 2rem;
}

.content-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.content-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.card-content {
  padding: 1.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state span {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Action Grid */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #475569;
  transition: all 0.3s ease;
  cursor: pointer;
}

.action-btn:hover {
  background: white;
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.action-btn i {
  font-size: 1.5rem;
}

.action-btn span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Orders Container */
.orders-container {
  margin-top: 1.5rem;
}

/* Revenue Container */
.revenue-container {
  margin-top: 1.5rem;
}

.revenue-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.revenue-stat {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.revenue-stat .stat-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.revenue-stat .stat-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.revenue-details {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.revenue-details h3 {
  padding: 20px;
  margin: 0;
  background: var(--primary-gradient);
  color: white;
}

.revenue-day {
  border-bottom: 1px solid var(--border-color);
}

.revenue-day:last-child {
  border-bottom: none;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--background-light);
  border-bottom: 1px solid var(--border-color);
}

.day-header h4 {
  margin: 0;
  color: var(--text-primary);
}

.day-total {
  font-weight: bold;
  color: var(--primary-color);
}

.day-entries {
  padding: 0;
}

.revenue-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
}

.revenue-entry:last-child {
  border-bottom: none;
}

.revenue-entry.completed {
  background: rgba(34, 197, 94, 0.1);
}

.revenue-entry.pending {
  background: rgba(251, 191, 36, 0.1);
}

.entry-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entry-category {
  font-weight: 500;
  color: var(--text-primary);
}

.entry-subcategory {
  font-size: 12px;
  color: var(--text-secondary);
}

.entry-amount {
  font-weight: bold;
  color: var(--primary-color);
}

.entry-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.entry-status.completed {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.entry-status.pending {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

/* Settings Container */
.settings-container {
  margin-top: 1.5rem;
}

.settings-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.settings-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.settings-card p {
  color: #64748b;
  margin: 0;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem 2rem;
  position: relative;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.close:hover {
  opacity: 1;
}

.modal-form {
  padding: 2rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

/* Checkbox Group */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkbox-item:hover {
  background: #f8fafc;
  border-color: #667eea;
}

.checkbox-item input[type="checkbox"] {
  margin: 0;
}

/* Toast Container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .admin-sidebar.open {
    transform: translateX(0);
  }
  
  .admin-main-content {
    margin-left: 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .content-row {
    grid-template-columns: 1fr;
  }
  
  .dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .action-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-header {
    padding: 1rem;
  }
  
  .content-container {
    padding: 1rem;
  }
  
  .search-input {
    width: 200px;
  }
  
  .user-info {
    display: none;
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  .modal-form {
    padding: 1.5rem;
  }
  
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
  }
} 

/* Step Configuration Modal Styles */
.modal-large {
  max-width: 900px !important;
  width: 95% !important;
}

.step-config-container {
  padding: 2rem;
  max-height: 70vh;
  overflow-y: auto;
}

.step-info-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.step-details {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.step-items-section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.section-header h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.items-container {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.step-item-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.step-item-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.item-header {
  background: #f8fafc;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.item-content {
  padding: 1.5rem;
}

.image-preview {
  margin-top: 1rem;
  text-align: center;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px dashed #cbd5e1;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-image {
  max-width: 100%;
  max-height: 100px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-image {
  color: #94a3b8;
  font-size: 0.875rem;
  font-style: italic;
}

/* Item Image Styles */
.item-style-circular .item-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 15px auto;
    display: block;
    transition: transform 0.4s ease;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--border-color);
}

.item-style-circular .item-card:hover .item-image {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.item-style-circular .item-card.selected .item-image {
    border-color: white;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.item-style-square .item-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto 15px auto;
    display: block;
    transition: transform 0.4s ease;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--border-color);
}

.item-style-square .item-card:hover .item-image {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.item-style-square .item-card.selected .item-image {
    border-color: white;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.item-style-large .item-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    margin: 0 auto 20px auto;
    display: block;
    transition: transform 0.4s ease;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--border-color);
}

.item-style-large .item-card:hover .item-image {
    transform: scale(1.08);
    box-shadow: var(--shadow-xl);
}

.item-style-large .item-card.selected .item-image {
    border-color: white;
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}

/* Adjust card layout for large images */
.item-style-large .item-card {
    padding: 25px;
    min-height: 280px;
}

.item-style-large .item-content {
    text-align: center;
}

.item-style-large .item-title {
    font-size: 22px;
    margin-bottom: 8px;
}

.item-style-large .item-arabic {
    font-size: 18px;
    margin-bottom: 12px;
}

.item-style-large .item-price {
    font-size: 20px;
    font-weight: 700;
}

/* Default style for backward compatibility */
.item-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 15px auto;
    display: block;
    transition: transform 0.4s ease;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--border-color);
}

.item-card:hover .item-image {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.item-card.selected .item-image {
    border-color: white;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Card Actions */
.card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}

/* Enhanced Form Styles */
.form-input:focus,
.form-textarea:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.error,
.form-textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Responsive Design for Step Config */
@media (max-width: 768px) {
  .modal-large {
    width: 98% !important;
    margin: 5% auto !important;
  }
  
  .step-config-container {
    padding: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .item-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
} 

/* Subcategory Configuration Modal Styles */
.subcategory-config-container {
  padding: 2rem;
  max-height: 70vh;
  overflow-y: auto;
}

.subcategory-info-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.subcategory-details {
  display: grid;
  gap: 1rem;
}

.subcategory-steps-section {
  margin-bottom: 2rem;
}

.steps-container {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.step-assignment-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: move;
}

.step-assignment-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.step-assignment-card.dragging {
  opacity: 0.5;
  transform: rotate(5deg);
}

.step-assignment-header {
  background: #f8fafc;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-assignment-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-assignment-content {
  padding: 1rem 1.5rem;
}

.step-assignment-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.step-assignment-info p {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.step-assignment-info strong {
  color: #1e293b;
}

.step-assignment-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-assignment-actions .step-controls {
  margin-right: 0.5rem;
}

.step-position-indicator {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.step-position-beginning {
  background: #dcfce7;
  color: #166534;
}

.step-position-middle {
  background: #fef3c7;
  color: #92400e;
}

.step-position-end {
  background: #fee2e2;
  color: #991b1b;
}

/* Drag and Drop Styles */
.steps-container.dragover {
  background: #f0f9ff;
  border: 2px dashed #0ea5e9;
  border-radius: 8px;
  padding: 1rem;
}

.step-assignment-card.drag-over {
  border-color: #0ea5e9;
  background: #f0f9ff;
}

/* Step Assignment Modal */
.step-assignment-select {
  margin-bottom: 1rem;
}

.step-assignment-select option {
  padding: 0.5rem;
}

/* Responsive Design for Subcategory Config */
@media (max-width: 768px) {
  .subcategory-config-container {
    padding: 1rem;
  }
  
  .step-assignment-info {
    grid-template-columns: 1fr;
  }
  
  .step-assignment-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
} 

/* Toggle Switch Styles */
.step-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 20px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.visibility-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  min-width: 50px;
}

/* Analytics Styles */
.analytics-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.analytics-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analytics-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.analytics-card.full-width {
  grid-column: 1 / -1;
}

.analytics-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.analytics-card .card-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.2rem;
  font-weight: 600;
}

.trend-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.trend-indicator.positive {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.trend-indicator.negative {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.kitchen-performance {
  margin-bottom: 30px;
}

.performance-stats {
  display: flex;
  gap: 30px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-item .stat-label {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 5px;
}

.stat-item .stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.analytics-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.top-items-list {
  max-height: 300px;
  overflow-y: auto;
}

.top-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.top-item:last-child {
  border-bottom: none;
}

.top-item .item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-item .item-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.top-item .item-details h4 {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
  color: #333;
}

.top-item .item-details p {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
}

.top-item .item-stats {
  text-align: right;
}

.top-item .item-stats .orders-count {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.top-item .item-stats .revenue {
  font-size: 0.8rem;
  color: #22c55e;
  font-weight: 500;
}

.real-time-metrics {
  margin-top: 30px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.metric-card:nth-child(1) .metric-icon {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.metric-card:nth-child(2) .metric-icon {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.metric-card:nth-child(3) .metric-icon {
  background: linear-gradient(135deg, #45b7d1, #96c93d);
}

.metric-card:nth-child(4) .metric-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.metric-content {
  flex: 1;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.85rem;
  color: #666;
}

/* Mobile Responsive for Analytics */
@media (max-width: 768px) {
  .analytics-overview {
    grid-template-columns: 1fr;
  }
  
  .analytics-details {
    grid-template-columns: 1fr;
  }
  
  .performance-stats {
    flex-direction: column;
    gap: 15px;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .metric-card {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .metric-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .metric-value {
    font-size: 1.2rem;
  }
}

/* Image Upload Component Styles */
.image-upload-container {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
}

.image-upload-container:hover {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.05);
}

.upload-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.upload-tab {
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.upload-tab:hover {
  color: var(--primary-color);
  background: rgba(102, 126, 234, 0.1);
}

.upload-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.1);
}

.upload-content {
  position: relative;
}

.upload-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.upload-panel.active {
  display: block;
}

.upload-panel[data-panel="url"] {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.upload-panel[data-panel="url"] .form-input {
  flex: 1;
}

.file-upload-area {
  position: relative;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  background: var(--bg-primary);
  transition: all 0.3s ease;
  cursor: pointer;
}

.file-upload-area:hover {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.05);
}

.file-upload-area.dragover {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.1);
  transform: scale(1.02);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder {
  pointer-events: none;
}

.upload-placeholder i {
  font-size: 3rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: block;
}

.upload-placeholder p {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.upload-placeholder small {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.file-preview {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.file-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.file-info {
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.file-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.file-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.upload-error {
  color: #e53e3e;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.upload-success {
  color: var(--success-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

@media (max-width: 768px) {
  .upload-tabs {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .upload-tab {
    border-radius: var(--radius-sm);
    border-bottom: none;
    border-left: 2px solid transparent;
  }
  
  .upload-tab.active {
    border-left-color: var(--primary-color);
    border-bottom-color: transparent;
  }
  
  .upload-panel[data-panel="url"] {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .file-upload-area {
    padding: 1.5rem;
  }
  
  .upload-placeholder i {
    font-size: 2rem;
  }
}

/* Size Options Styles */
.item-sizes {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.item-sizes h6 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.size-options-container {
  margin-bottom: 1rem;
}

.size-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.size-option label {
  font-weight: 500;
  color: var(--text-primary);
  min-width: 60px;
}

.size-option .form-input {
  flex: 1;
  min-width: 120px;
}

.size-option .size-name {
  max-width: 150px;
}

.size-option .size-price {
  max-width: 100px;
}

.remove-size-btn {
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-shrink: 0;
  min-width: 40px;
  height: 40px;
}

.remove-size-btn:hover {
  background: #c82333;
}

.add-size-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.875rem;
}

.add-size-btn:hover {
  background: var(--primary-hover);
}

.add-size-btn i {
  margin-right: 0.5rem;
}

/* Size Icon Styles */
.size-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: white;
  margin: 0 auto 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.item-card:hover .size-icon {
  transform: scale(1.05);
}

.item-card.selected .size-icon {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Selection Limit Styles */
.item-limit {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-style: italic;
  text-align: center;
}

/* Size Option Max Selections Input */
.size-option .size-max-selections {
  max-width: 100px;
}

/* Revenue Section Styles */
.revenue-section {
    margin-bottom: 30px;
}

.revenue-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.revenue-section .section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.revenue-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.time-period-selector {
    display: flex;
    gap: 5px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.period-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.period-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}

.custom-range-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.custom-range-picker input {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
}

.custom-range-picker span {
    color: var(--text-secondary);
    font-weight: 500;
}

.revenue-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.revenue-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 160px;
    display: flex;
    flex-direction: column;
}

.revenue-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 12px 12px 0 0;
}

.revenue-card.primary::before { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.revenue-card.success::before { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.revenue-card.info::before { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.revenue-card.warning::before { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }

.revenue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.revenue-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 20px;
}

.revenue-card.primary .revenue-icon { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.revenue-card.success .revenue-icon { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.revenue-card.info .revenue-icon { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.revenue-card.warning .revenue-icon { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }

.revenue-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.revenue-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.2;
}

.revenue-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.revenue-change {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
    background: rgba(67, 233, 123, 0.1);
    color: #059669;
    margin-top: 8px;
    width: fit-content;
}

.revenue-change.negative {
    background: rgba(248, 113, 113, 0.1);
    color: #dc2626;
}

/* Revenue Chart Section Styles */
.revenue-chart-section {
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.revenue-chart-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.revenue-chart-section .section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.chart-container canvas {
    max-height: 100%;
    max-width: 100%;
}

/* Responsive design for revenue section */
@media (max-width: 768px) {
    .revenue-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .revenue-section .section-header,
    .revenue-chart-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .revenue-controls,
    .chart-controls {
        align-items: flex-start;
        width: 100%;
    }
    
    .time-period-selector {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .period-btn {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
    
    .custom-range-picker {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .chart-container {
        height: 300px;
        padding: 15px;
    }
}

/* New Kitchen Performance Analytics Styles */
.analytics-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.period-selector {
    display: flex;
    gap: 5px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.period-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.period-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}

.export-controls {
    display: flex;
    gap: 10px;
}

.export-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    background: var(--primary-gradient);
    transform: translateY(-1px);
}

.performance-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.overview-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-2px);
}

.overview-card .card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.overview-card .card-icon.green {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.overview-card .card-icon.red {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.overview-card .card-icon.blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.overview-card .card-icon.orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.overview-card .card-content {
    flex: 1;
}

.overview-card .card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.overview-card .card-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.kitchen-performance-section {
    margin-bottom: 40px;
}

.kitchen-performance-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kitchen-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.kitchen-chart-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.kitchen-chart-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.kitchen-chart-card canvas {
    max-height: 300px;
}

.subcategory-analytics-section {
    margin-bottom: 40px;
}

.subcategory-analytics-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subcategory-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.subcategory-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.chart-container h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.chart-container canvas {
    max-height: 400px;
}

.additional-widgets {
    margin-bottom: 40px;
}

.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.widget-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.widget-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-content {
    min-height: 200px;
}

.delayed-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delayed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dc2626;
}

.delayed-item-name {
    font-weight: 600;
    color: var(--text-primary);
}

.delayed-item-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-item.warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}

.alert-item.error {
    background: #fee2e2;
    border-left-color: #dc2626;
    color: #991b1b;
}

.alert-item.info {
    background: #dbeafe;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.alert-icon {
    font-size: 18px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-description {
    font-size: 14px;
    opacity: 0.8;
}

/* Kitchen Analytics Styles */
.kitchen-analytics-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.kitchen-analytics-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.kitchen-overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kitchen-overview-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.kitchen-overview-card:hover {
    transform: translateY(-2px);
}

.kitchen-overview-card .card-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.kitchen-overview-card .card-content {
    flex: 1;
}

.kitchen-overview-card .card-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.kitchen-overview-card .card-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.analytics-chart-container {
    margin-bottom: 30px;
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chart-wrapper {
    position: relative;
    height: 400px;
}

.delay-analysis-section {
    margin-bottom: 30px;
}

.delay-analysis-section h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.delay-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.delay-chart-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.delay-chart-container h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-align: center;
}

.delay-chart-container canvas {
    max-height: 300px;
}

.kitchen-station-details {
    margin-bottom: 20px;
}

.kitchen-station-details h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.station-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.station-detail-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.station-detail-card h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.station-metrics {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.station-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.station-metric:last-child {
    border-bottom: none;
}

.station-metric-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.station-metric-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.delay-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.delay-item:last-child {
    border-bottom: none;
}

.delay-subcategory {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.delay-time {
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
}

.delay-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Simple Dashboard Styles */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 20px;
}

.stat-card .stat-content {
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-period {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Enhanced Analytics Styles */
.analytics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.analytics-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.analytics-card.full-width {
    grid-column: 1 / -1;
}

.analytics-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.analytics-card .card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.trend-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.trend-indicator.positive {
    background: rgba(67, 233, 123, 0.1);
    color: #059669;
}

.trend-indicator.negative {
    background: rgba(248, 113, 113, 0.1);
    color: #dc2626;
}

.trend-indicator.neutral {
    background: rgba(156, 163, 175, 0.1);
    color: #6b7280;
}


/* Real-time Metrics */
.real-time-metrics {
    margin-bottom: 32px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Recent Orders List */
.recent-orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.recent-order-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.order-info {
    flex: 1;
}

.order-id {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.order-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.order-details {
    flex: 1;
    text-align: center;
}

.order-subcategory {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.order-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
}

.status-pending {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
}

.status-ready {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-paid {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.order-total {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 16px;
}

/* Kitchen Performance */
.kitchen-performance {
    margin-bottom: 32px;
}

.performance-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-item .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-item .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Top Items List */
.top-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.top-item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.top-item-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .analytics-overview {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card .stat-value {
        font-size: 24px;
    }
    
    .recent-order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .order-details {
        text-align: left;
    }
}

/* Kitchen Analytics Section Styles */
.analytics-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

/* Subcategory Selector Styles */
.subcategory-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.subcategory-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.subcategory-selector label i {
    color: #667eea;
    font-size: 16px;
}

.subcategory-selector select {
    padding: 10px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.subcategory-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.subcategory-selector select:hover {
    border-color: #667eea;
}

/* Subcategory Performance Styles */
.subcategory-performance {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.subcategory-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.subcategory-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.subcategory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.subcategory-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.completion-rate {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    min-width: 50px;
}

.completion-rate.good {
    background: linear-gradient(135deg, #43e97b, #38d9a9);
    color: white;
}

.completion-rate.warning {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: white;
}

.subcategory-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.stat-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
}

.stat-value.delay-warning {
    color: #e74c3c;
}

.stat-value.no-delay {
    color: #27ae60;
}

.stat-value.sla-good {
    color: #27ae60;
}

.stat-value.sla-warning {
    color: #f39c12;
}

.stat-value.sla-critical {
    color: #e74c3c;
}

/* Delay Analysis Styles */
.delay-analysis {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(145deg, #fff5f5, #ffffff);
    border-radius: 15px;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.delay-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.delay-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.1);
}

.delay-label {
    font-size: 12px;
    color: #e74c3c;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.delay-value {
    font-size: 24px;
    font-weight: 800;
    color: #e74c3c;
}

/* Top Delayed Subcategories */
.top-delayed {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(145deg, #fff5f5, #ffffff);
    border-radius: 12px;
    border: 1px solid rgba(231, 76, 60, 0.1);
}

.top-delayed h5 {
    margin: 0 0 15px 0;
    color: #e74c3c;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delayed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.delayed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(231, 76, 60, 0.1);
    transition: all 0.3s ease;
}

.delayed-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.1);
}

.delayed-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.delayed-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.delayed-time {
    font-size: 12px;
    font-weight: 700;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

.no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-data i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-data p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Enhanced Kitchen Analytics Styles */
.kitchen-analytics-card.excellent {
    border-left: 5px solid #27ae60;
}

.kitchen-analytics-card.good {
    border-left: 5px solid #f39c12;
}

.kitchen-analytics-card.warning {
    border-left: 5px solid #e67e22;
}

.kitchen-analytics-card.critical {
    border-left: 5px solid #e74c3c;
}

.efficiency-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}

.efficiency-badge.excellent {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.efficiency-badge.good {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.efficiency-badge.warning {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
}

.efficiency-badge.critical {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.filter-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.assigned-subcategories {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 100%;
}

.assigned-subcategories span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Section Actions */
.section-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.archive-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.archive-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.archive-btn:active {
    transform: translateY(0);
}

.select-all-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.select-all-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.restore-btn {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.restore-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.restore-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.delete-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.delete-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.delete-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Archive Section Styles */
.archive-info {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.archive-info h3 {
    margin: 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.archive-info .archive-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #6c757d;
}

.archive-info .archive-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.archived-orders-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.archived-order-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.archived-order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.archived-order-card.selected {
    border-color: #3498db;
    background: linear-gradient(135deg, #f8f9ff, #ffffff);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.2);
}

.archived-order-card .order-checkbox {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.archived-order-card .archive-date {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
}

.archived-order-card .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.archived-order-card .order-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.archived-order-card .order-count {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.archived-order-card .order-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 14px;
    color: #6c757d;
}

.archived-order-card .order-details .detail-item {
    display: flex;
    justify-content: space-between;
}

.archived-order-card .order-details .detail-label {
    font-weight: 600;
    color: #495057;
}

.archived-order-card .order-details .detail-value {
    color: #2c3e50;
}

/* Delay Breakdown Section */
.delay-breakdown-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    border: 1px solid #dee2e6;
}

.delay-breakdown-section .section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.delay-breakdown-section .section-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.delay-breakdown-section .section-header p {
    margin: 8px 0 0 0;
    color: #6c757d;
    font-size: 16px;
}

.delay-breakdown-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.delay-kitchen-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.delay-kitchen-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.delay-kitchen-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.delay-kitchen-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.delay-kitchen-info h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.delay-kitchen-info p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 14px;
}

.delay-orders-list {
    max-height: 400px;
    overflow-y: auto;
}

.delay-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e9ecef;
    transition: all 0.2s ease;
}

.delay-order-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.delay-order-item.delayed {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fdf2f2, #f8f9fa);
}

.delay-order-item.on-time {
    border-left-color: #27ae60;
    background: linear-gradient(135deg, #f0f9f0, #f8f9fa);
}

.delay-order-info {
    flex: 1;
}

.delay-order-id {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.delay-order-subcategory {
    color: #6c757d;
    font-size: 12px;
    margin-top: 2px;
}

.delay-order-time {
    text-align: right;
    font-size: 13px;
}

.delay-time {
    font-weight: 600;
    color: #2c3e50;
}

.delay-time.positive {
    color: #e74c3c;
}

.delay-time.negative {
    color: #27ae60;
}

.delay-time.zero {
    color: #6c757d;
}

.delay-sla-info {
    color: #6c757d;
    font-size: 11px;
    margin-top: 2px;
}

.no-delay-data {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.no-delay-data i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 15px;
    display: block;
}

/* Live Updates Indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: pulse 2s infinite;
}

.live-indicator i {
    font-size: 8px;
    animation: blink 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(39, 174, 96, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Performance Overview Styles */
.performance-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 24px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

/* Enhanced Subcategory Cards */
.subcategory-card.good {
    border-left: 4px solid #27ae60;
}

.subcategory-card.warning {
    border-left: 4px solid #f39c12;
}

.subcategory-card.critical {
    border-left: 4px solid #e74c3c;
}

.delay-heatmap {
    width: 100%;
    border-radius: 0 0 12px 12px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.subcategory-card:hover .delay-heatmap {
    transform: scaleY(1.1);
}

/* Heatmap Toggle */
.heatmap-toggle {
    margin-left: auto;
}

.toggle-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.toggle-btn.active {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

/* Worst Subcategory Indicator */
.worst-subcategory {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 25px 0;
}

.chart-container {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.chart-container .chart-canvas {
    height: 300px;
    margin-top: 15px;
}

/* Responsive Design for New Kitchen Analytics Sections */
@media (max-width: 768px) {
    .performance-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    
    .metric-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .metric-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .metric-value {
        font-size: 20px;
    }
    
    .subcategory-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .subcategory-card {
        padding: 15px;
    }
    
    .subcategory-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .completion-rate {
        align-self: center;
    }
    
    .delay-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .delay-stat {
        padding: 12px;
    }
    
    .delay-value {
        font-size: 20px;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-container .chart-canvas {
        height: 250px;
    }
    
    .heatmap-toggle {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .breakdown-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .analytics-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .subcategory-selector {
        justify-content: center;
        padding: 10px 15px;
    }
    
    .subcategory-selector select {
        min-width: 150px;
        flex: 1;
    }
}

.period-selector {
    display: flex;
    gap: 10px;
}

.period-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.period-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.period-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.export-controls {
    display: flex;
    gap: 10px;
}

.export-btn {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.kitchen-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.kitchen-analytics-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 1px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.kitchen-analytics-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 20px 20px 0 0;
}

.kitchen-analytics-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.1);
}

.kitchen-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    position: relative;
}

.kitchen-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 800;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.3),
        0 3px 10px rgba(102, 126, 234, 0.2);
    position: relative;
    transition: all 0.3s ease;
}

.kitchen-avatar::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kitchen-analytics-card:hover .kitchen-avatar::before {
    opacity: 1;
}

.kitchen-info h3 {
    color: #2d3748;
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kitchen-info p {
    color: #718096;
    margin: 8px 0 0 0;
    font-size: 15px;
    font-weight: 500;
}

.kitchen-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.kitchen-stat-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.kitchen-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.kitchen-stat-card:hover::before {
    transform: scaleX(1);
}

.kitchen-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* ========================================
   NEW KITCHEN ANALYTICS STYLES (Order History Based)
   ======================================== */


/* Performance Trends Chart Section */
.performance-trends-section {
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.trends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.trends-header h3 {
    margin: 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.chart-filters .filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-filters .filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
}

.chart-filters .filter-group select,
.chart-filters .filter-group input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: var(--text-color);
}

.chart-filters .filter-group select:focus,
.chart-filters .filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
}

.chart-container canvas {
    max-width: 100%;
    height: auto;
}

/* New Kitchen Performance Section */
.kitchen-performance-section {
    margin-top: 2rem;
}

.kitchen-performance-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kitchen-charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.kitchen-chart-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.kitchen-chart-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.kitchen-chart-header.status-good {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-left: 4px solid #10b981;
}

.kitchen-chart-header.status-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
}

.kitchen-chart-header.status-critical {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-left: 4px solid #ef4444;
}

.kitchen-chart-header h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.kitchen-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-indicator.good {
    background: #10b981;
}

.status-indicator.warning {
    background: #f59e0b;
}

.status-indicator.critical {
    background: #ef4444;
}

.status-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
}

.kitchen-chart-content {
    padding: 1.5rem;
}

.kitchen-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kitchen-stats .stat {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.kitchen-stats .stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.kitchen-stats .stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.subcategory-breakdown {
    margin-top: 1rem;
}

.subcategory-breakdown h5 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subcategory-breakdown h5::before {
    content: "📊";
    font-size: 1rem;
}

.subcategory-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subcategory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.subcategory-name {
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
}

.subcategory-time {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 1rem;
}

.subcategory-count {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
}

/* Enhanced Delay Analysis Styles */
.no-delays {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-delays i {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.no-delays h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

.no-delays p {
    margin: 0;
    color: #6b7280;
}

.delay-summary {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    border-left: 4px solid #ef4444;
}

.delay-summary h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.delay-summary p {
    margin: 0;
    color: #6b7280;
}

.delay-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.kitchen-delay-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #ef4444;
}

.delay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.delay-header h5 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.delay-count {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.delay-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.delay-stat {
    text-align: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
}

.delay-stat .stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.delay-stat .stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ef4444;
}

/* Responsive Design for New Analytics */
@media (max-width: 768px) {
    .kitchen-charts-container {
        grid-template-columns: 1fr;
    }
    
    .kitchen-stats {
        grid-template-columns: 1fr;
    }
    
    .delay-details {
        grid-template-columns: 1fr;
    }
    
    .delay-stats {
        grid-template-columns: 1fr;
    }
    
    .subcategory-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .subcategory-time {
        margin-right: 0;
    }
}

.kitchen-stat-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.kitchen-stat-card.success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.3);
}

.kitchen-stat-card.warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(250, 112, 154, 0.3);
}

.kitchen-stat-card.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.kitchen-breakdown {
    margin-bottom: 25px;
}

.breakdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.breakdown-header h4 {
    color: #2c3e50;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.breakdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transition: width 0.3s ease;
}

.breakdown-item:hover::before {
    width: 100%;
}

.breakdown-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.breakdown-item .item-name {
    font-weight: 700;
    color: #2d3748;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.breakdown-item .item-count {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1;
}

.kitchen-chart-container {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.chart-header h4 {
    color: #2c3e50;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chart-canvas {
    position: relative;
    height: 300px;
}

/* Responsive Design for Kitchen Analytics */
@media (max-width: 768px) {
    .kitchen-analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .kitchen-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .period-selector {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .export-controls {
        justify-content: center;
    }
}

/* ========================================
   KITCHEN ANALYTICS STYLES
   ======================================== */

/* Kitchen Analytics Overview */
.kitchen-analytics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kitchen-analytics-overview .analytics-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.kitchen-analytics-overview .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.kitchen-analytics-overview .card-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.kitchen-analytics-overview .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.kitchen-analytics-overview .stat-change {
    font-size: 12px;
    font-weight: 500;
}

.kitchen-analytics-overview .stat-change.positive {
    color: #4CAF50;
}

.kitchen-analytics-overview .stat-change.negative {
    color: #F44336;
}

/* Kitchen Analytics Grid */
.kitchen-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.kitchen-analytics-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kitchen-analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.kitchen-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.kitchen-card-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.kitchen-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.kitchen-status.good {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.kitchen-status.warning {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.kitchen-status.critical {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.kitchen-status i {
    font-size: 8px;
}

/* Kitchen Metrics */
.kitchen-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.metric {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.metric-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.metric-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-value.good {
    color: #4CAF50;
}

.metric-value.warning {
    color: #FF9800;
}

.metric-value.critical {
    color: #F44336;
}

/* Kitchen Subcategories */
.kitchen-subcategories {
    margin-bottom: 20px;
}

.kitchen-subcategories h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.subcategory-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subcategory-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

/* Subcategory Preparation Times */
.subcategory-prep-times {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subcategory-prep-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.subcategory-prep-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.subcategory-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.prep-time {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
}

.order-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* Kitchen Chart */
.kitchen-chart {
    height: 150px;
    position: relative;
}

/* ========================================
   ORDER HISTORY STYLES
   ======================================== */

/* Order History Summary */
.order-history-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.summary-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.summary-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.summary-card .card-icon i {
    font-size: 20px;
    color: white;
}

.summary-card .card-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.summary-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.summary-card .stat-change {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Order History List */
.order-history-list {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.order-history-list h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-history-list h3 i {
    color: var(--primary-color);
}

/* Order History Item */
.order-history-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.order-history-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.order-history-item:last-child {
    margin-bottom: 0;
}

/* Order Header */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.order-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.order-subcategory {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.order-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.status-completed {
    background: #E8F5E8;
    color: #2E7D32;
}

.status-pending {
    background: #FFF3E0;
    color: #F57C00;
}

.status-cancelled {
    background: #FFEBEE;
    color: #D32F2F;
}

.status-unknown {
    background: #F5F5F5;
    color: #757575;
}

/* Order Details */
.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
}

.kitchen-time {
    color: var(--primary-color);
    font-weight: 700;
}

.kitchen-time.live-time {
    animation: pulse 2s infinite;
    color: var(--warning-color);
}

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

/* Order Timeline */
.order-timeline {
    display: flex;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-item.completed .timeline-icon {
    background: var(--success-color);
    color: white;
}

.timeline-item.pending .timeline-icon {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.timeline-icon i {
    font-size: 12px;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.timeline-time {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .order-history-summary {
        grid-template-columns: 1fr;
    }
    
    .order-details {
        grid-template-columns: 1fr;
    }
    
    .order-timeline {
        flex-direction: column;
        gap: 12px;
    }
    
    .order-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* Subcategory Analytics Section */
.subcategory-analytics-section {
    margin-bottom: 40px;
}

.subcategory-analytics-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subcategory-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

.subcategory-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.subcategory-stats .stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.subcategory-stats .stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.subcategory-stats .stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.subcategory-chart {
    height: 200px;
    position: relative;
}

/* Delay Analysis Section */
.delay-analysis-section {
    margin-bottom: 40px;
}

.delay-analysis-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.delay-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.delay-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    text-align: center;
}

.delay-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.delay-count {
    font-size: 32px;
    font-weight: 700;
    color: #F44336;
    margin: 0;
}

.delay-kitchen,
.delay-subcategory {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Filter Groups */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .kitchen-analytics-overview {
        grid-template-columns: 1fr;
    }
    
    .kitchen-analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .kitchen-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .subcategory-charts {
        grid-template-columns: 1fr;
    }
    
    .subcategory-stats {
        grid-template-columns: 1fr;
    }
    
    .delay-summary {
        grid-template-columns: 1fr;
    }
    
    .filter-group {
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .kitchen-metrics {
        grid-template-columns: 1fr;
    }
    
    .kitchen-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .kitchen-analytics-overview .analytics-card {
        flex-direction: column;
        text-align: center;
    }
}

 