/* Status-based row colors */
        .status-row {
            transition: all 0.2s ease;
        }
        
        .status-row:hover {
            transform: scale(1.01);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        /* Status legend */
        .status-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border: 1px solid #dee2e6;
        }
        
        .status-legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
        }
        
        .status-color-box {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            border: 1px solid #ccc;
        }
        
        .status-legend h4 {
            width: 100%;
            margin: 0 0 10px 0;
            color: #495057;
            font-size: 16px;
        }
        
        /* Filter Popup Styles */
        .filter-popup-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
        }
        
        .filter-popup {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            width: 400px;
            max-width: 90vw;
        }
        
        .filter-popup h3 {
            margin: 0 0 20px 0;
            color: #333;
            text-align: center;
        }
        
        .filter-form-group {
            margin-bottom: 20px;
        }
        
        .filter-form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            color: #555;
        }
        
        .filter-form-group select,
        .filter-form-group input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            box-sizing: border-box;
        }
        
        .filter-form-group select:focus,
        .filter-form-group input:focus {
            outline: none;
            border-color: #4CAF50;
            box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
        }
        
        .filter-buttons {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-top: 25px;
        }
        
        .filter-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
			font-size: 14px;
            font-weight: bold;
            transition: background-color 0.3s;
        }
        
        .filter-btn-apply {
            background-color: #4CAF50;
            color: white;
        }
        
        .filter-btn-apply:hover {
            background-color: #45a049;
        }
        
        .filter-btn-clear {
            background-color: #f44336;
            color: white;
        }
        
        .filter-btn-clear:hover {
            background-color: #da190b;
        }
        
        .filter-btn-cancel {
            background-color: #6c757d;
            color: white;
        }
        
        .filter-btn-cancel:hover {
            background-color: #5a6268;
        }
        
        /* Filter controls */
        .filter-controls {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .filter-btn-open {
          /*  background-color: #007bff; */
            color: white;
            border: none;
			width: 175px;
            padding: 10px 15px; 
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
			margin-top: 28px;
            transition: background-color 0.3s;
        }
        
        .filter-btn-open:hover {
            background-color: #0056b3;
        }
        
        .active-filter {
            background-color: #e9ecef;
            padding: 8px 12px;
            border-radius: 5px;
            border: 1px solid #ced4da;
            font-size: 14px;
			margin-top: 28px;
            color: #495057;
        }
        
        .active-filter .filter-remove {
            margin-left: 10px;
            color: #dc3545;
            cursor: pointer;
            font-weight: bold;
        }
        
        .active-filter .filter-remove:hover {
            color: #c82333;
        }
/* ===== VARIABLES ===== */
:root {
    --primary: #2c3e50;
    --secondary: #34495e;
    --accent: #3498db;
    --light: #ecf0f1;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
}

/* ===== RESET & BASE STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

h1, h2 {
    text-align: center;
}

/* ===== LAYOUT & CONTAINERS ===== */
.container {
    max-width: 1400px;  
    margin: 0 auto;
    padding: 20px;  
}

.product-dashboard {
    max-width: 1800px;
    margin: 0 auto;
    padding-top: 10px;
}

.dashboard {
    padding: 0px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-management-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background-color: var(--primary);
    color: white;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: var(--secondary);
}

/* ===== CARDS & PANELS ===== */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
}

.card-label {
    color: #666;
    font-size: 0.9rem;
}

.product-form-panel,
.product-listing-panel {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.product-form-panel {
    flex: 1;
    min-width: 400px;
    max-width: 900px;
}

.product-listing-panel {
    flex: 2;
    min-width: 1200px; 
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.container .product-listing-panel {
    max-width: 100%;
    width: 100%;
}

.panel-heading {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Report Cards */
.reports-container {
    margin: 0 auto;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
    display: flex;
    padding: 0 30px 50px 30px;
    justify-content: center;
    align-items: center;
}

.report-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.report-icon {
    width: 60px;
    height: 60px;
    background-color: #f0f8ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: #4682b4;
}

.report-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.report-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.report-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.report-link:hover {
    background-color: #45a049;
}

.page-intro {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* ===== TABLES ===== */
.table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: auto; /* Remove fixed min-width */
}

th, td {
    padding: 8px 10px; /* Reduce padding to fit more content */
    text-align: left; 
    border-bottom: 1px solid #ddd;
    font-size: 0.9rem; /* Slightly smaller font */
}

th {
    background-color: var(--light);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.product-table th {
    background-color: var(--accent);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 8px 10px; /* Reduce padding */
    position: sticky;
    top: 0;
    z-index: 10;
}

.product-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.product-table td {
    padding: 8px 10px; /* Reduce padding */
    border-bottom: 1px solid #eee;
    white-space: normal; /* Allow text wrapping */
    word-break: break-word; /* Break words if needed */
}

/* Define specific widths for columns to control their size */
.product-table td:nth-child(1), /* ID */
.product-table th:nth-child(1) {
    width: 40px;
    min-width: 40px;
}

.product-table td:nth-child(2), /* SKU */
.product-table th:nth-child(2) {
    width: 80px;
    min-width: 80px;
}

.product-table td:nth-child(3), /* Supplier */
.product-table th:nth-child(3) {
    width: 100px;
    min-width: 90px;
}

.product-table td:nth-child(4), /* Name */
.product-table th:nth-child(4) {
    width: 150px;
    min-width: 120px;
}

.product-table td:nth-child(5), /* Category */
.product-table th:nth-child(5) {
    width: 100px;
    min-width: 80px;
}

.product-table td:nth-child(6), /* Qty */
.product-table th:nth-child(6) {
    width: 50px;
    min-width: 40px;
    text-align: center;
}

.product-table td:nth-child(7), /* Cost */
.product-table td:nth-child(8), /* Price */
.product-table td:nth-child(9), /* Sale Price */
.product-table th:nth-child(7),
.product-table th:nth-child(8),
.product-table th:nth-child(9) {
    width: 80px;
    min-width: 70px;
    text-align: right;
}

.product-table td:nth-child(10), /* Dimensions */
.product-table th:nth-child(10) {
    width: 100px;
    min-width: 80px;
}

.product-table td:nth-child(11), /* Location */
.product-table th:nth-child(11) {
    width: 90px;
    min-width: 70px;
}

.product-table td:nth-child(12), /* Status */
.product-table th:nth-child(12) {
    width: 90px;
    min-width: 70px;
}

.product-table td:nth-child(13), /* Actions */
.product-table th:nth-child(13) {
    width: 100px;
    min-width: 80px;
    white-space: nowrap; /* Keep actions on one line */
}

tr:hover {
    background-color: #f9f9f9;
}

/* ===== FORMS & INPUTS ===== */
.product-entry-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 15px;
}

.input-row {
    display: flex;
    gap: 15px;
}

.input-field {
    flex: 1;
    min-width: 120px;
}

.input-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

.input-field input,
.input-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border 0.2s, box-shadow 0.2s;
}

.input-field input:focus,
.input-field textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

input[type="text"], 
input[type="number"],
input[type="password"],
select, 
textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

/* ===== BUTTONS & ACTIONS ===== */
.btn, 
.action-button {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn:hover,
.action-button:hover {
    opacity: 0.9;
}

.btn-primary { background-color: var(--accent); }
.btn-success { background-color: var(--success); }
.btn-warning { background-color: var(--warning); }
.btn-danger { background-color: var(--danger); }

.primary { color: var(--primary); }
.success { color: var(--success); }
.warning { color: var(--warning); }
.danger { color: var(--danger); }

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #45a049;
}

.action-button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.save-button {
    background-color: var(--success);
    color: white;
    flex: 2;
    margin-right: 10px;
}

.save-button:hover {
    background-color: #27ae60;
}

.reset-button {
    background-color: var(--light);
    color: #7f8c8d;
    flex: 1;
}

.reset-button:hover {
    background-color: #dfe4ea;
}

.table-action {
    display: inline-block;
    margin-right: 4px;
    padding: 4px 6px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
}

.table-action.edit {
    background-color: var(--warning);
    color: white;
}

.table-action.edit:hover {
    background-color: #e67e22;
}

.table-action.view {
    background-color: #56acd1;
    color: white;
}

.table-action.view:hover {
    background-color: #1d9bd1;
}
.table-action.delete {
    background-color: var(--danger);
    color: white;
}

.table-action.delete:hover {
    background-color: #c0392b;
}

.actions {
    display: flex;
    gap: 5px;
}

/* ===== PAGINATION & CONTROLS ===== */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pagination a, .pagination span {
    color: black;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 0 4px;
}

.pagination a:hover {
    background-color: #f1f1f1;
}

.pagination .active {
    background-color: #4CAF50;
    color: white;
    border: 1px solid #4CAF50;
}

.pagination .disabled {
    color: #ddd;
    pointer-events: none;
}

.pagination-controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    width: 100%;
    padding: 0 5px;
}

.items-per-page-selector {
    text-align: left;
    width: auto;
    margin: 10px 0;
}

.items-per-page-selector select {
    margin-left: 5px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
    width: 70px;
}

.items-per-page-selector label {
    font-weight: bold;
}

.add-product-link {
    text-align: right;
}

.add-product-link a {
    display: inline-block;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.add-product-link a:hover {
    background-color: #0056b3;
}

/* ===== DROPDOWN MENU ===== */
.dropdown {
    display: inline-block;
    margin-right: 0px;
}

.dropdown-toggle {
    border-radius: 2px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.3s;
    border: 1px solid #eee;
    padding: 8px;
}

.dropdown-toggle:hover {
    opacity: 0.9;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 
    border-radius: 2px;
    z-index: 10;
    overflow: hidden;
    border: 1px solid #eee;
}

.dropdown-content a {
    color: var(--primary);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--light);
    color: var(--accent);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ===== NOTIFICATIONS ===== */
.notification-success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.notification-error,
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.no-products-message {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-style: italic;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== MISC & UTILITIES ===== */
.login-container {
    position: absolute;
    top: 25%;
    left: 25%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 350px;
}

.dashboard-title {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 28px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 1100px) {
    .product-management-layout {
        flex-direction: column;
    }
    
    .product-form-panel,
    .product-listing-panel {
        max-width: 100%;
        min-width: 300px;
        padding: 10px;
        width: 100%;
    }
    
    .table-container {
        padding: 0;
    }
    
    .product-table td,
    .product-table th {
        padding: 6px 8px; /* Further reduce padding on smaller screens */
        font-size: 0.85rem; /* Slightly smaller font */
    }
    
    /* Further reduce widths on smaller screens */
    .product-table td:nth-child(n),
    .product-table th:nth-child(n) {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard {
        grid-template-columns: 1fr 1fr;
    }
    
    .pagination-controls-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .add-product-link {
        text-align: center;
        width: 100%;
    }
    
    .items-per-page-selector {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .product-form-panel,
    .product-listing-panel {
        padding: 5px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 10px;
    }
}