/* shadcn/ui Design Tokens */
:root {
  --background: 0 0% 98%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --radius: 0.5rem;
  --sidebar: 240 5.9% 10%;
  --sidebar-foreground: 240 4.8% 95.9%;
  --sidebar-accent: 240 3.7% 15.9%;
  --sidebar-accent-foreground: 240 4.8% 95.9%;
  --sidebar-border: 240 3.7% 15.9%;
  --sidebar-muted: 240 3.8% 46.1%;
  --brand: 24 95% 53%;
  --brand-foreground: 0 0% 100%;
}

/* Base resets */
* {
  border-color: hsl(var(--border));
}

body {
  font-family: 'Inter', sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

/* Sidebar layout */
.sidebar-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 16rem;
  background-color: hsl(var(--sidebar));
  color: hsl(var(--sidebar-foreground));
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  border-right: 1px solid hsl(var(--sidebar-border));
  transition: transform 0.3s ease;
}

.sidebar-main {
  margin-left: 16rem;
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
}

/* Mobile sidebar */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-main {
    margin-left: 0;
    padding: 1rem;
    padding-top: 4rem;
  }
}

/* Sidebar navigation */
.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--sidebar-muted));
  transition: all 0.15s ease;
}

.sidebar-nav-link:hover {
  color: hsl(var(--sidebar-foreground));
  background-color: hsl(var(--sidebar-accent));
}

.sidebar-nav-link.active {
  color: hsl(var(--sidebar-foreground));
  background-color: hsl(var(--sidebar-accent));
  border-left: 2px solid hsl(var(--brand));
}

/* Mobile hamburger */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5rem;
  background-color: hsl(var(--sidebar));
  z-index: 30;
  align-items: center;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 35;
}

.sidebar-overlay.open {
  display: block;
}

/* Filter panel transitions */
#filterPanel {
  max-height: 0;
  opacity: 0;
  padding: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

#filterPanel.open {
  max-height: 1000px;
  opacity: 1;
  padding: 1rem;
}

/* Badge for order tiles */
.badge {
  min-width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: bold;
  background-color: hsl(var(--brand));
  color: hsl(var(--brand-foreground));
  text-align: center;
  padding: 0 0.25rem;
}

/* Autocomplete suggestion styles */
.autocomplete-suggestions {
  position: absolute;
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  z-index: 50;
}

.autocomplete-suggestions div {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: hsl(var(--popover-foreground));
}

.autocomplete-suggestions div:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}
