/* Modern Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --text-primary: #2d3436;
  --text-secondary: #6c757d;
  --border-color: #e9ecef;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --hover-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --primary-color: #3498db;
  --primary-hover: #2980b9;
}

[data-theme="dark"] {
  --bg-primary: #1a1d21;
  --bg-secondary: #242931;
  --text-primary: #e9ecef;
  --text-secondary: #adb5bd;
  --border-color: #2d3436;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  --hover-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  --primary-color: #2980b9;
  --primary-hover: #3498db;
}

/* Base Styles */
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button - Fixed Position */
.theme-toggle {
  position: fixed;
  top: 16px; /* Align with navbar height */
  right: 120px; /* More space from logout */
  z-index: 1030; /* Above navbar */
  width: 38px;
  height: 38px;
  padding: 7px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--card-shadow);
  position: fixed !important; /* Ensure sticky */
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: var(--hover-shadow);
}

.theme-toggle i {
  font-size: 1.1rem;
  color: var(--text-primary);
}

/* Navbar Styling */
.nav-tabs {
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
  background-color: var(--bg-secondary);
}

.nav-tabs .nav-link {
  border: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-tabs .nav-link:hover {
  color: var(--primary-color);
}

.nav-tabs .nav-link.active {
  color: var(--primary-color);
  background: none;
  border: none;
}

.nav-tabs .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #3498db;
  transition: all 0.3s ease;
}

/* Updated Navbar Styling */
.main-nav {
  background-color: var(--bg-secondary);
  padding: 1rem;
  box-shadow: var(--card-shadow);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.navbar-nav {
  gap: 0.5rem; /* Add consistent spacing between nav items */
}

.navbar-nav .nav-link {
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  margin: 0 0.2rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(52, 152, 219, 0.1);
  font-weight: 500;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(52, 152, 219, 0.05);
}

/* Ensure even spacing in navbar */
.navbar-nav:not(.ms-auto) {
  margin-right: auto;
}

/* Navbar and Theme Toggle Refinements */
.navbar-nav .nav-item:last-child {
  margin-left: 3rem; /* Add space before logout */
}

/* Card Styling */
.card {
  cursor: pointer;
  background-color: var(--bg-secondary);
  border: none;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

.card-body {
  padding: 1.5rem;
}

/* Table Styling */
.table {
  border-collapse: separate;
  border-spacing: 0 8px;
  margin-top: -8px;
  color: var(--text-primary);
}

.table thead th {
  border-bottom: none;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 1rem;
  background-color: var(--bg-secondary);
}

/* Ensure all rows have a white background */
.table tbody tr {
  background-color: var(--bg-secondary) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Optional: Remove any hover effects if unwanted */
.table tbody tr:hover {
  background-color: var(--bg-primary) !important; /* Slight hover effect */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.table td {
  padding: 1rem;
  vertical-align: middle;
  border: none;
}

.table td span.badge {
  font-size: 0.9em;
  font-weight: bold;
  border-radius: 4px;
}

/* Button Styling */
.btn {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* Input Styling */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* Input placeholder color */
.form-control::placeholder {
  color: var(--text-secondary);
}

/* Badge Styling */
.badge {
  padding: 0.5rem 0.8rem;
  font-weight: 500;
  border-radius: 6px;
}

/* Fulfillment Logs Timeline */
#fulfillmentLogs {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 20px;
  padding: 10px 0;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  margin-top: 15px;
}

#fulfillmentLogs .timeline-item {
  flex: 0 0 auto;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid #ddd;
  min-width: 200px;
}

#fulfillmentLogs .timeline-item .timestamp {
  font-size: 0.8rem;
  color: #6c757d;
}

#fulfillmentLogs .timeline-item .status {
  font-weight: bold;
  margin-top: 5px;
}

#fulfillmentLogs .timeline-item .rider {
  font-size: 0.9rem;
  color: #495057;
  margin-top: 5px;
}

/* Order Logs Timeline */
#orderLogs {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 20px; /* Space between timeline items */
  padding: 10px 0;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  margin-top: 15px;
}

#orderLogs .timeline-item {
  flex: 0 0 auto;
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid #ddd;
  min-width: 200px; /* Set a consistent width for each card */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for better visibility */
}

#orderLogs .timeline-item .timestamp {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 5px;
}

#orderLogs .timeline-item .status {
  font-weight: bold;
  font-size: 1rem;
  color: #495057;
  margin-bottom: 5px;
}

#orderLogs .timeline-item .time-difference {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Timeline Styling */
.timeline {
  display: flex;
  overflow-x: auto;
  padding: 1rem 0;
  gap: 1rem;
  scrollbar-width: thin;
  scrollbar-color: #3498db #f8f9fa;
}

.timeline::-webkit-scrollbar {
  height: 6px;
}

.timeline::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 3px;
}

.timeline::-webkit-scrollbar-thumb {
  background-color: #3498db;
  border-radius: 3px;
}

.timeline-item {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
  border: 1px solid var(--border-color);
}

.timeline-item:hover {
  transform: translateY(-2px);
}

/* Mobile Responsive Styles for Order ID Search Bar */
@media (max-width: 768px) {
  .input-group {
    flex-direction: column;
  }

  .input-group .form-control {
    margin-bottom: 10px;
    width: 100%; /* Ensure the input takes full width */
  }

  .input-group .btn {
    width: 100%; /* Ensure the button takes full width */
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .nav-tabs .nav-link {
    padding: 0.6rem 1rem;
  }

  .table td, .table th {
    padding: 0.75rem;
  }

  .timeline {
    gap: 0.75rem;
  }

  .timeline-item {
    min-width: 180px;
    padding: 0.75rem;
  }

  .form-control, .form-select, .btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  
  #filterContainer, #dateFilterContainer {
    gap: 0.5rem;
  }
  
  .table-responsive {
    margin: 0 -1rem;
    padding: 0 1rem;
    width: calc(100% + 2rem);
  }

  .input-group {
    flex-direction: column;
  }

  .input-group .form-control {
    margin-bottom: 10px;
  }

  .input-group .btn {
    width: 100%;
  }

  #filterContainer, #dateFilterContainer {
    flex-direction: column;
  }

  #filterContainer .form-control, #dateFilterContainer .form-select, #dateFilterContainer .form-control {
    margin-bottom: 10px;
  }

  #filterContainer .btn {
    width: 100%;
  }

  .table-responsive {
    overflow-x: auto;
  }

  .table th, .table td {
    white-space: nowrap;
  }
  
  .theme-toggle {
    top: 15px;
    right: 70px;
  }
  
  .navbar-nav .nav-item:last-child {
    margin-left: 0;
  }
}

/* Mobile Responsive Styles for Order Details */
@media (max-width: 768px) {
  .card {
    padding: 15px;
  }

  .table-responsive {
    overflow-x: auto;
  }

  .timeline {
    flex-direction: row;
    gap: 10px;
  }

  .timeline-item {
    min-width: 100%;
  }

  #actionButtons {
    flex-direction: row;
  }

  #actionButtons .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Animation Styles */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table tbody tr, .card, .timeline-item {
  animation: fadeIn 0.3s ease forwards;
}

/* Status Badge Colors */
.badge-created { background-color: #ffeaa7; color: #d35400; }
.badge-pending { background-color: #fab1a0; color: #c0392b; }
.badge-paid { background-color: #55efc4; color: #00b894; }
.badge-delivered { background-color: #81ecec; color: #00cec9; }

/* Loading Indicator */
.loading-indicator {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.spinner-border {
  color: #3498db;
  width: 2rem;
  height: 2rem;
}

/* No Results Message */
.no-results {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
  font-weight: 500;
}

/* Restaurant Card Styling */
.restaurant-card {
  height: 100%;
  padding: 2.5rem 1.5rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.restaurant-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

.restaurant-card.inactive {
  border-left: 4px solid #dc3545;
}

.restaurant-card.active {
  border-left: 4px solid #28a745;
}

.restaurant-card .store-id {
  position: absolute;
  top: 0.75rem;
  left: 1rem; /* Change from right to left for better layout */
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--bg-primary);
  border-radius: 4px;
  z-index: 1;
  max-width: calc(100% - 2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.restaurant-card .restaurant-name {
  font-size: 1.1rem;
  line-height: 1.4;
  margin: 0.5rem 0 1rem;
  padding-right: 0;
  word-break: break-word;
  min-height: 2.8rem; /* Ensure consistent height for title */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.restaurant-card .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: auto;
}

.restaurant-card .info-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.restaurant-card .info-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.restaurant-card .info-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.restaurant-card .map-link {
  color: var(--primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.restaurant-card .map-link:hover {
  text-decoration: underline;
}

.restaurant-card .btn-primary {
  padding: 0.6rem 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.restaurant-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

/* Enhanced Restaurant Card Styling */
.restaurant-card {
    padding: 1.5rem;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.restaurant-card.inactive {
    border-left: 4px solid #dc3545;
}

.restaurant-card.active {
    border-left: 4px solid #28a745;
}

.restaurant-card .store-id {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    background-color: var(--bg-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.restaurant-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 0.5rem;
}

.restaurant-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    flex: 1;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-badge.inactive {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-word;
}

.restaurant-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
}

.address-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.map-link:hover {
    text-decoration: underline;
}

/* No More Restaurants Message */
#noMoreRestaurantsMessage {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-top: 2rem;
    display: none;
}

#noMoreRestaurantsMessage i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Mobile Responsiveness Updates */
@media (max-width: 768px) {
    .restaurant-card {
        padding: 1.25rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .restaurant-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .status-badge {
        align-self: flex-start;
    }

    .store-id {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Loading Indicator for Restaurants */
#loadingIndicator {
    text-align: center;
    padding: 2rem;
    display: none;
}

#loadingIndicator .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

/* Search Bar Styling */
.search-bar {
  margin-bottom: 2rem;
}

.search-bar .form-control {
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  border-radius: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.search-bar .form-control:focus {
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  border-color: var(--primary-color);
}

/* Restaurant Card Grid - Updated for better responsiveness */
#restaurantsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
  align-items: stretch;
}

.restaurant-card {
  height: 100%;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.restaurant-card .info-grid {
  flex: 1;
  margin: 1rem 0;
}

.restaurant-card .restaurant-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Responsive grid adjustments */
@media (min-width: 1400px) {
  #restaurantsGrid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 992px) and (max-width: 1399px) {
  #restaurantsGrid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  #restaurantsGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  #restaurantsGrid {
    grid-template-columns: 1fr;
  }
  
  .restaurant-card {
    min-height: unset;
  }
}

@media (min-width: 1400px) {
  #restaurantsGrid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 992px) and (max-width: 1399px) {
  #restaurantsGrid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  #restaurantsGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  #restaurantsGrid {
    grid-template-columns: 1fr;
  }
  
  .theme-toggle {
    right: 70px;
    top: 15px;
  }
}

/* Restaurant Card Grid */
#restaurantsGrid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    margin: 0 auto;
    max-width: 1400px;
}

.restaurant-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 20px;
    width: 340px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.restaurant-card.active {
    border-left: 5px solid #4caf50;
}

.restaurant-card.inactive {
    border-left: 5px solid #ff4c4c;
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.store-id {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 5px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.restaurant-header {
    margin-top: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.restaurant-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    padding-right: 80px;
    line-height: 1.4;
}

.status-badge {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
    padding: 10px 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.4;
}

.restaurant-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.address-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    padding: 5px 0;
}

.map-link:hover {
    text-decoration: underline;
}

.btn-primary {
    margin-top: 10px;
    padding: 10px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Search Bar Enhancement */
.search-bar {
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.search-bar .input-group {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-bar .form-control {
    height: 50px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
}

/* Loading and No More Messages */
#loadingIndicator,
#noMoreRestaurantsMessage {
    width: 100%;
    text-align: center;
    padding: 30px;
    margin: 20px 0;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #restaurantsGrid {
        padding: 10px;
        gap: 15px;
    }

    .restaurant-card {
        width: 100%;
        margin: 0;
    }

    .search-bar {
        padding: 0 15px;
    }
}

/* Enhanced Search Bar */
.search-bar {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

.search-bar .input-group {
    padding: 5px;
    background: var(--bg-secondary);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-bar .input-group:focus-within {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.search-bar .input-group-text {
    border: none;
    background: transparent;
    padding-left: 15px;
}

.search-bar .form-control {
    height: 55px;
    font-size: 1.1rem;
    border: none;
    padding: 10px 20px;
    background: transparent;
}

.search-bar .form-control:focus {
    box-shadow: none;
}

/* Enhanced Card Hover Effects */
.restaurant-card {
    transform-origin: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.restaurant-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.restaurant-card .btn-primary {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.restaurant-card:hover .btn-primary {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.restaurant-card .map-link {
    transition: all 0.2s ease;
}

.restaurant-card .map-link:hover {
    color: var(--primary-hover);
    transform: translateX(3px);
}

/* Enhance Status Badge */
.status-badge {
    margin-top: 12px;
    transition: all 0.2s ease;
}

.status-badge.active {
    background-color: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.status-badge.inactive {
    background-color: rgba(255, 76, 76, 0.15);
    color: #ff4c4c;
}

.status-badge:hover {
    transform: scale(1.05);
}

/* Better Card Info Layout */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 15px 0;
}

.info-item {
    transition: all 0.2s ease;
}

.info-item:hover {
    transform: translateX(3px);
}

.info-label i {
    transition: transform 0.2s ease;
}

.info-item:hover .info-label i {
    transform: scale(1.2);
}

/* Responsive Grid Improvements */
@media (min-width: 1400px) {
    #restaurantsGrid {
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
        max-width: 1600px;
        margin: 0 auto;
        padding: 20px 40px;
    }
}

@media (max-width: 768px) {
    .search-bar {
        margin: 20px auto;
    }
    
    .search-bar .form-control {
        height: 50px;
        font-size: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .restaurant-card {
        margin: 10px;
    }
    
    .restaurant-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

#restaurantsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    padding: 25px;
    max-width: 1600px;
    margin: 0 auto;
}

.restaurant-card {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: calc(var(--animation-order) * 0.1s);
    opacity: 0;
}

.search-bar {
    margin: 40px auto;
    animation: fadeInUp 0.5s ease;
}

#loadingIndicator {
    margin: 40px auto;
    padding: 40px;
}

#loadingIndicator .spinner-border {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

#noMoreRestaurantsMessage {
    margin: 40px auto;
    padding: 30px;
    font-size: 1.1rem;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

/* Add these styles at the end of the file */
.table-responsive {
  margin-top: 20px;
  clear: both;
}

#filterContainer, #dateFilterContainer {
  margin-bottom: 15px;
}

.nav-container + .table-responsive {
  margin-top: 20px;
}

/* Search Container Enhancements */
.search-container {
  max-width: 600px;
  margin: 0 auto 2rem;
  padding: 0 15px;
}

.search-container .input-group {
  flex-wrap: nowrap;
  background: var(--bg-secondary);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.search-container .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.search-container .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  white-space: nowrap;
}

/* Mobile Responsive Search */
@media (max-width: 768px) {
  .search-container {
    padding: 0 10px;
  }

  .search-container .input-group {
    flex-direction: row;
    gap: 0;
  }

  .search-container .form-control {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .search-container .btn {
    width: auto;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}

/* Improve icon visibility in the sidebar */
.sidebar-nav .nav-link i {
    font-size: 1.2rem;
    color: #ffffff;  /* Make icons white for better visibility */
    margin-right: 10px;  /* Add some space between icon and text */
    opacity: 0.9;  /* Slightly reduce opacity for softer look */
}

.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link.active i {
    opacity: 1;  /* Full opacity on hover and active state */
}

/* Dark theme specific adjustments */
html[data-theme="dark"] .sidebar-nav .nav-link i {
    color: #ffffff;
    opacity: 0.85;
}

html[data-theme="dark"] .sidebar-nav .nav-link:hover i,
html[data-theme="dark"] .sidebar-nav .nav-link.active i {
    opacity: 1;
}

#sidebar {
    background: #1e2a3a;  /* Slightly lighter dark blue for better contrast */
}

.sidebar-nav .nav-link {
    padding: 15px 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    opacity: 0.9;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: #2c3e50;
    color: #ffffff;
    opacity: 1;
}