:root {
  --primary-color: #1976d2;
  --secondary-color: #2196f3;
  --accent-color: #bbdefb;
  --text-on-primary: white;
  --background-color: #f5f5f5;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', Arial, sans-serif;
  background-color: var(--background-color);
  color: #333;
  padding-top: 60px;  /* Space for fixed header */
  padding-bottom: 60px; /* Space for fixed footer */
  min-height: 100vh;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--primary-color);
  color: var(--text-on-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--primary-color);
  color: var(--text-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.content {
  padding: 20px;
  overflow-y: auto;
}

/* Login Form Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 120px);
}

.login-form {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-form h2 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #666;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 15px;
  border-radius: 4px;
  width: 100%;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
}

.btn:hover {
  background-color: var(--secondary-color);
}

.hidden {
  display: none;
}

/* Food Items Grid */
.food-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.food-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.food-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.food-img {
  height: 180px;
  background-color: #eee;
  overflow: hidden;
}

.food-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.food-item:hover .food-img img {
  transform: scale(1.1);
}

.food-info {
  padding: 15px;
}

.food-info h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.food-price {
  font-weight: bold;
  color: #e91e63;
  margin: 10px 0;
}

.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile Optimization CSS - Add to your style.css */

/* Base mobile optimizations */
html {
  font-size: 14px; /* Smaller base font size for mobile */
}

/* Mobile-first responsive typography */
@media (max-width: 480px) {
  html {
    font-size: 12px; /* Even smaller for phone-sized devices */
  }
  
  h1 { font-size: 1.8rem !important; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.3rem !important; }
  h4 { font-size: 1.2rem !important; }
  h5 { font-size: 1.1rem !important; }
  h6 { font-size: 1rem !important; }
  
  .page-title {
    font-size: 1.4rem !important;
    margin: 0.7rem 0 !important;
    padding: 0 10px !important;
  }
  
  p, span, div, td, th {
    font-size: 0.9rem !important;
  }
  
  /* Smaller icons for mobile */
  .material-icons {
    font-size: 20px !important;
  }
  
  .stat-card .material-icons {
    font-size: 24px !important;
  }
}

/* Mobile layout containers */
@media (max-width: 600px) {
  .container {
    width: 100% !important;
    padding: 0 8px !important;
    margin: 0 !important;
  }
  
  /* Tighter spacing */
  .row {
    margin-bottom: 8px !important;
  }
  
  .row .col {
    padding: 0 4px !important;
  }
  
  /* Card adjustments */
  .card {
    margin: 4px 0 !important;
  }
  
  .card .card-content {
    padding: 12px !important;
  }
  
  .card .card-action {
    padding: 8px 12px !important;
  }
  
  /* Stat card height */
  .stat-card {
    height: auto !important;
    min-height: 100px !important;
  }
  
  .stat-card h3 {
    font-size: 1.4rem !important;
    margin: 6px 0 !important;
  }
  
  .stat-card .card-title {
    font-size: 0.9rem !important;
    margin-bottom: 6px !important;
  }
  
  .stat-card .stat-change {
    font-size: 0.7rem !important;
    margin-top: 4px !important;
  }
}

/* Mobile-friendly tables */
@media (max-width: 600px) {
  .table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 0 -8px !important;
    padding: 0 8px !important;
    width: calc(100% + 16px) !important;
  }
  
  /* Smaller table text */
  table {
    font-size: 0.85rem !important;
  }
  
  table th, table td {
    padding: 8px 5px !important;
  }
  
  /* Smaller status badges */
  .status-badge {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
    border-radius: 2px !important;
  }
  
  /* More compact buttons */
  .btn-small {
    height: 28px !important;
    line-height: 28px !important;
    padding: 0 8px !important;
  }
  
  .btn-small i {
    font-size: 16px !important;
    margin-right: 0 !important;
  }
}

/* Navbar mobile optimizations */
@media (max-width: 600px) {
  nav .nav-wrapper {
    padding: 0 8px !important;
    height: 56px !important;
  }
  
  nav .brand-logo {
    font-size: 1.1rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
  
  nav .brand-logo img {
    height: 30px !important;
    width: 30px !important;
    margin-right: 4px !important;
  }
  
  nav .sidenav-trigger {
    margin: 0 !important;
  }
  
  /* Hide elements that take too much space on mobile */
  .user-info-text {
    display: none !important;
  }
  
  /* Adjust badge position */
  .badge {
    min-width: 14px !important;
    height: 14px !important;
    line-height: 14px !important;
    font-size: 8px !important;
  }
}

/* Touch-friendly interactions */
@media (max-width: 600px) {
  /* Larger touch targets */
  .nav-icon, 
  .sidenav-link,
  .dropdown-content li > a {
    padding: 12px 16px !important;
  }
  
  /* Add spacing between clickable elements */
  .right-actions .nav-icon {
    margin: 0 6px !important;
  }
}

/* Fixed navbar and sidenav styles */
.navbar-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

/* Ensure sidenav is visible */
.sidenav {
  width: 250px !important;
  transition: transform 0.3s !important;
}

/* Mobile view fixes */
@media only screen and (max-width: 600px) {
  /* Make sure the logout button is visible */
  nav .right {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
  }
  
  /* Ensure logout icon isn't cut off */
  .logout-button {
    padding: 0 10px !important;
    margin-right: 5px !important;
  }
  
  /* Ensure logo isn't cut off */
  nav .sidenav-trigger {
    margin: 0 10px !important;
  }
  
  /* Adjust username display size */
  .user-display {
    font-size: 11px !important;
    margin-left: 55px !important;
  }
}

/* Manual sidenav classes for fallback */
.sidenav.manual-open {
  transform: translateX(0) !important;
  visibility: visible !important;
}

.sidenav-overlay.manual {
  display: block;
  opacity: 1;
  background-color: rgba(0,0,0,0.5);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 997;
}

/* Add this to your styles.css or in a style tag */
.error-message {
    margin: 15px 0;
    padding: 10px 15px;
    border-left: 4px solid #f44336;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.error-message i.left {
    margin-right: 10px;
}

.error-message i.right {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Order Confirmation Modal Styling */
.order-confirm-items {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.order-confirm-item {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.order-confirm-item:last-child {
    border-bottom: none;
}

.order-confirm-item-details {
    flex: 1;
}

.order-confirm-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.order-confirm-item-variations {
    font-size: 0.75rem;
    color: #666;
}

.order-confirm-item-price {
    font-weight: 500;
    color: #3498db;
    margin-left: 10px;
    white-space: nowrap;
}

.order-total-section {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.order-details-section h6 {
    margin-bottom: 15px;
    font-weight: 600;
}