/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Theme Colors */
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    /* Light Theme Variables (Default) */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Legacy support */
    --dark: #1e293b;
    --light: #f8fafc;
    --transition: all 0.3s ease;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #e4e4e4;
    --text-secondary: #b8b8b8;
    --text-muted: #888888;
    --border-color: #404040;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

    /* Adjust accent colors for dark mode */
    --primary-color: #3b82f6;
    --success-color: #22c55e;
    --warning-color: #fbbf24;
    --danger-color: #f87171;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Login Page Styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.5s ease;
    transition: background-color 0.3s ease;
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
        border-radius: 12px;
    }

    .logo-section i {
        font-size: 40px;
    }

    .logo-section h1 {
        font-size: 28px;
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-section i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.logo-section h1 {
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.logo-section p {
    color: var(--secondary-color);
    font-size: 14px;
}

.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group label i {
    color: var(--primary-color);
    margin-right: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--secondary-color);
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.demo-credentials {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 20px;
}

.demo-credentials h4 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.demo-credentials p {
    margin: 5px 0;
    color: var(--secondary-color);
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-logout {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 8px 16px;
}

.btn-logout:hover {
    background: white;
    color: var(--primary-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Alert Styles */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-error {
    background: #fee2e2;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.alert-success {
    background: #d1fae5;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.alert-warning {
    background: #fef3c7;
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: var(--success-color);
    color: white;
}

.toast.error {
    background: var(--danger-color);
    color: white;
}

.toast.warning {
    background: var(--warning-color);
    color: white;
}

/* Navigation Bar */
.navbar {
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
}

.nav-brand i {
    font-size: 28px;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Container Layout */
.container {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--bg-secondary);
    box-shadow: var(--shadow);
    padding: 20px 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    transition: background-color 0.3s ease;
}

.menu {
    list-style: none;
}

.menu-item {
    padding: 15px 30px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.menu-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.menu-item.active {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.menu-item i {
    font-size: 18px;
    width: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
    align-items: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-icon.blue {
    background: var(--primary-color);
}

.stat-icon.green {
    background: var(--success-color);
}

.stat-icon.orange {
    background: var(--warning-color);
}

.stat-icon.red {
    background: var(--danger-color);
}

.stat-info h3 {
    font-size: 32px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--secondary-color);
    font-size: 14px;
}

/* Product Cards Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.product-card-content {
    padding: 20px;
}

.product-card-header {
    margin-bottom: 15px;
}

.product-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.product-card-sku {
    color: var(--secondary-color);
    font-size: 13px;
}

.product-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.product-card-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.product-stat {
    text-align: center;
}

.product-stat-label {
    font-size: 11px;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.product-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Product Detail Modal */
.product-detail-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.product-detail-header img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.product-detail-info {
    flex: 1;
}

.product-detail-info h2 {
    margin-bottom: 5px;
    color: var(--text-primary);
}

.product-sku {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.product-stats-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.stat-inline {
    display: flex;
    gap: 8px;
}

.stat-inline strong {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Tables */
.table-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-tertiary);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.text-center {
    text-align: center;
}

/* Search and Filter Controls */
.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.search-bar {
    position: relative;
    flex: 1;
}

.search-bar input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.category-filter {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    min-width: 200px;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

/* Status Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.badge-success {
    background: #d1fae5;
    color: var(--success-color);
}

.badge-warning {
    background: #fef3c7;
    color: var(--warning-color);
}

.badge-danger {
    background: #fee2e2;
    color: var(--danger-color);
}

.badge-in {
    background: #dbeafe;
    color: #2563eb;
}

.badge-out {
    background: #fce7f3;
    color: #db2777;
}

/* Status Badge Styles */
.badge-in-stock {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.badge-low-stock {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    animation: pulse-warning 2s ease-in-out infinite;
}

.badge-out-of-stock {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

@keyframes pulse-warning {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 4px 8px rgba(245, 158, 11, 0.5);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

[data-theme="dark"] .modal {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s;
    transition: background-color 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

.modal-content h3 {
    margin-bottom: 25px;
    color: var(--text-primary);
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: var(--danger-color);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Recent Section */
.recent-section {
    margin-top: 30px;
}

.recent-section h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.report-card {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.report-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.report-card p {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Date Filter Buttons */
.date-filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.date-filter-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.date-filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.date-filter-btn i {
    font-size: 0.9em;
}

.custom-date-range {
    display: flex;
    padding: 15px;
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
}

[data-theme="dark"] .custom-date-range {
    background: var(--bg-tertiary);
}

.current-date-display {
    font-size: 0.95em;
}

.current-date-display strong {
    color: var(--primary-color);
}

/* Forecast Indicators */
.forecast-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 4px;
}

.forecast-indicator.urgent {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.forecast-indicator.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.forecast-indicator.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

[data-theme="dark"] .forecast-indicator.urgent {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    color: #fca5a5;
}

[data-theme="dark"] .forecast-indicator.warning {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    color: #fcd34d;
}

[data-theme="dark"] .forecast-indicator.info {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #93c5fd;
}

.forecast-details {
    margin-top: 8px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.85em;
    line-height: 1.6;
}

.forecast-details-row {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.forecast-details-row:last-child {
    border-bottom: none;
}

.forecast-details-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.forecast-details-value {
    color: var(--text-primary);
    font-weight: 600;
}

.forecast-tooltip {
    position: relative;
    cursor: help;
}

.forecast-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.8em;
    z-index: 1000;
    margin-bottom: 5px;
}

/* Action Buttons */
.action-btn {
    padding: 6px 10px;
    margin: 0 3px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.action-btn i {
    pointer-events: none;
}

.action-btn-edit {
    background: #dbeafe;
    color: var(--primary-color);
}

.action-btn-edit:hover {
    background: var(--primary-color);
    color: white;
}

.action-btn-delete {
    background: #fee2e2;
    color: var(--danger-color);
}

.action-btn-delete:hover {
    background: var(--danger-color);
    color: white;
}

.action-btn-view {
    background: #f3f4f6;
    color: var(--secondary-color);
}

.action-btn-view:hover {
    background: var(--secondary-color);
    color: white;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Show Hamburger Menu */
    .hamburger-menu {
        display: flex;
    }

    /* Mobile Navbar */
    .navbar {
        padding: 12px 15px;
    }

    .nav-brand {
        font-size: 18px;
        margin-left: 10px;
    }

    .nav-brand span {
        display: none;
    }

    .nav-user span {
        display: none;
    }

    .btn-logout {
        padding: 8px 12px;
        font-size: 12px;
    }

    .btn-logout span {
        display: none;
    }

    /* Mobile Sidebar */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 99;
        background: white;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        overflow-y: auto;
        padding-top: 70px;
    }

    .sidebar.active {
        left: 0;
    }

    .container {
        flex-direction: column;
    }

    .main-content {
        max-height: none;
        padding: 15px;
    }

    /* Stats Grid - 2 columns on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .stat-info h3 {
        font-size: 20px;
    }

    .stat-info p {
        font-size: 11px;
    }

    /* Section Headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    /* Filter Controls */
    .filter-bar {
        flex-direction: column;
    }

    .filter-controls {
        flex-direction: column;
    }

    .category-filter {
        width: 100%;
    }

    /* Responsive Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }

    .data-table {
        font-size: 11px;
        min-width: 600px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-header {
        flex-direction: column;
    }

    .product-detail-header img {
        width: 100%;
    }

    /* Mobile-Friendly Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 44px;
    }

    .btn i {
        font-size: 14px;
    }

    /* Full-Screen Modals on Mobile */
    .modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        padding: 20px;
        overflow-y: auto;
    }

    .modal-header {
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .modal-header h3 {
        font-size: 18px;
    }

    /* Form Improvements */
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 12px;
    }

    /* Menu Items - Better Touch Targets */
    .menu-item {
        padding: 16px 25px;
        font-size: 15px;
    }

    /* Toast Notifications */
    .toast {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        top: 70px;
    }

    /* Reports Grid */
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Recent Sections */
    .recent-section {
        margin-top: 20px;
    }

    .recent-section h3 {
        font-size: 16px;
    }

    /* Low Stock Items */
    .low-stock-item {
        padding: 10px;
        flex-wrap: wrap;
    }

    .low-stock-item .item-info {
        gap: 8px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    /* Single Column Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 12px;
    }

    /* Smaller Typography */
    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 16px;
    }

    /* Compact Buttons */
    .btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* Menu Items */
    .menu-item {
        padding: 14px 20px;
        font-size: 14px;
    }

    /* Nav Brand - Icon Only */
    .nav-brand i {
        font-size: 24px;
    }
}

/* Hide elements based on user role */
.hidden {
    display: none !important;
}

/* Image Upload Tabs */
.image-option-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.image-input-container {
    position: relative;
}

.image-tab {
    display: none;
}

.image-tab.active {
    display: block;
}

/* File Upload Area */
.file-upload-wrapper {
    position: relative;
    margin-top: 10px;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-display {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: var(--light);
    transition: var(--transition);
}

.file-upload-display:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.file-upload-display i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.file-upload-display p {
    color: var(--dark);
    font-weight: 500;
    margin-bottom: 5px;
}

.file-upload-display small {
    color: var(--secondary-color);
    font-size: 12px;
}

.file-upload-display.has-file {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.file-upload-display.has-file i {
    color: var(--success-color);
}

/* Image Preview */
.image-preview-wrapper {
    position: relative;
    display: inline-block;
    max-width: 300px;
}

.image-preview-wrapper img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: block;
}

.btn-remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-remove-image:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Drag and Drop States */
.file-upload-wrapper.dragging .file-upload-display {
    border-color: var(--primary-color);
    background: #e0f2fe;
    transform: scale(1.02);
}
/* Additional CSS for Image Upload and Display Features */

/* Image Preview in Modal */
.product-image-preview {
    width: 100%;
    max-width: 200px;
    height: 150px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    overflow: hidden;
    background: #f9f9f9;
    position: relative;
    transition: all 0.3s ease;
}

.product-image-preview:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.product-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-image-preview .placeholder {
    text-align: center;
    color: #999;
}

.product-image-preview .placeholder i {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.image-upload-btn {
    margin-top: 10px;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.remove-image-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.product-image-preview:hover .remove-image-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Product Table Image */
.product-table-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: transform 0.3s ease;
}

.product-table-image:hover {
    transform: scale(1.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 100;
    position: relative;
}

.product-table-placeholder {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border: 1px solid #ddd;
}

.product-table-placeholder i {
    font-size: 24px;
}

/* Image Section in Form */
.form-group.image-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

.form-group.image-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.text-muted {
    color: #6c757d;
    font-size: 0.875rem;
    display: block;
    margin-top: 5px;
}

/* Low Stock Items with Images */
.low-stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

.low-stock-item:hover {
    background: #f8f9fa;
}

.low-stock-item .item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.low-stock-item .product-table-image,
.low-stock-item .product-table-placeholder {
    width: 40px;
    height: 40px;
}

.low-stock-item .item-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

/* Recent Items */
.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-item .item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recent-item .item-details strong {
    margin-bottom: 4px;
}

/* Responsive Design for Images */
@media (max-width: 768px) {
    .product-table-image,
    .product-table-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .product-image-preview {
        max-width: 150px;
        height: 120px;
    }
    
    .product-table-image:hover {
        transform: scale(1.3);
    }
}

/* Loading Spinner for Image Upload */
.image-uploading {
    position: relative;
}

.image-uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Image Error Handling */
.image-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

.image-error.show {
    display: block;
}

/* Product Image Column */
#productsTable th:first-child,
#productsTable td:first-child {
    width: 70px;
    text-align: center;
}

/* Drag and Drop Support (Future Enhancement) */
.product-image-preview.drag-over {
    border-color: #007bff;
    background: #e7f3ff;
}

.product-image-preview.drag-over .placeholder {
    color: #007bff;
}

/* Confirmation Dialog Styles */
.confirm-dialog {
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.6);
}

.confirm-modal-content {
    max-width: 480px;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: confirmSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes confirmSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.confirm-icon-wrapper {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    padding: 40px 30px 30px;
    text-align: center;
    position: relative;
}

.confirm-icon-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #ee5a6f;
}

.confirm-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    }
}

.confirm-icon i {
    font-size: 48px;
    color: #ff6b6b;
    animation: iconShake 0.5s ease-in-out;
}

@keyframes iconShake {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.confirm-content {
    padding: 50px 30px 30px;
    text-align: center;
}

.confirm-content h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: var(--dark);
    font-weight: 700;
}

.confirm-content p {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: var(--secondary-color);
    line-height: 1.6;
}

.confirm-details {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
    border-left: 4px solid #ff6b6b;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    text-align: left;
}

.confirm-details strong {
    color: var(--dark);
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
}

.confirm-details p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.confirm-details .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.confirm-details .detail-item:last-child {
    border-bottom: none;
}

.confirm-details .detail-label {
    color: #888;
    font-size: 13px;
}

.confirm-details .detail-value {
    color: var(--dark);
    font-weight: 600;
    font-size: 13px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    padding: 0 30px 30px;
}

.confirm-actions .btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: none;
}

.confirm-btn-cancel {
    background: #e2e8f0;
    color: #64748b;
}

.confirm-btn-cancel:hover {
    background: #cbd5e1;
    color: #475569;
    transform: translateY(-2px);
}

.confirm-btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.confirm-btn-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.confirm-btn-delete:active {
    transform: translateY(0);
}

/* Loading state for delete button */
.confirm-btn-delete.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.confirm-btn-delete.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Mobile responsiveness for confirm dialog */
@media (max-width: 480px) {
    .confirm-modal-content {
        max-width: 95%;
        margin: 20px;
    }

    .confirm-icon-wrapper {
        padding: 30px 20px 20px;
    }

    .confirm-icon {
        width: 80px;
        height: 80px;
    }

    .confirm-icon i {
        font-size: 36px;
    }

    .confirm-content {
        padding: 40px 20px 20px;
    }

    .confirm-content h3 {
        font-size: 20px;
    }

    .confirm-content p {
        font-size: 14px;
    }

    .confirm-actions {
        padding: 0 20px 20px;
        flex-direction: column-reverse;
    }

    .confirm-actions .btn {
        width: 100%;
    }
}

/* Empty State Styles */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    margin: 20px 0;
    min-height: 300px;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
    animation: emptyStateBounce 2s ease-in-out infinite;
}

.empty-state-icon i {
    font-size: 56px;
    color: white;
}

.empty-state-icon.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.empty-state-icon.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
}

.empty-state-icon.info {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 8px 24px rgba(100, 116, 139, 0.2);
}

@keyframes emptyStateBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-state.empty-state-compact {
    padding: 40px 30px;
    min-height: 200px;
}

.empty-state.empty-state-compact .empty-state-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
}

.empty-state.empty-state-compact .empty-state-icon i {
    font-size: 36px;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.3;
}

.empty-state-description {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 28px;
    max-width: 500px;
    line-height: 1.6;
}

.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    text-decoration: none;
}

.empty-state-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.empty-state-action i {
    font-size: 18px;
}

.empty-state-action.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.empty-state-action.success:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

/* Empty state in tables */
.data-table .empty-state-row td {
    padding: 0;
    border: none;
}

.data-table .empty-state-row .empty-state {
    margin: 0;
    border-radius: 0;
}

/* Empty state in lists */
.empty-state-compact {
    padding: 40px 20px;
    min-height: 200px;
}

.empty-state-compact .empty-state-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
}

.empty-state-compact .empty-state-icon i {
    font-size: 36px;
}

.empty-state-compact .empty-state-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state-compact .empty-state-description {
    font-size: 14px;
    margin-bottom: 20px;
}

.empty-state-compact .empty-state-action {
    padding: 10px 20px;
    font-size: 14px;
}

/* Responsive design for empty states */
@media (max-width: 768px) {
    .empty-state {
        padding: 40px 20px;
        min-height: 250px;
    }

    .empty-state-icon {
        width: 90px;
        height: 90px;
    }

    .empty-state-icon i {
        font-size: 42px;
    }

    .empty-state-title {
        font-size: 20px;
    }

    .empty-state-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .empty-state-action {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .empty-state {
        padding: 30px 15px;
        min-height: 200px;
    }

    .empty-state-icon {
        width: 70px;
        height: 70px;
    }

    .empty-state-icon i {
        font-size: 32px;
    }

    .empty-state-title {
        font-size: 18px;
    }

    .empty-state-description {
        font-size: 13px;
    }

    .empty-state-action {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* ========================================
   DARK MODE THEME TOGGLE
   ======================================== */

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-right: 15px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.theme-toggle .fa-sun {
    position: absolute;
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

.theme-toggle .fa-moon {
    position: absolute;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

/* ========================================
   DARK MODE SPECIFIC ADJUSTMENTS
   ======================================== */

/* Empty States in Dark Mode */
[data-theme="dark"] .empty-state {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

/* Confirmation Dialog in Dark Mode */
[data-theme="dark"] .confirm-dialog {
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .confirm-details {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
}

/* Product Image Preview in Dark Mode */
[data-theme="dark"] .product-image-preview {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .product-image-preview:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

[data-theme="dark"] .product-table-placeholder {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-color: var(--border-color);
}

/* Low Stock Items in Dark Mode */
[data-theme="dark"] .low-stock-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .low-stock-item:hover {
    background: var(--bg-tertiary);
}

/* Badges in Dark Mode - Enhanced Contrast */
[data-theme="dark"] .badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .badge-warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .badge-danger {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

[data-theme="dark"] .badge-in {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .badge-out {
    background: rgba(219, 39, 119, 0.2);
    color: #ec4899;
}

[data-theme="dark"] .badge-in-stock {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

[data-theme="dark"] .badge-low-stock {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

[data-theme="dark"] .badge-out-of-stock {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

/* Filter Controls in Dark Mode */
[data-theme="dark"] .filter-bar select,
[data-theme="dark"] .filter-bar input,
[data-theme="dark"] .category-filter {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .search-bar input {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Toast Notifications in Dark Mode */
[data-theme="dark"] .toast.success {
    background: #22c55e;
}

[data-theme="dark"] .toast.error {
    background: #ef4444;
}

[data-theme="dark"] .toast.warning {
    background: #fbbf24;
}

/* Sidebar Mobile in Dark Mode */
[data-theme="dark"] .sidebar {
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

/* Recent Items in Dark Mode */
[data-theme="dark"] .recent-item {
    border-bottom-color: var(--border-color);
}

/* Product Transactions Info in Dark Mode */
[data-theme="dark"] .product-transactions-info {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

[data-theme="dark"] .product-transactions-info .product-details h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .product-transactions-info .product-details p {
    color: var(--text-secondary);
}

/* Smooth Transitions for Theme Switch */
* {
    transition-property: background-color, border-color, color, box-shadow;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Exclude elements that shouldn't transition */
.modal,
.modal-content,
.toast,
button:active,
.hamburger-menu span,
.theme-toggle i {
    transition-duration: 0.3s;
}

/* Additional Dark Mode Adjustments */
[data-theme="dark"] .form-group.image-section {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .form-group.image-section label {
    color: var(--text-primary);
}

[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .close {
    color: var(--text-secondary);
}

[data-theme="dark"] .close:hover {
    color: var(--danger-color);
}

/* Modal Header in Dark Mode */
[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color);
}

/* Alert Boxes in Dark Mode */
[data-theme="dark"] .alert-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: #ef4444;
}

[data-theme="dark"] .alert-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: #22c55e;
}

[data-theme="dark"] .alert-warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border-color: #f59e0b;
}

/* Demo Credentials in Dark Mode */
[data-theme="dark"] .demo-credentials p {
    color: var(--text-secondary);
}

/* Filter Controls Report Section */
[data-theme="dark"] .filter-controls {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .filter-controls label {
    color: var(--text-primary);
}

[data-theme="dark"] .filter-controls select {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .filter-controls input[type="checkbox"] {
    accent-color: var(--primary-color);
}

/* Action Buttons in Dark Mode */
[data-theme="dark"] .action-btn-edit {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .action-btn-edit:hover {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .action-btn-delete {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

[data-theme="dark"] .action-btn-delete:hover {
    background: var(--danger-color);
    color: white;
}

[data-theme="dark"] .action-btn-view {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

[data-theme="dark"] .action-btn-view:hover {
    background: var(--secondary-color);
    color: white;
}

/* Stat Icons - Keep vibrant in dark mode */
[data-theme="dark"] .stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Empty State Icons in Dark Mode - Keep vibrant */
[data-theme="dark"] .empty-state-icon {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .empty-state-icon.success {
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .empty-state-icon.warning {
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3);
}

[data-theme="dark"] .empty-state-icon.info {
    box-shadow: 0 8px 24px rgba(148, 163, 184, 0.3);
}

/* Responsive - Theme Toggle on Mobile */
@media (max-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }

    .theme-toggle i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
        margin-right: 8px;
    }

    .theme-toggle i {
        font-size: 16px;
    }
}

/* ========================================
   IMAGE LIGHTBOX / GALLERY
   ======================================== */

/* Make product images clickable with zoom cursor */
.product-table-image,
.low-stock-item img,
.product-image-preview img,
.product-transactions-info img {
    cursor: zoom-in;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.product-table-image:hover,
.low-stock-item img:hover {
    opacity: 0.9;
}

/* Lightbox Container */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

[data-theme="dark"] .lightbox {
    background: rgba(0, 0, 0, 0.95);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Lightbox Close Button */
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10002;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Lightbox Content Container */
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: lightboxSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxSlideIn {
    from {
        transform: scale(0.8) translateY(30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Loading Indicator */
.lightbox-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: white;
    font-size: 18px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.lightbox-loading i {
    font-size: 48px;
    animation: spin 1s linear infinite;
}

.lightbox-loading p {
    margin: 0;
    font-weight: 500;
}

/* Lightbox Image */
.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 120px);
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: white;
}

.lightbox-image.loaded {
    opacity: 1;
}

/* Lightbox Info */
.lightbox-info {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 300px;
    animation: lightboxInfoSlideUp 0.5s ease 0.2s both;
}

@keyframes lightboxInfoSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lightbox-info h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.lightbox-info p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design for Lightbox */
@media (max-width: 768px) {
    .lightbox-close {
        width: 45px;
        height: 45px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
        gap: 15px;
    }

    .lightbox-image {
        max-height: calc(95vh - 100px);
        border-radius: 8px;
    }

    .lightbox-info {
        padding: 12px 20px;
        min-width: 250px;
    }

    .lightbox-info h3 {
        font-size: 18px;
    }

    .lightbox-info p {
        font-size: 13px;
    }

    .lightbox-loading {
        font-size: 16px;
    }

    .lightbox-loading i {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }

    .lightbox-content {
        gap: 10px;
    }

    .lightbox-image {
        max-height: calc(95vh - 80px);
        border-radius: 6px;
    }

    .lightbox-info {
        padding: 10px 15px;
        min-width: 200px;
    }

    .lightbox-info h3 {
        font-size: 16px;
    }

    .lightbox-info p {
        font-size: 12px;
    }
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* Dark Mode Lightbox Adjustments */
[data-theme="dark"] .lightbox-info {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .lightbox-close {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   PRINT STYLES - PROFESSIONAL REPORTS
   ======================================== */

@media print {
    /* Reset print margins */
    @page {
        margin: 1.5cm 1cm;
        size: A4 portrait;
    }

    /* Hide non-printable elements */
    .navbar,
    .sidebar,
    .sidebar-overlay,
    .hamburger-menu,
    .filter-controls,
    .filter-bar,
    .search-bar,
    .section-header button,
    .action-btn,
    .action-btn-edit,
    .action-btn-delete,
    .action-btn-view,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .modal,
    .toast,
    .lightbox,
    #printReportBtn,
    .theme-toggle,
    .btn-logout,
    .admin-keeper-only,
    .stats-grid,
    .recent-section,
    .reports-grid {
        display: none !important;
    }

    /* Main content takes full width */
    body {
        background: white !important;
        color: black !important;
        font-size: 11pt;
        line-height: 1.4;
    }

    .container {
        display: block;
        width: 100%;
    }

    .main-content {
        width: 100%;
        max-width: 100%;
        padding: 0;
        max-height: none;
        overflow: visible;
    }

    .content-section {
        display: block !important;
    }

    /* Print header on every page */
    .section-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #000;
    }

    .section-header::before {
        content: 'Quesco Stock Report';
        font-size: 20pt;
        font-weight: bold;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
    }

    .section-header::after {
        content: 'Generated: ' attr(data-print-date);
        font-size: 9pt;
        color: #666;
        position: absolute;
        top: 0;
        right: 0;
    }

    /* Print footer on every page */
    .content-section::after {
        content: 'Page ' counter(page) ' | Quesco Stock Management System | Printed: ' attr(data-print-date);
        display: block;
        position: fixed;
        bottom: 0.5cm;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 8pt;
        color: #666;
        padding-top: 10px;
        border-top: 1px solid #ccc;
    }

    /* Table optimization for print */
    .table-container {
        box-shadow: none;
        border-radius: 0;
        background: white !important;
        overflow: visible;
        page-break-inside: auto;
    }

    .data-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 9pt;
        page-break-inside: auto;
    }

    .data-table thead {
        display: table-header-group;
        background: #f0f0f0 !important;
    }

    .data-table tbody {
        display: table-row-group;
    }

    .data-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    .data-table th {
        background: #f0f0f0 !important;
        color: #000 !important;
        font-weight: bold;
        padding: 8px 6px;
        border: 1px solid #000;
        text-align: left;
    }

    .data-table td {
        padding: 6px 4px;
        border: 1px solid #ccc;
        color: #000 !important;
    }

    /* Hide image column in print to save space */
    .data-table th:first-child,
    .data-table td:first-child {
        display: none;
    }

    /* Hide actions column */
    .data-table th:last-child,
    .data-table td:last-child {
        display: none;
    }

    /* Print-friendly badges */
    .badge {
        border: 1px solid #000;
        padding: 2px 6px;
        font-size: 8pt;
        background: white !important;
        color: #000 !important;
        border-radius: 2px;
    }

    .badge-in-stock::before {
        content: '✓ ';
    }

    .badge-low-stock::before {
        content: '⚠ ';
    }

    .badge-out-of-stock::before {
        content: '✗ ';
    }

    .badge-in::before {
        content: '↓ ';
    }

    .badge-out::before {
        content: '↑ ';
    }

    /* Page breaks */
    .content-section {
        page-break-after: always;
    }

    .content-section:last-child {
        page-break-after: auto;
    }

    h2, h3 {
        page-break-after: avoid;
        color: #000 !important;
    }

    /* Ensure colors print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Compact layout for more data per page */
    .data-table {
        font-size: 8.5pt;
    }

    .data-table th,
    .data-table td {
        padding: 4px 3px;
    }

    /* Remove unnecessary whitespace */
    .empty-state,
    .modal-content,
    #lowStockList,
    #recentTransactionsList {
        display: none !important;
    }
}

/* Print Button Styles */
.btn-print {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-print:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-print:active {
    transform: translateY(0);
}

.btn-print i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .btn-print {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}

/* ========================================
   ENHANCED MOBILE ACTION BUTTONS
   ======================================== */

/* Mobile action button improvements - 768px and below */
@media (max-width: 768px) {
    /* Make action buttons touch-friendly */
    .action-btn,
    .action-btn-edit,
    .action-btn-delete,
    .action-btn-view {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
        margin: 0 4px;
        font-size: 16px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: all 0.2s ease;
        position: relative;
        overflow: hidden;
    }

    /* Show text labels on mobile for better UX */
    .action-btn::after,
    .action-btn-edit::after,
    .action-btn-delete::after,
    .action-btn-view::after {
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
    }

    .action-btn-edit::after {
        content: 'Edit';
        margin-left: 2px;
    }

    .action-btn-delete::after {
        content: 'Delete';
        margin-left: 2px;
    }

    .action-btn-view::after {
        content: 'View';
        margin-left: 2px;
    }

    /* Touch feedback - ripple effect */
    .action-btn::before,
    .action-btn-edit::before,
    .action-btn-delete::before,
    .action-btn-view::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        transform: translate(-50%, -50%);
        transition: width 0.4s ease, height 0.4s ease;
    }

    .action-btn:active::before,
    .action-btn-edit:active::before,
    .action-btn-delete:active::before,
    .action-btn-view:active::before {
        width: 100%;
        height: 100%;
    }

    /* Enhanced hover/active states for touch */
    .action-btn:active,
    .action-btn-edit:active,
    .action-btn-delete:active,
    .action-btn-view:active {
        transform: scale(0.95);
    }

    /* Better spacing between buttons in actions column */
    .data-table .actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 5px;
    }

    /* Product card action buttons */
    .product-card-actions .action-btn,
    .product-card-actions .btn-sm {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 14px;
    }

    /* Modal action buttons */
    .modal-actions .btn,
    .form-actions .btn {
        min-height: 48px;
        padding: 14px 20px;
        font-size: 15px;
        font-weight: 600;
    }
}

/* Hide mobile dropdown menu on larger screens */
@media (min-width: 481px) {
    .actions-menu-mobile {
        display: none !important;
    }
}

/* Very small screens (480px and below) - Dropdown menu for space saving */
@media (max-width: 480px) {
    /* Create compact action menu */
    .actions-menu-mobile {
        position: relative;
        display: inline-block;
    }

    .actions-toggle {
        min-width: 44px;
        min-height: 44px;
        background: var(--bg-tertiary);
        border: 2px solid var(--border-color);
        border-radius: 8px;
        color: var(--text-primary);
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .actions-toggle:hover,
    .actions-toggle:active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: scale(1.05);
    }

    .actions-dropdown {
        display: none;
        position: absolute;
        right: 0;
        top: 100%;
        margin-top: 5px;
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        border-radius: 8px;
        box-shadow: var(--shadow-lg);
        min-width: 150px;
        z-index: 100;
        overflow: hidden;
    }

    .actions-dropdown.show {
        display: block;
        animation: dropdownSlideIn 0.2s ease;
    }

    @keyframes dropdownSlideIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .actions-dropdown button {
        width: 100%;
        min-height: 44px;
        padding: 12px 16px;
        border: none;
        background: transparent;
        color: var(--text-primary);
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        cursor: pointer;
        transition: background 0.2s ease;
        border-bottom: 1px solid var(--border-color);
    }

    .actions-dropdown button:last-child {
        border-bottom: none;
    }

    .actions-dropdown button:hover,
    .actions-dropdown button:active {
        background: var(--bg-tertiary);
    }

    .actions-dropdown button i {
        width: 20px;
        font-size: 16px;
    }

    .actions-dropdown .action-edit {
        color: var(--primary-color);
    }

    .actions-dropdown .action-delete {
        color: var(--danger-color);
    }

    .actions-dropdown .action-view {
        color: var(--secondary-color);
    }

    /* Hide original buttons on very small screens */
    .data-table .actions .action-btn,
    .data-table .actions .action-btn-edit,
    .data-table .actions .action-btn-delete,
    .data-table .actions .action-btn-view {
        display: none;
    }

    /* Table actions become compact */
    .data-table .actions {
        padding: 5px;
        text-align: center;
    }

    /* Ensure text labels don't show on smallest screens */
    .action-btn::after,
    .action-btn-edit::after,
    .action-btn-delete::after,
    .action-btn-view::after {
        display: none;
    }
}

/* Touch feedback for all interactive elements on mobile */
@media (hover: none) and (pointer: coarse) {
    /* Better touch targets for mobile */
    .btn,
    .menu-item,
    .stat-card,
    .product-card,
    .report-card {
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.1);
        tap-highlight-color: rgba(37, 99, 235, 0.1);
    }

    /* Improve button press feedback */
    .btn:active,
    .action-btn:active,
    .action-btn-edit:active,
    .action-btn-delete:active,
    .action-btn-view:active {
        opacity: 0.8;
    }

    /* Card press feedback */
    .stat-card:active,
    .product-card:active,
    .report-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* ========================================
   ADVANCED FILTERS & PAGINATION
   ======================================== */

/* Advanced Filters Container */
.advanced-filters {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-chips-row {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    justify-content: space-between;
}

/* Filter Groups */
.filter-group {
    flex: 0 0 auto;
}

.filter-group.search-filter {
    flex: 1 1 300px;
    min-width: 250px;
}

.filter-select,
.filter-input {
    width: 100%;
    min-width: 180px;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select:hover,
.filter-input:hover {
    border-color: var(--primary-color);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Clear Filters Button */
.btn-clear-filters {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-clear-filters:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
    transform: translateY(-2px);
}

.btn-clear-filters:active {
    transform: translateY(0);
}

/* Filter Chips (Status Pills) */
.filter-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    user-select: none;
}

.filter-chip:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.filter-chip.active[data-status="in-stock"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.filter-chip.active[data-status="low-stock"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.filter-chip.active[data-status="out-of-stock"] {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Filter Info */
.filter-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Pagination Wrapper */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 15px;
    transition: background-color 0.3s ease;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Items Per Page Selector */
.items-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.items-per-page label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
}

.items-per-page-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.items-per-page-select:hover {
    border-color: var(--primary-color);
}

.items-per-page-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Pagination Buttons */
.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pagination-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.pagination-pages {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Smooth scroll to top animation */
@keyframes scrollToTop {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-to-top-animation {
    animation: scrollToTop 0.5s ease;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .advanced-filters {
    background: var(--bg-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .filter-chips-row {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .filter-chip {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-clear-filters {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .pagination-wrapper {
    background: var(--bg-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive Design for Filters & Pagination */
@media (max-width: 1024px) {
    .filter-row {
        gap: 10px;
    }

    .filter-select,
    .filter-input {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .advanced-filters {
        padding: 15px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group,
    .filter-group.search-filter {
        flex: 1 1 100%;
        width: 100%;
    }

    .filter-select,
    .filter-input {
        width: 100%;
        min-width: 100%;
    }

    .btn-clear-filters {
        width: 100%;
        justify-content: center;
    }

    .filter-chips {
        justify-content: center;
    }

    .filter-info {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .pagination-wrapper {
        flex-direction: column;
        padding: 15px;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
    }

    .pagination-controls {
        width: 100%;
        flex-direction: column;
        gap: 15px;
    }

    .items-per-page {
        width: 100%;
        justify-content: center;
    }

    .pagination-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .advanced-filters {
        padding: 12px;
        border-radius: 8px;
    }

    .filter-chip {
        font-size: 12px;
        padding: 6px 12px;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .items-per-page-select {
        font-size: 13px;
        padding: 6px 10px;
    }

    .filter-count,
    .pagination-info {
        font-size: 13px;
    }
}

/* ========================================
   KEYBOARD SHORTCUTS STYLES
   ======================================== */

/* KBD Tag Styling */
kbd {
    display: inline-block;
    padding: 4px 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    background: linear-gradient(180deg, #fafafa 0%, #e8e8e8 100%);
    border: 1px solid #b8b8b8;
    border-radius: 4px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
    text-shadow: 0 1px 0 #fff;
    white-space: nowrap;
    transition: all 0.2s ease;
}

[data-theme="dark"] kbd {
    color: #e4e4e4;
    background: linear-gradient(180deg, #4a4a4a 0%, #2d2d2d 100%);
    border: 1px solid #555;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.1) inset;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

kbd.key-modifier {
    background: linear-gradient(180deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border-color: #2a5a8a;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] kbd.key-modifier {
    background: linear-gradient(180deg, #5da3f5 0%, #4a90e2 100%);
    border-color: #357abd;
}

kbd.key-special {
    min-width: 45px;
    text-align: center;
}

/* Shortcuts Modal */
.shortcuts-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.shortcuts-modal-content .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    margin: 0;
}

.shortcuts-modal-content .modal-header h3 {
    color: white;
    margin: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.shortcuts-modal-content .modal-header .close {
    color: white;
    opacity: 0.9;
    font-size: 32px;
}

.shortcuts-modal-content .modal-header .close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.shortcuts-modal-content .modal-body {
    padding: 25px 30px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* Shortcuts Search Bar */
.shortcuts-search-bar {
    position: relative;
    margin-bottom: 25px;
}

.shortcuts-search-bar input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.shortcuts-search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.shortcuts-search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

/* Shortcuts Section */
.shortcuts-section {
    margin-bottom: 30px;
}

.shortcuts-section:last-of-type {
    margin-bottom: 15px;
}

.shortcuts-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.shortcuts-section h4 i {
    color: var(--primary-color);
    font-size: 20px;
}

/* Shortcuts Grid */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.shortcut-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
    transform: translateX(3px);
}

.shortcut-item.hidden {
    display: none;
}

.shortcut-keys {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: 15px;
}

.shortcut-description {
    flex: 1;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
    text-align: right;
}

/* Shortcuts Note */
.shortcuts-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border-left: 4px solid var(--warning-color);
    border-radius: 8px;
    margin-top: 20px;
}

[data-theme="dark"] .shortcuts-note {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.25) 100%);
}

.shortcuts-note i {
    color: var(--warning-color);
    font-size: 20px;
    margin-top: 2px;
}

.shortcuts-note p {
    margin: 0;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

/* Section Highlight Animation */
@keyframes highlightSection {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px 5px rgba(37, 99, 235, 0.3);
    }
}

.section-highlight {
    animation: highlightSection 0.6s ease-in-out;
}

/* Responsive Shortcuts Modal */
@media (max-width: 768px) {
    .shortcuts-modal-content {
        max-width: 95%;
        margin: 20px auto;
    }

    .shortcuts-modal-content .modal-header {
        padding: 15px 20px;
    }

    .shortcuts-modal-content .modal-header h3 {
        font-size: 20px;
    }

    .shortcuts-modal-content .modal-body {
        padding: 20px 15px;
    }

    .shortcuts-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .shortcut-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .shortcut-keys {
        margin-right: 0;
    }

    .shortcut-description {
        text-align: left;
        width: 100%;
    }

    .shortcuts-section h4 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .shortcuts-modal-content .modal-header h3 {
        font-size: 18px;
    }

    kbd {
        padding: 3px 6px;
        font-size: 11px;
    }

    .shortcut-description {
        font-size: 13px;
    }
}

/* Dashboard Charts Section */
.charts-section {
    margin-top: 40px;
}

.charts-section > h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.chart-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.chart-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.chart-header h4 {
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.chart-header h4 i {
    color: var(--primary-color);
}

.chart-container {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container canvas {
    max-height: 300px;
    width: 100% !important;
    height: auto !important;
}

/* Chart Loading State */
.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-secondary);
    z-index: 5;
}

.chart-loading i {
    font-size: 48px;
    margin-bottom: 10px;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.chart-loading p {
    font-size: 14px;
    margin: 0;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Chart Empty State */
.chart-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
}

.chart-empty i {
    font-size: 64px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.chart-empty p {
    font-size: 16px;
    margin: 0;
}

/* Responsive Charts */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .charts-section {
        margin-top: 30px;
    }

    .chart-card {
        padding: 15px;
    }

    .chart-header h4 {
        font-size: 1em;
    }

    .chart-container {
        min-height: 250px;
    }

    .chart-container canvas {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .charts-section > h3 {
        font-size: 1.2em;
    }

    .chart-card {
        padding: 12px;
    }

    .chart-header {
        margin-bottom: 10px;
    }

    .chart-header h4 {
        font-size: 0.9em;
    }

    .chart-container {
        min-height: 200px;
    }

    .chart-container canvas {
        max-height: 200px;
    }

    .chart-loading i {
        font-size: 36px;
    }

    .chart-empty i {
        font-size: 48px;
    }
}
/* ============================================
   CATEGORY MANAGEMENT STYLES
   ============================================ */

/* Settings Section */
.settings-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.settings-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.settings-section-header h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.3em;
}

.settings-section-header p.text-muted {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.categories-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.categories-loading i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: var(--primary-color);
}

.category-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--category-color, var(--primary-color));
}

.category-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    background: var(--category-color, var(--primary-color));
    flex-shrink: 0;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-name {
    font-weight: 600;
    font-size: 1.1em;
    margin: 0 0 4px 0;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-count {
    font-size: 0.85em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-count i {
    font-size: 12px;
}

.category-description {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 16px;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.category-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.9em;
}

/* Category Modal Specific Styles */
.icon-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-input-wrapper input {
    flex: 1;
}

.icon-preview {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    font-size: 24px;
    color: var(--category-preview-color, var(--primary-color));
    transition: all 0.3s ease;
}

.color-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-wrapper input[type="color"] {
    width: 60px;
    height: 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 4px;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-input-wrapper input[type="text"] {
    flex: 1;
    text-transform: uppercase;
}

.info-box {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--primary-color);
    padding: 12px 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.info-box i {
    color: var(--primary-color);
    font-size: 18px;
}

/* Category Select in Product Form */
.category-select-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.category-select-wrapper select {
    flex: 1;
}

.btn-add-category {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
}

.btn-add-category:hover {
    background: #059669;
    transform: scale(1.05);
}

.btn-add-category i {
    font-size: 16px;
}

/* Category Badge (for product listings) */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
    color: white;
    background: var(--category-color, var(--secondary-color));
    white-space: nowrap;
}

.category-badge i {
    font-size: 0.9em;
}

/* Responsive Design for Categories */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .settings-section-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .settings-section-header button {
        width: 100%;
    }

    .category-card {
        padding: 16px;
    }

    .category-actions {
        flex-direction: column;
    }

    .category-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .category-select-wrapper {
        flex-direction: column;
    }

    .btn-add-category {
        width: 100%;
        min-height: 45px;
    }

    .color-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .color-input-wrapper input[type="color"] {
        width: 100%;
    }

    .icon-input-wrapper {
        flex-direction: column;
    }

    .icon-preview {
        width: 100%;
        height: 60px;
    }
}

/* Empty State */
.categories-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.categories-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
    color: var(--text-muted);
}

.categories-empty h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.categories-empty p {
    margin: 0;
    font-size: 0.95em;
}

/* ============================================
   CSV IMPORT STYLES
   ============================================ */

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 20px 0;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.upload-icon {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.upload-text {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.upload-or {
    color: var(--text-secondary);
    margin: 16px 0;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.9em;
    margin: 16px 0 0 0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 20px 0;
}

.file-info i {
    font-size: 24px;
    color: var(--primary-color);
}

.file-info span {
    flex: 1;
    font-weight: 500;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(var(--danger-rgb), 0.1);
}

.import-instructions {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.import-instructions h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.import-instructions li {
    margin: 8px 0;
    color: var(--text-secondary);
}

.validation-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.validation-card {
    flex: 1;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.validation-card.valid {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.validation-card.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.validation-card.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.validation-card .count {
    font-size: 2em;
    font-weight: bold;
    margin: 8px 0;
}

.validation-card .label {
    font-size: 0.9em;
    text-transform: uppercase;
    font-weight: 600;
}

.import-options {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.import-progress {
    padding: 20px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--success-color) 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-secondary);
    margin: 0;
}

.import-results {
    padding: 20px;
}

.import-result-card {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.import-result-card.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.import-result-card.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 4px solid #dc3545;
}

.import-result-card h4 {
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.import-stat {
    text-align: center;
}

.import-stat .number {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
}

.import-stat .label {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.preview-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.preview-status-badge.valid {
    background: #d4edda;
    color: #155724;
}

.preview-status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.preview-status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

/* ============================================
   ACTIVITY LOG / AUDIT TRAIL STYLES
   ============================================ */

.activity-timeline {
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.activity-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    padding-left: 32px;
}

.activity-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 32px;
    bottom: -24px;
    width: 2px;
    background: var(--border-color);
}

.activity-icon {
    position: absolute;
    left: 0;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

.activity-icon.created {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.activity-icon.updated {
    background: linear-gradient(135deg, #007bff 0%, #17a2b8 100%);
}

.activity-icon.deleted {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

.activity-icon.login {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
}

.activity-icon.logout {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
}

.activity-icon.import {
    background: linear-gradient(135deg, #fd7e14 0%, #ffc107 100%);
}

.activity-content {
    flex: 1;
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.activity-content:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.activity-description {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.activity-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.activity-time {
    font-size: 0.85em;
    color: var(--text-muted);
}

.activity-user {
    font-size: 0.85em;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 12px;
}

.activity-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
    color: var(--text-secondary);
}

.activity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 8px;
}

.activity-badge.product {
    background: #e3f2fd;
    color: #1976d2;
}

.activity-badge.transaction {
    background: #f3e5f5;
    color: #7b1fa2;
}

.activity-badge.user {
    background: #fff3e0;
    color: #f57c00;
}

.activity-badge.category {
    background: #e8f5e9;
    color: #388e3c;
}

.activity-loading,
.activity-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.activity-loading i,
.activity-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: var(--text-muted);
}

.activity-empty h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.activity-empty p {
    margin: 0;
    font-size: 0.95em;
}

/* Modal footer for import */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Import action buttons in modal */
.import-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .validation-summary {
        flex-direction: column;
    }

    .import-result-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .activity-item {
        padding-left: 28px;
    }

    .activity-header {
        flex-direction: column;
        gap: 8px;
    }

    .activity-meta {
        align-items: flex-start;
    }
}
