/* Base Styles */
:root {
    --primary-color: #e67e22;
    --secondary-color: #2c3e50;
    --accent-color: #16a085;
    --background-color: #f7f7f7;
    --button-color: #e74c3c;
    --text-color: #333;
    --text-light: #fff;
    --sidebar-width: 280px;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
  }
  
  body {
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
  }
  
  /* Loading Animation */
  .loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  .loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--secondary-color);
  color: var(--text-light);
  transition: var(--transition);
  z-index: 100;
  overflow-y: auto;
}

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

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.user-profile {
  display: flex;
  align-items: center;
  margin-top: 1rem;
}

.user-profile img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1rem;
}

.user-info h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.user-info p {
  font-size: 0.8rem;
  color: #bbb;
}

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

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 0.5rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.sidebar-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
}

.sidebar-nav li.active a {
  background-color: rgba(230, 126, 34, 0.1);
  color: var(--primary-color);
}

.sidebar-nav li.active a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--primary-color);
}

.sidebar-nav i {
  font-size: 1.2rem;
  margin-right: 1rem;
  width: 20px;
  text-align: center;
}

.sidebar-nav span {
  flex: 1;
}

.badge {
  background-color: var(--button-color);
  color: white;
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: bold;
}

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

.logout-btn {
  display: flex;
  align-items: center;
  color: #bbb;
  text-decoration: none;
  transition: var(--transition);
}

.logout-btn:hover {
  color: var(--button-color);
}

.logout-btn i {
  margin-right: 1rem;
}
  
  /* Main Content */
  .main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
  }
  
  .top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }
  
  .search-bar {
    position: relative;
    width: 40%;
  }
  
  .search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
  }
  
  .search-bar input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: var(--transition);
  }
  
  .search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
  }
  
  .nav-icons {
    display: flex;
    gap: 1.5rem;
  }
  
  .notification, .cart {
    position: relative;
    cursor: pointer;
    color: var(--secondary-color);
  }
  
  .notification i, .cart i {
    font-size: 1.2rem;
  }
  
  .notification:hover, .cart:hover {
    color: var(--primary-color);
  }
  
  .nav-icons .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--button-color);
    color: white;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
  }
  
  /* Orders Specific Styles */
  .orders-content {
    padding: 2rem;
    animation: fadeIn 0.5s ease-out;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
  }
  
  .orders-header h1 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    font-family: 'Playfair Display', serif;
  }
  
  .order-filter {
    display: flex;
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.5rem 1.2rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .filter-btn:hover {
    background: #f5f5f5;
  }
  
  .filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }
  
  /* Orders Timeline */
  .orders-timeline {
    position: relative;
    padding-left: 30px;
  }
  
  .orders-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15px;
    height: 100%;
    width: 2px;
    background: #eee;
  }
  
  .timeline-item {
    position: relative;
    margin-bottom: 2rem;
    transition: var(--transition);
    transform-origin: left center;
  }
  
  .timeline-item:hover {
    transform: scale(1.02);
  }
  
  .timeline-item.current {
    animation: pulse 2s infinite;
  }
  
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.2); }
    70% { box-shadow: 0 0 0 15px rgba(230, 126, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0); }
  }
  
  .timeline-badge {
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    z-index: 1;
  }
  
  .timeline-item.current .timeline-badge {
    background: var(--primary-color);
    color: white;
    animation: bounce 1.5s infinite;
  }
  
  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
  }
  
  .timeline-item.delivered .timeline-badge {
    border-color: #28a745;
    color: #28a745;
  }
  
  .timeline-item.cancelled .timeline-badge {
    border-color: #dc3545;
    color: #dc3545;
  }
  
  .timeline-content {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-left: 20px;
  }
  
  .timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
  }
  
  .timeline-header h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
  }
  
  .order-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
  }
  
  .order-status.preparing {
    background-color: #fff3cd;
    color: #856404;
  }
  
  .order-status.delivered {
    background-color: #d4edda;
    color: #155724;
  }
  
  .order-status.cancelled {
    background-color: #f8d7da;
    color: #721c24;
  }
  
  .order-items {
    margin-bottom: 1.5rem;
  }
  
  .order-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f5f5f5;
    transition: var(--transition);
  }
  
  .order-item:last-child {
    border-bottom: none;
  }
  
  .order-item:hover {
    background: rgba(0, 0, 0, 0.02);
  }
  
  .order-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 1rem;
  }
  
  .item-info {
    flex: 1;
  }
  
  .item-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
  }
  
  .item-info p {
    font-size: 0.8rem;
    color: #666;
  }
  
  .item-price {
    font-weight: 600;
    color: var(--secondary-color);
  }
  
  .item-quantity {
    font-weight: 600;
    color: var(--primary-color);
  }
  
  .order-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
  }
  
  .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
  }
  
  .summary-row.total {
    font-weight: 600;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #ddd;
  }
  
  .order-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .track-btn, .cancel-btn, 
  .reorder-btn, .rate-btn {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .track-btn {
    background: var(--secondary-color);
    color: white;
  }
  
  .track-btn:hover {
    background: #1a252f;
  }
  
  .cancel-btn {
    background: #f8f9fa;
    color: #dc3545;
    border: 1px solid #ddd;
  }
  
  .cancel-btn:hover {
    background: #f1f1f1;
  }
  
  .reorder-btn {
    background: var(--primary-color);
    color: white;
  }
  
  .reorder-btn:hover {
    background: #d35400;
  }
  
  .rate-btn {
    background: #f8f9fa;
    color: var(--secondary-color);
    border: 1px solid #ddd;
  }
  
  .rate-btn:hover {
    background: #f1f1f1;
  }
  
  .timeline-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #666;
  }
  
  .timeline-footer i {
    margin-right: 0.3rem;
  }
  
  /* Responsive Design */
  @media (max-width: 992px) {
    .sidebar {
      transform: translateX(-100%);
    }
    
    .sidebar.active {
      transform: translateX(0);
    }
    
    .main-content {
      margin-left: 0;
    }
  }
  
  @media (max-width: 768px) {
    .orders-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
    }
    
    .order-filter {
      width: 100%;
      overflow-x: auto;
      padding-bottom: 0.5rem;
    }
    
    .order-actions {
      flex-direction: column;
    }
    
    .timeline-footer {
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .top-nav {
      padding: 1rem;
    }
    
    .search-bar {
      width: 60%;
    }
  }
  
  @media (max-width: 576px) {
    .order-item {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .order-item img {
      margin-bottom: 0.5rem;
    }
    
    .item-quantity {
      align-self: flex-end;
      margin-top: 0.5rem;
    }
    
    .sidebar {
      width: 250px;
    }
    
    .search-bar {
      width: 100%;
      margin-bottom: 1rem;
    }
    
    .nav-icons {
      gap: 1rem;
    }
  }

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #d35400;
}