/* Reports Page Styles */
.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-info h2 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.header-info p {
    margin: 0;
    color: #7f8c8d;
}

.date-filter-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.date-filter-section label {
    font-weight: 500;
    color: #2c3e50;
}

.date-filter-section select {
    padding: 8px 12px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    min-width: 150px;
}

.custom-date-range {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.custom-date-range input {
    padding: 8px 12px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.summary-card.revenue {
    border-left: 4px solid #27ae60;
}

.summary-card.sales {
    border-left: 4px solid #3498db;
}

.summary-card.items {
    border-left: 4px solid #f39c12;
}

.summary-card.profit {
    border-left: 4px solid #e74c3c;
}

.card-icon {
    font-size: 2.5em;
    opacity: 0.8;
}

.card-content h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.8em;
}

.card-content p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.card-change {
    font-size: 12px;
    font-weight: bold;
}

.card-change.positive {
    color: #27ae60;
}

.card-change.negative {
    color: #e74c3c;
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.report-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.report-card.full-width {
    grid-column: 1 / -1;
}

.report-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e1e1e1;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-header h3 {
    margin: 0;
    color: #2c3e50;
}

.report-subtitle {
    font-size: 12px;
    color: #7f8c8d;
}

.report-content {
    padding: 25px;
}

/* Chart Controls */
.chart-controls {
    display: flex;
    gap: 10px;
}

.chart-btn {
    padding: 6px 12px;
    border: 1px solid #e1e1e1;
    background: rgb(103, 181, 255);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.chart-btn:hover,
.chart-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.export-controls {
    display: flex;
    gap: 10px;
}

/* Chart Containers */
.chart-container {
    height: 300px;
    position: relative;
}

.chart-container.small {
    height: 250px;
}

/* Performance Items */
.performance-item {
    padding: 15px 0;
    border-bottom: 1px solid #f1f1f1;
}

.performance-item:last-child {
    border-bottom: none;
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.performance-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
}

.performance-revenue {
    font-weight: bold;
    color: #27ae60;
    font-size: 16px;
}

.performance-details {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #7f8c8d;
}

/* Product Items */
.product-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f1;
}

.product-item:last-child {
    border-bottom: none;
}

.product-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.product-info h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 14px;
}

.product-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #7f8c8d;
}

/* Payment Items */
.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f1;
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-info h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 14px;
}

.payment-info span {
    font-size: 12px;
    color: #7f8c8d;
}

.payment-revenue {
    font-weight: bold;
    color: #27ae60;
}

/* Sales Detail Table */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clickable-row:hover {
    background-color: #f8f9fa;
}

.event-info strong {
    color: #2c3e50;
    text-transform: capitalize;
}

.event-info small {
    color: #7f8c8d;
}

.amount {
    font-weight: bold;
    color: #27ae60;
    text-align: left;
}

/* Sale Detail Modal */
.sale-detail-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e1e1;
}

.sale-detail-header h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.sale-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    font-size: 14px;
}

.sale-meta span {
    color: #7f8c8d;
}

.sale-meta strong {
    color: #2c3e50;
}

.sale-items h5 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.items-table th,
.items-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.items-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.items-table .total-row {
    background: #f8f9fa;
    font-weight: bold;
}

.items-table .total-row td {
    border-top: 2px solid #3498db;
}

.sale-notes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

.sale-notes h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.sale-notes p {
    margin: 0;
    color: #7f8c8d;
    line-height: 1.5;
}

/* Loading and No Data States */
.loading {
    text-align: center;
    color: #7f8c8d;
    padding: 40px 20px;
    font-style: italic;
}

.no-data {
    text-align: center;
    color: #95a5a6;
    padding: 30px 20px;
    font-style: italic;
}

/* Responsive Design for Reports */
@media (max-width: 768px) {
    .reports-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-filter-section {
        justify-content: center;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .sale-meta {
        grid-template-columns: 1fr;
    }
    
    .chart-controls {
        flex-wrap: wrap;
    }
    
    .export-controls {
        flex-wrap: wrap;
    }
}

/* Utility Classes *//* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 30px;
    color: #333;
    font-weight: 300;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.error {
    color: #e74c3c;
    margin: 15px 0;
    padding: 10px;
    background: #ffeaea;
    border-radius: 5px;
    font-size: 14px;
}

.login-info {
    margin-top: 20px;
    color: #777;
}

/* Main Application Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h3 {
    margin-bottom: 10px;
    font-weight: 300;
}

.user-info {
    font-size: 14px;
    color: #bdc3c7;
}

.nav-menu {
    flex: 1;
    list-style: none;
    padding: 20px 0;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-menu a:hover {
    background: #34495e;
    border-left-color: #3498db;
}

.nav-menu a.active {
    background: #34495e;
    border-left-color: #e74c3c;
}

.nav-menu .icon {
    margin-right: 12px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #34495e;
}

.logout-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
}

.content-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e1e1e1;
}

.content-header h1 {
    font-weight: 300;
    color: #2c3e50;
}

.content-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Dashboard Styles */
.welcome-message {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.welcome-message h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.welcome-message p {
    color: #7f8c8d;
    font-size: 16px;
    margin-bottom: 30px;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #d912f3, #c713eb);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.stat-card:nth-child(5) {
    background: linear-gradient(135deg, #f33412, #e71e10);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.stat-card h3 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
    position: relative;
}

.stat-card h3[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.stock-filter {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.stock-filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    margin: 0;
}

.stock-filter input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.stat-card p {
    font-size: 14px;
    opacity: 0.9;
}

/* Form Styles for Future Pages */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-full {
    grid-column: 1 / -1;
}

select, input[type="text"], input[type="number"], input[type="email"], textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
}

button {
    padding: 12px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

button:hover {
    background: #2980b9;
}

button.secondary {
    background: #95a5a6;
}

button.secondary:hover {
    background: #7f8c8d;
}

button.danger {
    background: #e74c3c;
}

button.danger:hover {
    background: #c0392b;
}

/* Table Styles for Future Use */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

tr:hover {
    background: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
}

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

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border-radius: 8px;
    width: 98%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

.modal-content.small {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid #e1e1e1;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

/* Sale detail modal - normal level */
#saleDetailModal {
    z-index: 1000;
}

/* Delete confirmation modal - higher level to appear on top */
#deleteSaleModal {
    z-index: 1100 !important;
}

/* Image modal - highest level */
#imageModal {
    z-index: 1200;
}

/* Delete item modal from inventory page */
#deleteModal {
    z-index: 1100;
}

/* Item add/edit modal from inventory page */
#itemModal {
    z-index: 1000;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #e74c3c;
    text-decoration: none;
}

.modal-form-content {
    padding: 30px 40px;
}

.modal-body {
    padding: 30px 40px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 40px;
    border-top: 1px solid #e1e1e1;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* Inventory Specific Styles */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.search-box input {
    padding: 10px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    width: 250px;
}

.filter-dropdown select {
    padding: 10px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    min-width: 150px;
}

.inventory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.inventory-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state h3 {
    margin-bottom: 15px;
    color: #95a5a6;
}

/* Table Enhancements */
.item-info strong {
    color: #2c3e50;
}

.item-info small {
    color: #7f8c8d;
}

.category-info small {
    color: #7f8c8d;
}

.quantity-controls {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    gap: 3px;
    background: rgba(255, 255, 255, 0.95);
    padding: 3px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid #e1e1e1;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.btn-small {
    width: 22px;
    height: 22px;
    border: 1px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

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

.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-good {
    background: #d4edda;
    color: #155724;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-danger {
    background: #f8d7da;
    color: #721c24;
}

.actions-cell {
    white-space: nowrap;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    margin: 2px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.btn-icon:hover {
    background: #f8f9fa;
}

.btn-icon.danger:hover {
    background: #f8d7da;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn .icon {
    font-size: 16px;
}

/* Form Enhancements */
.form-group-full {
    grid-column: 1 / -1;
}

.text-danger {
    color: #e74c3c;
    font-size: 14px;
}

/* Sales Page Styles */
.sales-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.header-info h2 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.header-info p {
    margin: 0;
    color: #7f8c8d;
}

.sale-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #27ae60;
}

.sales-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    height: calc(100vh - 160px);
}

/* Product Panel */
.product-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-section {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.search-section input {
    flex: 2;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 16px;
    min-width: 300px;
}

.search-section select {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    min-width: 150px;
    max-width: 200px;
}

.products-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: min-content !important;
    padding-right: 10px;
}

.product-card {
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.product-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.product-card.low-stock {
    border-color: #f39c12;
    background: #fef9e7;
}

.product-info h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
}

.product-category {
    margin: 0 0 5px 0;
    color: #7f8c8d;
    font-size: 14px;
}

.product-details {
    margin: 0 0 10px 0;
    color: #95a5a6;
    font-size: 12px;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 8px;
}

.product-stock {
    font-size: 12px;
    color: #7f8c8d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.low-stock-badge {
    background: #f39c12;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

/* Cart Panel */
.cart-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
    background: #f8f9fa;
}

.cart-header h3 {
    margin: 0;
    color: #2c3e50;
}

.btn-clear {
    background: none;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-clear:hover {
    background: #e74c3c;
    color: white;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: #7f8c8d;
    padding: 40px 20px;
}

.empty-cart p {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.empty-cart small {
    font-size: 14px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f1f1f1;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 14px;
}

.cart-item-price {
    margin: 0;
    color: #7f8c8d;
    font-size: 12px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-controls button {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.quantity-controls button:hover {
    background: #f8f9fa;
}

.quantity-controls .quantity {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

.item-total {
    min-width: 60px;
    text-align: right;
    font-weight: bold;
    color: #27ae60;
}

.remove-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: #e74c3c;
    color: white;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #c0392b;
}

.cart-summary {
    padding: 20px;
    border-top: 1px solid #e1e1e1;
    background: #f8f9fa;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    margin-top: 10px;
}

.cart-actions {
    padding: 20px;
    display: flex;
    gap: 10px;
}

.cart-actions .btn {
    flex: 1;
}

/* Sale Modal Enhancements */
.sale-summary-modal {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e1e1e1;
}

.sale-summary-modal h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.modal-cart-items {
    margin-bottom: 15px;
}

.modal-cart-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #e1e1e1;
}

.modal-cart-item:last-child {
    border-bottom: none;
}

.modal-total {
    text-align: right;
    font-size: 18px;
    color: #27ae60;
    border-top: 2px solid #27ae60;
    padding-top: 10px;
    margin-top: 10px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* Bulk Pricing */
.bulk-pricing-hint {
    font-size: 11px;
    color: #27ae60;
    font-weight: 600;
    margin-top: 0px;
}

.summary-row.savings {
    color: #27ae60;
    font-weight: 600;
}

.savings-amount {
    color: #27ae60 !important;
}

.bulk-pricing-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.bulk-pricing-header {
    margin-bottom: 15px;
}

.bulk-pricing-header p {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
}

.bulk-pricing-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bulk-pricing-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-pricing-row label {
    min-width: 100px;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.bulk-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.bulk-input-group input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bulk-label {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.bulk-preview {
    font-size: 12px;
    color: #27ae60;
    font-weight: 600;
    margin-left: 10px;
}

.modal-bulk-summary {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e1e1;
}

.modal-savings-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.modal-savings-row.savings {
    color: #27ae60;
    font-weight: 600;
}

/* Loading and Alert Styles */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    position: relative;
}

/* Toast-style alerts for non-disruptive notifications - DESKTOP ONLY */
.toast-alert {
    position: fixed !important;
    top: 10px !important;
    right: -400px !important;
    z-index: 99999 !important; /* Higher than modals and menus */
    padding: 12px 16px !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    max-width: 320px !important;
    margin: 0 !important;
    transition: right 0.3s ease-out !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: auto;
    animation: none !important;
    transform: none !important;
    left: auto !important;
    bottom: auto !important;
}

.toast-alert.show {
    right: 10px !important;
}

/* Enhanced success toast */
.toast-alert.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    color: #155724 !important;
    border-left: 4px solid #28a745 !important;
}

/* Enhanced error toast */
.toast-alert.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%) !important;
    color: #721c24 !important;
    border-left: 4px solid #dc3545 !important;
}

/* Enhanced info toast */
.toast-alert.alert-info {
    background: linear-gradient(135deg, #cce7ff 0%, #b8daff 100%) !important;
    color: #004085 !important;
    border-left: 4px solid #007bff !important;
}

/* Desktop stacking */
.toast-alert:nth-of-type(1) {
    top: 10px !important;
}

.toast-alert:nth-of-type(2) {
    top: 70px !important;
}

.toast-alert:nth-of-type(3) {
    top: 130px !important;
}

.toast-alert:nth-of-type(4) {
    top: 190px !important;
}

.toast-alert:nth-of-type(5) {
    top: 250px !important;
}

/* Animation for removing toasts */
@keyframes slideOutRight {
    from {
        right: 10px;
        opacity: 1;
    }
    to {
        right: -400px;
        opacity: 0;
    }
}

.toast-alert.removing {
    animation: slideOutRight 0.3s ease-in forwards !important;
}

/* Category headers for product organization */
.category-header {
    background: #3498db;
    color: white;
    padding: 12px 15px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-transform: capitalize;
    border-bottom: 2px solid #2980b9;
    position: sticky;
    top: 0;
    z-index: 10;
    grid-column: 1 / -1;
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    border-radius: 8px 8px 0 0;
    margin: 20px 0 0 0;
    box-sizing: border-box;
}

/* Subcategory headers */
.subcategory-header {
    background: #b852e0;
    color: white;
    padding: 8px 15px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
    border-bottom: 1px solid #3498db;
    border-left: 4px solid #2980b9;
    position: sticky;
    top: 60px;
    z-index: 9;
    grid-column: 1 / -1;
    width: 100%;
    padding: 12px 20px;
    padding-left: 40px; /* Indent to show hierarchy */
    font-size: 16px;
    margin: 0;
    box-sizing: border-box;
    border-radius: 0;
    }

.category-header:first-child {
    margin-top: 0;
}

/* Auto-generated name preview styling */
.name-preview {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    min-height: 50px;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.name-preview.has-content {
    background: #d4edda;
    border-color: #27ae60;
    color: #155724;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-group select,
.form-group input:not([type="checkbox"]),
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Inventory category organization styles */
.inventory-organized {
    margin: 0;
}

.inventory-organized .category-header {
    background: #3498db;
    color: white;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 600;
    text-transform: capitalize;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #2980b9;
}

.inventory-organized .category-header:first-child {
    margin-top: 0;
}

.inventory-organized .table-container {
    margin: 0 0 0 0;
    border-radius: 0;
    box-shadow: none;
}

.inventory-organized .table-container:last-child {
    border-radius: 0 0 8px 8px;
}

.inventory-filtered h4 {
    background: #f8f9fa;
    padding: 15px 20px;
    margin: 0 0 10px 0;
    border-radius: 8px;
    color: #2c3e50;
    font-size: 16px;
}

.no-items {
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
    background: #f8f9fa;
    font-style: italic;
}

/* Size headers */
.size-header {
    background: #a0a0a0;
    color: white;
    padding: 8px 15px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    border-bottom: 1px solid #5dade2;
    border-left: 4px solid #3498db;
    position: sticky;
    top: 0;
    z-index: 8;
    grid-column: 1 / -1;
    width: 100%;
    padding: 10px 20px;
    padding-left: 60px; /* Double indent to show hierarchy */
    font-size: 14px;
    margin: 0;
    box-sizing: border-box;
    border-radius: 0;
    }

/* ===== INVENTORY STYLES - CONSOLIDATED & CLEANED ===== */

/* SKU Quick Add Section */
.sku-add-section {
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
}

.sku-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sku-input-group input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.sku-input-group input:focus {
    outline: none;
    border-color: #3498db;
}

.btn-sku-add {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.btn-sku-add:hover {
    background: #229954;
}

.btn-sku-add:active {
    transform: scale(0.98);
}

/* Image Upload and Display */
.image-upload-section {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.image-preview-container {
    position: relative;
    width: 120px;
    height: 120px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    overflow: hidden;
}

.image-preview {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.image-placeholder {
    color: #6c757d;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.btn-remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.btn-remove-image:hover {
    background: #c0392b;
}

/* Image Modal */
.image-modal-content {
    max-width: 800px;
    max-height: 90vh;
}

.image-modal-body {
    text-align: center;
    padding: 20px;
}

.image-modal-body img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Inventory Organization Structure */
.inventory-organized {
    margin: 0;
}

.category-section {
    margin-bottom: 20px;
}

.inventory-organized .subcategory-header {
    background: #b852e0;
    color: white;
    padding: 12px 20px;
    padding-left: 40px;
    margin: 0 0 0 0 !important;
    font-size: 16px;
    font-weight: 500;
    text-transform: capitalize;
    border-bottom: 1px solid #3498db;
    border-left: 4px solid #2980b9;
}

.inventory-organized .size-header {
    background: #a0a0a0;
    color: white;
    padding: 10px 20px;
    padding-left: 60px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
    border-bottom: 1px solid #5dade2;
    border-left: 4px solid #3498db;
}

/* Inventory Table Structure */
.inventory-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.inventory-table th,
.inventory-table td {
    padding: 8px;
    border-bottom: 1px solid #e1e1e1;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    height: auto;
    min-height: 45px;
    font-size: 14px;
}

.inventory-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e1e1e1;
    height: auto;
    font-size: 15px;
}

/* Column Widths and Alignments */
.col-image {
    width: 80px;
    text-align: center !important;
    padding: 8px;
}

.col-item {
    width: 30%;
    min-width: 200px;
    text-align: left !important;
}

.col-sku {
    width: 120px;
    text-align: center !important;
    font-size: 16px !important;
}

.col-category {
    width: 15%;
    min-width: 120px;
    text-align: center !important;
}

.col-price {
    width: 100px;
    text-align: center !important;
    font-weight: 600;
    color: #27ae60;
    font-size: 16px !important;
}

.col-quantity {
    width: 120px;
    text-align: center !important;
}

.col-status {
    width: 100px;
    text-align: center !important;
}

.col-actions {
    width: 140px;
    text-align: center !important;
}

/* Item Info */
.item-info {
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 40px;
}

.item-info strong {
    color: #2c3e50;
    display: block;
    line-height: 1.4;
    font-size: 16px;
}

/* Image Thumbnails */
.item-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto;
}

.item-thumbnail:hover {
    transform: scale(1.1);
}

.no-image {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ccc;
    margin: 0 auto;
}

/* Quantity Display - Horizontal Controls */
.quantity-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between - number + */
    height: auto;
    padding: 8px 4px;
    min-height: 45px;
    position: relative;
}

.quantity-number {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
    min-width: 30px;
    text-align: center;
    order: 2; /* Put number in the middle */
}

.quantity-controls {
    display: contents; /* This makes the buttons appear as direct children */
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.quantity-controls .btn-small:first-child {
    order: 1; /* - button goes first (left) */
}

.quantity-controls .btn-small:last-child {
    order: 3; /* + button goes last (right) */
}

.inventory-row:hover .quantity-controls {
    opacity: 1;
    visibility: visible;
}

/* Category Info */
.category-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    line-height: 1.3;
    font-size: 16px;
}

.category-info small {
    color: #7f8c8d;
    font-size: 14px;
}

/* Status Badges */
.status {
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-block;
}

.status-good {
    background: #d4edda;
    color: #155724;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-danger {
    background: #f8d7da;
    color: #721c24;
}

/* Action Buttons */
.actions-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    height: 100%;
}

.btn-small {
    width: 24px;
    height: 24px;
    border: 1px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

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

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    margin: 1px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #f8f9fa;
}

.btn-icon.danger:hover {
    background: #f8d7da;
}

/* Row Hover Effects */
.inventory-row {
    transition: background-color 0.2s ease;
}

.inventory-row:hover {
    background-color: #f8f9fa;
}

/* Purchases Header */
.purchases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.purchases-header .header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* Purchases Stats */
.purchases-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.purchases-stats .stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.purchases-stats .stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.purchases-stats .stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

/* Purchases Table */
.purchases-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.purchases-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.purchases-table th,
.purchases-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e1e1e1;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.purchases-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e1e1e1;
    font-size: 15px;
}

/* Column Widths */
.col-receipt {
    width: 80px;
    text-align: center !important;
}

.col-date {
    width: 120px;
    text-align: center !important;
}

.col-location {
    width: 15%;
    min-width: 150px;
}

.col-items {
    width: 35%;
    min-width: 200px;
}

.col-category {
    width: 120px;
    text-align: center !important;
}

.col-cost {
    width: 100px;
    text-align: right !important;
    font-weight: 600;
    color: #e74c3c;
}

.col-actions {
    width: 100px;
    text-align: center !important;
}

/* Receipt Images */
.receipt-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 1px solid #ddd;
}

.receipt-thumbnail:hover {
    transform: scale(1.1);
}

.no-receipt {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ccc;
    margin: 0 auto;
}

/* Receipt Preview in Form */
.receipt-preview-container {
    position: relative;
    width: 120px;
    height: 120px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    overflow: hidden;
}

.receipt-preview {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    object-fit: cover;
}

/* Items Display */
.items-text {
    line-height: 1.4;
    word-wrap: break-word;
}

/* Category Badges */
.category-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.category-badge.supplies {
    background: #e3f2fd;
    color: #1565c0;
}

.category-badge.materials {
    background: #f3e5f5;
    color: #7b1fa2;
}

.category-badge.equipment {
    background: #e8f5e8;
    color: #2e7d32;
}

.category-badge.packaging {
    background: #fff3e0;
    color: #ef6c00;
}

.category-badge.marketing {
    background: #fce4ec;
    color: #c2185b;
}

.category-badge.booth-fees {
    background: #f1f8e9;
    color: #558b2f;
}

.category-badge.travel {
    background: #e0f2f1;
    color: #00695c;
}

.category-badge.other {
    background: #f5f5f5;
    color: #616161;
}

/* Purchase Row Hover */
.purchase-row {
    transition: background-color 0.2s ease;
}

.purchase-row:hover {
    background-color: #f8f9fa;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state h3 {
    margin-bottom: 15px;
    color: #95a5a6;
}

/* Receipt Image Modal */
.receipt-image-modal .modal-content {
    max-width: 90vw;
    max-height: 90vh;
}

.receipt-image-modal .image-modal-body img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.purchases-mobile-cards {
    display: none;
}

.purchases-table-container {
    display: block;
}


/* Category Filter Dropdown Styles */
.category-filter-dropdown {
    position: relative;
    display: inline-block;
}

.category-filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: auto;
    min-width: 150px;
    padding: 8px 12px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    height: auto;
}

.category-filter-btn:hover {
    border-color: #3498db;
}

.category-filter-btn:focus {
    outline: none;
    border-color: #3498db;
}

#categoryFilterText {
    color: #333;
    font-size: 16px;
    flex: 1;
    text-align: left;
}

.dropdown-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.category-filter-btn:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 2px solid #e1e1e1;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

.category-options {
    padding: 8px 0;
}

.category-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
    user-select: none;
}

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

.category-option input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.category-actions {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid #e1e1e1;
    background-color: #f8f9fa;
}

.category-actions .btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-actions .btn-small:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Filter container styling with consistent widths */
.filter-group {
    position: relative;
}

.checkbox-container {
    height: 150px; /* Fixed height instead of max-height */
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    
    /* Force scrollbar to always be present - keeps consistent width */
    scrollbar-gutter: stable;
}

.checkbox-label {
    display: block;
    margin: 4px 0;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: #f8f9fa;
}

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

/* Scrollbar styling */
.checkbox-container::-webkit-scrollbar {
    width: 12px; /* Make scrollbar slightly wider for better visibility */
}

.checkbox-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.checkbox-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.checkbox-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Firefox scrollbar styling */
.checkbox-container {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* Additional styling for clickable rows */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.clickable-row:hover {
    background-color: #f8f9fa;
}

/* Filter grid responsive adjustments */
.sales-filters-container > div:first-of-type {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Ensure consistent label styling */
.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.filter-group label small {
    color: #666;
    font-weight: normal;
}

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
}

input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.turnover-summary, .roi-summary, .avg-sale-summary, .location-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.metric-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    border-left: 4px solid #3498db;
}

.metric-card h5 {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card p {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.turnover-table, .roi-table, .avg-sale-chart, .location-table {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f1f1f1;
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-info h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #2c3e50;
}

.payment-info span {
    font-size: 12px;
    color: #666;
}

.payment-info small {
    display: block;
    font-size: 11px;
    margin-top: 2px;
}

.payment-revenue {
    text-align: right;
    font-weight: bold;
    color: #27ae60;
}

.payment-revenue small {
    display: block;
    font-size: 11px;
    margin-top: 2px;
    font-weight: normal;
}

.revenue-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f1f1f1;
    gap: 12px;
}

.revenue-item:last-child {
    border-bottom: none;
}

.revenue-item .product-rank {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.revenue-item .product-info {
    flex: 1;
}

.revenue-item .product-info h5 {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #2c3e50;
    line-height: 1.2;
}

.revenue-item .product-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.revenue-item .product-stats span {
    font-size: 11px;
    color: #666;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
}

.product-revenue {
    text-align: right;
    flex-shrink: 0;
}

.revenue-amount {
    font-size: 16px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 2px;
}

.product-revenue small {
    font-size: 11px;
    color: #666;
}

/* Make the rank colors different for revenue vs quantity */
.revenue-item:nth-child(1) .product-rank { background: linear-gradient(135deg, #f39c12, #e67e22); }
.revenue-item:nth-child(2) .product-rank { background: linear-gradient(135deg, #95a5a6, #7f8c8d); }
.revenue-item:nth-child(3) .product-rank { background: linear-gradient(135deg, #e67e22, #d35400); }

/* Events Page Styles - Add these to your styles.css */

/* Events Header */
.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.events-header .header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* Events Stats */
.events-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.events-stats .stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.events-stats .stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.events-stats .stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.events-stats .stat-card:nth-child(4) {
    background: linear-gradient(135deg, #fd746c, #ff9068);
    box-shadow: 0 4px 15px rgba(253, 116, 108, 0.3);
}

.events-stats .stat-card:nth-child(5) {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.positive {
    color: #27ae60 !important;
}

.negative {
    color: #e74c3c !important;
}

/* Events Container */
.events-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Events Cards Grid */
.events-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    padding: 30px;
}

/* Event Card */
.event-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e1e1;
    transition: all 0.3s ease;
    position: relative;
    max-width: 30%;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.event-card.past-event {
    opacity: 0.85;
    background: #f8f9fa;
}

/* Event Card Header */
.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.event-title-section {
    flex: 1;
}

.event-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.event-type {
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-status-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

/* Status Badges */
.event-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-planning {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.status-applied {
    background: #fff3cd;
    color: #856404;
}

.status-accepted {
    background: #d1ecf1;
    color: #0c5460;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #e2e3e5;
    color: #383d41;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.upcoming-badge {
    background: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.past-badge {
    background: #6c757d;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Event Card Body */
.event-card-body {
    margin-bottom: 20px;
}

.event-date-time {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f4;
}

.event-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 1rem;
    color: #2c3e50;
}

.event-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.event-location-info {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f4;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 1rem;
    color: #2c3e50;
}

.event-address {
    font-size: 0.85rem;
    color: #6c757d;
    margin-left: 24px;
    line-height: 1.4;
}

.event-booth {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Financial Information */
.event-financial {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.cost-info {
    margin-left: 14px;
    font-size: 0.85rem;
}
.revenue-info,
.profit-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.cost-info:last-child,
.revenue-info:last-child,
.profit-info:last-child {
    margin-bottom: 0;
}

.cost-amount {
    color: #e74c3c;
    font-weight: 600;
}

.revenue-amount {
    color: #27ae60;
    font-weight: 600;
}

.profit-amount {
    font-weight: bold;
}

.profit-amount.positive {
    color: #27ae60;
}

.profit-amount.negative {
    color: #e74c3c;
}

/* Contact Information */
.event-contact {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.contact-header {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.event-contact div {
    margin-bottom: 3px;
    color: #6c757d;
}

.event-contact div:last-child {
    margin-bottom: 0;
}

.event-contact a {
    color: #3498db;
    text-decoration: none;
}

.event-contact a:hover {
    text-decoration: underline;
}

/* Notes */
.event-notes {
    background: #fff3cd;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #856404;
    line-height: 1.4;
    margin-bottom: 15px;
}

/* Event Card Actions */
.event-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Form Sections */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e1e1e1;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

/* Calendar View Placeholder */
.events-calendar {
    padding: 60px 30px;
}

.calendar-placeholder {
    text-align: center;
    color: #6c757d;
}

.calendar-placeholder h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.calendar-placeholder p {
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 30px;
    color: #6c757d;
    grid-column: 1 / -1;
}

.empty-state h3 {
    margin-bottom: 15px;
    color: #95a5a6;
    font-size: 1.5rem;
}

.empty-state p {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Enhanced Button Styling for Small Buttons */
.btn-small {
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
    min-width: fit-content;
}

/* Primary Button (Edit) */
.btn-small.btn-primary {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.btn-small.btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Secondary Button (Copy, Website) */
.btn-small.btn-secondary {
    background: #95a5a6;
    color: white;
    border-color: #95a5a6;
}

.btn-small.btn-secondary:hover {
    background: #7f8c8d;
    border-color: #7f8c8d;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

/* Danger Button (Delete) */
.btn-small.btn-danger {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.btn-small.btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* Responsive Design for Events */
@media (max-width: 768px) {
    .events-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .events-header .header-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .events-stats {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .events-cards-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .event-card {
        padding: 15px;
        max-width: 100%;
    }
    
    .event-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .event-status-section {
        align-items: flex-start;
        flex-direction: row;
        gap: 10px;
    }
    
    .event-card-actions {
        gap: 6px;
    }
    
    .btn-small {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .form-row {
        display: block;
    }
    
    .form-row .form-group {
        margin-bottom: 15px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .events-cards-grid {
        grid-template-columns: 1fr;
        padding: 25px;
    }
    
    .events-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/******************************* iPad Layout - Between Mobile and Desktop (668px - 1200px) *****************************************/
@media screen and (min-width: 668px) and (max-width: 1200px) {
    
    /* Hide desktop sidebar, use hamburger menu like mobile */
    .sidebar {
        display: none !important;
    }

    .event-card {
        padding: 15px;
        max-width: 100%;
    }

    /* Cart Panel */
    .cart-panel {
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .cart-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #e1e1e1;
        background: #f8f9fa;
    }

    .cart-header h3 {
        margin: 0;
        color: #2c3e50;
    }

    .btn-clear {
        background: none;
        border: 1px solid #e74c3c;
        color: #e74c3c;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 12px;
    }

    .btn-clear:hover {
        background: #e74c3c;
        color: white;
    }

    .cart-items {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
    }

    .empty-cart {
        text-align: center;
        color: #7f8c8d;
        padding: 40px 20px;
    }

    .empty-cart p {
        margin: 0 0 10px 0;
        font-size: 16px;
    }

    .empty-cart small {
        font-size: 14px;
    }

    /* ----- Cart Item Styling ----- */
    .cart-item {
        display: flex; /* Use flexbox for the main layout of the item */
        justify-content: space-between; /* Puts space between the info and controls */
        align-items: center; /* Vertically aligns items */
        padding: 10px 0; /* Increased padding for better spacing */
        border-bottom: 1px solid #f1f1f1;
        flex-wrap: nowrap; /* Prevent wrapping to a new line */
    }

    .cart-item:last-child {
        border-bottom: none;
    }

    /* This targets the div holding the h5 and p */
    .cart-item-info {
        display: flex;
        flex-direction: column; /* Stack name and price-per-item vertically */
        flex-grow: 1; /* Allow this section to grow and take available space */
        margin-right: 15px; /* Add some space between info and controls */
        min-width: 0; /* Crucial for flex items to shrink properly */
    }

    .cart-item-info h5 {
        margin: 0 0 3px 0; /* Reduced bottom margin */
        color: #2c3e50;
        font-size: 11px;
        overflow: hidden; /* Hide any overflow */
        text-overflow: ellipsis; /* Add ellipsis if text is too long */
        max-width: 100%; /* Ensure it doesn't exceed its container */
    }

    .cart-item-info p {
        margin: 0;
        color: #7f8c8d;
        font-size: 12px;
    }

    .cart-item-controls {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0; /* Prevent controls from shrinking */
    }

    .quantity-controls {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .quantity-controls button {
        width: 24px;
        height: 24px;
        border: 1px solid #ddd;
        background: white;
        border-radius: 3px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }

    .quantity-controls button:hover {
        background: #f8f9fa;
    }

    .quantity-controls .quantity {
        min-width: 30px;
        text-align: center;
        font-weight: bold;
    }

    .item-total {
        min-width: 60px;
        text-align: right;
        font-weight: bold;
        color: #27ae60;
    }

    .remove-btn {
        width: 24px;
        height: 24px;
        border: none;
        background: #e74c3c;
        color: white;
        border-radius: 3px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .remove-btn:hover {
        background: #c0392b;
    }

    .cart-summary {
        padding: 20px;
        border-top: 1px solid #e1e1e1;
        background: #f8f9fa;
    }

    .summary-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
        font-size: 14px;
    }

    .summary-row.total {
        font-size: 18px;
        font-weight: bold;
        color: #2c3e50;
        padding-top: 10px;
        border-top: 1px solid #ddd;
        margin-top: 10px;
    }

    .cart-actions {
        padding: 20px;
        display: flex;
        gap: 10px;
    }

    .cart-actions .btn {
        flex: 1;
    }
    
    /* Main content full width */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        min-height: calc(100vh - 60px);
    }
    
    /* Header with hamburger menu (same as mobile) */
    .content-header {
        padding: 15px 20px !important;
        background: #3498db;
        color: white;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .content-header h1 {
        font-size: 22px !important;
        margin: 0 !important;
        font-weight: 600;
        color: white;
        flex: 1;
    }
    
    /* Hamburger menu (same as mobile) */
    .hamburger-menu {
        width: 35px !important;
        height: 35px !important;
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 28px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 4px !important;
        transition: background 0.2s ease;
    }
    
    .hamburger-menu:hover {
        background: rgba(255,255,255,0.1) !important;
    }
    
    /* Slide-out menu (same as mobile but bigger) */
    .menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 50000 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
    }
    
    .menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .slide-menu {
        position: fixed !important;
        top: 0 !important;
        right: -350px !important;
        width: 320px !important; /* Slightly wider than mobile */
        height: 100vh !important;
        background: #2c3e50 !important;
        z-index: 50001 !important;
        transition: right 0.3s ease !important;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: -4px 0 15px rgba(0,0,0,0.2) !important;
    }
    
    .slide-menu.active {
        right: 0 !important;
    }
    
    /* Menu styling (same as mobile) */
    .slide-menu-header {
        padding: 25px !important;
        background: #34495e !important;
        border-bottom: 1px solid #4a5f7a !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .slide-menu-header h3 {
        color: white !important;
        margin: 0 !important;
        font-size: 20px !important;
    }
    
    .close-menu {
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 28px !important;
        cursor: pointer !important;
        width: 35px !important;
        height: 35px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 4px !important;
    }
    
    .close-menu:hover {
        background: rgba(255,255,255,0.1) !important;
    }
    
    .slide-menu-items {
        flex: 1 !important;
        padding: 25px 0 !important;
    }
    
    .slide-menu-item {
        display: block !important;
        color: #ecf0f1 !important;
        text-decoration: none !important;
        padding: 18px 25px !important;
        border-bottom: 1px solid #34495e !important;
        transition: background 0.2s ease !important;
        display: flex !important;
        align-items: center !important;
        gap: 18px !important;
    }
    
    .slide-menu-item:hover {
        background: #34495e !important;
    }
    
    .slide-menu-item.active {
        background: #3498db !important;
        color: white !important;
    }
    
    .slide-menu-item .icon {
        font-size: 22px !important;
        width: 28px !important;
        text-align: center !important;
    }
    
    .slide-menu-item .text {
        font-size: 18px !important;
        font-weight: 500 !important;
    }
    
    .slide-menu-footer {
        padding: 25px !important;
        border-top: 1px solid #34495e !important;
        background: #34495e !important;
    }
    
    .logout-menu-item {
        display: block !important;
        color: #e74c3c !important;
        text-decoration: none !important;
        padding: 15px 25px !important;
        border: 1px solid #e74c3c !important;
        border-radius: 8px !important;
        text-align: center !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        transition: all 0.2s ease !important;
    }
    
    .logout-menu-item:hover {
        background: #e74c3c !important;
        color: white !important;
    }
    
    /* Content area - smaller desktop style */
    .content-body {
        padding: 25px 20px !important;
    }
    
    /* Dashboard stats - 2 column grid */
    .quick-stats {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
        margin-bottom: 30px !important;
    }
    
    .stat-card {
        padding: 25px 20px !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        margin: 0 !important;
    }
    
    .stat-card h3 {
        font-size: 32px !important;
        margin: 0 0 8px 0 !important;
    }
    
    .stat-card p {
        font-size: 16px !important;
        margin: 0 !important;
    }
    
    /* Inventory stats - horizontal layout */
    .inventory-stats {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 15px !important;
        margin-bottom: 25px !important;
    }
    
    .inventory-stats .stat-card {
        padding: 20px !important;
        text-align: center !important;
        border-left: none !important;
        border-bottom: 4px solid #3498db !important;
    }
    
    /* Tables and forms - desktop style but smaller */
    .table-container {
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .table-container table {
        font-size: 14px;
    }
    
    .table-container th,
    .table-container td {
        padding: 12px 15px;
    }
    
    /* Sales page - desktop layout but more compact with fixed cart */
    .sales-container {
        display: flex !important;
        gap: 20px !important;
        height: calc(100vh - 120px) !important; /* Fixed height minus header/padding */
        margin-bottom: 0 !important;
        overflow: hidden !important; /* Prevent whole container from scrolling */
    }
    
    .product-panel {
        flex: 2 !important;
        background: white;
        border-radius: 12px;
        padding: 0 !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    .search-section {
        padding: 15px !important;
        background: white !important;
        border-bottom: 1px solid #e1e1e1 !important;
        border-radius: 12px 12px 0 0 !important;
        flex-shrink: 0 !important; /* Don't shrink the search area */
    }
    
    /* FIXED: Product grid - 3 columns for iPad */
    .products-grid {
        flex: 1 !important; /* Take remaining space */
        overflow-y: auto !important; /* Only this scrolls */
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important; /* 3 COLUMNS for iPad */
        padding: 0 !important;
        align-content: start !important; /* Align content to top */
    }
    
    .cart-panel {
        flex: 1 !important;
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        height: 100% !important; /* Full height of container */
        max-height: none !important;
        background: white;
        border-radius: 12px;
        padding: 0 !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    .cart-header {
        padding: 15px 20px !important;
        background: #f8f9fa !important;
        border-bottom: 1px solid #e1e1e1 !important;
        border-radius: 12px 12px 0 0 !important;
        flex-shrink: 0 !important;
    }
    
    .cart-items {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 0 20px !important;
        max-height: none !important;
    }
    
    .cart-summary {
        padding: 15px 20px !important;
        background: #f8f9fa !important;
        border-top: 1px solid #e1e1e1 !important;
        flex-shrink: 0 !important;
    }
    
    .cart-actions {
        padding: 20px !important;
        background: white !important;
        border-top: 1px solid #e1e1e1 !important;
        border-radius: 0 0 12px 12px !important;
        flex-shrink: 0 !important;
    }
    
    /* Product cards - optimized for 3 columns */
    .product-card {
        padding: 12px !important; /* Smaller padding for 3 columns */
        border-bottom: 1px solid #e1e1e1 !important;
        border-right: 1px solid #e1e1e1 !important;
        display: flex !important;
        flex-direction: column !important;
        cursor: pointer !important;
        transition: background 0.2s ease;
        min-height: auto !important; /* Remove fixed height - let content determine height */
        align-items: stretch !important;
    }
    
    .product-card:hover {
        background: #f8f9fa !important;
    }
    
    .product-info {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .product-info h4 {
        font-size: 14px !important; /* Smaller for 3 columns */
        margin: 0 0 4px 0 !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .product-category {
        font-size: 10px !important; /* Smaller for 3 columns */
        margin: 0 0 3px 0 !important;
        color: #6c757d !important;
        line-height: 1.1 !important;
    }
    
    .product-details {
        font-size: 9px !important; /* Smaller for 3 columns */
        margin: 0 0 6px 0 !important;
        color: #95a5a6 !important;
        line-height: 1.1 !important;
    }
    
    .product-info .product-price {
        font-size: 16px !important; /* Good size for 3 columns */
        font-weight: bold !important;
        color: #27ae60 !important;
        margin: 6px 0 3px 0 !important;
        text-align: left !important;
    }
    
    .bulk-pricing-hint {
        font-size: 10px !important; /* Smaller for 3 columns */
        color: #27ae60 !important;
        font-weight: 600 !important;
        margin: 0 0 6px 0 !important;
        line-height: 1.1 !important;
        word-wrap: break-word !important;
    }
    
    .product-stock {
        font-size: 9px !important; /* Smaller for 3 columns */
        color: #6c757d !important;
        margin-top: 6px !important;
        text-align: left !important;
        line-height: 1.1 !important;
    }
    
    .low-stock-badge {
        display: block !important;
        font-size: 8px !important;
        margin-top: 2px !important;
    }
    
    .subcategory-header {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        padding: 12px 20px !important;
        padding-left: 35px !important;
        font-size: 14px !important;
        margin: 0 !important; /* ENSURE NO MARGIN */
    }
    
    .size-header {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        padding: 8px 20px !important;
        padding-left: 50px !important; /* Double indent */
        font-size: 13px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        border-radius: 0 !important;
    }
    
    /* Forms and modals */
    .modal-content {
        width: 90% !important;
        max-width: 600px !important;
        margin: 50px auto !important;
    }
    
    .form-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }
    
    /* SKU section styling */
    .sku-add-section {
        padding: 12px 20px;
    }
    
    .sku-input-group input {
        padding: 10px 15px;
        font-size: 15px;
    }
    
    .btn-sku-add {
        padding: 10px 18px;
        font-size: 15px;
    }
    
    /* Inventory table column adjustments */
    .col-item {
        width: 25%;
        min-width: 180px;
    }
    
    .col-category {
        width: 12%;
        min-width: 100px;
    }
    
    /* Hide mobile-only elements */
    .mobile-only {
        display: none !important;
    }
}