:root {
    --primary: #1565c0;
    --primary-dark: #0d47a1;
    --primary-light: #e3f2fd;
    --success: #43a047;
    --warning: #fb8c00;
    --danger: #e53935;
    --info: #039be5;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #5a6478;
    --border: #e1e8f0;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 30px rgba(21,101,192,0.12);
}

* { box-sizing: border-box; }

/* 【2026-10-07】锁死页面级滚动：整页严格贴合视口，移动端地址栏不再撑出多余高度导致整页上下滑动 */
html, body { height: 100%; overflow: hidden; }

body {
    margin: 0;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

/* 状态徽章（现置于数据明细 tab 工具栏，浅色风格适配白卡片） */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.status-badge.idle { background: #eef2f7; color: var(--text-secondary); }
.status-badge.running { background: var(--info); color: #fff; border-color: var(--info); }
.status-badge.done { background: var(--success); color: #fff; border-color: var(--success); }
.status-badge.error { background: var(--danger); color: #fff; border-color: var(--danger); }
.status-badge.waiting,
.status-badge.waiting_captcha { background: var(--warning); color: #fff; border-color: var(--warning); }
.status-badge.stopped { background: #eef2f7; color: var(--text-secondary); border-color: #d8dee6; }

/* 抓取进度条（紧贴状态徽章右侧，仅 running 时显示） */
.status-progress {
    display: inline-flex;
    align-items: center;
    min-width: 110px;
    height: 22px;
    padding: 0 8px;
    border-radius: 20px;
    background: #eef2f7;
    color: var(--text-secondary);
    font-size: 11px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}
.status-progress-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, var(--info), var(--primary, #5e72e4));
    transition: width 0.4s ease;
    opacity: 0.85;
}
.status-progress-text {
    position: relative;
    z-index: 1;
    margin-left: auto;
    font-weight: 500;
}
.status-progress.is-done .status-progress-bar { background: var(--success); }
.status-progress.is-error .status-progress-bar { background: var(--danger); }

/* 第十三+四轮新增：实时等待阶段文字「⏱ 等待门户落地 8.2s / 25s (32%)」*/
.status-wait-text {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #fff7e6;
    color: #b56b00;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #ffe7ba;
    white-space: nowrap;
    font-family: var(--font-mono, 'SF Mono', Consolas, monospace);
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    flex-shrink: 0;
    gap: 8px;
}

.tab-btn {
    padding: 14px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover { color: var(--primary); background: var(--primary-light); }

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--primary-light);
}

.tab-btn svg { fill: currentColor; }

/* Content */
.content {
    flex: 1;
    overflow: hidden;
    padding: 20px 28px;
}

.tab-panel { display: none; height: 100%; overflow-y: auto; overflow-x: hidden; }
.tab-panel.active { display: block; }

/* Layout */
.analysis-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 16px;
    height: calc(100dvh - 100px);
    align-items: stretch;
}

/* 用户名/密码 合并到同一行 */
.form-row.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.left-column {
    gap: 8px;
    height: 100%;
    overflow: hidden;
}
.right-column {
    gap: 16px;
    height: 100%;
    overflow: auto;
}

/* Card */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    transition: box-shadow 0.2s;
    border: 1px solid var(--border);
}

.card:hover { box-shadow: var(--shadow-hover); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-header .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

/* 数据抓取时间标识（明细筛选卡片头，区分不同批次） */
.scrape-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light, #e8f0fe);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
}

.badge-primary {
    background: var(--primary);
    color: #fff;
}

/* Form */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
}

.required { color: var(--danger); }

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 10px;
    color: var(--text-secondary);
    fill: currentColor;
    z-index: 1;
}

input[type="text"], input[type="password"], input[type="datetime-local"], input[type="date"], input[type="month"], select {
    padding: 9px 12px 9px 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    width: 100%;
    background: #fff;
}

/* 【2026-10-17 用户】日期/月份输入框无左侧图标（34px 是给 select 的 svg 留的），
   顶掉左内距；显式 38px 与 select 同高，修复设备总结工具栏日期框比下拉矮一截、底对齐后
   顶部空出 17px 的「日期行未对齐」问题。设置页/指标页等自有规则（ID/类作用域）优先级更高，不受影响。 */
input[type="date"], input[type="month"] {
    padding: 9px 10px;
    height: 38px;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21,101,192,0.1);
}

.datetime-row, .file-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.datetime-row .input-wrap, .file-row .input-wrap { flex: 1; }

.datetime-row input { padding-right: 8px; }

/* Buttons */
.btn {
    padding: 9px 16px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}

.btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(21,101,192,0.1);
}

.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
/* 一键筛选按钮处于筛选中状态时的高亮 */
#btn-quick-filter.active {
    background: #c62828;
    border-color: #c62828;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.25);
}

.btn-secondary {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: #fff; }

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--primary-light); color: var(--primary); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: #fdecea; color: var(--danger); border-color: transparent; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon { padding: 8px 10px; }

.btn svg { fill: currentColor; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* 抓取/停止/最近7天/本月数据 四个按钮在一行显示，宽度缩小 */
.action-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.action-row .btn {
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    flex: 0 0 auto;
    gap: 4px;
}
.action-row .btn-scrape,
.action-row .btn-stop { padding: 6px 12px; }
.action-row .btn-range { padding: 6px 10px; }
/* 【2026-10-04 第14轮】抓取页顶部参数区压缩为 2 行：开关并入按钮行，
   「取数方式」下拉缩小。仅作用于抓取页统一参数卡（.hub-params-card），不影响模块卡克隆。 */
.hub-params-card .action-row { flex-wrap: wrap; row-gap: 4px; }
.hub-params-card .action-row .hub-param-hint { margin-left: auto; }
.hub-params-card .fetch-mode-wrap { font-size: 11px; gap: 4px; }
.hub-params-card .fetch-mode-wrap select { font-size: 11px; padding: 1px 3px; height: auto; min-width: 0; }
/* 提高优先级，确保克隆面板（也在 .query-card 内）也用紧凑尺寸 */
.query-card .action-row .btn { padding: 6px 10px; font-size: 12px; }
.query-card .action-row .btn-scrape,
.query-card .action-row .btn-stop { padding: 6px 12px; }
/* 同一行右侧的勾选开关更紧凑，避免换行 */
.form-actions .toggles { gap: 10px; }
.form-actions .check-inline { font-size: 12px; }

.toggles {
    display: flex;
    gap: 14px;
    margin-left: auto;
}

.check-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
}

.check-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Stats */
.empty-stats {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-secondary);
}

.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-stats h3 { margin: 0 0 8px; color: var(--text); }
.empty-stats p { margin: 0; max-width: 400px; margin: 0 auto; }

.stats-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.stats-card-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.stats-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, minmax(96px, 1fr));
    gap: 6px;
    margin-bottom: 0;
    overflow-x: auto;
}

.stat-item {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 6px;
    min-width: 0;
    text-align: center;
}

.stat-item:hover { border-color: var(--primary); }

.stat-label {
    color: var(--text-secondary);
    font-size: 11px;
    white-space: nowrap;
}

.stat-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-den {
    color: #555;
    font-size: 11px;
    white-space: nowrap;
}

/* 【v1.9.29】统计概览复用 .hz-kpi 大数字瓦片（7 列网格内紧凑版） */
.stats-grid .hz-kpi { flex: none; padding: 6px 4px 5px; border-radius: 6px; }
.stats-grid .hz-kpi .hz-kpi-num { font-size: 19px; }
.stats-grid .hz-kpi-den { font-style: normal; font-size: 11px; font-weight: 400;
    color: #64748b; margin-left: 2px; }

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.chart-box {
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.chart-box.wide { grid-column: 1 / -1; }

.chart-box h3 {
    font-size: 14px;
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.chart-wrap {
    height: 240px;
    position: relative;
}

.report-link { margin-top: 20px; }
.report-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.report-link a:hover { text-decoration: underline; }

/* 运行日志：恢复至左侧列，与查询条件共享左侧面板 */
.logs-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.logs-card .card-header {
    padding: 10px 12px 0;
    border: none;
    margin: 0;
    flex-shrink: 0;
}
.logs-card h2 { font-size: 14px; }

#log-view,
[data-role="log-view"] {
    margin: 0;
    padding: 10px 12px 12px;
    flex: 1;
    overflow: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 0 0 var(--radius) var(--radius);
}

.log-line { display: block; }
.log-line.error { color: #f38ba8; }
.log-line.warn { color: #fab387; }
.log-line.info { color: #89dceb; }
.log-line.success { color: #a6e3a1; }

/* Detail */
.detail-card { padding: 0; display: flex; flex-direction: column; height: calc(100dvh - 210px); }

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.detail-title { display: flex; align-items: center; gap: 12px; }
.detail-title h2 { margin: 0; font-size: 16px; }
.detail-info { color: var(--text-secondary); font-size: 13px; }

.detail-toolbar { display: flex; align-items: center; gap: 10px; }

.table-wrap {
    flex: 1;
    overflow: auto;
    border: 1px solid var(--border);
    border-left: none;
    border-right: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: var(--text);
}

th:hover { background: #eef2f7; }

th svg { fill: currentColor; vertical-align: middle; }

tr:hover { background: #f8fafc; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 4px 10px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    font-size: 11px;
    line-height: 1.3;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.pagination .btn {
    padding: 2px 8px;
    font-size: 11px;
    white-space: nowrap;
    min-width: 50px;
    flex: 0 0 auto;
}

.pagination select {
    padding: 2px 6px;
    font-size: 11px;
    white-space: nowrap;
    width: auto;
    min-width: 0;
    max-width: 68px;
    flex: 0 0 auto;
}

#page-info, #filter-page-info { color: var(--text-secondary); font-size: 11px; white-space: nowrap; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 28, 54, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }

.modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    width: 440px;
    max-width: 92vw;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--primary-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover { color: var(--danger); }

.modal-body { padding: 20px; }
.diag-modal { width: 720px; max-width: 92vw; max-height: 80vh; display: flex; flex-direction: column; }
.diag-modal .modal-body { display: flex; flex-direction: column; overflow: hidden; }
.diag-hint { margin: 0 0 10px; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.diag-body {
    flex: 1;
    margin: 0;
    padding: 14px;
    border-radius: 8px;
    background: var(--bg, #f6f8fb);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono, 'SF Mono', Consolas, monospace);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    overflow: auto;
    max-height: 56vh;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 20px 20px;
}

/* Captcha */
.captcha-modal { width: 400px; }
.captcha-image-wrap {
    background: #f0f2f5;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    margin-bottom: 14px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#captcha-img { max-width: 100%; height: auto; display: block; }

#captcha-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.captcha-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .panel-layout { grid-template-columns: 1fr; }
    .left-column { max-width: 100%; }
}

@media (max-width: 768px) {
    .app-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .header-actions { width: 100%; justify-content: flex-end; }
    .form-actions { flex-direction: column; align-items: stretch; }
    .toggles { margin-left: 0; }
}

/* 【2026-10-07】窄屏（手机/小平板）：收一点侧栏宽度与内边距，避免内容被挤出现横向滑动 */
@media (max-width: 600px) {
    .nav-tree { width: 120px; }
    .content { padding: 12px; }
}

/* 明细筛选表头列宽拖拽抓手 */
.col-resizer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    z-index: 2;
    background: transparent;
    transition: background 0.15s;
}
.col-resizer:hover { background: rgba(21, 101, 192, 0.25); }

/* ===== 任务46：左侧查询条件紧凑化 + 右侧明细横向可滚动 ===== */
.query-card { padding: 16px; }
.query-card .form-grid { gap: 10px; }
.query-card .form-group { gap: 4px; }
.query-card .form-group label { font-size: 12px; }
.query-card input[type="text"],
.query-card input[type="password"],
.query-card input[type="datetime-local"] { padding: 7px 10px 7px 32px; font-size: 13px; }
.query-card .form-actions { margin-top: 14px; padding-top: 12px; gap: 8px; }
.query-card .btn { padding: 7px 12px; font-size: 13px; }
.query-card .toggles { gap: 10px; }
.query-card .check-inline { font-size: 12px; }

/* 右侧明细筛选表格：强制横向滚动，列不再被压缩挤变形 */
.right-column { min-width: 0; }
/* ===== 图表并排一行显示（删除状态分布图后保留 3 张）===== */
.charts-row {
    display: grid;
    grid-template-columns: 1.8fr 1.1fr 1.1fr;
    gap: 12px;
    overflow-x: auto;
}
.charts-row .chart-box { padding: 12px; min-width: 360px; }
.charts-row .chart-box h3 { font-family: SimSun, "宋体", "Noto Serif SC", serif; font-size: 13px; margin-bottom: 8px; }

.chart-title-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.legend-dot {
    font-size: 11px;
    color: var(--legend-color);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
}

.legend-dot::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--legend-color);
}

/* 图例容器（状态种类动态生成） */
.legend-inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 4px;
}

/* 业务模块 Tab 右侧占位区（待接入数据） */
.module-slot { min-height: 420px; }

.charts-row .chart-wrap { height: 200px; }

@media (max-width: 1400px) {
    /* 窄屏时横向滚动查看三张图，保证并排不换行 */
    .charts-row { grid-template-columns: repeat(3, minmax(360px, 1fr)); }
}

/* ===== 任务45：列头下拉多选筛选控件 ===== */
.ms-box { position: relative; }
.ms-btn {
    width: 100%;
    box-sizing: border-box;
    font-weight: 400;
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ms-btn:hover { border-color: var(--primary); }
.ms-btn.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }

/* ===== 顶部全局登录栏（新增） ===== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    background: var(--card-bg);
    border-bottom: none;
    flex-shrink: 0;
}
.app-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 【2026-10-15】顶部按钮不参与 flex 压缩：防止窄屏/高缩放下「一键更新系统」等文字被挤压显示不全 */
.app-header .header-actions .btn { flex-shrink: 0; }
.header-actions .header-input { width: 140px; }
.header-actions .header-input input { width: 100%; }

/* ===== 一般检维修作业表单（新增） ===== */
.maint-head, .maint-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(92px, 1fr));
    gap: 6px;
    align-items: center;
}
.maint-head {
    padding: 8px 6px;
    background: var(--primary-light, #e8f0fe);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
}
.maint-col-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}
.maint-rows {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}
.maint-row { padding: 6px; border-bottom: 1px solid var(--border); }
.maint-row:last-child { border-bottom: none; }
.maint-cell { min-width: 0; }
.maint-cell .input-wrap { width: 100%; }
.maint-cell input[type="text"], .maint-cell input[type="datetime-local"] { width: 100%; font-size: 12px; padding: 6px 8px; }
.maint-file { width: 100%; font-size: 11px; }
.maint-actions { display: flex; gap: 10px; margin-top: 12px; }
.ms-panel {
    display: none;
    position: fixed;
    z-index: 2000;
    width: 230px;
    max-height: 320px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    padding: 8px;
    flex-direction: column;
    gap: 6px;
}
.ms-panel.open { display: flex; }
.ms-search {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px !important;
    font-size: 12px !important;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.ms-actions { display: flex; justify-content: flex-end; }
.ms-link { font-size: 12px; color: var(--primary); cursor: pointer; }
.ms-link:hover { text-decoration: underline; }
.ms-list { overflow-y: auto; max-height: 230px; display: flex; flex-direction: column; }
.ms-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    border-radius: 4px;
}
.ms-item:hover { background: var(--primary-light); }
.ms-item input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.ms-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-loading { font-size: 12px; color: var(--text-secondary); padding: 8px; text-align: center; }

/* ===== 任务49：验证码弹窗置于最顶层，避免被遮挡不易发现 ===== */
#captcha-overlay { z-index: 5000; }
.captcha-modal { box-shadow: 0 24px 60px rgba(0,0,0,0.4); }

/* ===== 任务52/53：删除标题栏后整体排版紧凑化 ===== */
.tabs { padding: 0 12px; gap: 6px; }
.tab-btn { padding: 8px 16px; }
.content { padding: 10px 14px; }
.card { padding: 12px; }
.card-header { margin-bottom: 10px; padding-bottom: 8px; }
.card-header h2 { font-size: 15px; }
.detail-header { padding: 10px 14px; }
.detail-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-toolbar-left { display: flex; align-items: center; gap: 10px; }
.detail-toolbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* 运行日志文本框：左列撑满后与右侧框架底部对齐，可滚动 */
.logs-card { min-height: 0; }
#log-view,
[data-role="log-view"] {
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ===== 一般检维修作业：批量操作栏 + 复选框 + 视觉优化（追加，不修改原有样式） ===== */
/* 13 列网格：复选框列固定窄宽；属地单位/作业负责人/作业人数/辖区联系人收窄 */
.maint-head, .maint-row {
    grid-template-columns:
        46px
        minmax(150px, 1.1fr)   /* 申请日期 */
        minmax(150px, 1fr)     /* 时间起 */
        minmax(150px, 1fr)     /* 时间止 */
        minmax(110px, 0.9fr)   /* 申请项目 */
        minmax(92px, 0.7fr)    /* 属地单位（窄） */
        minmax(92px, 0.7fr)    /* 作业负责人（窄） */
        minmax(112px, 0.9fr)   /* 作业地点1 */
        minmax(112px, 0.9fr)   /* 作业地点2 */
        minmax(60px, 0.5fr)    /* 作业人数（窄） */
        minmax(92px, 0.7fr)    /* 辖区联系人（窄） */
        minmax(120px, 0.95fr)  /* 联系人电话 */
        minmax(120px, 1fr);    /* SJP档案上传 */
}
.maint-head { border-radius: 0; }
.maint-col-check, .maint-cell-check {
    display: flex; align-items: center; justify-content: center;
}
.maint-col-check input, .maint-cell-check input {
    width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer;
}
/* 顶部批量操作栏 */
.maint-batchbar {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
    padding: 10px 12px; margin: 0;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border); border-bottom: none; border-radius: 0;
}
.batch-group { display: flex; flex-direction: column; gap: 4px; }
.batch-group > label { font-size: 12px; color: var(--text-secondary); }
.batch-datetime { width: 190px; }
.batch-rowcount { width: 72px; }
.maint-batchbar .btn { align-self: flex-end; }
/* 表格隔行底色 + 悬浮高亮 */
.maint-rows .maint-row:nth-child(even) { background: #f6f8fa; }
.maint-rows .maint-row:hover { background: #eef4ff; }
/* 输入框高度统一 */
.maint-rows .maint-row input[type="text"],
.maint-rows .maint-row input[type="datetime-local"] { height: 32px; box-sizing: border-box; }
/* 空状态兜底 */
.maint-empty {
    padding: 18px; text-align: center; color: var(--text-secondary); font-size: 13px;
    border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius);
}
/* 删除 / 批量按钮禁用态 */
.maint-actions .btn:disabled, .maint-batchbar .btn:disabled {
    opacity: .5; cursor: not-allowed;
}

/* ===== 设置 Tab / 基础信息（新增，追加，不修改原有样式） ===== */
.sub-tabs {
    display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.sub-tab-btn {
    padding: 8px 16px; background: none; border: none; border-bottom: 2px solid transparent;
    font-size: 13px; color: var(--text-secondary); cursor: pointer;
}
.sub-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.sub-tab-panel { display: none; }
.sub-tab-panel.active { display: block; }
.basic-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px;
}
.basic-item { display: flex; flex-direction: column; gap: 6px; }
.basic-item > label { font-size: 13px; font-weight: 600; color: var(--text); }
.basic-item textarea {
    width: 100%; box-sizing: border-box; min-height: 72px; resize: vertical;
    padding: 8px; font-size: 13px; line-height: 1.5;
    border: 1px solid var(--border); border-radius: var(--radius); font-family: inherit;
}
.basic-item textarea:focus { outline: none; border-color: var(--primary); }
/* 一般检维修作业：可下拉选择的窄列输入框（手填 + 选择） */
.maint-input-sm { font-size: 12px; }

/* ===== 报警智能分析卡片（2026-09-11）===== */
.ai-card { padding: 18px 20px 22px; }
.ai-card .stats-card-header { margin-bottom: 4px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 14px; }
.ai-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 13px;
    border-radius: 999px; background: #eef2f7; color: var(--text-secondary);
    font-size: 12px; border: 1px solid var(--border); }
.ai-chip b { font-size: 17px; font-weight: 700; color: var(--text); }
.ai-chip.good { background: #e8f6ec; color: #1b6e3c; border-color: #cbe9d6; }
.ai-chip.good b { color: #1b6e3c; }
.ai-chip.warn { background: #fff4e0; color: #9a5b00; border-color: #ffe3b8; }
.ai-chip.warn b { color: #9a5b00; }
.ai-chip.risk { background: #fde2e2; color: #b00020; border-color: #f8cccc; }
.ai-chip.risk b { color: #b00020; }

.ai-list { display: flex; flex-direction: column; gap: 8px; }
.ai-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 13px;
    border-radius: 6px; border-left: 4px solid var(--border); background: #f7f9fc; }
.ai-item.risk { background: #fde2e2; border-left-color: #b00020; }
.ai-item.warn { background: #fff4e0; border-left-color: var(--warning); }
.ai-item.good { background: #e8f6ec; border-left-color: var(--success); }
.ai-item.info { background: #eaf2fb; border-left-color: var(--primary); }
.ai-item-title { font-weight: 600; font-size: 13px; color: var(--text); }
.ai-item-detail { font-size: 13px; color: var(--text-secondary); line-height: 1.65; }
.ai-empty { padding: 14px; color: var(--text-secondary); font-size: 13px; text-align: center; }

/* ============ 【v1.9.60】预警框（红/橙/黄三级）+ 评价模块 ============ */
/* 预警框：整卡浅色底 + 色条，红=立即处理 / 橙=尽快处理 / 黄=提示；
   Y8 看板深蓝注入页同样成立（浅底卡片浮于深蓝上，色条+深字保可读）。 */
.warn-box { margin: 0 0 12px; }
.warn-box-inner { border: 1px solid var(--border); border-radius: 8px; background: #fffdf8;
    padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.warn-box-head { font-size: 13px; font-weight: 700; color: var(--text); display: flex;
    align-items: center; gap: 8px; flex-wrap: wrap; }
.wb-h { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.wb-h.red { background: #fde2e2; color: #b00020; }
.wb-h.orange { background: #fff4e0; color: #9a5b00; }
.wb-h.yellow { background: #fdf6d8; color: #8a6d00; }
.warn-item { display: flex; flex-direction: column; gap: 3px; padding: 8px 11px;
    border-radius: 6px; border-left: 4px solid var(--border); background: #f7f9fc; }
.warn-item.red { background: #fde2e2; border-left-color: #b00020; }
.warn-item.orange { background: #fff4e0; border-left-color: #e8862b; }
.warn-item.yellow { background: #fdf6d8; border-left-color: #d9b80c; }
.warn-item-title { font-weight: 600; font-size: 13px; color: var(--text); }
.warn-item-detail { font-size: 13px; color: var(--text-secondary); line-height: 1.65; }

/* 评价模块：指标 / 数值 / 点评 三列表 */
.eval-table-wrap { margin-top: 12px; }
.eval-table-wrap-inner { border: 1px solid var(--border); border-radius: 8px; background: #fbfcfe;
    padding: 10px 12px; }
.eval-table-head { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.eval-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eval-table th { text-align: left; padding: 6px 10px; color: var(--text-secondary); font-weight: 600;
    border-bottom: 1px solid var(--border); background: #f2f6fb; }
.eval-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.eval-table tr:last-child td { border-bottom: none; }
.eval-name { font-weight: 600; color: var(--text); white-space: nowrap; }
.eval-value { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.eval-comment { color: var(--text-secondary); line-height: 1.6; }
.eval-row.good .eval-value { color: var(--success); }
.eval-row.warn .eval-value { color: #9a5b00; }
.eval-row.risk .eval-value { color: #b00020; }

.ai-block { margin-top: 18px; }
.ai-block-title { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.ov-block { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.ov-row { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0; font-size: 13px; }
.ov-label { flex: 0 0 92px; color: var(--text-secondary); font-weight: 600; }
.ov-row > b { color: var(--primary); font-variant-numeric: tabular-nums; }
.ov-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-tag { display: inline-block; background: #eef2ff; color: #1e3a8a; border: 1px solid #d6e0ff; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.ov-tag b { color: #1d4ed8; font-variant-numeric: tabular-nums; }

/* ===== 【v1.9.28c】报警管理：产线统计矩阵 + 报警智能分析 左右并排（高度对齐）=====
   【v1.9.28d】左列＝「矩阵 + 重复报警明细」上下两卡（同宽对齐），右列＝AI 智能分析；
   AI 卡 flex stretch 自动与左列两卡**底部对齐**。 */
.alarm-split-row { display: flex; gap: 14px; align-items: stretch; margin-bottom: 16px; }
.alarm-split-row .alarm-col-main { flex: 1.7 1 0; min-width: 0; display: flex;
    flex-direction: column; gap: 14px; }
.alarm-split-row .alarm-col-main > .card { margin-bottom: 0; }
.alarm-split-row .alarm-half-side { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
.alarm-split-row .table-wrap { max-height: 520px; overflow: auto; }
/* 矩阵 12 列在加宽后的卡内铺满：表头允许换行、内边距收紧，保证「明文全显」不横滚 */
.alarm-col-main .ai-table-line th { white-space: normal; line-height: 1.25; padding: 5px 5px; }
.alarm-col-main .ai-table-line td { padding: 5px 5px; }
/* AI 智能分析：拉高后结论区占满剩余高度，重点结论尽量展开（不留大片空白） */
.alarm-half-side { display: flex; flex-direction: column; }
.alarm-half-side .ai-chips { flex: 0 0 auto; }
.alarm-half-side .ai-list { flex: 1 1 auto; }
/* 【v1.9.28d】「超 24 小时」状态筛选钮：未处理 / 处理中（可多选切换，默认只看未处理） */
.o24-seg { display: inline-flex; gap: 6px; margin-left: 10px; }
.o24-btn { padding: 2px 12px; font-size: 12px; line-height: 1.6; border: 1px solid var(--border);
    border-radius: 999px; background: #f4f6fa; color: var(--text-secondary); cursor: pointer;
    user-select: none; }
.o24-btn:hover { border-color: #93b4e8; color: var(--text); }
.o24-btn.on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; font-weight: 600; }
/* 窄屏：左右分栏回落上下堆叠 */
@media (max-width: 1180px) {
    .alarm-split-row { flex-direction: column; }
    .alarm-split-row .alarm-col-main, .alarm-split-row .alarm-half-side { flex: 1 1 auto; width: 100%; }
}
/* 超24h未处理 / 重复报警表：内容列超长截断（悬停看全文） */
.dup-content { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 【2026-10-16 用户】重复报警表：fixed 布局 + JS 注入 colgroup 百分比列宽（产线/设备名称/报警内容/重复次数/责任人/最近发生） */
#alarm-dup-table { table-layout: fixed; width: 100%; }
#alarm-dup-table th, #alarm-dup-table td {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
/* 【2026-10-17 用户】未处理明细表改 12 列（报警内容前加设备、责任工场→报警次数、末尾加报警时长）：
   fixed + JS 注入 colgroup px 列宽（总宽 ~1194px，超容器由 .table-wrap 横滚，长文本列不被压扁）；
   首列（报警编号）sticky 保行身份——三态底色必须不透明，否则横滚时透出下方行。 */
#alarm-unproc-table { table-layout: fixed; width: 100%; }
#alarm-unproc-table th, #alarm-unproc-table td {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
#alarm-unproc-table th:first-child, #alarm-unproc-table td:first-child {
    position: sticky; left: 0; z-index: 1; background: #fff;
}
#alarm-unproc-table thead th:first-child { background: #eef2f7; z-index: 2; }
html[data-tbl-zebra="on"] #alarm-unproc-table tbody tr:nth-child(even) td:first-child { background: #f7f9fd; }
#alarm-unproc-table tbody tr:hover td:first-child { background: #eaf2fb; }
.ai-card .table-wrap { max-height: 340px; overflow: auto; border: 1px solid var(--border);
    border-radius: 6px; }
.ai-card table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ai-card table th, .ai-card table td { padding: 6px 9px; border-bottom: 1px solid var(--border);
    text-align: center; white-space: nowrap; }
.ai-card table th { background: #eef2f7; color: var(--text-secondary); font-weight: 600;
    position: sticky; top: 0; z-index: 1; }
.ai-card table tbody tr:hover { background: #f7f9fc; }
.ai-card table td:first-child { text-align: left; max-width: 320px; overflow: hidden;
    text-overflow: ellipsis; }
.cell-risk { color: #b00020; font-weight: 700; }
.cell-warn { color: #9a5b00; font-weight: 700; }


/* ===== 业务模块（隐患/点检/检修）右侧栏面板：条形分布 + 迷你趋势 ===== */
.ai-chip em { font-style: normal; font-size: 12px; opacity: .75; margin-left: 2px; }
.mod-bars { display: flex; flex-direction: column; gap: 6px; }
.mod-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.mod-bar-name { flex: 0 0 168px; max-width: 168px; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; color: var(--text-secondary); }
.mod-bar-track { flex: 1 1 auto; height: 10px; background: #eef2f7; border-radius: 5px; overflow: hidden; }
.mod-bar-track i { display: block; height: 100%; border-radius: 5px;
    background: linear-gradient(90deg, #1565c0, #43a047); }
.mod-bar-val { flex: 0 0 104px; text-align: right; color: var(--text); font-weight: 600; }
.mod-bar-val em { font-style: normal; font-weight: 400; color: var(--text-secondary); margin-left: 4px; }
.mod-trend { display: flex; align-items: flex-end; gap: 3px; height: 96px; padding: 6px 2px;
    background: #f7f9fc; border: 1px solid var(--border); border-radius: 6px; }
.mod-trend i { flex: 1 1 0; min-width: 3px; background: linear-gradient(180deg, #42a5f5, #1565c0);
    border-radius: 2px 2px 0 0; }
.mod-trend-axis { display: flex; justify-content: space-between; font-size: 11px;
    color: var(--text-secondary); margin-top: 4px; }

/* ===== 报警智能分析：精简后的折叠提示行（2026-09-12）===== */
.ai-more { margin-top: 6px; font-size: 12px; color: var(--text-secondary); }

/* ===================== 左侧树形导航（替代原横向 Tab 栏） ===================== */
.app-body { flex: 1; display: flex; min-height: 0; }
.nav-tree {
    /* 【2026-10-07 用户再次要求变窄】210 → 168 → 150px → 140px */
    width: 140px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 10px 8px;
    overflow-y: auto;
}
.nav-group { margin-bottom: 2px; }
.nav-node {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text-secondary);
    transition: background .15s, color .15s;
}
.nav-node:hover { background: var(--primary-light); color: var(--primary); }
.nav-node.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
/* 【2026-10-03 新增】看板页面可见性：设置页未勾选的页面在此隐藏。
   用 !important 是为了压过 navApplySearch 写的行内 style.display，
   保证「配置隐藏」永远优先于「临时搜索过滤」。 */
.pg-hidden { display: none !important; }
.nav-icon { fill: currentColor; flex-shrink: 0; opacity: .85; }
.nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-caret {
    width: 0;
    height: 0;
    flex-shrink: 0;
    margin-left: 2px;
    border-left: 4px solid currentColor;
    border-top: 3.5px solid transparent;
    border-bottom: 3.5px solid transparent;
    transition: transform .18s;
}
.nav-group.open > .nav-parent .nav-caret { transform: rotate(90deg); }
.nav-children { display: none; padding-left: 20px; }
.nav-group.open > .nav-children { display: block; }
.nav-child { font-size: 13px; padding: 8px 10px; }
.nav-leaf { margin-top: 2px; }
.nav-divider { height: 1px; background: var(--border); margin: 8px 6px; }

/* ===================== 数据抓取：模块卡片网格（2 行 × 4 个） ===================== */
.scrape-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.scrape-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow .18s, border-color .18s;
}
.scrape-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.scrape-card.disabled { opacity: .6; }
.scrape-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.scrape-card-name { font-weight: 600; font-size: 14px; color: var(--text); }
.scrape-tag { font-size: 11px; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.scrape-tag.ok { background: var(--primary-light); color: var(--primary); }
.scrape-tag.pending { background: #eef2f7; color: var(--text-secondary); }
.scrape-card-desc { font-size: 12px; color: var(--text-secondary); min-height: 32px; line-height: 1.4; }
.scrape-card-foot { margin-top: auto; }
.hub-params-card .form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}
@media (max-width: 1180px) {
    .scrape-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hub-params-card .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ===================== 总览：模块关键指标占位（2026-09-14） ===================== */
.overview-card { padding: 16px; }
.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.ov-card {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 12px;
    background: #fafbfd;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 92px;
}
.ov-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ov-card-no {
    font-size: 11px; padding: 1px 7px; border-radius: 6px;
    background: var(--primary-light); color: var(--primary); white-space: nowrap;
}
.ov-card-name { font-weight: 600; font-size: 13.5px; color: var(--text); }
.ov-card-metrics { font-size: 12px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 6px 12px; }
.ov-todo { color: var(--text-secondary); opacity: .75; }
.ov-metric { display: inline-flex; align-items: baseline; gap: 4px; }
.ov-metric b { font-size: 16px; color: var(--text); }
.ov-metric em { font-style: normal; font-size: 11px; color: var(--text-secondary); }

/* ===================== 单列布局（业务 Tab 去掉左侧查询栏后） ===================== */
.panel-layout.single-col { grid-template-columns: minmax(0, 1fr); }
.stack-col { display: flex; flex-direction: column; gap: 16px; }

/* ===================== 数据抓取：顶部统一参数条 ===================== */
.hub-bar .hub-bar-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.hub-bar .hub-bar-head h2 { font-size: 15px; }
.hub-bar .hub-bar-head .hint { margin-left: auto; }

/* ===================== 数据抓取：模块卡片入参 + 状态色块 ===================== */
.scrape-card-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 8px;
    align-items: center;
}
.scrape-card-body .sc-label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.sc-input {
    width: 100%;
    padding: 5px 8px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    color: var(--text);
    background: var(--card-bg);
}
.sc-input:focus { outline: none; border-color: var(--primary); }
.sc-dt { display: flex; gap: 4px; align-items: center; }
.btn-xs { padding: 4px 6px !important; font-size: 12px !important; line-height: 1; }
.scrape-card-result { font-size: 12px; color: var(--text-secondary); min-height: 16px; }

.mod-status {
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 20px;
    color: #fff;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: .3px;
    flex-shrink: 0;
}
.mod-status.idle { background: #43a047; }       /* 绿：就绪 / 可抓取 */
.mod-status.running { background: #1565c0; }    /* 蓝：执行中 */
.mod-status.done { background: #1a1a2e; }       /* 黑：完成 */
.mod-status.error { background: #e53935; }      /* 红：出错 */
.mod-status.pending { background: #9aa4b2; }    /* 灰：待接入 */
.mod-status.running { animation: modPulse 1.2s ease-in-out infinite; }
@keyframes modPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.scrape-card-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; }
.btn-scrape-all { display: inline-flex; align-items: center; gap: 4px; }
.btn-scrape-all svg { fill: currentColor; }

@media (max-width: 1180px) {
    .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== 2026-09-14 微调：树宽 / 图表等宽 / 日志限高 / 明细报表切换 ===== */

/* 1) 左侧树形导航变窄，把横向空间让给右侧展示区 */
.nav-tree { width: 150px; padding: 10px 5px; }
.nav-node { padding: 7px 7px; gap: 5px; font-size: 12.5px; }
.nav-children { padding-left: 14px; }
.nav-child { padding: 7px 8px; font-size: 12.5px; }

/* 2) 报警统计 3 张图等宽：修复中间「报警趋势」日期标签互相重叠、显示不开
      （原 1.8fr/1.1fr/1.1fr 只给中间图 ~228px，且有 min-width:360px 强制横向滚动） */
.charts-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
}
.charts-row .chart-box { padding: 10px; min-width: 0; }
.charts-row .chart-wrap { height: 220px; }
@media (max-width: 1160px) {
    .charts-row { grid-template-columns: minmax(0, 1fr); }
}

/* 3) 数据抓取：运行日志限高，避免日志越长页面被拉得越长 */
.logs-card { max-height: 320px; }
#log-view,
[data-role="log-view"] { max-height: 240px; min-height: 120px; }

/* 4) 数据明细：右侧「报表切换」卡片 */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 168px;
    gap: 12px;
    align-items: start;
}
.report-switch-card { padding: 12px; position: sticky; top: 0; }
.report-switch-card .card-header { margin-bottom: 8px; padding-bottom: 6px; }
.report-switch-card h2 { font-size: 14px; }
.report-switch-card .hint { display: block; margin-top: 8px; font-size: 11.5px; line-height: 1.5; }
.report-switch-list { display: flex; flex-direction: column; gap: 6px; }
.rs-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    align-items: flex-start;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--card-bg);
    border-radius: 8px;
    padding: 7px 9px;
    font-family: inherit;
    transition: background .15s, border-color .15s, color .15s;
}
.rs-item:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-light); }
.rs-item.active { border-color: var(--primary); background: var(--primary-light); }
.rs-item.active .rs-name { color: var(--primary); font-weight: 600; }
.rs-item:disabled { opacity: .5; cursor: not-allowed; }
.rs-code { font-size: 11px; color: var(--primary); font-weight: 600; }
.rs-name { font-size: 12px; color: var(--text-secondary); }
@media (max-width: 1160px) {
    .detail-layout { grid-template-columns: minmax(0, 1fr); }
    .report-switch-card { position: static; }
}


/* ===================== 总览：Y8 大屏风格（2026-09-14 参照门户「Y8管理工作台」） =====================
   仅作用于 #tab-analysis，其余页面维持浅色；深蓝底 + 青色发光边框 + 橙色 ▸ 标题 + 胶囊徽标。 */
#tab-analysis .analysis-wrap { padding: 0; }
.y8-screen {
    position: relative;
    border-radius: 14px;
    padding: 14px 16px 18px;
    background:
        radial-gradient(1100px 360px at 12% -12%, rgba(35,110,220,.45), transparent 60%),
        radial-gradient(900px 320px at 92% 6%, rgba(0,180,255,.20), transparent 62%),
        linear-gradient(160deg, #061b45 0%, #041430 55%, #030f26 100%);
    box-shadow: inset 0 0 0 1px rgba(79,195,247,.28), 0 10px 34px rgba(3,20,48,.35);
    overflow: hidden;
}
.y8-screen::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(79,195,247,.9), transparent);
    opacity: .85;
}
.y8-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 2px 2px 12px; border-bottom: 1px solid rgba(79,195,247,.22);
}
.y8-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.y8-brand-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 26px; border-radius: 6px; font-weight: 800; font-size: 14px;
    color: #fff; background: linear-gradient(135deg, #2b7de9, #3fd0ff);
    box-shadow: 0 0 14px rgba(63,208,255,.55); flex: 0 0 auto;
}
.y8-brand-name {
    color: #fff; font-size: 19px; font-weight: 800; letter-spacing: 3px;
    text-shadow: 0 0 12px rgba(63,208,255,.55); white-space: nowrap;
}
.y8-brand-sub {
    color: rgba(159,216,255,.75); font-size: 12px; margin-left: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.y8-topright {
    display: flex; align-items: center; gap: 8px; color: #bfe4ff; font-size: 13px;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.y8-dot { width: 8px; height: 8px; border-radius: 50%; background: #35e0a0; box-shadow: 0 0 10px #35e0a0; animation: y8Pulse 1.6s infinite; }
@keyframes y8Pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* hero：4 个总指标 */
.y8-hero { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 14px 0; }
.y8-hero-tile {
    position: relative; border-radius: 10px; padding: 12px 14px 6px;
    background: linear-gradient(180deg, rgba(14,48,102,.85), rgba(6,24,56,.85));
    border: 1px solid rgba(79,195,247,.35);
    box-shadow: inset 0 0 22px rgba(31,120,220,.25);
    overflow: hidden;
}
.y8-hero-tile::after {
    content: ''; position: absolute; left: 0; top: 12%; width: 3px; height: 76%;
    border-radius: 3px; background: linear-gradient(#3fd0ff, #2b7de9); box-shadow: 0 0 12px #3fd0ff;
}
.y8-hero-tile.is-empty { opacity: .55; }
.y8-hero-label { color: #cfe9ff; font-size: 12.5px; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; letter-spacing: 1px; }
.y8-hero-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.y8-hero-num { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.y8-hero-num em { font-style: normal; font-size: 12px; margin-left: 5px; color: #9fd8ff; font-weight: 500; }
.y8-hero-sub { color: #8fb6dd; font-size: 12px; margin-top: 4px; min-height: 18px; }
.y8-hero-spark { margin-top: 6px; height: 36px; }
.y8-hero-spark svg { width: 100%; height: 36px; display: block; }

/* 8 张报表卡 */
#tab-analysis .overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 4px; }
#tab-analysis .ov-card {
    border: 1px solid rgba(79,195,247,.30);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(9,32,72,.92), rgba(4,18,44,.92));
    box-shadow: inset 0 0 20px rgba(28,110,210,.20);
    display: flex; flex-direction: column; padding: 0; min-height: 152px; overflow: hidden;
}
#tab-analysis .ov-card.is-dim { opacity: .62; border-style: dashed; }
#tab-analysis .ov-card.is-dim .ov-card-body { align-items: center; justify-content: center; }
#tab-analysis .ov-card-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; padding: 8px 10px;
    background: linear-gradient(90deg, rgba(20,74,145,.95), rgba(9,34,74,.60));
    border-bottom: 1px solid rgba(79,195,247,.28);
}
.ov-arrow { width: 0; height: 0; border-left: 8px solid #ffc53d; border-top: 5px solid transparent; border-bottom: 5px solid transparent; filter: drop-shadow(0 0 5px rgba(255,197,61,.85)); flex: 0 0 auto; }
#tab-analysis .ov-card-no { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: rgba(43,125,233,.92); color: #fff; white-space: nowrap; }
#tab-analysis .ov-card-name { font-weight: 700; font-size: 13.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-card-badge { margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 10px; white-space: nowrap; flex: 0 0 auto; }
.ov-card-badge.is-ok { color: #0b2a1c; background: #35e0a0; box-shadow: 0 0 10px rgba(53,224,160,.55); }
.ov-card-badge.is-wait { color: #3a2a00; background: #ffc53d; }
.ov-card-badge.is-todo { color: #bcd6ef; background: rgba(120,160,200,.25); }
#tab-analysis .ov-card-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ov-cells { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 10px; }
.ov-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ov-cell-num { color: #3fd0ff; font-size: 19px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(63,208,255,.30); }
.ov-cell-label { color: #9fd8ff; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.10); overflow: hidden; }
.ov-bar i { display: block; height: 100%; border-radius: 4px; box-shadow: 0 0 8px rgba(63,208,255,.6); }
.ov-card-spark { height: 36px; }
.ov-card-spark svg, .ov-spark { width: 100%; height: 36px; display: block; }
.ov-card-foot { color: #7fa8cf; font-size: 11px; border-top: 1px dashed rgba(79,195,247,.20); padding-top: 6px; margin-top: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-empty { color: #8fb6dd; font-size: 12.5px; text-align: center; padding: 26px 8px; line-height: 1.7; }

@media (max-width: 1180px) {
    .y8-hero { grid-template-columns: repeat(2, minmax(0,1fr)); }
    #tab-analysis .overview-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}


/* =====================================================================
   数据抓取卡片：真实进度（2026-09-14）
   ---------------------------------------------------------------------
   后端 /api/status.module_tasks[key] 下发 {stage, percent}，卡片上以
   百分比进度条 + 阶段文案呈现，替代原先「只有四色色块、看不出进度」的问题。
   ===================================================================== */
.scrape-card .mod-progress {
    height: 6px;
    margin: 6px 0 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.scrape-card .mod-progress > i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #3FD0FF, #35E0A0);
    transition: width 0.35s ease;
}
.scrape-card .mod-stage {
    min-height: 15px;
    margin-bottom: 2px;
    font-size: 11px;
    line-height: 15px;
    color: #8ea3bf;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.scrape-card .mod-status.running { animation: modPulse 1.2s ease-in-out infinite; }
@keyframes modPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }


/* =====================================================================
   设置 · 抓取模块配置（2026-09-14）
   ===================================================================== */
.mod-cfg-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.mod-cfg-bar input[type="number"] { width: 68px; padding: 4px 8px; }
.mod-cfg-list { display: flex; flex-direction: column; gap: 10px; }
.mod-cfg-card { border: 1px solid rgba(255,255,255,0.10); border-radius: 8px; padding: 8px 12px; background: rgba(255,255,255,0.02); }
.mod-cfg-card > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; }
.mod-cfg-card > summary::-webkit-details-marker { display: none; }
.mcc-code { min-width: 56px; font-weight: 600; color: #3FD0FF; }
.mcc-name { flex: 1; }
.mcc-key { font-size: 11px; color: #8ea3bf; }
.mcc-badge { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: rgba(53,224,160,0.15); color: #35E0A0; }
.mcc-badge.off { background: rgba(255,255,255,0.08); color: #8ea3bf; }
.mcc-body { margin-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.mcc-row { display: flex; align-items: center; gap: 8px; }
.mcc-row > label { width: 76px; flex: none; font-size: 12px; color: #9fb2c9; }
.mcc-row input[type="text"], .mcc-row input:not([type]), .mcc-row select { flex: 1; min-width: 0; padding: 4px 8px; }
.mcc-row input[type="number"] { width: 72px; padding: 4px 8px; }
.mcc-chk { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.mcc-sub { grid-column: 1 / -1; margin-top: 6px; font-size: 12px; color: #9fb2c9; border-top: 1px dashed rgba(255,255,255,0.10); padding-top: 6px; }
.mcc-filters, .mcc-steps { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.mcc-filter-row, .mcc-step-row { display: flex; align-items: center; gap: 6px; }
.mcc-filter-row input, .mcc-step-row input, .mcc-step-row select { padding: 4px 8px; min-width: 0; }
.mcc-step-row select { width: 130px; flex: none; }
.mcc-actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 10px; }
.btn-xs { padding: 2px 8px; font-size: 12px; line-height: 18px; }
.mcc-row .mcc-chk { white-space: nowrap; }
.mcc-row > label { width: 64px; }
.mod-cfg-card > summary .mcc-badge { margin-left: auto; }

/* ===================== 【2026-09-15】验证码弹窗告警条 ===================== */
.captcha-warn {
    margin: 0 0 12px 0;
    padding: 8px 10px;
    border: 1px solid #e6a23c;
    border-left: 4px solid #e6a23c;
    background: #fdf6ec;
    color: #b88230;
    font-size: 13px;
    line-height: 1.6;
    border-radius: 4px;
    word-break: break-all;
}


/* ===================== 【2026-09-15】数据明细：报表切换改为顶部 tab 条 ===================== */
/* 原为「左表格 + 右 168px 报表切换栏」两列，现改单列，切换条移到表格上方 */
.detail-layout { grid-template-columns: minmax(0, 1fr); }
.report-tabs-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    background: #fafbfd;
}
.report-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.report-tabs .rs-item {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: auto;
    border-radius: 7px;
    padding: 5px 11px;
    background: transparent;
    border-color: transparent;
}
.report-tabs .rs-item:hover:not(:disabled) { border-color: transparent; background: var(--primary-light); }
.report-tabs .rs-item.active { border-color: var(--primary); background: var(--primary); }
.report-tabs .rs-item.active .rs-code,
.report-tabs .rs-item.active .rs-name { color: #fff; font-weight: 600; }
.report-tabs .rs-code { font-size: 11.5px; }
.report-tabs .rs-name { font-size: 12.5px; }
.report-tabs-hint { margin-left: auto; font-size: 11.5px; }
@media (max-width: 1160px) {
    .report-tabs-bar { padding: 8px 10px; }
    .report-tabs-hint { margin-left: 0; }
}


/* ===================== 【2026-09-15】模块抓取卡片：加勾选 + 缩小为每行 5 个 ===================== */
.scrape-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.scrape-card { padding: 9px 10px; gap: 5px; border-radius: 8px; }
.scrape-card-head { gap: 5px; }
.scrape-card-name { font-size: 12.5px; }
.scrape-card-desc { font-size: 11.5px; min-height: 0; }
.scrape-card-meta { display: flex; align-items: center; gap: 6px; }
.sc-key { font-size: 10.5px; color: var(--text-secondary); opacity: .7; font-family: Consolas, monospace; }
.sc-enabled-badge { font-size: 10.5px; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.sc-enabled-badge.on { background: #e8f5e9; color: #2e7d32; }
.sc-enabled-badge.off { background: #fdecea; color: #c62828; }
.sc-pick { display: flex; align-items: center; flex-shrink: 0; }
.sc-pick input { width: 15px; height: 15px; margin: 0; cursor: pointer; }
.scrape-card-body { display: flex; flex-direction: column; gap: 4px; }
.scrape-card-body .sc-input { width: 100%; font-size: 11px; padding: 3px 6px; height: 25px; box-sizing: border-box; }
.scrape-card-body .sc-dt { display: flex; gap: 4px; align-items: center; }
.scrape-card-body .sc-dt .sc-input { flex: 1 1 auto; min-width: 0; }
.scrape-card-body .btn-icon { padding: 0 5px; height: 25px; line-height: 23px; font-size: 11px; }
.mod-progress { height: 4px; }
.mod-stage { font-size: 10.5px; min-height: 0; }
.scrape-card-result { font-size: 11px; }
.scrape-card-foot .btn { width: 100%; font-size: 12px; padding: 4px 8px; }
/* 未勾选「本次抓取」时整体置灰，参数区不可交互 */
.scrape-card.unpicked { opacity: .5; }
.scrape-card.unpicked .scrape-card-body,
.scrape-card.unpicked .scrape-card-head .sc-pick { pointer-events: auto; }
.scrape-card.unpicked .scrape-card-body { pointer-events: none; }
@media (max-width: 1500px) { .scrape-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .scrape-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .scrape-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* ============ 【2026-09-15】左侧树：参照门户「智慧设备管理」深色菜单风格（只改左树） ============ */
.app-body { display: flex; }
.nav-tree {
    width: 150px;
    background: #20243b;
    border-right: none;
    padding: 0 0 10px;
    display: flex;
    flex-direction: column;
    transition: width .18s ease;
}
/* 树头：白色标题 + 收起按钮 */
.nav-tree .nav-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.nav-tree .nav-head-title { flex: 1; min-width: 0; color: #fff; font-size: 14.5px; font-weight: 600; letter-spacing: .5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-tree .nav-collapse {
    flex-shrink: 0; width: 24px; height: 24px; line-height: 22px; text-align: center;
    background: transparent; border: none; border-radius: 5px;
    color: #9aa0b6; font-size: 14px; cursor: pointer; font-family: inherit;
}
.nav-tree .nav-collapse:hover { background: rgba(255,255,255,.10); color: #fff; }
/* 【2026-10-07】搜索框已按用户要求移除，相关样式随之删除 */
.nav-tree .nav-divider { background: rgba(255,255,255,.09); margin: 6px 12px; }
/* 菜单项 */
.nav-tree .nav-node { color: #c9cede; border-radius: 0; padding: 9px 10px; gap: 6px; font-size: 12.5px; }
.nav-tree .nav-node:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-tree .nav-node.active { background: #4b51a8; color: #fff; font-weight: 600; }
.nav-tree .nav-node.active .nav-icon { opacity: 1; }
.nav-tree .nav-icon { fill: currentColor; opacity: .92; flex-shrink: 0; }
.nav-tree .nav-icon { order: 1; }
.nav-tree .nav-text { order: 5; }
.nav-tree .nav-caret { order: 9; margin-left: auto; margin-right: 0; border-left-color: #8b90a6; }
.nav-tree .nav-node:hover .nav-caret { border-left-color: #fff; }
.nav-tree .nav-node.active .nav-caret { border-left-color: #fff; }
.nav-tree .nav-children { padding-left: 0; background: rgba(0,0,0,.16); }
.nav-tree .nav-child { padding: 10px 14px 10px 40px; font-size: 12.5px; color: #b6bccd; }
.nav-tree .nav-child.active { color: #fff; }
.nav-tree .nav-group.nav-filtered-out { display: none; }
/* 收起态：只留图标 */
.app-body.nav-collapsed .nav-tree { width: 56px; }
.app-body.nav-collapsed .nav-tree .nav-head { justify-content: center; padding: 12px 0 8px; }
.app-body.nav-collapsed .nav-tree .nav-head-title,
.app-body.nav-collapsed .nav-tree .nav-text,
.app-body.nav-collapsed .nav-tree .nav-caret,
.app-body.nav-collapsed .nav-tree .nav-children { display: none; }
.app-body.nav-collapsed .nav-tree .nav-node { justify-content: center; padding: 12px 0; }


/* ===================== 【2026-09-15】设置·抓取模块：步骤智能化 UI ===================== */
.mcc-smart { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.mcc-smart-msg { font-size: 12px; color: var(--text-secondary); }
.mcc-smart-msg.ok { color: #2e7d32; }
.mcc-smart-msg.warn { color: #ef6c00; }
.mcc-smart-msg.err { color: #c62828; }
.mcc-smart-msg.busy { color: var(--primary); }
.mcc-picks:empty { display: none; }
.mcc-picks { margin: 6px 0 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfd; }
.mcc-pick-group { margin-bottom: 10px; }
.mcc-pick-group:last-of-type { margin-bottom: 6px; }
.mcc-pick-title { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.mcc-pick-title .hint { font-weight: 400; margin-left: 6px; }
.mcc-pick-items { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.mcc-pick { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; }
.mcc-pick input { width: 14px; height: 14px; margin: 0; cursor: pointer; }
.mcc-pick.is-active span { color: var(--primary); font-weight: 600; }
.mcc-pick-tag { font-style: normal; font-size: 10.5px; padding: 0 5px; border-radius: 4px;
    background: var(--primary-light); color: var(--primary); }
.mcc-pick-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; font-size: 12.5px; }
.mcc-pick-row select, .mcc-pick-row .mcc-pick-val {
    height: 26px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px;
    background: #fff; font-size: 12.5px; font-family: inherit; color: var(--text);
}
.mcc-pick-row .mcc-pick-val { width: 150px; }
.mcc-pick-row .mcc-pick-val:disabled { background: #f4f6f9; color: var(--text-secondary); }
.mcc-ftype { font-style: normal; font-size: 11px; color: var(--text-secondary); opacity: .75; }
.mcc-pick-info { font-size: 12px; color: var(--text-secondary); border-top: 1px dashed var(--border); padding-top: 7px; }
.mcc-step-desc { font-size: 11.5px; color: var(--text-secondary); opacity: .8; margin-left: 2px; }
.mcc-step-row { flex-wrap: wrap; }
.mcc-step-row input[data-f="sp3"] { width: 130px; }

/* 【2026-09-15】顶部登录栏「后台运行」勾选框 */
.header-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary, #c8cce0);
  font-size: 12.5px;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}
.header-check input { width: 14px; height: 14px; accent-color: var(--accent, #4b51a8); cursor: pointer; }


/* ===================== 【2026-09-16】数据明细：报表切换改「卡片式」（卡片内两行） ===================== */
.report-tabs { gap: 8px; }
.report-tabs .rs-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 104px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
}
.report-tabs .rs-item .rs-line1 { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.report-tabs .rs-item .rs-line2 { font-size: 11.5px; color: var(--text-secondary); }
.report-tabs .rs-item:hover:not(:disabled) { border-color: var(--primary); }
.report-tabs .rs-item.active .rs-line1,
.report-tabs .rs-item.active .rs-line2 { color: #fff; }

/* ===================== 【2026-09-16】智能分析面板：表格类汇总在前、AI 解析在后 ===================== */
.ai-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ai-table th {
    text-align: left; font-weight: 600; color: var(--text-secondary);
    background: #f4f7fb; padding: 6px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.ai-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); color: var(--text); }
.ai-table tr:last-child td { border-bottom: none; }
.ai-table .ai-tb-v { font-weight: 600; color: var(--primary); white-space: nowrap; width: 88px; }
.ai-table .ai-tb-h { color: var(--text-secondary); white-space: nowrap; width: 92px; }
.ai-table .ai-tb-k { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-card .ai-chips { margin: 10px 0 4px; }

/* ===================== 【2026-09-16 v1.8.0】总览 → 指标完成情况 ===================== */
.metrics-page { display: flex; flex-direction: column; gap: 14px; padding: 2px 2px 24px; }
.metrics-head-card { padding: 14px 18px; }
.metrics-head-card .stats-card-header { margin-bottom: 8px; padding-bottom: 8px; }
.metrics-src { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-src {
    font-size: 12px; color: var(--text-secondary);
    background: #f4f7fb; border: 1px solid var(--border);
    border-radius: 6px; padding: 4px 10px;
}
.mt-src b { color: var(--text); }
.metrics-card { padding: 14px 18px; }
.metrics-card .stats-card-header { align-items: flex-start; flex-wrap: wrap; }
.metrics-card .stats-card-header .hint { flex: 1; min-width: 240px; }
.metrics-tw {
    overflow: auto; max-height: 470px;
    border: 1px solid var(--border); border-radius: 6px;
}
.mt-table { min-width: 680px; }
.mt-table thead tr:first-child th {
    background: #eef3f9; text-align: center;
    position: sticky; top: 0; z-index: 2;
}
.mt-table thead tr:nth-child(2) th { top: 29px; }
.mt-table td { font-variant-numeric: tabular-nums; }
.mt-table tr.mt-total td { font-weight: 700; background: #f8fafc; }
.mt-empty { color: var(--text-secondary); text-align: center; padding: 18px 0; }
.metrics-err { color: var(--danger); }


/* ===================== 指标完成情况页：可读性美化（v1.8.2 覆盖块） ===================== */
/* ---- 卡片外壳：表头带底色，内容区左右分栏 ---- */
.metrics-card { padding: 0; overflow: hidden; }
.metrics-card > .mt-empty { padding: 24px 18px; }
.metrics-card .stats-card-header {
    margin: 0; padding: 12px 16px; background: #f7f9fc;
    border-bottom: 1px solid var(--border);
}
.metrics-card .stats-card-header h2 { font-size: 15px; font-weight: 600; color: #0f172a; }
.metrics-card .stats-card-header .hint { color: #64748b; font-size: 12px; }

/* ---- 左侧 KPI 栏 ---- */
.mt-body { display: flex; align-items: stretch; }
.mt-kpi {
    flex: 0 0 170px; display: flex; flex-direction: column; gap: 10px;
    padding: 14px; background: #fbfcfe; border-right: 1px solid var(--border);
}
.mt-kpi-item {
    background: #fff; border: 1px solid var(--border);
    border-left: 3px solid var(--primary); border-radius: 6px; padding: 8px 10px;
}
.mt-kpi-item.is-good { border-left-color: #0f6e56; }
.mt-kpi-item.is-warn { border-left-color: #ba7517; }
.mt-kpi-item.is-risk { border-left-color: #a32d2d; }
.mt-kpi-label { display: block; font-size: 11.5px; color: #64748b; }
.mt-kpi-value {
    display: block; font-size: 19px; font-weight: 700; color: #0f172a;
    font-variant-numeric: tabular-nums; line-height: 1.3;
}
.mt-kpi-value em { font-size: 11.5px; font-weight: 400; color: #64748b; font-style: normal; margin-left: 3px; }
.mt-body .metrics-tw { flex: 1 1 auto; min-width: 0; border: none; border-radius: 0; max-height: 520px; }

/* ---- 表格：表头加深 + 斑马纹 + 列细线 ---- */
.mt-table thead th {
    background: #eef2f7; color: #0f172a; font-weight: 700; font-size: 12.5px;
    padding: 7px 10px; border-bottom: 1.5px solid #94a3b8; white-space: nowrap;
}
.mt-table thead tr:first-child th { background: #e2e8f0; color: #0f172a; border-bottom: 1px solid #cbd5e1; }
.mt-table th.mt-hnum { text-align: right; }
.mt-table th.mt-htxt { text-align: left; }
.mt-table td {
    padding: 7px 10px; color: #0f172a; font-weight: 500;
    border-bottom: 1px solid #eef1f5; border-right: 1px solid #f1f5f9;
}
.mt-table td.mt-num { text-align: right; font-variant-numeric: tabular-nums; }
.mt-table td.mt-txt { text-align: left; }
.mt-table th:last-child, .mt-table td:last-child { border-right: none; }

/* 斑马纹 + 悬停 */
.mt-table tbody tr:nth-child(even) td { background: #f8fafc; }
.mt-table tbody tr:hover td { background: #eff6ff; }

/* 首列（产线）冻结 */
.mt-table th:first-child, .mt-table td:first-child {
    position: sticky; left: 0; z-index: 1;
    background: #fff; font-weight: 700; color: #0f172a;
    box-shadow: 1px 0 0 var(--border);
}
.mt-table thead th:first-child { z-index: 3; background: #e2e8f0; }
.mt-table tbody tr:nth-child(even) td:first-child { background: #f8fafc; }
.mt-table tbody tr:hover td:first-child { background: #eff6ff; }

/* 总计行（选择器带 tbody，优先级压过斑马纹） */
.mt-table tbody tr.mt-total td {
    background: #e8eef7; color: #0f172a; font-weight: 700;
    border-top: 1.5px solid #94a3b8; border-bottom: none;
}
.mt-table tbody tr.mt-total td:first-child { background: #e8eef7; }
.mt-table tbody tr.mt-total td.mt-num { color: #0b3a72; }

/* 【v1.9.34】组间竖向分割线（后端 sec.group_divider = 起始列号，如工时情况 Y7工时|定修工时） */
.mt-table th.mt-gdiv, .mt-table td.mt-gdiv { border-left: 2px solid #94a3b8; }

/* 占比数据条 */
.mt-bar {
    display: inline-block; width: 42px; height: 6px; margin-left: 7px;
    background: #e2e8f0; border-radius: 3px; overflow: hidden; vertical-align: middle;
}
.mt-bar > i { display: block; height: 100%; background: #2563eb; border-radius: 3px; }

/* ================== 【v1.9.24】指标页：中等风格优化 + 合并单元格 ================== */
/* ① 卡片外壳：统一圆角/描边/阴影；节标题左侧加主色竖条（层级一眼可辨） */
.metrics-page { gap: 12px; }
.metrics-card {
    border: 1px solid #e2e8f0; border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 8px rgba(15, 23, 42, .03);
}
.metrics-head-card { border-radius: 10px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.metrics-card .stats-card-header { background: linear-gradient(180deg, #f8fafd 0%, #f3f7fb 100%); }
.metrics-card .stats-card-header h2 { position: relative; padding-left: 9px; }
.metrics-card .stats-card-header h2::before {
    content: ''; position: absolute; left: 0; top: 1px; bottom: 1px;
    width: 3px; border-radius: 2px; background: #2563eb;
}

/* ② 两行表头分层：分组行更深、列头行更浅（边界更清楚，不再"一片灰"）
   ★用「相邻兄弟」而不是 :last-child —— 否则只有一行表头的表会被误判成第二行样式 */
.mt-table thead tr:first-child th {
    background: #dde6f2; color: #17324f; font-size: 11.5px; letter-spacing: .2px;
    border-bottom: 1px solid #c3d2e4;
}
.mt-table thead tr:first-child + tr th { background: #eef2f7; }
.mt-table thead tr:only-child th { background: #eef2f7; }
.metrics-grid .mt-table thead tr:first-child th { background: #dde6f2; }

/* ③ 数值列：等宽数字 + 右对齐（列变窄后读数更快） */
.mt-table td.mt-num { color: #14304f; font-variant-numeric: tabular-nums; }

/* ④ 合并单元格（七、验收偏长工单 的区域 / 产线）：左对齐、垂直居中、右侧分隔线 */
.mt-table td.mt-merged {
    text-align: left; vertical-align: middle; font-weight: 700; color: #22405f;
    background: #f7fafd; border-right: 1px solid #dbe3ec;
}
.mt-table tbody tr:nth-child(even) td.mt-merged { background: #f2f6fb; }
.mt-table tbody tr:hover td.mt-merged { background: #e8f1fd; }

/* ⑤ 总计行更沉、上分隔线更明显 */
.mt-table tbody tr.mt-total td { background: #e6edf7; border-top: 2px solid #94a3b8; }
.mt-table tbody tr.mt-total td:first-child { background: #e6edf7; }

/* ⑥ 占比条收细（列宽收窄后不再挤占数值） */
.mt-bar { width: 28px; height: 5px; margin-left: 6px; }
.metrics-grid .mt-bar { width: 20px; margin-left: 4px; }

/* ⑥b 【v1.9.28c】「三、待处理工单」标题居中（用户 2026-09-24 要求；hint 跟随居中显示） */
/* ⑥ 【v1.9.28d】三节头部恢复紧凑（用户 2026-09-24 反馈：强制居中把 hint 挤到第二行，
      头部比「二、工时情况」高出一截 → 删除居中规则，回归与其他模块一致的单行布局） */

/* ⑦ 「汇总中」：只让卡片轻微变暗，**不清空页面**（滚动位置与筛选控件都保留） */
#metrics-body.mt-loading .metrics-grid { opacity: .62; transition: opacity .15s ease; }

/* ⑧ 轻提示（复制 / 下载结果反馈） */
#mt-tip {
    position: fixed; left: 50%; bottom: 34px; z-index: 9999;
    transform: translateX(-50%) translateY(8px);
    max-width: 74vw; padding: 9px 16px; border-radius: 8px;
    background: rgba(15, 23, 42, .92); color: #fff; font-size: 12.5px; line-height: 1.5;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .22);
    opacity: 0; pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
#mt-tip.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 头部与来源条 */
.metrics-head-card h2 { font-size: 16px; color: #0f172a; }
.mt-src { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
.mt-src b { color: #0f172a; }

/* 窄屏：KPI 栏折到表格上方 */
@media (max-width: 900px) {
    .mt-body { flex-direction: column; }
    .mt-kpi {
        flex: 1 1 auto; flex-direction: row; overflow-x: auto;
        border-right: none; border-bottom: 1px solid var(--border);
    }
    .mt-kpi-item { flex: 0 0 132px; }
}


/* ===================== 数据明细：列显示多选 + 列宽拖拽（v1.8.4） ===================== */
.colpick { position: relative; margin-left: 8px; flex: 0 0 auto; }
.colpick > .btn { display: inline-flex; align-items: center; gap: 6px; }
#detail-cols-count { font-size: 11.5px; color: #64748b; font-variant-numeric: tabular-nums; }
.colpick-panel {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
    width: 330px; max-height: 320px; overflow: auto; text-align: left;
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .14); padding: 10px 12px;
}
.colpick-head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: #64748b; margin-bottom: 9px;
}
.colpick-acts button {
    border: 0; background: #f1f5f9; color: #334155; border-radius: 5px;
    padding: 3px 9px; margin-left: 5px; font-size: 12px; cursor: pointer;
}
.colpick-acts button:hover { background: #e2e8f0; }
.colpick-list { display: flex; flex-wrap: wrap; gap: 6px; }
.colpick-item {
    display: inline-flex; align-items: center; font-size: 12px; color: #334155;
    background: #f8fafc; border: 1px solid var(--border); border-radius: 14px;
    padding: 3px 10px; cursor: pointer; max-width: 100%;
}
.colpick-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.colpick-item.on { background: #e8f0fe; border-color: #bcd3f7; color: #1d4ed8; font-weight: 500; }
.colpick-item input { display: none; }

/* 列宽拖拽手柄 */
#detail-table thead th { position: relative; }
.col-resizer {
    position: absolute; right: 0; top: 0; width: 8px; height: 100%;
    cursor: col-resize; user-select: none; z-index: 4;
}
.col-resizer:hover { background: rgba(37, 99, 235, .20); }
#detail-table.has-colwidth { table-layout: fixed; }
#detail-table.has-colwidth td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= 【v1.9.0】各报表分析标准增强 ================= */
/* 维度分布占比条 */
.ai-pctbar{display:inline-block;width:56px;height:6px;margin-right:6px;border-radius:3px;
  background:#e2e8f0;overflow:hidden;vertical-align:middle}
.ai-pctbar>i{display:block;height:100%;border-radius:3px;
  background:linear-gradient(90deg,#60a5fa,#1d4ed8)}
.ai-table tbody tr:hover .ai-pctbar{background:#cbd5e1}
/* 交叉分析 / 问题明细：字号收紧、首列加粗、斑马纹 */
.ai-table-cross td,.ai-table-prob td{font-size:12px;vertical-align:top}
.ai-table-prob tbody tr td:first-child{font-weight:600;color:#0f172a}
.ai-table-cross tbody tr:hover td{background:#f1f5f9}
.ai-table-prob tbody tr:hover td{background:#fef2f2}
/* AI 结论里的「建议动作」 */
.ai-item-action{display:block;margin-top:5px;font-size:12px;line-height:1.5;
  color:#0f766e;background:#ecfdf5;border-left:3px solid #14b8a6;
  padding:4px 9px;border-radius:0 4px 4px 0}
.ai-item.risk .ai-item-action{color:#991b1b;background:#fef2f2;border-left-color:#ef4444}
.ai-item.warn .ai-item-action{color:#92400e;background:#fffbeb;border-left-color:#f59e0b}
.ai-item.good .ai-item-action{color:#166534;background:#f0fdf4;border-left-color:#22c55e}

/* ===================== 【2026-09-17 v1.9.3】布局优化：指标页两栏 + 分析面板双栏 ===================== */

/* ---- ① 指标完成情况：两栏并行（一左二右），末节跨两栏 ---- */
.metrics-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px; align-items: start;
    /* 【v1.9.29】整体居中：超宽屏下限宽居中，不贴左 */
    max-width: 1620px; margin-left: auto; margin-right: auto;
}
.metrics-grid > .metrics-wide { grid-column: 1 / -1; }
.metrics-grid .metrics-card { min-width: 0; }
.metrics-grid .metrics-card .stats-card-header { padding: 10px 13px; }
.metrics-grid .metrics-card .stats-card-header h2 { font-size: 14px; }
.metrics-grid .metrics-tw { max-height: 430px; }
.metrics-grid .mt-table { min-width: 0; }
.metrics-grid .mt-table thead th { font-size: 12px; padding: 6px 8px; }
.metrics-grid .mt-table td { font-size: 12.5px; padding: 5px 6px; }
/* 【v1.9.3】8 列宽表 + 占比条在半栏会溢出：表头允许换行、占比条收窄 */
.metrics-grid .mt-table thead th { padding: 5px 6px; white-space: normal; line-height: 1.3; }
.metrics-grid .mt-bar { width: 24px; margin-left: 5px; }
.metrics-grid .metrics-tw { overflow-x: auto; }

/* ---- ② KPI 由「左侧竖栏」改为「标题下横向条」：字体/边框收小 ---- */
/* ---- 【v1.9.29d】指标卡 KPI 汇总行：单行紧凑 + 左对齐（用户 2026-09-24 二次确认：要左对齐，不是居中）---- */
.mt-kpi-row {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px;
    padding: 6px 13px; background: #fbfcfe; border-bottom: 1px solid var(--border);
}
.mt-kpi-row .mt-kpi-item {
    display: inline-flex; flex-direction: row; align-items: baseline; gap: 5px;
    flex: 0 0 auto; min-width: 0;
    padding: 3px 12px; background: #fff;
    border: 1px solid var(--border); border-top-width: 3px; border-top-color: #94a3b8;
    border-radius: 7px;
}
.mt-kpi-row .mt-kpi-label { display: inline; font-size: 12px; color: #64748b; white-space: nowrap; }
.mt-kpi-row .mt-kpi-value {
    display: inline; font-size: 16px; font-weight: 800; line-height: 1.3; color: #0f172a;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.mt-kpi-row .mt-kpi-value em { font-size: 11.5px; margin-left: 2px; font-weight: 400; color: #64748b; }
.mt-kpi-row .mt-kpi-item.is-good { border-top-color: #0f766e; }
.mt-kpi-row .mt-kpi-item.is-good .mt-kpi-value { color: #0f766e; }
.mt-kpi-row .mt-kpi-item.is-warn { border-top-color: #d97706; }
.mt-kpi-row .mt-kpi-item.is-warn .mt-kpi-value { color: #b45309; }
.mt-kpi-row .mt-kpi-item.is-risk { border-top-color: #dc2626; background: #fff6f6; }
.mt-kpi-row .mt-kpi-item.is-risk .mt-kpi-value { color: #b91c1c; }
.mt-kpi-row .mt-kpi-item.is-default { border-top-color: #1d4ed8; }
.mt-kpi-row .mt-kpi-item.is-default .mt-kpi-value { color: #1d4ed8; }

/* ---- ②b 【v1.9.28d】隐患智能分析 KPI 瓦片：大数字重点显示（替代原 11.5px 小胶囊） ----
   总隐患=蓝 · 超期(率)=红底 · 已结案/处理率高=绿 · 待办>0=橙 · 0 值淡显 */
/* 【v1.9.31d】去水平内边距：瓦片与下方看板块（ai-block 通栏）左右边缘齐平（用户反馈截图上行没对齐） */
.hz-kpi-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0;
    background: #fbfcfe; border-bottom: 1px solid var(--border); }
/* 【v1.9.29c】用户反馈：隐患指标瓦片要左对齐、不拉伸铺满 → 改内容自适应宽 */
/* 【v1.9.31c】瓦片均分铺满整行（用户 2026-09-25：这一栏宽度没展开、没占满宽度） */
.hz-kpi { flex: 1 1 0; min-width: 88px; text-align: center; padding: 8px 14px 7px;
    background: #fff; border: 1px solid var(--border); border-top: 3px solid #94a3b8;
    border-radius: 7px; }
.hz-kpi .hz-kpi-num { display: block; font-size: 21px; font-weight: 800; line-height: 1.15;
    color: #0f172a; font-variant-numeric: tabular-nums; }
.hz-kpi .hz-kpi-lab { display: block; margin-top: 2px; font-size: 11.5px; color: #64748b; }
.hz-kpi.tone-blue { border-top-color: #1d4ed8; }
.hz-kpi.tone-blue .hz-kpi-num { color: #1d4ed8; }
.hz-kpi.tone-warn { border-top-color: #d97706; }
.hz-kpi.tone-warn .hz-kpi-num { color: #b45309; }
.hz-kpi.tone-risk { border-top-color: #dc2626; background: #fff6f6; }
.hz-kpi.tone-risk .hz-kpi-num { color: #b91c1c; }
.hz-kpi.tone-good { border-top-color: #0f766e; }
.hz-kpi.tone-good .hz-kpi-num { color: #0f766e; }
.hz-kpi.tone-zero { opacity: .58; }
.mt-body > .metrics-tw { border: none; border-radius: 0; }

/* ---- ③ 模块分析面板：左右双栏（左=结构类，右=结论类），以表格为主 ---- */
.ai-card .ai-cols { margin-top: 12px; }
.ai-cols {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px; align-items: start;
}
.ai-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ai-col .ai-block { margin-top: 0; }
.ai-col .ai-block > .table-wrap { max-height: 300px; }
.ai-col .ai-tb-k { max-width: 150px; }
.ai-col table td:first-child, .ai-col table th:first-child { max-width: 170px; }
.ai-col .mod-trend { height: 76px; }

/* ---- ④ 维度分布：v1.9.4 起改为「一张合并表」（见文件末尾 .ai-dimtable），
       原 .ai-dimgrid 网格样式已随重排删除 ---- */

/* ---- 窄屏回落单栏（与改造前一致） ---- */
@media (max-width: 1180px) {
    .metrics-grid, .ai-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ===================== 【2026-09-17 v1.9.4】表格显示设置 + 报表页版式重排 ===================== */

/* ---- ① 表格显示设置（对应 config.json 的 ui 段，设置页「显示设置」子页） ----
   通过 <html> 的 data-tbl-align / data-tbl-header / data-tbl-zebra 切换，
   字号走 CSS 变量 --tbl-font-size。选择器都带 html[data-*] 前缀以提高特异性，
   用以压过前面几轮的 .mt-table td.mt-num / .ai-card table td:first-child 等规则。 */

/* 字号 */
html[data-tbl-align] .metrics-card table,
html[data-tbl-align] .ai-card table { font-size: var(--tbl-font-size, 12.5px); }

/* 对齐：全部居中（默认） */
html[data-tbl-align="center"] .metrics-card table th,
html[data-tbl-align="center"] .metrics-card table td,
html[data-tbl-align="center"] .ai-card table th,
html[data-tbl-align="center"] .ai-card table td { text-align: center; }

/* 对齐：数值右、文本居左 */
html[data-tbl-align="numright"] .metrics-card table th,
html[data-tbl-align="numright"] .metrics-card table td,
html[data-tbl-align="numright"] .ai-card table th,
html[data-tbl-align="numright"] .ai-card table td { text-align: left; }
html[data-tbl-align="numright"] .metrics-card table th.mt-hnum,
html[data-tbl-align="numright"] .metrics-card table td.mt-num,
html[data-tbl-align="numright"] .ai-card table td.ai-tb-v { text-align: right; }

/* 对齐：全部左对齐 */
html[data-tbl-align="left"] .metrics-card table th,
html[data-tbl-align="left"] .metrics-card table td,
html[data-tbl-align="left"] .ai-card table th,
html[data-tbl-align="left"] .ai-card table td { text-align: left; }

/* 居中时：叠加了占比条的单元格，条形要跟着内容一起居中（不要被挤到贴边） */
html[data-tbl-align="center"] .metrics-card table td .mt-bar,
html[data-tbl-align="center"] .ai-card table td .ai-pctbar { margin-left: 6px; margin-right: 0; }

/* 【v1.9.29d】用户反馈：显示设置=居中时，指标页文本列（产线代码/产线名称等 mt-txt/mt-htxt）
   不得被 3016 行的旧左对齐规则（table-layout:fixed 时代防空旷加的）压住 —— 特异性(0,4,3)反压(0,3,2) */
html[data-tbl-align="center"] .metrics-card table.mt-table td.mt-txt,
html[data-tbl-align="center"] .metrics-card table.mt-table th.mt-htxt { text-align: center; }

/* 表头与边框：突出（默认） */
html[data-tbl-header="strong"] .metrics-card table thead th,
html[data-tbl-header="strong"] .ai-card table thead th {
    background: #dce6f5; color: #0b2138; font-weight: 700;
    border-top: 2px solid #64748b; border-bottom: 2px solid #64748b;
}
html[data-tbl-header="strong"] .metrics-card table tbody tr:last-child td,
html[data-tbl-header="strong"] .ai-card table tbody tr:last-child td {
    border-bottom: 2px solid #94a3b8;
}
html[data-tbl-header="strong"] .metrics-card > .stats-card-header,
html[data-tbl-header="strong"] .ai-card > .stats-card-header {
    border-left: 4px solid #2563eb; background: #eef4fd;
}
html[data-tbl-header="strong"] .metrics-card > .stats-card-header h2,
html[data-tbl-header="strong"] .ai-card > .stats-card-header h2 {
    color: #0b2138; font-weight: 700;
}

/* 斑马纹 开 / 关（:not(.mt-total) 防止把总计行的高亮底色冲掉） */
html[data-tbl-zebra="on"] .metrics-card table tbody tr:nth-child(even):not(.mt-total) td,
html[data-tbl-zebra="on"] .ai-card table tbody tr:nth-child(even):not(.mt-total) td {
    background: #f8fafc;
}
html[data-tbl-zebra="off"] .metrics-card table tbody tr:nth-child(even):not(.mt-total) td,
html[data-tbl-zebra="off"] .ai-card table tbody tr:nth-child(even):not(.mt-total) td {
    background: #fff;
}

/* 居中后，表格首列不再需要"左对齐 + 截断"的旧约束（改为居中 + 省略号） */
html[data-tbl-align="center"] .ai-card table td:first-child,
html[data-tbl-align="center"] .ai-card table th:first-child { text-align: center; }

/* ---- ② 报表页：汇总指标改横向 KPI 胶囊条（复用指标页 .mt-kpi-row） ---- */
/* 【v1.9.29c】用户反馈：报表页（工时情况/待处理工单等）KPI 行要左对齐，不复用指标页的居中 */
.ai-kpi-row { padding: 10px 0 0; background: transparent; border-bottom: none; justify-content: flex-start; }
.ai-kpi-row .mt-kpi-item { background: #fbfcfe; }
.mt-kpi-hint { font-size: 11px; color: #94a3b8; }

/* ---- ③ 报表页：维度分布「一张合并表」（取代原来 8 张小卡网格） ---- */
.ai-dimtable { max-height: 430px; }
.ai-dimtable .ai-tb-dim { width: 92px; font-weight: 600; color: #0f172a; white-space: nowrap; }
.ai-dimtable .ai-tb-k { max-width: 240px; }
.ai-dimtable tbody tr.dim-first td { border-top: 1px solid #cbd5e1; }
.ai-dimtable tbody tr:first-child td { border-top: none; }

/* ---- ④ 报表页：通栏块（数据明细 / AI 解析） ---- */
.ai-wide { margin-top: 14px; }
.ai-wide .ai-block { margin-top: 0; }
.ai-wide .table-wrap { max-height: 360px; }
.ai-wide .ai-col table td:first-child { max-width: none; }

/* 【v1.9.4 修正】AI 解析改通栏后，14 条结论单列堆叠会独占 1130px（占整卡近一半）。
   通栏 + 2 列网格后降到约 560px，同时保持「AI 解析在最后」的版式要求。 */
.ai-wide .ai-list {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}
.ai-wide .ai-item { padding: 8px 11px; }
.ai-wide .ai-item-title { font-size: 12.5px; }
.ai-wide .ai-item-detail { font-size: 12.5px; line-height: 1.55; }
@media (max-width: 1180px) { .ai-wide .ai-list { grid-template-columns: minmax(0, 1fr); } }

/* ---- ⑤ 设置页「显示设置」表单 ---- */
.ui-set-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px 16px; margin: 12px 0 4px;
}
.ui-set-grid > label {
    display: flex; flex-direction: column; gap: 6px;
    font-size: 13px; color: #334155;
}
.ui-set-grid > label.ui-set-chk { flex-direction: row; align-items: center; gap: 8px; }
.ui-set-grid select {
    padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 13px; background: #fff; color: var(--text);
}
.ui-set-grid input[type="checkbox"] { width: 15px; height: 15px; }

/* ===================== 【2026-09-17 v1.9.5】指标页同排拼接 + 点检类门户版式 ===================== */

/* ---- ① 指标完成情况：改 12 栅格，「三、待处理工单」拼到「二、工时情况」右侧同一排 ----
   对齐用户原表《检修指标完成情况.xlsx》的横向版式：
     A-K 隐患指标 ｜ L-R 工时情况 ｜ S-U 待处理工单（三块同高同排）
   跨度由后端各分节的 span 字段下发（内联 grid-column，优先级高于这里的兜底值）。 */
.metrics-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; }

/* 同排分节等高：象原表一样三块底边齐平（内容短的卡片底部留白，边缘不参差） */
.metrics-grid > .metrics-card { grid-column: span 6; }

/* 窄屏（<=1180px）：仍回落单栏；用 !important 压过内联 grid-column */
@media (max-width: 1180px) {
    .metrics-grid { grid-template-columns: minmax(0, 1fr); }
    .metrics-grid > .metrics-card { grid-column: 1 / -1 !important; }
}

/* ---- ② 点检类模块（常规点检 / 隐蔽部位点检）：门户版式仪表盘 ---- */
.pt-dash { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.pt-panel { border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; }
.pt-panel-head { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px 0; flex-wrap: wrap; }
.pt-ptitle { font-size: 15px; font-weight: 600; color: #0f172a; }
.pt-pnum { font-size: 26px; font-weight: 800; color: #1d4ed8; line-height: 1.1;
    font-variant-numeric: tabular-nums; }
.pt-psub { font-size: 12.5px; color: #64748b; }
.pt-panel-body { display: flex; align-items: center; gap: 20px; padding: 8px 14px 14px; }
.pt-donut-wrap { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; }
.pt-donut { flex: 0 0 auto; }
.pt-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; }
.pt-legend li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #334155;
    padding: 3px 0; border-bottom: 1px dashed #eef2f7; }
.pt-legend li:last-child { border-bottom: none; }
.pt-legend i { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.pt-lg-n { flex: 0 0 auto; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-lg-v { margin-left: auto; min-width: 56px; text-align: right; padding-left: 8px;
    border-left: 1px solid #e2e8f0; font-variant-numeric: tabular-nums; }
.pt-lg-p { min-width: 64px; text-align: right; padding-left: 8px;
    border-left: 1px solid #e2e8f0; font-variant-numeric: tabular-nums; color: #475569; }
.pt-cards { display: flex; flex-direction: column; gap: 8px; flex: 0 0 320px; }
.pt-card { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border: 1px solid var(--border); border-radius: 7px; padding: 8px 12px; background: #fbfcfe; }
.pt-card-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pt-card-r { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: 0 0 auto; }
.pt-card-lb { font-size: 12px; color: #475569; }
.pt-card-num { font-size: 25px; font-weight: 800; color: #0f172a; line-height: 1.05;
    font-variant-numeric: tabular-nums; }
/* 【第23轮清理】.pt-ring 三行已删除：_ptRing 死函数删除后无生成点（死样式） */
.pt-panel-miss .pt-miss { padding: 8px 14px 14px; font-size: 12.5px; line-height: 1.6; color: #92400e;
    background: #fffbeb; border-top: 1px solid #fde68a; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px;
    border: 1px solid var(--border); border-radius: 5px; background: #fbfcfe;
    font-size: 12.5px; font-weight: 600; color: #0f172a; }
.pt-chip b { font-weight: 400; color: #64748b; font-size: 11.5px; }
.pt-chip em { font-style: normal; font-size: 11px; font-weight: 400; color: #64748b; }
.pt-num { color: #2563eb; font-weight: 600; }

@media (max-width: 1180px) {
    .pt-panel-body { flex-wrap: wrap; }
    .pt-cards { flex: 1 1 100%; }
    .pt-donut-wrap { flex: 1 1 100%; }
}


/* ===================== 【v1.9.6】 ===================== */
/* ① 设置 · 分析设置子页 */
.cfg-sub-title { margin: 16px 0 8px; font-size: 14px; font-weight: 600; color: #0f172a;
    padding-left: 9px; border-left: 3px solid #2563eb; line-height: 1.3; }
.cfg-sub-title:first-of-type { margin-top: 4px; }
.ana-name-input { min-width: 380px; flex: 0 1 460px; }
.ana-plan-list { margin-top: 4px; }
.ana-plan-list .ana-plan-tbl { width: 100%; }
.ana-plan-list .ana-plan-tbl th, .ana-plan-list .ana-plan-tbl td { text-align: center; }
.ana-plan-list .btn { padding: 3px 9px; font-size: 12px; line-height: 1.5; }
.ana-cur { color: #2e7d32; font-weight: 700; }

/* ② 点检面板顶部环形图改左右并排：每块各占半宽（原来单块铺满整卡、图被拉得过宽）。
     半宽下内部改为「环形图 + 图例」在上、「率卡」横排在下一行，避免图例被挤扁。 */
.pt-dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pt-dash > .pt-chips { grid-column: 1 / -1; }
.pt-dash .pt-panel-body { flex-wrap: wrap; gap: 10px 16px; }
.pt-dash .pt-donut-wrap { flex: 1 1 100%; }
.pt-dash .pt-cards { flex: 1 1 100%; flex-direction: row; }
.pt-dash .pt-card { flex: 1 1 0; min-width: 0; padding: 6px 10px; gap: 8px; }
.pt-dash .pt-card-num { font-size: 20px; }
.pt-dash .pt-pnum { font-size: 23px; }

/* 窄屏（<=1180px）：环形图回落单列，避免半栏内挤压 */
@media (max-width: 1180px) {
    .pt-dash { grid-template-columns: minmax(0, 1fr); }
    .pt-dash .pt-cards { flex-direction: column; }
}

/* ===================== 【v1.9.7】点检类面板：左=仪表盘 / 右=AI 解析（高度对齐） ===================== */
/* 用户要求：① AI 解析放到「数据区上边右侧」，高度对齐左侧仪表盘、只显示关键数据；
             ② 「点检总数」环形图靠左侧，右侧竖向列出 已执行/已停止/未执行/已漏检。 */
.pt-top { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 12px;
    margin-top: 12px; align-items: stretch; }
.pt-top .pt-dash { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
/* ★环形图靠左侧：donut-wrap 不再 flex:1 撑满整行，图例定宽带 → 整块紧贴面板左边缘 */
.pt-top .pt-dash .pt-donut-wrap { flex: 0 1 auto; gap: 14px; }
.pt-top .pt-dash .pt-legend { flex: 0 1 340px; }
.pt-top .pt-dash .pt-legend li { padding: 5px 0; }
.pt-top .pt-dash .pt-lg-v { min-width: 52px; }
.pt-top .pt-dash .pt-lg-p { min-width: 62px; }
/* ★右侧 AI 解析：高度恒等于左侧仪表盘（内层绝对定位 + overflow:auto，内容多则内部滚动，
   内容少则留白对齐底边），绝不会把整张卡片撑高。 */
.pt-ai-side { position: relative; min-height: 196px; border: 1px solid var(--border);
    border-radius: 8px; background: #fff; }
.pt-ai-inner { position: absolute; inset: 0; overflow: auto; padding: 10px 13px 26px; }
/* 底部渐隐：提示「下面还有、可滚动」（内层多留 26px 下内边距，滚到底也能读全） */
.pt-ai-side::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22px;
    pointer-events: none; border-radius: 0 0 8px 8px;
    background: linear-gradient(to top, #fff 22%, rgba(255, 255, 255, 0)); }
.pt-ai-head { display: flex; align-items: baseline; gap: 8px; padding-bottom: 7px;
    margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.pt-ai-title { font-size: 14px; font-weight: 600; color: #0f172a; }
.pt-ai-sub { margin-left: auto; font-size: 11.5px; color: #64748b; }
.pt-ai-list { display: flex; flex-direction: column; gap: 7px; }
.pt-ai-item { padding: 6px 9px; border-radius: 5px; border-left: 3px solid var(--border);
    background: #f7f9fc; }
.pt-ai-item.risk { background: #fde2e2; border-left-color: #b00020; }
.pt-ai-item.warn { background: #fff4e0; border-left-color: var(--warning); }
.pt-ai-item.good { background: #e8f6ec; border-left-color: var(--success); }
.pt-ai-item.info { background: #eaf2fb; border-left-color: var(--primary); }
.pt-ai-h { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.45; }
.pt-ai-lv { display: inline-block; margin-right: 5px; padding: 0 5px; border-radius: 3px;
    font-size: 10.5px; font-weight: 700; background: rgba(255, 255, 255, .82); color: #475569; }
.pt-ai-d { margin-top: 2px; font-size: 12px; line-height: 1.55; color: var(--text-secondary);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-ai-a { margin-top: 4px; font-size: 11.5px; line-height: 1.5; color: #0f766e;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-ai-item.risk .pt-ai-a { color: #991b1b; }
.pt-ai-item.warn .pt-ai-a { color: #92400e; }
.pt-ai-side .ai-empty { padding: 10px 0; }

@media (max-width: 1360px) {
    .pt-top { grid-template-columns: minmax(0, 1fr) 322px; }
    .pt-top .pt-dash .pt-legend { flex: 0 1 286px; }
}
/* 窄屏：回落单栏，AI 面板改回常规文档流（绝对定位内层在 auto 高度里会塌成 0） */
@media (max-width: 1100px) {
    .pt-top { grid-template-columns: minmax(0, 1fr); }
    .pt-ai-side { min-height: 0; }
    .pt-ai-inner { position: static; overflow: visible; }
}

/* 【v1.9.7 微调】点检总数面板体 = 「环形图 + 4 项竖向图例 | 率卡列」两栏：
   原来率卡横排在下一行时，图例右侧会空出 400+px；改两栏后整块填满且图仍紧贴最左。 */
.pt-top .pt-dash .pt-panel-body {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 356px);
    align-items: center; gap: 10px 20px;
}
.pt-top .pt-dash .pt-cards { flex: 0 0 auto; flex-direction: column; }
.pt-top .pt-dash .pt-donut-wrap { align-self: center; }


/* ===================== 【v1.9.8】① 点检面板改「左右各 50%」 ===================== */
/* 用户反馈：v1.9.7 理解有误 —— 左侧仪表盘「占展示区 50% 宽度就可以」，右侧 50% 展示 AI 解析。
   ★必须写在文件末尾：v1.9.7 的 .pt-top 窄屏覆盖块在前面，同优先级下「后写者胜」，
     故这里要把 ≤1100px 的单栏回落**再写一次**，否则窄屏会被 50/50 顶破。 */
.pt-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* 半宽面板体内重排：环形图 + 图例 一行 → 3 张率卡 横排一行 */
.pt-top .pt-dash .pt-panel-body { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.pt-top .pt-dash .pt-donut-wrap { flex: 1 1 100%; gap: 14px; }
.pt-top .pt-dash .pt-legend { flex: 1 1 auto; }
.pt-top .pt-dash .pt-cards { flex: 1 1 100%; flex-direction: row; }
.pt-top .pt-dash .pt-card { flex: 1 1 0; min-width: 0; padding: 6px 10px; gap: 8px; }
.pt-top .pt-dash .pt-card-num { font-size: 18px; }
@media (max-width: 1360px) {
    .pt-top .pt-dash .pt-legend { flex: 1 1 auto; }
}
@media (max-width: 1100px) {
    .pt-top { grid-template-columns: minmax(0, 1fr); }
    .pt-ai-side { min-height: 0; }
    .pt-ai-inner { position: static; overflow: visible; }
}

/* ===================== 【v1.9.8】② 隐患类面板：门户「隐患统计」版式 ===================== */
/* 对应后端 st.haz；门户版式：各维度分布环 → 未处理情况环 → 消缺周期 → 隐患情况统计表 */
.hz-dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hz-dims-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hz-donut { border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 8px 10px 9px; }
.hz-donut-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px;
    font-size: 12.5px; font-weight: 600; color: #0f172a; }
.hz-donut-h em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 400; color: #64748b; }
.hz-donut-b { display: flex; align-items: center; gap: 12px; }
.hz-donut-b .pt-donut { flex: 0 0 auto; }
.hz-donut-b .pt-legend { flex: 1 1 auto; min-width: 0; }
.hz-donut .pt-legend li { padding: 4px 0; }
/* 三列小卡里图例更窄：收一下三个数值列的宽度，避免把名称挤没 */
.hz-donut .pt-lg-n { max-width: 96px; }
.hz-donut .pt-lg-v { min-width: 44px; padding-left: 6px; }
.hz-donut .pt-lg-p { min-width: 52px; padding-left: 6px; }

/* 消缺周期：名称 | 天数 | n | 占比条 */
.hz-cycle { display: flex; flex-direction: column; gap: 9px; }
.hz-cyc-item { display: grid; grid-template-columns: 108px 88px 58px minmax(0, 1fr);
    align-items: center; gap: 8px; font-size: 12.5px; }
.hz-cyc-n { color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hz-cyc-v { font-weight: 700; color: #0f172a; }
.hz-cyc-v em { margin-left: 2px; font-style: normal; font-weight: 400; font-size: 11px; color: #64748b; }
.hz-cyc-s { font-size: 11.5px; color: #64748b; }
.hz-cyc-bar { height: 8px; border-radius: 4px; background: #eef2f7; overflow: hidden; }
.hz-cyc-bar i { display: block; height: 100%; background: #5b8ff9; }
.hz-note { margin-top: 8px; font-size: 11.5px; line-height: 1.5; color: #64748b; }
.hz-scroll { max-height: 240px; }

/* 隐患情况统计表：合计行加重、超期/低处理率标红 */
.ai-table-hz .hz-total td { font-weight: 700; background: #f4f7fb; }
.ai-table-hz .hz-tot-n { font-weight: 700; color: #0f172a; }
.ai-table-hz .hz-bad { color: #b00020; font-weight: 700; }

@media (max-width: 1180px) {
    .hz-dims, .hz-dims-2 { grid-template-columns: minmax(0, 1fr); }
}

/* 隐患统计表：半栏 12 列必须压缩内边距/字号，否则每格 4 字就溢出行 */
.ai-table-hz th, .ai-table-hz td { padding-left: 4px; padding-right: 4px; }
.ai-table-hz { font-size: 11.5px; }
.hz-hid { margin-left: 8px; font-size: 11px; font-weight: 400; color: #94a3b8; }

/* ================= 【v1.9.9】隐患：产线看板 + 区域/产线合并统计表 ================= */
/* 左 2 环（产线分布 / 未处理·按产线）+ 右汇总表：三栏并排，顶部对齐。
   960 / 1180 / 1400 三档回落见下方 media（避免窄屏把环形图挤成一条）。 */
.hz-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 10px; align-items: start; }
.hz-board .hz-donut { height: 100%; }
.hz-board .hz-donut-b { gap: 10px; }
.hz-board-tb { min-width: 0; }
.hz-board-tb .hz-scroll { max-height: 420px; }
.hz-board-tb .ai-table-hz th, .hz-board-tb .ai-table-hz td { padding-left: 5px; padding-right: 5px; }
.hz-board-tb .ai-table-hz .ai-tb-k { max-width: 112px; }

/* ====================================================================
   【v1.9.31b·2026-09-25】隐患分布看板（hz-charts3）：3 列布局
   第 1、2 列 = 4 个环形图（来源/状态/区域/消缺周期）2×2；
   第 3 列 = 「当前隐患未处理情况（按产线）」环 + 右侧 等级/专业 数字 UI 卡竖排。
   ==================================================================== */
.hz-charts3 {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 10px; align-items: stretch;
}
.hz-charts-side {
    grid-column: 3; grid-row: 1 / span 2;
    /* 【v1.9.31c】竖排：未处理环在上，等级/专业数字卡铺在下方的空白区（用户 2026-09-25 图示） */
    display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.hz-charts-side .hz-donut { flex: 0 0 auto; }
.hz-mini-row { display: flex; gap: 10px; align-items: stretch; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.hz-mini-row .hz-mini-group { flex: 1 1 200px; min-width: 0; }
.hz-mini-group h4 { margin: 0 0 5px; font-size: 12.5px; font-weight: 700; color: #475569; }
.hz-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
/* 【v1.9.32】数字卡增强（用户反馈：隐患等级/专业分类不太明显）：浅底+粗色条+大数字 */
.hz-mini {
    background: #f8fafc; border: 1px solid var(--border); border-left: 4px solid var(--mini-c, #3b5fc9);
    border-radius: 8px; padding: 8px 11px 7px; line-height: 1.3; min-width: 0;
    display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.hz-mini-n { font-size: 21px; font-weight: 800; color: var(--mini-c, #3b5fc9); font-variant-numeric: tabular-nums; }
.hz-mini-l { font-size: 12px; font-weight: 600; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hz-mini-p { font-size: 11px; color: #94a3b8; }
@media (max-width: 1180px) {
    .hz-charts3 { grid-template-columns: minmax(0, 1fr); }
    .hz-charts-side { grid-column: auto; grid-row: auto; }
}

/* 「区域」列 rowspan 合并单元格：居中 + 浅底 + 小计另起一行小字 */
.ai-table-hz td.hz-area { text-align: center; font-weight: 600; color: #0f172a; background: #f8fafc; white-space: nowrap; }
.ai-table-hz td.hz-area em { display: block; margin-top: 3px; font-style: normal; font-weight: 400; font-size: 10.5px; color: #64748b; }
.ai-table-hz td.hz-line { white-space: nowrap; }

/* ---- 【v1.9.32/33】隐患状态明细卡（状态多选 + 当月/全部/自定义） ---- */
#hz-status-card { margin-top: 14px; }
.hzst-seg, .hzst-sort { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hzst-sort { margin-left: auto; }
.hzst-sort-lab { font-size: 11.5px; color: #94a3b8; }
.hzst-btn { padding: 3px 12px; }
.hzst-btn:not(.on) { opacity: .8; }
.hzst-date { height: 26px; border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; font-size: 12px; background: #fff; color: #1f2a3a; }
.hzst-date-sep { color: #94a3b8; }
.ai-table-hz td.hzst-desc { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-table-hz td.hzst-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 1400px) {
    .hz-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .hz-board-tb { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
    .hz-board { grid-template-columns: minmax(0, 1fr); }
    .hz-board-tb { grid-column: auto; }
}

/* ================= 【v1.9.9】局域网：口令弹窗 + 设置子页 ================= */
.lan-login-wrap { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: rgba(15, 23, 42, .42); }
.lan-login-wrap.show { display: flex; }
.lan-login-box { width: 360px; background: #fff; border-radius: 10px; padding: 20px 22px 16px; box-shadow: 0 18px 48px rgba(15, 23, 42, .28); }
.lan-login-box h3 { margin: 0 0 8px; font-size: 16px; color: #0f172a; }
.lan-login-tip { margin: 0 0 14px; font-size: 12.5px; line-height: 1.6; color: #64748b; }
.lan-login-box input { width: 100%; box-sizing: border-box; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13.5px; }
.lan-login-box input:focus { outline: none; border-color: #5b8ff9; box-shadow: 0 0 0 2px rgba(91, 143, 249, .18); }
.lan-login-btns { display: flex; gap: 10px; margin-top: 14px; }
.lan-login-msg { min-height: 18px; margin: 10px 0 0; font-size: 12px; color: #b00020; }

.lan-url-input { width: 260px; height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px; color: #0f172a; background: #f8fafc; }
#lan-pwd { width: 170px; height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px; }
.hint.lan-err { color: #b00020; }
#lan-state { line-height: 1.7; }


/* ==================== 【v1.9.10】报警产线统计矩阵（13 列 · 小组合并 · 整册合计） ==================== */
.ai-table-line { font-size: 12px; min-width: 100%; }
.ai-table-line thead th {
    background: #fdf2d8; color: #414352; font-weight: 700;
    white-space: nowrap; padding: 5px 6px; border: 1px solid #e6d3a8;
}
.ai-table-line tbody td {
    white-space: nowrap; padding: 4px 6px; border: 1px solid #e8ebf2;
}
.ai-table-line tbody td.ln-c { text-align: center; }
.ai-table-line tbody td.ln-grp {
    text-align: center; vertical-align: middle; font-weight: 700;
    background: #f7f9fc; color: #2f3550;
}
.ai-table-line tbody tr.ln-tot td {
    background: #e8f6f4; font-weight: 700; color: #1b3d38;
}
.ai-table-line tbody td.ln-risk { color: #b00020; font-weight: 700; }
.ai-table-line tbody td.ln-warn { color: #9a5b00; font-weight: 700; }

/* ==================== 【v1.9.10】点检统计表（组织/区域/产线/人员）+ 只看未执行 ==================== */
.pt-stat-bar {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 6px 2px 8px; font-size: 12px; color: #5a6178;
}
.pt-stat-chk {
    display: inline-flex; align-items: center; gap: 5px;
    cursor: pointer; user-select: none;
    padding: 2px 10px; border: 1px solid #cfd8e8; border-radius: 12px; background: #f7f9fc;
}
.pt-stat-chk:hover { border-color: #3b5fc9; color: #3b5fc9; }
.pt-stat-chk input { width: 14px; height: 14px; accent-color: #3b5fc9; cursor: pointer; }
.pt-stat-hint b { color: #b00020; }
.pt-stat-now { color: #1f4e79; font-weight: 700; }
.pt-stat-wrap { max-height: 480px; overflow: auto; }
.ai-table-ptstat thead th { position: sticky; top: 0; z-index: 2; }
.ai-table-ptstat td.pt-c { text-align: center; white-space: nowrap; }
.ai-table-ptstat tbody tr:hover td { background: #f5f8ff; }

/* ===== 【v1.9.11】模块分析面板顶部「数据时间」条 ===== */
/* 目的：让"这批分析数据是什么时候抓的"直接写在脸上，避免把旧数据当新数据。 */
/* 【v1.9.31b】改为内联小胶囊：挂在卡片标题行 hint 后面，不再单独占一行。 */
.ai-data-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    color: #3f4a5a;
    background: #f3f6fb;
    border: 1px solid #dde5f0;
    border-left: 3px solid #3b5fc9;
    vertical-align: middle;
    white-space: nowrap;
}
.ai-data-time b { color: #1f2a3a; font-weight: 600; letter-spacing: .2px; }
.ai-data-time .adt-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #3b5fc9; flex: 0 0 auto;
}
.ai-data-time.is-stale {
    background: #fff7ec;
    border-color: #f3d6a8;
    border-left-color: #e8912d;
    color: #7a5620;
    white-space: normal;
}
.ai-data-time.is-stale .adt-dot { background: #e8912d; }
.ai-data-time .adt-warn { color: #c0392b; font-weight: 600; margin-left: 4px; }


/* ==========================================================================
   【v1.9.16】用户 2026-09-18 反馈：
   ① 各分析模块内部不要再出现「右侧上下滚动条」，内容一律直接显示（不隐藏、不限高）；
   ② 隐患：产线看板右侧汇总表删除后，两个环形图并排铺开；
   ③ 点检页新增「当日数据 / 全部数据」切换控件样式。
   —— 一律在此追加覆盖块，不改原有规则（回滚只需删掉本块）。
   ========================================================================== */

/* ① 分析模块内的纵向滚动条全部去掉（只保留横向，宽表仍可左右看） */
.ai-card .table-wrap,
.ai-col .ai-block > .table-wrap,
.ai-wide .table-wrap,
.ai-dimtable,
.hz-scroll,
.hz-board-tb .hz-scroll,
.pt-stat-wrap,
.metrics-tw,
.metrics-grid .metrics-tw,
.mt-body .metrics-tw {
    max-height: none;
    overflow-y: visible;
}
/* AI 解析右侧栏原来靠「绝对定位 + 内部滚动」与左侧仪表盘等高 → 改为随内容自然撑开 */
.pt-ai-side { min-height: 0; }
.pt-ai-inner { position: static; inset: auto; overflow: visible; padding: 10px 13px 12px; }
.pt-ai-side::after { display: none; }
/* 表格容器不再滚动 → 表头不再需要 sticky（否则会浮在其它板块上面） */
.ai-card table th,
.ai-table-ptstat thead th,
.mt-table thead tr:first-child th { position: static; }

/* ② 隐患产线看板：两张环形图并排（原来是「两图 + 汇总表」三栏） */
.hz-board.hz-board-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1180px) {
    .hz-board.hz-board-2 { grid-template-columns: minmax(0, 1fr); }
}

/* ③ 点检「数据区」头上的 当日 / 全部 切换 */
.pt-scope-bar {
    margin-left: auto; margin-right: 12px; display: inline-flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
}
.pt-scope-label { font-size: 12px; color: var(--text-secondary); }
.pt-scope-group {
    display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
    background: #fff;
}
.pt-scope-btn {
    border: none; background: transparent; padding: 4px 12px; font-size: 12.5px; cursor: pointer;
    color: var(--text-secondary); line-height: 1.6;
}
.pt-scope-btn + .pt-scope-btn { border-left: 1px solid var(--border); }
.pt-scope-btn:hover { background: #f2f6fd; color: #3b5fc9; }
.pt-scope-btn.active { background: #3b5fc9; color: #fff; font-weight: 600; }
.pt-scope-hint { font-size: 11.5px; color: #94a3b8; }

/* ====================================================================
   【v1.9.31】页内报表页签卡（rp-tabs）：左树二级报表移到各管理页顶部
   报警=单页签 · 隐患=单页签 · 点检=报表3/4 · 检修=报表5~9（点击切换页面）
   ==================================================================== */
.rp-head-card { padding: 8px 13px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* 【v1.9.31b】页签视觉增强（用户 2026-09-25：切换卡顿修复 + 卡片区分度）：
   分离式胶囊组（灰底槽 + 白底页签 + 选中渐变蓝 + 投影），悬停微抬，选中页签带底部高光条 */
.rp-tabs {
    display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px;
    background: #eef2f8; border: 1px solid #e2e8f0; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
}
.rp-tab {
    border: none; background: transparent; padding: 6px 18px; font-size: 13px; cursor: pointer;
    color: #475569; line-height: 1.6; white-space: nowrap; border-radius: 7px;
    transition: background .12s ease, color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.rp-tab + .rp-tab { border-left: none; }
.rp-tab:hover { background: #fff; color: #3b5fc9; box-shadow: 0 1px 4px rgba(59, 95, 201, .18); transform: translateY(-1px); }
.rp-tab.on {
    background: linear-gradient(135deg, #3b5fc9, #2f4ea8); color: #fff; font-weight: 600;
    box-shadow: 0 2px 6px rgba(47, 78, 168, .35), inset 0 -2px 0 rgba(255, 255, 255, .22);
}
/* 【2026-10-18 用户指令③】点检管理三页签辨识度：左侧色条 + 选中态同色系渐变
   常规点检=蓝（tint-cg）/ 隐蔽部位点检=紫（tint-yb）/ 点检师执行=橙（tint-ds，
   与点检隐患卡青绿系、检修管理默认蓝区分，避免三组页签长相完全一样） */
.rp-tab.tint-cg { box-shadow: inset 3px 0 0 #3b82c4; }
.rp-tab.tint-yb { box-shadow: inset 3px 0 0 #8b5cf6; }
.rp-tab.tint-ds { box-shadow: inset 3px 0 0 #f59e0b; }
.rp-tab.tint-cg.on {
    background: linear-gradient(135deg, #3b82c4, #2563a8);
    box-shadow: 0 2px 6px rgba(37, 99, 168, .35), inset 0 -2px 0 rgba(255, 255, 255, .22);
}
.rp-tab.tint-yb.on {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 2px 6px rgba(124, 58, 237, .35), inset 0 -2px 0 rgba(255, 255, 255, .22);
}
.rp-tab.tint-ds.on {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 6px rgba(217, 119, 6, .35), inset 0 -2px 0 rgba(255, 255, 255, .22);
}
.rp-hint { font-size: 11.5px; color: #94a3b8; }
/* 数据区卡头部嵌的页签（替换原 h2 标题的位置） */
.card-header .rp-tabs { margin-right: 12px; }
/* 【v1.9.31b】复制页面排除标记：rp-tabs 头部卡 / 口径行 / 空态提示 不进截图 */
.no-capture { }

/* 【v1.9.16b】★根因定位：分析页右侧那条"上下滚动"来自这里 ——
   .panel-layout 被写死 height: calc(100vh - 100px)，.right-column 再 height:100% + overflow:auto
   → 整个分析区变成一个固定高的盒子，内容超出就在**模块右侧**出现内部滚动条。
   用户要求"不要隐藏、直接显示"，故取消限高：高度随内容撑开，只保留整页一条滚动条。
   同理「数据明细」卡片的固定高也取消（分页仍在，表格不再内部滚动）。 */
.panel-layout { height: auto; align-items: start; }
.left-column { height: auto; overflow: visible; }
.right-column { height: auto; overflow: visible; }
.detail-card { height: auto; }
.detail-card .table-wrap { flex: 0 0 auto; }

/* ====================================================================
   【v1.9.17】①「一键登陆」按钮前的内联登录状态（不再弹窗）
            ② 总览卡片的口径角标（当日 / 全部）
            ③ 检修类「按 Y86 筛空、本次按全量显示」的提示条
   ★一律用追加覆盖块的方式写在文件末尾，不改动既有规则。
   ==================================================================== */
.login-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    border: 1px solid transparent;
    white-space: nowrap;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.login-badge.is-ok {
    color: #0f7b3f;
    background: #e7f7ee;
    border-color: #b6e6cb;
}
.login-badge.is-bad {
    color: #b3261e;
    background: #fdeceb;
    border-color: #f6c9c5;
}
.ov-card-tag {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #b6e2ff;
    background: rgba(63, 208, 255, .13);
    border: 1px solid rgba(63, 208, 255, .32);
    white-space: nowrap;
}
.ov-card-tag.is-day {
    color: #ffe3a3;
    background: rgba(255, 197, 61, .14);
    border-color: rgba(255, 197, 61, .38);
}
.hz-note-warn {
    color: #b3261e;
    background: #fdeceb;
    border: 1px solid #f6c9c5;
    border-radius: 6px;
    padding: 7px 10px;
    line-height: 1.7;
}
/* ====================================================================
   【v1.9.18】报表2「隐患管理 · 数据区」：分析 / 当月数据 / 全部数据 三页签
             + 59 人 × 11 列人员汇总表（表头底色对齐用户参考表 #00B0F0）
   ==================================================================== */
.hz-tabbar {
    margin-left: 12px; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.hz-tabbar .pt-scope-group { background: #fff; }
.hz-tabbar .pt-scope-btn { padding: 5px 14px; font-size: 13px; }
.hz-tabbar .pt-scope-hint { max-width: 640px; }

.hz-pt-wrap { width: 100%; overflow-x: auto; }
.hz-pt-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hz-pt-table th, .hz-pt-table td {
    border: 1px solid #cfd8e3; padding: 5px 8px; text-align: center;
    white-space: nowrap; color: var(--text);
}
.hz-pt-table thead th { background: #00B0F0; color: #0b2b3c; font-weight: 700; }
.hz-pt-table tbody tr:nth-child(odd) td { background: #f8fbff; }
/* 合并区域格（rowspan）始终灰色：压过全局斑马纹(html[data-tbl-zebra] .ai-card table tbody tr:nth-child(even) td)
   与「零隐患整行黄底红字」(tr.hz-row-zero td)，避免 1#厂房合并列被染色（多 tab 通病）。
   ★【2026-10-19 用户指令】点检师执行去掉鼠标悬停特效 → 不写 :hover 规则。 */
html .hz-pt-table tbody td.hz-pt-g {
    background: #f1f5fb !important;
    color: var(--text) !important;
    font-weight: 600 !important;
}
.hz-pt-table td.hz-pt-zero { color: #b8c4d4; }
.hz-pt-table td.hz-pt-num { font-variant-numeric: tabular-nums; }
.hz-pt-table tbody tr:nth-child(odd) td.hz-pt-num { background: #f8fbff; }
.hz-pt-sum { margin-top: 8px; font-size: 12px; color: #475569; }
.hz-pt-sum b { color: #0f172a; }
.hz-pt-note { margin-top: 6px; font-size: 11.5px; line-height: 1.6; color: #94a3b8; }

/* 【v1.9.18】报表2 抓取卡片：日期框已失效的提示 */
.sc-nodate {
    grid-column: 1 / -1; font-size: 11.5px; line-height: 1.5; color: #b26a00;
    background: #fff8e6; border: 1px solid #ffe0a3; border-radius: 4px; padding: 4px 6px;
}
.scrape-card-body .sc-dt input:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }

/* ★【v1.9.18】该表表头必须是参考表的 #00B0F0：
   设置页「表头加粗」的通用规则 html[data-tbl-header="strong"] .ai-card table thead th
   优先级高于 .hz-pt-table thead th，会把底色改成浅灰蓝 #dce6f5（e2e 实测 rgb(220,230,245)），
   故这里显式 !important 锁死底色与字色。 */
html .hz-pt-table thead th,
html[data-tbl-header="strong"] .ai-card .hz-pt-table thead th,
html[data-tbl-header="strong"] .ai-card table.hz-pt-table thead th {
    background: #00B0F0 !important; color: #0b2b3c !important; font-weight: 700 !important;
}

/* ==========================================================================
   【v1.9.19】用户 2026-09-18 的 4 条界面要求：
   ①「当月数据 / 全部数据」人员汇总表**锁定表头**（下拉查看时吸顶）；
     「已结案(超时）」列数值红色加粗；
   ②「隐患情况统计（按厂房 → 产线）」加「当月 / 全部」切换（默认当月）；
   ③「点检统计表（组织/区域/产线/人员）」加「当日 / 全部」切换（默认当日）+
     独立「数据明细」页同款控件；
   ④ 检修管理报表5~9 顶部「区域 · 产线总表」。
   ★一律追加在文件末尾：v1.9.16 里有一条「.ai-card table th { position: static }」
     的规则会把所有吸附表头关掉，这里必须用**更高特异性**把它盖回来。
   ========================================================================== */

/* ① 锁定表头：容器限高可滚 + thead 吸顶（特异性 (0,3,3) > v1.9.16 那条 (0,1,2)） */
/* 【v1.9.32】当月/全部数据明文全显：去掉内部滚动上限（用户要求不要隐藏下拉） */
.ai-card .hz-pt-wrap { max-height: none; overflow: auto; }
.ai-card .hz-pt-wrap table.hz-pt-table thead th {
    position: sticky; top: 0; z-index: 3;
    box-shadow: 0 1px 0 #cfd8e3;
}
/* 「已结案(超时）」：红色加粗（表格单元格 + 表尾合计） */
.hz-pt-table td.hz-pt-red { color: #d92d20; font-weight: 700; }
.hz-pt-sum b.hz-pt-red-t { color: #d92d20; }

/* 【2026-10-19】点检师执行：时间口径工具栏 + 发现隐患=0 整行高亮 */
.djshi-scope-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 10px; }
.djshi-scope-group { display: inline-flex; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .05); }
.djshi-scope-btn { padding: 6px 16px; font-size: 13px; font-weight: 500; color: #475569; background: #fff; border: none; cursor: pointer; }
.djshi-scope-btn + .djshi-scope-btn { border-left: 1px solid #e2e8f0; }
.djshi-scope-btn:hover { background: #e8f0fe; color: #1d4ed8; }
.djshi-scope-btn.active { background: #3b5fc9; color: #fff; font-weight: 600; }
.djshi-scope-label { font-size: 12px; color: #64748b; }
.djshi-custom-range { display: inline-flex; align-items: center; gap: 6px; }
.djshi-custom-range input[type=date] { padding: 4px 8px; font-size: 12px; border: 1px solid #e2e8f0; border-radius: 6px; }
.djshi-apply { padding: 5px 14px; font-size: 13px; border: none; border-radius: 6px; background: #3b5fc9; color: #fff; cursor: pointer; }
.djshi-apply:hover { background: #2f4fb0; }
/* ★【2026-10-19】点检师执行 tab：红色边框醒目（用户要求显眼） */
.rp-tab[data-rp-tab="djshi"] {
    border: 2px solid #ff4d4f !important;
    border-radius: 4px;
}
.rp-tab[data-rp-tab="djshi"]:not(.active) {
    color: #ff4d4f !important;
    font-weight: 700 !important;
}
/* 日期筛选控件：整体保持一行，节省纵向空间（窄屏横向滚动不换行） */
.djshi-scope-bar { flex-wrap: nowrap; overflow-x: auto; gap: 8px; }
.djshi-custom-range { white-space: nowrap; flex: 0 0 auto; }
/* 发现隐患数量=0 的整行：黄底红字加粗（!important 压过奇偶行底色；区域合并格除外，保持灰色） */
.hz-pt-table tr.hz-row-zero td { background: #fff3cd !important; color: #c0392b !important; font-weight: 700 !important; }

/* ★【2026-10-19】点检师执行·隐患筛选按钮组（零隐患 / 【N】条内隐患，位于日期档之前） */
.djshi-hz-group { display: inline-flex; align-items: center; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .05); }
.djshi-within { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; }
.djshi-bracket { color: #64748b; font-weight: 600; font-size: 13px; }
.djshi-hz-n { width: 44px; padding: 3px 4px; font-size: 13px; text-align: center; border: 1px solid #e2e8f0; border-radius: 6px; }
.djshi-sep { width: 1px; height: 22px; background: #e2e8f0; margin: 0 4px; }
/* ★【2026-10-19 用户指令】「零隐患」按钮红色边框凸显（选中态红底白字） */
.djshi-hz-group button[data-dj-hz="zero"] {
    border: 2px solid #ff4d4f !important; border-radius: 6px !important;
    color: #ff4d4f !important; font-weight: 700 !important;
}
.djshi-hz-group button[data-dj-hz="zero"].active { background: #ff4d4f !important; color: #fff !important; }
/* ★【2026-10-19 用户指令】工具栏上移至 tab 行（.card-header）右侧后的行内微调 */
#tab-djshi .card-header { flex-wrap: nowrap; overflow-x: auto; }
#tab-djshi .card-header .djshi-scope-bar {
    margin: 0 0 0 auto !important; flex: 0 0 auto; padding: 0; border: 0; background: none;
}

/* ②③ 小标题行（标题 + 分段控件 + 提示） */
.hz-blk-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.hz-blk-head .ai-block-title { margin: 0; }
.pt-scope-inline { display: inline-flex; align-items: center; gap: 8px; }
.detail-pt-scope {
    margin: 0 0 8px; padding: 6px 10px; background: #f7fafd;
    border: 1px solid var(--border); border-radius: 6px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* ④ 区域 · 产线总表 */
.ai-table-arealine td.hz-area {
    text-align: center; font-weight: 600; color: #0f172a;
    background: #f8fafc; white-space: nowrap; vertical-align: middle;
}
.ai-table-arealine td.hz-area em {
    display: block; margin-top: 3px; font-style: normal;
    font-weight: 400; font-size: 10.5px; color: #64748b;
}
.ai-table-arealine td.hz-line { white-space: nowrap; }
.ai-table-arealine tr.hz-total td { font-weight: 700; background: #eaf3fd; }
.ai-table-arealine tr.hz-total td:first-child { text-align: center; }
.ai-table-arealine .hz-bad { color: #d92d20; }

/* ==========================================================================
   【v1.9.20】检修管理报表5~9：顶部「区域 · 产线总表」显示风格强化
   --------------------------------------------------------------------------
   用户 2026-09-18：「报表5-9里面顶部的汇总表优化下显示风格边框等，现在不太好看」。
   现状问题：整表只有横向浅灰分隔线（无外框 / 无竖线）、表头浅灰底灰字且左对齐、
   数字列左对齐无等宽、合计行只有淡蓝底 → 层级弱、看着"平"。
   改法：**只加样式**，不动 index.html 结构、不动 app.js 的 _areaLineTable 渲染逻辑。
     ① 全网格线（外框 + 竖向分隔线）；② 表头着色居中加粗；
     ③ 数值列右对齐 + 等宽数字；④ 区域列左侧主色条 + 居中；
     ⑤ 合计行加深并加上框线；⑥ 逾期值改红底小签；⑦ 行 hover 高亮。
   ★一律追加在文件末尾（本项目既有约定：新增改动只追加，不回改历史规则）。
   ★不启用斑马纹：本表「区域」列是 rowspan 合并单元格（一个厂房跨 2~3 行），
     nth-child 交替会与合并格错位、反而更花；用网格线 + hover 已足够分明。
   ========================================================================== */
.ai-table-arealine {
    border-collapse: collapse;
    border: 1px solid #cfdbea;
}
.ai-table-arealine thead th {
    background: #e8f1fb; color: #1f4e79; font-weight: 700;
    text-align: center; vertical-align: middle;
    padding: 7px 10px;
    border: 1px solid #c9d9ea;
    border-bottom: 1px solid #a9c6e4;
}
.ai-table-arealine tbody td {
    padding: 7px 10px;
    border: 1px solid #e6ecf4;
    vertical-align: middle;
}
/* 全局有「.ai-table tr:last-child td { border-bottom: none }」→ 这里补回下框线 */
.ai-table-arealine tbody tr:last-child td { border-bottom: 1px solid #cfdbea; }
/* 产线列：左对齐不换行 */
.ai-table-arealine td.hz-line { text-align: left; white-space: nowrap; }
/* 数值列（工单数 / 已结案 / 未完成 / 逾期 / 工时 / 占比…）：右对齐 + 等宽数字 */
.ai-table-arealine td.pt-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* 区域列：左侧主色条 + 淡蓝底 + 居中 */
.ai-table-arealine td.hz-area {
    border-left: 3px solid #3b5fc9;
    background: #f5f9ff;
    text-align: center; vertical-align: middle;
    font-weight: 700; color: #17365d; white-space: nowrap;
}
.ai-table-arealine td.hz-area em {
    display: block; margin-top: 3px; font-style: normal;
    font-weight: 400; font-size: 10.5px; color: #5b7ea8;
}
/* 行 hover 高亮（区域列与合计行不参与，避免盖掉它们自己的底色） */
.ai-table-arealine tbody tr:hover td { background: #f1f7ff; }
.ai-table-arealine tbody tr:hover td.hz-area { background: #eaf3ff; }
/* 合计行：加深底色 + 上框线加重 */
.ai-table-arealine tr.hz-total td {
    background: #dbe9f8; color: #17365d; font-weight: 700;
    border-top: 1px solid #a9c6e4;
    border-bottom: 1px solid #cfdbea;
}
.ai-table-arealine tr.hz-total td:first-child { text-align: center; }
/* 逾期（积压）值：红底小签，一眼可见 */
.ai-table-arealine td.hz-bad { text-align: right; }
.ai-table-arealine td.hz-bad,
.ai-table-arealine td.hz-bad b { color: #c0392b; }
.ai-table-arealine td.hz-bad b {
    display: inline-block; min-width: 26px; padding: 1px 7px;
    background: #fdeceb; border-radius: 4px;
}


/* ===================== 【2026-09-20 v1.9.21】AI 分析右上角「重新解析」 ===================== */
/* 语义 = 重算：用当前分析代码把该报表最近一次导出的 xlsx 重跑一遍（不重新抓门户、不动账号） */
.ai-refresh {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px 4px 8px;
    font-size: 12px; font-family: inherit; line-height: 1.4;
    color: var(--primary); background: #ffffff;
    border: 1px solid #cfe0f3; border-radius: 999px;
    cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.ai-refresh:hover { background: var(--primary-light); border-color: #a9c9e9; }
.ai-refresh:active { box-shadow: inset 0 1px 3px rgba(21,101,192,.18); }
.ai-refresh svg { flex: 0 0 auto; }
.ai-refresh.is-busy { color: var(--text-secondary); border-color: var(--border); cursor: progress; }
.ai-refresh.is-busy svg { animation: ai-refresh-spin .9s linear infinite; }
@keyframes ai-refresh-spin { to { transform: rotate(360deg); } }
.ai-refresh-msg {
    font-style: normal; font-size: 11px; color: var(--text-secondary);
    max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ai-refresh-msg:not(:empty) { margin-left: 2px; }

/* ===================== 【2026-09-20 v1.9.21】指标完成情况：各分节时间筛选 ===================== */
/* 三组口径：hazard(隐患/报警) · work(检修记录：二/四/五/六/七联动) · pending(待处理工单，实时存量快照) */
.mt-scope {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 4px;
    flex-wrap: wrap; justify-content: flex-end;
}
.mt-sc-lab { font-size: 12px; color: var(--text-secondary); margin-right: 2px; }
.mt-sc-btn {
    font-family: inherit; font-size: 12px; line-height: 1.4;
    padding: 3px 9px; border-radius: 999px;
    color: var(--text-secondary); background: #ffffff;
    border: 1px solid var(--border); cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.mt-sc-btn:hover { color: var(--primary); border-color: #a9c9e9; background: var(--primary-light); }
.mt-sc-btn.active {
    color: #ffffff; background: var(--primary);
    border-color: var(--primary); font-weight: 600;
}
.mt-sc-cus { display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; }
.mt-sc-cus input[type="date"] {
    font-family: inherit; font-size: 11px; color: var(--text);
    padding: 2px 4px; border: 1px solid var(--border); border-radius: 5px;
    background: #ffffff; width: 116px;
}
.mt-sc-cus i { font-style: normal; color: var(--text-secondary); font-size: 11px; }
.mt-sc-go {
    font-family: inherit; font-size: 12px; padding: 3px 10px;
    color: #ffffff; background: var(--primary); border: 1px solid var(--primary);
    border-radius: 999px; cursor: pointer; font-weight: 600;
}
.mt-sc-go:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* 来源条：生效口径 + 全量对照 */
.mt-src-scope {
    font-style: normal; display: inline-block; margin-left: 4px;
    font-size: 11px; color: var(--primary);
    background: var(--primary-light); border-radius: 4px; padding: 0 5px;
}
.mt-src-all {
    font-style: normal; display: inline-block; margin-left: 4px;
    font-size: 11px; color: var(--text-secondary);
    background: #eef2f7; border-radius: 4px; padding: 0 5px;
}

/* 窄屏（局域网手机访问）：控件整行换行、日期框自适应 */
@media (max-width: 760px) {
    .mt-scope { margin-left: 0; width: 100%; justify-content: flex-start; }
    .ai-refresh span { display: none; }
}


/* ================== 【v1.9.25】指标页表格铺满 / 复制按钮 / 固定单位代码卡片 ================== */

/* ① 「复制为图片」按钮
   原来用 .btn-ghost（background/border 全透明、文字为次要灰）→ 视觉上就是标题旁一行
   灰字，用户 2026-09-20 明确反馈「复制按钮没有见到」。改为白底 + 主色描边 + 主色字，
   与右侧实心蓝的「重新汇总」形成「次按钮 / 主按钮」的清晰主次关系。 */
#btn-metrics-copy {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(21, 101, 192, .12);
}
#btn-metrics-copy:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 3px 10px rgba(21, 101, 192, .22);
}
#btn-metrics-copy svg { flex: 0 0 auto; }

/* ② 指标页表格：列宽以 colgroup 为准（table-layout:fixed）
   固定布局下内容不再参与列宽竞争，因此必须保证单元格内容不会顶破列宽：
   允许长文本在列内换行（不裁切、不加省略号，避免丢信息）。 */
.metrics-card table.mt-table { table-layout: fixed; }
.metrics-card table.mt-table th,
.metrics-card table.mt-table td { overflow-wrap: break-word; word-break: break-word; }
/* 「区域 / 产线」等靠左文本列不要因为变宽而显得空旷 */
.metrics-card table.mt-table td.mt-txt,
.metrics-card table.mt-table th.mt-htxt { text-align: left; }

/* ③ 抓取卡片里「单位代码」被模块写死时的只读样式（如 dclgd 报表9 = Y800） */
.sc-input-fixed {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
    cursor: not-allowed;
}
.sc-fixed-note {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.4;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 4px;
    padding: 2px 6px;
}

/* ================= 【v1.9.33】表格 UI 增强（布局与数据不动，只提可读性） ================= */
/* ① 悬停高亮升级为 td 级：原 tr:hover(#f7f9fc) 被斑马纹 td 背景盖住，偶数行悬停无反馈；
      跟随斑马纹开关，且不冲掉 合计行(mt-total/hz-total) 与 专用表(交叉/问题表) 的既有悬停色 */
html[data-tbl-zebra="on"] .ai-card table:not(.ai-table-cross):not(.ai-table-prob) tbody tr:hover:not(.mt-total):not(.hz-total) td,
html[data-tbl-zebra="on"] .metrics-card table tbody tr:hover:not(.mt-total) td {
    background: #e8f1fd;
}
html[data-tbl-zebra="off"] .ai-card table:not(.ai-table-cross):not(.ai-table-prob) tbody tr:hover:not(.mt-total):not(.hz-total) td,
html[data-tbl-zebra="off"] .metrics-card table tbody tr:hover:not(.mt-total) td {
    background: #f2f7ff;
}
/* ② 数字统一等宽数字排版（对齐更整齐、扫读更快） */
.ai-card table td { font-variant-numeric: tabular-nums; }
/* ③ 隐患状态卡 12 列宽表：列分隔细线 + 表头加重，横向扫读不串列 */
#hz-status-card .ai-table-hz th + th, #hz-status-card .ai-table-hz td + td { border-left: 1px solid #eef2f7; }
#hz-status-card .ai-table-hz thead th { background: #e8edf5; color: #0f172a; font-weight: 700; }
#hz-status-card .ai-table-hz tbody td { padding-top: 5px; padding-bottom: 5px; }

/* ===================== 【v1.9.39】人员信息栏 + 模块抓取步骤一览 ===================== */
.as-inp {
    width: 95%; box-sizing: border-box; padding: 3px 6px;
    border: 1px solid #cbd5e1; border-radius: 4px; font-size: 12px;
}
.as-inp:focus { border-color: #2563eb; outline: none; }
.as-area-ops { margin-top: 6px; display: flex; flex-direction: row; gap: 6px; align-items: flex-start; flex-wrap: wrap; }

/* 【v1.9.60】人员信息：每区域一张卡片，避免 rowspan 高度不匹配导致的重叠 */
/* 【2026-10-03 布局优化·二轮】7 个区域纵向堆叠高达 1900px、滚动成本高 ⇒ 改为
   「卡片内左右两栏」：左＝人员明细（固定窄列），右＝产线（自适应宽），
   单卡高度大幅压缩，整区高度约减半，一屏能看更多区域。 */
.as-cards { display: flex; flex-direction: column; gap: 10px; }
.as-card {
    border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px;
    background: #ffffff; box-shadow: 0 1px 3px rgba(15,23,42,0.05);
}
/* 卡片头：区域名做成醒目的标题级输入框，操作按钮右对齐 */
.as-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
    padding-bottom: 8px; border-bottom: 1px dashed #e8edf4; }
.as-card-head .as-area-inp {
    flex: 0 1 auto; width: auto; min-width: 130px; max-width: 220px;
    font-weight: 700; font-size: 14px; color: #0f172a;
    padding: 5px 10px; border-radius: 6px; background: #f8fafc;
}
.as-card-head .as-area-inp::placeholder { font-weight: 600; color: #94a3b8; }
.as-card-head .as-area-ops { margin-top: 0; flex: 0 0 auto; margin-left: auto; }
.as-card-head .as-area-tag {
    flex: 0 0 auto; font-size: 11px; color: #64748b; background: #f1f5f9;
    border: 1px solid #e2e8f0; border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
/* 卡片主体：左右两栏 —— 左人员明细(固定) / 右产线(自适应) */
.as-card-body { display: flex; gap: 16px; align-items: flex-start; }
.as-col-staff { flex: 0 0 44%; min-width: 0; }
.as-col-lines { flex: 1 1 auto; min-width: 0; }
/* 区块小标题（人员明细 / 产线） */
.as-block-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 600; color: #475569; margin: 0 0 5px;
}
.as-block-label::before {
    content: ""; width: 3px; height: 11px; border-radius: 2px; background: #3b82f6;
}
.as-lines-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
    color: #475569; margin: 0 0 5px; }
.as-lines-label::before { content: ""; width: 3px; height: 11px; border-radius: 2px; background: #10b981; }
.as-staff-inp { width: 100%; min-height: 72px; resize: vertical; line-height: 1.6;
    font-family: inherit; padding: 6px 9px; font-size: 12px; border-radius: 6px; }
.as-lines { display: flex; flex-direction: column; gap: 6px; padding-left: 10px; border-left: 2px solid #eef2f7; }
/* 产线行：产线名自适应铺满，删除按钮固定在右 */
.as-line-row { display: flex; align-items: center; gap: 6px; }
.as-line-row .as-line-inp { flex: 1 1 auto; width: auto; max-width: none; padding: 5px 9px; font-size: 12px; border-radius: 6px; }
.as-line-row .btn-del-line {
    flex: 0 0 auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #e2e8f0; background: #fff; color: #b91c1c; border-radius: 6px;
    cursor: pointer; font-size: 12px; line-height: 1; padding: 0;
}
.as-line-row .btn-del-line:hover { background: #fef2f2; border-color: #fecaca; }
.as-line-empty { font-size: 11.5px; color: #94a3b8; padding: 4px 0 2px; }
/* 窄屏（手机）自动回落为单列堆叠 */
@media (max-width: 900px) {
    .as-card-body { flex-direction: column; gap: 10px; }
    .as-col-staff { flex: 1 1 auto; width: 100%; }
}

/* ==================== 【2026-10-03 重构】人员信息·三栏合并表 ====================
   用户要求：左中右三栏（区域 | 产线 | 人员明细），左两栏窄、右栏人名宽；
   并把「产线代码」join 进来，取代上方重复的只读「区域/产线总规则表」。 */
.as-merge-tbl { width: 100%; border-collapse: collapse; }
.as-merge-tbl th {
    background: #0c2148; font-size: 12px; font-weight: 600; color: #9cc1ec;
    text-align: center; padding: 8px 10px; border-bottom: 2px solid #1e4c96; white-space: nowrap;
}
.as-merge-tbl td { border-bottom: 1px solid #16407e; padding: 8px 10px; vertical-align: top; }
.as-merge-tbl tr:hover td { background: #122f5f; }
/* 三栏宽度：区域窄、产线窄、人员明细宽 */
.as-merge-tbl .as-c-area, .as-merge-tbl .as-td-area { width: 130px; min-width: 110px; }
.as-merge-tbl .as-c-line, .as-merge-tbl .as-td-line { width: 220px; min-width: 180px; }
.as-merge-tbl .as-c-staff, .as-merge-tbl .as-td-staff { width: auto; min-width: 280px; }
.as-merge-tbl .as-c-ops, .as-merge-tbl .as-td-ops { width: 56px; text-align: center; }
/* 区域单元格：竖排顶部对齐，输入框全宽 */
.as-td-area .as-area-inp { width: 100%; font-weight: 700; font-size: 13px; padding: 5px 8px;
    border-radius: 6px; background: rgba(76, 160, 255, 0.08); color: #eaf3ff; }
.as-td-area .as-area-ops { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.as-td-area .as-area-ops .btn { width: 100%; }
/* 产线单元格：代码输入框（与名称同格式，只读居中）+ 名称输入框 */
.as-td-line { display: table-cell; }
.as-td-line .as-line-inp { width: 100%; min-width: 120px; padding: 5px 8px; font-size: 12px;
    border-radius: 6px; vertical-align: middle; }
.as-none { font-size: 11.5px; color: #94a3b8; }
/* 人员明细单元格：整块可编辑，撑满宽栏 */
.as-td-staff .as-staff-inp { width: 100%; min-height: 40px; resize: vertical; line-height: 1.6;
    font-size: 12px; padding: 6px 9px; border-radius: 6px; }
/* 行内删除按钮 */
.as-td-ops .btn-del-line {
    width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #e2e8f0; background: #fff; color: #b91c1c; border-radius: 6px;
    cursor: pointer; font-size: 12px; padding: 0;
}
.as-td-ops .btn-del-line:hover { background: #fef2f2; border-color: #fecaca; }

/* 【v1.9.60】顶部「导出报表」下拉 */
.export-wrap { position: relative; display: inline-block; }
.export-menu {
    display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 300;
    min-width: 340px; max-height: 420px; overflow: auto;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); padding: 6px;
}
.export-menu.open { display: block; }
.export-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 12.5px;
}
.export-item:hover { background: #f1f5f9; }
.export-item .ei-name { font-weight: 600; color: #0f172a; white-space: nowrap; }
.export-item .ei-meta { color: #64748b; font-size: 11px; text-align: right;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.export-item.is-na { opacity: 0.5; cursor: not-allowed; }
.export-item.export-empty { cursor: default; color: #64748b; justify-content: center; }
.mcc-ov-card {
    border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px;
    margin-bottom: 8px; background: #f8fafc;
}
.mcc-ov-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.mcc-ov-head b { font-size: 13px; color: #0f172a; }
.mcc-ov-tag {
    font-size: 11px; color: #1d4ed8; background: #dbeafe;
    border-radius: 10px; padding: 1px 8px;
}
.mcc-ov-body { font-size: 12px; color: #334155; line-height: 1.7; }
.mcc-ov-body div { white-space: pre-wrap; }

/* ===================== 【v1.9.40】步骤一览 3 列 + 指标表区域/产线强化 ===================== */
/* ② 设置→抓取模块「各模块抓取步骤一览」改 3 列栅格 */
#mod-steps-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}
#mod-steps-overview .mcc-ov-card { margin-bottom: 0; height: 100%; box-sizing: border-box; }

/* ④（v1.9.40 临时强化已由 v1.9.41 区域色块分组方案取代，见文件尾部） */

/* 人员信息栏 textarea */
textarea.as-inp { line-height: 1.6; font-family: inherit; }

/* 【第22轮】底层规则表＝真表格样式：输入框去边框透明化，整表呈现合并单元格的
   网格观感（而不是一堆各自独立的表单框）；编辑态以蓝色下划线提示。
   【第23轮·修复】原 color:#1a1a2e 深色字在本页深蓝背景下完全看不清（用户反馈
   "黑色字体能看清吗"）——改浅色字 + 深色悬停/聚焦底；表格内容居中。 */
.as-merge-tbl td { border: 1px solid #16407e; padding: 0 6px; }
.as-merge-tbl thead th { border: 1px solid #1e4c96; }
.as-merge-tbl .as-inp { border: none !important; background: transparent !important;
    box-shadow: none; width: 100%; font-size: 13px; color: #eaf3ff;
    padding: 9px 4px; margin: 0; border-radius: 0; }
.as-merge-tbl .as-inp::placeholder { color: #5f7ea8; }
.as-merge-tbl .as-inp:hover { background: #16376b !important; }
.as-merge-tbl .as-inp:focus { outline: none; background: #10305f !important;
    box-shadow: inset 0 -2px 0 #4ca0ff; }
.as-merge-tbl textarea.as-inp { resize: vertical; min-height: 46px; }
.as-merge-tbl .btn-del-line { opacity: 0; transition: opacity .15s; }
.as-merge-tbl tr:hover .btn-del-line { opacity: 1; }

/* 【第23轮·用户要求】产线代码 / 产线名称分成两列的列宽 */
.as-merge-tbl .as-c-code, .as-merge-tbl .as-td-code { width: 92px; min-width: 84px; text-align: center; }
.as-merge-tbl .as-c-line, .as-merge-tbl .as-td-line { width: 168px; min-width: 148px; }
/* 【第24轮·用户要求】产线代码=与名称同格式的只读输入框，文字居中、代码蓝 */
.as-merge-tbl .as-code-inp { text-align: center; color: #7fb8f5; cursor: default; }
/* 【第24轮·用户要求】这个表内容居中：输入框内文字也居中 */
.as-merge-tbl .as-inp, .as-merge-tbl textarea.as-inp { text-align: center; }
.as-merge-tbl .as-td-ops .btn-del-line { background: #0c2148; border-color: #16407e; color: #ff8a80; }
.as-merge-tbl .as-td-ops .btn-del-line:hover { background: #3d1a1a; border-color: #a04040; }

/* ===================== 【v1.9.41/42】指标完成情况 UI 重塑：区域色块分组 + 双列冻结 =====================
   v1.9.42：整版配色降饱和——高饱和色板（蓝/绿/琥珀/紫/玫红）换成商务低饱和色板，
   底色更浅、色条更细、悬停改中性色，去掉"鲜艳刺眼"观感，分组辨识度保留。 */
/* 边框模式改 separate：冻结列的阴影/描边在滚动时不再丢失 */
.mt-table { border-collapse: separate; border-spacing: 0; }

/* ---- 低饱和色板（组序号 %5 循环：蓝灰/灰绿/暖砂/灰紫/灰玫） ---- */
.mt-table tr.mt-arc-0 { --dot: #5b8db8; }
.mt-table tr.mt-arc-1 { --dot: #6f9e8c; }
.mt-table tr.mt-arc-2 { --dot: #b08d5e; }
.mt-table tr.mt-arc-3 { --dot: #8d82b0; }
.mt-table tr.mt-arc-4 { --dot: #b57f8c; }

/* ---- 按区域分组交替底色（组内连片，取代逐行斑马纹） ---- */
.mt-table tbody tr.mt-grp td { background: #fff; }
.mt-table tbody tr.mt-grp-alt td { background: #f8fafc; }
.mt-table tbody tr.mt-grp td:first-child { background: #fff; }
.mt-table tbody tr.mt-grp-alt td:first-child { background: #f8fafc; }

/* ---- 组首行：厂房色上边线，厂房切换一眼可辨 ---- */
.mt-table tbody tr.mt-grp-head td { border-top: 1.5px solid var(--dot, #cbd5e1); }

/* ---- 区域合并单元格：厂房浅色底 + 左侧色条 + 居中大字 ---- */
.mt-table td.mt-ar {
    text-align: center; font-size: 12.5px; letter-spacing: 1px;
    border-right: 2px solid #e2e8f0; vertical-align: middle;
}
.mt-table tbody tr td.mt-ar.mt-arc-0 { background: #f2f6fa; color: #3d5a75; border-left: 2px solid #5b8db8; }
.mt-table tbody tr td.mt-ar.mt-arc-1 { background: #f1f6f3; color: #44604f; border-left: 2px solid #6f9e8c; }
.mt-table tbody tr td.mt-ar.mt-arc-2 { background: #f8f5ef; color: #6e5a3a; border-left: 2px solid #b08d5e; }
.mt-table tbody tr td.mt-ar.mt-arc-3 { background: #f4f3f8; color: #554e74; border-left: 2px solid #8d82b0; }
.mt-table tbody tr td.mt-ar.mt-arc-4 { background: #f8f2f4; color: #6e4a55; border-left: 2px solid #b57f8c; }

/* ---- 产线名称：色点 + 加粗（车间行标识更醒目） ---- */
.mt-table td.mt-lnc { font-weight: 700; color: #0f172a; white-space: nowrap; }
.mt-table td.mt-lnc::before {
    content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--dot, #3b82f6); margin-right: 6px; vertical-align: 1px;
}

/* ---- 区域 + 产线名称 双列冻结：横向滚动时行标识不丢失 ---- */
.mt-table thead tr th:nth-child(2) {
    position: sticky; left: var(--mt-arw, 58px); z-index: 3;
}
.mt-table tbody td[data-col="1"] {
    position: sticky; left: var(--mt-arw, 58px); z-index: 1;
    box-shadow: -1px 0 0 #e2e8f0;
}

/* ---- 悬停（放在分组底色之后，保证悬停可见；v1.9.42 改中性灰，不再抢色） ---- */
.mt-table tbody tr:hover td { background: #eef2f7; }
.mt-table tbody tr:hover td.mt-ar { background: #e6ebf2; }
.mt-table tbody tr:hover td:first-child { background: #eef2f7; }

/* ---- 总计行压轴（分组底色之后） ---- */
.mt-table tbody tr.mt-total td,
.mt-table tbody tr.mt-total td:first-child {
    background: #edf1f6; border-top: 2px solid #94a3b8;
}

/* ---- 卡片内表格圆角包边，去生硬 ---- */
.metrics-card .mt-body .metrics-tw {
    border: 1px solid #eef2f7; border-radius: 8px;
}

/* ---- KPI 小卡轻抛光 ---- */
.mt-kpi-item { transition: box-shadow .15s ease, transform .15s ease; }
.mt-kpi-item:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(15, 23, 42, .08); }


/* ===================== 【2026-10-01 任务2】设置页布局整体优化 =====================
   追加规则覆盖前面的同名类（级联优先），不动既有语义。要点：
   ① 子页签改「分段控件」：浅灰底容器 + active 白底浮起，六个页签一眼分层；
   ② 各子页统一呼吸感：panel 内边距 + 分节标题留白一致；
   ③ 参数操作条（mod-cfg-bar）卡片化：浅底圆角，控件不再裸排在白底上；
   ④ 定修计划手动编辑器（任务3 新增 .ana-plan-editor）配套样式；
   ⑤ 窄屏可用：页签横向滚动、编辑表格横向滚动。 */
.sub-tabs {
    display: inline-flex; flex-wrap: nowrap; gap: 2px;
    padding: 3px; margin-bottom: 16px;
    background: #eef2f7; border-radius: 10px; border-bottom: none;
    max-width: 100%; overflow-x: auto;
}
.sub-tab-btn {
    padding: 7px 15px; border-radius: 8px; border: none; border-bottom: none;
    font-size: 13px; color: var(--text-secondary); cursor: pointer;
    white-space: nowrap; transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.sub-tab-btn:hover { color: var(--primary); background: rgba(21, 101, 192, .07); }
.sub-tab-btn.active {
    color: var(--primary); background: #fff; font-weight: 600;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}
.sub-tab-panel { padding: 2px 2px 6px; }
.sub-tab-panel.active { display: block; }
.sub-tab-panel .cfg-sub-title { margin-top: 20px; }
.sub-tab-panel .cfg-sub-title:first-of-type { margin-top: 6px; }
.sub-tab-panel .hint { line-height: 1.75; }
.sub-tab-panel .mod-cfg-bar {
    padding: 10px 12px; margin: 8px 0 14px;
    background: #f7f9fc; border: 1px solid var(--border); border-radius: var(--radius);
}
.sub-tab-panel .mod-cfg-bar > label { font-weight: 600; color: var(--text); }
/* 定修计划：手动编辑器（月份 × 产线明文表格） */
.ana-plan-editor { margin: 2px 0 14px; }
.ana-plan-editor .table-wrap { overflow-x: auto; }
.ana-plan-editor .pl-code, .ana-plan-editor .pl-dates {
    padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px;
}
.ana-plan-editor .pl-dates { width: 100%; min-width: 320px; }
.ana-plan-editor .pl-code:focus, .ana-plan-editor .pl-dates:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(21, 101, 192, .12);
}
.ana-plan-editor tbody tr:hover td { background: #f7f9fc; }
/* 编辑月份下拉与导入文件控件对齐既有控件观感 */
.ana-plan-editor + .ana-plan-list { margin-top: 2px; }
select#ana-edit-month { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 13px; }
@media (max-width: 720px) {
    .sub-tabs { display: flex; }
    .sub-tab-btn { padding: 7px 11px; }
    .ana-name-input { min-width: 0; flex: 1 1 100%; }
}

/* ==================== 【2026-10-03】分析设置紧凑化重排 ====================
   原来三块自上而下、说明冗长、滚动多。改为「左中右两栏卡片」，各卡片内
   标题+副标题+紧凑行，显著减少滚动、提升信息密度。 */
.ana-intro { margin: 0 0 10px; }
.ana-grid { display: flex; gap: 14px; align-items: flex-start; }
.ana-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ana-card {
    border: 1px solid #e2e8f0; border-radius: 10px; background: #fff;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05); overflow: hidden;
}
.ana-card-hd {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    padding: 9px 14px; background: #f8fafc; border-bottom: 1px solid #eef2f7;
    font-weight: 600; font-size: 13.5px; color: #0f172a;
}
.ana-card-sub { font-weight: 400; font-size: 11.5px; color: #64748b; }
.ana-card-bd { padding: 12px 14px; }
.ana-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ana-row label { font-size: 12.5px; color: #475569; }
.ana-name-input { flex: 1 1 auto; min-width: 140px; }
.ana-tips { margin: 6px 0 0; font-size: 11.5px; line-height: 1.55; }
.ana-sep { height: 1px; background: #eef2f7; margin: 10px 0; }
/* 窄屏回落单列 */
@media (max-width: 980px) {
    .ana-grid { flex-direction: column; }
    .ana-col { width: 100%; }
}

/* ===== 【2026-10-03】表格防横向溢出：去掉左右滑动 ===== */
/* 侧边栏变窄后，表格更容易超出内容区宽度产生横向滚动条（浏览体验差）。
   策略：单元格文字允许换行（不再 nowrap 撑宽），表格始终 100% 宽。 */
.ai-table td, .ai-table th,
table td, table th {
    word-break: break-word;      /* 长文本在单元格内换行，而不是把表格撑宽 */
}
.table-wrap { max-width: 100%; }
table { table-layout: auto; }    /* 列宽按内容自适应，但受 100% 宽约束 */

/* ===== 【2026-10-03】设置页紧凑化：可折叠区块 + 紧凑提示行 ===== */
.hint-inline { margin: 0 0 8px; line-height: 1.6; }
/* 「新增模块怎么点？」：做成小胶囊，hover 显示完整流程（title 提示） */
.howto {
    display: inline-block; margin-left: 6px; padding: 1px 8px; cursor: help;
    font-size: 11.5px; color: #1d4ed8; background: #eff6ff;
    border: 1px solid #bfdbfe; border-radius: 999px; white-space: nowrap;
}
.howto:hover { background: #dbeafe; }
/* 折叠区块（<details class="fold">） */
.fold {
    margin-top: 12px; border: 1px solid #e2e8f0; border-radius: 10px;
    background: #fff; overflow: hidden;
}
.fold > .fold-sum {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    padding: 10px 14px; cursor: pointer; list-style: none;
    background: #f8fafc; border-bottom: 1px solid transparent;
    font-weight: 600; font-size: 13.5px; color: #0f172a; user-select: none;
}
.fold > .fold-sum::-webkit-details-marker { display: none; }
/* 自定义箭头：未展开是 ▸，展开是 ▾ */
.fold > .fold-sum::before {
    content: "▸"; display: inline-block; margin-right: 2px;
    color: #64748b; font-size: 13px; transition: transform .15s;
}
.fold[open] > .fold-sum::before { transform: rotate(90deg); }
.fold[open] > .fold-sum { border-bottom-color: #eef2f7; }
.fold > .fold-sum:hover { background: #f1f5f9; }
.fold-sub { font-weight: 400; font-size: 11.5px; color: #64748b; }
.fold > *:not(.fold-sum) { padding: 10px 12px; }

/* ===== 【2026-10-03】显示设置页：表格显示 / 页面可见性 两张卡片并排 ===== */
.disp-cards { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.disp-card {
    flex: 1 1 0; min-width: 0;
    border: 1px solid #e2e8f0; border-radius: 10px; background: #fff;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05); padding: 10px 12px;
}
.disp-card-hd {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    font-weight: 600; font-size: 13px; color: #0f172a; margin-bottom: 8px;
}
.disp-card-sub { font-weight: 400; font-size: 11.5px; color: #64748b; }
@media (max-width: 980px) {
    .disp-cards { flex-direction: column; }
    .disp-card { width: 100%; }
}

/* ==================== 【2026-10-04】集成"14 检修管理"：数据抓取页 60/40 分栏 ==================== */
/* 左 60%＝原抓取配置与模块卡片（不变）；右 40%＝数据录入（iframe 内嵌原检修管理数据录入页）。 */
.scrape-split { display: flex; gap: 12px; align-items: stretch; }
.scrape-left { flex: 0 0 60%; max-width: 60%; min-width: 0; overflow-y: auto; padding-right: 4px; }
/* ★右栏必须**随 tab-scrape 一起隐藏**：不能给 .scrape-split/right 加 height:100%——
   那样会让它在 tab-scrape(display:none) 时仍然参与布局、逃到别的页面上去
   （实测曾出现在「设置」页左下方）。高度交给 iframe 的 min-height 即可。 */
.scrape-right {
    flex: 0 0 40%; max-width: 40%; min-width: 0;
    display: flex; flex-direction: column;
    /* 【2026-10-04 第10轮】去掉边框壳（用户：边框锁定去掉，完全释放开）：无边界、透明底 */
    border: 0; border-radius: 0; background: transparent;
    box-shadow: none; overflow: hidden;
}
.scrape-right-hd {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid #eef2f7;
}
.scrape-right-title { font-weight: 600; font-size: 13.5px; color: #0f172a; }
.scrape-right-sub { font-size: 11.5px; color: #64748b; }
.scrape-right-sub.ok { color: #2e7d32; }
.scrape-right-sub.bad { color: #c62828; }
.scrape-right-hd .btn { margin-left: auto; }
/* iframe 撑满右栏剩余高度 */
.scrape-right-frame { flex: 1 1 auto; width: 100%; border: 0; min-height: 720px; background: #fff; }
.scrape-right-tip {
    margin: 0; padding: 6px 12px; font-size: 11px; color: #64748b;
    border-top: 1px solid #eef2f7; background: #fcfdfe; line-height: 1.5;
}
/* 窄屏回落单列 */
@media (max-width: 1180px) {
    .scrape-split { flex-direction: column; }
    .scrape-left, .scrape-right { flex: 1 1 auto; max-width: 100%; width: 100%; }
    .scrape-left { overflow-y: visible; }
    .scrape-right-frame { min-height: 520px; }
}

/* ===== 【2026-10-04】数据抓取页重新布局 =====
   ① 模块卡：**一行排 4 个**（用户"一排显示4个模块，多模块可多排"） */
.scrape-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
/* 默认折叠：把第 5 张及以后的卡片隐藏 */
.scrape-grid.is-collapsed > .scrape-card:nth-child(n+5) { display: none; }
/* 卡片内控件更紧凑：标签在上、输入在下（4 列并排时横向空间窄，竖排更省宽） */
.scrape-card .card-header { padding: 6px 8px; }
.scrape-card .card-header h2 { font-size: 12.5px; }
.scrape-card .form-grid { grid-template-columns: 1fr; gap: 5px; }
.scrape-card .form-group > label { font-size: 11px; }
.scrape-card input[type="text"],
.scrape-card input[type="datetime-local"] { padding: 3px 6px; font-size: 11.5px; }
/* 顶部参数行：单位代码 + 起止时间 紧凑一行 */
.hub-params-card .form-grid.params-row { grid-template-columns: minmax(120px, 0.7fr) 1fr 1fr; gap: 8px; }
.hub-params-card .form-group { display: flex; align-items: center; gap: 6px; }
.hub-params-card .form-group > label { flex: 0 0 auto; min-width: 46px; margin-bottom: 0; font-size: 11px; }
.hub-params-card input[type="text"],
.hub-params-card input[type="datetime-local"] { padding: 2px 5px; font-size: 11px; }
.hub-params-card .datetime-row { gap: 4px; }
.hub-params-card .btn-icon { width: 24px; height: 24px; padding: 0; }
.hub-params-card .form-grid.params-row { gap: 6px; }
.hub-params-card .form-group .input-wrap { flex: 1 1 auto; min-width: 0; }
/* 左栏宽度略增（4 个模块并排需要空间），分界线收窄 */
.scrape-split { gap: 6px; }
.scrape-left { flex: 0 0 57%; max-width: 57%; }
.scrape-right { flex: 0 0 43%; max-width: 43%; }
.scrape-left { padding-right: 2px; }
/* 右侧：去掉我们自己加的「数据录入」标题条（iframe 里已有内容标题），并让 iframe 顶到卡片顶部 */
#scrape-right-panel .scrape-right-hd { display: none; }
.scrape-right-frame { min-height: 760px; border-top-left-radius: 10px; }
@media (max-width: 1280px) {
    .scrape-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
    .scrape-split { flex-direction: column; }
    .scrape-left, .scrape-right { flex: 1 1 auto; max-width: 100%; width: 100%; }
    .scrape-left { overflow-y: visible; }
    .scrape-right-frame { min-height: 520px; }
}

/* 检修管理集成页（菜单「作业报表」用）：整页 iframe 容器 */
.repair-page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.repair-frame { flex: 1 1 auto; width: 100%; border: 0; min-height: calc(100dvh - 120px); background: #fff; }

/* 【2026-10-11 二次修复·回归整页】数据报表页 iframe「下边显示不全」：
   保留「本页整页可滚动 + 恢复可见滚动条 + .repair-page 高度自适应」，
   撤回 iframe 的固定可视高度：该帧改回高度随内容自适应（app.js 按 __repairH 写内联高度），
   页内不再出现滚动条，改为整页滚动到底。 */
#tab-repair-report { overflow-y: auto; contain: layout style paint; }   /* 【2026-10-11 滚动优化】隔离本页重绘 */
#tab-repair-report::-webkit-scrollbar { width: 10px; height: 10px; }
#tab-repair-report { scrollbar-width: thin; }
#tab-repair-report .repair-page { height: auto; min-height: 100%; display: flex; flex-direction: column; }
#tab-repair-report .repair-frame { flex: 0 0 auto; width: 100%; min-height: 480px; border: 0; background: #fff; }

/* ===== 【2026-10-11】事故记录页 智脑分析块（浅色主题，与报警智脑同构；事故页禁用深蓝硬编码） ===== */
.acc-ai-block{margin:10px 0 14px;padding:10px 12px;border:1px solid #e6ddc0;border-radius:8px;background:#fffdf5}
.acc-ai-block .ai-block-title{margin:0 0 8px;font-size:13px;font-weight:700;color:#7c6a2f}
.acc-ai-item{display:flex;gap:8px;align-items:baseline;padding:5px 2px;border-top:1px dashed #eee6cd;font-size:12.5px;line-height:1.6}
.acc-ai-item:first-of-type{border-top:none}
.acc-ai-item .ic{flex:0 0 auto}
.acc-ai-item .t{flex:0 0 auto;font-weight:700;color:#4a4a4a}
.acc-ai-item.lv-warn .t{color:#b45309}
.acc-ai-item.lv-risk .t{color:#b91c1c}
.acc-ai-item.lv-good .t{color:#15803d}
.acc-ai-item .d{flex:1 1 auto;min-width:0;color:#555}
.acc-ai-item .a{flex:0 0 auto;color:#0b5fa5}
/* ===== 【2026-10-04】设置 → 检修管理集成 卡片 ===== */
/* 【2026-10-04 第10轮】作业报表设置：下级卡片顶部切换芯片 */
.rep-subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 12px; }
.rep-subtab { padding: 6px 14px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff;
    font-size: 12.5px; color: #475569; cursor: pointer; }
.rep-subtab:hover { color: var(--primary); border-color: var(--primary); }
.rep-subtab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.rep-pane > .rep-card { margin-bottom: 12px; }
.rep-cards { display: flex; flex-direction: column; gap: 12px; }
.rep-card {
    border: 1px solid #e2e8f0; border-radius: 10px; background: #fff;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05); padding: 12px 14px;
}
.rep-card-hd {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    font-weight: 600; font-size: 13.5px; color: #0f172a; margin-bottom: 8px;
}
.rep-card-sub { font-weight: 400; font-size: 11.5px; color: #64748b; }
.rep-status-list { display: flex; flex-direction: column; gap: 4px; }
.rep-status-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.rep-k { flex: 0 0 150px; color: #475569; }
.rep-v { flex: 1 1 auto; font-weight: 600; color: #0f172a; word-break: break-all; }
.rep-v.ok { color: #2e7d32; }
.rep-v.bad { color: #c62828; }
.rep-card code {
    font-family: Consolas, Monaco, monospace; font-size: 11.5px;
    background: #f1f5f9; border-radius: 4px; padding: 1px 5px;
}
/* ===== 【2026-10-04 第11轮】滚动条治理：页面级滚动容器隐藏滚动条（滚轮/触控仍可滚） ===== */
.tab-panel { scrollbar-width: none; -ms-overflow-style: none; }
.tab-panel::-webkit-scrollbar { width: 0; height: 0; }
#log-view { scrollbar-width: none; -ms-overflow-style: none; }
#log-view::-webkit-scrollbar { width: 0; height: 0; }

/* ===== 第11轮：数据抓取页左侧顶部参数卡整体压缩 ===== */
#tab-scrape .hub-params-card { padding: 7px 10px 8px; }
#tab-scrape .hub-params-card .hub-bar-head { margin-bottom: 5px; gap: 8px; }
#tab-scrape .hub-params-card .hub-bar-head h2 { font-size: 13.5px; margin: 0; }
#tab-scrape .hub-params-card .form-grid.params-row { gap: 6px; }
#tab-scrape .hub-params-card .form-group > label { font-size: 11px; min-width: 40px; }
#tab-scrape .hub-params-card .hint { font-size: 11px; }
#tab-scrape .hub-params-card .btn-sm { padding: 3px 9px; font-size: 11.5px; }

/* ===== 第11轮：设置页深蓝 UI 风格 + 布局压缩（仅作用设置页，不动其他页面） ===== */
#tab-settings > .card {
    background: linear-gradient(180deg, #0d2a55 0%, #0a1f42 100%);
    border: 1px solid #1e4c96;
    box-shadow: 0 4px 26px rgba(3, 14, 34, 0.5);
    padding: 10px 12px;
}
#tab-settings, #tab-settings .sub-tab-panel { color: #d6e4f7; }
#tab-settings h2, #tab-settings h3, #tab-settings .card-header h2 { color: #eaf3ff; }
#tab-settings label { color: #cfe4ff; }
#tab-settings .sub-tabs { background: #081a38; border: 1px solid #1e4c96; margin-bottom: 10px; }
#tab-settings .sub-tab-btn { color: #9cc1ec; }
#tab-settings .sub-tab-btn:hover { color: #fff; background: rgba(76, 160, 255, 0.16); }
#tab-settings .sub-tab-btn.active { color: #fff; background: #1565c0; box-shadow: 0 1px 6px rgba(21, 101, 192, 0.65); }
#tab-settings .sub-tab-panel .cfg-sub-title { margin-top: 12px; color: #eaf3ff; }
#tab-settings .hint { color: #8fb2dc; }
#tab-settings .hint b { color: #d2e6ff; }
#tab-settings .sub-tab-panel .hint { line-height: 1.6; }
#tab-settings .rep-card, #tab-settings .fold {
    background: #102b56; border: 1px solid #1e4c96; box-shadow: none; color: #d6e4f7;
}
#tab-settings .rep-cards { gap: 8px; }
#tab-settings .rep-card { padding: 8px 11px; margin-bottom: 0; }
#tab-settings .rep-pane > .rep-card { margin-bottom: 0; }
#tab-settings .rep-card-hd { color: #eaf3ff; margin-bottom: 6px; }
#tab-settings .rep-card-sub, #tab-settings .fold-sub { color: #8fb2dc; }
#tab-settings .rep-k { color: #9cc1ec; }
#tab-settings .rep-v { color: #eaf3ff; }
#tab-settings .fold { margin-top: 8px; }
#tab-settings .fold > .fold-sum { background: #0c2148; color: #eaf3ff; padding: 8px 12px; }
#tab-settings .fold > .fold-sum:hover { background: #122f5f; }
#tab-settings .fold[open] > .fold-sum { border-bottom-color: #1e4c96; }
#tab-settings .fold > *:not(.fold-sum) { padding: 8px 10px; }
#tab-settings .mod-cfg-bar { background: #081a38; border-color: #1e4c96; padding: 6px 10px; margin: 6px 0 10px; }
#tab-settings .mod-cfg-bar > label { color: #eaf3ff; }
#tab-settings .mod-cfg-list { gap: 6px; }
#tab-settings .mod-cfg-card { background: rgba(255, 255, 255, 0.04); border-color: #1e4c96; padding: 6px 10px; }
#tab-settings .basic-grid { gap: 8px; }
#tab-settings input[type="text"], #tab-settings input[type="number"],
#tab-settings input[type="password"], #tab-settings input[type="datetime-local"],
#tab-settings select, #tab-settings textarea {
    background: #081a38; border: 1px solid #2a5da8; color: #eaf3ff;
}
#tab-settings input::placeholder { color: #5f7ea8; }
#tab-settings input:focus, #tab-settings select:focus, #tab-settings textarea:focus {
    border-color: #4da3ff; box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.18);
}
#tab-settings .table-wrap table { background: transparent; }
#tab-settings table th { background: #0c2148; color: #cfe4ff; border-color: #1e4c96; }
#tab-settings table td { border-color: #1e4c96; color: #d6e4f7; }
#tab-settings table tbody tr:hover td { background: #122f5f; }

/* 第11轮补充：设置页内嵌卡片（disp-card 等）与页面可见性清单也走深蓝 */
#tab-settings .card { background: #102b56; border-color: #1e4c96; box-shadow: none; color: #d6e4f7; }
#tab-settings > .card {
    background: linear-gradient(180deg, #0d2a55 0%, #0a1f42 100%);
    border: 1px solid #1e4c96;
    box-shadow: 0 4px 26px rgba(3, 14, 34, 0.5);
}
#tab-settings .disp-card { background: #102b56; border: 1px solid #1e4c96; color: #d6e4f7; }
#tab-settings .disp-card-hd { color: #eaf3ff; }
#tab-settings .disp-card label, #tab-settings .ui-set-grid label { color: #cfe4ff; }
#tab-settings .pg-item, #tab-settings [class*="pgvis"] label, #tab-settings [class*="pgvis"] span { color: #cfe4ff; }
#tab-settings [class*="pgvis"] input[type="checkbox"] { accent-color: #4da3ff; }

/* ===== 【2026-10-04 第12轮】设置-抓取模块：模块清单 3 列（一列 3 个模块） ===== */
#mod-cfg-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: start; }
#mod-cfg-list .mod-cfg-card { min-width: 0; }
#mod-cfg-list .mod-cfg-card > summary { flex-wrap: wrap; }

/* ===== 第12轮：深蓝 UI 补全（默认按钮/日期/文件输入/代码块等残留浅色） ===== */
#tab-settings .btn { background: #0a1e3d; border: 1px solid #2a5da8; color: #d6e4f7; }
#tab-settings .btn:hover { border-color: #4da3ff; color: #fff; }
#tab-settings .btn-primary { background: #1565c0; border-color: #1565c0; color: #fff; }
#tab-settings .btn-primary:hover { background: #1976d2; }
#tab-settings .btn-ghost { background: transparent; }
#tab-settings input[type="date"], #tab-settings input[type="month"] {
    background: #081a38; border: 1px solid #2a5da8; color: #eaf3ff; color-scheme: dark; }
#tab-settings input[type="checkbox"] { accent-color: #4da3ff; }
#tab-settings input[type="file"] { color: #cfe4ff; }
#tab-settings input[type="file"]::file-selector-button { background: #0a1e3d; color: #d6e4f7;
    border: 1px solid #2a5da8; border-radius: 6px; padding: 4px 10px; }
#tab-settings code { background: #081a38; color: #9cc1ec; padding: 1px 5px; border-radius: 4px; }
#tab-settings select#ana-edit-month { background: #081a38; border: 1px solid #2a5da8; color: #eaf3ff; }
#tab-settings .ana-plan-editor .pl-code, #tab-settings .ana-plan-editor .pl-dates {
    background: #081a38; border: 1px solid #2a5da8; color: #eaf3ff; }
#tab-settings .table-wrap { border-color: #1e4c96; }
#tab-settings .rs-item, #tab-settings .check-inline span { color: #cfe4ff; }
#tab-settings .rep-entry-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
#tab-settings .rep-entry-btn.active { background: #1565c0; border-color: #1565c0; color: #fff; }
#tab-settings .rep-style-frame { border-color: #1e4c96; }
#tab-settings details.fold > summary list-style, #tab-settings .fold-sum::marker { color: #8fb2dc; }

/* ===== 【2026-10-04 第13轮】设置深蓝补漏（用户截图 3 张残留浅色） ===== */
/* ① 页面底色：主卡之外的页面区域也走深蓝（截图1：卡片下方大片浅灰） */
#tab-settings {
    background: linear-gradient(180deg, #0d2a55 0%, #0a1f42 100%);
    border: 1px solid #1e4c96; border-radius: 10px;
    min-height: calc(100dvh - 170px); box-sizing: border-box;
    padding: 10px 12px;
}
/* ② 分析设置：ana 卡片族（基础样式是白底） */
#tab-settings .ana-card { background: #102b56; border-color: #1e4c96; box-shadow: none; }
#tab-settings .ana-card-hd { background: #0c2148; border-bottom: 1px solid #1e4c96; color: #eaf3ff; }
#tab-settings .ana-card-sub { color: #8fb2dc; }
#tab-settings .ana-row label { color: #cfe4ff; }
#tab-settings .ana-sep { background: #1e4c96; }
#tab-settings .ana-name-input { background: #081a38; border: 1px solid #2a5da8; color: #eaf3ff; }
/* 定修计划表格行内的输入框与按钮（.pl-code / .pl-dates 在 ana-plan-list 里也有一份） */
#tab-settings .ana-plan-list .pl-code, #tab-settings .ana-plan-list .pl-dates,
#tab-settings .ana-plan-editor input[type="text"] {
    background: #081a38; border: 1px solid #2a5da8; color: #eaf3ff; }
#tab-settings .ana-plan-list .btn { background: #0a1e3d; border: 1px solid #2a5da8; color: #d6e4f7; }
#tab-settings .ana-plan-list .btn:hover { border-color: #4da3ff; color: #fff; }
/* ③ 抓取模块：各模块抓取步骤一览卡（.mcc-ov-* 基础样式是浅灰白底） */
#tab-settings .mcc-ov-card { background: #102b56; border-color: #1e4c96; }
#tab-settings .mcc-ov-head b { color: #eaf3ff; }
#tab-settings .mcc-ov-tag { background: #0c2148; color: #9cc1ec; }
#tab-settings .mcc-ov-body { color: #cfe4ff; }
#tab-settings .mcc-key { color: #8fb2dc; }

/* ===== 【2026-10-04 第13轮】数据抓取页左栏顶部 3 行化 ===== */
/* 标题/统一日期范围/应用按钮并入参数行：改用 flex 一行排布（原 grid 3 列模板不再适用） */
#tab-scrape .hub-params-card .form-grid.params-row {
    display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 6px; }
#tab-scrape .hub-params-card .hub-inline-title {
    font-size: 13.5px; margin: 0; white-space: nowrap; color: var(--text); }
#tab-scrape .hub-params-card .form-group { flex: 1 1 auto; min-width: 0; }
#tab-scrape .hub-params-card .hub-unify { flex: 0 0 auto; white-space: nowrap; font-size: 11.5px; }
#tab-scrape .hub-params-card .hub-unify input { accent-color: var(--primary, #2563eb); }
#tab-scrape .hub-params-card #apply-all { flex: 0 0 auto; white-space: nowrap; }
#tab-scrape .hub-params-card .hub-param-hint { margin-left: auto; white-space: nowrap; }

/* ==================== 【2026-10-04】抓取卡片参数锁定 🔒 ==================== */
.sc-rn-row { display: flex; align-items: center; gap: 6px; }
.sc-rn-row .sc-input { flex: 1 1 auto; min-width: 0; }
.sc-lock {
    display: inline-flex; align-items: center; gap: 2px;
    font-size: 11px; line-height: 1; cursor: pointer;
    color: var(--text-secondary); user-select: none; white-space: nowrap;
}
.sc-lock input { accent-color: var(--primary); margin: 0; cursor: pointer; }
.sc-lock:hover { color: var(--text); }

/* ==================== 【2026-10-04】指标页第七节收起/展开 ==================== */
.mt-fold {
    margin-left: auto; padding: 2px 10px; font-size: 12px;
    border: 1px solid var(--border); border-radius: 6px;
    background: transparent; color: var(--text-secondary); cursor: pointer;
    flex-shrink: 0;
}
.mt-fold:hover { color: var(--text); border-color: var(--text-secondary); }
.metrics-card.is-folded .mt-body,
.metrics-card.is-folded .mt-kpi-row { display: none; }
/* ==================== 【第19轮】顶部页签卡片增强（全菜单统一） ==================== */
.pt-scope-group { border-radius: 10px; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .05); }
.pt-scope-btn { padding: 6px 16px; font-size: 13px; font-weight: 500; color: #475569; }
.pt-scope-btn:hover { background: #e8f0fe; color: #1d4ed8; }
.pt-scope-btn.active {
    background: linear-gradient(135deg, #3b5fc9, #2b4aa8); color: #fff; font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 78, 178, .35);
}
.hz-tabbar .pt-scope-btn { padding: 7px 18px; font-size: 13.5px; }

/* 【第19轮】点检管理：正常 / 异常 UI 框（替代第二饼图） */
.pt-okbox { display: flex; gap: 14px; padding: 10px 14px; }
.pt-ok-item {
    flex: 1; border-radius: 10px; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 4px;
}
.pt-ok-item.ok  { background: #eef7ec; border: 1px solid #cfe6c8; }
.pt-ok-item.abn { background: #fdf1ef; border: 1px solid #f0cdc6; }
.pt-ok-item .pt-ok-l { font-size: 12.5px; color: var(--text-secondary); }
.pt-ok-item b { font-size: 26px; line-height: 1.1; }
.pt-ok-item.ok b  { color: #2f7d32; }
.pt-ok-item.abn b { color: #c0432f; }
.pt-ok-item em { font-style: normal; font-size: 12.5px; color: var(--text-secondary); }

/* 【第19轮】隐患人员汇总表：状态筛选条 */
.hz-pt-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 10px; }
.hz-pt-fl { font-size: 12.5px; color: var(--text-secondary); }
.hz-pt-fbtn {
    border: 1px solid var(--border); background: #fff; color: var(--text-secondary);
    padding: 4px 13px; font-size: 12.5px; border-radius: 999px; cursor: pointer;
}
.hz-pt-fbtn:hover { border-color: #3b5fc9; color: #3b5fc9; }
.hz-pt-fbtn.active { background: #3b5fc9; border-color: #3b5fc9; color: #fff; font-weight: 600; }
/* ==================== 【第20轮】设置页优化 ==================== */
/* 底层规则：底部增删改（选中区域下拉） */
#as-pick-area { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text); }
/* 作业报表设置：四个并行卡片里的入口按钮 */
.rep-entry-big { display: block; width: 100%; margin-top: 8px; padding: 8px 12px; font-size: 13.5px; }
.rep-entry-big.active { outline: 2px solid var(--primary, #3b5fc9); }
/* 定修计划编辑器：产线名称下拉 + 工时列 */
.ana-plan-tbl select.pl-code { padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; max-width: 190px; background: transparent; color: var(--text); }
.ana-plan-tbl .pl-hours { padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text); }
.btn-danger { color: #d33; border-color: #e4b6b6; }
.btn-danger:hover { background: #fdf1f1; }



/* ==================== 【第20轮修正】数据报表设置：四卡真正并行（横向一排） ==================== */
/* 第20轮漏改：.rep-cards 原为纵向 column 堆叠，四卡只是"同层级"但没"并行"。 */
#subtab-repair .rep-cards {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}
#subtab-repair .rep-card { margin-bottom: 0; }
#subtab-repair .rep-card .ana-row { flex-wrap: wrap; gap: 6px; }
@media (max-width: 1280px) {
    #subtab-repair .rep-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ==================== 【第21轮修正】数据报表设置：4 卡＝页签，点击切换下方内容 ==================== */
.rep-tab-card { cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.rep-tab-card:hover { border-color: #3b5fc9; }
.rep-tab-card.active { border-color: #3b5fc9; background: rgba(59, 95, 201, .14); box-shadow: 0 0 0 1px #3b5fc9 inset; }
#tab-settings .rep-tab-card.active { background: rgba(59, 95, 201, .30); }
#rep-state-body { margin-top: 10px; }


/* ==================== 【第23轮】分析设置：定修计划置顶 + 日期控件优化 ==================== */
/* 编辑月份/导入月份/文件选择不再被拉伸到整行，宽度按内容收敛、一行排布更紧凑 */
#ana-edit-month { max-width: 240px; min-width: 150px; }
#ana-plan-month { max-width: 175px; }
#ana-plan-file { max-width: 300px; }
/* 定修计划编辑器行悬停底色改深色主题（原浅色 #f7f9fc 会让浅字看不清） */
#tab-settings .ana-plan-editor tbody tr:hover td { background: #122f5f; }
#tab-settings .ana-plan-editor tbody tr:hover td .pl-code,
#tab-settings .ana-plan-editor tbody tr:hover td .pl-dates { background: #0c2148; }

/* ==================== 【第23轮】数据报表设置：四页签卡深蓝 UI 统一改造 ====================
   用户反馈：卡片样式太怪、不是深蓝 UI。改为等宽四卡页签：统一深蓝底、居中标题、
   激活态蓝色渐变高亮，视觉上是一组「页签」而不是大小不一的卡片。 */
#subtab-repair .rep-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#tab-settings .rep-tab-card {
    background: #0c2148; border: 1px solid #1e4c96; border-radius: 10px;
    padding: 12px 10px; text-align: center;
}
#tab-settings .rep-tab-card .rep-card-hd {
    justify-content: center; font-size: 14px; color: #eaf3ff; margin-bottom: 4px; gap: 6px;
}
#tab-settings .rep-tab-card .hint { text-align: center; font-size: 11.5px; margin: 0; }
#tab-settings .rep-tab-card:hover { border-color: #4ca0ff; background: #122f5f; box-shadow: 0 2px 10px rgba(12, 43, 90, 0.6); }
#tab-settings .rep-tab-card.active {
    background: linear-gradient(180deg, #1565c0 0%, #0d47a1 100%);
    border-color: #4ca0ff; box-shadow: 0 2px 12px rgba(21, 101, 192, 0.5);
}
#tab-settings .rep-tab-card.active .rep-card-hd { color: #fff; }
#tab-settings .rep-tab-card.active .hint { color: #d2e6ff; }

/* 【第25轮】数据报表页顶栏已按用户要求整行删除（含 app.js 绑定与状态逻辑） */

/* ==================== 【第24轮】分析设置：左右两栏布局 ====================
   左（宽 3fr）=① 定修计划主操作区；右（窄 2fr）=② 过滤人员 + ③ 数据源说明。
   窄屏（<1100px）自动退化为单列，顺序 ①→②→③ 不变。 */
.ana-grid-2col {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 14px;
    align-items: start;
}
.ana-grid-2col .ana-col { min-width: 0; }
.ana-grid-2col .ana-col .ana-card { margin-bottom: 12px; }
.ana-grid-2col .ana-col .ana-card:last-child { margin-bottom: 0; }
/* 定修计划编辑器/月份清单在 3fr 列里超宽时可横向滚动，不撑破布局 */
.ana-grid-2col .ana-plan-editor,
.ana-grid-2col .ana-plan-list { overflow-x: auto; }
@media (max-width: 1100px) {
    .ana-grid-2col { grid-template-columns: 1fr; }
}

/* ==================== 【第25轮】全程序流畅度与风格打磨 ====================
   原则：只加不影响布局的渲染层优化与过渡，零结构改动。 */
/* ① 页面切换淡入：激活面板 120ms 淡入 + 轻微上移，消除「硬切」生硬感 */
.tab-panel.active { animation: pgFadeIn .12s ease-out; }
.sub-tab-panel.active { animation: pgFadeIn .12s ease-out; }
@keyframes pgFadeIn {
    from { opacity: 0; transform: translateY(2px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* ② 侧边栏节点与按钮统一过渡（悬停反馈更顺滑） */
.nav-node, .nav-group-title { transition: background-color .12s ease, color .12s ease; }
.btn { transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease; }
/* ③ 键盘可达性：统一 focus-visible 高亮环（不影响鼠标点击观感） */
.btn:focus-visible, .nav-node:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [data-tab]:focus-visible {
    outline: 2px solid #4ca0ff; outline-offset: 1px;
}
/* ④ 重表格滚动容器提示渲染加速（指标表/明细表长列表滚动更跟手） */
.table-wrap, .mt-wrap, .tbl-wrap { will-change: scroll-position; }
/* ⑤ 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
    .tab-panel.active, .sub-tab-panel.active { animation: none; }
    .btn, .nav-node { transition: none; }
}
/* ===== 【2026-10-06 用户要求·修复悬停隐字】=====
   深色台账表(.rxjb .tw)的 td 是浅色文字(#e9f1fb)配深底，但全局 tr:hover{background:#f8fafc}
   是浅底——悬停时浅字落浅底=看不见字。补深色悬停覆盖（同时作用于本机 8765 与部署后的 Y8）。
   仅覆盖「底/字」两类属性，不动布局。 */
.rxjb .tw tr:hover td, .rxjb .tw tr:hover th { background:#13243f !important; color:#e9f1fb !important; }

/* ===== 看板数据报表外壳：浅色单源版（替代 static/app.js 已删除的 .rxjb 深色覆盖层）===== */
#tab-repair-report .report-card-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px 0}
#tab-repair-report .report-card-btn{font-size:13px;padding:6px 16px;border:1px solid #cbd5e1;border-bottom:none;border-radius:8px 8px 0 0;background:#f1f5f9;color:#334155;cursor:pointer;margin-right:2px}
#tab-repair-report .report-card-btn:hover{background:#e2e8f0;color:#1e293b}
#tab-repair-report .report-card-btn.active{background:#0b5fa5;color:#fff;font-weight:bold;border-color:#0b5fa5}
#tab-repair-report .rxjb-tab-body{margin-top:4px}
#tab-repair-report .report-card{display:none}
#tab-repair-report .report-card.active{display:block}
#tab-repair-report .report-card .tw{overflow:visible}   /* 【2026-10-12】去除明细表内滚：改由外层 .tab-panel 整页滚动（顶部 tab 标签 sticky 才生效） */
/* 数据报表页明细表强制白底深色字：快照页可能被套用深色 body，透明 td 会继承深色背景导致文字看不见。
   这里给 table/th/td 统一写死浅色，保证无论 body 深浅都能阅读。 */
#tab-repair-report .report-card .tw table{width:100%;border-collapse:collapse;background:#fff;table-layout:fixed}
#tab-repair-report .report-card .tw th{background:#f8fafc;color:#1e293b;border:1px solid #d6e6f5;padding:5px 8px;font-size:12px;text-align:center;white-space:nowrap}
#tab-repair-report .report-card .tw td{color:#1e293b;border:1px solid #e1e8f0;padding:4px 6px;font-size:12px}

/* 数据报表三卡明细表列宽均衡（与 8010 主程序 1:1） */
#tab-repair-report .report-card .tw #report-table-mingri [data-col="date"] { width: 6%; }
#tab-repair-report .report-card .tw #report-table-mingri [data-col="week"] { width: 5%; }
#tab-repair-report .report-card .tw #report-table-mingri [data-col="region"] { width: 6%; }
#tab-repair-report .report-card .tw #report-table-mingri [data-col="line"] { width: 7%; }
#tab-repair-report .report-card .tw #report-table-mingri [data-col="duration"] { width: 5%; }
#tab-repair-report .report-card .tw #report-table-mingri [data-col="event"] { width: 30%; }
#tab-repair-report .report-card .tw #report-table-mingri [data-col="mainProblem"] { width: 8%; }
#tab-repair-report .report-card .tw #report-table-mingri [data-col="anomalyType"] { width: 7%; }
#tab-repair-report .report-card .tw #report-table-mingri [data-col="stopSlowType"] { width: 8%; }
#tab-repair-report .report-card .tw #report-table-mingri [data-col="sender"] { width: 7%; }
#tab-repair-report .report-card .tw #report-table-mingri [data-col="remark"] { width: 11%; }

#tab-repair-report .report-card .tw #report-table-jinri [data-col="seq"] { width: 5%; }
#tab-repair-report .report-card .tw #report-table-jinri [data-col="date"] { width: 8%; }
#tab-repair-report .report-card .tw #report-table-jinri [data-col="region"] { width: 10%; }
#tab-repair-report .report-card .tw #report-table-jinri [data-col="unit"] { width: 12%; }
#tab-repair-report .report-card .tw #report-table-jinri [data-col="task"] { width: 38%; }
#tab-repair-report .report-card .tw #report-table-jinri [data-col="worker"] { width: 14%; }
#tab-repair-report .report-card .tw #report-table-jinri [data-col="remark"] { width: 13%; }

#tab-repair-report .report-card .tw #report-table-renwu [data-col="seq"] { width: 8%; }
#tab-repair-report .report-card .tw #report-table-renwu [data-col="date"] { width: 8%; }
#tab-repair-report .report-card .tw #report-table-renwu [data-col="region"] { width: 9%; }
#tab-repair-report .report-card .tw #report-table-renwu [data-col="worker"] { width: 9%; }
#tab-repair-report .report-card .tw #report-table-renwu [data-col="task"] { width: 40%; }
#tab-repair-report .report-card .tw #report-table-renwu [data-col="start"] { width: 8%; }
#tab-repair-report .report-card .tw #report-table-renwu [data-col="end"] { width: 8%; }
#tab-repair-report .report-card .tw #report-table-renwu [data-col="dur"] { width: 10%; }
#tab-repair-report .report-card .tw tbody tr:nth-child(even) td{background:#f8fafc}
#tab-repair-report .rxjb-onlylocal{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:10px;padding:28px 18px;text-align:center;color:#64748b}
#tab-repair-report .rxjb-onlylocal b{color:#334155}
#tab-repair-report .rxjb-sync{font-size:11px;color:#94a3b8;margin:0 0 8px 2px}
#tab-repair-report .card-summary{margin:0 0 8px 0;padding:8px 12px;background:#fbfdff;border:1px solid #d6e6f5;border-radius:4px;font-size:12px;color:#333}

/* ===== 【2026-10-10 用户要求】数据报表页：边框外留空改深蓝（与 8010 深蓝主题融合） ===== */
body:has(#tab-repair-report.active) { background:#0b1626; }
body:has(#tab-repair-report.active) #tab-repair-report,
body:has(#tab-repair-report.active) .repair-page { background:#0b1626; }
body:has(#tab-repair-report.active) .app-header { background:#0b1626; }
body:has(#tab-repair-report.active) .app-header .app-title,
body:has(#tab-repair-report.active) .app-header .hdr-sync,
body:has(#tab-repair-report.active) .app-header .hdr-sync b { color:#dbe7f7; }
body:has(#tab-repair-report.active) .app-header .btn-ghost { color:#dbe7f7; border-color:#3a5a86; }

/* ==================== 【2026-10-10】顶部「当月/上月」口径切换按钮 ==================== */
.hdr-mscope { display:inline-flex; align-items:center; gap:4px; margin-right:8px; }
.mscope-btn { background:transparent; color:#94a3b8; border:1px solid #334155; border-radius:4px; font-size:12px; padding:2px 10px; cursor:pointer; }
.mscope-btn:hover { color:#e2e8f0; border-color:#64748b; }
.mscope-btn.active { background:#2563eb; color:#fff; border-color:#3b82f6; }

/* 【2026-10-10】区域·产线总表「待审核」列：>0 标橙（与逾期红区分） */
.ai-table-arealine td.hz-pend { color:#e08a00 !important; }
/* 【2026-10-10 第14轮】顶部「月份选择」弹层（当月/上月/本年/月份选择 四按钮） */
/* 【第15轮】顶部口径切换 busy 态 */
[data-mscope].ms-busy{opacity:.45;pointer-events:none;cursor:wait}

.mscope-pop { position:absolute; z-index:9999; background:#0f1d33; border:1px solid #2a4368;
    border-radius:9px; padding:10px 12px; box-shadow:0 8px 24px rgba(0,0,0,.45); color-scheme:dark; }
.mscope-pop .mp-title { font-size:12.5px; font-weight:700; color:#cfe0f5; margin-bottom:6px; }
.mscope-pop input[type=month] { height:28px; border:1px solid #22354f; border-radius:7px;
    background:#0c1729; color:#e9f1fb; font-size:12.5px; padding:0 8px; outline:none; }
.mscope-pop .mp-btns { display:flex; gap:6px; margin-top:8px; }
.mscope-pop .mp-ok, .mscope-pop .mp-cancel { height:26px; padding:0 12px; border-radius:7px;
    border:1px solid #22354f; background:#0c1729; color:#a7bcd8; font-size:12px; cursor:pointer; }
.mscope-pop .mp-ok { background:#2563eb; border-color:#3b82f6; color:#fff; font-weight:600; }

/* ==================== 【2026-10-10】事故管理（报表10）==================== */
/* 记录页复用 ai-card/mt-kpi-row/ai-table 原版浅色样式；以下仅为报告页定制 class。
   主题遵循 style.css 原版浅色（事故页不是 .tw 深蓝页，禁用深蓝硬编码背景）。
   【2026-10-16】旧 .acc-kpi-row/.acc-kpi flex 版式已合并至下方「KPI 分级」块
   （5 等分网格，修复核心卡 345px / 次要卡 110px 的宽度失衡），此处不再重复定义。 */
.acc-wrap { max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* 【2026-10-11·方案§3.4】分析区块两列并排 */
.acc-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width: 760px) { .acc-grid2 { grid-template-columns:1fr; } }

/* 【2026-10-12 事故管理图表化】SVG 图表通用样式 */
.acc-chart { margin:8px 0 10px; }
.acc-chart svg text { font-family:inherit; }
.acc-ch-lb { font-size:11px; fill:#64748b; }
.acc-ch-val { font-size:11px; fill:#334155; font-weight:600; }
.acc-ch-dot { fill:#3b82f6; }
.acc-ch-area { fill:rgba(59,130,246,.12); }
.acc-ch-line { fill:none; stroke:#3b82f6; stroke-width:2; }
.acc-donut { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:8px 0 10px; }
.acc-legend { display:flex; flex-direction:column; gap:4px; font-size:12px; color:#475569; }
.acc-legend-i { display:flex; align-items:center; gap:6px; }
.acc-legend-i > i { display:inline-block; width:10px; height:10px; border-radius:2px; flex:0 0 auto; }
/* Y8 深蓝主题（data-snap）覆盖：浅蓝 #5ec8f2 体系 */
html[data-snap] .acc-ch-lb { fill:#9fb6d9; }
html[data-snap] .acc-ch-val { fill:#e6f2ff; }
html[data-snap] .acc-ch-dot { fill:#5ec8f2; }
html[data-snap] .acc-ch-area { fill:rgba(94,200,242,.16); }
html[data-snap] .acc-ch-line { stroke:#5ec8f2; }
html[data-snap] .acc-legend { color:#c9d9f0; }
/* 【2026-10-11 用户三项优化】月度趋势块：缩小+带边框；明细停机类型徽章 */
.acc-trend-box { border:1px solid #dbe4f3; border-radius:8px; padding:8px 10px 4px; background:rgba(255,255,255,.5); }
.acc-trend-box .acc-chart { margin:4px 0 8px; }
.acc-trend-tb { font-size:12px; }
.acc-trend-tb th, .acc-trend-tb td { padding:3px 8px; }
.acc-dx-type { background:#0e7490; color:#fff; }
html[data-snap] .acc-trend-box { border-color:#2a4a73; background:rgba(94,200,242,.06); }
html[data-snap] .acc-dx-type { background:#0e7490; }

/* 【2026-10-11·方案§5.2】事故表固定布局，防溢出 */
.acc-table-fixed { table-layout:fixed; }
.acc-table-fixed th, .acc-table-fixed td { word-break:break-word; overflow-wrap:break-word; }
/* 【2026-10-11·方案§3.1】实时关注带（昨0点→现在） */
.acc-focus-band { background:linear-gradient(90deg,#eef4ff,#f7faff); border:1px solid #c7d6f5;
    border-radius:8px; padding:10px 12px; margin:0 0 14px; }
.afb-head { display:flex; align-items:center; gap:10px; }
.afb-title { font-weight:700; color:#1e3a8a; font-size:13px; }
.afb-badge { background:#1d4ed8; color:#fff; border-radius:999px; padding:1px 9px; font-size:12px; }
.afb-note { color:#64748b; font-size:12px; }
.afb-toggle { margin-left:auto; background:#fff; border:1px solid #c7d6f5; border-radius:6px;
    padding:2px 10px; font-size:12px; cursor:pointer; color:#1e3a8a; }
.afb-toggle:hover { background:#eef4ff; }
.acc-focus-band.collapsed .afb-list { display:none; }
.afb-list { list-style:none; margin:8px 0 0; padding:0; max-height:260px; overflow:auto;
    border-top:1px dashed #c7d6f5; }
.afb-item { display:grid; grid-template-columns:auto 92px 1fr 112px 122px 92px; gap:8px;
    padding:5px 6px; border-bottom:1px solid #eaf0fb; font-size:12px; align-items:center; }
.afb-item:hover { background:#f1f6ff; }
.afb-code { font-weight:600; color:#1d4ed8; white-space:nowrap; }
.afb-line { color:#0f172a; white-space:nowrap; }
.afb-dev { color:#334155; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.afb-type { color:#475569; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.afb-time { color:#2563eb; font-variant-numeric:tabular-nums; white-space:nowrap; }

/* 【2026-10-12 用户指令①】事故管理「停机类型」选择 UI 增强（浅色主题）：
   琥珀橙专属配色，与蓝色「数据范围」明显区分；默认不选=全部。
   本块置于文件尾，同特异性下覆盖前置 .pt-scope-* 规则。 */
.acc-halt-label { font-size:12.5px; font-weight:700; color:#d6453d; background:#fdeceb; border:1px solid #f3b6ad; border-radius:4px; padding:1px 7px; }
.acc-halt-group {
    background:#fffbeb; border:1px solid #ecc978; border-radius:10px;
    box-shadow:inset 0 1px 2px rgba(146,64,14,.08), 0 1px 3px rgba(146,64,14,.10); }
.acc-halt-btn {
    border:1px solid #e0bd75; background:#fff; color:#92600a;
    font-weight:600; padding:6px 15px; }
.acc-halt-btn:hover { background:#fef3c7; border-color:#f59e0b; color:#b45309; }
.acc-halt-btn.active {
    background:#f59e0b; border-color:#d97706; color:#fff; font-weight:700;
    box-shadow:0 1px 5px rgba(245,158,11,.5); }
.afb-status { color:#64748b; white-space:nowrap; text-align:right; }
@media (max-width: 760px) { .afb-item { grid-template-columns:auto 70px 1fr 88px; }
    .afb-time, .afb-status { display:none; } }

/* 【2026-10-10】事故管理口径条：时间筛选日期输入（随 pt-scope-bar 布局） */
.acc-datebox { display:inline-flex; align-items:center; gap:4px; }
.acc-datebox.acc-hide { display:none; }
.acc-date { height:26px; border:1px solid var(--border, #d8e0ec); border-radius:5px;
    background:#fff; color:#1e293b; font-size:12px; padding:0 6px; outline:none; }
.acc-date:focus { border-color:#3b5fc9; }
.acc-date-sep { color:#94a3b8; font-size:12px; }
.acc-date-go { height:26px; padding:0 12px; border-radius:5px; border:1px solid #3b5fc9;
    background:#3b5fc9; color:#fff; font-size:12px; font-weight:600; cursor:pointer; }
.acc-date-go:hover { background:#2c4cb0; }
/* 【2026-10-11 Task#35】产线×现象类型交叉矩阵：非零热点单元格强调 */
.acc-x-hot { background: #fff1e0; font-weight: 600; color: #ad4e00; }
/* 【2026-10-11 第三轮】事故明细按编码分组布局 */
.acc-dx-group { border: 1px solid #e3e8f0; border-radius: 8px; margin: 0 0 12px; overflow: hidden; }
.acc-dx-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 12px; background: #f4f7fb; border-bottom: 1px solid #e3e8f0; }
.acc-dx-code { font-weight: 700; color: #1f3b8f; font-family: Consolas, monospace; }
.acc-dx-meta { color: #4a5568; font-size: 12.5px; }
.acc-dx-badge { background: #e8eefc; color: #2b4acb; border-radius: 10px; padding: 1px 9px; font-size: 12px; }
.acc-dx-dur { background: #fff1e0; color: #ad4e00; }
.acc-dx-status { margin-left: auto; color: #8a94a6; font-size: 12px; }
.acc-dx-table th { font-size: 12px; }
.acc-dx-time { white-space: nowrap; font-family: Consolas, monospace; }
/* 【2026-10-16】事故明细·整改追踪 16 列表格（格式对齐「事故整改追踪」表）
   注：选择器必须带 .ai-card / table 前缀提升优先级，否则被 style.css 上方
   `.ai-card table th, .ai-card table td`（padding 6px 9px / font 12px）与
   `.ai-card .table-wrap { max-height:340px }` 覆盖，字号与列宽调整不会生效。 */
.acc-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.acc-detail-head .hint { font-size: 12px; color: #8a94a0; }
.acc-detail-export { margin-left: auto; }
.acc-detail-loading { padding: 20px; color: #8a94a0; }
.acc-detail-meta { font-size: 12px; color: #8a94a0; padding: 6px 2px 10px; }
.ai-card .table-wrap.acc-detail-wrap { max-height: 70vh; overflow: auto; border: 1px solid #e3e8f0; border-radius: 8px; }
/* table-layout:fixed 让 <colgroup> 的 px 宽度真正生效；总宽 > 容器时由 wrap 横向滚动，绝不压缩长文本列 */
.ai-card table.acc-detail-table { border-collapse: collapse; table-layout: fixed; min-width: 100%; font-size: 11.5px; }
.ai-card table.acc-detail-table th,
.ai-card table.acc-detail-table td {
    border: 1px solid #d7dde4; padding: 4px 6px; vertical-align: top;
    line-height: 1.45; word-break: break-word; overflow-wrap: anywhere;
}
.ai-card table.acc-detail-table th {
    background: #1F4E79; color: #fff; position: sticky; top: 0; z-index: 2;
    font-weight: 600; text-align: left; white-space: normal;
}
.ai-card table.acc-detail-table tbody tr:nth-child(even) td { background: #f7fafd; }
.ai-card table.acc-detail-table tbody tr:hover td { background: #eaf2fb; }
/* 事故编码列左侧吸附：16 列超宽横向滚动时保持行身份可见（须配不透明底色，否则透字）。
   【2026-10-16】改用显式类 .acc-detail-sticky 而非 :first-child——速览 8 列视图首列是
   「发生时间」，不需要吸附；仅完整视图的事故编码列吸附。 */
.ai-card table.acc-detail-table th.acc-detail-sticky,
.ai-card table.acc-detail-table td.acc-detail-sticky { position: sticky; left: 0; background: #fff; }
.ai-card table.acc-detail-table th.acc-detail-sticky { z-index: 4; }
.ai-card table.acc-detail-table td.acc-detail-sticky { z-index: 1; }
.ai-card table.acc-detail-table tbody tr:nth-child(even) td.acc-detail-sticky { background: #f7fafd; }
.ai-card table.acc-detail-table tbody tr:hover td.acc-detail-sticky { background: #eaf2fb; }
.ai-card table.acc-detail-table td.acc-detail-code { white-space: nowrap; font-family: Consolas, monospace; font-weight: 600; color: #1f3b8f; }
.ai-card table.acc-detail-table td.acc-detail-long { white-space: normal; }
.ai-card table.acc-detail-table th.acc-detail-center,
.ai-card table.acc-detail-table td.acc-detail-center { text-align: center; white-space: nowrap; }
@media (max-width: 900px) { .ai-card .table-wrap.acc-detail-wrap { max-height: none; } }

/* ===================== 【2026-10-16】事故记录 tab 层次化排版（对齐《最优排版方案》） ===================== */
/* 1) 视图切换（速览 8 列 / 完整 16 列） */
.acc-view-switch { display: inline-flex; align-items: center; gap: 8px; }
.acc-view-label { font-size: 13px; color: #1F4E79; font-weight: 600; white-space: nowrap; }
.acc-view-btns { display: inline-flex; border: 1.5px solid #1F4E79; border-radius: 6px; overflow: hidden; }
.acc-view-btn { position: relative; border: 0; background: #fff; color: #33475b; font-size: 13px; font-weight: 600; padding: 7px 16px; cursor: pointer; letter-spacing: .5px; transition: background .15s, color .15s; }
.acc-view-btn + .acc-view-btn { border-left: 1px solid #1F4E79; }
.acc-view-btn b { font-size: 16px; }
/* 【2026-10-17 用户指令】两视图各自身份色：速览=蓝、完整=青，激活态底色区分，辨识度再次增强 */
.acc-view-btn[data-acc-view="quick"].on { background: #1F4E79; color: #fff; box-shadow: inset 0 -3px 0 #0b2e4d; }
.acc-view-btn[data-acc-view="full"].on { background: #0f766e; color: #fff; box-shadow: inset 0 -3px 0 #094d47; }
.acc-view-btn:hover:not(.on) { background: #eaf1f9; }
/* 身份色圆点：未激活时也标明「蓝=8列 / 青=16列」 */
.acc-view-btn[data-acc-view="quick"]::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1F4E79; margin-right: 6px; vertical-align: 0; }
.acc-view-btn[data-acc-view="full"]::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #0f766e; margin-right: 6px; vertical-align: 0; }
.acc-view-btn.on::after { content: "✓"; font-size: 11px; margin-left: 6px; font-weight: 700; }
/* 表格内「停机类型」列头红条强调（与顶部口径条红字呼应） */
.ai-card table.acc-detail-table th.acc-halt-th { box-shadow: inset 0 -3px 0 #d6453d; }

/* 2) 预警框置顶：与 KPI 之间留白，左侧色带强化「第一眼看到问题」 */
.acc-alert-zone { margin: 2px 0 12px; }
.acc-alert-zone .warn-box-inner { border-left: 4px solid #ef4444; }

/* 3) KPI 分级：3 核心放大强调，2 次要淡化缩小（数据不删）
   【2026-10-16 用户反馈「UI 标签比例失衡」】原 flex 布局下 acc-kpi-sub 覆盖为
   flex:0 1 auto（不参与伸缩）→ 3 张核心卡被撑到 345px、2 张次要卡仅 110/170px，
   同一行卡片宽度比 3.1:1。改为 5 等分网格（repeat(5, minmax(0,1fr))）：所有卡
   严格等宽等高，核心/次要只通过边框色、字号、数值颜色区分，不再靠宽度失衡强调。 */
.acc-kpi-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px; margin-bottom: 14px; }
.acc-kpi { min-width: 0; background: #fff; border: 1px solid #e3e8f0;
    border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.acc-kpi-label { font-size: 12px; color: #8a94a0; }
.acc-kpi-value { font-size: 24px; font-weight: 700; color: #0f172a; line-height: 1.15; }
/* 【2026-10-16 设备台账】数值后缀单位（台/类/个）：小号灰色，不抢数字视觉 */
.acc-kpi-unit { font-size: 12px; font-weight: 400; color: #8a94a0; margin-left: 3px; }
.acc-kpi-sub { font-size: 12px; color: #5b6779; }
.acc-kpi.acc-kpi-core { border-color: #1F4E79; box-shadow: 0 1px 6px rgba(31, 78, 121, .12); }
.acc-kpi.acc-kpi-core .acc-kpi-value { font-size: 28px; color: #1F4E79; }
.acc-kpi.acc-kpi-sub { background: #fafbfd; }
.acc-kpi.acc-kpi-sub .acc-kpi-value { font-size: 20px; color: #64748b; }
/* 窄屏降级：5 等分在 900px 以下会出现标签折行，按 3 列 / 2 列两档收敛 */
@media (max-width: 900px) {
    .acc-kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .acc-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 4) 速览双栏：高频问题 TOP3 + 事故最多产线 TOP3（横向条形，替代翻 5 个分布表） */
.acc-quick-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 14px; }
.acc-quick { background: #fff; border: 1px solid #e3e8f0; border-radius: 10px; padding: 12px 14px; }
.acc-quick-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #334155; }
.acc-q-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.acc-q-lb { flex: 0 0 78px; font-size: 12.5px; color: #334155; text-align: right;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-q-bar { flex: 1; height: 12px; background: #eef2f7; border-radius: 6px; overflow: hidden; }
.acc-q-bar i { display: block; height: 100%; border-radius: 6px; opacity: .88; }
.acc-q-v { flex: 0 0 92px; font-size: 12.5px; font-weight: 700; color: #0f172a; }
.acc-q-v em { font-style: normal; font-weight: 400; color: #8a94a0; margin-right: 4px; }
.acc-q-v b { font-weight: 600; color: #5b6779; margin-left: 5px; font-size: 12px; }

/* 5) 深度分析折叠区：原有模块全部保留，仅默认收起；summary 明示内含模块 */
.acc-deep { border: 1px solid #e3e8f0; border-radius: 10px; background: #fff; margin-top: 4px; }
.acc-deep-sum { cursor: pointer; padding: 11px 14px; font-size: 13px; font-weight: 600; color: #334155;
    list-style: none; user-select: none; }
.acc-deep-sum::-webkit-details-marker { display: none; }
.acc-deep-sum::before { content: '▸ '; color: #1F4E79; }
.acc-deep[open] .acc-deep-sum::before { content: '▾ '; }
.acc-deep-sum:hover { background: #f7fafd; }
.acc-deep-body { padding: 4px 14px 14px; border-top: 1px solid #eef2f7; }
/* 【2026-10-11 第四轮】按天分布折线图（_trendBars 重写）+ 每日汇总人名筛选 */
.sum-trend-line { position: relative; }
.stl-svg { display: block; width: 100%; height: 130px; color: #2f6fb5; }
.sum-trend-line.grow .stl-svg { height: 240px; }
.stl-line { fill: none; stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.stl-area { fill: currentColor; opacity: .10; }
.stl-peak { position: absolute; top: 2px; transform: translateX(-50%); font-size: 11px; color: #c05621; background: #fff7ed; border: 1px solid #fdba74; border-radius: 8px; padding: 0 6px; pointer-events: none; }
.dw-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.dw-filter-label { font-size: 12.5px; color: #4a5568; }
.dw-filter select { padding: 3px 8px; border: 1px solid #cbd5e0; border-radius: 6px; background: #fff; font-size: 12.5px; max-width: 220px; }
.dw-filter-note { font-size: 11.5px; color: #b7791f; font-style: normal; }
/* 【2026-10-11 事故记录页】明细表合计行 */
.ai-table tr.acc-total td{font-weight:600;border-top:2px solid #dbe4f3;background:rgba(59,130,246,.06)}
html[data-snap] .ai-table tr.acc-total td{border-top-color:#2a4a73;background:rgba(96,165,250,.10)}
/* 【2026-10-11 月度趋势】柱图左/明细表右，各占50% */
.acc-trend-flex{display:flex;gap:14px;align-items:flex-start}
.acc-trend-flex>.acc-chart,.acc-trend-flex>.table-wrap{flex:1 1 50%;min-width:0}
@media (max-width:900px){.acc-trend-flex{flex-direction:column}}


/* ==================== 【2026-10-13】设备小结 tab ==================== */
/* 【2026-10-16 用户指令 1:1 复刻参考站（y8-equipment-dashboard）】布局/背景色/文本框/文字
   全面对齐：主色 #1F4E79、卡片白底 #C9D2DC 边、KPI 渐变卡+3px 顶边+悬浮上浮、
   表头深蓝白字、斑马纹 #F7FAFC、行悬停 #E8F1FA、副文字 #8a94a0。 */
.brief-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 12px 16px; border-bottom: 1px solid #C9D2DC; }
.brief-toolbar .form-group { margin: 0; min-width: 130px; }
.brief-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; padding: 14px 16px 0; }
.brief-card { border: 1px solid #C9D2DC; border-top: 3px solid #1F4E79; border-radius: 0; padding: 12px 14px; background: linear-gradient(180deg, #FBFDFF, #F2F6FB); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; position: relative; }
.brief-card:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 10px 22px rgba(31, 78, 120, .22); border-top-color: #3E8EF7; z-index: 3; }
.brief-card .k { font-size: 12px; color: #555; font-weight: bold; }
.brief-card .v { font-size: 26px; font-weight: bold; margin-top: 2px; color: #1F4E79; }
.brief-card .s { font-size: 11.5px; color: #8a94a0; margin-top: 4px; line-height: 1.5; }
.brief-card.lv-red { border-color: #C9D2DC; border-top-color: #C00000; }
.brief-card.lv-red .v { color: #C00000; }
.brief-card.lv-yellow { border-top-color: #C9A227; }
.brief-card.lv-yellow .v { color: #B8860B; }
.brief-result { padding: 12px 16px 18px; }
.brief-result p { margin: 0 0 10px; line-height: 1.75; color: #222; }
.brief-finding { margin: 0 0 8px; padding: 10px 14px; font-size: 13px; line-height: 1.7; background: #FDF6EC; border: 1px solid #E4B571; border-left: 4px solid #C9A227; color: #6b4e00; }
.brief-finding.red { background: #FDF0EC; border-color: #E4A571; border-left-color: #C00000; color: #8f1010; }
.brief-finding.yellow { background: #FDF6EC; border-color: #E4B571; border-left-color: #C9A227; color: #6b4e00; }
.brief-finding.info { background: #F2F8F1; border-color: #BBD8B7; border-left-color: #2E7D32; color: #3c7a36; }
/* 【2026-10-20】需关注条目结构化：detail 按｜拆芯片；ref=业务单号灰色小后缀 */
.brief-finding .brief-seg { display: inline-block; padding: 1px 8px; margin: 0 4px 2px 0; background: rgba(255, 255, 255, .72); border: 1px solid rgba(0, 0, 0, .08); border-radius: 6px; font-weight: 600; }
.brief-finding .brief-ref { margin-left: 2px; font-size: 11px; font-weight: 400; color: #8a97a8; letter-spacing: .2px; }
.brief-finding.red .brief-seg { border-color: rgba(192, 0, 0, .18); }
.brief-finding.yellow .brief-seg { border-color: rgba(201, 162, 39, .25); }
.brief-finding.info .brief-seg { border-color: rgba(46, 125, 50, .18); }
/* 【2026-10-17】周小结（wk-*）：1:1 对齐参考站 y8-equipment-dashboard 周小结面板
   全部组件令牌取自参考站 <style>（主色 #1F4E79、卡片 #C9D2DC 边、KPI 渐变卡+3px 顶边、
   表头深蓝白字、斑马 #F7FAFC、行悬停 #E8F1FA、叙述块盒子、横向条形图、预警框徽章）。
   统一作用域 #wk-result，避免污染设备小结 / 每日检修汇总等同页模块。 */
/* 【2026-10-17 用户指令】删 .wk-title 死规则：大标题与工具栏重复已移除（见 app.js _weeklyRender） */
#wk-result .wk-sec { font-size: 14.5px; color: #1F4E79; margin: 18px 0 8px; padding: 5px 10px; background: linear-gradient(90deg, #E3EDF7, rgba(227, 237, 247, 0)); border-left: 4px solid #1F4E79; }
#wk-result .wk-sec.na { color: #8a94a0; border-left-color: #8a94a0; }
#wk-result .wk-card { border: 1px solid #C9D2DC; padding: 12px 16px 14px; margin: 0 0 14px; background: #fff; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; position: relative; }
#wk-result .wk-card:hover { transform: translateY(-3px) scale(1.008); box-shadow: 0 8px 20px rgba(31, 78, 120, .18); border-color: #9FB8D2; z-index: 2; }
#wk-result .wk-card > h3:first-child, #wk-result .wk-card > .wk-sub:first-child { margin-top: 0; }
#wk-result .wk-sub { font-size: 13px; color: #333; margin: 8px 0 6px; font-weight: bold; }
#wk-result .wk-card table, #wk-result .wk-table { border-collapse: collapse; width: 100%; margin: 4px 0 8px; background: #fff; }
#wk-result .wk-card th, #wk-result .wk-table th { background: #1F4E79; color: #fff; font-weight: normal; padding: 5px 8px; text-align: left; font-size: 12px; }
#wk-result .wk-card td, #wk-result .wk-table td { border: 1px solid #D7DDE4; padding: 4px 8px; font-size: 12px; color: #222; text-align: left; }
#wk-result .wk-card tr:nth-child(even) td, #wk-result .wk-table tr:nth-child(even) td { background: #F7FAFC; }
#wk-result .wk-card tr:hover td, #wk-result .wk-table tr:hover td { background: #E8F1FA; }
#wk-result .wk-card td.red, #wk-result .wk-card td.warn { color: #C00000; font-weight: bold; }
#wk-result .wk-card td.ok { color: #2E7D32; font-weight: bold; }
#wk-result .wk-card td.hdr { background: #EDF2F7; font-weight: bold; }
/* 叙述块：对应参考 .script（浅灰底 + 左侧 3px #1F4E79 + padding + 行高 2） */
#wk-result .wk-script { background: #F7FAFC; border-left: 3px solid #1F4E79; padding: 10px 14px; line-height: 2; font-size: 13px; color: #1c1c1c; margin: 6px 0; }
#wk-result .wk-script b { font-weight: bold; }
#wk-result .wk-script .hl { color: #C00000; font-weight: bold; }
#wk-result .wk-script .okv { color: #2E7D32; font-weight: bold; }
#wk-result .wk-note { margin: 6px 0 0; font-size: 12px; color: #8a94a0; line-height: 1.7; }
#wk-result .wk-na { margin: 6px 0; padding: 8px 12px; font-size: 12.5px; line-height: 1.6; background: #F7FAFC; border-left: 4px solid #C9D2DC; color: #8a94a0; }
#wk-result .wk-list { margin: 0; padding-left: 18px; line-height: 1.9; font-size: 12.5px; }
#wk-result .wk-list li { margin: 0 0 6px; color: #222; }
/* 横向条形图：对应参考 .bars/.brow/.blab/.btrack/.bbar/.bval */
#wk-result .wk-bars { margin: 2px 0 6px; }
#wk-result .wk-brow { display: flex; align-items: center; margin: 3px 0; }
#wk-result .wk-blab { width: 150px; flex: none; color: #333; font-size: 12px; text-align: right; padding-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#wk-result .wk-btrack { flex: 1; background: #EEF2F6; height: 14px; }
#wk-result .wk-bbar { height: 14px; background: linear-gradient(90deg, #1F4E79, #3E8EF7); border-radius: 2px; }
#wk-result .wk-bval { width: 130px; flex: none; padding-left: 8px; font-size: 12px; color: #333; }
/* 双栏：对应参考 .cols/.col */
#wk-result .wk-cols { display: flex; gap: 16px; flex-wrap: wrap; }
#wk-result .wk-col { flex: 1; min-width: 280px; }
/* 预警框：对应参考 .warnbox（红/橙/黄徽章列表） */
#wk-result .wk-warnbox { border: 1px solid #E4B571; background: #FDF6EC; padding: 10px 14px; margin: 6px 0; }
#wk-result .wk-warnbox ul { margin: 0; padding: 0; list-style: none; }
#wk-result .wk-warnbox li { padding: 4px 0; border-bottom: 1px dashed #EBD9BC; line-height: 1.6; }
#wk-result .wk-warnbox li:last-child { border-bottom: none; }
#wk-result .wk-warnbox li.w红 { color: #8f1010; }
#wk-result .wk-warnbox li.w红 b { background: #C00000; color: #fff; font-size: 10.5px; padding: 1px 6px; margin-right: 8px; border-radius: 2px; }
#wk-result .wk-warnbox li.w橙 { color: #6b4e00; }
#wk-result .wk-warnbox li.w橙 b { background: #E6750A; color: #fff; font-size: 10.5px; padding: 1px 6px; margin-right: 8px; border-radius: 2px; }
#wk-result .wk-warnbox li.w黄 b { background: #C9A227; color: #fff; font-size: 10.5px; padding: 1px 6px; margin-right: 8px; border-radius: 2px; }
/* KPI 瓦片：复用 .brief-card（已与参考 .kpi 一致）；容器对齐参考 .kpis（flex + gap 10 + 等宽拉伸） */
#wk-result .brief-cards { display: flex; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; padding: 0; }
#wk-result .brief-card { flex: 1; min-width: 190px; }
.brief-quality { margin: 0 0 8px; padding: 10px 14px; font-size: 13px; line-height: 1.7; background: #FDF6EC; border: 1px solid #E4B571; border-left: 4px solid #C9A227; color: #6b4e00; }
.brief-quality .qk { font-weight: 600; }
/* 【2026-10-17 用户指令·AI 解析区块瘦身】分组小标题：需关注 / 数据质量 / 系统健康 / 总体情况 / 趋势 */
.brief-sec { margin: 0 0 14px; }
.brief-sec:last-child { margin-bottom: 0; }
.brief-sec-t { margin: 0 0 7px; font-size: 12.5px; font-weight: 700; color: #1F4E79; letter-spacing: .2px; }
.brief-sec .brief-finding:last-child, .brief-sec .brief-quality:last-child { margin-bottom: 0; }
.brief-sec .brief-trend { margin-top: 0; }
/* 【2026-10-14 P1-3】系统健康段：异常时转红（端口离线 / 近期有 ERROR / 备份失败） */
.brief-quality.sys-bad { background: #FDF0EC; border-color: #E4A571; border-left-color: #C00000; color: #8f1010; }
.brief-trend { width: 100%; border-collapse: collapse; margin: 10px 0 4px; font-size: 12.5px; }
.brief-trend th { background: #1F4E79; color: #fff; font-weight: normal; padding: 5px 8px; border: 1px solid #1F4E79; }
.brief-trend td { border: 1px solid #D7DDE4; padding: 4px 8px; color: #222; }
.brief-trend tr:nth-child(even) td { background: #F7FAFC; }
.brief-trend tr:hover td { background: #E8F1FA; }
/* 【2026-10-14 优化】事故×报警关联：关联报警徽标 / 可点击行 / 事故详情弹窗 */
tr.acc-row-click { cursor: pointer; }
tr.acc-row-click:hover { background: var(--bg); }
.acc-lk-badge { display: inline-block; min-width: 20px; padding: 1px 8px; border-radius: 10px; background: #fdecea; color: var(--danger, #d93025); font-weight: 600; font-size: 12px; text-align: center; }
.acc-lk-none { color: var(--text-secondary); }
.acc-lk-before { color: var(--danger, #d93025); font-weight: 600; white-space: nowrap; }
.acc-lk-after { color: var(--text-secondary); white-space: nowrap; }
.acc-lk-empty { color: var(--text-secondary); font-size: 12.5px; }
.acc-modal-mask { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 23, 42, .55); }
.acc-modal { display: flex; flex-direction: column; width: 100%; max-width: 880px; max-height: 86vh; background: var(--card-bg, #fff); border: 1px solid var(--border); border-radius: var(--radius, 10px); box-shadow: 0 20px 50px rgba(2, 6, 23, .35); overflow: hidden; }
.acc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.acc-modal-head h3 { margin: 0; font-size: 15px; color: var(--text); }
.acc-modal-close { width: 30px; height: 30px; border: none; border-radius: 8px; background: var(--bg); color: var(--text-secondary); font-size: 16px; line-height: 1; cursor: pointer; }
.acc-modal-close:hover { background: #fdecea; color: var(--danger, #d93025); }
.acc-modal-body { padding: 14px 18px 20px; overflow-y: auto; }
.acc-meta { padding: 10px 14px; background: var(--bg); border-radius: var(--radius, 8px); font-size: 12.5px; line-height: 2; }
.acc-meta-k { color: var(--text-secondary); }
.acc-meta-k::after { content: "："; }
.acc-meta-v { color: var(--text); font-weight: 500; margin-right: 16px; }
.acc-sec { margin-top: 14px; }
.acc-sec h4 { margin: 0 0 6px; font-size: 13.5px; color: var(--text); }
.acc-sec p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--text); white-space: pre-wrap; word-break: break-all; }
.acc-sec .ai-table { font-size: 12px; }

/* ===================== 【2026-10-15】审批核查 · 检修计划（审核中） ===================== */
.audit-plan-page { padding: 16px; }
.audit-plan-card { padding: 16px 18px; }
.audit-plan-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.audit-plan-title h2 { margin: 0 0 4px; font-size: 17px; }
.audit-plan-sub { font-size: 12px; color: var(--text-3, #8a94a6); }
.audit-plan-body { min-height: 120px; }
.audit-plan-loading, .audit-plan-empty { padding: 28px 12px; text-align: center; color: var(--text-3, #8a94a6); font-size: 13px; }
.audit-plan-meta { margin-top: 10px; font-size: 12px; color: var(--text-3, #8a94a6); }
/* 红色标记（用户口径）：有更换未关联物料 / 关联标准不足 100% */
.audit-plan-tb td.audit-red { color: #d93025 !important; font-weight: 600; }

/* ===================== 【2026-10-15 二轮】表宽 fixed + UI 化 + AI 解析 ===================== */
/* fixed 布局 + 百分比列宽（colgroup）：容器内自适应，不产生横向拖拉框 */
.audit-plan-tb { table-layout: fixed; width: 100%; border-collapse: collapse; }
.audit-plan-tb th, .audit-plan-tb td {
    padding: 10px 8px; font-size: 12px; line-height: 1.45;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    vertical-align: middle;
    /* 【2026-10-16 用户要求】表头与内容居中显示 */
    text-align: center;
}
.audit-plan-tb th { background: #f5f7fa; font-weight: 600; text-align: center; }
/* 数字列等宽右对齐；时间列等宽 */
.audit-plan-tb td.num { text-align: center; font-variant-numeric: tabular-nums; font-family: "SFMono-Regular", Consolas, "Courier New", monospace; }
.audit-plan-tb td.time { font-variant-numeric: tabular-nums; font-family: "SFMono-Regular", Consolas, "Courier New", monospace; color: var(--text-2, #4a5568); }
/* UI 化 badge：产线 / 费用分类 / 执行单位 */
.audit-badge {
    display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; vertical-align: middle;
    padding: 1px 9px; border-radius: 999px; font-size: 12px; line-height: 18px;
    border: 1px solid transparent;
}
.audit-badge-line { background: #eef4ff; color: #1a56db; border-color: #c7d7fe; }
.audit-badge-line.audit-inferred { background: #fff; color: #667085; border-style: dashed; border-color: #d0d5dd; }
.audit-badge-cost { background: #f2f4f7; color: #344054; border-color: #e4e7ec; }
.audit-badge-cost.audit-cost-dx { background: #fff4ed; color: #b93815; border-color: #ffd6ae; }
.audit-badge-cost.audit-cost-rx { background: #eff8ff; color: #175cd3; border-color: #b2ddff; }
.audit-badge-exec { background: #ecfdf3; color: #067647; border-color: #abefc6; font-variant-numeric: tabular-nums; }
/* 红色标记 flag 化：红字 + 浅红底 + ⚠ 前缀，一眼定位异常格 */
.audit-flag {
    display: inline-block; padding: 0 6px; border-radius: 4px;
    background: #fef3f2; color: #b42318; font-weight: 600;
    border: 1px solid #fecdca;
}
.audit-flag::before { content: "⚠ "; font-weight: 400; }
/* AI 解析 · 异常问题点卡片 */
.audit-ai { margin-top: 12px; border: 1px solid var(--border, #e4e7ec); border-radius: 8px; background: #fbfcfe; overflow: hidden; }
.audit-ai-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; background: #f5f7fa; border-bottom: 1px solid var(--border, #e4e7ec); }
.audit-ai-title { font-size: 13px; font-weight: 600; color: var(--text, #1d2939); }
.audit-ai-count { font-size: 12px; color: #b42318; background: #fef3f2; border: 1px solid #fecdca; border-radius: 999px; padding: 1px 10px; }
.audit-ai-count.ok { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.audit-ai-list { margin: 0; padding: 8px 14px 10px; list-style: none; }
.audit-ai-list li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; font-size: 12px; line-height: 1.6; }
.audit-ai-list li.warn .audit-ai-plan { color: #b42318; }
.audit-ai-list li.info .audit-ai-plan { color: #175cd3; }
.audit-ai-plan { flex: 0 0 auto; font-weight: 600; }
.audit-ai-plan::before { content: "【"; color: var(--text-3, #8a94a6); font-weight: 400; }
.audit-ai-plan::after { content: "】"; color: var(--text-3, #8a94a6); font-weight: 400; }
.audit-ai-text { color: var(--text-2, #344054); }
.audit-ai-list li.warn .audit-ai-text::before { content: "⚠ "; color: #b42318; }
.audit-ai-list li.info .audit-ai-text::before { content: "ℹ "; color: #175cd3; }
.audit-ai-none { padding: 12px 14px; font-size: 12px; color: var(--text-3, #8a94a6); }

/* ===================== 【2026-10-16 三轮】汇总框 + 四表卡片 ===================== */
/* 顶部汇总框：分类＋待审核条数；0 条＝暂无待审（正常业务状态），数字弱化灰色 */
.audit-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.audit-ov-card { border: 1px solid var(--border, #e4e7ec); border-radius: 12px; background: #fff; padding: 12px 14px; }
.audit-ov-top { display: flex; align-items: center; gap: 6px; }
.audit-ov-ico { font-size: 15px; line-height: 1; }
.audit-ov-label { font-size: 13px; font-weight: 600; color: var(--text, #1d2939); }
.audit-ov-num { margin-top: 6px; font-size: 28px; font-weight: 700; color: #b42318; font-variant-numeric: tabular-nums; line-height: 1.1; }
.audit-ov-desc { font-size: 11px; color: var(--text-3, #8a94a6); margin-top: 3px; }
.audit-ov-unit { font-size: 12px; font-weight: 400; color: var(--text-3, #8a94a6); margin-left: 4px; }
/* 【2026-10-17 用户指令】检修工单汇总卡：定修/日修/抢修 分项 chip */
.audit-ov-sub { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.audit-ov-chip { font-size: 11.5px; color: #344054; background: #f2f4f7; border: 1px solid #e4e7ec; border-radius: 999px; padding: 1px 9px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 表卡片：标题＋口径＋待审核徽标 → 表格 → AI/meta */
.audit-sec { border: 1px solid var(--border, #e4e7ec); border-radius: 12px; background: #fff; padding: 14px 16px; margin-bottom: 14px; }
.audit-sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.audit-sec-title { font-size: 14px; font-weight: 600; color: var(--text, #1d2939); }
.audit-sec-desc { font-size: 12px; color: var(--text-3, #8a94a6); margin-top: 2px; }
.audit-sec-badge { flex: 0 0 auto; font-size: 12px; color: #b42318; background: #fef3f2; border: 1px solid #fecdca; border-radius: 999px; padding: 2px 12px; white-space: nowrap; }
.audit-sec-badge.zero { color: #667085; background: #f2f4f7; border-color: #e4e7ec; }
.audit-sec-empty { padding: 26px 12px; text-align: center; color: var(--text-3, #8a94a6); font-size: 12px; border-radius: 8px; }

/* ===================== 【2026-10-16 四轮】布局与风格加强 ===================== */
/* 表类型色条：plan 蓝 / tasks 橙 / std 紫 / ckp 青（左缘 3px，一眼分区） */
.audit-sec { position: relative; overflow: hidden; box-shadow: 0 2px 8px rgba(16, 24, 40, .08); }
.audit-sec::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #d0d5dd; }
.audit-sec-plan::before { background: #2e6df6; }
.audit-sec-tasks::before { background: #f79009; }
.audit-sec-std::before { background: #7a5af8; }
.audit-sec-ckp::before { background: #15b79e; }
/* 汇总卡：左缘同类色条 + hover 微阴影 */
.audit-ov-card { position: relative; overflow: hidden; transition: box-shadow .15s ease, transform .15s ease; }
.audit-ov-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #d0d5dd; }
/* 【2026-10-16 UI 方案】左缘色条跟随分级色：0 条绿 / 1-5 条橙 / >5 条红 */
.audit-ov-card.lvl-ok::before { background: #16a34a; }
.audit-ov-card.lvl-warn::before { background: #ea580c; }
.audit-ov-card.lvl-alert::before { background: #dc2626; }
.audit-ov-card:hover { box-shadow: 0 4px 14px rgba(16, 24, 40, .14); transform: translateY(-2px); }
/* 表格：斑马纹 + hover 行高亮 + 表头渐变 + 容器圆角 */
.audit-sec .table-wrap { border-radius: 8px; }
.audit-plan-tb thead th { background: linear-gradient(180deg, #f8fafc 0%, #eef1f6 100%); border-bottom: 2px solid #d0d5dd; }
.audit-plan-tb tbody tr:nth-child(even) { background: #f9fafb; }
.audit-plan-tb tbody tr:hover { background: #eff6ff; }
.audit-plan-tb tbody tr { transition: background .12s ease; }
/* 数据时间行：主程序=实时获取时刻；看板=快照截至时刻 */
.audit-plan-stamp { margin-top: 10px; padding: 8px 12px; font-size: 12px; color: var(--text-3, #8a94a6); background: #f8fafc; border: 1px dashed var(--border, #e4e7ec); border-radius: 8px; text-align: center; }
.audit-plan-stamp::before { content: "🕐 "; }

/* ===================== 【2026-10-16 六轮】UI 美化最终方案（参照择优） ===================== */
/* P0 汇总框颜色分级：0 条=绿（无待审，正常业务状态）/ 1-5 条=橙 / >5 条=红（紧迫） */
.audit-ov-card { box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }
.audit-ov-card.lvl-ok { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); border-color: #bbf7d0; }
.audit-ov-card.lvl-ok .audit-ov-num { color: #16a34a; }
.audit-ov-card.lvl-ok .audit-ov-desc { color: #15803d; }
.audit-ov-card.lvl-warn { background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); border-color: #fed7aa; }
.audit-ov-card.lvl-warn .audit-ov-num { color: #ea580c; }
.audit-ov-card.lvl-warn .audit-ov-desc { color: #c2410c; }
.audit-ov-card.lvl-alert { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); border-color: #fecaca; }
.audit-ov-card.lvl-alert .audit-ov-num { color: #dc2626; }
.audit-ov-card.lvl-alert .audit-ov-desc { color: #b91c1c; }
/* P1 表卡片头部：标题图标 + 徽标组（待审核条数 / 红色行预警） */
.audit-sec-ico { margin-right: 5px; font-size: 14px; }
.audit-sec-badges { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.audit-sec-badge.warn { color: #b42318; background: #fef3f2; border-color: #fecdca; font-weight: 600; }
/* P1 工单类型 badge 小图标（🔧定修 / 🔄日修 / 🚨抢修） */
.audit-badge-ico { margin-right: 2px; font-size: 11px; }
/* P2 空态：正常空态=绿色主题 + ✅ 大图标；失败=红色主题 + ⚠ */
.audit-sec-empty.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; padding: 30px 12px; }
.audit-sec-empty.ok::before { content: "✅"; display: block; font-size: 26px; margin-bottom: 6px; }
.audit-sec-empty.err { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; }
.audit-sec-empty.err::before { content: "⚠ "; font-weight: 400; }
.audit-plan-empty.err { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; color: #b91c1c; }
.audit-plan-empty.err::before { content: "⚠ "; font-weight: 400; }
.audit-plan-empty.info { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; color: #1d4ed8; }
.audit-plan-empty.info::before { content: "ℹ "; font-weight: 400; }
/* P2 加载动画：旋转 loading + 文字 */
.audit-plan-loading::before {
    content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px;
    border: 2px solid #c7d7fe; border-top-color: #2e6df6; border-radius: 50%;
    vertical-align: -2px; animation: audit-spin .8s linear infinite;
}
@keyframes audit-spin { to { transform: rotate(360deg); } }
/* P2 一键更新按钮：主色渐变 + 刷新图标（禁用态=看板快照说明） */
#btn-audit-refresh { background: linear-gradient(180deg, #2e6df6 0%, #1a56db 100%); border-color: #1a56db; color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
#btn-audit-refresh:hover { filter: brightness(1.07); box-shadow: 0 2px 8px rgba(26, 86, 219, .35); }
#btn-audit-refresh:disabled { background: #f2f4f7; border-color: #e4e7ec; color: #98a2b3; filter: none; box-shadow: none; cursor: not-allowed; }
.audit-btn-ico { font-size: 12px; line-height: 1; }
/* 窄屏（移动云电脑 / 手机看板）：汇总卡 4 列 → 2 列，避免挤压 */
@media (max-width: 720px) {
    .audit-overview { grid-template-columns: repeat(2, 1fr); }
}

/* 【2026-10-17 用户指令】设备总结：筛选工具栏移入 card-header，与周小结/设备小结 tab 同行 */
.sum-header { justify-content: flex-start; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.card-header.sum-header .rp-tabs { margin-right: 8px; }
.sum-toolbars { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; flex: 1 1 auto; min-width: 0; }
.brief-toolbar.in-header { padding: 0; border-bottom: none; gap: 8px 12px; }
.brief-toolbar.in-header .form-group { min-width: 116px; }
.brief-toolbar.in-header .btn { margin-bottom: 2px; }
/* 【2026-10-17 用户指令·删空白行】工具栏已在 card-header 内，原 header 下边距(10px) +
   #wk-result 上内距(12px，继承 .brief-result) + 首节 .wk-sec 上边距(18px) ≈ 40px 纯空白，
   用户视角即「工具栏下面多了一行空白」。三项一并收紧，内容紧贴工具栏。 */
#tab-summary .card-header.sum-header { margin-bottom: 0; padding-bottom: 8px; }
#wk-result { padding: 8px 16px 18px; }
#wk-result > .wk-sec:first-child { margin-top: 0; }
#sum-pane-brief > #brief-cards { padding-top: 0; }
