/* App Custom Premium CSS - Finsmochi POS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --color-primary: #6366f1; /* Royal Indigo */
    --color-primary-hover: #4f46e5;
    --color-success: #10b981; /* Emerald */
    --color-warning: #f59e0b; /* Amber */
    --color-danger: #ef4444;  /* Rose */
    --color-info: #06b6d4;    /* Cyan */
    
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout Grid */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar Styling */
.app-sidebar {
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid var(--border-glass);
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-success));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-name {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-profile {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
}

.user-role {
    font-size: 12px;
    color: var(--color-primary);
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 4px;
}

.user-branch {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex-grow: 1;
}

.nav-item-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin: 16px 0 8px 8px;
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: white;
    background: var(--color-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.logout-form {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
}

.btn-logout {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background: var(--color-danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Main Content Panel */
.app-content {
    padding: 32px;
    height: 100vh;
    overflow-y: auto;
}

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

.content-title h1 {
    font-size: 28px;
    font-weight: 700;
}

.content-title p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* Glassmorphism Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.premium-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.premium-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--card-accent, var(--color-primary));
}

.premium-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--card-accent, var(--color-primary));
    font-size: 20px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    margin-top: 8px;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    margin-bottom: 24px;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass);
    text-transform: uppercase;
}

.premium-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-glass);
    font-size: 14px;
    color: var(--text-main);
}

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

.premium-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary { background: rgba(99, 102, 241, 0.15); color: var(--color-primary); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); }

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

select.form-control option {
    background: var(--bg-primary);
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

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

.btn-success:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

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

.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 32px;
    box-shadow: var(--shadow-premium);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-window {
    transform: translateY(0);
}

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

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}

/* POS Screen */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    height: calc(100vh - 120px);
}

.pos-products {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.pos-search-bar {
    display: flex;
    gap: 12px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 150px;
}

.product-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.product-card.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

.product-card.out-of-stock:hover {
    border-color: var(--border-glass);
    transform: none;
    box-shadow: none;
}

.product-card-name {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
}

.product-card-code {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.product-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.product-card-price {
    font-weight: 700;
    color: var(--color-success);
    font-size: 16px;
}

.product-card-stock {
    font-size: 11px;
    color: var(--text-muted);
}

.pos-cart {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-info {
    max-width: 60%;
}

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
}

.cart-item-price {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.qty-btn:hover {
    background: var(--color-primary);
}

.qty-val {
    font-weight: 600;
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

.cart-item-subtotal {
    font-weight: 600;
    color: var(--color-success);
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    padding: 4px;
}

.cart-summary {
    padding: 20px;
    border-top: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.2);
}

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

.summary-row.total {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    border-top: 1px solid var(--border-glass);
    padding-top: 12px;
    margin-top: 12px;
}

/* OCR Receipt Section */
.ocr-container {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.ocr-container:hover {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.03);
}

.ocr-loading {
    display: none;
    margin-top: 12px;
}

/* OCR scanner animation line */
.ocr-scanner-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    top: 0;
    left: 0;
    box-shadow: 0 0 10px var(--color-primary);
    animation: ocrScan 2s infinite linear;
    display: none;
}

@keyframes ocrScan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

/* Receipt CSS Print Settings */
@media print {
    body * {
        visibility: hidden;
    }
    #receipt-print-area, #receipt-print-area * {
        visibility: visible;
    }
    #receipt-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        color: black !important;
        background: white !important;
        font-family: 'Courier New', Courier, monospace !important;
    }
}

/* Select2 Dark Theme Overrides */
.select2-container--default .select2-selection--multiple {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: var(--radius-sm) !important;
    min-height: 42px;
    padding: 2px 6px;
    transition: var(--transition-smooth);
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #1e293b !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--text-main) !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    font-size: 13px !important;
    margin-top: 5px !important;
    display: inline-flex;
    align-items: center;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--color-danger) !important;
    border-right: 1px solid var(--border-glass) !important;
    margin-right: 8px !important;
    background: transparent !important;
    padding: 0 6px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

.select2-dropdown {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-premium) !important;
    z-index: 99999 !important; /* Keep above modals */
}

.select2-container--default .select2-results__option {
    color: var(--text-main) !important;
    background-color: transparent !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--color-primary) !important;
    color: white !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: rgba(99, 102, 241, 0.2) !important;
    color: var(--color-info) !important;
}

.select2-container--default .select2-search--inline .select2-search__field {
    color: white !important;
    font-family: inherit !important;
    margin-top: 6px !important;
}

/* Select2 Single Select Theme Overrides */
.select2-container--default .select2-selection--single {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: var(--radius-sm) !important;
    height: 42px !important;
    padding: 6px 12px !important;
    transition: var(--transition-smooth);
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-main) !important;
    line-height: 28px !important;
    padding-left: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    right: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--text-muted) transparent transparent transparent !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--text-muted) transparent !important;
}

/* Mobile Responsive Layout Styling */

/* Mobile header, sidebar close, tabs, and backdrop overlay (hidden on desktop) */
.mobile-header,
.mobile-sidebar-close,
.mobile-sidebar-backdrop,
.pos-mobile-tabs {
    display: none !important;
}

@media (max-width: 991px) {
    .app-container {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Mobile Top Header Bar */
    .mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        background: rgba(15, 23, 42, 0.98);
        border-bottom: 1px solid var(--border-glass);
        height: 60px;
        padding: 0 16px;
        position: sticky;
        top: 0;
        z-index: 99;
        backdrop-filter: blur(10px);
    }
    
    .mobile-menu-toggle {
        background: transparent;
        border: none;
        color: white;
        font-size: 20px;
        cursor: pointer;
        padding: 4px 8px;
    }

    /* Slide-out Sidebar Drawer */
    .app-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important;
        width: 280px !important;
        height: 100vh !important;
        background: rgba(15, 23, 42, 0.99) !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5) !important;
        z-index: 1000 !important;
        transition: left 0.3s ease !important;
        border-right: 1px solid var(--border-glass) !important;
        padding: 24px !important;
    }
    
    .app-sidebar.active {
        left: 0 !important;
    }
    
    .mobile-sidebar-close {
        display: block !important;
        position: absolute;
        top: 20px;
        right: 20px;
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-size: 24px;
        cursor: pointer;
        transition: var(--transition-smooth);
    }
    
    .mobile-sidebar-close:hover {
        color: var(--color-danger);
    }

    /* Backdrop Overlay */
    .mobile-sidebar-backdrop {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .mobile-sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    .app-content {
        padding: 16px !important;
        height: auto !important;
        overflow-y: visible !important;
    }

    /* POS container grid on mobile */
    .pos-container {
        grid-template-columns: 1fr !important;
        height: auto !important;
        gap: 16px !important;
    }
    
    .pos-cart {
        height: auto !important;
        max-height: 600px !important;
    }

    /* Stack other dashboard & split grids */
    .card-grid {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: 450px 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 767px) {
    /* Mobile POS Layout Tabs Toggling */
    .pos-mobile-tabs {
        display: flex !important;
        background: rgba(30, 41, 59, 0.6);
        border: 1px solid var(--border-glass);
        border-radius: var(--radius-md);
        padding: 4px;
        gap: 4px;
        margin-bottom: 16px;
        width: 100%;
    }
    
    .pos-mobile-tab {
        flex: 1;
        padding: 10px;
        border: none;
        background: transparent;
        color: var(--text-muted);
        font-weight: 600;
        font-size: 13px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: var(--transition-smooth);
    }
    
    .pos-mobile-tab.active {
        background: var(--color-primary);
        color: white;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }

    /* Display panel toggle */
    .pos-products {
        display: flex !important;
    }
    
    .pos-cart {
        display: none !important;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 10px !important;
    }
    
    .product-card {
        padding: 10px !important;
        height: 120px !important;
    }
    
    .product-card-name {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }
    
    .product-card-code {
        font-size: 10px !important;
        margin-top: 2px !important;
    }

    .product-card-bottom {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
        width: 100% !important;
    }
    
    .product-card-price {
        font-size: 13px !important;
    }
    
    .product-card-stock {
        font-size: 10px !important;
    }
    
    /* Make tables scrollable horizontally to fit screens */
    .table-responsive, table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

@media (max-width: 576px) {
    .content-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    .content-header .btn {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)) !important;
        gap: 8px !important;
    }
    
    .product-card {
        padding: 8px !important;
        height: 110px !important;
    }
    
    .product-card-name {
        font-size: 12px !important;
    }
}
