
        .device-list-tbody {
            display: table-row-group;
        }
        :root { 
            --primary: #1a73e8; 
            --primary-light: #e8f0fe;
            --danger: #cc0000; 
            --warning: #f9ab00; 
            --success: #2e7d32;
            --bg: #f8f9fa; 
            --card-bg: #ffffff;
            --text-primary: #202124;
            --text-secondary: #5f6368;
            --border-color: #dadce0;
        }
        * { 
            box-sizing: border-box; 
            margin: 0; 
            padding: 0; 
        }
        body { 
            font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
            background: #f0f2f5; 
            line-height: 1.6;
        }
        .nav { 
            background: var(--primary); 
            padding: 10px 20px; 
            color: white; 
            display: flex; 
            gap: 20px; 
            flex-wrap: wrap; 
            align-items: center; 
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .nav a { 
            color: white; 
            text-decoration: none; 
            font-weight: 500; 
            cursor: pointer; 
            padding: 8px 12px;
            border-radius: 4px;
            transition: background 0.3s;
        }
        .nav a:hover {
            background: rgba(255,255,255,0.1);
        }
        .nav a.active { 
            background: rgba(255,255,255,0.2);
            text-decoration: none;
        }
        .nav-badge {
            display: inline-block;
            background: #ff5252;
            color: #fff;
            font-size: 11px;
            font-weight: 700;
            min-width: 18px;
            height: 18px;
            line-height: 18px;
            padding: 0 5px;
            border-radius: 10px;
            text-align: center;
            margin-left: 5px;
            box-shadow: 0 2px 4px rgba(255,82,82,0.4);
            vertical-align: middle;
        }
        .container { 
            max-width: 1300px; 
            margin: 20px auto; 
            background: var(--card-bg); 
            padding: 20px; 
            border-radius: 12px; 
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }
        .hidden { display: none !important; }
        
        /* 按钮样式 */
        button { 
            padding: 8px 16px; 
            background: var(--primary); 
            color: white; 
            border: none; 
            border-radius: 6px; 
            cursor: pointer; 
            margin: 2px; 
            font-size: 14px;
            transition: all 0.3s;
        }
        button:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }
        button.danger { background: var(--danger); }
        button.danger:hover { background: #b30000; }
        button.secondary { background: #6c757d; }
        button.secondary:hover { background: #5a6268; }
        button.success { background: var(--success); }
        button.warning { background: var(--warning); color: #202124; }
        button.export-btn { background: #34a853; }
        button.export-btn:hover { background: #2d8f47; }

        /* 审批管理样式 */
        .approval-tab-btn {
            padding: 8px 16px;
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            color: #495057;
            transition: all 0.2s;
        }
        .approval-tab-btn.active {
            background: #1a73e8;
            color: white;
            border-color: #1a73e8;
        }
        .approval-tab-btn:hover {
            background: #e9ecef;
        }
        .approval-tab-btn.active:hover {
            background: #1557b0;
        }
        .approval-badge {
            display: inline-block;
            min-width: 20px;
            padding: 2px 6px;
            background: #dc3545;
            color: white;
            border-radius: 10px;
            font-size: 12px;
            text-align: center;
            margin-left: 4px;
        }
        .approval-status {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }
        .approval-status.status-pending {
            background: #fff3cd;
            color: #856404;
        }
        .approval-status.status-approved {
            background: #d4edda;
            color: #155724;
        }
        .approval-status.status-rejected {
            background: #f8d7da;
            color: #721c24;
        }

        /* 表单元素样式 */
        input, select, textarea { 
            padding: 8px 12px; 
            border: 1px solid var(--border-color); 
            border-radius: 6px; 
            font-size: 14px;
            transition: border 0.3s;
        }
        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
        }
        
        /* 表格样式 */
        table { 
            width: 100%; 
            border-collapse: collapse; 
            margin-top: 15px; 
            font-size: 14px; 
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }
        th, td { 
            border: 1px solid var(--border-color); 
            padding: 10px; 
            text-align: left; 
        }
        th { 
            background: var(--primary-light); 
            font-weight: 600;
            color: var(--text-primary);
        }
        
        /* 布局工具类 */
        .flex { 
            display: flex; 
            gap: 10px; 
            flex-wrap: wrap; 
            align-items: center; 
        }
        .card { 
            background: var(--card-bg); 
            padding: 20px; 
            border-radius: 12px; 
            box-shadow: 0 2px 8px rgba(0,0,0,0.08); 
            margin-bottom: 20px; 
        }
        
        /* 统计卡片 */
        .stat { 
            font-size: 2em; 
            font-weight: bold; 
            color: var(--primary); 
            text-align: center;
        }
        
        /* 徽章样式 */
        .badge { 
            padding: 4px 10px; 
            border-radius: 20px; 
            font-size: 12px; 
            color: white; 
            font-weight: 500;
        }
        .badge-red { background: var(--danger); }
        .badge-orange { background: var(--warning); }
        .badge-green { background: #34a853; }
        
        /* 文字颜色 */
        .danger-text { color: var(--danger); font-weight: bold; }
        .success-text { color: var(--success); font-weight: bold; }
        
        /* 登录框 */
        .login-box { 
            max-width: 400px; 
            margin: 100px auto; 
            padding: 30px; 
            background: var(--card-bg); 
            border-radius: 12px; 
            box-shadow: 0 4px 20px rgba(0,0,0,0.15); 
        }
        .login-box select, .login-box input { 
            width: 100%; 
            margin-bottom: 15px; 
            padding: 12px; 
        }
        .logout-btn { 
            background: rgba(255,255,255,0.2); 
            border: 1px solid white; 
            color: white; 
            cursor: pointer; 
            padding: 6px 16px; 
            border-radius: 6px; 
            transition: background 0.3s;
        }
        .logout-btn:hover {
            background: rgba(255,255,255,0.3);
        }
        
        /* 扫码弹窗 */
        .modal { 
            position: fixed; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%; 
            background: rgba(0,0,0,0.8); 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            z-index: 1000; 
            backdrop-filter: blur(8px); 
        }
        .modal-content { 
            background: white; 
            border-radius: 16px; 
            width: 90%; 
            max-width: 400px; 
            padding: 20px; 
            text-align: center; 
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }
        
        /* 加载提示 */
        .loading-tip {
            text-align: center;
            padding: 40px;
            color: var(--primary);
            font-size: 16px;
            background: var(--bg);
            border-radius: 12px;
            margin: 20px 0;
            animation: pulse 1.5s infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 0.6; }
            50% { opacity: 1; }
            100% { opacity: 0.6; }
        }
        
        /* 表格样式 */
        .table-wrapper {
            margin-top: 10px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            overflow-x: auto;
            overflow-y: visible;
        }
        .table-wrapper table {
            width: 100%;
            min-width: 100%;
            margin: 0;
            border-collapse: collapse;
            table-layout: auto;
        }
        .table-wrapper th {
            background: linear-gradient(135deg, var(--primary) 0%, #4a90d9 100%);
            color: white;
            font-weight: 600;
            font-size: 12px;
            padding: 12px 8px;
            text-align: center;
            white-space: nowrap;
            border-bottom: 2px solid var(--primary);
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
            min-width: 80px;
        }
        .table-wrapper td {
            padding: 8px;
            font-size: 12px;
            border-bottom: 1px solid #f0f0f0;
            vertical-align: middle;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 180px;
        }
        .table-wrapper tr:hover td {
            background-color: rgba(74, 144, 217, 0.12);
            transition: background-color 0.2s ease;
        }
        .table-wrapper tr:nth-child(even) td {
            background-color: #fafafa;
        }
        .table-wrapper tr:nth-child(even):hover td {
            background-color: rgba(74, 144, 217, 0.1);
        }
        .table-wrapper .action-cell {
            min-width: 120px;
            text-align: center;
        }
        
        /* 筛选行 */
        .filter-row {
            background: var(--bg); 
            padding: 15px; 
            border-radius: 12px; 
            margin: 15px 0; 
            display: flex; 
            gap: 15px; 
            flex-wrap: wrap; 
            align-items: flex-end;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
            clear: both;
        }
        
        /* 仪器台账模块按钮容器 */
        #tab-instruments > .flex:first-child {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
            margin-bottom: 15px;
            clear: both;
        }
        #tab-instruments > .flex:first-child button {
            flex-shrink: 0;
        }
        
        /* 移动端适配 */
        @media (max-width: 768px) {
            .nav {
                flex-direction: column;
                align-items: stretch;
                padding: 10px;
            }
            .nav a {
                text-align: center;
                margin: 3px 0;
            }
            .container {
                margin: 10px;
                padding: 15px;
            }
            .flex {
                flex-direction: column;
                align-items: stretch;
            }
            .filter-row {
                flex-direction: column;
                align-items: stretch;
            }
            .table-wrapper {
                font-size: 12px;
            }
            th, td {
                padding: 6px 4px;
            }
        }
        
        /* 分页选择器 */
        .limit-select {
            padding: 6px 10px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: white;
            font-size: 14px;
            margin-left: 10px;
        }
        
        /* 操作按钮列固定宽度 */
        .action-cell {
            min-width: 120px;
            text-align: center;
        }

        .fault-desc-cell {
            min-width: 180px;
            max-width: 300px;
        }

        /* 最近任务编号快捷选择 */
        .recent-tasks-section {
            background: #f8f9fa;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 10px 15px;
            margin: 10px 0;
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .recent-tasks-label {
            font-size: 13px;
            color: #666;
            font-weight: 500;
        }

        .recent-tasks-list {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .recent-task-chip {
            background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
            border: 1px solid #90caf9;
            border-radius: 20px;
            padding: 6px 14px;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .recent-task-chip:hover {
            background: linear-gradient(135deg, #1a73e8 0%, #4a90d9 100%);
            border-color: #1a73e8;
            color: white;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .recent-task-chip:hover .chip-task {
            color: white;
        }

        .recent-task-chip:hover .chip-count {
            background: rgba(255,255,255,0.3);
            color: white;
        }

        .chip-task {
            font-weight: 600;
            color: #1565c0;
        }

        .chip-count {
            font-size: 11px;
            color: #666;
            background: rgba(255,255,255,0.7);
            padding: 2px 8px;
            border-radius: 10px;
        }
        .fault-desc-text {
            display: block;
            color: #dc3545;
            font-size: 13px;
            margin-bottom: 4px;
            word-break: break-all;
        }
        .fault-desc-empty {
            color: #999;
            font-size: 12px;
            margin-right: 8px;
        }
        .edit-desc-btn {
            padding: 3px 10px;
            background: #ff9800;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }
        .edit-desc-btn:hover { background: #f57c00; }
        
        /* 使用记录搜索区域 */
        .records-search-bar {
            background: #fff;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }
        
        .search-tabs {
            display: flex;
            background: #f5f5f5;
            border-radius: 8px;
            padding: 3px;
        }
        
        .search-tab {
            padding: 8px 20px;
            border: none;
            border-radius: 6px;
            background: transparent;
            cursor: pointer;
            font-size: 14px;
            color: #666;
            transition: all 0.3s;
        }
        
        .search-tab.active {
            background: var(--primary);
            color: white;
        }
        
        .search-input-wrap {
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }
        
        /* 状态标签页 */
        .status-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }
        
        .status-tab {
            padding: 10px 25px;
            border: 1px solid var(--border-color);
            border-radius: 25px;
            background: #fff;
            cursor: pointer;
            font-size: 14px;
            color: #666;
            transition: all 0.3s;
        }
        
        .status-tab.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 折叠任务面板 */
        .task-panel {
            margin-bottom: 15px;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
        
        .task-header {
            background: linear-gradient(135deg, #f0f4ff 0%, #e8eaf6 100%);
            color: #3f51b5;
            padding: 14px 20px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 8px;
            border: 1px solid #e0e7ff;
            margin-bottom: 10px;
        }
        
        .task-header:hover {
            background: linear-gradient(135deg, #e8eaf6 0%, #e0e7ff 100%);
            border-color: #c7d2fe;
        }
        
        .task-content {
            display: none;
            padding: 15px;
            background: white;
        }
        
        .task-content.expanded {
            display: block;
        }
        
        .task-toggle-icon {
            transition: transform 0.3s ease;
        }
        
        .task-content.expanded .task-toggle-icon {
            transform: rotate(180deg);
        }
        
        /* 任务分页样式 */
        .task-pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin-top: 15px;
            padding: 10px;
            background: var(--bg);
            border-radius: 6px;
        }
        
        .task-page-info {
            font-size: 14px;
            color: var(--text-secondary);
        }
        
        .task-page-nav button {
            padding: 6px 12px;
            font-size: 14px;
        }
        
        /* 任务操作栏 */
        .task-actions {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }
        
        .task-action-btn {
            padding: 6px 12px;
            font-size: 13px;
        }

        /* ========== 手机端优化样式 ========== */
        
        /* 响应式布局 */
        @media screen and (max-width: 768px) {
            /* 调整容器宽度 */
            .container {
                padding: 10px;
            }
            
            /* 导航栏优化 */
            .nav {
                flex-wrap: wrap;
                gap: 5px;
                padding: 5px 10px;
            }
            
            .nav a {
                padding: 8px 12px;
                font-size: 13px;
                min-width: auto;
            }
            
            /* 按钮优化 - 触摸友好 */
            button, .btn {
                min-height: 44px;
                min-width: 44px;
                font-size: 16px;
                padding: 10px 16px;
            }
            
            /* 输入框优化 */
            input, select, textarea {
                min-height: 44px;
                font-size: 16px;
                padding: 10px 12px;
            }
            
            /* 表格优化 - 横向滚动 */
            .table-wrapper {
                border-radius: 8px;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            
            table {
                min-width: 600px;
            }
            
            th, td {
                padding: 8px 10px;
                font-size: 13px;
            }
            
            /* 复选框和单选框优化 */
            input[type="checkbox"], input[type="radio"] {
                transform: scale(1.3);
                margin-right: 8px;
            }
            
            /* 模态框优化 */
            .modal-content {
                width: 95%;
                margin: 10px;
                max-height: 90vh;
                overflow-y: auto;
            }
            
            /* 弹性布局优化 */
            .flex {
                flex-direction: column;
                gap: 10px;
            }
            
            .flex.row {
                flex-direction: row;
            }
            
            /* 登录页面优化 */
            .login-box {
                margin: 10px;
                padding: 20px;
            }
            
            /* 任务头部优化 */
            .task-header {
                padding: 12px 15px;
                font-size: 14px;
            }
            
            /* 分页控件优化 */
            .task-pagination, .dashboard-pagination {
                flex-wrap: wrap;
                gap: 8px;
                padding: 10px 5px;
            }
            
            /* 移动端专用样式 */
            .mobile-hidden {
                display: none;
            }
        }

        /* 针对更小屏幕的优化 */
        @media screen and (max-width: 480px) {
            body {
                font-size: 14px;
            }
            
            h3 {
                font-size: 16px;
                margin-bottom: 10px;
            }
            
            button {
                font-size: 14px;
                padding: 8px 12px;
            }
            
            .nav a {
                padding: 6px 8px;
                font-size: 12px;
            }
        }

        /* 触摸反馈效果 */
        button:active, a:active {
            transform: scale(0.98);
        }

        /* 禁用文本选择（移动端） */
        button, .btn, .nav a {
            user-select: none;
            -webkit-user-select: none;
        }

        /* 优化移动端滚动 */
        body {
            -webkit-overflow-scrolling: touch;
        }

        /* 扫码弹窗优化 */
        @media screen and (max-width: 768px) {
            #qr-reader {
                width: 100% !important;
                max-width: 300px;
                margin: 0 auto;
            }
        }
