/* Dark Professional Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: #0f172a;
}

.bg-gray-50 {
    background: #0f172a !important;
}

/* Header - More Compact */
.bg-white.shadow-sm.border-b {
    background: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Reduce header padding */
.bg-white.shadow-sm.border-b .max-w-7xl {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

h1.text-3xl {
    color: #f1f5f9 !important;
    font-size: 1.5rem !important;
    line-height: 2rem !important;
}

.text-gray-900 {
    color: #f1f5f9 !important;
}

.text-gray-600 {
    color: #94a3b8 !important;
}

.text-gray-700 {
    color: #cbd5e1 !important;
}

.text-gray-500 {
    color: #64748b !important;
}

/* Search Input - More Compact */
input[type="text"]#searchInput {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

input[type="text"]#searchInput:focus {
    background: #334155;
    border-color: #64748b;
    outline: none;
}

input[type="text"]#searchInput::placeholder {
    color: #64748b;
}

/* Icons - Smaller */
svg {
    color: #94a3b8;
}

.text-blue-600 svg {
    color: #64748b;
}

/* Make header icon smaller */
.w-8.h-8 {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

/* Sidebar - More Compact */
.lg\:w-80 > div {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    padding: 0.75rem !important;
}

/* Reduce spacing between filter sections */
.space-y-6 > * + * {
    margin-top: 1rem !important;
}

/* Filter Labels */
label.block.text-sm.font-medium {
    color: #cbd5e1 !important;
}

/* Dropdowns and Inputs */
select, input[type="number"] {
    background: #0f172a;
    border: 1px solid #334155;
    color: #f1f5f9;
}

select:hover, input[type="number"]:hover {
    border-color: #475569;
}

select:focus, input[type="number"]:focus {
    background: #1e293b;
    border-color: #3b82f6;
    outline: none;
}

select option {
    background: #1e293b;
    color: #f1f5f9;
}

/* Checkboxes */
input[type="checkbox"] {
    background: #0f172a;
    border: 2px solid #334155;
}

input[type="checkbox"]:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

/* Quick Filter Buttons */
button[onclick^="handleMarginFilter"],
button[onclick^="handlePopularityFilter"] {
    transition: all 0.2s ease;
}

button[onclick^="handleMarginFilter"]:hover:not(.bg-gray-200):not(.bg-green-100):not(.bg-yellow-100):not(.bg-red-100):not(.bg-purple-100):not(.bg-blue-100):not(.bg-orange-100),
button[onclick^="handlePopularityFilter"]:hover:not(.bg-gray-200):not(.bg-green-100):not(.bg-yellow-100):not(.bg-red-100):not(.bg-purple-100):not(.bg-blue-100):not(.bg-orange-100) {
    background: #334155 !important;
    border-color: #475569 !important;
}

/* Active filter buttons - Muted colors */
.bg-gray-200 {
    background: #475569 !important;
    border-color: #64748b !important;
    color: #f1f5f9 !important;
}

.bg-green-100 {
    background: #14532d !important;
    border-color: #16a34a !important;
    color: #94a3b8 !important;
}

.bg-yellow-100 {
    background: #713f12 !important;
    border-color: #ca8a04 !important;
    color: #94a3b8 !important;
}

.bg-red-100 {
    background: #7f1d1d !important;
    border-color: #dc2626 !important;
    color: #94a3b8 !important;
}

.bg-purple-100 {
    background: #581c87 !important;
    border-color: #9333ea !important;
    color: #94a3b8 !important;
}

.bg-blue-100 {
    background: #1e3a5f !important;
    border-color: #3b82f6 !important;
    color: #94a3b8 !important;
}

.bg-orange-100 {
    background: #7c2d12 !important;
    border-color: #ea580c !important;
    color: #94a3b8 !important;
}

/* Inactive filter buttons */
button.bg-white {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

/* Product Cards - More Compact */
.grid > div {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease;
    padding: 0.75rem !important;
}

.grid > div:hover {
    border-color: #64748b !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-1px);
}

.grid > div h3 {
    color: #f1f5f9 !important;
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
    margin-bottom: 0.25rem !important;
}

/* Badges - Muted Colors */
.bg-blue-50 {
    background: #1e3a5f !important;
    color: #94a3b8 !important;
}

.text-blue-700 {
    color: #94a3b8 !important;
}

.bg-green-50 {
    background: #14532d !important;
    color: #94a3b8 !important;
}

.text-green-700 {
    color: #94a3b8 !important;
}

.bg-orange-50 {
    background: #7c2d12 !important;
    color: #94a3b8 !important;
}

.text-orange-700 {
    color: #94a3b8 !important;
}

.bg-purple-50 {
    background: #581c87 !important;
    color: #94a3b8 !important;
}

.text-purple-700 {
    color: #94a3b8 !important;
}

.bg-yellow-50 {
    background: #713f12 !important;
    color: #94a3b8 !important;
}

.text-yellow-700 {
    color: #94a3b8 !important;
}

.bg-red-50 {
    background: #7f1d1d !important;
    color: #94a3b8 !important;
}

.text-red-700 {
    color: #94a3b8 !important;
}

/* Price Display - Muted */
.text-xl.font-bold,
.text-2xl.font-bold {
    color: #cbd5e1 !important;
    font-size: 1.25rem !important;
}

.text-sm.text-gray-700 {
    color: #94a3b8 !important;
}

/* Pagination */
.bg-white.rounded-lg.shadow-sm.p-4 {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

button[onclick^="changePage"] {
    background: #0f172a;
    border: 1px solid #334155;
    color: #cbd5e1;
    transition: all 0.2s ease;
}

button[onclick^="changePage"]:not(:disabled):hover {
    background: #475569;
    border-color: #64748b;
    color: white;
}

button[onclick^="changePage"]:disabled {
    opacity: 0.4;
}

/* Modal */
.fixed.inset-0.bg-black {
    background: rgba(0, 0, 0, 0.8) !important;
}

.bg-white.rounded-lg.shadow-xl {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

.sticky.top-0.bg-white.border-b {
    background: #0f172a !important;
    border-bottom: 1px solid #334155 !important;
}

.bg-white.rounded-lg.shadow-xl h2 {
    color: #f1f5f9 !important;
}

.bg-white.rounded-lg.shadow-xl h3 {
    color: #f1f5f9 !important;
}

.bg-white.rounded-lg.shadow-xl h4 {
    color: #f1f5f9 !important;
}

.bg-white.rounded-lg.shadow-xl p {
    color: #cbd5e1 !important;
}

/* Modal Pricing Cards - Muted */
.bg-blue-50.p-4.rounded-lg {
    background: #1e3a5f !important;
    border: 1px solid #475569 !important;
}

.bg-green-50.p-4.rounded-lg {
    background: #14532d !important;
    border: 1px solid #475569 !important;
}

.text-blue-600 {
    color: #cbd5e1 !important;
}

.text-green-600 {
    color: #cbd5e1 !important;
}

/* Recommendation Cards - Muted */
.bg-gradient-to-r.from-blue-50 {
    background: linear-gradient(to right, #1e3a5f, #1e3a5f) !important;
    border: 1px solid #475569 !important;
}

.bg-gradient-to-r.from-green-50 {
    background: linear-gradient(to right, #14532d, #14532d) !important;
    border: 1px solid #475569 !important;
}

.bg-gradient-to-r.from-orange-50 {
    background: linear-gradient(to right, #7c2d12, #7c2d12) !important;
    border: 1px solid #475569 !important;
}

.bg-gradient-to-r.from-purple-50 {
    background: linear-gradient(to right, #581c87, #581c87) !important;
    border: 1px solid #475569 !important;
}

.text-indigo-600 {
    color: #94a3b8 !important;
}

.text-orange-600 {
    color: #94a3b8 !important;
}

.text-purple-600 {
    color: #94a3b8 !important;
}

/* Badge backgrounds in recommendation cards - Muted */
.bg-blue-100 {
    background: #1e3a5f !important;
}

.bg-indigo-100 {
    background: #312e81 !important;
}

.bg-green-100 {
    background: #14532d !important;
}

.bg-orange-100 {
    background: #7c2d12 !important;
}

.bg-purple-100 {
    background: #581c87 !important;
}

.text-blue-800 {
    color: #cbd5e1 !important;
}

.text-indigo-800 {
    color: #cbd5e1 !important;
}

.text-green-800 {
    color: #cbd5e1 !important;
}

.text-orange-800 {
    color: #cbd5e1 !important;
}

.text-purple-800 {
    color: #cbd5e1 !important;
}

/* Spinner */
.spinner {
    border: 3px solid #334155;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

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

/* Loading State */
.bg-white.rounded-lg.shadow-sm.p-12 {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

.text-gray-600 {
    color: #94a3b8 !important;
}

/* Error Messages */
.bg-red-50.border {
    background: #7f1d1d !important;
    border-color: #dc2626 !important;
}

.text-red-800 {
    color: #fca5a5 !important;
}

.text-red-600 {
    color: #f87171 !important;
}

.bg-red-600 {
    background: #dc2626 !important;
}

.bg-red-600:hover {
    background: #b91c1c !important;
}

/* Border colors */
.border-gray-300 {
    border-color: #334155 !important;
}

.border-t {
    border-color: #334155 !important;
}

.border-b {
    border-color: #334155 !important;
}

/* Hover states for checkboxes labels */
.hover\:bg-gray-50:hover {
    background: #334155 !important;
}

/* Focus outline */
*:focus {
    outline: none;
}