diff --git a/src/components/admin/AdminSidebar.tsx b/src/components/admin/AdminSidebar.tsx index b016467..32f2b7d 100644 --- a/src/components/admin/AdminSidebar.tsx +++ b/src/components/admin/AdminSidebar.tsx @@ -316,7 +316,7 @@ export default function AdminSidebar({ userRole }: SidebarProps) { ref={sidebarRef} id="admin-sidebar" className={[ - "fixed top-0 left-0 h-full w-60 z-50", + "fixed top-0 left-0 h-full w-56 z-50", "border-r flex flex-col", "transition-transform duration-300 ease-out lg:translate-x-0", mobileOpen ? "translate-x-0" : "-translate-x-full", @@ -408,7 +408,7 @@ export default function AdminSidebar({ userRole }: SidebarProps) { onClick={() => closeMobileMenu()} onKeyDown={(e) => handleNavKeyDown(e, item.href!, navIndex)} className={[ - "group flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-medium transition-all duration-200", + "group flex items-center gap-2.5 px-3 py-2 rounded-lg text-xs font-medium transition-all duration-200", "focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--admin-sidebar-bg)]", active ? "border-l-[3px]" diff --git a/src/components/admin/OrderTableBody.tsx b/src/components/admin/OrderTableBody.tsx index 16b5ab4..dc541c9 100644 --- a/src/components/admin/OrderTableBody.tsx +++ b/src/components/admin/OrderTableBody.tsx @@ -47,13 +47,13 @@ export default function OrderTableBody({ orders }: { orders: Order[] }) { {orders.map((order) => ( - + {order.id.slice(0, 8)} - +
{order.customer_name}
@@ -62,9 +62,9 @@ export default function OrderTableBody({ orders }: { orders: Order[] }) { - + @@ -72,14 +72,14 @@ export default function OrderTableBody({ orders }: { orders: Order[] }) { - + ${Number(order.subtotal).toFixed(2)} - + - + {formatDate(new Date(order.created_at))} diff --git a/src/components/admin/ProductTableBody.tsx b/src/components/admin/ProductTableBody.tsx index c485cf8..971c6c6 100644 --- a/src/components/admin/ProductTableBody.tsx +++ b/src/components/admin/ProductTableBody.tsx @@ -122,7 +122,7 @@ export default function ProductTableBody({ key={product.id} className="hover:bg-zinc-800 transition-colors relative" > - + - + {Array.isArray(product.brands) ? product.brands[0]?.name : product.brands?.name} - {product.type} + {product.type} - + ${Number(product.price).toFixed(2)} - + {product.active ? "Active" : "Inactive"} - + {product.is_taxable === false ? ( Non-taxable ) : ( @@ -161,7 +161,7 @@ export default function ProductTableBody({ {/* Actions */} - +
- + {stop.city}, {stop.state} - + {stop.location} - + {stop.date} - + {stop.time} - + {Array.isArray(stop.brands) ? stop.brands[0]?.name : stop.brands?.name} - + {stop.active ? "Active" : "Inactive"} diff --git a/src/components/admin/design-system/AdminButton.tsx b/src/components/admin/design-system/AdminButton.tsx index 237a589..4ffcf37 100644 --- a/src/components/admin/design-system/AdminButton.tsx +++ b/src/components/admin/design-system/AdminButton.tsx @@ -38,7 +38,7 @@ const variantClasses: Record = { }; const sizeClasses: Record = { - sm: "px-3 py-1.5 text-xs rounded-lg gap-1.5", + sm: "px-2.5 py-1 text-xs rounded-lg gap-1", md: "px-4 py-2 text-sm rounded-xl gap-2", lg: "px-5 py-3 text-base rounded-xl gap-2", }; @@ -46,7 +46,7 @@ const sizeClasses: Record = { export default function AdminButton({ children, variant = "primary", - size = "md", + size = "sm", icon, iconPosition = "left", isLoading = false, diff --git a/src/components/admin/design-system/AdminCard.tsx b/src/components/admin/design-system/AdminCard.tsx index e8f0816..7665ed2 100644 --- a/src/components/admin/design-system/AdminCard.tsx +++ b/src/components/admin/design-system/AdminCard.tsx @@ -12,7 +12,7 @@ type AdminCardProps = { export default function AdminCard({ children, className = "", noPadding = false, style }: AdminCardProps) { return (
>({ {columns.map((col) => ( - + {col.header} ))} @@ -59,7 +59,7 @@ export default function AdminTable>({ style={{ animationDelay: `${index * 30}ms` }} > {columns.map((col) => ( - + {col.render ? col.render(item) : String(item[col.key] ?? "")} ))} diff --git a/src/components/admin/design-system/PageHeader.tsx b/src/components/admin/design-system/PageHeader.tsx index 6e50c9a..7371060 100644 --- a/src/components/admin/design-system/PageHeader.tsx +++ b/src/components/admin/design-system/PageHeader.tsx @@ -56,18 +56,18 @@ export default function PageHeader({ {/* Title Row with Icon and Actions */}
{/* Left: Icon + Title + Subtitle */} -
+
{icon && ( -
+
{icon}
)}
-

+

{title}

{subtitle && ( -

+

{subtitle}

)} diff --git a/src/styles/admin-design-system.css b/src/styles/admin-design-system.css index 1218e55..a11d860 100644 --- a/src/styles/admin-design-system.css +++ b/src/styles/admin-design-system.css @@ -41,9 +41,9 @@ --admin-sidebar-active: #5c584f; /* between */ /* Spacing */ - --admin-page-padding: 1.5rem; /* px-6 */ - --admin-section-gap: 1rem; /* gap-4 */ - --admin-card-padding: 1.25rem; /* p-5 */ + --admin-page-padding: 1rem; /* px-4 - reduced for density */ + --admin-section-gap: 0.75rem; /* gap-3 - reduced */ + --admin-card-padding: 1rem; /* p-4 - reduced */ /* Border Radius */ --admin-radius-sm: 0.5rem; /* rounded-lg */ @@ -102,7 +102,7 @@ .admin-table { width: 100%; text-align: left; - font-size: 0.875rem; /* text-sm */ + font-size: 0.8125rem; /* 13px - reduced for density */ } .admin-table thead { @@ -111,8 +111,8 @@ } .admin-table th { - padding: 0.875rem 1.25rem; /* py-3.5 px-5 */ - font-size: 0.625rem; /* text-[10px] */ + padding: 0.75rem 1rem; /* py-3 px-4 - reduced for density */ + font-size: 0.5625rem; /* text-9px - reduced */ font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; @@ -137,7 +137,8 @@ } .admin-table td { - padding: 0.875rem 1.25rem; /* py-3.5 px-5 */ + padding: 0.625rem 1rem; /* py-2.5 px-4 - reduced for density */ + font-size: 0.8125rem; /* 13px - reduced */ } /* === Admin Stats Bar === */ @@ -184,10 +185,10 @@ .admin-btn { display: inline-flex; align-items: center; - gap: 0.5rem; - padding: 0.5rem 1rem; + gap: 0.375rem; + padding: 0.375rem 0.75rem; /* reduced padding */ border-radius: var(--admin-radius-sm); - font-size: 0.75rem; + font-size: 0.6875rem; /* reduced from 0.75rem */ font-weight: 700; transition: all 150ms; } @@ -216,11 +217,11 @@ .admin-input { flex: 1; min-width: 12rem; - padding: 0.625rem 0.75rem; + padding: 0.5rem 0.625rem; /* reduced padding */ background-color: var(--admin-card-bg); border: 1px solid var(--admin-border); border-radius: var(--admin-radius-sm); - font-size: 0.875rem; + font-size: 0.8125rem; /* 13px - reduced */ color: var(--admin-text-primary); outline: none; transition: border-color 150ms; @@ -245,9 +246,9 @@ } .admin-filter-tab { - padding: 0.5rem 0.75rem; + padding: 0.375rem 0.625rem; /* reduced padding */ border-radius: var(--admin-radius-sm); - font-size: 0.75rem; + font-size: 0.6875rem; /* reduced from 0.75rem */ font-weight: 600; color: var(--admin-text-secondary); transition: all 150ms;