/* ==========================================
   移动端响应式样式
   适配手机端，同时保持电脑端布局
   ========================================== */

/* ==========================================
   1. 基础响应式设置
   ========================================== */

/* 移动端媒体查询（屏幕宽度 <= 768px） */
@media screen and (max-width: 768px) {
    
    /* 基础字体和容器 - 自动适配屏幕高度 */
    html {
        height: 100%;
        overflow-x: hidden !important;
    }
    
    body {
        font-size: 4px;
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
        padding: 8px;
        padding-bottom: 0;
        position: relative;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* 容器自动延伸到底部导航栏上方 */
    .container,
    .shipment-container,
    .billing-container,
    .reports-container,
    .customers-container,
    .admin-container,
    .subscription-container {
        padding: 8px;
        padding-bottom: 50px; /* 为底部导航栏留出空间 */
        max-width: 100%;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 16px); /* 视口高度减去body的padding */
    }
    
    /* 库存页面特殊处理 - 移除padding让搜索栏贴顶 */
    .container.stock-container {
        padding: 0 !important;
        padding-top: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 50px !important;
    }
    
    /* 列表容器自动延伸 */
    .shipment-list,
    .product-list,
    .order-list,
    .customer-list,
    .stock-list,
    .content {
        flex: 1;
        padding-bottom: 10px;
    }
    
    /* ==========================================
       通用紧凑样式 - 页面头部
       ========================================== */
    .page-header {
        padding: 10px !important;
        margin-bottom: 10px !important;
        gap: 8px !important;
    }
    
    .page-header h2,
    .page-title {
        font-size: 16px !important;
        margin: 0 !important;
    }
    
    /* ==========================================
       通用紧凑样式 - 卡片
       ========================================== */
    .card,
    .stock-card,
    .shipment-card,
    .customer-list,
    .filter-bar {
        padding: 10px !important;
        margin-bottom: 10px !important;
        border-radius: 8px !important;
    }
    
    /* ==========================================
       通用紧凑样式 - 表单
       ========================================== */
    .form-group {
        margin-bottom: 8px !important;
    }
    
    .form-group label {
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px !important;
        font-size: 14px !important;
        height: 36px !important;
    }
    
    .form-group textarea {
        height: auto !important;
        min-height: 60px !important;
    }
    
    /* ==========================================
       通用紧凑样式 - 按钮
       ========================================== */
    .btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
        height: 36px !important;
        border-radius: 6px !important;
    }
    
    .btn-small {
        padding: 5px 8px !important;
        font-size: 12px !important;
        height: 28px !important;
    }
    
    /* ==========================================
       通用紧凑样式 - 搜索栏
       ========================================== */
    .search-bar,
    .toolbar {
        gap: 6px !important;
        flex-wrap: wrap !important;
    }
    
    .search-bar input,
    .toolbar input {
        height: 36px !important;
        font-size: 14px !important;
        padding: 6px 10px !important;
    }
    
    /* ==========================================
       通用紧凑样式 - 列表项
       ========================================== */
    .customer-item,
    .shipment-item,
    .order-item,
    .list-item {
        padding: 10px !important;
        gap: 8px !important;
    }
    
    /* ==========================================
       通用紧凑样式 - 统计卡片
       ========================================== */
    .stat-card,
    .stats-card {
        padding: 10px !important;
    }
    
    .stat-label {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }
    
    .stat-value {
        font-size: 18px !important;
    }
    
    /* ==========================================
       通用紧凑样式 - 标签和徽章
       ========================================== */
    .badge,
    .tag,
    .status-badge {
        padding: 2px 6px !important;
        font-size: 11px !important;
    }
    
    /* 表格容器 - 通用横向滚动 */
    .table-container,
    .data-table-container,
    .table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 10px 0 !important;
        width: 100% !important;
    }
    
    /* 表格固定宽度，允许横向滚动 */
    .table-container table,
    .data-table-container table,
    .table-responsive table {
        min-width: 800px !important;
        width: max-content !important;
    }
    
    /* 确保所有表格都可以横向滚动 */
    table {
        display: table !important;
        width: 100% !important;
    }
    
    /* ==========================================
       2. 导航栏优化
       ========================================== */
    
    /* 顶部导航栏 */
    .header {
        padding: 10px;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .user-info {
        font-size: 12px;
    }
    
    /* ==========================================
       3. 侧边栏菜单（汉堡菜单）
       ========================================== */
    
    /* 侧边栏基础样式 */
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        z-index: 2000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 侧边栏显示状态 */
    .sidebar.active {
        left: 0;
    }
    
    /* 菜单遮罩层 */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* 汉堡菜单按钮 */
    .menu-toggle {
        display: block !important;
        position: fixed;
        top: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
        background: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        z-index: 2001;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        padding: 8px;
    }
    
    .menu-toggle span {
        display: block;
        width: 24px;
        height: 3px;
        background: #333;
        margin: 5px auto;
        border-radius: 2px;
        transition: all 0.3s;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* 菜单项优化 */
    .sidebar .menu-item {
        padding: 15px 20px;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .sidebar .menu-item:active {
        background: #f5f5f5;
    }
    
    /* ==========================================
       4. 主内容区域
       ========================================== */
    
    .main-content {
        margin-left: 0 !important;
        padding: 60px 10px 150px; /* 增加底部间距，适配底部导航栏和苹果手机返回条 */
        width: 100%;
    }
    
    /* 卡片容器 */
    .card {
        margin-bottom: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .card-header {
        padding: 15px;
        font-size: 16px;
        font-weight: bold;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* ==========================================
       5. 按钮优化（更大的触摸区域）
       ========================================== */
    
    .btn {
        padding: 12px 20px;
        font-size: 15px;
        min-height: 44px; /* iOS 推荐最小触摸区域 */
        border-radius: 8px;
        width: 100%; /* 移动端按钮全宽 */
        margin-bottom: 1px;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* 内联按钮组 */
    .btn-group-inline {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .btn-group-inline .btn {
        width: 100%;
    }
    
    /* ==========================================
       6. 表单优化
       ========================================== */
    
    /* 表单组 */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 15px;
        font-weight: 500;
        color: #333;
    }
    
    /* 输入框 */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="password"],
    textarea,
    select {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px; /* 防止iOS自动缩放 */
        border: 1px solid #ddd;
        border-radius: 8px;
        min-height: 22px;
        -webkit-appearance: none;
        appearance: none;
    }
    
    textarea {
        min-height: 100px;
        resize: vertical;
    }
    
    /* 选择框 */
    select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 40px;
    }
    
    /* ==========================================
       7. 表格响应式（转为卡片布局）
       ========================================== */
    
    /* 隐藏传统表格 */
    table.mobile-card {
        display: none;
    }
    
    /* 使用卡片布局显示数据 */
    .table-card-container {
        display: block;
    }
    
    .table-card {
        background: white;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .table-card-row {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .table-card-row:last-child {
        border-bottom: none;
    }
    
    .table-card-label {
        font-weight: 500;
        color: #666;
        flex-shrink: 0;
        margin-right: 10px;
    }
    
    .table-card-value {
        text-align: right;
        color: #333;
        flex-grow: 1;
    }
    
    /* 表格横向滚动（备选方案） */
    .table-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    .table-scroll-wrapper table {
        min-width: 600px;
        font-size: 13px;
    }
    
    .table-scroll-wrapper th,
    .table-scroll-wrapper td {
        padding: 8px;
        white-space: nowrap;
    }
    
    /* ==========================================
       8. 模态框优化
       ========================================== */
    
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 15px;
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px 15px;
        max-height: calc(90vh - 120px);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* ==========================================
       9. 统计卡片优化
       ========================================== */
    
    .stats-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .stat-value {
        font-size: 24px;
        font-weight: bold;
    }
    
    /* 两列布局 */
    .stats-grid.two-columns {
        grid-template-columns: 1fr 1fr;
    }
    
    /* ==========================================
       10. 产品列表/卡片
       ========================================== */
    
    .product-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card {
        padding: 15px;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .product-image {
        width: 100%;
        height: auto;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    /* ==========================================
       11. 搜索和筛选
       ========================================== */
    
    .search-bar {
        margin-bottom: 20px;
    }
    
    .search-input {
        width: 100%;
        padding: 12px 40px 12px 15px;
        font-size: 16px;
        border: 1px solid #ddd;
        border-radius: 25px;
    }
    
    .filter-group {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .filter-group select,
    .filter-group input {
        flex: 1;
        min-width: 120px;
    }
    
    /* ==========================================
       12. 二维码和图片
       ========================================== */
    
    .qr-code-container {
        text-align: center;
        padding: 20px;
    }
    
    .qr-code {
        max-width: 250px;
        width: 100%;
        height: auto;
        margin: 0 auto;
    }
    
    /* ==========================================
       13. 标签页
       ========================================== */
    
    .tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-bottom: 2px solid #f0f0f0;
    }
    
    .tab-item {
        padding: 12px 20px;
        white-space: nowrap;
        font-size: 15px;
        min-width: auto;
    }
    
    /* ==========================================
       14. 分页
       ========================================== */
    
    .pagination {
        display: flex;
        justify-content: center;
        gap: 5px;
        margin: 20px 0;
        flex-wrap: wrap;
    }
    
    .pagination .btn {
        min-width: 44px;
        padding: 10px;
        width: auto;
    }
    
    /* ==========================================
       15. 扫码页面特殊优化
       ========================================== */
    
    .scan-container {
        padding: 10px;
    }

    .scan-result-item {
        padding: 15px;
        margin-bottom: 10px;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .camera-container {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 4/3;
    }

    /* 扫码页面容器优化 */
    .scan-page-container {
        padding: 10px !important;
        padding-bottom: 150px !important; /* 增加底部间距，适配底部导航栏和苹果手机返回条 */
    }

    .page-header h2 {
        font-size: 20px !important;
        margin: 10px 0 !important;
    }

    /* 视频容器 - 1:1 比例 */
    .video-container {
        max-width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        margin: 0 auto 10px !important;
    }

    .video-container video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* 手动输入区域优化 */
    .manual-input-section {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }

    .manual-input-box {
        gap: 8px !important;
    }

    .manual-input-box input {
        flex: 1 !important;
        padding: 10px !important;
        font-size: 14px !important;
    }

    .manual-input-box button {
        padding: 10px 16px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }

    /* 订单选择区域优化 */
    .order-select-section {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }

    .order-select-section label {
        font-size: 14px !important;
    }

    .order-select-section select {
        padding: 8px !important;
        font-size: 14px !important;
    }

    /* 订单详情区域优化 */
    .order-details-section {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }

    .order-info-header h3 {
        font-size: 16px !important;
    }

    .items-table {
        font-size: 13px !important;
    }

    .items-table th,
    .items-table td {
        padding: 8px 4px !important;
    }

    /* 固定底部按钮优化 */
    .fixed-bottom-btn {
        padding: 10px !important;
    }

    .fixed-bottom-btn .btn-lg {
        padding: 12px 20px !important;
        font-size: 16px !important;
    }
    
    /* ==========================================
       16. 工具提示和消息
       ========================================== */
    
    .toast {
        bottom: 20px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        border-radius: 8px;
        padding: 15px;
        font-size: 15px;
    }
    
    .alert {
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 15px;
        font-size: 14px;
    }
    
    /* ==========================================
       17. 加载状态
       ========================================== */
    
    .loading {
        padding: 40px 20px;
        text-align: center;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
    
    /* ==========================================
       18. 空状态
       ========================================== */
    
    .empty-state {
        padding: 60px 20px;
        text-align: center;
    }
    
    .empty-state-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .empty-state-text {
        font-size: 16px;
        color: #999;
    }
    
    /* ==========================================
       19. 固定底部操作栏
       ========================================== */
    
    .fixed-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 15px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .fixed-bottom-bar .btn {
        width: 100%;
        margin-bottom: 0;
    }
    
    /* 为固定底栏留出空间 */
    .has-fixed-bottom {
        padding-bottom: 150px; /* 增加底部间距，适配底部导航栏和苹果手机返回条 */
    }
    
    /* ==========================================
       20. 优化滚动性能
       ========================================== */
    
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* 防止横向滚动 */
    body {
        overflow-x: hidden;
    }
    
    /* ==========================================
       21. 打印隐藏
       ========================================== */
    
    @media print {
        .menu-toggle,
        .sidebar,
        .menu-overlay,
        .fixed-bottom-bar {
            display: none !important;
        }
        
        .main-content {
            padding: 0;
        }
    }
}

/* ==========================================
   22. 平板设备（768px - 1024px）
   ========================================== */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   23. 超大屏幕优化（> 1400px）
   ========================================== */

@media screen and (min-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================
   24. 移动端底部导航栏（仅移动端显示）
   ========================================== */

.mobile-bottom-nav {
    display: none;
}

/* 防止整个文档缩放时底部导航栏跟随缩放 */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

@media screen and (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        padding: 0 5px;
        /* 防止底部导航被缩放和滚动 */
        transform-origin: center bottom;
        position: fixed !important;
        width: 100% !important;
        min-height: 60px !important;
        max-height: 60px !important;
        /* 🔥 防止滚动时导航栏消失 */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 5px 2px;
        cursor: pointer;
        transition: all 0.3s ease;
        border-radius: 8px;
        -webkit-tap-highlight-color: transparent;
        min-width: 0;
    }
    
    .bottom-nav-item:active {
        background: #f5f5f5;
        transform: scale(0.95);
    }
    
    .bottom-nav-icon {
        font-size: 20px;
        margin-bottom: 2px;
        transition: all 0.3s ease;
    }
    
    .bottom-nav-label {
        font-size: 10px;
        color: #666;
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    
    .bottom-nav-item.active .bottom-nav-icon {
        transform: scale(1.1);
    }
    
    .bottom-nav-item.active .bottom-nav-label {
        color: #667eea;
        font-weight: 600;
    }
    
    /* 菜单按钮特殊样式 */
    .bottom-nav-menu .menu-icon {
        font-size: 26px;
        font-weight: bold;
    }
    
    /* 返回按钮图标样式 */
    .bottom-nav-icon img {
        display: block;
        width: 24px;
        height: 24px;
        object-fit: contain;
    }
}

/* ==========================================
   25. 移动端菜单抽屉
   ========================================== */

.mobile-menu-drawer {
    display: none;
}

@media screen and (max-width: 768px) {
    .mobile-menu-drawer {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
    }
    
    .mobile-menu-drawer.active {
        display: block;
    }
    
    .menu-drawer-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        animation: fadeIn 0.3s ease;
    }
    
    .menu-drawer-content {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 75vh;
        background: white;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        animation: slideUp 0.3s ease;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes slideUp {
        from { 
            transform: translateY(100%);
            opacity: 0;
        }
        to { 
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .menu-drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #f0f0f0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .menu-drawer-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }
    
    .menu-drawer-close {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        font-size: 24px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .menu-drawer-close:active {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(0.9);
    }
    
    .menu-drawer-body {
        padding: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .drawer-menu-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .drawer-menu-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 10px;
        background: #f8f9fa;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .drawer-menu-item:active {
        background: #e9ecef;
        transform: scale(0.95);
    }
    
    .drawer-menu-icon {
        font-size: 32px;
        margin-bottom: 8px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 40px;
    }
    
    .drawer-menu-label {
        font-size: 13px;
        color: #333;
        text-align: center;
        line-height: 1.3;
    }
}

/* ==========================================
   26. 首页数据统计卡片优化（移动端2x2网格）
   ========================================== */

@media screen and (max-width: 768px) {
    /* 首页主容器 */
    .main-container {
        padding: 10px;
        padding-bottom: 150px; /* 增加底部间距，适配底部导航栏和苹果手机返回条 */
    }
    
    /* 数据统计卡片容器 */
    .dashboard-stats {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 15px;
        padding: 0;
    }
    
    /* 统计卡片 */
    .stat-card {
        background: white;
        border-radius: 12px;
        padding: 15px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100px;
    }
    
    .stat-label {
        font-size: 12px !important;
        color: #666;
        margin-bottom: 8px;
        font-weight: 500;
    }
    
    .stat-value {
        font-size: 20px !important;
        font-weight: bold;
        color: #333;
    }
    
    /* 工作区域 */
    .workspace {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    /* 侧边栏菜单在移动端隐藏（使用底部菜单代替） */
    .sidebar-menu {
        display: none;
    }
    
    /* 内容区域全宽显示 - 适配可视窗口 */
    .content-area {
        flex: 1;
        padding: 0;
        margin-left: 0 !important;
        background: transparent;
        height: 100% !important; /* 使用flex布局自动计算高度 */
        overflow: auto !important; /* 允许滚动 */
        position: relative;
        -webkit-overflow-scrolling: touch;
    }
    
    .content-area iframe {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        display: block;
    }
    
    /* 在首页显示库存表（开单页面） */
    .main-container .workspace {
        margin-top: 10px;
    }
    
    /* 手机端点击功能页面时隐藏销售数据（但首页仍显示） */
    body.mobile-page-active .dashboard-stats {
        display: none !important;
    }
    
    /* 首页欢迎页面样式优化 */
    .welcome-screen {
        padding: 40px 20px !important;
        text-align: center !important;
    }
    
    .welcome-screen h2 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    
    .welcome-screen p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
    
    /* 手机端隐藏库存状态文字（偏低、充足等） */
    .stock-status-text {
        display: none !important;
    }
    
    /* 手机端规格和库存数量水平显示 */
    .variant-table tbody tr {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        border-bottom: 1px solid #e9ecef !important;
        padding: 10px 5px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .variant-table tbody tr td:nth-child(1) {
        /* 选择框列 */
        order: 1;
        width: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .variant-table tbody tr td:nth-child(2),
    .variant-table tbody tr td:nth-child(3) {
        /* 规格和库存同行显示 */
        order: 2;
        display: inline !important;
        width: auto !important;
        padding: 0 5px !important;
        border: none !important;
    }
    
    .variant-table tbody tr td:nth-child(2) {
        /* 规格列 */
        flex: 0 0 auto !important;
        font-weight: 500 !important;
    }
    
    .variant-table tbody tr td:nth-child(3) {
        /* 库存列 - 紧跟规格后面 */
        flex: 0 0 auto !important;
        margin-left: 10px !important;
    }
    
    .variant-table tbody tr td:nth-child(4) {
        /* 手机端隐藏成本价 */
        display: none !important;
    }
    
    .variant-table tbody tr td:nth-child(5) {
        /* 售价 - 水平显示 */
        order: 3;
        width: auto !important;
        padding: 5px 8px !important;
        display: inline !important;
        flex: 0 0 auto !important;
        margin-left: 15px !important;
    }
    
    /* 手机端隐藏表头，使用卡片式布局 */
    .variant-table thead {
        display: none !important;
    }
    
    /* 售价添加标签（成本价已隐藏，不需要标签） */
    .variant-table tbody tr td:nth-child(5)::before {
        content: "¥";
        font-weight: bold;
        color: #667eea;
        margin-right: 2px;
    }
    
    /* 产品库存表格手机端优化 - 规格和数量合并显示 */
    .variant-table {
        font-size: 13px !important;
    }
    
    /* 手机端操作栏按钮布局优化 */
    .action-bar {
        width: 100% !important;
    }
    
    .action-row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        align-items: stretch !important;
    }
    
    /* 第一行：商户选择和新建商户 */
    .action-row .action-label {
        display: none !important; /* 隐藏"选择商户："文字标签 */
    }
    
    .action-row .merchant-select {
        flex: 1 1 0 !important; /* 占据剩余空间 */
        min-width: 0 !important;
        order: 1;
        height: 44px !important;
        padding: 10px 12px !important;
        font-size: 15px !important;
    }
    
    .action-row .btn-white:first-of-type {
        /* 新建商户按钮 - 固定宽度 */
        flex: 0 0 80px !important;
        order: 2;
        height: 44px !important;
        padding: 10px 6px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }
    
    /* 第二行：立即开单和取消 */
    .action-row .btn-success {
        /* 立即开单按钮 - 与新建商户同宽 */
        flex: 0 0 80px !important;
        order: 3;
        height: 44px !important;
        padding: 10px 6px !important;
        font-size: 14px !important;
        font-weight: bold !important;
        white-space: nowrap !important;
    }
    
    .action-row .btn-white:last-of-type {
        /* 取消按钮 - 新建商户宽度的一半 */
        flex: 0 0 40px !important;
        order: 4;
        height: 44px !important;
        padding: 10px 4px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }
    
    .variant-table thead th:nth-child(2),
    .variant-table thead th:nth-child(3) {
        display: none !important;
    }
    
    .variant-table thead tr {
        display: grid;
        grid-template-columns: 50px 1fr 100px 100px;
    }
    
    .variant-table thead tr::after {
        content: "规格/库存";
        grid-column: 2;
        padding: 10px 8px;
        font-weight: bold;
        text-align: left;
        background: #f8f9fa;
        border-bottom: 2px solid #667eea;
    }
    
    .variant-table tbody tr {
        display: grid;
        grid-template-columns: 50px 1fr 100px 100px;
        align-items: center;
    }
    
    .variant-table tbody .spec-cell {
        grid-column: 2;
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 10px 8px !important;
    }
    
    .variant-table tbody .stock-cell {
        display: none !important;
    }
    
    /* 在规格单元格内显示库存 */
    .variant-table tbody .spec-cell::after {
        content: attr(data-stock);
        font-size: 12px;
        color: #666;
        font-weight: normal;
    }
    
    /* 内容区域iframe允许缩放 */
    .content-area {
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pinch-zoom !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    .content-area iframe {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pinch-zoom !important;
    }
    
    /* 确保底部导航始终在最上层且不受缩放影响 */
    .mobile-bottom-nav {
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
        will-change: transform !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }
}

/* ==========================================
   27. 平板设备首页优化（768px - 1024px）
   ========================================== */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* 平板上数据卡片显示为4列 */
    .dashboard-stats {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    .stat-value {
        font-size: 26px;
    }
}

/* ==========================================
   28. 隐藏PC端元素在移动端
   ========================================== */

@media screen and (max-width: 768px) {
    /* 隐藏桌面端的侧边栏 */
    .sidebar-menu {
        display: none !important;
    }
    
    /* 主内容区域调整 */
    .main-content {
        margin-left: 0 !important;
        padding: 10px;
        padding-bottom: 150px; /* 增加底部间距，适配底部导航栏和苹果手机返回条 */
    }
}

/* ==========================================
   29. 电脑端隐藏移动端元素
   ========================================== */

@media screen and (min-width: 769px) {
    .mobile-bottom-nav,
    .mobile-menu-drawer {
        display: none !important;
    }
}

/* ==========================================
   30. 出货管理页面（shipment.html）移动端和平板优化
   ========================================== */

/* 平板端优化 (768px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .shipment-container {
        padding: 20px !important;
        max-width: 100% !important;
    }
    
    .page-header {
        flex-wrap: wrap !important;
        gap: 15px !important;
        padding: 20px !important;
    }
    
    .page-title {
        font-size: 22px !important;
    }
    
    .search-bar {
        flex-wrap: wrap !important;
        gap: 10px !important;
        flex: 1;
    }
    
    .search-bar label {
        font-size: 13px !important;
    }
    
    .search-bar input[type="date"] {
        min-width: 130px !important;
    }
    
    .search-bar input[type="text"] {
        min-width: 180px !important;
    }
    
    .search-bar button {
        padding: 8px 18px !important;
    }
    
    .quick-date-buttons {
        gap: 10px !important;
        padding: 12px 20px !important;
    }
    
    .quick-date-btn {
        padding: 8px 16px !important;
        font-size: 14px !important;
    }
    
    .shipment-card {
        padding: 18px !important;
    }
    
    .shipment-info {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .shipment-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr 2fr 2fr !important;
        gap: 5px !important;
    }
    
    .shipment-actions .btn {
        padding: 7px 4px !important;
        font-size: 11px !important;
        min-width: auto !important;
    }
}

/* 手机端优化 (≤768px) */
@media screen and (max-width: 768px) {
    /* 页面容器 */
    .shipment-container {
        padding: 10px !important;
        border-radius: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    /* 页面头部 */
    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 12px 10px !important;
        gap: 12px !important;
        position: relative !important;
    }
    
    .page-title {
        font-size: 18px !important;
        margin-bottom: 3px !important;
    }
    
    .page-subtitle {
        font-size: 12px !important;
        margin-top: 0 !important;
        color: #888 !important;
    }
    
    /* 搜索栏优化 - 分组布局 */
    .search-bar {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }
    
    /* 日期输入框行 */
    .search-bar label {
        font-size: 12px !important;
        min-width: 30px !important;
        flex-shrink: 0;
    }
    
    .search-bar input[type="date"] {
        flex: 1 !important;
        min-width: 0 !important;
        font-size: 13px !important;
        padding: 8px 10px !important;
    }
    
    .search-bar input[type="text"] {
        width: 100% !important;
        font-size: 14px !important;
        padding: 10px 12px !important;
        margin: 0 !important;
    }
    
    .search-bar button {
        width: 100% !important;
        padding: 10px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
        background: #667eea !important;
        color: white !important;
        border-radius: 6px !important;
    }
    
    /* 快速日期按钮优化 */
    .quick-date-buttons {
        display: flex !important;
        gap: 6px !important;
        padding: 10px 10px 12px 10px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex-wrap: nowrap !important;
        top: auto !important;
        position: relative !important;
    }
    
    .quick-date-btn {
        flex-shrink: 0 !important;
        padding: 7px 14px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        min-width: auto !important;
    }
    
    /* 订单列表容器 */
    .orders-list,
    #shipment-list {
        padding: 0 1px !important;
        margin-top: 5px !important;
    }
    
    /* 订单卡片优化 */
    .order-card,
    .shipment-card {
        margin-bottom: 12px !important;
        padding: 14px !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
        background: white !important;
    }
    
    .shipment-card:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s !important;
    }
    
    /* 订单头部优化 */
    .order-header,
    .shipment-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        margin-bottom: 12px !important;
        padding-bottom: 10px !important;
        border-bottom: 2px solid #f0f0f0 !important;
    }
    
    .order-number,
    .shipment-title {
        font-size: 15px !important;
        font-weight: 600 !important;
        word-break: break-word !important;
        flex: 1;
        line-height: 1.4 !important;
    }
    
    .order-status,
    .shipment-status {
        flex-shrink: 0 !important;
        padding: 5px 10px !important;
        font-size: 11px !important;
        border-radius: 12px !important;
        font-weight: 600 !important;
    }
    
    /* 订单信息优化 - 列表式布局 */
    .order-info,
    .shipment-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        margin-bottom: 12px !important;
    }
    
    .shipment-info > div {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-size: 13px !important;
        padding: 2px 0 !important;
        border-bottom: 1px solid #f8f8f8 !important;
    }
    
    .shipment-info > div:last-child {
        border-bottom: none !important;
    }
    
    .shipment-info > div > span:first-child {
        color: #666 !important;
        font-size: 12px !important;
    }
    
    .shipment-info > div > span:last-child {
        color: #333 !important;
        font-weight: 500 !important;
        text-align: right !important;
        word-break: break-all !important;
        max-width: 60% !important;
    }
    
    .order-info-item {
        display: flex;
        justify-content: space-between;
        font-size: 14px !important;
        padding: 5px 0;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .order-info-label {
        color: #666;
        flex-shrink: 0;
        margin-right: 10px;
    }
    
    .order-info-value {
        color: #333;
        font-weight: 500;
        text-align: right;
        word-break: break-all;
    }
    
    /* 产品列表 */
    .order-items {
        margin-bottom: 15px !important;
    }
    
    .order-item {
        padding: 12px !important;
        margin-bottom: 10px !important;
        background: #f8f9fa;
        border-radius: 6px;
        font-size: 13px !important;
    }
    
    .order-item-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 6px;
    }
    
    .order-item-row:last-child {
        margin-bottom: 0;
    }
    
    .order-item-label {
        color: #666;
        font-size: 12px;
    }
    
    .order-item-value {
        color: #333;
        font-weight: 500;
        font-size: 13px;
    }
    
    /* 合计金额 */
    .order-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px !important;
        background: #f0f7ff;
        border-radius: 6px;
        margin-bottom: 15px !important;
    }
    
    .order-total-label {
        font-size: 14px !important;
        color: #666;
    }
    
    .order-total-value {
        font-size: 20px !important;
        font-weight: bold !important;
        color: #667eea;
    }
    
    /* 操作按钮组 - 优化为网格布局 */
    .order-actions {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 12px !important;
    }
    
    /* 出货单按钮 - 4列布局 */
    .shipment-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr 2fr 2fr !important;
        gap: 5px !important;
        width: 100% !important;
        margin-top: 8px !important;
    }

    .order-actions .btn {
        width: 100% !important;
        padding: 10px 8px !important;
        font-size: 13px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        min-height: 40px !important;
        border-radius: 6px !important;
        font-weight: 500 !important;
        transition: all 0.2s !important;
    }
    
    .shipment-actions .btn {
        width: 100% !important;
        padding: 7px 4px !important;
        font-size: 11px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        min-height: 32px !important;
        border-radius: 4px !important;
        font-weight: 500 !important;
        transition: all 0.2s !important;
    }

    .order-actions .btn:active,
    .shipment-actions .btn:active {
        transform: scale(0.95) !important;
    }

    /* 删除按钮和退单按钮颜色 */
    .shipment-actions .btn-danger {
        background: #f56c6c !important;
    }

    .shipment-actions .btn-warning {
        background: #ff9800 !important;
    }
    
    /* 两列按钮布局 */
    .order-actions-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    .order-actions-grid .btn {
        width: 100% !important;
        padding: 10px !important;
        font-size: 13px !important;
    }
    
    /* 详情模态框 */
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        max-height: 100vh !important;
    }
    
    .modal-body {
        padding: 15px !important;
    }
    
    /* 详情页表格 - 横向滚动 */
    .modal-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        font-size: 12px !important;
        margin-right: 0 !important;
    }
    
    .modal-body table thead th {
        padding: 8px 5px !important;
        font-size: 11px !important;
        min-width: 40px;
    }
    
    .modal-body table tbody td {
        padding: 8px 5px !important;
        font-size: 12px !important;
    }
    
    /* 详情页金额显示 */
    .modal-body .order-total-amount {
        font-size: 16px !important;
        flex-wrap: wrap;
    }
    
    .modal-body .order-total-amount span {
        width: 24px !important;
        height: 28px !important;
        line-height: 28px !important;
        font-size: 14px !important;
    }
    
    /* 签名栏 */
    .modal-body .signature-section {
        flex-direction: column !important;
        gap: 15px !important;
        font-size: 14px !important;
    }
    
    /* 分页 */
    .pagination {
        flex-wrap: wrap !important;
        gap: 5px !important;
        justify-content: center !important;
        padding: 15px 10px !important;
    }
    
    .pagination .btn {
        min-width: 40px !important;
        padding: 8px !important;
        font-size: 14px !important;
        width: auto !important;
    }
    
    .pagination .page-info {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 10px !important;
        font-size: 13px !important;
    }
}

/* ==========================================
   31. 订单页面平板端优化（768px - 1024px）
   ========================================== */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .shipment-container {
        padding: 20px !important;
    }
    
    .page-header {
        gap: 15px !important;
    }
    
    .search-bar {
        flex-wrap: wrap !important;
    }
    
    .search-bar input[type="text"] {
        min-width: 250px !important;
    }
    
    /* 订单卡片两列布局 */
    .orders-list,
    #shipment-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .order-card,
    .shipment-card {
        margin-bottom: 0 !important;
    }
    
    /* 统计信息 */
    .stats-bar {
        gap: 15px !important;
    }
    
    .stat-item {
        flex: 1 !important;
    }
    
    /* 按钮组 */
    .order-actions {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .order-actions .btn {
        flex: 1 !important;
        min-width: 120px !important;
        font-size: 14px !important;
        padding: 10px 15px !important;
    }
    
    /* 详情模态框 */
    .modal-content {
        width: 90% !important;
        max-width: 900px !important;
    }
    
    /* 表格保持可滚动 */
    .modal-body table {
        font-size: 14px !important;
    }
}

/* ==========================================
   32. 系统管理页面（admin.html）移动端优化
   ========================================== */

@media screen and (max-width: 768px) {
    /* 管理页面容器 */
    .admin-container {
        padding: 10px !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    /* 页面头部 */
    .admin-header {
        padding: 15px 10px !important;
        margin: -10px -10px 15px -10px !important;
    }
    
    .admin-header h2 {
        font-size: 20px !important;
    }
    
    /* 标签页导航 */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        gap: 5px !important;
        margin-bottom: 15px !important;
        padding-bottom: 5px;
        border-bottom: 1px solid #e9ecef !important;
    }
    
    .tab {
        padding: 10px 16px !important;
        font-size: 14px !important;
        flex-shrink: 0;
    }
    
    /* 卡片容器 */
    .card {
        padding: 15px !important;
        margin-bottom: 15px !important;
        border-radius: 8px !important;
    }
    
    .card h3 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    /* 账号设置区域 */
    #tab-account .card > div[style*="background"] {
        padding: 15px 10px !important;
    }
    
    #tab-account .card > div > div > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 10px 0 !important;
    }
    
    #tab-account .card span[style*="width: 100px"] {
        width: auto !important;
        margin-bottom: 5px !important;
        font-size: 13px !important;
        color: #999 !important;
    }
    
    /* 修改密码/修改手机按钮 */
    #tab-account .btn-sm {
        margin-left: 0 !important;
        margin-top: 8px !important;
        width: auto !important;
        min-width: 100px !important;
        max-width: 120px !important;
        padding: 7px 12px !important;
        font-size: 13px !important;
    }
    
    /* 员工管理标题栏 */
    #tab-staff > .card > div[style*="justify-content"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 15px !important;
    }
    
    #tab-staff > .card > div h3 {
        margin-bottom: 0 !important;
    }
    
    /* 添加员工按钮 */
    #tab-staff .btn-success {
        width: 100% !important;
        padding: 10px !important;
        font-size: 14px !important;
        margin: 0 !important;
        min-height: 42px !important;
    }
    
    /* 表单组 */
    .form-group {
        margin-bottom: 15px !important;
    }
    
    .form-group label {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100% !important;
        padding: 10px 12px !important;
        font-size: 15px !important;
        border-radius: 6px !important;
    }
    
    .form-group .btn {
        padding: 10px !important;
        font-size: 14px !important;
        min-height: 42px !important;
    }
    
    /* 员工卡片 */
    .staff-card {
        display: flex !important;
        flex-direction: column !important;
        padding: 15px !important;
        gap: 12px !important;
        grid-template-columns: none !important;
    }
    
    .staff-info {
        display: flex;
        flex-direction: column;
        gap: 8px;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 12px;
    }
    
    .staff-info-row {
        display: flex;
        justify-content: space-between;
        font-size: 14px;
        padding: 4px 0;
    }
    
    .staff-info-label {
        color: #666;
        font-weight: 500;
        flex-shrink: 0;
        margin-right: 10px;
    }
    
    .staff-info-value {
        color: #333;
        text-align: right;
        word-break: break-all;
    }
    
    /* 员工操作按钮 */
    .staff-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 10px !important;
    }
    
    .staff-actions .btn {
        width: 100% !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
        margin: 0 !important;
        min-height: 40px !important;
    }
    
    /* 角色卡片 */
    .role-card {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .role-card h4 {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }
    
    .role-description {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }
    
    /* 权限列表 */
    .permissions-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .permission-item {
        padding: 10px !important;
        font-size: 13px !important;
        border-radius: 6px;
    }
    
    /* 个人信息表单 */
    .profile-form .form-row {
        display: flex;
        flex-direction: column !important;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .profile-form .form-col {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    /* 统计卡片（如果有） */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    /* 操作按钮组 */
    .action-buttons {
        display: flex !important;
        /* flex-direction: column !important; */
        gap: 8px !important;
        width: 100% !important;
    }
    
    .action-buttons .btn {
        width: auto !important;
        flex: 1 !important;
        padding: 10px !important;
        font-size: 14px !important;
        min-height: 42px !important;
    }
    
    /* 模态框表单 */
    .modal-form .form-group {
        margin-bottom: 15px !important;
    }
    
    .modal-form input,
    .modal-form select {
        width: 100% !important;
        padding: 10px 12px !important;
        font-size: 15px !important;
    }
    
    /* 模态框按钮组 */
    .modal-content form > div[style*="display: flex"],
    .modal-content form > div[style*="gap: 10px"] {
        display: flex !important;
        gap: 8px !important;
        margin-top: 15px !important;
    }
    
    .modal-content form > div .btn {
        flex: 1 !important;
        padding: 10px !important;
        font-size: 14px !important;
        min-height: 42px !important;
    }
    
    /* 密码强度指示器 */
    .password-strength {
        font-size: 12px !important;
        margin-top: 5px !important;
    }
    
    /* 成功/错误提示 */
    .alert {
        padding: 12px !important;
        font-size: 14px !important;
        border-radius: 6px !important;
        margin-bottom: 15px !important;
    }
    
    /* 订阅信息卡片 */
    .subscription-card {
        padding: 15px !important;
        border-radius: 8px !important;
        margin-bottom: 15px !important;
    }
    
    .subscription-card h4 {
        font-size: 16px !important;
    }
    
    .subscription-status {
        font-size: 14px !important;
        padding: 8px 12px !important;
    }
    
    /* 续费码输入区域 */
    .renewal-code-input {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .renewal-code-input input {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    .renewal-code-input .btn {
        width: 100% !important;
    }
}

/* ==========================================
   33. 系统管理页面平板端优化（768px - 1024px）
   ========================================== */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .admin-container {
        padding: 15px !important;
    }
    
    /* 标签页 */
    .tabs {
        gap: 8px !important;
    }
    
    .tab {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    
    /* 员工卡片 */
    .staff-card {
        display: grid !important;
        grid-template-columns: 2fr 1fr 1fr !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    
    .staff-info {
        grid-column: 1 / -1;
    }
    
    .staff-actions {
        grid-column: 1 / -1;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .staff-actions .btn {
        flex: 1 !important;
        min-width: 120px !important;
    }
    
    /* 表单两列布局 */
    .profile-form .form-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 15px !important;
    }
    
    .profile-form .form-col {
        flex: 1 !important;
    }
    
    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

/* ==========================================
   34. 商品管理页面（products.html）移动端优化
   ========================================== */

@media screen and (max-width: 768px) {
    /* 页面头部 */
    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 15px 10px !important;
        gap: 12px !important;
    }
    
    .page-title {
        font-size: 20px !important;
    }
    
    /* 工具栏 - 单行平行布局 */
    .toolbar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: 100% !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
        overflow-x: visible !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* 搜索框 - 在工具栏中 */
    .search-box {
        display: flex !important;
        flex-direction: row !important;
        flex: 1 !important;
        gap: 6px !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        min-width: 0 !important;
        margin: 0 !important;
    }
    
    .search-box input {
        flex: 1 !important;
        min-width: 100px !important;
        height: 42px !important;
        padding: 0 10px !important;
        font-size: 13px !important;
        border-radius: 4px !important;
        box-sizing: border-box !important;
        line-height: normal !important;
        border: 1px solid #ddd !important;
        margin: 0 !important;
        vertical-align: middle !important;
        align-self: center !important;
    }
    
    /* 工具栏内所有按钮 - 统一样式 */
    .toolbar button,
    .toolbar .btn {
        flex-shrink: 0 !important;
        height: 42px !important;
        width: 60px !important;
        padding: 0 !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        border-radius: 4px !important;
        box-sizing: border-box !important;
        line-height: normal !important;
        border: none !important;
        margin: 0 !important;
        vertical-align: middle !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        align-self: center !important;
    }
    
    /* 产品列表容器 */
    .product-list {
        margin-bottom: 15px !important;
    }
    
    /* 产品列表项 */
    .product-item {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        padding: 12px !important;
        border-radius: 8px !important;
        margin-bottom: 10px !important;
        background: white !important;
        border: 1px solid #e9ecef !important;
    }
    
    /* 第1行：产品名称 + 批号（不换行，水平布局） */
    .product-item > div:nth-child(1) {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        padding-bottom: 8px !important;
       /* border-bottom: 1px solid #e9ecef !important;
        margin-bottom: 8px !important; */
    }
    
    .product-name {
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #333 !important;
        flex: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.3 !important;
    }
    
    .product-item > div:nth-child(1) > span:last-child,
    .product-batch {
        font-size: 12px !important;
        color: #999 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        margin-left: 10px !important;
    }
    
    /* 第2行：型号 + 组件 + 总库存（水平布局） */
    .product-item > div:nth-child(2) {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid #f5f5f5 !important;
        margin-bottom: 8px !important;
        flex-wrap: wrap !important;
    }
    
    .product-item > div:nth-child(2) > span,
    .product-model,
    .product-component,
    .product-stock {
        font-size: 13px !important;
        color: #666 !important;
        white-space: nowrap !important;
    }
    
    .product-item > div:nth-child(2) > span > strong,
    .product-item > div:nth-child(2) strong {
        color: #333 !important;
        font-weight: 600 !important;
    }
    
    /* 第3行：操作按钮 - 水平平行布局 */
    .product-item > div:nth-child(3),
    .product-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
    }
    
    .product-actions .btn,
    .product-actions .btn-small,
    .product-item > div:nth-child(3) .btn {
        flex: 1 !important;
        padding: 10px 6px !important;
        font-size: 12px !important;
        margin: 0 !important;
        min-height: 38px !important;
        white-space: nowrap !important;
        border-radius: 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 规格行（添加产品页面）- 垂直排列 */
    .spec-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        /* align-items: stretch !important; */
        margin-bottom: 5px !important;
        padding: 2px !important;
        background: #f8f9fa !important;
        border-radius: 8px !important;
        border: 1px solid #e9ecef !important;
    }
    
    .spec-row input[name="spec"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 10px !important;
        font-size: 14px !important;
    }
    
    .spec-row input[name="quantity"],
    .spec-row input[name="costPrice"],
    .spec-row input[name="salePrice"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 10px !important;
        font-size: 14px !important;
    }
    
    .spec-row .remove-btn {
        width: 100% !important;
        padding: 10px !important;
        font-size: 14px !important;
        margin: 0 !important;
    }
    
    /* 组件配置区域 */
    .component-section {
        padding: 8px !important;
    }
    
    /* 隐藏组件部分的提示文字（保留其他提示） */
    .form-group:has(.component-section) .hint-text {
        display: none !important;
    }
    
    .component-item {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
        padding: 8px !important;
        background: #f8f9fa !important;
        border-radius: 6px !important;
        border: 1px solid #e0e0e0 !important;
        align-items: center !important;
    }
    
    /* 组件序号圆圈 */
    .component-item .component-index {
        order: 1 !important;
        flex-shrink: 0 !important;
        width: 26px !important;
        height: 26px !important;
        font-size: 13px !important;
    }
    
    /* 组件名称输入框 - 占满剩余宽度 */
    .component-item .component-input {
        order: 2 !important;
        flex: 1 !important;
        min-width: 120px !important;
        padding: 8px !important;
        font-size: 14px !important;
        height: 38px !important;
        box-sizing: border-box !important;
    }
    
    /* 隐藏数量输入框 */
    .component-item .component-quantity {
        display: none !important;
    }
    
    /* 区分规格 checkbox 和文字 */
    .component-item label {
        order: 3 !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        font-size: 12px !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
    }
    
    .component-item label input[type="checkbox"] {
        margin: 0 !important;
        width: 16px !important;
        height: 16px !important;
    }
    
    /* 隐藏"将显示为"提示词 */
    .component-item .component-preview {
        display: none !important;
    }
    
    /* 删除按钮 */
    .component-item .remove-btn {
        order: 4 !important;
        flex-shrink: 0 !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
        height: 32px !important;
        line-height: normal !important;
    }
    
    /* 添加组件按钮 */
    .component-section + button.add-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
        margin-top: 8px !important;
    }
    
    /* 颜色规格区域 */
    .color-variant-section {
        padding: 12px !important;
        margin-bottom: 15px !important;
    }
    
    .specs-container {
        margin-left: 0 !important;
    }
    
    /* 添加规格按钮 */
    .add-spec-btn,
    .add-btn {
        width: 100% !important;
        padding: 12px !important;
        font-size: 14px !important;
    }
    
    /* 库存明细表格 */
    .inventory-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 10px 0;
    }
    
    .inventory-table table {
        min-width: 600px;
        font-size: 12px !important;
    }
    
    .inventory-table th,
    .inventory-table td {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
    
    /* 变体卡片 */
    .variant-card {
        padding: 12px !important;
        margin-bottom: 10px !important;
        border-radius: 8px;
        background: #f8f9fa;
    }
    
    .variant-info {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-size: 13px;
    }
    
    .variant-info-row {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
    }
    
    /* 二维码模态框 */
    .qrcode-modal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        max-height: 100vh !important;
    }
    
    .qrcode-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 10px !important;
    }
    
    .qrcode-item {
        padding: 15px !important;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .qrcode-item img {
        max-width: 200px !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    .qrcode-info {
        font-size: 13px !important;
        margin-top: 10px !important;
    }
    
    /* 添加商品表单 */
    .add-product-form .form-row {
        display: flex;
        flex-direction: column !important;
        gap: 15px;
    }
    
    .add-product-form .form-col {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    .add-product-form input,
    .add-product-form select,
    .add-product-form textarea {
        width: 100% !important;
        padding: 12px !important;
        font-size: 15px !important;
    }
    
    /* 组件列表 */
    .component-list {
        margin-top: 15px !important;
    }
    
    .component-item {
        padding: 12px !important;
        margin-bottom: 10px !important;
        border-radius: 8px;
        background: #f8f9fa;
    }
    
    .component-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-top: 10px !important;
    }
    
    .component-actions .btn {
        width: 100% !important;
        padding: 10px !important;
        font-size: 14px !important;
    }
    
    /* 批量操作按钮 */
    .batch-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 15px !important;
    }
    
    .batch-actions .btn {
        width: 100% !important;
        padding: 12px !important;
        font-size: 15px !important;
    }
    
    /* 分页 */
    .pagination {
        flex-wrap: wrap !important;
        gap: 5px !important;
        justify-content: center !important;
        padding: 15px 10px !important;
    }
    
    .pagination .btn {
        min-width: 40px !important;
        padding: 8px !important;
        font-size: 14px !important;
        width: auto !important;
    }
}

/* ==========================================
   35. 开单页面（inventory.html）移动端优化
   ========================================== */

@media screen and (max-width: 768px) {
    /* 基础容器设置 */
    body {
        background-color: #f5f7fa !important;
        padding: 2px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .container {
        padding: 0 !important;
        margin: 0 !important;
        min-width: 320px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .content {
        padding: 15px 10px !important;
        border-radius: 8px !important;
    }
    
    /* 固定工具栏 */
    .fixed-toolbar {
        padding: 15px !important;
        margin: -15px -10px 15px -10px !important;
        background: white !important;
        border-radius: 0 0 10px 10px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    }
    
    .header-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    /* 搜索栏 */
    .search-bar {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        align-items: center !important;
    }

    .search-group {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        align-items: center !important;
        flex: 1 1 0;
        width:100% !important;
    }

    .search-group .search-btn {
        width: 66px !important;
        min-width: 62px !important;
        max-width: 70px;
        padding: 0 !important;
        font-size: 14px !important;
        height: 42px !important;
        border-radius: 8px !important;
        background: #4a6cf7 !important;
        color: white !important;
        font-weight: 500 !important;
        border: none !important;
        flex-shrink: 0 !important;
    }

    .search-group .search-input {
        flex: 1 1 0 !important;
        padding: 10px 12px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
        border: 1px solid #ddd !important;
        background-color: #fff !important;
        height: 42px !important;
        box-sizing: border-box !important;
    }
    
    .search-bar label {
        font-size: 14px !important;
        color: #555 !important;
        font-weight: 500 !important;
        flex: 0 0 10px !important;
    }
    
    .product-select, .search-input {
        flex: 1 1 calc(100% - 100px) !important;
        padding: 10px 12px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
        border: 1px solid #ddd !important;
        background-color: #fff !important;
        height: 42px !important;
    }
    
    .search-btn {
        width: 80px !important;
        padding: 10px 0 !important;
        font-size: 14px !important;
        height: 42px !important;
        border-radius: 8px !important;
        background: #4a6cf7 !important;
        color: white !important;
        font-weight: 500 !important;
        border: none !important;
    }
    
    /* 工具栏按钮 */
    .toolbar-buttons {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 5px 0 !important;
        margin-top: 10px !important;
    }
    
    .toolbar-buttons .btn {
        flex-shrink: 0 !important;
        padding: 10px 15px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
        min-width: auto !important;
        height: 42px !important;
        border-radius: 8px !important;
        font-weight: 500 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    }
    
    .toolbar-buttons .btn:active {
        transform: translateY(1px) !important;
        box-shadow: 0 1px 1px rgba(0,0,0,0.03) !important;
    }
    
    /* 操作行 - 新建商户和立即开单按钮 */
    .action-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        padding: 10px 0 !important;
        overflow-x: auto !important;
        margin: 10px 0 !important;
    }
    
    .action-row .btn {
        padding: 10px 0 !important;
        font-size: 14px !important;
        flex-shrink: 0 !important;
        width: 100px !important;
        flex-grow: 0 !important;
        background: linear-gradient(to bottom, #ffffff, #f5f5f5) !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        color: #495057 !important;
        font-weight: 500 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
        white-space: nowrap !important;
    }
    
    .action-row .btn.btn-success {
        background: linear-gradient(to bottom, #28a745, #218838) !important;
        color: white !important;
        border-color: #1e7e34 !important;
    }
    
    .action-row .btn:active {
        transform: translateY(1px) !important;
        box-shadow: 0 1px 1px rgba(0,0,0,0.03) !important;
    }
    
    /* 产品详情卡片 */
    .variant-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .variant-card {
        padding: 15px !important;
        border-radius: 10px !important;
        background: white !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
        border: 1px solid #eee !important;
    }
    
    .variant-header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 10px !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }
    
    .variant-info {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    .variant-name {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin-bottom: 5px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    
    .variant-meta {
        font-size: 13px !important;
        color: #666 !important;
    }
    
    .variant-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        margin-top: 5px !important;
    }
    
    .variant-actions .btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: 500 !important;
    }
    
    /* 订单列表 */
    .order-item {
        padding: 15px !important;
        margin-bottom: 12px !important;
        background: white !important;
        border-radius: 10px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    }
    
    .order-header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        margin-bottom: 12px !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid #f0f0f0 !important;
        flex-wrap: wrap !important;
    }
    
    .order-title {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #333 !important;
        flex: 1 !important;
    }
    
    .order-status {
        font-size: 12px !important;
        padding: 4px 10px !important;
        border-radius: 20px !important;
        background: #f8f9fa !important;
        color: #495057 !important;
        font-weight: 500 !important;
    }
    
    .order-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    
    .order-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    .order-actions .btn {
        width: 100% !important;
        padding: 10px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: 500 !important;
    }
    
    .order-actions .btn:active {
        transform: translateY(1px) !important;
    }
}

/* ==========================================
   36. 商户管理开单页面（orders.html）移动端优化
   ========================================== */

@media screen and (max-width: 768px) {
    /* orders.html 表单操作按钮工具栏 */
    .form-actions-toolbar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .form-actions-toolbar .btn {
        flex-shrink: 0 !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        min-width: auto !important;
        width: auto !important;
    }
    
    /* orders.html 表单按钮 */
    .order-form .form-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
    }
    
    .order-form .form-actions .btn {
        flex-shrink: 0 !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        min-width: auto !important;
        width: auto !important;
    }
    
    .order-form .form-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    /* 新建商户弹窗 */
    #newMerchantPromptModal > div {
        padding: 15px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    
    #newMerchantPromptModal h2 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    #newMerchantPromptModal input {
        font-size: 16px !important;
        padding: 12px !important;
    }
    
    #newMerchantPromptModal label {
        font-size: 14px !important;
    }
    
    #newMerchantPromptModal button {
        font-size: 14px !important;
        padding: 10px 20px !important;
        min-width: 80px !important;
    }
}

/* ==========================================
   37. 查询库存页面（stock.html）移动端优化
   ========================================== */

@media screen and (max-width: 768px) {
    /* 页面容器 */
    .stock-container {
        padding: 10px !important;
        margin: 0 !important;
    }
    
    /* 隐藏页面标题 */
    .stock-page-header h2 {
        display: none !important;
    }
    
    /* 搜索栏容器调整 */
    .stock-page-header {
        padding: 10px 15px !important;
        margin-bottom: 10px !important;
        display: flex !important;
        justify-content: flex-start !important;
    }
    
    /* 搜索栏 - 水平排列，按钮更紧凑 */
    .stock-search-bar {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        max-width: 100% !important;
    }
    
    .stock-search-bar input {
        flex: 0 1 auto !important;
        width: 185px !important;
        max-width: 185px !important;
        min-width: 145px !important;
        padding: 10px 12px !important;
        font-size: 14px !important;
        border: 1px solid #ddd !important;
        border-radius: 5px !important;
        height: 42px !important;
        line-height: 20px !important;
        box-sizing: border-box !important;
    }
    
    /* 按钮更紧凑 - 只占据内容宽度，与输入框同高度 */
    .stock-search-bar .btn {
        flex-shrink: 0 !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
        line-height: 20px !important;
        white-space: nowrap !important;
        min-width: auto !important;
        width: auto !important;
        height: 42px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    
    /* 库存卡片 */
    .stock-card {
        padding: 12px !important;
        margin-bottom: 10px !important;
    }
    
    .stock-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .stock-title {
        font-size: 16px !important;
    }
    
    .stock-model {
        font-size: 13px !important;
    }
    
    /* 库存详情表格 */
    .stock-table {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .stock-table table {
        min-width: 600px !important;
        font-size: 13px !important;
    }
    
    .stock-table th,
    .stock-table td {
        padding: 8px 6px !important;
        font-size: 13px !important;
    }
    
    /* 统计信息 */
    .stock-summary {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        padding: 12px !important;
    }
    
    .summary-item {
        padding: 10px !important;
        text-align: center !important;
    }
    
    .summary-label {
        font-size: 12px !important;
    }
    
    .summary-value {
        font-size: 18px !important;
    }
}

/* ==========================================
   38. 商品管理页面平板端优化（768px - 1024px）
   ========================================== */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* 页面头部 */
    .page-header {
        gap: 15px !important;
    }
    
    /* 工具栏 */
    .toolbar {
        flex-wrap: wrap !important;
    }
    
    .search-box {
        min-width: 300px !important;
    }
    
    /* 产品列表项 */
    .product-item {
        display: grid !important;
        grid-template-columns: 2fr 1fr 1fr 180px !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    
    .product-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .product-actions .btn {
        flex: 1 !important;
        min-width: 80px !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    /* 二维码网格 */
    .qrcode-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    /* 表单两列布局 */
    .add-product-form .form-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 15px !important;
    }
}


/* ==========================================
   通用底部间距规则 - 避免被底部导航栏遮挡
   ========================================== */

@media screen and (max-width: 768px) {
    /* 为所有页面添加底部间距，避免内容被底部导航栏遮挡 */
    /* 适配微信内置浏览器和苹果手机返回条 */
    html {
        padding-bottom: 0 !important;
    }
    
    body {
        padding-bottom: 150px !important; /* 底部导航栏60px + 微信浏览器和苹果返回条90px */
        min-height: 100vh;
    }
    
    /* 确保所有主要容器都有足够的底部间距 */
    .page-container,
    .content-wrapper,
    .main-wrapper,
    .page-content,
    #app,
    #root {
        padding-bottom: 150px !important;
    }
    
    /* 表格容器底部间距 */
    .table-container:last-child,
    .data-table-container:last-child {
        margin-bottom: 150px !important;
    }
    
    /* 卡片列表底部间距 */
    .card-list > .card:last-child,
    .product-list > .product-card:last-child {
        margin-bottom: 150px !important;
    }
    
    /* 表单底部间距 */
    form {
        padding-bottom: 50px !important;
    }
    
    /* 固定底部按钮栏的位置调整 */
    .fixed-bottom-bar,
    .fixed-bottom-btn,
    .action-bar-fixed {
        bottom: 60px !important; /* 在底部导航栏上方 */
    }
}

/* ==========================================
   所有页面自动适配屏幕高度 - 贴近底部导航栏
   ========================================== */

@media screen and (max-width: 768px) {
    /* 强制所有页面body使用flex布局 */
    body {
        padding-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 100vh !important;
    }
    
    /* 所有容器自动延伸 */
    .container,
    .main-container,
    .page-container,
    .content-wrapper {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: 0 !important;
        min-height: calc(100vh - 60px) !important; /* 视口高度减去底部导航栏 */
    }
    
    /* 特殊页面容器 - 自动延伸 */
    .stock-container,
    .shipment-container,
    .products-container,
    .customers-container,
    .billing-container,
    .reports-container,
    .admin-container,
    .subscription-container {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: 0 !important;
        min-height: calc(100vh - 60px) !important;
    }
    
    /* 列表容器自动延伸 */
    .shipment-list,
    .stock-list,
    .product-list,
    .customer-list,
    .order-list {
        flex: 1 !important;
        padding-bottom: 50px !important; /* 为底部导航留出空间 */
    }
}

/* ==========================================
   出货单管理页面手机端优化
   ========================================== */

@media screen and (max-width: 768px) {
    /* 出货单页面容器 */
    .shipment-container {
        padding-bottom: 50px !important;
        padding-top: 0 !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    /* 出货单页面头部 - 粘性定位 */
    .shipment-container .page-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 1001 !important;
        background: white !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        margin: 0 !important;
    }
    
    /* 快捷日期按钮 - 粘性定位 */
    .shipment-container .quick-date-buttons {
        position: sticky !important;
        top: 80px !important;
        z-index: 1000 !important;
        background: white !important;
        margin: 0 !important;
        padding: 4px 8px !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    }
    
    /* 出货单列表 */
    .shipment-list {
        padding-top: 0 !important;
        padding-bottom: 80px !important;
        margin-top: 0 !important;
    }
    
    /* 最后一个订单卡片额外间距 */
    .shipment-card:last-child {
        margin-bottom: 20px !important;
    }
    
    /* 出货单页面标题 */
    .shipment-container .page-title {
        font-size: 13px !important;
    }
    
    /* 出货单搜索栏布局 */
    .shipment-container .search-bar {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        align-items: center !important;
    }
    
    /* 日期标签 */
    .shipment-container .search-bar label {
        font-size: 12px !important;
        white-space: nowrap !important;
        color: #333 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    
    /* 日期选择器 */
    .shipment-container .search-bar input[type="date"] {
        height: 29px !important;
        font-size: 13px !important;
        padding: 4px 6px !important;
        width: 105px !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
    }
    
    /* 搜索框 - 占据第二行大部分空间 */
    .shipment-container .search-bar input[type="text"] {
        height: 31px !important;
        font-size: 13px !important;
        padding: 4px 8px !important;
        box-sizing: border-box !important;
        width: calc(100% - 56px) !important; /* 总宽度减去按钮和间距 */
        flex: 0 0 auto !important;
    }
    
    /* 搜索按钮 - 固定宽度，紧跟搜索框 */
    .shipment-container .search-bar button {
        height: 31px !important;
        padding: 4px 8px !important;
        font-size: 13px !important;
        width: 50px !important;
        flex: 0 0 auto !important;
    }
}

/* ==========================================
   报表统计页面手机端优化
   ========================================== */

@media screen and (max-width: 768px) {
    /* 报表页面容器 */
    .container {
        padding: 0px !important;
    }
    
    /* 订单明细标题 */
    .card h3 {
        margin: 0 0 15px 0 !important;
        font-size: 14px !important;
    }
    
    /* 客户选择栏 - 下拉框和导出按钮 */
    .customer-select-bar {
        display: flex !important;
        gap: 6px !important;
        align-items: stretch !important;
        margin-bottom: 15px !important;
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .customer-select {
        flex: 1 !important;
        padding: 6px 8px !important;
        font-size: 13px !important;
        border: 1px solid #ddd !important;
        border-radius: 6px !important;
        background: white !important;
        height: 44px !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    .customer-select-bar .btn-success {
        padding: 0 8px !important;
        font-size: 11px !important;
        height: 34px !important;
        line-height: 34px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        width: auto !important;
        min-width: 60px !important;
        max-width: 80px !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 统计数据卡片 - 优化高度 */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin-bottom: 15px !important; /* 增加底部间距，避免遮挡客户标签 */
    }
    
    .stat-card {
        padding: 8px !important;
        min-height: auto !important;
    }
    
    .stat-label {
        font-size: 11px !important;
        margin-bottom: 4px !important;
    }
    
    .stat-value {
        font-size: 16px !important;
    }
    
    /* 筛选栏优化 */
    .filter-bar {
        padding: 8px !important;
        margin-bottom: 15px !important;
        background: white !important;
        border-radius: 8px !important;
    }
    
    /* 第一行：统计周期按钮 */
    .period-buttons {
        display: flex !important;
        gap: 4px !important;
        margin-bottom: 8px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .period-btn {
        flex: 1 !important;
        padding: 6px 8px !important;
        font-size: 12px !important;
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        background: white !important;
        color: #333 !important;
        cursor: pointer !important;
        white-space: nowrap !important;
        transition: all 0.3s !important;
        min-width: 0 !important;
    }
    
    .period-btn.active {
        background: #667eea !important;
        color: white !important;
        border-color: #667eea !important;
    }
    
    /* 第二行：日期选择 */
    .date-row {
        display: flex !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
    }
    
    .date-group {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }
    
    .date-group label {
        font-size: 11px !important;
        color: #666 !important;
        margin: 0 !important;
    }
    
    .date-group input[type="date"] {
        width: 100% !important;
        height: 32px !important;
        padding: 4px 6px !important;
        font-size: 12px !important;
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        box-sizing: border-box !important;
    }
    
    /* 第三行：查询和重置按钮 */
    .action-buttons {
        display: flex !important;
        gap: 6px !important;
    }
    
    .action-buttons .btn {
        flex: 1 !important;
        height: 32px !important;
        padding: 4px 8px !important;
        font-size: 13px !important;
        border-radius: 4px !important;
    }
}

/* ==========================================
   移除sticky定位 - 防止元素遮挡
   ========================================== */

@media screen and (max-width: 768px) {
    /* 移除所有sticky定位，防止元素遮挡 */
    .page-header,
    .quick-date-buttons,
    .filter-bar,
    .customer-tabs {
        position: relative !important;
        top: auto !important;
        z-index: auto !important;
    }
}

    /* 订单明细卡片 - 移除左右间距 */
    .card {
        padding: 10px 0 !important;
        margin: 0 !important;
    }
    
    .card h3 {
        padding: 0 10px !important;
    }
    
    /* 订单明细表格容器 - 移除左右间距 */
    .orders-table,
    #orders-table {
        padding: 0 !important;
        margin: 0 !important;
    }

/* ==========================================
   账单统计页面手机端优化
   ========================================== */

@media screen and (max-width: 768px) {
    /* 账单容器 */
    .billing-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* 防止所有子元素超出屏幕 */
    .billing-container * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 页面头部 */
    .billing-container .page-header {
        padding: 10px !important;
        margin-bottom: 10px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .billing-container .page-header h2 {
        font-size: 16px !important;
        margin: 0 !important;
    }
    
    /* 日期筛选区域 - 开始和结束日期在一行 */
    .date-filter {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        align-items: center !important;
    }
    
    .date-filter input[type="date"] {
        flex: 1 !important;
        min-width: 0 !important;
        height: 34px !important;
        padding: 6px 8px !important;
        font-size: 13px !important;
        border: 1px solid #ddd !important;
        border-radius: 6px !important;
        box-sizing: border-box !important;
    }
    
    .date-filter span {
        font-size: 12px !important;
        color: #666 !important;
        padding: 0 4px !important;
        flex-shrink: 0 !important;
    }
    
    /* 按钮容器 - 第二行 */
    .date-filter-buttons {
        display: flex !important;
        gap: 6px !important;
        width: 100% !important;
        flex-basis: 100% !important;
    }
    
    .date-filter button {
        flex: 1 !important;
        height: 34px !important;
        padding: 6px 8px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }
    
    /* 统计卡片 */
    .stats-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }
    
    .stat-card {
        padding: 10px !important;
        border-radius: 8px !important;
    }
    
    .stat-card .label {
        font-size: 11px !important;
        margin-bottom: 4px !important;
    }
    
    .stat-card .value {
        font-size: 16px !important;
    }
    
    .stat-card .unit {
        font-size: 10px !important;
    }
    
    /* 商户网格 */
    .merchant-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .merchant-card {
        padding: 10px !important;
    }
    
    /* 账单表格容器 - 允许横向滚动但不影响页面 */
    .billing-table-container {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 -8px !important; /* 负边距让表格贴边 */
        padding: 0 8px !important;
    }
    
    .billing-table {
        min-width: 600px !important;
        width: auto !important;
        font-size: 12px !important;
    }
    
    .billing-table th,
    .billing-table td {
        padding: 8px 6px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }
    
    /* 过滤栏 */
    .filter-bar {
        padding: 8px !important;
        margin-bottom: 10px !important;
    }
    
    .filter-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }
    
    .form-group {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    .form-group label {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }
    
    .form-group input,
    .form-group select {
        width: 100% !important;
        height: 34px !important;
        padding: 6px 8px !important;
        font-size: 13px !important;
        box-sizing: border-box !important;
    }
    
    /* 按钮行 */
    .button-row {
        display: flex !important;
        gap: 6px !important;
        margin-top: 6px !important;
    }
    
    .button-row .btn {
        flex: 1 !important;
        height: 34px !important;
        padding: 6px 8px !important;
        font-size: 13px !important;
    }
}

    /* 商品统计和导出按钮 - 同一行显示 */
    .billing-container div[style*="margin-bottom: 20px"][style*="display: flex"] {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        margin-bottom: 10px !important;
    }
    
    /* 强制标签页内的标题和按钮横向排列（排除billing-list和time-filter-buttons） */
    .billing-container .tab-content > div:first-child:not(.billing-list):not(.time-filter-buttons),
    .tab-content > div[style*="display: flex"]:not(.billing-list):not(.time-filter-buttons),
    #products-tab > div:first-child {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        margin-bottom: 10px !important;
        text-align: left !important;
    }
    
    /* billing-list必须垂直排列 */
    .billing-list,
    #merchant-list,
    #merchants-tab > .billing-list {
        display: block !important;
        flex-direction: column !important;
    }
    
    /* 确保h3和按钮在同一行 */
    .tab-content > div:first-child:not(.billing-list) > h3,
    #products-tab > div:first-child > h3 {
        flex: 0 0 auto !important;
        margin: 0 !important;
        text-align: left !important;
    }
    
    .tab-content > div:first-child:not(.billing-list) > button,
    #products-tab > div:first-child > button {
        flex: 0 0 auto !important;
        margin: 0 !important;
    }
    
    .billing-container h3,
    .tab-content h3 {
        margin: 0 !important;
        font-size: 13px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    /* 导出按钮样式优化 */
    .export-btn {
        padding: 4px 8px !important;
        font-size: 11px !important;
        height: 28px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        border-radius: 4px !important;
    }
    
    .export-btn span {
        display: inline !important;
    }
    
    /* 标签页按钮样式 - 橙色主题 */
    .tabs {
        display: flex !important;
        gap: 6px !important;
        margin-bottom: 15px !important;
        padding: 8px !important;
        background: white !important;
        border-radius: 8px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .tab {
        padding: 6px 12px !important;
        font-size: 12px !important;
        flex-shrink: 0 !important;
        border-radius: 16px !important;
        background: #f5f5f5 !important;
        border: 1px solid #e0e0e0 !important;
        color: #666 !important;
        cursor: pointer !important;
        transition: all 0.3s !important;
    }
    
    .tab.active {
        background: #ff9800 !important;
        color: white !important;
        border-color: #ff9800 !important;
        font-weight: 600 !important;
    }
}

/* ==========================================
   库存页面（快速开单）手机端优化
   ========================================== */

@media screen and (max-width: 768px) {
    /* 库存页面容器 */
    .container {
        padding: 8px !important;
        padding-bottom: 70px !important;
    }
    
    .content {
        padding: 10px !important;
    }
    
    /* 规格表格 - 保持原布局，只优化间距 */
    .variant-table tbody tr,
    table tbody tr {
        border-bottom: 1px solid #e9ecef !important;
    }
    
    /* 规格单元格 - 缩小padding */
    .variant-table tbody td,
    table tbody td {
        padding: 6px 4px !important;
        font-size: 13px !important;
    }
    
    /* checkbox */
    .variant-checkbox {
        width: 18px !important;
        height: 18px !important;
    }
    
    /* 颜色区域间距 */
    .color-section {
        margin-bottom: 10px !important;
    }
    
    /* 表格容器 */
    .variant-table,
    .color-section table {
        margin-bottom: 10px !important;
    }
    
    /* 底部间距 - 保持与导航栏一致 */
    body {
        padding-bottom: 70px !important;
    }
    
    /* 产品详情最后元素底部间距 */
    .product-details > *:last-child,
    .color-section:last-child {
        margin-bottom: 15px !important;
    }
}

/* ==========================================
   产品管理页面手机端优化
   ========================================== */

@media screen and (max-width: 768px) {
    /* 外部不滚动 */
    html, body {
        overflow-x: hidden !important;
    }
    
    /* 产品列表容器 */
    .product-list {
        overflow: visible !important;
        height: auto !important;
    }
    
    /* 产品项 */
    .product-item {
        padding: 12px !important;
    }
    
    /* 页面头部 - 固定在顶部 */
    .page-header {
       /* position: fixed !important; */
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        padding: 10px !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        background: white !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        flex-wrap: wrap !important;
    }
    
    .page-title {
        font-size: 16px !important;
    }
    
    /* 工具栏 */
    .toolbar {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    .search-box {
        width: 100% !important;
        flex-wrap: nowrap !important;
    }
    
    .search-box input {
        min-width: 0 !important;
        flex: 1 !important;
    }
    
    .search-box button,
    .toolbar > button {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }
    
    /* 产品列表 - 为固定头部留出空间 */
    .product-list {
        padding-top: 70px !important;
        margin-top: 0 !important;
    }
    
    /* 产品项 */
    .product-item:first-child {
        margin-top: 0 !important;
    }
    
    /* 库存明细表格 - 内部横向滚动 */
    .stock-details,
    .inventory-details,
    .variant-details,
    .table-container,
    .stock-table-wrapper {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 -10px !important;
        padding: 0 10px !important;
    }
    
    .stock-details table,
    .inventory-details table,
    .variant-details table {
        min-width: 600px !important;
        width: auto !important;
    }
    
    .stock-details th,
    .stock-details td,
    .inventory-details th,
    .inventory-details td {
        padding: 8px 6px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }
}
