* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
        }
        body {
            background-color: #f8fafc;
            padding: 20px;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        h1 {
            text-align: center;
            color: #1e293b;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 2px solid #3b82f6;
            font-weight: 600;
            font-size: 28px;
        }
        
        /* 头部区域样式 */
        .header-section {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 2px solid #3b82f6;
            flex-wrap: wrap;
            gap: 15px;
        }
        
        .header-title {
            margin: 0;
            text-align: left;
            color: #1e293b;
            font-weight: 600;
            font-size: 28px;
            flex: 1;
            min-width: 200px;
        }
        
        .header-actions {
            display: flex;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;
        }
        
        .user-info {
            color: #64748b;
            font-size: 14px;
            white-space: nowrap;
        }
        
        .logout-btn {
            padding: 8px 16px;
            font-size: 14px;
            white-space: nowrap;
        }
        .tabs {
            display: flex;
            margin-bottom: 25px;
            border-bottom: 1px solid #e2e8f0;
        }
        .tab {
            padding: 12px 24px;
            cursor: pointer;
            border: none;
            background: none;
            font-size: 16px;
            color: #64748b;
            position: relative;
            transition: all 0.3s ease;
        }
        .tab:hover {
            color: #3b82f6;
        }
        .tab.active {
            color: #3b82f6;
            font-weight: 600;
        }
        .tab.active::after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: #3b82f6;
        }
        .panel {
            display: none;
        }
        .panel.active {
            display: block;
        }
        .form-group {
            margin-bottom: 20px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            color: #334155;
            font-weight: 600;
            font-size: 14px;
        }
        
        /* 中等屏幕优化 */
        @media (max-width: 1024px) and (min-width: 769px) {
            .container {
                padding: 24px;
            }
            
            h1 {
                font-size: 24px;
            }
            
            .header-title {
                font-size: 24px;
            }
            
            .tab {
                font-size: 15px;
                padding: 10px 18px;
            }
            
            .form-group {
                margin-bottom: 18px;
            }
            
            input, select {
                padding: 10px 12px;
                font-size: 14px;
            }
            
            .btn {
                padding: 10px 20px;
                font-size: 14px;
            }
        }
        input, select {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 15px;
            transition: all 0.2s ease;
            background-color: white;
        }
        
        /* 优化下拉选择框，减少选项显示数量 */
        select {
            max-height: 200px;
            overflow-y: auto;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            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='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            padding-right: 36px;
        }
        
        select option {
            padding: 8px 12px;
            font-size: 14px;
            max-height: 150px;
        }
        
        /* 移动端下拉选择框优化 */
        @media (max-width: 768px) {
            select {
                max-height: 120px;
                font-size: 14px;
            }
            
            select option {
                padding: 10px 12px;
                font-size: 14px;
            }
            
            /* 头部区域手机端优化 */
            .header-section {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
            
            .header-title {
                font-size: 22px;
                width: 100%;
            }
            
            .header-actions {
                width: 100%;
                justify-content: space-between;
                gap: 10px;
            }
            
            .user-info {
                font-size: 13px;
                flex: 1;
            }
            
            .logout-btn {
                padding: 8px 14px;
                font-size: 13px;
            }
        }
        
        /* 小屏幕手机优化 */
        @media (max-width: 480px) {
            .header-title {
                font-size: 20px;
            }
            
            .header-actions {
                flex-direction: column;
                width: 100%;
                align-items: stretch;
            }
            
            .user-info {
                text-align: center;
                padding: 8px 0;
            }
            
            .logout-btn {
                width: 100%;
                padding: 10px 16px;
            }
        }
        input:focus, select:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        .btn {
            padding: 10px 24px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 15px;
            font-weight: 500;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .btn-primary {
            background-color: #3b82f6;
            color: white;
        }
        .btn-primary:hover {
            background-color: #2563eb;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
        }
        .btn-danger {
            background-color: #ef4444;
            color: white;
        }
        .btn-danger:hover {
            background-color: #dc2626;
            box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
        }
        .btn-secondary {
            background-color: #64748b;
            color: white;
        }
        .btn-secondary:hover {
            background-color: #475569;
            box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
        }
        .btn-success {
            background-color: #10b981;
            color: white;
        }
        .btn-success:hover {
            background-color: #059669;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
        }
        .form-row {
            display: flex;
            gap: 20px;
            margin-bottom: 0;
            flex-wrap: wrap;
        }
        
        /* 桌面端：一行显示3-4个字段 */
        .form-col {
            flex: 1 1 calc(25% - 15px);
            min-width: 200px;
        }
        
        /* 大屏幕：一行显示4个 */
        @media (min-width: 1400px) {
            .form-col {
                flex: 1 1 calc(25% - 15px);
                min-width: 250px;
            }
        }
        
        /* 中等屏幕：一行显示3个 */
        @media (min-width: 992px) and (max-width: 1399px) {
            .form-col {
                flex: 1 1 calc(33.333% - 14px);
                min-width: 200px;
            }
        }
        
        /* 平板端：一行显示2个 */
        @media (min-width: 768px) and (max-width: 991px) {
            .form-col {
                flex: 1 1 calc(50% - 10px);
                min-width: 180px;
            }
        }
        
        /* 移动端：一行显示1-2个（根据字段宽度） */
        @media (max-width: 767px) {
            .form-col {
                flex: 1 1 calc(50% - 6px);
                min-width: calc(50% - 6px);
            }
            
            /* 如果只有1个字段，全宽显示 */
            .form-row:has(.form-col:only-child) .form-col {
                flex: 1 1 100%;
            }
            
            /* 如果只有2个字段，并排显示 */
            .form-row:has(.form-col:nth-child(2):last-child) .form-col {
                flex: 1 1 calc(50% - 6px);
            }
        }
        
        /* 超小屏幕：一行显示1个 */
        @media (max-width: 480px) {
            .form-col {
                flex: 1 1 100%;
                min-width: 100%;
            }
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 30px;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        th, td {
            padding: 14px 16px;
            text-align: left;
            border-bottom: 1px solid #f1f5f9;
            vertical-align: middle;
        }
        th {
            background-color: #f8fafc;
            color: #334155;
            font-weight: 600;
            font-size: 14px;
            vertical-align: middle;
        }
        /* 优化表格显示，防止换行 */
        #config table {
            font-size: 15px;
        }
        #config table th,
        #config table td {
            padding: 10px 12px;
            font-size: 15px;
            white-space: nowrap;
            line-height: 1.4;
        }
        #config table th {
            font-size: 15px;
            font-weight: 600;
            padding: 10px 10px;
        }
        #config table td {
            padding: 10px 10px;
        }
        /* 缩小表格中的按钮 */
        #config .action-btns .btn {
            padding: 5px 10px;
            font-size: 12px;
            min-width: auto;
            line-height: 1.2;
        }
        #config .action-btns {
            gap: 5px;
        }
        /* 翻堆记录表格优化 */
        #turning table {
            font-size: 15px;
        }
        #turning table th,
        #turning table td {
            padding: 12px 10px;
            font-size: 15px;
            white-space: nowrap;
            line-height: 1.5;
            vertical-align: middle;
        }
        #turning table th {
            font-size: 15px;
            font-weight: 600;
            padding: 12px 10px;
            vertical-align: middle;
        }
        #turning table td {
            padding: 12px 10px;
            vertical-align: middle;
        }
        /* 缩小翻堆记录表格中的按钮 */
        #turning .action-btns {
            gap: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #turning .action-btns .btn {
            padding: 5px 10px;
            font-size: 12px;
            min-width: auto;
            line-height: 1.2;
        }
        tr {
            transition: all 0.2s ease;
        }
        tr:hover {
            background-color: #f8fafc;
        }
        
        /* 统计面板表格行悬停效果 */
        #statsContent table tbody tr:hover {
            background-color: #f8fafc;
            transform: scale(1.001);
        }
        
        /* 统计面板卡片悬停效果 */
        #statsContent > div[style*="background: white"]:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
        }
        
        /* 统计面板指标卡片悬停效果 */
        #statsContent > div[style*="display: grid"] > div:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0,0,0,0.15) !important;
        }
        
        /* 统计面板图表容器响应式 */
        @media (max-width: 1400px) {
            #statsContent > div[style*="grid-template-columns: repeat(3"] {
                grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)) !important;
            }
        }
        
        @media (max-width: 1200px) {
            #statsContent > div[style*="grid-template-columns: repeat(3"] {
                grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
            }
        }
        
        @media (max-width: 768px) {
            #statsContent > div[style*="grid-template-columns: repeat(3"] {
                grid-template-columns: 1fr !important;
                gap: 16px !important;
            }
        }
        
        /* 小屏幕手机优化 */
        @media (max-width: 480px) {
            body {
                padding: 6px;
                font-size: 13px;
            }
            
            .container {
                padding: 12px;
            }
            
            h1 {
                font-size: 18px;
                margin-bottom: 12px;
                padding-bottom: 10px;
            }
            
            .tab {
                font-size: 12px;
                padding: 8px 12px;
            }
            
            .form-group {
                margin-bottom: 14px;
            }
            
            label {
                font-size: 12px;
                margin-bottom: 5px;
            }
            
            input, select {
                padding: 9px 10px;
                font-size: 13px;
            }
            
            select {
                max-height: 90px !important;
                padding-right: 32px !important;
            }
            
            select option {
                padding: 7px 8px !important;
                font-size: 12px !important;
            }
            
            .btn {
                padding: 9px 14px;
                font-size: 12px;
                min-height: 38px;
            }
            
            .search-bar {
                padding: 10px;
                margin-bottom: 16px;
            }
            
            table {
                font-size: 11px;
            }
            
            th, td {
                padding: 6px 8px;
                font-size: 11px;
            }
            
            .stats-cards-grid {
                grid-template-columns: 1fr !important;
                gap: 10px !important;
            }
            
            .stats-cards-grid > div {
                padding: 16px !important;
            }
            
            .stats-cards-grid > div > div:nth-child(2) {
                font-size: 22px !important;
            }
            
            /* 超小屏幕优化 */
            #config table th,
            #config table td,
            #turning table th,
            #turning table td {
                padding: 6px 4px !important;
                font-size: 10px !important;
            }
            
            #config .action-btns .btn,
            #turning .action-btns .btn {
                padding: 4px 8px !important;
                font-size: 11px !important;
            }
        }
        .action-btns {
            display: flex;
            gap: 8px;
        }
        .stats-container {
            margin-top: 0;
            padding: 0;
            background-color: transparent;
            border-radius: 0;
            border: none;
        }
        
        #stats .stats-container h3 {
            margin-bottom: 24px;
            color: #1e293b;
            font-size: 22px;
            font-weight: 600;
            padding-bottom: 12px;
            border-bottom: 2px solid #e2e8f0;
        }
        
        #statsContent {
            margin-top: 0;
        }
        .stats-item {
            margin-bottom: 16px;
            padding-bottom: 16px;
            border-bottom: 1px dashed #e2e8f0;
        }
        .stats-item:last-child {
            border-bottom: none;
        }
        .alert {
            padding: 12px 16px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: none;
            font-size: 14px;
            font-weight: 500;
        }
        .alert-success {
            background-color: #d1fae5;
            color: #065f46;
            border: 1px solid #a7f3d0;
        }
        .alert-error {
            background-color: #fee2e2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }
        .search-bar {
            margin-bottom: 30px;
            padding: 20px;
            background-color: #f8fafc;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
        }

        /* 移动端适配 */
        @media (max-width: 768px) {
            * {
                -webkit-tap-highlight-color: transparent;
            }
            
            body {
                padding: 8px;
                font-size: 14px;
            }
            
            .container {
                padding: 16px;
                border-radius: 8px;
                max-width: 100%;
            }
            
            h1 {
                font-size: 20px;
                margin-bottom: 16px;
                padding-bottom: 12px;
            }
            
            .tabs {
                overflow-x: auto;
                white-space: nowrap;
                margin-bottom: 16px;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
            }
            
            .tabs::-webkit-scrollbar {
                display: none;
            }
            
            .tab {
                font-size: 13px;
                padding: 10px 14px;
                min-width: auto;
                flex-shrink: 0;
            }
            
            .form-group {
                margin-bottom: 16px;
            }
            
            label {
                font-size: 13px;
                margin-bottom: 6px;
            }
            
            input, select {
                padding: 10px 12px;
                font-size: 14px;
                border-radius: 6px;
            }
            
            select {
                max-height: 150px;
                overflow-y: auto;
            }
            
            select option {
                padding: 8px 10px;
                font-size: 13px;
            }
            
            .form-row {
                flex-direction: row;
                flex-wrap: wrap;
                gap: 12px;
            }
            
            .form-col {
                flex: 1 1 calc(50% - 6px);
                min-width: calc(50% - 6px);
                margin-bottom: 16px;
            }
            
            /* 如果只有1个字段，全宽显示 */
            .form-row:has(.form-col:only-child) .form-col {
                flex: 1 1 100%;
            }
            
            /* 如果只有2个字段，并排显示 */
            .form-row:has(.form-col:nth-child(2):last-child) .form-col {
                flex: 1 1 calc(50% - 6px);
            }
            
            .form-col:last-child {
                margin-bottom: 16px;
            }
            
            table {
                display: block;
                overflow-x: auto;
                white-space: nowrap;
                border-radius: 8px;
                -webkit-overflow-scrolling: touch;
                font-size: 12px;
            }
            
            th, td {
                padding: 8px 10px;
                font-size: 12px;
            }
            
            th {
                font-size: 12px;
                font-weight: 600;
            }
            
            .action-btns {
                flex-direction: row;
                gap: 6px;
                flex-wrap: wrap;
            }
            
            .action-btns .btn {
                flex: 1;
                min-width: 60px;
            }
            
            .btn {
                padding: 10px 16px;
                font-size: 13px;
                border-radius: 6px;
                min-height: 40px;
            }
            
            .stats-container {
                padding: 16px;
                border-radius: 8px;
            }
            
            .search-bar {
                padding: 12px;
                border-radius: 8px;
                margin-bottom: 20px;
            }
            
            /* 修改弹窗适配 */
            #editModal > div,
            #editConfigModal > div,
            #editMaterialModal > div,
            #editTurningModal > div,
            #viewBatchTurningModal > div {
                width: 95%;
                margin: 20px auto;
                padding: 16px;
                border-radius: 8px;
                max-height: 90vh;
                overflow-y: auto;
            }
            
            /* 统计面板移动端优化 */
            #stats .stats-container h3 {
                font-size: 18px;
                margin-bottom: 16px;
                padding-bottom: 10px;
            }
            
            #statsContent > div[style*="display: grid"] {
                grid-template-columns: 1fr !important;
                gap: 16px !important;
                margin-bottom: 20px !important;
            }
            
            #statsContent > div[style*="background:"] {
                padding: 16px !important;
                border-radius: 12px !important;
                margin-bottom: 20px !important;
            }
            
            #statsContent h3 {
                font-size: 16px !important;
                margin-bottom: 16px !important;
            }
            
            #statsContent canvas {
                max-height: 250px !important;
            }
            
            /* 统计卡片移动端优化 */
            .stats-cards-grid {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 12px !important;
                margin-bottom: 20px !important;
            }
            
            .stats-cards-grid > div {
                padding: 20px !important;
            }
            
            .stats-cards-grid > div > div:first-child {
                font-size: 11px !important;
                margin-bottom: 6px !important;
            }
            
            .stats-cards-grid > div > div:nth-child(2) {
                font-size: 24px !important;
                margin-bottom: 2px !important;
            }
            
            .stats-cards-grid > div > div:last-child {
                font-size: 11px !important;
            }
            
            /* 图表容器移动端优化 */
            #statsContent > div[style*="grid-template-columns: repeat(3"] {
                grid-template-columns: 1fr !important;
                gap: 16px !important;
            }
            
            #statsContent > div[style*="grid-template-columns: repeat(3"] > div {
                padding: 16px !important;
            }
            
            #statsContent > div[style*="grid-template-columns: repeat(3"] h3 {
                font-size: 15px !important;
                margin-bottom: 16px !important;
            }
            
            /* 表格移动端优化 */
            #statsContent table {
                font-size: 12px;
            }
            
            #statsContent th,
            #statsContent td {
                padding: 10px 8px !important;
                font-size: 12px !important;
            }
            
            /* 减少下拉选项显示 */
            select[size],
            select[multiple] {
                max-height: 120px;
            }
            
            select {
                max-height: 100px !important;
                font-size: 14px !important;
            }
            
            select option {
                padding: 8px 10px !important;
                font-size: 13px !important;
            }
            
            /* 优化输入框在移动端的显示 */
            input[type="date"],
            input[type="datetime-local"] {
                font-size: 14px;
            }
            
            /* 优化文本域 */
            textarea {
                font-size: 14px;
                padding: 10px 12px;
            }
            
            /* 优化弹窗中的下拉框 */
            #editModal select,
            #editConfigModal select,
            #editMaterialModal select,
            #editTurningModal select {
                max-height: 100px;
            }
            
            /* 优化表格在移动端的显示 */
            #config table,
            #turning table,
            #material table {
                font-size: 11px;
            }
            
            #config th,
            #config td,
            #turning th,
            #turning td,
            #material th,
            #material td {
                padding: 8px 6px !important;
                font-size: 11px !important;
            }
            
            /* 优化搜索栏在移动端 */
            .search-bar .form-row {
                gap: 0;
            }
            
            .search-bar .form-col {
                margin-bottom: 14px;
            }
            
            /* 优化按钮组在移动端 */
            .action-btns {
                flex-wrap: wrap;
            }
            
            .action-btns .btn {
                flex: 1 1 auto;
                min-width: 70px;
            }
            
            /* 统计面板适配 */
            .stats-container .form-row {
                flex-direction: column;
                gap: 0;
            }
            
            .stats-container .form-col {
                margin-bottom: 16px;
            }
            
            .stats-container .form-col:last-child {
                margin-bottom: 0;
            }
            
            /* 确保按钮在移动端正确显示 */
            .stats-container .btn {
                width: 100%;
            }
        }
        
        /* 统计面板专用样式 */
        .stats-filter-bar {
            background: white;
            padding: 24px;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
            margin-bottom: 32px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }
        
        /* 统计面板筛选栏 - 使用更具体的选择器确保样式生效 */
        #stats .stats-filter-row {
            display: flex !important;
            align-items: flex-end !important;
            gap: 16px !important;
            flex-wrap: nowrap !important;
            width: 100% !important;
            background: white;
            padding: 24px;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
            margin-bottom: 32px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }
        
        #stats .stats-filter-item {
            flex: 0 0 auto;
            width: 180px;
        }
        
        #stats .stats-filter-item.stats-date-group {
            flex: 0 1 auto !important;
            min-width: 0 !important;
            max-width: none !important;
        }
        
        #stats .stats-filter-item label {
            display: block;
            margin-bottom: 8px;
            color: #334155;
            font-weight: 600;
            font-size: 14px;
            white-space: nowrap;
        }
        
        #stats .date-range-inputs {
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
            width: 100% !important;
        }
        
        #stats .date-range-inputs input[type="date"] {
            flex: 0 1 auto !important;
            padding: 10px 10px !important;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.2s ease;
            background-color: white;
            min-width: 140px !important;
            max-width: 180px !important;
            width: auto !important;
        }
        
        #stats .date-range-inputs input[type="date"]:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        
        #stats .date-separator {
            color: #64748b;
            font-size: 13px;
            font-weight: 500;
            white-space: nowrap;
            padding: 0 2px;
            flex-shrink: 0 !important;
        }
        
        #stats .stats-filter-item input[type="date"] {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.2s ease;
            background-color: white;
        }
        
        #stats .stats-filter-item input[type="date"]:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        
        #stats .stats-filter-actions {
            display: flex !important;
            gap: 10px !important;
            align-items: flex-end !important;
            flex-shrink: 0 !important;
        }
        
        #stats .stats-filter-actions .btn {
            padding: 10px 16px !important;
            white-space: nowrap !important;
            display: inline-flex !important;
            align-items: center !important;
            gap: 5px !important;
            font-size: 14px !important;
        }
        
        #stats .stats-filter-actions .btn span {
            font-size: 14px;
        }
        
        /* PC端统计面板表单行底部对齐 */
        @media (min-width: 769px) {
            #stats .stats-container .form-row {
                align-items: end;
            }
            
            #stats .stats-filter-row {
                flex-wrap: nowrap !important;
                justify-content: flex-start !important;
                align-items: flex-end !important;
            }
            
            #stats .stats-filter-item.stats-date-group {
                flex: 0 1 auto !important;
                min-width: 320px !important;
                max-width: 500px !important;
            }
            
            #stats .stats-filter-actions {
                flex-shrink: 0 !important;
                margin-left: auto !important;
            }
        }
        
        /* 中等屏幕优化 */
        @media (min-width: 992px) {
            #stats .stats-filter-row {
                gap: 20px !important;
            }
            
            #stats .stats-filter-item.stats-date-group {
                min-width: 360px !important;
                max-width: 600px !important;
            }
        }
        
        /* 大屏幕优化 */
        @media (min-width: 1200px) {
            #stats .stats-filter-item.stats-date-group {
                min-width: 400px !important;
                max-width: 700px !important;
            }
        }
        
        /* 移动端统计面板适配 */
        @media (max-width: 768px) {
            #stats .stats-filter-row {
                flex-direction: column !important;
                gap: 16px !important;
                flex-wrap: wrap !important;
                align-items: stretch !important;
                padding: 16px !important;
            }
            
            #stats .stats-filter-item.stats-date-group {
                width: 100% !important;
                min-width: 100% !important;
                max-width: 100% !important;
            }
            
            #stats .date-range-inputs {
                flex-direction: column !important;
                gap: 10px !important;
            }
            
            #stats .date-separator {
                display: none !important;
            }
            
            #stats .date-range-inputs input[type="date"] {
                width: 100% !important;
                min-width: 100% !important;
                max-width: 100% !important;
            }
            
            #stats .stats-filter-actions {
                width: 100% !important;
                flex-direction: row !important;
                justify-content: stretch !important;
            }
            
            #stats .stats-filter-actions .btn {
                flex: 1 !important;
                justify-content: center !important;
            }
        }
        
        /* 小屏幕优化（确保元素能在一行显示） */
        @media (min-width: 769px) and (max-width: 1200px) {
            #stats .stats-filter-row {
                gap: 12px !important;
            }
            
            #stats .stats-filter-item.stats-date-group {
                min-width: 280px !important;
                max-width: 450px !important;
            }
            
            #stats .date-range-inputs input[type="date"] {
                min-width: 120px !important;
                max-width: 160px !important;
                padding: 10px 8px !important;
            }
            
            #stats .stats-filter-actions .btn {
                padding: 10px 14px !important;
                font-size: 13px !important;
            }
        }

        /* 状态徽章样式 */
        .status-badge {
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
            display: inline-block;
        }
        .status-pending {
            background-color: #fef3c7;
            color: #92400e;
        }
        .status-processing {
            background-color: #dbeafe;
            color: #1e40af;
        }
        .status-completed {
            background-color: #d1fae5;
            color: #065f46;
        }

        /* 异常值高亮 */
        .abnormal-row {
            background-color: #fee2e2 !important;
        }
        .abnormal-value {
            color: #dc2626;
            font-weight: 600;
        }

        /* 文本域样式 */
        textarea {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 15px;
            font-family: inherit;
            resize: vertical;
            transition: all 0.2s ease;
        }
        textarea:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        /* ========== 全面响应式设计增强 ========== */
        
        /* 基础容器响应式 */
        @media (max-width: 1200px) {
            .container {
                max-width: 100%;
                padding: 24px;
            }
        }
        
        @media (max-width: 992px) {
            .container {
                padding: 20px;
            }
            
            .form-row {
                flex-wrap: wrap;
            }
            
            .form-col {
                flex: 1 1 calc(50% - 10px);
                min-width: 200px;
            }
        }
        
        /* 表格全面响应式 */
        @media (max-width: 992px) {
            table {
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                white-space: nowrap;
            }
            
            table thead,
            table tbody,
            table tr {
                display: table;
                width: 100%;
                table-layout: fixed;
            }
            
            th, td {
                padding: 10px 8px;
                font-size: 13px;
            }
        }
        
        /* 标签页响应式 */
        @media (max-width: 992px) {
            .tabs {
                overflow-x: auto;
                overflow-y: hidden;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: thin;
                padding-bottom: 5px;
            }
            
            .tabs::-webkit-scrollbar {
                height: 4px;
            }
            
            .tabs::-webkit-scrollbar-track {
                background: #f1f5f9;
            }
            
            .tabs::-webkit-scrollbar-thumb {
                background: #cbd5e1;
                border-radius: 2px;
            }
            
            .tab {
                flex-shrink: 0;
                white-space: nowrap;
            }
        }
        
        /* 按钮组响应式 */
        @media (max-width: 768px) {
            .search-bar > div:last-child,
            .stats-filter-actions,
            .header-actions {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
            }
            
            .search-bar button,
            .stats-filter-actions button,
            .header-actions button {
                flex: 1 1 auto;
                min-width: calc(50% - 4px);
            }
        }
        
        @media (max-width: 480px) {
            .search-bar > div:last-child button,
            .stats-filter-actions button,
            .header-actions button {
                width: 100%;
                min-width: 100%;
            }
        }
        
        /* 弹窗响应式 */
        @media (max-width: 768px) {
            [id$="Modal"] > div,
            .modal-content {
                width: 95% !important;
                max-width: 95% !important;
                margin: 10px auto !important;
                padding: 16px !important;
                max-height: 90vh !important;
                overflow-y: auto !important;
            }
            
            /* 用户管理弹窗 */
            #addUserModal > div,
            #editUserModal > div,
            #changePasswordModal > div {
                width: 95% !important;
                padding: 20px !important;
            }
            
            /* 消息中心弹窗 */
            #notificationModal > div {
                width: 95% !important;
                margin: 20px auto !important;
                padding: 20px !important;
            }
            
            /* 导入预览弹窗 */
            #importPreviewModal {
                padding: 10px !important;
            }
            
            #importPreviewModal > div {
                width: 95% !important;
                padding: 20px !important;
            }
            
            /* 搜索条件弹窗 */
            #auditLogFilterModal > div,
            #inventoryReportModal > div {
                width: 95% !important;
                padding: 20px !important;
            }
        }
        
        /* 数据字典面板响应式 */
        @media (max-width: 768px) {
            #dictionaryContent {
                grid-template-columns: 1fr !important;
                gap: 16px !important;
            }
            
            #dictionary > div:first-child {
                flex-direction: column;
                align-items: stretch;
            }
            
            #dictionary > div:first-child > div {
                width: 100%;
            }
            
            #dictionary > div:first-child button {
                width: 100%;
                margin-bottom: 8px;
            }
        }
        
        /* 批量操作栏响应式 */
        @media (max-width: 768px) {
            #batchOperationBar {
                flex-direction: column;
                align-items: stretch;
                padding: 12px !important;
            }
            
            #batchOperationBar > div {
                width: 100%;
                margin-bottom: 10px;
            }
            
            #batchOperationBar button {
                width: 100%;
                margin-bottom: 8px;
            }
        }
        
        /* 分页控件响应式 */
        @media (max-width: 768px) {
            .pagination {
                flex-wrap: wrap;
                justify-content: center;
                gap: 8px !important;
            }
            
            .pagination button,
            .pagination input,
            .pagination select,
            .pagination span {
                font-size: 12px;
                padding: 6px 10px !important;
            }
            
            .pagination input {
                width: 50px !important;
            }
        }
        
        /* 高级搜索面板响应式 */
        @media (max-width: 768px) {
            #advancedSearchPanel {
                padding: 12px !important;
            }
            
            #advancedSearchPanel .form-row {
                flex-direction: column;
            }
            
            #advancedSearchPanel .form-col {
                width: 100%;
                margin-bottom: 12px;
            }
        }
        
        /* 库存管理响应式 */
        @media (max-width: 768px) {
            #inventory > div:first-child {
                flex-direction: column;
                align-items: stretch;
            }
            
            #inventory > div:first-child button {
                width: 100%;
                margin-bottom: 8px;
            }
            
            #inventoryTable {
                font-size: 12px;
            }
            
            #inventoryTable th,
            #inventoryTable td {
                padding: 8px 6px;
                font-size: 12px;
            }
        }
        
        /* 用户管理响应式 */
        @media (max-width: 768px) {
            #users > div:first-child {
                flex-direction: column;
                align-items: stretch;
            }
            
            #addUserBtn {
                width: 100%;
                margin-top: 10px;
            }
            
            #usersTable {
                font-size: 12px;
            }
            
            #usersTable th,
            #usersTable td {
                padding: 8px 6px;
                font-size: 12px;
            }
            
            #usersTable .action-btns {
                flex-direction: column;
                gap: 4px;
            }
            
            #usersTable .action-btns button {
                width: 100%;
            }
        }
        
        /* 操作日志响应式 */
        @media (max-width: 768px) {
            #logs > div:first-child {
                flex-direction: column;
                align-items: stretch;
            }
            
            #logs > div:first-child > div {
                width: 100%;
            }
            
            #logs > div:first-child button {
                width: 100%;
                margin-bottom: 8px;
            }
            
            #logs > div:nth-child(2) {
                flex-direction: column;
            }
            
            #logs > div:nth-child(2) > * {
                width: 100%;
                margin-bottom: 8px;
            }
            
            #logsTable {
                font-size: 11px;
            }
            
            #logsTable th,
            #logsTable td {
                padding: 6px 4px;
                font-size: 11px;
            }
            
            #logsTable pre {
                font-size: 10px;
                max-width: 200px;
                overflow-x: auto;
            }
        }
        
        /* 消息通知响应式 */
        @media (max-width: 768px) {
            #notificationContainer {
                right: 10px !important;
                left: 10px !important;
                max-width: calc(100% - 20px) !important;
            }
            
            .notification-toast {
                width: 100%;
            }
            
            #notificationModal > div {
                width: 95% !important;
                padding: 16px !important;
            }
            
            #notificationList {
                max-height: 400px !important;
            }
        }
        
        /* 统计面板增强响应式 */
        @media (max-width: 992px) {
            .stats-cards-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }
        }
        
        @media (max-width: 640px) {
            .stats-cards-grid {
                grid-template-columns: 1fr !important;
            }
        }
        
        /* 图表响应式 */
        @media (max-width: 768px) {
            canvas {
                max-height: 250px !important;
            }
        }
        
        /* 表单输入组响应式 */
        @media (max-width: 640px) {
            .form-row {
                flex-direction: column;
            }
            
            .form-col {
                width: 100%;
                margin-bottom: 16px;
            }
            
            .form-col:last-child {
                margin-bottom: 0;
            }
        }
        
        /* 搜索栏响应式 */
        @media (max-width: 768px) {
            .search-bar {
                padding: 12px !important;
            }
            
            .search-bar .form-row {
                flex-direction: column;
                gap: 0;
            }
            
            .search-bar .form-col {
                margin-bottom: 12px;
            }
        }
        
        /* 表格操作按钮响应式 */
        @media (max-width: 640px) {
            .action-btns {
                flex-direction: column;
                gap: 4px;
            }
            
            .action-btns .btn {
                width: 100%;
                font-size: 12px;
                padding: 8px 12px;
            }
        }
        
        /* 打印预览响应式 */
        @media print {
            .tabs,
            .search-bar,
            .action-btns,
            button:not(.print-btn) {
                display: none !important;
            }
            
            .panel {
                display: block !important;
            }
            
            table {
                page-break-inside: auto;
            }
            
            tr {
                page-break-inside: avoid;
                page-break-after: auto;
            }
        }
        
        /* 超小屏幕优化（小于360px） */
        @media (max-width: 360px) {
            body {
                padding: 4px;
                font-size: 12px;
            }
            
            .container {
                padding: 10px;
            }
            
            h1,
            .header-title {
                font-size: 16px;
            }
            
            .tab {
                font-size: 11px;
                padding: 8px 10px;
            }
            
            .btn {
                font-size: 11px;
                padding: 8px 12px;
            }
            
            input,
            select,
            textarea {
                font-size: 12px;
                padding: 8px 10px;
            }
            
            table {
                font-size: 10px;
            }
            
            th,
            td {
                padding: 4px 6px;
                font-size: 10px;
            }
        }
        
        /* 横屏优化 */
        @media (max-width: 768px) and (orientation: landscape) {
            .tabs {
                overflow-x: auto;
            }
            
            table {
                font-size: 11px;
            }
            
            th,
            td {
                padding: 6px 8px;
            }
        }
        
        /* 确保所有内联样式在移动端也能响应式 */
        @media (max-width: 768px) {
            [style*="display: flex"] {
                flex-wrap: wrap !important;
            }
            
            [style*="grid-template-columns"] {
                grid-template-columns: 1fr !important;
            }
            
            [style*="width: 500px"],
            [style*="width: 600px"],
            [style*="width: 800px"] {
                width: 95% !important;
                max-width: 95% !important;
            }
        }
        
        /* 触摸设备优化 */
        @media (hover: none) and (pointer: coarse) {
            .btn,
            .tab,
            input,
            select {
                min-height: 44px;
            }
            
            .action-btns .btn {
                min-height: 40px;
            }
        }
        
        /* 高DPI屏幕优化 */
        @media (-webkit-min-device-pixel-ratio: 2),
               (min-resolution: 192dpi) {
            table {
                border-width: 0.5px;
            }
            
            th,
            td {
                border-bottom-width: 0.5px;
            }
        }
        
        /* ========== 所有表格手机端统一优化 ========== */
        .table-responsive-wrapper {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            margin-top: 20px;
        }
        
        /* 移动端：将所有表格转换为卡片式布局 */
        @media (max-width: 768px) {
            .table-responsive-wrapper table {
                display: block;
                border: none;
                width: 100%;
            }
            
            .table-responsive-wrapper table thead {
                display: none;
            }
            
            .table-responsive-wrapper table tbody {
                display: block;
            }
            
            .table-responsive-wrapper table tbody tr {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
                margin-bottom: 16px;
                background: white;
                border: 1px solid #e2e8f0;
                border-radius: 12px;
                padding: 12px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
                transition: box-shadow 0.2s ease;
            }
            
            .table-responsive-wrapper table tbody tr:hover {
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
            }
            
            .table-responsive-wrapper table tbody tr td {
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                padding: 8px 10px;
                border: 1px solid #e2e8f0;
                border-radius: 6px;
                background: #fafbfc;
                font-size: 13px;
                word-break: break-word;
            }
            
            /* 操作按钮区域占满整行 */
            .table-responsive-wrapper table tbody tr td.action-btns {
                grid-column: 1 / -1;
                margin-top: 4px;
            }
            
            .table-responsive-wrapper table tbody tr td:last-child {
                border-bottom: none;
                padding-top: 12px;
                margin-top: 8px;
                border-top: 2px solid #e2e8f0;
            }
            
            /* 为每个单元格添加标签 - 显示在值的左边 */
            .table-responsive-wrapper table tbody tr td::before {
                content: attr(data-label);
                font-weight: 600;
                color: #334155;
                background: #f1f5f9;
                padding: 4px 8px;
                border-radius: 4px;
                margin-right: 8px;
                flex-shrink: 0;
                min-width: 70px;
                text-align: left;
                font-size: 12px;
                display: inline-block;
                border-left: 2px solid #3b82f6;
                box-sizing: border-box;
            }
            
            /* 确保值显示在标签右侧 */
            .table-responsive-wrapper table tbody tr td:not(.action-btns) {
                text-align: right;
                color: #1e293b;
                font-weight: 500;
                flex: 1;
                min-width: 0;
            }
            
            /* 操作按钮区域 */
            .table-responsive-wrapper table tbody tr td.action-btns {
                display: flex;
                flex-direction: row;
                gap: 8px;
                align-items: center;
                justify-content: flex-end;
                padding-top: 10px;
                margin-top: 4px;
                border-top: 2px solid #e2e8f0;
            }
            
            .table-responsive-wrapper table tbody tr td.action-btns::before {
                content: '操作';
                font-weight: 600;
                color: #334155;
                background: #e2e8f0;
                padding: 4px 8px;
                border-radius: 4px;
                margin-right: 8px;
                flex-shrink: 0;
                text-align: left;
                font-size: 12px;
                display: inline-block;
                border-left: 2px solid #64748b;
                box-sizing: border-box;
            }
            
            .table-responsive-wrapper table tbody tr td.action-btns .btn {
                flex: 0 0 auto;
                padding: 8px 16px;
                font-size: 13px;
                min-width: 60px;
            }
            
            /* 状态徽章优化 */
            .table-responsive-wrapper table tbody tr td .status-badge {
                display: inline-block;
            }
            
            /* 空数据提示 */
            .table-responsive-wrapper table tbody tr td[colspan] {
                display: block;
                text-align: center;
                padding: 40px 20px;
                color: #94a3b8;
            }
            
            .table-responsive-wrapper table tbody tr td[colspan]::before {
                display: none;
            }
            
            /* 详细信息列优化（操作日志等） */
            .table-responsive-wrapper table tbody tr td pre {
                max-width: 100%;
                overflow-x: auto;
                font-size: 11px;
                white-space: pre-wrap;
                word-break: break-all;
            }
        }
        
        /* 小屏幕进一步优化 - 保持一行2个字段 */
        @media (max-width: 480px) {
            .table-responsive-wrapper table tbody tr {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
                padding: 10px;
                margin-bottom: 12px;
            }
            
            .table-responsive-wrapper table tbody tr td {
                padding: 6px 8px;
                font-size: 12px;
            }
            
            .table-responsive-wrapper table tbody tr td::before {
                font-size: 11px;
                min-width: 60px;
                padding: 3px 6px;
            }
            
            .table-responsive-wrapper table tbody tr td.action-btns {
                grid-column: 1 / -1;
            }
            
            .table-responsive-wrapper table tbody tr td.action-btns .btn {
                flex: 1;
                padding: 6px 12px;
                font-size: 12px;
            }
        }
        