:root {
  --primary: #2a2a31; /* Professional navy */
  --secondary: #4A90E2; /* Trustworthy blue */
  --accent: #00C853; /* Positive green */
  --text: #2D3748;
  --background: #F7FAFC;
  --surface: #FFFFFF;
  --error: #D32F2F;
  --warning: #F6A623;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--background);
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
}
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 30px; /* Adjust spacing between logo and name */
}

.logo-image {
  width: 80px; /* Set logo size */
  height: auto; /* Maintain aspect ratio */
}

.restaurant-name {
  font-size: 24px; /* Adjust font size for the name */
  font-weight: bold; /* Make the name stand out */
}

.datetime {
  font-size: 0.9rem;
  font-weight: 300;
}

/* Sidebar */
.sidebar {
  width: 250px;
  height: 100%;
  position: fixed;
  left: -250px;
  top: 0;
  background: #111;
  padding-top: 20px;
  transition: left 0.3s ease-in-out;
}

.sidebar.active {
  left: 0;
}

.sidebar a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: white;
  transition: background-color 0.2s ease-in-out;
}

.sidebar a:hover {
  background-color: #575757;
}

/* Tables Dashboard */
.tables-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  padding: rem;
}


/* Order Section */
.order-section {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

/* Enhanced Buttons */
.btn {
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.btn-primary {
  background: var(--secondary);
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn:hover {
  filter: brightness(0.9);
  transform: translateY(-1px);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  overflow-y: auto;
}




/* Main Layout */
main {
  display: flex;
  flex: 1;
  flex-direction: row;
  padding: 15px;
  gap: 10px;
}

.flex-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.order-section {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.menu-item {
  background: var(--surface);
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:hover {
  border-color: var(--secondary);
  box-shadow: 0 4px 6px -1px rgba(74, 144, 226, 0.1);
}

.menu-item img {
  border-radius: 6px;
  aspect-ratio: 1/1;
  object-fit: cover;
}




/* Responsive adjustment for smaller screens */
@media screen and (max-width: 768px) {
  .table-btn {
    width: 35%; /* Slightly increased width */
    padding: 8px; /* Slightly increased padding for touch targets */
    font-size: 12px; /* Reduced font size for responsiveness */
  }
}

/* Keep the hover effect consistent */
.table-btn:hover {
  background-color: #ddd;
  transform: translateY(-2px); /* Slightly reduced lift effect */
}


.order-section {
  flex: 2;
  display: flex;
  flex-direction: column;
}

.search-bar input {
  width: 100%;
  height: 25px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.8em;
  padding: 5px;
  transition: border-color 0.3s ease;
}

.search-bar input:focus {
  border-color: #007bff;
}

.categories {
  display: flex;
  justify-content: space-around;
  margin: 15px 0;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 0;
}

.categories button {
  display: inline-block;
  padding: 8px 12px;
  background-color: #666;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border-radius: 5px;
  font-size: 0.8em;
  margin: 0 3px;
}

.categories button:hover {
  background-color: #555;
  transform: translateY(-3px);
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-height: 400px; /* Adjust this value as needed */
  overflow-y: auto; /* Enable vertical scrolling */
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 5px;
  padding: 10px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.menu-item img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.menu-item:hover {
  transform: translateY(-5px);
  border-color: #007bff;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.menu-item p, .menu-item .price {
  font-size: 0.8em;
  margin-top: 5px;
}
.order-summary {
  width: 100%; /* Ensure it adapts to screen width */
  max-width: 450px; /* Set a maximum width for responsiveness */
  max-height: 600px; /* Maintain maximum height for readability */
  overflow-y: auto; /* Enable scrolling for large content */
  padding: 15px; /* Balanced padding */
  border: 1px solid #ddd; /* Softer border color */
  border-radius: 10px; /* Rounded corners for modern design */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Enhanced shadow for depth */
  background-color: #ffffff; /* Clean and professional background */
}

.order-item {
  padding: 10px; /* Improved padding for readability */
  border-bottom: 1px solid #df0a0a; /* Bold separator for clarity */
  transition: background-color 0.2s ease-in-out;
}

.order-item:hover {
  background-color: #ffefef; /* Subtle hover effect for user focus */
}

.item-container {
  display: flex;
  flex-direction: column; /* Stack item details and comments */
  gap: 5px; /* Add spacing between elements */
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center; /* Ensure consistent alignment */
  font-weight: bold;
}

.item-comments {
  margin-top: 5px;
  font-style: italic;
  color: #777; /* Softer text color */
}

.item-details {
  display: flex;
  align-items: center;
  gap: 10px; /* Add spacing between elements */
}

.remove-item {
  margin-left: auto; /* Push remove button to the right */
  padding: 5px 10px; /* Larger clickable area */
  cursor: pointer;
  font-size: 14px;
  color: #f44336; /* Red to match the action */
  transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.remove-item:hover {
  color: #df0a0a;
  transform: scale(1.1); /* Subtle hover effect */
}

h3 {
  font-size: 26px;
  margin-bottom: 15px;
  color: #333;
  text-align: center;
  font-weight: 600;
}

#selected-table {
  color: #007bff;
  font-weight: bold;
}

#order-summary {
  margin-bottom: 20px;
}

#selected-time {
  font-size: 18px;
  margin-bottom: 15px;
  color: #555;
  text-align: center;
}

#order-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

#order-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.3s ease-in-out;
}

#order-items li:hover {
  background-color: #f1f1f1; /* Highlight hovered items */
}

.item-info {
  display: flex;
  flex-direction: column;
  color: #333;
}

.item-name {
  font-size: 18px;
  font-weight: 500;
}

.item-qty-price {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  color: #777;
}

.item-qty {
  margin-right: 20px;
}

#order-items li button {
  padding: 8px 14px; /* Improved padding for usability */
  background: #dc3545;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease-in-out;
  border-radius: 8px; /* Softer corners for modern aesthetics */
  font-size: 14px;
  font-weight: bold;
}

#order-items li button:hover {
  background-color: #c82333;
  transform: translateY(-2px); /* Slight hover lift */
}

.total {
  margin-top: 20px;
  font-size: 1.2em;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: #333;
}

.total strong {
  color: #000;
}

.checkout-btn, .finalize-btn, .complete-btn, .change-table-btn, .void-btn, .print-receipt-btn {
  padding: 10px 20px;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: 5px;
  margin: 15px 0;
  font-size: 0.8em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.checkout-btn {
  background: linear-gradient(135deg, #28a745, #218838);
}

.checkout-btn:hover {
  background-color: #218838;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.finalize-btn {
  background: linear-gradient(135deg, #007bff, #0056b3);
}

.finalize-btn:hover {
  background-color: #0056b3;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.complete-btn {
  background: linear-gradient(135deg, #ffc107, #e0a800);
}

.complete-btn:hover {
  background-color: #e0a800;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.change-table-btn {
  background: linear-gradient(135deg, #17a2b8, #138496);
}

.change-table-btn:hover {
  background-color: #138496;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.void-btn {
  background: linear-gradient(135deg, #dc3545, #c82333);
}

.void-btn:hover {
  background-color: #c82333;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.print-receipt-btn {
  background: linear-gradient(135deg, #6f42c1, #563d7c);
}

.print-receipt-btn:hover {
  background-color: #563d7c;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}


/* Global Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f9;
}




/* Close Button */
.close {
  align-self: flex-end;
  font-size: 1.125em;
  cursor: pointer;
  color: #333;
  transition: color 0.3s ease, transform 0.2s ease;
}

.close:hover {
  color: #ff0000;
  transform: scale(1.075);
}

/* Payment Section */
.payment-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px; /* Added padding */
  background-color: #f9f9f9; /* Light background color */
  border-radius: 10px; /* Rounded corners */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.total-amount {
  font-size: 1.5em; /* Slightly increased font size for emphasis */
  font-weight: bold;
  margin-bottom: 15px; /* Increased margin for spacing */
  color: #333; /* Darker color for better contrast */
}

.payment-section .total-amount::before {
  content: 'Total: '; /* Prefix text for clarity */
  font-weight: normal; /* Normal weight for prefix */
  color: #555; /* Lighter color for prefix */
}

.payment-section .total-amount::after {
  content: ' Rs'; /* Suffix text for clarity */
  font-weight: normal; /* Normal weight for suffix */
  color: #555; /* Lighter color for suffix */
}


/* Numeric Input Section */
.content-section {
  display: flex;
  align-items: flex-start;
  width: 100%; /* Adjusted width */
}

.numeric-section {
  margin-right: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.numeric-input {
  width: 80%; /* Adjusted width */
  padding: 7.5px;
  font-size: 1.125em;
  text-align: center;
  margin-bottom: 10px;
  border-radius: 7.5px;
  border: 1.5px solid #007BFF;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #f9f9f9;
}

.numeric-input:focus {
  border-color: #0056b3;
  box-shadow: 0 3px 9px rgba(0, 123, 255, 0.225);
  outline: none;
}
/* Keypad Section */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px; /* Increased gap size */
}

.keypad button {
  padding: 20px; /* Increased padding */
  font-size: 1.2em; /* Increased font size */
  border-radius: 10px; /* Slightly more rounded */
  background: linear-gradient(145deg, #007BFF, #0056b3);
  border: none;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* Slightly darker shadow */
}

.keypad button:hover {
  background: linear-gradient(145deg, #0056b3, #004494);
  transform: translateY(-2px); /* Slight lift effect */
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15); /* Enhanced shadow */
}

.keypad button:active {
  background: linear-gradient(145deg, #48494b, #003366);
  transform: translateY(0); /* Reset lift effect */
  box-shadow: none; /* Remove shadow on click */
}

/* Quick Amount Buttons */
.quick-amounts {
  margin-top: 10px;
  display: flex;
  gap: 10px; /* Increased gap size */
  justify-content: center;
  flex-wrap: wrap;
}

.quick-amount-btn {
  padding: 15px; /* Increased padding */
  font-size: 1.2em; /* Increased font size */
  border-radius: 10px; /* Slightly more rounded */
  background: linear-gradient(145deg, #28A745, #218838);
  border: none;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* Slightly darker shadow */
}

.quick-amount-btn:hover {
  background: linear-gradient(145deg, #218838, #1e7e34);
  transform: translateY(-2px); /* Slight lift effect */
}

.quick-amount-btn:active {
  background: linear-gradient(145deg, #1e7e34, #1c7430);
  transform: translateY(0); /* Reset lift effect */
  box-shadow: none; /* Remove shadow on click */
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Discount Section */
.discount-section {
  display: flex;
  gap: 7.5px;
  margin-bottom: 7.5px;
}

.discount-section input {
  padding: 5px;
  border: 1px solid #ccc; /* Slightly thicker border */
  border-radius: 7.5px;
  width: 75px;
}

.discount-section button {
  padding: 7.5px;
  border: none;
  border-radius: 7.5px;
  background-color: #007bff; /* Blue color for "Apply Discount" */
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* Slightly darker shadow */
}

.discount-section button:hover {
  background-color: #0056b3;
  transform: translateY(-2px); /* Slight lift effect */
}

.discount-section button:active {
  background-color: #004494;
  transform: translateY(0); /* Reset lift effect */
  box-shadow: none; /* Remove shadow on click */
}

/* Common Styles for Buttons */
button {
  font-family: 'Arial', sans-serif; /* Consistent font */
}


/* Payment Buttons */
.cash-btn {
  padding: 15px 20px; /* Increased padding */
  border: none;
  border-radius: 9px;
  background-color: #28a745; /* Green color for "Cash" */
  color: #fff;
  font-size: 1em; /* Increased font size */
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.cash-btn:hover {
  background-color: #218838;
  transform: translateY(-2px); /* Button lift effect on hover */
}

.mobile-btn {
  padding: 15px 20px; /* Increased padding */
  border: none;
  border-radius: 9px;
  background-color: #ffd700; /* Yellow color for "Mobile Payment" */
  color: #fff;
  font-size: 1em; /* Increased font size */
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.mobile-btn:hover {
  background-color: #d4af37;
  transform: translateY(-2px); /* Button lift effect on hover */
}

.complete-btn {
  padding: 15px 20px; /* Increased padding */
  border: none;
  border-radius: 9px;
  background-color: #007bff; /* Blue color for "Complete Order" */
  color: #fff;
  font-size: 1em; /* Increased font size */
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.complete-btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px); /* Button lift effect on hover */
}

.clear-btn {
  padding: 15px 20px; /* Increased padding */
  border: none;
  border-radius: 9px;
  background-color: #6c757d; /* Grey color for "Clear" */
  color: #fff;
  font-size: 1em; /* Increased font size */
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.clear-btn:hover {
  background-color: #5a6268;
  transform: translateY(-2px); /* Button lift effect on hover */
}

/* Common Styles for Buttons */
button {
  font-family: 'Arial', sans-serif; /* Consistent font */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

button:active {
  transform: translateY(0); /* Reset lift effect on click */
  box-shadow: none; /* Remove shadow on click */
}


/* Payment Summary */
.payment-summary {
  margin-top: 10px;
  width: 100%;
  background-color: #f9f9f9; /* Light background for better contrast */
  padding: 10px; /* Added padding */
  border-radius: 5px; /* Rounded corners */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.payment-summary ul {
  list-style: none;
  padding: 0;
}

.payment-summary li {
  display: flex; /* Flexbox for better alignment */
  justify-content: space-between; /* Space between items */
  padding: 5px 0; /* Increased padding */
  border-bottom: 1px solid #ccc; /* Slightly thicker border */
  transition: background-color 0.3s ease; /* Smooth transition on hover */
}

.payment-summary li:hover {
  background-color: #f1f1f1; /* Highlight on hover */
}

/* Change & Insufficient Amount */
.change, .insufficient-amount {
  font-size: 0.9em;
  margin-top: 10px;
  display: inline-block; /* Ensures proper spacing */
  padding: 5px 10px; /* Added padding */
  border-radius: 3px; /* Rounded corners */
}

.change {
  color: #28a745; /* Bootstrap green for consistency */
  background-color: #eaf5ea; /* Light green background */
  font-weight: bold;
}

.insufficient-amount {
  color: #dc3545; /* Bootstrap red for consistency */
  background-color: #f8d7da; /* Light red background */
  font-weight: bold;
}




#qr-code-dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-in-out; /* Smooth entry animation */
}

.qr-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  width: 90%; /* Improved responsiveness */
  max-width: 350px; /* Limit max size */
  animation: slideUp 0.3s ease-in-out; /* Add subtle slide effect */
}

#qr-code-image {
  margin: 1.5rem 0; /* Increased spacing */
  border: 4px solid #eee;
  border-radius: 10px;
  max-width: 100%; /* Makes it responsive */
}

.close-qr {
  color: #aaa;
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.close-qr:hover {
  color: #fff; /* Visually engaging hover effect */
}

button.done-btn {
  padding: 10px 15px; /* More balanced padding */
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

button.done-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05); /* Subtle hover scaling */
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Mobile Responsive Fixes */
@media screen and (max-width: 480px) {
  .dialog-content {
    width: 60%;
    padding: 7.5px;
  }
  .keypad {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Order History Styling */
.order-history-item {
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 10px;
  background-color: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.order-header h3 {
  margin: 0 0 10px;
  font-size: 1.4em;
  color: #333;
}

.order-header p {
  margin: 0;
  color: #666;
  font-size: 0.9em;
}

.order-details {
  margin-top: 10px;
  line-height: 1.5;
}

.order-details p {
  margin: 8px 0;
  font-size: 0.95em;
}

.order-items {
  margin-top: 15px;
}

.order-items table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

.order-items th,
.order-items td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.order-items th {
  background-color: #f8f8f8;
  font-weight: bold;
  text-align: center;
}

.order-payments {
  margin-top: 15px;
}

/* Button styles */
button {
  display: inline-block;
  padding: 10px 18px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

/* Dialog box styles */
.dialog {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.dialog-content {
  background-color: #ffffff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 16px;
  color: #888;
  font-size: 22px;
  cursor: pointer;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: #000;
}

/* Mobile-friendly adjustments */
@media (max-width: 600px) {
  .order-header h3 {
    font-size: 1.2em;
  }

  .order-header p,
  .order-details p {
    font-size: 0.85em;
  }

  button {
    font-size: 0.9em;
    padding: 8px 15px;
  }

  .dialog-content {
    margin: 20% auto;
    width: 95%;
    padding: 15px;
  }
}

/* Responsive styles */
@media screen and (max-width: 600px) {
  body {
    font-size: 12px;
  }
  .container {
    width: 100%;
  }
  main {
    flex-direction: column;
    padding: 10px;
  }
  .table-management, .order-section, .payment-section {
    padding: 15px;
    margin: 10px 0;
  }
  .menu-item img {
    width: 60px;
    height: 48px;
  }
  .menu-item p, .menu-item .price {
    font-size: 0.7em;
  }
}
#qr-code {
  margin-top: 20px;
  text-align: center;
}

#qr-code img {
  width: 200px;
  height: 200px;
  margin-top: 10px;
}




.primary-btn {
  background-color: #007BFF;
  color: white;
}

.primary-btn:hover {
  background-color: #0056b3;
}

.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
  animation: fadeIn 0.5s; /* Smooth fade-in animation */
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ccc;
  width: 90%;
  max-width: 600px; /* Limit max width */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a shadow */
  border-radius: 8px; /* Rounded corners */
  animation: slideIn 0.5s; /* Smooth slide-in animation */
}

@keyframes slideIn {
  from {transform: translateY(-100px);}
  to {transform: translateY(0);}
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover, .close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.select {
  width: 100%;
  padding: 8px;
  margin: 10px 0;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.extras-container {
  margin: 15px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
}

.extra-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 16px; /* Rounded corners to resemble app icons */
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.extra-item:hover {
  background-color: #f0f0f0;
  transform: translateY(-5px);
}

.extra-item img {
  width: 50px; /* Smaller width to resemble app icons */
  height: 50px; /* Smaller height to resemble app icons */
  border-radius: 12px; /* Rounded corners for images */
  object-fit: cover;
  margin-bottom: 10px;
}

.extra-item span {
  text-align: center;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.order-items-list {
  list-style-type: none;
  padding: 0;
  margin-top: 15px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.total-price-container {
  margin-top: 10px;
  font-weight: bold;
  text-align: center;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.dialog-box {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}
.dialog-box.active {
  display: block;
}
.dialog-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
.dialog-overlay.active {
  display: block;
}
.menu-management {
  padding: 20px;
}

.menu-item-form {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

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

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

.action-btn {
  background-color: #007BFF;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  margin-right: 5px;
}

.action-btn.primary {
  background-color: #007BFF;
}

.action-btn.secondary {
  background-color: #6C757D;
}

.action-btn.edit-btn {
  background-color: #28A745;
}

.action-btn.delete-btn {
  background-color: #DC3545;
}

.search-bar input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #ccc;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  background-color: #f9f9f9;
}

.item-details p {
  margin: 0;
}

.item-actions {
  display: flex;
  gap: 10px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
}
/* Modern UI Components */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
}

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


/* Add more status classes as needed */
/* Media Queries for Responsive Design */
@media (max-width: 768px) {
  .pos-container {
    flex-direction: column;
  }

  .table-management, .order-section, .order-summary {
    width: 100%;
    max-width: none;
  }

  .menu-item {
    width: 45%;
    padding: 8px;
  }



  .dialog-content {
    width: 90%;
    padding: 15px;
  }
}
button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px; /* Smooth, modern corners */
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background 0.3s ease-in-out;
  background: linear-gradient(to right, #6a11cb, #2575fc); /* Eye-catching gradient */
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); /* Subtle depth effect */
}

button:hover {
  transform: translateY(-3px) scale(1.05); /* Smooth hover scaling */
  background: linear-gradient(to right, #2575fc, #6a11cb); /* Reverse gradient on hover */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); /* Elevated shadow for interaction feedback */
}

button:active {
  transform: scale(0.95); /* Subtle press effect */
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2); /* Slightly reduced shadow on press */
}


.table-card {
  padding: 10px; /* Slightly larger padding for better clickability */
  margin: 5px; /* Improved spacing */
  border-radius: 5px; /* Softer edges for a cleaner look */
  cursor: pointer;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* Subtle shadow for depth */
}

.table-card:hover {
  transform: translateY(-3px); /* Smooth hover effect */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Elevated shadow on hover */
}

.table-card.available {
  background-color: #4CAF50;
  color: white;
  font-weight: bold; /* Enhanced visibility */
}

.table-card.occupied {
  background-color: #f44336;
  color: white;
  opacity: 0.85; /* Slight fade for visual cue */
}

.table-card.selected {
  border: 4px solid #ffeb3b; /* Enhanced border width for selection */
  background-color: #fffbe6; /* Soft yellow background for better focus */
  color: #000; /* Black text for contrast */
  box-shadow: 0 4px 10px rgba(255, 235, 59, 0.4); /* Glow effect */
}


.dialog {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.dialog-content {
  background-color: #fefefe;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}


.order-item.finalized {
  background-color: #f0f0f0;
  color: #666;
}

.order-item button {
  margin-left: auto;
  color: #dc3545;
  border: none;
  background: none;
  cursor: pointer;
}

#payment-dialog {
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
}

.payment-container {
  background: white;
  width: 800px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.payment-left {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 12px 0 0 12px;
}

.payment-right {
  padding: 2rem;
}

.payment-header {
  border-bottom: 1px solid #ddd;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.amount-display {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin: 1rem 0;
}

.professional-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.keypad-btn {
  padding: 1rem;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  font-size: 1.2rem;
  transition: all 0.2s;
}

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

.payment-methods {
  display: grid;
  gap: 10px;
  margin-top: 1.5rem;
}

.method-btn {
  padding: 1rem;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}

.method-btn:hover {
  background: #f8f9fa;
}



/* Modern Buttons */
.btn-primary {
  background: #007bff;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #0069d9;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.item-timer {
  font-size: 0.8em;
  color: #666;
  margin-top: 5px;
}


.sales-metric {
  background: linear-gradient(135deg, var(--primary), #1A365D);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.875rem;
}

.positive {
  background: rgba(0, 200, 83, 0.15);
  color: var(--accent);
}

.negative {
  background: rgba(211, 47, 47, 0.15);
  color: var(--error);
}

button {
  padding: 10px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

button:hover {
  transform: translateY(-3px);
  background-color: #0056b3;
}

.category-section {
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid #ddd; /* Section separator */
}

.category-metrics {
  display: flex;
  flex-wrap: wrap; /* Allows wrapping for responsive layout */
  gap: 1rem;
  justify-content: center; /* Center category metrics */
}

.report-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

button {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px; /* Softer corners */
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem; /* Slightly larger font for better visibility */
  transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.print-button {
  background: #4CAF50;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

.print-button:hover {
  background: #3e8e41; /* Darker green on hover */
  transform: scale(1.05); /* Hover effect */
}

.reset-button {
  background: #f44336;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.reset-button:hover {
  background: #d32f2f; /* Darker red on hover */
  transform: scale(1.05);
}

.history-container {
  margin: 20px 0;
  padding: 15px; /* Improved padding for usability */
  border: 1px solid #ddd;
  border-radius: 10px; /* Rounded corners for clean design */
  background: #f8f9fa; /* Light background for readability */
}

.history-container p {
  padding: 10px; /* Larger padding for better spacing */
  margin: 8px 0; /* Increased spacing between entries */
  background-color: #ffffff; /* Clean white background */
  border-radius: 8px; /* Rounded corners for modern design */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}
.discount-controls {
  margin: 10px 0;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.discount-controls button {
  padding: 5px 10px;
  background: #17a2b8;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.discount-controls input {
  width: 60px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.kot {
  border: 2px solid #000;
  padding: 15px;
  margin: 10px;
  font-family: monospace;
}

.discounted {
  color: #dc3545;
  font-size: 0.9em;
  margin-left: 10px;
}
.scrollable-table {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #ccc;
}

.scrollable-table thead {
  position: sticky;
  top: 0;
  background: white;
}

.payment-dialog {
  background: rgba(255, 255, 255, 0.95);

  border-radius: 16px;
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.2);
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 400px;
}

.payment-key {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: var(--surface);
  border-radius: 8px;
  transition: all 0.1s ease;
}

.payment-key:active {
  transform: scale(0.95);
}

/* Table Card/Button Styling */
.table-card, .table-btn {
  padding: 12px; /* Slightly increased padding for better clickability */
  margin: 6px; /* Consistent spacing */
  border-radius: 6px; /* Smooth corners */
  cursor: pointer;
  text-align: center;
  font-weight: 600; /* Bolder text for readability */
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); /* Enhanced shadow for depth */
  border: none; /* Remove border for cleaner look */
  color: white; /* Ensure text is always white for contrast */
  opacity: 1; /* Remove any fade effect */
}

/* Available Table */
.table-card.available, .table-btn.available {
  background-color: #28a745; /* Vibrant green for available tables */
}

/* Occupied Table */
.table-card.occupied, .table-btn.occupied {
  background-color: #dc3545; /* Vibrant red for occupied tables */
}

/* Selected Table */
.table-card.selected, .table-btn.selected {
  background-color: #007bff; /* Vibrant blue for selected tables */
  border: 3px solid #ffeb3b; /* Bright yellow border for emphasis */
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4); /* Blue glow effect */
  color: white; /* Ensure text remains white */
}

/* Hover Effect */
.table-card:hover, .table-btn:hover {
  transform: translateY(-2px); /* Subtle lift */
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2); /* Stronger shadow on hover */
  filter: brightness(1.1); /* Slightly brighten on hover */
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .table-card, .table-btn {
    padding: 10px;
    margin: 4px;
    font-size: 11px; /* Slightly smaller font for mobile */
  }
}.menu-item img { width: 100px; height: 100px; }
.dialog, .modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}
.dialog-content, .modal-content {
  background: white;
  margin: 10% auto;
  padding: 20px;
  width: 80%;
  max-width: 600px;
}
.order-item { margin: 5px 0; }
.remove-item { margin-left: 10px; }
.btn { padding: 5px 10px; margin: 5px; }
.sidebar {
  width: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  background: #f8f8f8;
  overflow-x: hidden;
  transition: 0.3s;
}
.sidebar.active { width: 250px; }


#payment-dialog {
  display: none;
}
#payment-dialog.visible {
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 250px;
  height: 100%;
  position: fixed;
  left: -250px; /* Hidden by default */
  top: 0;
  background: #111;
  padding-top: 20px;
  transition: left 0.3s ease-in-out;
  z-index: 1000; /* Ensure sidebar is above other content */
}

.sidebar.active {
  left: 0; /* Visible when active */
}

/* Main Content */
main {
  padding: 15px;
  transition: margin-left 0.3s ease-in-out; /* Smooth transition for margin */
}

/* Shift main content when sidebar is active */
.sidebar.active + main {
  margin-left: 250px; /* Match sidebar width */
}

/* Tables Dashboard */
.tables-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  padding: 1rem;
  /* Ensure it doesn't overlap with sidebar */
  margin-left: 0;
  transition: margin-left 0.3s ease-in-out;
}

/* Table Card/Button Styling */
.table-card, .table-btn {
  padding: 12px;
  margin: 6px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  border: none;
  color: white;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .sidebar {
    width: 100%; /* Full-screen sidebar on mobile */
    left: -100%;
  }

  .sidebar.active {
    left: 0;
  }

  .sidebar.active + main {
    margin-left: 0; /* No margin on mobile, as sidebar covers content */
  }

  .tables-dashboard {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Smaller cards on mobile */
  }

  .table-card, .table-btn {
    padding: 10px;
    margin: 4px;
    font-size: 11px;
  }
}

