/* 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;
  --sidebar-collapsed: 80px;
  --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
}

/* 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(--button-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);
  transition: var(--transition);
  min-height: 100vh;
}

/* Top Navigation */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 90;
}

.search-bar {
  position: relative;
  flex: 1;
  max-width: 500px;
}

.search-bar i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
}

.search-bar input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 3rem;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
  outline: none;
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.notification, .cart {
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.notification:hover, .cart:hover {
  color: var(--primary-color);
}

.notification .badge, .cart .badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--button-color);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  margin-right: 1rem;
}

/* Dashboard Content */
.dashboard-content {
  padding: 2rem;
}

/* Welcome Banner */
.welcome-banner {
  display: flex;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
}

.banner-content {
  flex: 1;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.banner-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.banner-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #666;
}

.cta-btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--button-color);
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  align-self: flex-start;
}

.cta-btn:hover {
  background-color: #c0392b;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.banner-image {
  flex: 1;
  max-width: 50%;
}

.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Quick Actions */
.quick-actions {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 3px;
  background-color: var(--primary-color);
  bottom: -10px;
  left: 0;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.action-card {
  background-color: white;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--card-shadow);
}

.action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.action-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(230, 126, 34, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: var(--transition);
}

.action-card:hover .action-icon {
  background-color: var(--primary-color);
  color: white;
}

.action-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.action-card p {
  font-size: 0.9rem;
  color: #666;
}

/* Recent Orders */
.recent-orders {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.view-all {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.view-all:hover {
  text-decoration: underline;
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.order-card {
  display: flex;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.order-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.order-image {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.order-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-details {
  flex: 1;
  padding: 1rem;
}

.order-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.order-date {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.order-status {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.order-status.delivered {
  background-color: #d4edda;
  color: #155724;
}

.order-status.pending {
  background-color: #fff3cd;
  color: #856404;
}

.order-status.cancelled {
  background-color: #f8d7da;
  color: #721c24;
}

.reorder-btn {
  align-self: center;
  padding: 0.5rem 1rem;
  margin-right: 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.reorder-btn:hover {
  background-color: #d35400;
}

/* Recommended For You */
.recommended-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.food-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.food-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.food-image {
  height: 180px;
  position: relative;
}

.food-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.food-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
}

.food-tag.popular {
  background-color: var(--button-color);
}

.food-tag.new {
  background-color: var(--accent-color);
}

.food-tag.healthy {
  background-color: #2ecc71;
}

.food-details {
  padding: 1rem;
}

.food-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.food-desc {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.food-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: 600;
  color: var(--secondary-color);
}

.add-to-cart {
  width: 35px;
  height: 35px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.add-to-cart:hover {
  background-color: #d35400;
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .sidebar {
    width: var(--sidebar-collapsed);
  }
  
  .sidebar-header, .user-info, .sidebar-nav span, .logout-btn span {
    display: none;
  }
  
  .sidebar-nav a {
    justify-content: center;
    padding: 1rem 0;
  }
  
  .sidebar-nav i {
    margin-right: 0;
    font-size: 1.5rem;
  }
  
  .main-content {
    margin-left: var(--sidebar-collapsed);
  }
}

@media (max-width: 992px) {
  .welcome-banner {
    flex-direction: column;
  }
  
  .banner-image {
    max-width: 100%;
    height: 200px;
  }
  
  .banner-content {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    z-index: 1000;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .search-bar {
    margin-left: 1rem;
  }
  
  .welcome-banner .banner-content h1 {
    font-size: 2rem;
  }
  
  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .dashboard-content {
    padding: 1rem;
  }
  
  .action-grid {
    grid-template-columns: 1fr;
  }
  
  .orders-grid, .recommended-grid {
    grid-template-columns: 1fr;
  }
  
  .top-nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .search-bar {
    width: 100%;
    margin-left: 0;
  }
  
  .nav-icons {
    width: 100%;
    justify-content: space-between;
  }
}

/* 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;
}