        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; background-color: #f0f4f8; min-height: 100vh; display: flex; flex-direction: column; }

        .header { background: linear-gradient(135deg, #1e4d8c 0%, #2c5aa0 100%); color: white; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
        .header h1 { font-size: 20px; font-weight: 600; }
        .header-right span { font-size: 14px; opacity: 0.9; }

        .container { display: flex; flex: 1; overflow: hidden; }
        .sidebar { width: 220px; background-color: #1a365d; color: white; padding: 16px 0; overflow-y: auto; flex-shrink: 0; }
        .sidebar-title { font-size: 18px; font-weight: 600; padding: 14px 20px; color: #7eb8ea; border-bottom: 1px solid #2d4a6f; margin-bottom: 8px; }
        .nav-item { padding: 14px 24px; cursor: pointer; transition: all 0.3s ease; font-size: 16px; position: relative; }
        .nav-item:hover { background-color: #2c5282; }
        .nav-item.active { background-color: #2c5282; border-left: 4px solid #4facfe; }

        .main-content { flex: 1; padding: 24px; overflow-y: auto; background-color: #f0f4f8; }
        .page { display: none; animation: fadeIn 0.3s ease; }
        .page.active { display: block; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .page-title { font-size: 20px; font-weight: 600; color: #1a365d; }
        .page-title-group { display: flex; align-items: center; gap: 16px; }
        .t1-subtabs { display: flex; gap: 4px; }
        .t1-subtab { padding: 8px 36px; border: 1px solid #cbd5e1; background: #fff; color: #64748b; border-radius: 6px; cursor: pointer; font-size: 15px; font-weight: 500; transition: all 0.2s; min-width: 110px; text-align: center; }
        .t1-subtab.active { background: #2E75B6; color: #fff; border-color: #2E75B6; }
        .t1-subtab:hover:not(.active) { background: #E8F4F8; color: #2E75B6; }
        .work-status-tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
        .ws-unknown { background:#f3f4f6; color:#6b7280; }
        .ws-idle { background:#dbeafe; color:#2E75B6; }
        .ws-working { background:#dcfce7; color:#16a34a; }
        .ws-busy { background:#ffedd5; color:#ea580c; }
        .ws-fault { background:#fee2e2; color:#dc2626; }
        .ws-offline { background:#f3f4f6; color:#9ca3af; }
        .ws-maintenance { background:#f3e8ff; color:#7c3aed; }
        .header-right-info { display: flex; align-items: center; gap: 16px; }
        .current-time { font-size: 14px; color: #6b7280; font-family: monospace; }
        .status-indicator { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #10b981; }
        .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: blink 1.5s infinite; }
        @keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
        .type-tabs { display: flex; gap: 4px; }
        .type-tab { padding: 8px 16px; border-radius: 4px; font-size: 15px; cursor: pointer; background-color: #f3f4f6; color: #6b7280; border: none; transition: all 0.3s; }
        .type-tab.active { background-color: #1e4d8c; color: white; }

        .stats-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 20px; }
        .stats-cards-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
        .stat-card { background: white; padding: 16px 18px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); display: flex; flex-direction: column; border-top: 3px solid #4facfe; min-height: 90px; justify-content: center; }
        .stat-card .label { font-size: 16px; color: #374151; margin-bottom: 8px; font-weight: 600; }
        .stat-card .value { font-size: 32px; font-weight: 700; color: #1e4d8c; }
        .stat-card .sub { font-size: 14px; margin-top: 6px; color: #4b5563; font-weight: 500; }
        .stat-card .sub.green { color: #10b981; }
        .stat-card .sub.red { color: #ef4444; }
        .stat-card.warn { border-top-color: #f59e0b; }
        .stat-card.danger { border-top-color: #ef4444; }

        .filter-bar { background: white; padding: 14px 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
        .search-box { flex: 1; min-width: 200px; position: relative; }
        .search-box input { width: 100%; padding: 7px 12px 7px 34px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 13px; }
        .search-box::before { content: '🔍'; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; }
        .filter-item { display: flex; align-items: center; gap: 5px; }
        .filter-item label { font-size: 12px; color: #4b5563; white-space: nowrap; }
        .filter-item select { padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 12px; }
        .btn { padding: 7px 14px; border-radius: 4px; font-size: 13px; cursor: pointer; border: none; transition: all 0.3s; white-space: nowrap; }
        .btn-primary { background-color: #1e4d8c; color: white; }
        .btn-primary:hover { background-color: #2c5aa0; }
        .btn-secondary { background-color: white; color: #4b5563; border: 1px solid #d1d5db; }
        .btn-secondary:hover { background-color: #f3f4f6; }
        .switch-wrap { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #4b5563; }
        .switch { position: relative; width: 36px; height: 20px; background: #1e4d8c; border-radius: 10px; cursor: pointer; }
        .switch::after { content: ''; position: absolute; top: 2px; left: 18px; width: 16px; height: 16px; background: white; border-radius: 50%; transition: all 0.3s; }
        .switch.off { background: #d1d5db; }
        .switch.off::after { left: 2px; }

        .panel { background: white; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); padding: 20px; }
        .panel-title-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #e5e7eb; }
        .panel-title { font-size: 16px; font-weight: 600; color: #1a365d; }
        .panel-title-meta { font-size: 13px; color: #6b7280; }

        .table-wrapper { overflow-x: auto; }
        .data-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 1600px; }
        .data-table th, .data-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
        .data-table thead th { background-color: #1e4d8c; color: white; font-weight: 600; cursor: pointer; user-select: none; position: sticky; top: 0; z-index: 5; }
        .data-table thead th:hover { background-color: #2c5aa0; }
        .data-table tbody tr:hover { background-color: #f0f7ff; }
        .data-table tbody tr:nth-child(even) { background-color: #f9fafb; }
        .data-table tbody tr:nth-child(even):hover { background-color: #f0f7ff; }
        .data-table tbody tr.row-warn { background-color: #fef2f2; }
        .data-table tbody tr.row-warn:hover { background-color: #fee2e2; }

        .status-online { color: #10b981; font-weight: 500; }
        .status-offline { color: #9ca3af; font-weight: 500; }
        .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
        .dot-green { background: #10b981; }
        .dot-gray { background: #9ca3af; }

        .signal-bar { display: inline-flex; gap: 1px; align-items: flex-end; }
        .signal-bar span { width: 3px; background: #10b981; border-radius: 1px; }
        .signal-weak span:nth-child(n+3) { background: #d1d5db; }

        .badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; }
        .badge-green { background-color: #d1fae5; color: #065f46; }
        .badge-blue { background-color: #dbeafe; color: #1e4d8c; }
        .badge-yellow { background-color: #fef3c7; color: #92400e; }
        .badge-red { background-color: #fee2e2; color: #991b1b; }
        .badge-gray { background-color: #f3f4f6; color: #4b5563; }

        .health-bar { display: inline-flex; align-items: center; gap: 4px; }
        .health-bar-track { width: 50px; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
        .health-bar-fill { height: 100%; border-radius: 3px; }
        .health-bar-val { font-size: 11px; font-weight: 600; }

        .pagination { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 0; }
        .pagination-info { font-size: 12px; color: #6b7280; }
        .pagination-btns { display: flex; gap: 4px; }
        .pagination-btns button { padding: 5px 10px; border: 1px solid #d1d5db; border-radius: 4px; background: white; cursor: pointer; font-size: 12px; }
        .pagination-btns button.active { background-color: #1e4d8c; color: white; border-color: #1e4d8c; }
        .pagination-btns button:disabled { opacity: 0.5; cursor: not-allowed; }

        .table-summary { background: #eef4fb; padding: 10px 16px; border-radius: 6px; font-size: 12px; color: #1a365d; font-weight: 500; margin-top: 10px; display: flex; gap: 24px; }

        .event-list { max-height: 160px; overflow-y: auto; }
        .event-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; align-items: center; }
        .event-item:last-child { border-bottom: none; }
        .event-time { color: #6b7280; font-family: monospace; min-width: 70px; }
        .event-icon { font-size: 14px; }
        .event-desc { color: #374151; flex: 1; }
        .event-tag { font-size: 11px; padding: 2px 6px; border-radius: 4px; }

        /* ===== Tab3 故障告警样式 ===== */
        .t3-time-tabs { display: flex; gap: 4px; }
        .t3-time-tab { padding: 7px 14px; border-radius: 4px; font-size: 14px; cursor: pointer; background: #f3f4f6; color: #6b7280; border: none; transition: all 0.3s; }
        .t3-time-tab.active { background: #1e4d8c; color: white; }

        .t3-row-pending { border-left: 3px solid #ef4444; }
        .t3-row-processing { border-left: 3px solid #f59e0b; }

        .t3-level-severe { background: #fee2e2; color: #991b1b; }
        .t3-level-general { background: #ffedd5; color: #9a3412; }
        .t3-level-info { background: #fef3c7; color: #92400e; }

        .t3-channel-stats { display: flex; flex-direction: column; gap: 8px; }
        .t3-channel-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
        .t3-channel-name { min-width: 80px; color: #374151; font-weight: 500; }
        .t3-channel-bar-wrap { flex: 1; height: 18px; display: flex; border-radius: 3px; overflow: hidden; }
        .t3-channel-bar-seg { display: flex; align-items: center; justify-content: center; font-size: 10px; color: white; }
        .t3-channel-bar-severe { background: #ef4444; }
        .t3-channel-bar-general { background: #f97316; }
        .t3-channel-bar-info { background: #fbbf24; }
        .t3-channel-count { min-width: 50px; text-align: right; color: #6b7280; }

        .t3-action-btn { padding: 3px 8px; border-radius: 3px; font-size: 11px; cursor: pointer; border: 1px solid; margin-right: 4px; white-space: nowrap; }
        .t3-action-process { color: #1e4d8c; border-color: #1e4d8c; background: #eff6ff; }
        .t3-action-detail { color: #4b5563; border-color: #d1d5db; background: white; }
        .t3-action-ignore { color: #9ca3af; border-color: #e5e7eb; background: #f9fafb; }
        .t3-action-btn:hover { opacity: 0.8; }

        /* ===== Tab4 远程运维样式 ===== */
        .t4-sub-tabs { display: flex; gap: 4px; }
        .t4-sub-tab { padding: 8px 16px; border-radius: 4px; font-size: 15px; cursor: pointer; background: #f3f4f6; color: #6b7280; border: none; transition: all 0.3s; }
        .t4-sub-tab.active { background: #1e4d8c; color: white; }
        .t4-subpage { display: none; }
        .t4-subpage.active { display: block; }

        .t4-op-type-config { background: #dbeafe; color: #1e4d8c; }
        .t4-op-type-control { background: #ffedd5; color: #9a3412; }
        .t4-op-type-firmware { background: #ede9fe; color: #6d28d9; }
        .t4-op-type-diag { background: #d1fae5; color: #065f46; }
        .t4-op-type-batch { background: #f3f4f6; color: #4b5563; }

        .t4-fw-status-queued { background: #f3f4f6; color: #4b5563; }
        .t4-fw-status-downloading { background: #dbeafe; color: #1e4d8c; }
        .t4-fw-status-installing { background: #ffedd5; color: #9a3412; }
        .t4-fw-status-done { background: #d1fae5; color: #065f46; }
        .t4-fw-status-failed { background: #fee2e2; color: #991b1b; }

        .t4-diag-healthy { background: #d1fae5; color: #065f46; }
        .t4-diag-subhealthy { background: #fef3c7; color: #92400e; }
        .t4-diag-abnormal { background: #fee2e2; color: #991b1b; }

        .t4-progress-cell { display: flex; align-items: center; gap: 4px; }
        .t4-progress-track { width: 60px; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
        .t4-progress-fill { height: 100%; border-radius: 3px; }

        /* Embedded模式 */
        html, body.embedded { height: 100%; min-height: 0; max-height: 100%; overflow: hidden; }
        body.embedded .header { display: none; }
        body.embedded .sidebar { display: none; }
        body.embedded .container { flex: 1; min-height: 0; height: 100%; overflow: hidden; }
        body.embedded .container > .main-content { flex: 1; min-height: 0; min-width: 0; height: 100%; overflow-y: auto; overflow-x: hidden; overflow-anchor: none; padding: 16px; }
