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

/* General Styles */
:root {
    --primary-color: #1570C6;
    --secondary-color: #1570C6;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --background-color: #f5f6fa;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
}

.container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f6fa;
}

.auth-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.navbar {
    background-color: #50D063;
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo {
    height: 60px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .hamburger {
        display: block;
        z-index: 100;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background-color: #50D063;
        flex-direction: column;
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 90;
    }

    .nav-links.active {
        right: 0;
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Overlay when menu is open */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 80;
    }

    .nav-overlay.active {
        display: block;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #1570C6;
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

/* Tables */
.products-table {
    width: max-content;  /* Allow table to expand beyond container */
    min-width: 100%;     /* Ensure table is at least as wide as container */
    border-collapse: collapse;
    margin: 0;           /* Remove margin as it's now handled by wrapper */
    background: white;
}

.products-table th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
    white-space: nowrap;
    padding: 12px 16px;
    border-bottom: 2px solid #dee2e6;
}

.products-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap;
}

.products-table tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}

/* Make certain columns wrap text instead of nowrap */
.products-table td:nth-child(2) {  /* Description column */
    white-space: normal;
    min-width: 200px;
    max-width: 300px;
}

/* Add shadow when scrolling horizontally */
.table-responsive::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5px;
    pointer-events: none;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.table-responsive:hover::after {
    opacity: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 5px;
    position: relative;
}

.close {
    position: absolute;
    right: 10px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    padding: 0 5px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Prevent body scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Dashboard */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.stat-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-danger {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.settings-container {
    padding: 0rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.settings-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.settings-form {
    margin-bottom: 1.5rem;
}

.settings-list {
    list-style: none;
    padding: 0;
}

.settings-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.list-container {
    margin-top: 1.5rem;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin: 1rem 0;
}

.filters select, .filters input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.column-selector {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 200px;
    margin-top: 5px;
}

.column-selector-content {
    max-height: 400px;
    overflow-y: auto;
}

.column-selector label {
    display: block;
    padding: 8px 12px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.column-selector label:hover {
    background-color: #f5f5f5;
}

.column-selector input[type="checkbox"] {
    margin-right: 8px;
}

.hidden-column {
    display: none !important;
}

.actions-bar {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filters select,
.filters input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.column-toggle {
    position: relative;
}

.column-selector {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 200px;
}

.column-selector label {
    display: block;
    padding: 0.5rem;
    cursor: pointer;
}

.column-selector label:hover {
    background: #f5f5f5;
}

.hidden-column {
    display: none !important;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap; /* Allow wrapping */
}

/* Individual Tab */
.tab {
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.tab.active {
    background: var(--primary-color);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column; /* Stack tabs vertically */
        width: 100%;
        gap: 0.5rem; /* Reduce gap between stacked tabs */
    }

    .tab {
        width: 100%; /* Full width tabs */
        text-align: left;
        padding: 1rem 1.5rem; /* Slightly bigger touch target */
    }
}

/* Settings Table */
.settings-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.settings-table th,
.settings-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.settings-table th {
    background: #f8f9fa;
    font-weight: 500;
    white-space: nowrap;
}

.settings-table tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}

.settings-table td:last-child {
    width: 100px;
    text-align: right;
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Filters Container */
.filters-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box; /* This ensures padding is included in width */
}

/* Search Input - Full Width */
#searchInput {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    color: var(--primary-color);
    background-color: white;
    margin-bottom: 0.5rem;
    box-sizing: border-box; /* This ensures padding is included in width */
}

/* Filters Header */
.filters-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filters-header input {
    flex: 1;
}

/* Reset Button */
.btn-reset {
    padding: 0.75rem 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-reset:hover {
    background-color: #e9ecef;
    border-color: #c1c9d0;
}

.btn-reset i {
    margin-right: 0.5rem;
}

/* Filters Wrapper for Select Elements */
.filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Individual Select Filters */
.filters-container select {
    flex: 1;
    min-width: 180px;
    max-width: calc(25% - 0.75rem); /* 4 items per row with gap consideration */
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--primary-color);
    background-color: white;
}

/* Hover and Focus states */
#searchInput:hover,
.filters-container select:hover {
    border-color: var(--secondary-color);
}

#searchInput:focus,
.filters-container select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .filters-container select {
        max-width: calc(33.333% - 0.67rem); /* 3 items per row */
    }
}

@media (max-width: 992px) {
    .filters-container select {
        max-width: calc(50% - 0.5rem); /* 2 items per row */
    }
}

@media (max-width: 576px) {
    .filters-container {
        padding: 0.75rem;
    }

    .filters-container select {
        max-width: 100%; /* 1 item per row */
        min-width: 100%;
    }

    #searchInput {
        padding: 0.6rem;
    }
}

/* Products Header Section */
.products-header {
    margin-bottom: 1rem;
}

.products-header .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

/* Modal Action Buttons */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Space out the buttons */
.form-actions button:not(:last-child) {
    margin-right: 0.5rem;
}

/* Sortable Table Headers */
.sortable {
    cursor: pointer;
    position: relative;
}

.sortable:after {
    content: '↕';
    position: absolute;
    right: 8px;
    opacity: 0.5;
}

.sort-asc:after {
    content: '↑';
    opacity: 1;
}

.sort-desc:after {
    content: '↓';
    opacity: 1;
}

/* Ensure table cells have proper alignment */
.products-table td[data-column] {
    position: relative;
}

/* Right-align numeric columns */
.products-table td[data-column="basement_qty"],
.products-table td[data-column="total_qty"],
.products-table td[data-column^="site_"] {
    text-align: right;
}

/* Table header styles */
.products-table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    position: relative;
    padding: 12px 8px;
}

.products-table th.active {
    background-color: #e9ecef;
}

/* Column Toggle Buttons */
.column-toggles {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.column-toggle {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.column-toggle:hover {
    background-color: #e9ecef;
}

.column-toggle.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .column-toggles {
        flex-direction: column;
    }
    
    .column-toggle {
        width: 100%;
        text-align: left;
    }
}

/* Column Toggle Menu */
.column-toggle-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 8px 0;
    z-index: 1000;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.column-toggle-menu.show {
    display: block;
}

.column-toggle-option {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.column-toggle-option:hover {
    background-color: #f8f9fa;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.option-label {
    flex-grow: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.column-toggle-option input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

/* Position the toggle button container */
.filters-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Filters header responsive layout */
.filters-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Search input container */
.search-container {
    flex: 1;
    min-width: 200px;
}

/* Search input */
#searchInput {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Button group for Reset and Toggle */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-container {
        flex: 1 1 100%; /* Take full width */
        margin-bottom: 0.5rem; /* Add space below search */
    }

    .filter-buttons {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Main container adjustments */
.container {
    max-width: 100% !important; /* Override any existing max-width */
    padding: 1rem 2rem;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Table container */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Table styles */
.products-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    white-space: nowrap;
}

/* Round corners for header cells */
.products-table thead th:first-child {
    border-top-left-radius: 8px;
}

.products-table thead th:last-child {
    border-top-right-radius: 8px;
}

/* Round corners for last row cells */
.products-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.products-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.products-table th,
.products-table td {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.products-table th {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #ddd;
}

/* Remove border for cleaner look */
.products-table th:first-child,
.products-table td:first-child {
    border-left: none;
}

.products-table th:last-child,
.products-table td:last-child {
    border-right: none;
}

.products-table tr:last-child td {
    border-bottom: none;
}

/* Hover effect on rows */
.products-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Column minimum widths */
.products-table th,
.products-table td {
    min-width: 100px;
}

.products-table th[data-sort="name"],
.products-table td[data-column="name"] {
    min-width: 150px;
}

.products-table th[data-sort="description"],
.products-table td[data-column="description"] {
    min-width: 200px;
}

/* Actions column */
.products-table th:last-child,
.products-table td:last-child {
    min-width: 80px;
    width: 80px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .filters-header {
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        border-radius: 4px;
    }
    
    .products-table thead th:first-child {
        border-top-left-radius: 4px;
    }
    
    .products-table thead th:last-child {
        border-top-right-radius: 4px;
    }
    
    .products-table tbody tr:last-child td:first-child {
        border-bottom-left-radius: 4px;
    }
    
    .products-table tbody tr:last-child td:last-child {
        border-bottom-right-radius: 4px;
    }
}

/* Filters section */
.filters-header {
    background: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

/* Optional: Fixed header when scrolling */
.table-responsive {
    max-height: calc(100vh - 200px); /* Adjust based on your header/footer height */
    overflow-y: auto;
}

/* Ensure columns have a minimum width */
.products-table th,
.products-table td {
    min-width: 100px; /* Adjust based on your content */
}

/* Specific column widths */
.products-table th[data-sort="name"],
.products-table td[data-column="name"] {
    min-width: 150px;
}

.products-table th[data-sort="description"],
.products-table td[data-column="description"] {
    min-width: 200px;
}

/* Actions column can be smaller */
.products-table th:last-child,
.products-table td:last-child {
    min-width: 80px;
    width: 80px;
}

/* Main container */
.container {
    max-width: 100% !important;
    padding: 1rem;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Filters container */
.filters-header {
    background: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

/* Table container */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1rem; /* Add space at bottom */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;  /* Increased padding for mobile */
    }

    .filters-header,
    .table-responsive,
    .actions-bar {
        margin-bottom: 1.5rem;  /* Increased margin between elements */
    }

    .search-container {
        flex: 1 1 100%;
        margin-bottom: 0.5rem;
    }

    .filter-buttons {
        width: 100%;
        justify-content: flex-start;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .container {
        padding: 1rem;  /* Still maintain good padding on very small screens */
    }

    .filters-header,
    .table-responsive,
    .actions-bar {
        margin-bottom: 1rem;
    }
}

/* Reset body and html */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Main container */
.container {
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 2rem;  /* Default padding for desktop */
}

/* Common styles for main elements */
.filters-header,
.table-responsive,
.actions-bar {
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background: white;
}

/* Filters container */
.filters-header {
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
}

/* Add button container */
.actions-bar {
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
}

/* Table container */
.table-responsive {
    overflow-x: auto;
    padding: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;  /* Increased padding for mobile */
    }

    .filters-header,
    .table-responsive,
    .actions-bar {
        margin-bottom: 1.5rem;  /* Increased margin between elements */
    }

    .search-container {
        flex: 1 1 100%;
        margin-bottom: 0.5rem;
    }

    .filter-buttons {
        width: 100%;
        justify-content: flex-start;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .container {
        padding: 1rem;  /* Still maintain good padding on very small screens */
    }

    .filters-header,
    .table-responsive,
    .actions-bar {
        margin-bottom: 1rem;
    }
}

/* Settings Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tab-button {
    padding: 1rem;
    background: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.tab-button:hover {
    background: #f8f9fa;
}

.tab-button.active {
    background: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem;
    margin-bottom: 1rem;
}

.tab-content.active {
    display: block;
}

/* Tab header (with title and add button) */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Settings table container */
.table-responsive {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
    margin-bottom: 1rem;
}

/* Settings table */
.settings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.settings-table th,
.settings-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.settings-table th {
    background: #f8f9fa;
    font-weight: 500;
    white-space: nowrap;
}

/* Round corners for table */
.settings-table tr:first-child th:first-child {
    border-top-left-radius: 8px;
}

.settings-table tr:first-child th:last-child {
    border-top-right-radius: 8px;
}

.settings-table tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.settings-table tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .tabs {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .tab-button {
        width: 100%;
        text-align: left;
    }

    .tab-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .tab-header button {
        width: 100%;
    }

    .table-responsive {
        margin: 0;
        border-radius: 8px;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
}

.low-quantity {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Make sure the red background shows even on striped rows */
tr:nth-child(even) td.low-quantity {
    background-color: #dc3545 !important;
}

/* Optional: Add a transition for smoother color changes */
td {
    transition: background-color 0.3s ease;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.button-group button {
    flex: 0 1 auto;  /* Don't stretch buttons */
}

/* If you need additional spacing between buttons */
.button-group button:not(:last-child) {
    margin-right: 10px;
} 