/* Modern Colorful Restaurant Ordering System */

:root {
  --primary-color: #FF6B6B;       /* Vibrant coral red */
  --secondary-color: #4ECDC4;     /* Turquoise */
  --accent-color: #FFE66D;        /* Sunny yellow */
  --purple-accent: #A8E6CF;       /* Mint green */
  --orange-accent: #FF8E53;       /* Orange */
  --blue-accent: #74C0FC;         /* Light blue */
  --pink-accent: #FFB3E6;         /* Pink */
  --text-color: #2C3E50;          /* Dark blue-gray */
  --text-light: #7F8C8D;          /* Light gray */
  --light-bg: #F8FAFF;            /* Very light blue */
  --card-bg: #FFFFFF;             /* Pure white */
  --dark-bg: #2C3E50;             /* Dark blue-gray */
  --gradient-primary: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  --gradient-secondary: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
  --gradient-accent: linear-gradient(135deg, #FFE66D 0%, #FF8A80 100%);
  --gradient-purple: linear-gradient(135deg, #A8E6CF 0%, #88D8C0 100%);
  --status-pending: #FFE66D;      /* Sunny yellow */
  --status-preparing: #74C0FC;    /* Light blue */
  --status-ready: #4ECDC4;        /* Turquoise */
  --status-completed: #A8E6CF;    /* Mint green */
  --status-cancelled: #FF6B6B;    /* Coral red */
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* General Styling */
body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--light-bg);
  color: var(--text-color);
  line-height: 1.6;
}

/* Staff Panel Button Styles - Rectangular/Square with Different Colors */
.staff-btn {
  border-radius: 6px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  min-width: 120px !important;
  border: none !important;
  box-shadow: var(--shadow-light) !important;
  transition: all 0.3s ease !important;
}

.staff-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-medium) !important;
}

.staff-btn-kot {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
}

.staff-btn-kot:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
  color: white !important;
}

.staff-btn-invoice {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
  color: white !important;
}

.staff-btn-invoice:hover {
  background: linear-gradient(135deg, #ee82f0 0%, #f1455a 100%) !important;
  color: white !important;
}

.staff-btn-add-item {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
  color: white !important;
}

.staff-btn-add-item:hover {
  background: linear-gradient(135deg, #3d8bfe 0%, #00d4e4 100%) !important;
  color: white !important;
}

.staff-btn-start {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
  color: var(--text-color) !important;
  border: 2px solid #4ECDC4 !important;
}

.staff-btn-start:hover {
  background: linear-gradient(135deg, #96d9d6 0%, #f4c4d1 100%) !important;
  color: var(--text-color) !important;
  border: 2px solid #44a08d !important;
}

.staff-btn-ready {
  background: linear-gradient(135deg, #a8e6cf 0%, #88d8c0 100%) !important;
  color: var(--text-color) !important;
  border: 2px solid #4ECDC4 !important;
}

.staff-btn-ready:hover {
  background: linear-gradient(135deg, #96d4bb 0%, #7cc7b1 100%) !important;
  color: var(--text-color) !important;
  border: 2px solid #44a08d !important;
}

.staff-btn-complete {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) !important;
  color: var(--text-color) !important;
  border: 2px solid #FFE66D !important;
}

.staff-btn-complete:hover {
  background: linear-gradient(135deg, #fde2bf 0%, #f9a88c 100%) !important;
  color: var(--text-color) !important;
  border: 2px solid #ffdf4d !important;
}

.staff-btn-cancel {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
  color: var(--text-color) !important;
  border: 2px solid #FF6B6B !important;
}

.staff-btn-cancel:hover {
  background: linear-gradient(135deg, #ff8a8f 0%, #fbbfe0 100%) !important;
  color: var(--text-color) !important;
  border: 2px solid #ff5555 !important;
}

.modern-pattern {
  background: linear-gradient(45deg, rgba(255, 107, 107, 0.05) 25%, transparent 25%), 
              linear-gradient(-45deg, rgba(78, 205, 196, 0.05) 25%, transparent 25%), 
              linear-gradient(45deg, transparent 75%, rgba(255, 230, 109, 0.05) 75%), 
              linear-gradient(-45deg, transparent 75%, rgba(168, 230, 207, 0.05) 75%);
  background-size: 30px 30px;
  background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
}

.hero-section {
  background: var(--gradient-primary);
  color: white;
  padding: 4rem 0;
  border-radius: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-heavy);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3Ccircle cx='15' cy='15' r='1'/%3E%3Ccircle cx='45' cy='45' r='1'/%3E%3Ccircle cx='15' cy='45' r='1'/%3E%3Ccircle cx='45' cy='15' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.hero-section > * {
  position: relative;
  z-index: 1;
}

.section-title {
  color: var(--text-color);
  position: relative;
  margin-bottom: 2rem;
  font-weight: 700;
  font-size: 2.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  background: linear-gradient(135deg, #FF8E53 0%, #FF6B6B 100%);
}

.btn-secondary {
  background: var(--gradient-secondary);
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  background: linear-gradient(135deg, #44A08D 0%, #4ECDC4 100%);
}

.btn-accent {
  background: var(--gradient-accent);
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
  color: var(--text-color);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  color: var(--text-color);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
  border-radius: 50px;
  padding: 10px 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

/* Food Item Cards */
.food-item-card {
  border-radius: 1.5rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  border: none;
  background: var(--card-bg);
  box-shadow: var(--shadow-light);
  position: relative;
}

.food-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 1.5rem;
}

.food-item-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

.food-item-card:hover::before {
  opacity: 0.05;
}

.food-item-card > * {
  position: relative;
  z-index: 1;
}

.food-item-image {
  height: 220px;
  object-fit: cover;
  border-radius: 1rem 1rem 0 0;
  transition: transform 0.3s ease;
}

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

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

.food-item-price {
  color: var(--primary-color);
  font-weight: 800;
  font-size: 1.4rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.spicy-indicator {
  color: var(--primary-color);
  font-size: 1.2rem;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.veg-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--secondary-color);
  background: var(--gradient-secondary);
  display: inline-block;
  margin-right: 8px;
  border-radius: 4px;
  position: relative;
}

.veg-indicator::after {
  content: '●';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.card-body {
  padding: 1.5rem;
}

.card-category {
  background: var(--gradient-accent);
  color: var(--text-color);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cart Styling */
.cart-container {
  background: var(--card-bg);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-medium);
  padding: 2rem;
  margin-bottom: 2rem;
}

.cart-item {
  border-bottom: 2px solid rgba(78, 205, 196, 0.1);
  padding: 1.5rem 0;
  transition: all 0.3s ease;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.cart-item:hover {
  background: rgba(255, 230, 109, 0.05);
  transform: translateX(5px);
}

.cart-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cart-total {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  padding: 1rem;
  border-radius: 1rem;
  background-color: rgba(255, 230, 109, 0.1);
  margin-top: 1rem;
}

.cart-badge {
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  min-width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  position: absolute;
  top: -8px;
  right: -8px;
  box-shadow: var(--shadow-light);
}

/* Order Status */
.status-badge {
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

.status-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.status-badge:hover::before {
  left: 100%;
}

.status-pending {
  background: var(--gradient-accent);
  color: var(--text-color);
  border: 2px solid var(--accent-color);
}

.status-preparing {
  background: linear-gradient(135deg, var(--blue-accent) 0%, #5DADE2 100%);
  color: white;
  border: 2px solid var(--blue-accent);
}

.status-ready {
  background: var(--gradient-secondary);
  color: white;
  border: 2px solid var(--secondary-color);
}

.status-completed {
  background: var(--gradient-purple);
  color: var(--text-color);
  border: 2px solid var(--purple-accent);
}

.status-cancelled {
  background: linear-gradient(135deg, var(--primary-color) 0%, #E74C3C 100%);
  color: white;
  border: 2px solid var(--primary-color);
}

/* Admin/Staff Portals */
.admin-sidebar {
  background: linear-gradient(180deg, var(--dark-bg) 0%, #34495E 100%);
  min-height: calc(100vh - 56px);
  color: white;
  box-shadow: var(--shadow-medium);
  position: relative;
}

.admin-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.admin-sidebar > * {
  position: relative;
  z-index: 1;
}

.admin-sidebar a {
  color: rgba(255, 255, 255, 0.9);
  padding: 15px 25px;
  display: block;
  transition: all 0.3s ease;
  border-radius: 0 25px 25px 0;
  margin: 5px 0;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.admin-sidebar a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: left 0.3s ease;
  z-index: -1;
}

.admin-sidebar a:hover::before,
.admin-sidebar a.active::before {
  left: 0;
}

.admin-sidebar a:hover, 
.admin-sidebar a.active {
  color: white;
  text-decoration: none;
  transform: translateX(10px);
  box-shadow: var(--shadow-light);
}

.admin-content {
  padding: 30px;
  background: var(--light-bg);
  min-height: calc(100vh - 56px);
}

.admin-card {
  background: var(--card-bg);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-light);
  padding: 2rem;
  margin-bottom: 2rem;
  border: none;
  transition: all 0.3s ease;
}

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

.navbar-modern {
  background: var(--gradient-primary);
  box-shadow: var(--shadow-medium);
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Modern Form Styling */
.form-control {
  border: 2px solid rgba(78, 205, 196, 0.2);
  border-radius: 15px;
  padding: 12px 20px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--card-bg);
  color: var(--text-color);
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(78, 205, 196, 0.25);
  transform: translateY(-2px);
}

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

.form-select {
  border: 2px solid rgba(78, 205, 196, 0.2);
  border-radius: 15px;
  padding: 12px 20px;
  background: var(--card-bg);
  color: var(--text-color);
}

/* Modern Tables */
.table-modern {
  background: var(--card-bg);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.table-modern thead th {
  background: var(--gradient-secondary);
  color: white;
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1rem;
}

.table-modern tbody td {
  border: none;
  padding: 1rem;
  vertical-align: middle;
}

.table-modern tbody tr {
  transition: all 0.3s ease;
}

.table-modern tbody tr:hover {
  background: rgba(78, 205, 196, 0.05);
  transform: scale(1.01);
}

/* Loading Animations */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(78, 205, 196, 0.2);
  border-top: 4px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.pulse-animation {
  animation: pulse 2s infinite;
}

/* Toast Notifications */
.toast-modern {
  background: var(--gradient-primary);
  color: white;
  border-radius: 15px;
  box-shadow: var(--shadow-medium);
  border: none;
}

.toast-success {
  background: var(--gradient-secondary);
}

.toast-warning {
  background: var(--gradient-accent);
  color: var(--text-color);
}

.toast-error {
  background: linear-gradient(135deg, var(--primary-color) 0%, #E74C3C 100%);
}

/* Category Navigation */
.category-nav {
  background: var(--card-bg);
  border-radius: 50px;
  padding: 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.category-btn {
  background: transparent;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.category-btn:hover,
.category-btn.active {
  background: var(--gradient-secondary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .food-item-image {
    height: 180px;
  }
  
  .admin-sidebar {
    min-height: auto;
  }
  
  .admin-sidebar a {
    border-radius: 10px;
    margin: 2px 10px;
    transform: none;
  }
  
  .admin-sidebar a:hover {
    transform: none;
  }
  
  .cart-container {
    padding: 1rem;
  }
  
  .category-nav {
    border-radius: 20px;
    padding: 0.5rem;
  }
  
  .category-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .btn-primary,
  .btn-secondary,
  .btn-accent {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .food-item-card {
    margin-bottom: 1rem;
  }
  
  .status-badge {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
}

/* Print styling for invoices and receipts */
@media print {
  /* General print optimizations */
  body {
    background: none !important;
    color: #000 !important;
    font-size: 12pt !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  
  /* Make text darker and more saturated for better printing */
  p, h1, h2, h3, h4, h5, h6, span, div, table, tr, td, th {
    color: #000 !important;
    font-weight: normal !important;
  }
  
  /* Emphasize important text */
  .font-weight-bold, strong, b, th, .invoice-total, .invoice-title {
    font-weight: bold !important;
    color: #000 !important;
  }
  
  /* Reduce margins and padding to save space */
  .container, .container-fluid, .row, .col, .card {
    margin: 0 !important;
    padding: 5px !important;
    width: 100% !important;
  }
  
  /* For invoice specifically */
  .invoice-container {
    border: 1px solid #000 !important;
    padding: 10px !important;
    max-width: 100% !important;
  }
  
  /* Optimize table presentation */
  table.invoice-items {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  
  table.invoice-items th, 
  table.invoice-items td {
    border: 1px solid #000 !important;
    padding: 5px !important;
    text-align: left !important;
  }
  
  /* Make sure amounts are clearly visible */
  .text-right, .currency-amount {
    text-align: right !important;
    font-weight: bold !important;
  }
  
  /* Hide unnecessary elements when printing */
  .no-print, .admin-sidebar, .btn, button, .nav, .modal, .toast,
  header, footer, .header-section, .footer-section,
  .navbar, .navbar-nav, .custom-actions {
    display: none !important;
  }
  
  /* Remove any decorative backgrounds */
  .indian-pattern, .hero-section, .bg-light, .bg-dark, .bg-primary, .bg-secondary {
    background: none !important;
    background-color: white !important;
  }
  
  /* Fix page breaks */
  .invoice-page {
    page-break-after: always !important;
  }
  
  /* Avoid breaking inside important elements */
  tr, .invoice-total, .invoice-item {
    page-break-inside: avoid !important;
  }
  
  /* Remove unnecessary spacing at the bottom */
  @page {
    margin-bottom: 0.5cm !important;
  }
  
  /* Ensure color printing is optimized for black text on white background */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
