@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

/* CSS Variables - Design Tokens */
:root {
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;

  --primary: 175 84% 32%;
  --primary-foreground: 0 0% 100%;
  --primary-light: 175 70% 45%;
  --primary-dark: 175 90% 22%;

  --accent: 38 92% 50%;
  --accent-foreground: 0 0% 10%;

  --background: 210 20% 98%;
  --foreground: 220 25% 10%;

  --card: 0 0% 100%;
  --card-foreground: 220 25% 10%;

  --secondary: 175 25% 95%;
  --secondary-foreground: 175 84% 25%;

  --muted: 210 15% 93%;
  --muted-foreground: 215 16% 47%;

  --destructive: 0 72% 51%;
  --destructive-foreground: 0 0% 100%;

  --success: 142 76% 36%;
  --success-foreground: 0 0% 100%;

  --warning: 38 92% 50%;
  --warning-foreground: 0 0% 10%;
  
  --info: 210 90% 45%;
  --info-foreground: 0 0% 100%;

  --border: 214 20% 88%;
  --input: 214 20% 88%;
  --ring: 175 84% 32%;

  --radius: 0.625rem;

  --sidebar-background: 175 90% 18%;
  --sidebar-foreground: 175 20% 95%;
  --sidebar-primary: 38 92% 50%;
  --sidebar-accent: 175 70% 25%;
  --sidebar-border: 175 70% 25%;
  --sidebar-muted: 175 40% 70%;

  --shadow-sm: 0 1px 2px 0 hsl(220 25% 10% / 0.05);
  --shadow-md: 0 4px 6px -1px hsl(220 25% 10% / 0.08), 0 2px 4px -2px hsl(220 25% 10% / 0.06);
  --shadow-lg: 0 10px 15px -3px hsl(220 25% 10% / 0.08), 0 4px 6px -4px hsl(220 25% 10% / 0.04);
  --shadow-glow: 0 0 20px hsl(175 84% 32% / 0.25);

  --sidebar-width: 256px;
  --sidebar-collapsed-width: 64px;
}

.dark {
  --background: 220 25% 8%;
  --foreground: 210 20% 95%;
  --card: 220 25% 12%;
  --card-foreground: 210 20% 95%;
  --primary: 175 70% 45%;
  --secondary: 220 20% 18%;
  --muted: 220 20% 18%;
  --muted-foreground: 215 15% 60%;
  --border: 220 20% 20%;
  --input: 220 20% 20%;
  --sidebar-background: 220 25% 6%;
  --sidebar-foreground: 210 15% 85%;
  --sidebar-accent: 220 20% 15%;
  --sidebar-border: 220 20% 18%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.2; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Layout */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background-color: hsl(var(--sidebar-background));
  color: hsl(var(--sidebar-foreground));
  display: flex; flex-direction: column;
  transition: width 0.3s ease; z-index: 50; overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }
.sidebar-header {
  padding: 1rem; display: flex; align-items: center; gap: 0.75rem;
  border-bottom: 1px solid hsl(var(--sidebar-border));
}
.sidebar-logo {
  width: 2rem; height: 2rem; min-width: 2rem;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-light)) 100%);
  border-radius: 0.5rem; display: flex; align-items: center; justify-content: center;
}
.sidebar-logo svg { width: 1.25rem; height: 1.25rem; color: hsl(var(--primary-foreground)); }
.sidebar-brand {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.125rem;
  white-space: nowrap; opacity: 1; transition: opacity 0.3s ease;
}
.sidebar.collapsed .sidebar-brand { opacity: 0; }

.business-switcher { padding: 0.75rem 1rem; border-bottom: 1px solid hsl(var(--sidebar-border)); }
.business-switcher-btn {
  width: 100%; display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem;
  border-radius: var(--radius); background: hsl(var(--sidebar-accent));
  border: none; color: hsl(var(--sidebar-foreground)); text-align: left;
  transition: background-color 0.2s ease; cursor: pointer;
}
.business-switcher-btn:hover { background: hsl(var(--sidebar-accent) / 0.8); }
.business-avatar {
  width: 2rem; height: 2rem; min-width: 2rem; border-radius: 0.5rem;
  background: hsl(var(--sidebar-primary)); color: hsl(0 0% 10%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.875rem;
}
.business-info { flex: 1; min-width: 0; overflow: hidden; }
.sidebar.collapsed .business-info { display: none; }
.business-name { font-weight: 500; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.business-role { font-size: 0.75rem; color: hsl(var(--sidebar-muted)); }

.sidebar-nav { flex: 1; padding: 0.75rem; overflow-y: auto; }
.nav-section { margin-bottom: 1.5rem; }
.nav-section-title {
  font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
  color: hsl(var(--sidebar-muted)); padding: 0 0.5rem; margin-bottom: 0.5rem;
}
.sidebar.collapsed .nav-section-title { display: none; }
.nav-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem;
  border-radius: var(--radius); color: hsl(var(--sidebar-foreground));
  transition: all 0.2s ease; margin-bottom: 0.25rem;
}
.nav-item:hover { background: hsl(var(--sidebar-accent)); }
.nav-item.active { background: hsl(var(--sidebar-accent)); color: hsl(0 0% 100%); }
.nav-item svg { width: 1.25rem; height: 1.25rem; min-width: 1.25rem; }
.nav-item span { white-space: nowrap; opacity: 1; transition: opacity 0.3s ease; }
.sidebar.collapsed .nav-item span { opacity: 0; }

.sidebar-footer { padding: 0.75rem; border-top: 1px solid hsl(var(--sidebar-border)); }
.sidebar-toggle {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 0.625rem; border-radius: var(--radius); background: transparent;
  border: none; color: hsl(var(--sidebar-foreground)); transition: background-color 0.2s ease;
}
.sidebar-toggle:hover { background: hsl(var(--sidebar-accent)); }
.sidebar.collapsed .sidebar-toggle span { display: none; }

/* Main Content */
.main-content {
  flex: 1; margin-left: var(--sidebar-width); transition: margin-left 0.3s ease;
  display: flex; flex-direction: column; min-height: 100vh;
}
.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed-width); }

/* Topbar */
.topbar {
  height: 64px; background: hsl(var(--card)); border-bottom: 1px solid hsl(var(--border));
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; position: sticky; top: 0; z-index: 40;
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }

.icon-btn {
  width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); background: transparent; border: none;
  color: hsl(var(--muted-foreground)); transition: all 0.2s ease; position: relative; cursor: pointer;
}
.icon-btn:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }

.user-menu { display: flex; align-items: center; gap: 0.75rem; padding: 0.375rem 0.5rem; border-radius: var(--radius); cursor: pointer; }
.user-menu:hover { background: hsl(var(--muted)); }
.user-avatar {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-light)) 100%);
  color: hsl(var(--primary-foreground)); display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.875rem;
}
.user-info { text-align: left; }
.user-name { font-weight: 500; font-size: 0.875rem; line-height: 1.2; }
.user-role { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }

/* Page Content */
.page-content { flex: 1; padding: 1.5rem; }
.page-header { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1.5rem; }
.page-header.with-actions { flex-direction: row; align-items: center; justify-content: space-between; }
.page-title { font-size: 1.5rem; font-weight: 700; }
.page-description { color: hsl(var(--muted-foreground)); font-size: 0.875rem; }

/* Cards */
.card {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm);
}

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem;
  background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--muted) / 0.35) 100%);
  border: 1px solid hsl(var(--border));
  box-shadow: 0 8px 24px hsl(var(--foreground) / 0.06);
}
.stat-card.primary {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.14) 0%, hsl(var(--primary) / 0.03) 100%);
  border-color: hsl(var(--primary) / 0.25);
}
.stat-card.info {
  background: linear-gradient(135deg, hsl(var(--info) / 0.16) 0%, hsl(var(--info) / 0.04) 100%);
  border-color: hsl(var(--info) / 0.28);
}
.stat-card.accent {
  background: linear-gradient(135deg, hsl(var(--accent) / 0.16) 0%, hsl(var(--accent) / 0.04) 100%);
  border-color: hsl(var(--accent) / 0.25);
}
.stat-card.success {
  background: linear-gradient(135deg, hsl(var(--success) / 0.16) 0%, hsl(var(--success) / 0.04) 100%);
  border-color: hsl(var(--success) / 0.25);
}
.stat-card.warning {
  background: linear-gradient(135deg, hsl(var(--warning) / 0.18) 0%, hsl(var(--warning) / 0.05) 100%);
  border-color: hsl(var(--warning) / 0.3);
}
.stat-card.destructive {
  background: linear-gradient(135deg, hsl(var(--destructive) / 0.16) 0%, hsl(var(--destructive) / 0.04) 100%);
  border-color: hsl(var(--destructive) / 0.28);
}
.stat-icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
}
.stat-icon.primary { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); }
.stat-icon.info { background: hsl(var(--info) / 0.1); color: hsl(var(--info)); }
.stat-icon.accent { background: hsl(var(--accent) / 0.1); color: hsl(var(--accent)); }
.stat-icon.success { background: hsl(var(--success) / 0.1); color: hsl(var(--success)); }
.stat-icon.destructive { background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive)); }
.stat-icon.warning { background: hsl(var(--warning) / 0.1); color: hsl(var(--warning)); }
.stat-icon svg { width: 1.5rem; height: 1.5rem; }
.stat-content { flex: 1; }
.stat-label { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin-bottom: 0.25rem; }
.stat-value { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.stat-change { display: flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; margin-top: 0.25rem; }
.stat-change.positive { color: hsl(var(--success)); }
.stat-change.negative { color: hsl(var(--destructive)); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1rem; border-radius: var(--radius); font-weight: 500; font-size: 0.875rem;
  transition: all 0.2s ease; border: none; cursor: pointer;
}
.btn svg { width: 1rem; height: 1rem; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); box-shadow: var(--shadow-glow); }
.btn-primary:hover { background: hsl(var(--primary-dark)); }
.btn-info { background: hsl(var(--info)); color: hsl(var(--info-foreground)); }
.btn-info:hover { filter: brightness(0.95); }
.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.btn-outline { background: transparent; border: 1px solid hsl(var(--border)); color: hsl(var(--foreground)); }
.btn-outline:hover { background: hsl(var(--muted)); }
.btn-ghost { background: transparent; color: hsl(var(--muted-foreground)); }
.btn-ghost:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.btn-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.7rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Form Elements */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.form-input {
  width: 100%; padding: 0.625rem 0.75rem; border: 1px solid hsl(var(--input));
  border-radius: var(--radius); background: hsl(var(--background)); color: hsl(var(--foreground));
  font-size: 0.875rem; transition: all 0.2s ease;
}
.form-input:focus { outline: none; border-color: hsl(var(--ring)); box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2); }
.form-input::placeholder { color: hsl(var(--muted-foreground)); }
.form-input-lg { padding: 0.75rem 1rem; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem;
}

/* Tables */
.table-container { overflow-x: auto; border: 1px solid hsl(var(--border)); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid hsl(var(--border)); }
.table th { background: hsl(var(--muted)); font-weight: 500; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.table tbody tr { transition: background-color 0.2s ease; }
.table tbody tr:hover { background: hsl(var(--muted) / 0.5); }
.table tbody tr:last-child td { border-bottom: none; }

/* Delivery Actions */
.action-buttons { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.action-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0.55rem; border-radius: 999px;
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
  font-size: 0.75rem; color: hsl(var(--foreground));
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.action-chip svg { width: 0.9rem; height: 0.9rem; }
.action-chip:hover { background: hsl(var(--muted)); }
.action-chip.info { border-color: hsl(var(--info) / 0.4); color: hsl(var(--info)); }
.action-chip.primary { border-color: hsl(var(--primary) / 0.4); color: hsl(var(--primary)); }
.action-chip.success { border-color: hsl(var(--success) / 0.4); color: hsl(var(--success)); }
.action-chip.danger { border-color: hsl(var(--destructive) / 0.4); color: hsl(var(--destructive)); }

/* Order Actions Row */
.order-actions { display: flex; align-items: center; gap: 0.35rem; justify-content: flex-end; }
.action-chip-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
  color: hsl(var(--muted-foreground)); cursor: pointer; transition: all 0.15s ease;
}
.action-chip-icon svg { width: 0.85rem; height: 0.85rem; }
.action-chip-icon:hover { background: hsl(var(--muted)); }
.action-chip-icon.primary { border-color: hsl(var(--primary) / 0.4); color: hsl(var(--primary)); }
.action-chip-icon.primary:hover { background: hsl(var(--primary) / 0.1); }

/* Dropdown Menu */
.dropdown-wrapper { position: relative; }
.dropdown-backdrop { position: fixed; inset: 0; z-index: 40; }
.dropdown-menu {
  position: absolute; right: 0; top: 100%; margin-top: 4px; min-width: 180px;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 50; padding: 4px; animation: dropdown-in 0.12s ease-out;
}
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-item {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  padding: 0.5rem 0.75rem; border: none; background: none;
  color: hsl(var(--foreground)); font-size: 0.8125rem;
  border-radius: calc(var(--radius) - 2px); cursor: pointer; text-align: left;
  transition: background 0.1s ease;
}
.dropdown-item svg { width: 0.875rem; height: 0.875rem; color: hsl(var(--muted-foreground)); flex-shrink: 0; }
.dropdown-item:hover { background: hsl(var(--muted)); }
.dropdown-item-danger { color: hsl(var(--destructive)); }
.dropdown-item-danger svg { color: hsl(var(--destructive)); }
.dropdown-item-danger:hover { background: hsl(var(--destructive) / 0.1); }

/* Customer Autocomplete */
.customer-autocomplete { position: relative; }
.autocomplete-backdrop { position: fixed; inset: 0; z-index: 40; }
.autocomplete-dropdown {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px;
  max-height: 280px; overflow-y: auto;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 50; padding: 4px;
  animation: dropdown-in 0.12s ease-out;
}
.autocomplete-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  padding: 0.6rem 0.75rem; border: none; background: none;
  color: hsl(var(--foreground)); font-size: 0.8125rem;
  border-radius: calc(var(--radius) - 2px); cursor: pointer; text-align: left;
  transition: background 0.1s ease;
}
.autocomplete-item:hover { background: hsl(var(--muted)); }
.autocomplete-item .ac-name { font-weight: 600; font-size: 0.875rem; }
.autocomplete-item .ac-phone { color: hsl(var(--muted-foreground)); font-size: 0.8rem; }
.autocomplete-item .ac-address { color: hsl(var(--muted-foreground)); font-size: 0.75rem; margin-top: 1px; }
.autocomplete-item .ac-row { display: flex; align-items: center; justify-content: space-between; }
.autocomplete-new {
  flex-direction: row; align-items: center; gap: 0.5rem;
  border-top: 1px solid hsl(var(--border)); margin-top: 2px; padding-top: 0.65rem;
  color: hsl(var(--primary)); font-weight: 500;
}
.autocomplete-new svg { flex-shrink: 0; }
.selected-customer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.5rem; padding: 0.6rem 0.85rem;
  background: hsl(var(--primary) / 0.06); border: 1px solid hsl(var(--primary) / 0.15);
  border-radius: var(--radius); gap: 0.75rem;
}
.selected-customer-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.selected-customer-info .sc-name { font-weight: 600; font-size: 0.875rem; }
.selected-customer-info .sc-detail { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.chip-remove {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; color: hsl(var(--muted-foreground));
  cursor: pointer; padding: 4px; border-radius: 50%; transition: all 0.1s;
}
.chip-remove:hover { background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive)); }
.new-customer-fields {
  padding: 0.75rem; background: hsl(var(--primary) / 0.04);
  border-radius: var(--radius); border: 1px dashed hsl(var(--primary) / 0.2);
  margin-bottom: 0.25rem;
}
.new-customer-fields .ncf-header {
  font-size: 0.8rem; font-weight: 600; color: hsl(var(--primary));
  margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem;
}

/* Quick Date Filters */
.quick-date-filters { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }

/* Payment Modal Info */
.payment-order-info {
  background: hsl(var(--muted) / 0.3); border-radius: var(--radius);
  padding: 0.75rem 1rem; margin-bottom: 1rem;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.payment-order-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; }
.payment-remaining {
  border-top: 1px solid hsl(var(--border)); padding-top: 0.5rem;
  margin-top: 0.25rem; font-weight: 500;
}

/* Status Badges */
.badge {
  display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem;
  border-radius: 9999px; font-size: 0.75rem; font-weight: 500;
}
.badge-success { background: hsl(var(--success) / 0.1); color: hsl(var(--success)); border: 1px solid hsl(var(--success) / 0.2); }
.badge-warning { background: hsl(var(--warning) / 0.1); color: hsl(var(--warning)); border: 1px solid hsl(var(--warning) / 0.2); }
.badge-destructive { background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive)); border: 1px solid hsl(var(--destructive) / 0.2); }
.badge-pending { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); border: 1px solid hsl(var(--muted-foreground) / 0.2); }
.badge-primary { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); border: 1px solid hsl(var(--primary) / 0.2); }

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 1rem;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); margin-bottom: 1rem;
}
.search-input { flex: 1; min-width: 200px; position: relative; }
.search-input svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: hsl(var(--muted-foreground)); }
.search-input input { padding-left: 2.5rem; }
.filter-select { min-width: 150px; }

/* Activity List */
.activity-list { display: flex; flex-direction: column; gap: 0.5rem; }
.activity-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid hsl(var(--border)); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 2rem; height: 2rem; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; }
.activity-icon.income { background: hsl(var(--success) / 0.1); color: hsl(var(--success)); }
.activity-icon.expense { background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive)); }
.activity-icon svg { width: 1rem; height: 1rem; }
.activity-content { flex: 1; min-width: 0; }
.activity-title { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-category { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.activity-amount { font-size: 0.875rem; font-weight: 500; }
.activity-amount.income { color: hsl(var(--success)); }
.activity-amount.expense { color: hsl(var(--destructive)); }

/* Quick Actions */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.quick-action {
  display: flex; align-items: center; gap: 0.75rem; padding: 1rem;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  transition: all 0.3s ease; cursor: pointer;
}
.quick-action:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quick-action-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease;
}
.quick-action:hover .quick-action-icon { transform: scale(1.1); }
.quick-action-icon.success { background: hsl(var(--success) / 0.1); color: hsl(var(--success)); }
.quick-action-icon.destructive { background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive)); }
.quick-action-icon.primary { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); }
.quick-action-icon.accent { background: hsl(var(--accent) / 0.1); color: hsl(var(--accent)); }
.quick-action-icon svg { width: 1.25rem; height: 1.25rem; }
.quick-action span { font-size: 0.875rem; font-weight: 500; }

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
@media (max-width: 1024px) { .grid-2, .grid-3, .grid-2-1 { grid-template-columns: 1fr; } }

/* Auth Pages */
.auth-page { min-height: 100vh; display: flex; }
.auth-form-section { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-form-container { width: 100%; max-width: 400px; }
.auth-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
.auth-brand-logo {
  width: 2.5rem; height: 2.5rem;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-light)) 100%);
  border-radius: 0.75rem; display: flex; align-items: center; justify-content: center;
}
.auth-brand-logo svg { width: 1.5rem; height: 1.5rem; color: hsl(var(--primary-foreground)); }
.auth-brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; }
.auth-title { font-size: 1.875rem; font-weight: 700; margin-bottom: 0.5rem; }
.auth-subtitle { color: hsl(var(--muted-foreground)); margin-bottom: 2rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: hsl(var(--border)); }
.auth-divider span { font-size: 0.75rem; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.auth-footer a { color: hsl(var(--primary)); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }
.auth-visual-section {
  flex: 1; background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-light)) 100%);
  display: none; align-items: center; justify-content: center; padding: 3rem; position: relative; overflow: hidden;
}
@media (min-width: 1024px) { .auth-visual-section { display: flex; } }
.auth-visual-pattern {
  position: absolute; inset: 0;
  background-image: linear-gradient(hsl(var(--primary-foreground) / 0.1) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--primary-foreground) / 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}
.auth-visual-content { position: relative; text-align: center; color: hsl(var(--primary-foreground)); max-width: 400px; }
.auth-visual-title { font-size: 1.875rem; font-weight: 700; margin-bottom: 1rem; }
.auth-visual-text { opacity: 0.8; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: hsl(var(--foreground) / 0.5);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: hsl(var(--card)); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto;
  transform: scale(0.95); transition: transform 0.3s ease;
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid hsl(var(--border)); }
.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-close { width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); background: transparent; border: none; color: hsl(var(--muted-foreground)); cursor: pointer; }
.modal-close:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.modal-body { padding: 1.5rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; padding: 1rem 1.5rem; border-top: 1px solid hsl(var(--border)); }

/* Toast */
.toast-container { position: fixed; bottom: 1rem; right: 1rem; z-index: 100; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); min-width: 300px; max-width: 400px; animation: slideIn 0.3s ease-out;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
.toast.success { border-left: 4px solid hsl(var(--success)); }
.toast.error { border-left: 4px solid hsl(var(--destructive)); }
.toast-title { font-weight: 600; font-size: 0.875rem; }
.toast-message { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }

/* Spinner */
.spinner { width: 1rem; height: 1rem; border: 2px solid hsl(var(--muted)); border-top-color: hsl(var(--primary)); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, hsl(var(--muted)) 25%, hsl(var(--muted) / 0.5) 50%, hsl(var(--muted)) 75%); background-size: 200% 100%; animation: shimmer 2s linear infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* Empty State */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state svg { width: 3rem; height: 3rem; color: hsl(var(--muted-foreground)); margin-bottom: 1rem; }
.empty-state-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.empty-state-description { color: hsl(var(--muted-foreground)); font-size: 0.875rem; }

/* Utilities */
.w-full { width: 100%; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-medium { font-weight: 500; }
.text-muted { color: hsl(var(--muted-foreground)); }
.text-success { color: hsl(var(--success)); }
.text-destructive { color: hsl(var(--destructive)); }
.text-primary { color: hsl(var(--primary)); }

/* Table scroll wrapper - constrains horizontal scroll to table only */
.table-scroll-wrapper {
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.table-scroll-wrapper .table-container {
  overflow-x: auto;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}

/* Order detail modal */
.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
  padding: 0.875rem;
  background: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
}
.detail-info-item { display: flex; flex-direction: column; gap: 2px; }
.detail-info-label { font-size: 0.75rem; color: hsl(var(--muted-foreground)); font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; }
.detail-info-value { font-size: 0.875rem; font-weight: 500; }
.detail-section-title {
  font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground)); margin: 1rem 0 0.5rem;
}
.detail-items-table { border: 1px solid hsl(var(--border)); border-radius: var(--radius); overflow: hidden; }
.detail-items-header {
  display: grid; grid-template-columns: 1fr 60px 80px 80px;
  padding: 0.5rem 0.75rem; background: hsl(var(--muted));
  font-size: 0.75rem; font-weight: 600; color: hsl(var(--muted-foreground));
}
.detail-items-row {
  display: grid; grid-template-columns: 1fr 60px 80px 80px;
  padding: 0.625rem 0.75rem; border-top: 1px solid hsl(var(--border));
  font-size: 0.875rem; align-items: center;
}
.detail-items-row:hover { background: hsl(var(--muted) / 0.4); }
.detail-items-total { padding: 0.625rem 0.75rem; background: hsl(var(--muted) / 0.3); }
.detail-total-row { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 0.125rem 0; }
.detail-payment-row {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0;
  border-bottom: 1px solid hsl(var(--border) / 0.5); font-size: 0.875rem;
}
.order-row:hover { background: hsl(var(--muted) / 0.5); }

/* Mobile menu button - hidden on desktop, shown on mobile */
.mobile-menu-btn { display: none; }

/* Mobile sidebar overlay — sits above content but below topbar */
.sidebar-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: hsl(var(--foreground) / 0.45);
  z-index: 48;
}

/* Responsive */
@media (max-width: 768px) {
  /* App layout clips children - sufficient to prevent horizontal overflow */
  .app-layout { overflow-x: clip; width: 100%; max-width: 100vw; }

  /* Sidebar hidden off-screen by default */
  .sidebar {
    transform: translateX(-100%);
    width: 280px !important;
    z-index: 50;
    transition: transform 0.3s ease;
    pointer-events: none; /* prevent sidebar from intercepting touch events when off-screen */
  }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: var(--shadow-lg); pointer-events: auto; }
  .sidebar.collapsed { transform: translateX(-100%); }

  /* Main content takes full width */
  .main-content { margin-left: 0 !important; width: 100%; max-width: 100vw; overflow-x: clip; }

  /* Topbar: fixed at top, z-index 55 — ABOVE overlay (48) and sidebar (50) so hamburger always works */
  .topbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 55;
    padding: 0 0.75rem;
  }

  /* Push content below fixed topbar */
  .page-content { padding: calc(64px + 0.75rem) 0.75rem 0.75rem; overflow-x: clip; }

  /* Show hamburger */
  .mobile-menu-btn { display: inline-flex; }

  /* Hide user name/email text, keep avatar */
  .user-info { display: none; }
  .user-menu { padding: 0.25rem; gap: 0.5rem; }

  /* Stats: 2 columns on mobile */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.75rem; }
  .stat-card { padding: 1rem; }
  .stat-value { font-size: 1.125rem; }
  .stat-icon { width: 2.25rem; height: 2.25rem; }

  /* Page header with action button stacks vertically */
  .page-header.with-actions {
    flex-direction: column; align-items: flex-start; gap: 0.625rem;
  }
  .page-title { font-size: 1.25rem; }

  /* Filters stack */
  .filters { flex-direction: column; gap: 0.5rem; padding: 0.75rem; }
  .search-input { min-width: 0; width: 100%; }
  .filter-select { min-width: 0; width: 100%; }

  /* Table: ONLY the table-container scrolls horizontally */
  .table-scroll-wrapper { overflow: hidden; }
  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table th, .table td { padding: 0.5rem 0.75rem; font-size: 0.8125rem; white-space: nowrap; }

  /* Modals */
  .modal { width: 96%; max-height: 88vh; }

  /* Grids → single column */
  .grid-2, .grid-3, .grid-2-1 { grid-template-columns: 1fr; gap: 0.75rem; }
  .form-row { grid-template-columns: 1fr; }

  /* Pagination */
  .pagination-summary { display: none; }
  .quick-date-filters { flex-wrap: wrap; }

  /* Order detail */
  .detail-info-grid { grid-template-columns: 1fr; }
  .detail-items-header, .detail-items-row { grid-template-columns: 1fr 40px 70px 70px; font-size: 0.8rem; }
}

/* Blazor specific */
#blazor-error-ui { background: hsl(var(--destructive)); color: white; padding: 1rem; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; display: none; }
.valid.modified:not([type=checkbox]) { outline: 1px solid hsl(var(--success)); }
.invalid { outline: 1px solid hsl(var(--destructive)); }
.validation-message { color: hsl(var(--destructive)); font-size: 0.75rem; margin-top: 0.25rem; }

/* App Loading Screen */
.app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: hsl(var(--background));
}

.app-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.app-loading-logo {
  width: 4rem;
  height: 4rem;
  background: hsl(var(--primary));
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.app-loading-logo svg {
  width: 2.5rem;
  height: 2.5rem;
}

.app-loading-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.app-loading .spinner {
  width: 1.5rem;
  height: 1.5rem;
}

.loading-progress { position: relative; display: block; width: 8rem; height: 8rem; margin: 20vh auto 1rem auto; }
.loading-progress circle { fill: none; stroke: hsl(var(--muted)); stroke-width: 0.6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child { stroke: hsl(var(--primary)); stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; transition: stroke-dasharray 0.05s ease-in-out; }
.loading-progress-text { position: absolute; text-align: center; font-weight: bold; inset: calc(20vh + 3.25rem) 0 auto 0.2rem; }
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }

/* Icon Button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

/* py-4 utility */
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* Badge accent variant */
.badge-accent {
  background: hsl(var(--accent) / 0.1);
  color: hsl(var(--accent));
}

.badge-primary {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

/* Delivery page styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-item-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: hsl(var(--muted) / 0.3);
    border-radius: var(--radius);
    margin-top: 1rem;
}

/* Order actions */
.order-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    justify-content: flex-end;
}

.action-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: all 0.15s ease;
}

.action-chip-icon svg {
    width: 0.85rem;
    height: 0.85rem;
}

.action-chip-icon:hover {
    background: hsl(var(--muted));
}

.action-chip-icon.primary {
    border-color: hsl(var(--primary) / 0.4);
    color: hsl(var(--primary));
}

.action-chip-icon.primary:hover {
    background: hsl(var(--primary) / 0.1);
}

/* Dropdown */
.dropdown-wrapper {
    position: relative;
}

.dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 180px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 50;
    padding: 4px;
    animation: dropdown-in 0.12s ease-out;
}

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: none;
    color: hsl(var(--foreground));
    font-size: 0.8125rem;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    transition: background 0.1s ease;
    text-align: left;
}

.dropdown-item svg {
    width: 0.875rem;
    height: 0.875rem;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}

.dropdown-item:hover {
    background: hsl(var(--muted));
}

.dropdown-item-danger {
    color: hsl(var(--destructive));
}

.dropdown-item-danger svg {
    color: hsl(var(--destructive));
}

.dropdown-item-danger:hover {
    background: hsl(var(--destructive) / 0.1);
}

/* Payment modal order info */
.payment-order-info {
    background: hsl(var(--muted) / 0.3);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.payment-order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.payment-remaining {
    border-top: 1px solid hsl(var(--border));
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Quick date filters */
.quick-date-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.quick-date-filters .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1.25rem 0 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1;
}

.pagination-btn:hover:not(:disabled) {
    background: hsl(var(--secondary));
    border-color: hsl(var(--primary));
}

.pagination-btn.active {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    user-select: none;
}

.pagination-summary {
    margin-left: 0.5rem;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
}

/* Modern Select Dropdown */
.modern-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: hsl(var(--foreground));
    background-color: hsl(var(--background));
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.modern-select:hover {
    border-color: hsl(var(--primary) / 0.5);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.modern-select:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.modern-select option {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .modern-select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    }
}
