html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
}

.search-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    flex: 0 0 auto;
}

.filter-group .form-select {
    width: 150px !important;
    display: inline-block;
    flex: 0 0 auto;
}

.filter-group .form-control {
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.4;
}

.filter-group .btn {
    font-size: 0.875rem;
}

/* Select2样式修复 */
.filter-group .select2-container {
    width: 150px !important;
    min-width: 150px;
}

.filter-group .select2-container .select2-selection--single {
    height: 38px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
}

.filter-group .select2-container .select2-selection__rendered {
    line-height: 36px !important;
    font-size: 0.875rem !important;
    color: #212529 !important;
    padding-left: 12px !important;
}

.filter-group .select2-container .select2-selection__placeholder {
    color: #6c757d !important;
    font-size: 0.875rem !important;
}

.filter-group .select2-container .select2-selection__arrow {
    height: 36px !important;
    right: 6px !important;
}

.filter-group .select2-dropdown {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
}

.filter-group .select2-results__option {
    font-size: 0.875rem !important;
    padding: 6px 12px !important;
}

.filter-group .select2-results__option--highlighted {
    background-color: #0d6efd !important;
    color: white !important;
}

.filter-group .btn { 
    flex: 0 0 auto; 
}

.search-group {
    display: flex;
    flex: 1 1 0;
    min-width: 200px;
}

.search-group input {
    flex-grow: 1;
}

.button-group {
    display: flex;
    white-space: nowrap;
    flex: 0 0 auto;
}

.button-group .btn {
    flex: 0 0 auto;
    margin-right: 10px;
}

.header-container {
    margin-bottom: 0.5rem;
}

.batch-action-btn {
    position: relative;
}

.batch-action-btn.disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn {
    white-space: nowrap;
}

h3 {
    margin-bottom: 0.5rem !important;
    font-size: calc(1rem + .5vw);
}

.mb-4 {
    margin-bottom: 0.5rem !important;
}

.product-card {
    width: 50% !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

#fileViewerModal {
    z-index: 1060 !important;
}

@font-face {
    font-family: 'IDAutomationHC39M';
    src: url('../fonts/Idautomationhc39m-raq9.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #ffffff !important;
}

.sidebar {
    width: 70px; /* 默认收起状态 */
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.sidebar-header h2,
.sidebar-header p {
    display: none; /* 默认隐藏标题和描述 */
}

.sidebar-header h2 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.nav-menu {
    list-style: none;
    padding: 5px 0;
}

.nav-item {
    margin-bottom: 5px;
}

/* 子菜单样式 - 层级缩进 */
.has-submenu .collapse {
    background-color: rgba(0, 0, 0, 0.1);
    border-left: 3px solid var(--primary-color);
}

.has-submenu .collapse .nav-item {
    margin-bottom: 0;
    position: relative;
}

.has-submenu .collapse .nav-item:before {
    content: "├─";
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.has-submenu .collapse .nav-link {
    padding-left: 55px; /* 二级菜单缩进 - 增加空间给连接线 */
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
}

.has-submenu .collapse .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: var(--primary-color);
    color: white;
}

.has-submenu .collapse .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-left-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

/* 最后一个子菜单项的特殊样式 */
.has-submenu .collapse .nav-item:last-child:before {
    content: "└─";
}

.sidebar-expanded .sidebar .has-submenu .collapse .nav-link {
    padding-left: 24px;
    border-left: none;
    transition: none !important;
}
.sidebar-expanded .sidebar .has-submenu .collapse .nav-item:before {
    display: none;
}

/* 侧边栏收起状态下的子菜单 */
:not(.sidebar-expanded) .sidebar .has-submenu .collapse {
    display: none !important;
}

/* 桌面端收缩模式下的右侧悬浮子菜单 */
:not(.sidebar-expanded) .sidebar .submenu-flyout {
    position: fixed;
    left: 70px;
    top: 0;
    width: 240px;
    background-color: #2c3e50;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 2000;
    padding: 6px 0;
    display: none !important;
}

:not(.sidebar-expanded) .sidebar .submenu-flyout.show {
    display: block !important;
}

:not(.sidebar-expanded) .sidebar .submenu-flyout .nav-item {
    position: relative;
}

:not(.sidebar-expanded) .sidebar .submenu-flyout .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.85);
    text-align: left;
    border-left: none;
    background: transparent;
}

:not(.sidebar-expanded) .sidebar .submenu-flyout .nav-link:hover,
:not(.sidebar-expanded) .sidebar .submenu-flyout .nav-link.active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

:not(.sidebar-expanded) .sidebar .submenu-flyout .nav-link i {
    margin-right: 10px;
    font-size: 0.95rem;
}

:not(.sidebar-expanded) .sidebar .submenu-flyout .nav-link span {
    display: inline !important;
    font-size: 0.9rem;
}

:not(.sidebar-expanded) .sidebar .submenu-flyout .nav-item:before {
    display: none;
}

/* 展开状态下的子菜单增强样式 */
.sidebar-expanded .sidebar .has-submenu .collapse {
    margin-top: 5px;
    border-radius: 0 0 4px 4px;
}

/* 移动端子菜单缩进 */
@media (max-width: 768px) {
    .has-submenu .collapse .nav-link {
        padding-left: 60px;
        font-size: 12px;
    }
    
    .has-submenu .collapse .nav-link i {
        font-size: 0.9rem;
    }
    
    .has-submenu .collapse .nav-item:before {
        left: 35px;
    }
    
    /* 移动端水平菜单子菜单修复 */
    .horizontal-mobile-menu .has-submenu {
        position: relative;
    }
    
    .horizontal-mobile-menu .has-submenu .collapse {
        position: absolute !important; /* 使用绝对定位但相对于父元素 */
        top: 100%;
        left: 0;
        display: block !important;
        height: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        margin-top: 5px;
        width: 180px;
        z-index: 1000;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        max-height: none !important;
        overflow: visible !important;
    }
    
    .horizontal-mobile-menu .has-submenu .collapse:not(.show) {
        display: none !important;
    }
    
    .horizontal-mobile-menu .has-submenu .nav-link {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        height: auto;
        padding: 10px 15px;
        color: #495057;
        border-bottom: 1px solid #e9ecef;
        white-space: nowrap;
        text-align: left;
        text-decoration: none;
    }
    
    .horizontal-mobile-menu .has-submenu .nav-link:last-child {
        border-bottom: none;
    }
    
    .horizontal-mobile-menu .has-submenu .nav-link:hover,
    .horizontal-mobile-menu .has-submenu .nav-link.active {
        background-color: #e9ecef;
        color: #212529;
    }
    
    .horizontal-mobile-menu .has-submenu .nav-link i {
        margin-right: 10px;
        font-size: 1rem;
        min-width: 20px;
        text-align: left;
        flex-shrink: 0;
    }
    
    .horizontal-mobile-menu .has-submenu .nav-link span {
        display: inline-block;
        font-size: 0.875rem;
        line-height: 1.2;
        flex-grow: 1;
        text-align: left;
    }
    
    .horizontal-mobile-menu .has-submenu .nav-item {
        width: 100%;
        margin: 0;
    }
    
    .horizontal-mobile-menu .has-submenu .nav-item:before {
        display: none; /* 移动端隐藏连接线 */
    }
    
    /* 确保导航栏容器可以扩展 */
    .navbar {
        min-height: 56px;
        height: auto !important;
        overflow: visible !important;
    }
    
    .navbar > .container-fluid {
        overflow: visible !important;
    }
    
    /* 移动端导航栏展开状态 */
    .horizontal-mobile-menu .has-submenu.show .collapse {
        display: block !important;
    }
    
    /* 修复 Bootstrap collapse 的默认行为 */
    .horizontal-mobile-menu .collapse {
        transition: none !important;
        -webkit-transition: none !important;
        -moz-transition: none !important;
        -o-transition: none !important;
    }
}

.nav-link {
    display: block;
    padding: 10px 0; /* 默认收起状态，居中显示 */
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 5px solid transparent;
    text-align: center; /* 默认居中 */
}

.nav-link span {
    display: none; /* 默认隐藏文字 */
}

.nav-link i {
    margin-right: 0; /* 默认无右边距 */
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 3px solid var(--primary-color);
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: 70px; /* 默认对应收起的sidebar */
    padding: 2px;
    transition: none !important;
    min-height: 100vh;
    background-color: #ffffff !important;
}

.page-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background-color: #ffffff !important;
}

.page-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 0px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
}

.card-header {
    padding: 10px 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 5px;
}

.card-img-container {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    font-size: 13px;
    padding: 5px 5px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    word-break: break-word;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f5f5f5;
}

.btn {
    white-space: nowrap;
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--secondary-color);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-success {
    background-color: var(--success-color);
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-warning {
    background-color: var(--warning-color);
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-group {
    display: flex;
    gap: 5px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 3px -5px;
}

.col {
    padding: 0 5px;
    flex: 1;
}

.col-4 {
    width: 33%;
    padding: 0 5px;
}

.col-6 {
    width: 50%;
    padding: 0 5px;
}

.col-8 {
    width: 67%;
    padding: 0 10px;
}

.col-30 {
    width: 30%;
    padding: 0 10px;
}

.col-40 {
    width: 40%;
    padding: 0 10px;
}

.col-60 {
    width: 60%;
    padding: 0 10px;
}

.col-70 {
    width: 70%;
    padding: 0 10px;
}

.alert {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}

.pagination {
    display: flex;
    list-style: none;
    justify-content: center;
    margin-top: 20px;
}

.pagination li {
    margin: 0 2px;
}

.pagination a {
    display: block;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.pagination .active a {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.qrcode-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.qrcode-item {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    flex: 1 1 180px;
    max-width: 200px;
    box-sizing: border-box;
}

.qrcode-image {
    max-width: 100%;
}

.barcode {
    font-family: 'IDAutomationHC39M', cursive;
    font-size: 14px;
    min-height: auto !important;
    vertical-align: middle !important;
    line-height: normal !important;
    word-break: break-all !important;
}

.qrcode-container {
    justify-content: flex-start;
    gap: 10px;
}

.qrcode-item {
    flex: 0 0 auto;
    width: 80mm;
    max-width: 80mm;
    padding: 5mm;
    page-break-inside: avoid;
}

.qrcode-image {
    width: 100%;
    height: auto;
}

.qrcode-info {
    font-size: 14px;
}

.barcode-font {
    font-family: 'IDAutomationHC39M', cursive;
    font-size: 14px;
    line-height: 1.2;
    display: block;
    word-break: break-all;
    white-space: normal;
    text-align: center;
    min-height: 80px !important;
    vertical-align: middle !important;
    line-height: normal !important;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-header p {
    display: none;
}

.sidebar:not(.expanded) .sidebar-toggle {
    transform: none !important;
}

.sidebar-toggle {
    position: absolute;
    right: 10px;
    top: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: none !important;
}

.sidebar:not(.expanded) .nav-link span {
    display: none;
}

.sidebar:not(.expanded) .nav-link {
    text-align: center;
    padding: 10px 0;
}

.sidebar:not(.expanded) .nav-link i {
    margin-right: 0;
}

.sidebar.expanded {
    width: 250px;
}

.sidebar.expanded .sidebar-header h2,
.sidebar.expanded .sidebar-header p {
    display: block;
}

.sidebar.expanded .nav-link {
    text-align: left;
    padding: 10px 20px 10px 10px;
}

.sidebar.expanded .nav-link span {
    display: inline;
}

.sidebar.expanded .nav-link i {
    margin-right: 10px;
}

.sidebar.expanded ~ .main-content {
    margin-left: 250px;
}

/* 使用 HTML 标记类确保首帧即为展开布局 */
.sidebar-expanded .sidebar {
    width: 250px;
}
.sidebar-expanded .sidebar .sidebar-header h2,
.sidebar-expanded .sidebar .sidebar-header p {
    display: block;
}
.sidebar-expanded .sidebar .nav-link {
    text-align: left;
    padding: 10px 20px 10px 10px;
}
.sidebar-expanded .sidebar .nav-link span {
    display: inline;
}
.sidebar-expanded .sidebar .nav-link i {
    margin-right: 10px;
}

@media print {
    .card-header {
        display: none !important;
    }
    header,
    nav,
    footer,
    .navbar,
    .sidebar,
    .page-header,
    .submenu-flyout,
    .btn,
    .pagination,
    .print-hide,
    .no-print {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .page-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }
}
.sidebar-expanded .main-content {
    margin-left: 250px;
}

/* 禁用侧边栏子菜单的折叠动画，避免桌面端闪烁 */
.sidebar .collapse {
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
}

.badge-success {
    background-color: var(--success-color) !important;
    color: #fff !important;
}

.badge-warning {
    background-color: var(--warning-color) !important;
    color: #fff !important;
}

@media print {
    .no-print {
        display: none !important;
    }

    .table-bordered th,
    .table-bordered td {
        border: 1px solid #dee2e6 !important;
    }
}

@media print {
    .barcode-font {
        font-size: 16px;
        line-height: 1.2;
        max-width: 100%;
        height: auto;
        page-break-inside: avoid;
    }
}

@media (max-width: 768px) {
    .search-container { 
        flex-wrap: wrap; 
    }
    
    body {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .sidebar {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 2px;
        width: 100% !important;
    }

    .row {
        margin: 0 !important;
    }

    .col,
    .col-4,
    .col-6,
    .col-8,
    .col-30,
    .col-40,
    .col-60,
    .col-70 {
        width: 100% !important;
        flex: none !important;
        padding: 0 !important;
    }

    .container-fluid {
        padding: 0 0px;
        --bs-gutter-x: 0;
    }

    .row>* {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .card {
        border-radius: 0 !important;
    }

    .col-60,
    .col-40 {
        width: 100% !important;
        float: none !important;
    }

    .container-fluid {
        padding: 0 0px;
        --bs-gutter-x: 0;
    }

    .no-print {
        display: none !important;
    }

    h1 {
        font-size: 1.5em;
    }

    table {
        width: 100%;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
    }

    body {
        margin: 0 !important;
        padding: 0;
        line-height: 1.4;
    }

    .product-print-page {
        width: 210mm;
        margin: 0 auto;
        padding: 5mm;
        box-sizing: border-box;
        border: none !important;
    }

    .product-print-page:nth-of-type(even) {
        page-break-after: always;
    }

    .product-print-page:last-child {
        page-break-after: avoid;
    }

    .no-print {
        display: none !important;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 0 !important;
        border-top: none !important;
    }

    th,
    td {
        border: 1px solid black !important;
        padding: 5px;
        text-align: left;
        font-size: 12px;
    }

    th {
        width: 21%;
    }

    .card-header {
        border-bottom: none !important;
    }

    .card-header h5 {
        display: none !important;
    }

    .barcode-cell {
        font-family: 'IDAutomationHC39M', cursive;
        font-size: 14px;
        min-height: 150px !important;
        vertical-align: middle !important;
        line-height: normal !important;
        word-break: break-all !important;
    }

    .card {
        page-break-inside: avoid !important;
        border: none !important;
    }

    .qr-code-row-group {
        page-break-inside: avoid !important;
    }

    .card-body {
        padding: 3px;
    }

    .qrcode-container img {
        max-width: 100% !important;
        height: auto !important;
    }

    .product-value-cell {
        width: 59%;
    }

    .qrcode-cell {
        width: 20%;
    }

    .card-img-top {
        max-width: 100%;
        height: auto;
    }

    h1 {
        font-size: 16px;
        margin-top: 0 !important;
        margin-bottom: 1.5px !important;
    }

    h2 {
        font-size: 10px !important;
        margin-top: 0 !important;
    }
    
    /* 移动端Select2样式修复 */
    .filter-group .select2-container {
        width: 100% !important;
        min-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .col,
    .col-4,
    .col-6,
    .col-8,
    .col-30,
    .col-40,
    .col-60,
    .col-70 {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 768px) {
    .card,
    .card-header,
    .card-body,
    .search-container,
    .button-group,
    .table-container {
        margin: 0 !important;
        padding: 0 !important;
    }

    .search-group {
        width: 100%;
        min-width: 100%;
        margin-bottom: 0.5rem;
    }

    .button-group {
        width: 100%;
        justify-content: space-between;
    }

    .button-group .btn {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
        margin-bottom: 10px;
    }

    .search-group .btn {
        flex: 0 0 auto;
    }

    .responsive-hide {
        display: none !important;
    }

    .col-checkbox {
        width: 1% !important;
        white-space: nowrap;
    }

    .col-product-number {
        width: 90% !important;
    }

    .navbar {
        padding: 0.5rem 1rem;
        background-color: #f8f9fa;
        border-bottom: 1px solid #ddd;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        position: relative;
        z-index: 1000;
    }

    .navbar-toggler {
        order: 2;
        margin-left: auto;
        border: none;
        padding: 0.15rem 0.1rem;
    }

    .horizontal-mobile-menu {
        order: 1;
        margin-right: auto;
        display: block !important;
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0;
        opacity: 1;
        transform: none;
    }

    .horizontal-mobile-menu .nav-menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin: 0;
        padding: 0;
        list-style: none;
        gap: 2px;
    }

    .horizontal-mobile-menu .nav-item {
        margin: 0;
    }

    .horizontal-mobile-menu .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        color: #6c757d;
        text-decoration: none;
        padding: 0.2rem;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .horizontal-mobile-menu .nav-link:hover,
    .horizontal-mobile-menu .nav-link.active {
        color: #007bff;
        background-color: rgba(0, 123, 255, 0.1);
    }

    .horizontal-mobile-menu .nav-link i {
        font-size: 1.2rem;
        margin: 0;
    }

    .page-content {
        margin-top: 10px;
        padding: 5px 10px !important;
        width: 100%;
        box-sizing: border-box;
    }

    .card-body {
        border: 1px solid var(--border-color) !important;
        border-radius: 5px;
        margin: 1px !important;
        padding: 1px 1px !important;
        background-color: white;
        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    }

    .card-body .btn {
        margin: 5px 3px !important;
        padding: 5px 5px !important;
    }

    .card {
        margin-bottom: 5px;
        border: none !important;
        background-color: transparent !important;
    }

    .card-header {
        background-color: #f8f9fa;
        border-bottom: 1px solid var(--border-color);
        padding: 10px 10px;
        margin: 0 5px;
        border-radius: 5px 5px 0 0;
    }

    .button-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-around;
        margin: 10px 0;
    }

    .button-group .btn {
        flex: 1 1 calc(50% - 10px);
        min-width: 120px;
        margin: 3px !important;
        text-align: center;
    }
    
    .filter-group {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
    }
    
    .filter-group > * {
        margin: 0 !important;
        box-sizing: border-box;
    }
    
    .filter-group .select2-container,
    .filter-group > .form-select,
    .filter-group > .btn {
        width: calc(50% - 4px) !important;
        flex: 0 0 calc(50% - 4px) !important;
    }
    
    .filter-group > .btn-outline-secondary {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
}

@media (min-width: 769px) {
    .search-group {
        max-width: 400px;
    }

    .navbar-toggler,
    .horizontal-mobile-menu {
        display: none !important;
    }

    .sidebar {
        display: block !important;
    }

    .main-content {
        margin-left: 70px;
    }
    
    .sidebar.expanded ~ .main-content {
        margin-left: 250px;
    }

    .page-content {
        padding: 5px;
    }

    .card-body {
        padding: 5px;
    }
}

@media (max-width: 768px) {
    .product-card {
        width: 100% !important;
    }
}

@media (min-width: 768px) {
    .card .row .col-lg-6 {
        flex: 0 0 auto;
        width: 50%;
        margin-top: 10px;
    }

    .card-img-container {
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
}
.sidebar-expanded .sidebar .submenu-flyout {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto;
    box-shadow: none;
    border: 0;
    padding: 0;
}
.sidebar-expanded .sidebar .submenu-flyout.show {
    display: block !important;
}