* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0ebe3;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Header - Professional Navy */
header {
    background: #1a3a5c;
    color: white;
    padding: 28px 30px;
    text-align: center;
    border-bottom: 3px solid #c4a35a;
}

header h1 {
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

header p {
    margin-top: 5px;
    opacity: 0.85;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Section Switch Buttons - Elegant */
.section-switch {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: #faf8f5;
    border-bottom: 1px solid #e8e0d5;
}

.section-btn {
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #e8e0d5;
    color: #4a5568;
}

.section-btn.active {
    background: #1a3a5c;
    color: white;
    box-shadow: 0 2px 8px rgba(26, 58, 92, 0.2);
}

.section-btn:hover:not(.active) {
    background: #d4cabb;
    transform: translateY(-1px);
}

/* Navigation Buttons */
nav {
    background: #ffffff;
    padding: 18px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    border-bottom: 1px solid #e8e0d5;
}

nav button {
    background: #2c6e6e;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

nav button:hover {
    background: #1a5a5a;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(44, 110, 110, 0.3);
}

/* Content Area */
.content {
    padding: 30px;
    background: #faf8f5;
    min-height: 500px;
}

/* Stats Cards - Clean & Professional */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card-small {
    background: white;
    padding: 18px 22px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e8e0d5;
}

.stat-card-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    font-size: 32px;
    opacity: 0.8;
}

.stat-info h4 {
    font-size: 12px;
    color: #8a7b6b;
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 26px;
    font-weight: 600;
    color: #1a3a5c;
}

/* Tables - Clean & Readable */
.products-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-size: 13px;
    border: 1px solid #e8e0d5;
}

.products-table th {
    background: #f5f0e8;
    padding: 14px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #1a3a5c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e8e0d5;
}

.products-table td {
    padding: 12px 12px;
    border-bottom: 1px solid #efebe5;
}

.products-table tr:hover {
    background: #faf8f5;
}

/* Value with button containers */
.value-with-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 100px;
}

.value-with-button span {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    padding: 4px 8px;
    background: #f5f0e8;
    border-radius: 6px;
    color: #1a3a5c;
}

/* Icon Buttons */
.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sales {
    background: #c4a35a;
    color: white;
}

.btn-sales:hover {
    background: #a88848;
    transform: scale(1.02);
}

.btn-addstock {
    background: #2c6e6e;
    color: white;
}

.btn-addstock:hover {
    background: #1a5a5a;
    transform: scale(1.02);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.warning {
    background: #fff3e0;
    color: #e67e22;
}

.status-badge.danger {
    background: #ffebee;
    color: #c62828;
}

/* Stock value colors */
.current-stock {
    font-weight: 600;
    font-size: 14px;
    color: #1a3a5c;
}

.sales-value {
    color: #c4a35a;
    font-weight: 600;
}

.addstock-value {
    color: #2c6e6e;
    font-weight: 600;
}

.total-available {
    font-weight: 700;
    font-size: 14px;
    color: #1a3a5c;
}

/* Low stock row colors - subtle */
.low-stock-row {
    background-color: #fff8ed !important;
    border-left: 3px solid #c4a35a;
}

.out-of-stock {
    background-color: #fef5f5 !important;
    border-left: 3px solid #c62828;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 58, 92, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    background: white;
    margin: 8% auto;
    padding: 28px;
    width: 90%;
    max-width: 480px;
    border-radius: 16px;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 22px;
    top: 18px;
    font-size: 24px;
    cursor: pointer;
    color: #a0a0a0;
    transition: color 0.2s ease;
}

.close:hover {
    color: #1a3a5c;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1a3a5c;
    font-size: 13px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d4cabb;
    border-radius: 10px;
    font-size: 13px;
    transition: all 0.2s ease;
    font-family: inherit;
    background: #ffffff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #c4a35a;
    box-shadow: 0 0 0 2px rgba(196, 163, 90, 0.1);
}

.submit-btn {
    background: #2c6e6e;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #1a5a5a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 110, 110, 0.2);
}

/* Headings */
h2 {
    font-size: 18px;
    margin-bottom: 18px;
    color: #1a3a5c;
    font-weight: 600;
    letter-spacing: -0.2px;
    position: relative;
    padding-bottom: 8px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #c4a35a;
    border-radius: 2px;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    margin: 20px 0;
    border-radius: 10px;
    border-left: 3px solid;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left-color: #4caf50;
}

.alert-warning {
    background: #fff3e0;
    color: #e67e22;
    border-left-color: #ff9800;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border-left-color: #f44336;
}

/* Category Headers for Bar Section */
.category-header {
    padding: 12px 20px;
    margin-bottom: 0;
    border-radius: 10px 10px 0 0;
}

.category-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Category Colors - Professional */
.category-section:has(.category-header:contains("SOFT DRINKS")) .category-header {
    background: #2c6e6e;
}
.category-section:has(.category-header:contains("BEERS")) .category-header {
    background: #c4a35a;
}
.category-section:has(.category-header:contains("WINES")) .category-header {
    background: #8b6b9d;
}
.category-section:has(.category-header:contains("SPIRITS")) .category-header {
    background: #c65d3e;
}

/* Responsive */
@media (max-width: 768px) {
    .content {
        padding: 20px;
    }
    
    nav button {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .stat-number {
        font-size: 22px;
    }
    
    .stat-icon {
        font-size: 28px;
    }
    
    .products-table th,
    .products-table td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .value-with-button {
        min-width: 70px;
        gap: 4px;
    }
    
    .btn-icon {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .section-btn {
        padding: 8px 20px;
        font-size: 12px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #efebe5;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c4b5a0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a89478;
}
/* Add or update these table alignment styles */

.products-table td {
    padding: 12px 12px;
    border-bottom: 1px solid #efebe5;
    text-align: center;
    vertical-align: middle;
}

/* Left align only the product name column */
.products-table td:nth-child(2) {
    text-align: left;
}

/* Center all headers except product name */
.products-table th {
    background: #f5f0e8;
    padding: 14px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #1a3a5c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e8e0d5;
    text-align: center;
}

/* Left align the Product Name header */
.products-table th:nth-child(2) {
    text-align: left;
}

/* Specific column styling */
.current-stock {
    font-weight: 600;
    font-size: 14px;
    color: #1a3a5c;
    text-align: center;
}

.total-available {
    font-weight: 700;
    font-size: 14px;
    color: #1a3a5c;
    text-align: center;
}

/* Value with button containers - center aligned */
.value-with-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 100px;
}

.value-with-button span {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    padding: 4px 8px;
    background: #f5f0e8;
    border-radius: 6px;
    color: #1a3a5c;
}

/* Sales and Added Stock values */
.sales-value {
    color: #c4a35a;
    font-weight: 600;
    text-align: center;
}

.addstock-value {
    color: #2c6e6e;
    font-weight: 600;
    text-align: center;
}

/* Buttons inside cells */
.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .products-table td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .value-with-button {
        min-width: 70px;
        gap: 4px;
    }
    
    .value-with-button span {
        min-width: 30px;
        font-size: 11px;
    }
    
    .btn-icon {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}