/* ==================== 全局变量 ==================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --sidebar-bg: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #2563eb;

    --red: #ef4444;
    --red-bg: #fef2f2;
    --orange: #f97316;
    --orange-bg: #fff7ed;
    --yellow: #eab308;
    --yellow-bg: #fefce8;
    --blue: #3b82f6;
    --blue-bg: #eff6ff;
    --green: #22c55e;
    --green-bg: #f0fdf4;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 10px;
    --radius-sm: 6px;
}

/* ==================== 基础重置 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
}
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
a { cursor: pointer; color: var(--primary); text-decoration: none; }

/* ==================== 布局 ==================== */
#app { display: flex; height: 100vh; }

.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sidebar-header { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 16px; font-weight: 700; white-space: nowrap; letter-spacing: .2px; }
.logo svg { color: var(--primary); width: 28px; height: 28px; flex-shrink: 0; }
.sidebar-subtitle { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 14px;
    margin-bottom: 4px;
    transition: all 0.2s;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-item svg { flex-shrink: 0; }
.nav-badge {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
.nav-item.active .nav-badge { background: #fff; color: var(--primary); }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.user-info { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 36px; height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}
.user-name { color: #fff; font-size: 13px; font-weight: 600; }
.user-role { color: var(--text-light); font-size: 11px; }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px;
    height: 60px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.topbar h1 { font-size: 18px; font-weight: 700; }
.date-display { font-size: 13px; color: var(--text-secondary); }

.page-container { flex: 1; overflow-y: auto; padding: 24px 28px; }

/* ==================== 页面切换 ==================== */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ==================== 卡片 ==================== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 15px; font-weight: 700; }
.card-body { padding: 20px; }
.card-body.no-padding { padding: 0; }

/* ==================== 指标卡片 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}
.stat-card.stat-total { border-left-color: var(--primary); }
.stat-card.stat-pending { border-left-color: var(--orange); }
.stat-card.stat-progress { border-left-color: var(--yellow); }
.stat-card.stat-closed { border-left-color: var(--green); }
.stat-card.stat-overdue { border-left-color: var(--red); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-total .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-pending .stat-icon { background: var(--orange-bg); color: var(--orange); }
.stat-progress .stat-icon { background: var(--yellow-bg); color: var(--yellow); }
.stat-closed .stat-icon { background: var(--green-bg); color: var(--green); }
.stat-overdue .stat-icon { background: var(--red-bg); color: var(--red); }

.stat-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; }
/* S1 指标卡对照小字：占全厂比重 / 另一来源对照 */
.stat-cmp { font-size: 11px; color: var(--text-light); margin-top: 5px; line-height: 1.35; }

/* ==================== 整改完成率条（指标卡下方） ==================== */
.rate-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}
.rate-strip-label { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.rate-strip-fig { font-size: 24px; font-weight: 800; line-height: 1; letter-spacing: -0.5px; min-width: 62px; }
.rate-strip-fig i { font-size: 13px; font-style: normal; font-weight: 700; margin-left: 2px; color: var(--text-secondary); }
.rate-strip-track {
    flex: 1 1 200px;
    min-width: 120px;
    height: 10px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}
.rate-strip-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--green));
    transition: width 0.5s ease;
}
.rate-strip-meta { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.rate-strip-meta b { color: var(--text); font-weight: 700; }
.rate-strip-meta b.rate-overdue { color: var(--red); }

/* 完成率分档：≥80% 达标 / 60~80% 预警 / <60% 偏低 */
.rate-strip.is-good { border-left-color: var(--green); }
.rate-strip.is-good .rate-strip-fig { color: var(--green); }
.rate-strip.is-warn { border-left-color: var(--orange); }
.rate-strip.is-warn .rate-strip-fig { color: var(--orange); }
.rate-strip.is-bad { border-left-color: var(--red); }
.rate-strip.is-bad .rate-strip-fig { color: var(--red); }
.rate-strip.is-warn .rate-strip-fill { background: linear-gradient(90deg, #f59e0b, var(--orange)); }
.rate-strip.is-bad .rate-strip-fill { background: linear-gradient(90deg, #dc2626, var(--red)); }
.rate-strip.is-empty { border-left-color: var(--border); }
.rate-strip.is-empty .rate-strip-fill { background: var(--border); }

@media (max-width: 768px) {
    .rate-strip { gap: 10px; padding: 12px 16px; }
    .rate-strip-meta { white-space: normal; }
    .rate-strip-track { flex: 1 1 100%; order: 4; }
}

/* ==================== Dashboard 布局 ==================== */
.dashboard-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.chart-card { min-height: 320px; }
.chart-card .card-body { min-height: 260px; }
.todo-card .card-body { max-height: 260px; overflow-y: auto; }
/* 统计页趋势统计图（周/月合并）与车间横向分布图容器高度 */
#envTrendChart, #selfTrendChart { min-height: 260px; }
#envDeptChart, #selfDeptChart { min-height: 300px; }

.todo-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 4px;
}
.todo-item:hover { background: var(--bg); }
.todo-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.todo-dot.dot-red { background: var(--red); }
.todo-dot.dot-orange { background: var(--orange); }
.todo-dot.dot-yellow { background: var(--yellow); }
.todo-dot.dot-blue { background: var(--blue); }
.todo-content { flex: 1; min-width: 0; }
.todo-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-meta { font-size: 12px; color: var(--text-light); }
.todo-empty { text-align: center; color: var(--text-light); padding: 40px 0; }

.recent-list { display: flex; flex-direction: column; gap: 8px; }
.recent-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    cursor: pointer;
    transition: all 0.2s;
}
.recent-item:hover { background: var(--primary-light); }
.recent-level {
    width: 6px; height: 40px; border-radius: 3px; flex-shrink: 0;
}
.recent-info { flex: 1; min-width: 0; }
.recent-desc { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-meta { font-size: 12px; color: var(--text-light); }

/* ==================== 表单 ==================== */
.form-card { max-width: 900px; }
.report-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row:has(textarea) { grid-template-columns: 1fr; }
.form-row:has(.level-selector) { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-label.required::after { content: " *"; color: var(--red); }
.form-input {
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.2s;
    background: #fff;
    color: var(--text);
}
.form-input:focus { outline: none; border-color: var(--primary); }
textarea.form-input { resize: vertical; }

/* 等级选择器 */
.level-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.level-option { cursor: pointer; }
.level-option input { display: none; }
.level-option span {
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    border: 2px solid var(--border);
    transition: all 0.2s;
}
.level-red span:hover { border-color: var(--red); color: var(--red); }
.level-orange span:hover { border-color: var(--orange); color: var(--orange); }
.level-yellow span:hover { border-color: var(--yellow); color: var(--yellow); }
.level-blue span:hover { border-color: var(--blue); color: var(--blue); }
.level-red input:checked + span { background: var(--red); color: #fff; border-color: var(--red); }
.level-orange input:checked + span { background: var(--orange); color: #fff; border-color: var(--orange); }
.level-yellow input:checked + span { background: var(--yellow); color: #fff; border-color: var(--yellow); }
.level-blue input:checked + span { background: var(--blue); color: #fff; border-color: var(--blue); }

/* 照片上传 */
.photo-upload { position: relative; width: 200px; height: 150px; }
.upload-placeholder {
    width: 100%; height: 100%;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}
.upload-placeholder:hover { border-color: var(--primary); color: var(--primary); }
.upload-placeholder p { font-size: 12px; }
.photo-preview { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.photo-remove {
    position: absolute; top: -8px; right: -8px;
    width: 24px; height: 24px;
    background: var(--red); color: #fff;
    border-radius: 50%; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}

.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }

/* ==================== 按钮 ==================== */
.btn {
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600;
    transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--orange); color: #fff; }
.btn-warning:hover { background: #ea580c; }
.link-btn { font-size: 13px; color: var(--primary); font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ==================== 筛选栏 ==================== */
.filter-card { margin-bottom: 16px; }
.filter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-group { flex: 1; min-width: 200px; }
.filter-bar .form-input { min-width: 120px; }

/* ==================== 数据表格 ==================== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px; font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    white-space: nowrap;
}
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* 等级标签 */
.tag {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px; font-weight: 600;
    white-space: nowrap;
}
.tag-red { background: var(--red-bg); color: var(--red); }
.tag-orange { background: var(--orange-bg); color: var(--orange); }
.tag-yellow { background: var(--yellow-bg); color: #a16207; }
.tag-blue { background: var(--blue-bg); color: var(--blue); }
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-gray { background: #f1f5f9; color: var(--text-secondary); }

/* 状态标签 */
.status-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px; font-weight: 600;
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.status-pending { background: var(--blue-bg); color: var(--blue); }
.status-pending::before { background: var(--blue); }
.status-assigned { background: var(--orange-bg); color: var(--orange); }
.status-assigned::before { background: var(--orange); }
.status-progress { background: var(--yellow-bg); color: #a16207; }
.status-progress::before { background: var(--yellow); }
.status-verify { background: #ede9fe; color: #7c3aed; }
.status-verify::before { background: #7c3aed; }
.status-closed { background: var(--green-bg); color: var(--green); }
.status-closed::before { background: var(--green); }

/* ==================== 空状态 ==================== */
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 20px;
    color: var(--text-light);
    gap: 12px;
}
.empty-state p { font-size: 14px; }

/* ==================== 弹窗 ==================== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
.modal {
    background: #fff;
    border-radius: var(--radius);
    width: 90%; max-width: 720px;
    max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px;
    font-size: 24px; color: var(--text-light);
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { flex: 1; overflow-y: auto; padding: 24px; }

/* 详情弹窗内容 */
.detail-section { margin-bottom: 24px; }
.detail-section-title {
    font-size: 13px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-item { display: flex; flex-direction: column; gap: 4px; }
.detail-label { font-size: 12px; color: var(--text-light); }
.detail-value { font-size: 14px; font-weight: 600; }
.detail-photo { width: 100%; max-width: 300px; border-radius: var(--radius-sm); margin-top: 8px; }

/* 闭环流程时间线 */
.timeline { position: relative; padding-left: 28px; margin-top: 16px; }
.timeline::before {
    content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px;
    width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute; left: -28px; top: 2px;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 3px solid var(--border);
    background: #fff;
    z-index: 1;
}
.timeline-item.done .timeline-dot { background: var(--green); border-color: var(--green); }
.timeline-item.current .timeline-dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.timeline-title { font-size: 14px; font-weight: 700; }
.timeline-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.timeline-desc { font-size: 13px; color: var(--text-secondary); margin-top: 6px; padding: 10px; background: var(--bg); border-radius: var(--radius-sm); }

/* 弹窗操作区 */
.modal-actions {
    display: flex; gap: 10px; flex-wrap: wrap;
    padding-top: 20px; border-top: 1px solid var(--border);
    margin-top: 8px;
}
.modal-actions .form-group { flex: 1; min-width: 200px; }

/* ==================== Toast ==================== */
.toast {
    position: fixed; top: 20px; right: 20px;
    padding: 12px 20px;
    background: #1e293b; color: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}
.toast.show { transform: translateX(0); }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.sidebar ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .dashboard-row { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .level-selector { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== 登录 / 注册 ==================== */
.login-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.login-overlay.show { display: flex; }
.login-card {
    background: #fff; border-radius: 16px; padding: 36px 36px 24px;
    width: 100%; max-width: 400px; box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.login-logo { text-align: center; margin-bottom: 20px; color: var(--primary); }
.login-logo h1 { font-size: 18px; color: var(--text); margin: 10px 0 4px; }
.login-logo p { font-size: 12px; color: var(--text-light); }
.auth-tabs {
    display: flex; background: #f1f5f9; border-radius: 10px; padding: 4px; margin-bottom: 20px;
}
.auth-tab {
    flex: 1; border: none; background: transparent; padding: 8px; border-radius: 8px;
    font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
}
.auth-tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.auth-msg { font-size: 13px; padding: 8px 12px; border-radius: 8px; margin: 8px 0; }
.auth-msg.ok { background: var(--green-bg); color: var(--green); }
.auth-msg.err { background: var(--red-bg); color: var(--red); }
.login-tip { text-align: center; font-size: 12px; color: var(--text-light); margin-top: 16px; }

/* 顶栏用户与退出 */
.user-info { position: relative; }
.logout-btn {
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    color: var(--text-light); cursor: pointer; padding: 6px; border-radius: 8px;
}
.logout-btn:hover { color: var(--red); background: var(--red-bg); }

/* ==================== 后台管理 ==================== */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-tab {
    border: 1px solid var(--border); background: #fff; padding: 8px 18px; border-radius: 10px;
    font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
}
.admin-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.form-input-sm { padding: 5px 8px; font-size: 13px; }
.color-input { width: 40px; height: 32px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: #fff; padding: 2px; }
.link-btn.warn { color: var(--red); }

.perm-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.perm-all { grid-column: 1 / -1; font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.perm-item, .perm-all {
    display: flex; align-items: center; gap: 8px; font-size: 14px;
    padding: 6px 8px; border-radius: 8px; cursor: pointer;
}
.perm-item:hover { background: #f1f5f9; }
.perm-item input, .perm-all input { width: 16px; height: 16px; accent-color: var(--primary); }

.dept-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.dept-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f1f5f9; border-radius: 20px; padding: 6px 14px; font-size: 13px; font-weight: 600;
}
.dept-chip a { cursor: pointer; color: var(--text-light); font-size: 12px; }
.dept-chip a:hover { color: var(--red); }

.logs-list { display: flex; flex-direction: column; gap: 6px; }
.log-item {
    display: flex; align-items: center; gap: 12px; font-size: 13px;
    padding: 10px 12px; background: #f8fafc; border-radius: 10px;
}
.log-action { font-weight: 700; color: var(--primary); white-space: nowrap; }
.log-detail { flex: 1; color: var(--text); }
.log-meta { font-size: 12px; color: var(--text-light); white-space: nowrap; }

/* 等级选择器支持后台自定义颜色 */
.level-option span:hover { border-color: var(--lv-color, var(--border)); color: var(--lv-color, inherit); }
.level-option input:checked + span { background: var(--lv-color, var(--primary)); color: #fff; border-color: var(--lv-color, var(--primary)); }

/* ==================== 消息中心 ==================== */
.msg-wrap { position: relative; }
.msg-bell { position: relative; border: none; background: transparent; cursor: pointer; color: var(--text-secondary); padding: 6px; border-radius: 8px; }
.msg-bell:hover { background: #f1f5f9; color: var(--primary); }
.msg-badge {
    position: absolute; top: 0; right: 0;
    background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
    min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; text-align: center; padding: 0 4px;
}
.msg-panel {
    display: none; position: absolute; right: 0; top: 40px; z-index: 1500;
    width: 340px; max-height: 420px; background: #fff; border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.15); overflow: hidden;
}
.msg-panel.show { display: block; }
.msg-panel-header { padding: 12px 16px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--border); }
.msg-list { max-height: 360px; overflow-y: auto; }
.msg-item { padding: 10px 16px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.msg-item:hover { background: #f8fafc; }
.msg-item.unread { background: #eff6ff; }
.msg-item.unread .msg-title::before { content: "●"; color: var(--red); font-size: 8px; margin-right: 6px; vertical-align: 2px; }
.msg-title { font-size: 13px; font-weight: 700; }
.msg-detail { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.msg-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.msg-empty { padding: 40px; text-align: center; color: var(--text-light); font-size: 13px; }

/* ==================== 排查任务执行 ==================== */
.chk-items { display: flex; flex-direction: column; gap: 10px; }
.chk-item {
    display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center;
    padding: 10px 12px; background: #f8fafc; border-radius: 10px;
}
.chk-name { font-size: 13px; font-weight: 600; }
.chk-opts { display: flex; gap: 10px; font-size: 13px; }
.chk-opts label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.chk-opts input { accent-color: var(--primary); }
.chk-remark { grid-column: 1 / -1; font-size: 13px; padding: 6px 10px; }

.chk-admin-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.chk-admin-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.chk-admin-items { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.chk-admin-item { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.chk-admin-item:hover { background: #f8fafc; }
.chk-admin-item a { cursor: pointer; color: var(--text-light); padding: 0 4px; }
.chk-admin-item a:hover { color: var(--red); }

/* 区块标题 */
.section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 700; color: var(--text);
    margin: 4px 0 12px;
}
.section-title::before {
    content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--primary);
}

/* 图表口径说明 */
.chart-hint { font-size: 12px; color: var(--text-light); font-weight: 400; }
/* 两行式图卡头部：第一行 标题+切换胶囊，第二行说明文字 */
.card-header-stack { flex-direction: column; align-items: flex-start; gap: 6px; }
.chart-head-row { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-head-row .dash-range-toggle { flex-shrink: 0; }
.chart-ctrl-group { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* ==================== 车间隐患热力图 ==================== */
.heatmap-wrap { overflow-x: auto; }
.heatmap-grid { display: grid; gap: 3px; font-size: 12px; min-width: 520px; }
.heatmap-grid .hm-head { font-size: 11px; color: var(--text-secondary); text-align: center; padding-bottom: 2px; white-space: nowrap; }
.heatmap-grid .hm-dept { display: flex; align-items: center; font-size: 12px; color: var(--text); padding-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heatmap-grid .hm-cell { display: flex; align-items: center; justify-content: center; height: 30px; border-radius: 4px; background: #f1f5f9; color: var(--text-light); font-variant-numeric: tabular-nums; }
.heatmap-grid .hm-sum { font-weight: 700; color: var(--text); background: transparent; }
.heatmap-grid .hm-cell.is-focus { box-shadow: inset 0 0 0 2px var(--primary); }
.heatmap-legend { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--text-secondary); flex-wrap: wrap; }
.heatmap-legend i { width: 20px; height: 10px; border-radius: 2px; display: inline-block; }
/* 卡片头左侧：标题 + 范围徽标 */
.chart-head-left { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.range-badge {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    padding: 1px 8px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-light);
    white-space: nowrap;
}
/* 图内切到本周/上周时用绿色徽标，提示这是独立于页面级范围的切片 */
.range-badge.is-week { color: #15803d; background: var(--green-bg); }

/* 筛选栏：条件 + 时间区间 + 操作，统一靠右排列，窄屏自动换行 */
.filter-bar { row-gap: 10px; justify-content: flex-end; }
.filter-bar .form-input { min-width: 112px; }
.filter-bar input[type="date"] { min-width: 132px; }
.filter-bar .btn-sm { white-space: nowrap; }
.filter-bar .filter-group { flex: 0 1 240px; }
.filter-bar .form-input { flex: 0 0 auto; }
.filter-bar .date-sep { color: var(--text-light); font-size: 13px; }

/* ==================== 统计分析页签 ==================== */
.stat-tabs {
    display: flex; gap: 6px; padding: 5px; margin-bottom: 16px;
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    width: fit-content;
}
.stat-tab {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 18px; border: none; border-radius: 8px; background: transparent;
    font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
    cursor: pointer; transition: all .18s; white-space: nowrap;
}
.stat-tab:hover { background: #f1f5f9; color: var(--text); }
.stat-tab.active {
    color: #fff; background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 3px 10px rgba(37, 99, 235, .28);
}
.stat-tab-ic {
    font-size: 12px; color: #a78bfa; transition: color .18s;
}
.stat-tab.active .stat-tab-ic { color: #fff; }
.stat-tab-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.stat-panel { display: none; }
.stat-panel.active { display: block; animation: statFade .22s ease; }
@keyframes statFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 来源说明条 */
.stat-scope-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 11px 16px; border-radius: 10px; margin-bottom: 16px;
    font-size: 12.5px; border: 1px solid;
}
.stat-scope-env { background: #eff6ff; border-color: #bfdbfe; }
.stat-scope-self { background: #f0fdf4; border-color: #bbf7d0; }
.stat-scope-tag {
    font-size: 12px; font-weight: 700; color: #fff; padding: 2px 10px; border-radius: 5px;
}
.stat-scope-env .stat-scope-tag { background: #2563eb; }
.stat-scope-self .stat-scope-tag { background: #22c55e; }
.stat-scope-desc { color: var(--text-secondary); flex: 1 1 auto; }
.stat-scope-num { font-weight: 800; color: var(--text); font-size: 13px; white-space: nowrap; }
/* 范围条内的「本月 / 全部」时间切换（复用工作台胶囊样式，尺寸收紧） */
.stat-scope-bar .stat-range-toggle {
    background: rgba(255, 255, 255, .78);
    border-color: rgba(15, 23, 42, .08);
    padding: 2px;
}
.stat-scope-bar .stat-range-toggle .dash-range-btn {
    padding: 2px 10px;
    font-size: 12px;
}

/* ==================== AI 智能分析 ==================== */
/* 三模块各配身份色：趋势=蓝 / 整改质量=橙 / 预警=红；卡顶细条 + 图标徽章区分边界 */
.ai-section { position: relative; overflow: hidden; margin-bottom: 20px; }
.ai-section::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--sec, #6366f1), transparent 72%);
}
.ai-sec-trend { --sec: #2563eb; --sec-soft: rgba(37, 99, 235, .1); }
.ai-sec-rebound { --sec: #ea580c; --sec-soft: rgba(234, 88, 12, .1); }
.ai-sec-warn { --sec: #dc2626; --sec-soft: rgba(220, 38, 38, .09); }
.ai-sec-head {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px 11px; cursor: pointer; user-select: none;
}
.ai-sec-badge {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--sec-soft); color: var(--sec);
    transition: transform .2s ease, box-shadow .2s ease;
}
.ai-sec-badge svg {
    width: 21px; height: 21px; fill: none; stroke: currentColor;
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.ai-sec-head:hover .ai-sec-badge { transform: scale(1.07); box-shadow: 0 4px 14px -4px var(--sec); }
.ai-sec-tt { min-width: 0; }
.ai-sec-tt h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.ai-sec-sub { font-size: 12px; color: var(--text-light); }
.ai-sec-q {
    margin-left: auto; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
    border: 1px solid var(--border); color: var(--text-light);
    font-size: 13px; font-weight: 700; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .15s ease;
}
.ai-sec-q:hover { color: var(--sec); border-color: var(--sec); background: var(--sec-soft); }
.ai-sec-caret {
    width: 0; height: 0; flex: 0 0 auto; margin-left: 2px;
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-top: 6px solid var(--text-light);
    transition: transform .2s ease;
}
.ai-section.is-folded .ai-sec-caret { transform: rotate(-90deg); }
/* 口径弹层：点 ? 展开，点空白收起 */
.ai-sec-pop {
    display: none; margin: 0 18px 4px; padding: 10px 14px;
    border-radius: 10px; background: #f8fafc; border: 1px solid var(--border);
    font-size: 12.5px; line-height: 1.8; color: var(--text-secondary);
}
.ai-sec-pop.is-open { display: block; }
.ai-sec-pop b { color: var(--sec); }
.ai-sec-pop p { margin: 4px 0 0; }
/* 折叠态：正文收起，只留一行摘要 */
.ai-sec-summary { display: none; margin: 0; padding: 12px 18px 14px 70px; font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
.ai-sec-summary b { color: var(--sec); font-variant-numeric: tabular-nums; }
.ai-section.is-folded .ai-sec-summary { display: block; }
.ai-section.is-folded .ai-sec-body { display: none; }
.ai-section.is-folded .ai-sec-head { border-bottom: 1px solid var(--border); }
.ai-section.is-folded::before { opacity: .45; }
.ai-section-hint { font-size: 12px; color: var(--text-light); }
#aiBox { display: flex; flex-direction: column; gap: 16px; }

/* ---------- 总览条（深色科技风） ---------- */
.ai-hero {
    position: relative; overflow: hidden; border-radius: 16px;
    background: radial-gradient(120% 140% at 0% 0%, #1e293b 0%, #0f172a 55%, #020617 100%);
    padding: 20px 22px 16px; color: #e2e8f0;
    box-shadow: 0 10px 30px -12px rgba(2, 6, 23, .55);
}
.ai-hero-mesh {
    position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image:
        linear-gradient(rgba(99, 102, 241, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, .12) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(120% 100% at 85% 0%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(120% 100% at 85% 0%, #000 0%, transparent 70%);
    animation: aiGridDrift 22s linear infinite;
}
@keyframes aiGridDrift { from { background-position: 0 0, 0 0; } to { background-position: 28px 28px, 28px 28px; } }
/* V1 周期性扫过光带（雷达扫描感，低透明度不干扰阅读） */
.ai-hero::before {
    content: ""; position: absolute; top: -20%; bottom: -20%; width: 130px; left: -180px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, .09), transparent);
    transform: skewX(-18deg); pointer-events: none;
    animation: aiScan 7s ease-in-out infinite;
}
@keyframes aiScan { 0% { left: -180px; } 55%, 100% { left: calc(100% + 70px); } }
.ai-hero::after {
    content: ""; position: absolute; width: 340px; height: 340px; right: -110px; top: -160px;
    background: radial-gradient(circle, rgba(56, 189, 248, .22), transparent 65%);
    pointer-events: none;
}
.ai-hero-top { position: relative; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

/* 评分环（V2 双层：外圈刻度环 + 内圈数据环 + 端点光标） */
.ai-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; }
.ai-ring {
    width: 104px; height: 104px; border-radius: 50%; position: relative;
    display: flex; align-items: center; justify-content: center;
    background: conic-gradient(var(--col) calc(var(--pct) * 1%), rgba(148, 163, 184, .18) 0);
    box-shadow: 0 0 22px -6px var(--col);
    animation: ringIn .7s ease;
}
@keyframes ringIn { from { transform: scale(.86); opacity: .2; } to { transform: none; opacity: 1; } }
.ai-ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #0b1220; }
.ai-ring-ticks {
    position: absolute; inset: -6px; border-radius: 50%; pointer-events: none; opacity: .45;
    background: repeating-conic-gradient(rgba(148, 163, 184, .55) 0deg 1deg, transparent 1deg 12deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
}
.ai-ring-dot {
    position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
    border-radius: 50%; background: #fff; box-shadow: 0 0 9px 2px var(--col); pointer-events: none; z-index: 2;
    transform: rotate(calc(var(--pct, 0) * 3.6deg)) translateY(-47px);
}
/* I3 评级图例：优/良/中/差，当前档高亮 */
.ai-legend { display: flex; gap: 5px; }
.ai-legend i {
    font-style: normal; font-size: 10px; font-weight: 700; color: #64748b;
    background: rgba(148, 163, 184, .12); border: 1px solid transparent;
    padding: 1px 8px; border-radius: 10px; line-height: 1.5;
}
.ai-legend i.on {
    color: var(--gc);
    background: color-mix(in srgb, var(--gc) 16%, transparent);
    border-color: color-mix(in srgb, var(--gc) 45%, transparent);
}
.ai-ring-num {
    position: relative; z-index: 1; font-size: 30px; font-weight: 800; line-height: 1;
    color: var(--col); font-variant-numeric: tabular-nums;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ai-ring-num small { font-size: 11px; font-weight: 500; color: #64748b; margin-left: 2px; }

/* 中部结论 */
.ai-hero-mid { flex: 1 1 320px; min-width: 0; }
.ai-hero-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
.ai-live {
    display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
    color: #7dd3fc; background: rgba(56, 189, 248, .12);
    border: 1px solid rgba(56, 189, 248, .3); padding: 2px 9px; border-radius: 20px;
    letter-spacing: .3px;
}
.ai-live i {
    width: 6px; height: 6px; border-radius: 50%; background: #38bdf8; display: block;
    box-shadow: 0 0 0 0 rgba(56, 189, 248, .7); animation: aiPulse 1.8s infinite;
}
@keyframes aiPulse {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, .6); }
    70% { box-shadow: 0 0 0 7px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}
.ai-grade-pill {
    font-size: 11px; font-weight: 800; color: var(--gc);
    background: color-mix(in srgb, var(--gc) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--gc) 45%, transparent);
    padding: 1px 10px; border-radius: 20px;
}
.ai-hero-desc { font-size: 12px; color: #94a3b8; }
.ai-hero-concl {
    font-size: 14.5px; line-height: 1.7; color: #f1f5f9; font-weight: 500;
    letter-spacing: .2px;
}
.ai-hero-meta { font-size: 11px; color: #64748b; margin-top: 8px; }

/* KPI 小卡（V4：hover 流光浮起 + 入场瀑布 + 危险呼吸） */
.ai-hero-kpis { display: flex; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.ai-kpi {
    min-width: 78px; padding: 9px 12px; border-radius: 10px; text-align: center;
    background: rgba(148, 163, 184, .09); border: 1px solid rgba(148, 163, 184, .16);
    backdrop-filter: blur(4px);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    animation: kpiIn .45s ease backwards;
}
.ai-kpi:nth-child(2) { animation-delay: .06s; }
.ai-kpi:nth-child(3) { animation-delay: .12s; }
.ai-kpi:nth-child(4) { animation-delay: .18s; }
@keyframes kpiIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.ai-kpi:hover {
    transform: translateY(-2px); border-color: rgba(56, 189, 248, .45);
    box-shadow: 0 6px 18px -8px rgba(56, 189, 248, .5);
}
.ai-kpi b {
    display: block; font-size: 20px; font-weight: 800; line-height: 1.15; color: #f8fafc;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ai-kpi b.is-warn { color: #fbbf24; }
.ai-kpi b.is-danger { color: #f87171; animation: kpiBreath 2.2s ease-in-out infinite; }
@keyframes kpiBreath {
    0%, 100% { text-shadow: 0 0 0 rgba(248, 113, 113, 0); }
    50% { text-shadow: 0 0 12px rgba(248, 113, 113, .55); }
}
/* I1 环比小标签 */
.ai-kpi-delta {
    display: block; font-style: normal; font-size: 9.5px; margin-top: 3px;
    font-weight: 700; font-family: ui-monospace, "SF Mono", Menlo, monospace; line-height: 1.2;
}
.ai-kpi-delta.is-good { color: #34d399; }
.ai-kpi-delta.is-bad { color: #f87171; }
.ai-kpi-delta.is-flat { color: #64748b; font-weight: 500; }
.ai-kpi span { font-size: 10.5px; color: #94a3b8; }

/* 底栏：时间切换 + 评分构成 */
.ai-hero-foot {
    position: relative; margin-top: 16px; padding-top: 13px;
    border-top: 1px solid rgba(148, 163, 184, .14);
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.ai-range-switch {
    display: flex; gap: 3px; padding: 3px; border-radius: 9px; flex: 0 0 auto;
    background: rgba(148, 163, 184, .1); border: 1px solid rgba(148, 163, 184, .16);
}
.ai-range-switch button {
    padding: 5px 15px; border: none; border-radius: 7px; cursor: pointer;
    font-size: 12px; font-weight: 600; color: #94a3b8; background: transparent; transition: all .16s;
}
.ai-range-switch button:hover { color: #e2e8f0; }
.ai-range-switch button.active { background: #2563eb; color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .45); }
.ai-hero-bars {
    flex: 1 1 380px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 20px;
}
/* I2 评分条：四分格刻度 + 失分位置光标（低于满分 60% 标红） */
.ai-hb { display: flex; align-items: center; gap: 9px; cursor: help; }
.ai-hb-name { font-size: 13.5px; color: #cbd5e1; white-space: nowrap; }
.ai-hb-track { flex: 1 1 auto; height: 6px; border-radius: 3px; background: rgba(148, 163, 184, .2); position: relative; min-width: 34px; }
.ai-hb-track i { display: block; height: 100%; border-radius: 3px; transition: width .5s ease; }
.ai-hb-track::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(2, 6, 23, .55) calc(25% - 1px) 25%);
}
.ai-hb-dot {
    position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
    border-radius: 50%; background: #e2e8f0; box-shadow: 0 0 6px 1px rgba(226, 232, 240, .6);
    pointer-events: none; z-index: 2;
}
.ai-hb-dot.is-low { background: #f87171; box-shadow: 0 0 6px 1px rgba(248, 113, 113, .65); }
.ai-hb-num {
    font-size: 13.5px; color: #e2e8f0; font-variant-numeric: tabular-nums;
    font-family: ui-monospace, monospace; white-space: nowrap;
}
.ai-hb-num small { color: #94a3b8; font-size: 11.5px; }

/* I4 结论关键词芯片 + 数字突出 */
.ai-hl-term {
    color: #7dd3fc; background: rgba(56, 189, 248, .12);
    border: 1px solid rgba(56, 189, 248, .35); border-radius: 5px;
    padding: 0 5px; margin: 0 1px; font-weight: 600; white-space: nowrap;
}
.ai-hl-num { color: #fbbf24; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; }

/* 动效降级：减少动态偏好 / 演示截图模式下关闭循环动画 */
@media (prefers-reduced-motion: reduce) {
    .ai-hero-mesh, .ai-hero::before, .ai-kpi, .ai-kpi b.is-danger { animation: none !important; }
}
.ai-hb:hover .ai-hb-name { color: #e2e8f0; }

/* ---------- 洞察卡片网格 ---------- */
.ai-insight-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.ai-ins {
    position: relative; padding: 13px 14px 12px; border-radius: 12px; cursor: pointer;
    background: #fff; border: 1px solid var(--border);
    transition: all .2s; overflow: hidden;
}
.ai-ins::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--ic, #94a3b8);
}
.ai-ins:hover { border-color: var(--ic, #94a3b8); box-shadow: 0 6px 18px -10px rgba(15, 23, 42, .28); transform: translateY(-1px); }
.ai-ins-danger { --ic: #ef4444; }
.ai-ins-warn { --ic: #f59e0b; }
.ai-ins-info { --ic: #3b82f6; }
.ai-ins-good { --ic: #22c55e; }
.ai-ins-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.ai-ins-ic {
    width: 17px; height: 17px; border-radius: 50%; flex: 0 0 17px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; color: #fff; background: var(--ic, #94a3b8);
}
.ai-ins-label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.ai-ins-idx {
    margin-left: auto; font-size: 10px; font-weight: 700; color: #cbd5e1;
    font-family: ui-monospace, monospace;
}
.ai-ins-value { display: flex; align-items: baseline; gap: 4px; }
.ai-ins-value b {
    font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--text);
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ai-ins-value em { font-size: 11px; font-style: normal; color: var(--text-light); }
.ai-ins-brief {
    font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.55;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.ai-ins-detail {
    max-height: 0; opacity: 0; overflow: hidden; transition: all .25s ease;
    font-size: 12.5px; color: var(--text-secondary); line-height: 1.75;
    border-top: 1px dashed transparent; padding-top: 0;
}
.ai-ins.open .ai-ins-detail {
    max-height: 240px; opacity: 1; margin-top: 10px; padding-top: 9px;
    border-top-color: var(--border);
}
.ai-ins.open .ai-ins-brief { -webkit-line-clamp: unset; display: block; }
.ai-ins-toggle {
    position: absolute; right: 12px; bottom: 10px;
    font-size: 10px; color: var(--text-light);
}
.ai-ins-toggle::after { content: "详情 ▾"; }
.ai-ins.open .ai-ins-toggle::after { content: "收起 ▴"; }

/* ---------- TOP3 ---------- */
.ai-top-wrap { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; }
.ai-top-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 13px 16px; background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.ai-top-title h4 { font-size: 14px; font-weight: 700; color: var(--text); }
.ai-top-title span { font-size: 11.5px; color: var(--text-light); display: block; margin-top: 3px; }
.ai-seg {
    display: flex; gap: 2px; padding: 3px; border-radius: 9px; flex: 0 0 auto;
    background: #e2e8f0;
}
.ai-seg button {
    padding: 5px 14px; border: none; border-radius: 7px; cursor: pointer;
    font-size: 12px; font-weight: 600; color: var(--text-secondary); background: transparent;
    transition: all .16s; white-space: nowrap;
}
.ai-seg button:hover { color: var(--text); }
.ai-seg button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }

.ai-top-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.ai-tc {
    position: relative; padding: 15px 16px; cursor: pointer;
    border-right: 1px solid var(--border); transition: background .18s;
}
.ai-tc:last-child { border-right: none; }
.ai-tc:hover { background: #fbfdff; }
.ai-tc.open { background: #f8fbff; }
.ai-tc-head { display: flex; align-items: flex-start; gap: 9px; }
.ai-tc-rank {
    font-size: 19px; font-weight: 800; line-height: 1; flex: 0 0 auto;
    color: #cbd5e1; font-family: ui-monospace, monospace;
}
.ai-tc:nth-child(1) .ai-tc-rank { color: #ef4444; }
.ai-tc:nth-child(2) .ai-tc-rank { color: #f97316; }
.ai-tc:nth-child(3) .ai-tc-rank { color: #94a3b8; }
.ai-tc-title { flex: 1 1 auto; min-width: 0; }
.ai-tc-name {
    display: block; font-size: 13.5px; font-weight: 700; color: var(--text);
    line-height: 1.35; word-break: break-all;
}
.ai-tc-num { font-size: 11.5px; color: var(--text-light); }
.ai-tc-num em { font-style: normal; color: var(--red); font-weight: 700; }
.ai-tc-rate {
    flex: 0 0 auto; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
    color: var(--cc); background: color-mix(in srgb, var(--cc) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--cc) 35%, transparent);
    white-space: nowrap;
}
.ai-tc-brief {
    font-size: 12.5px; color: var(--text-secondary); line-height: 1.65; margin-top: 9px;
    padding-left: 28px;
}
.ai-tc-duty {
    font-size: 11.5px; color: var(--text-secondary); margin-top: 9px; padding-left: 28px;
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.ai-tc-duty span {
    font-size: 10px; font-weight: 700; color: var(--primary);
    background: var(--primary-light); padding: 1px 7px; border-radius: 4px;
}
.ai-tc-detail {
    max-height: 0; opacity: 0; overflow: hidden; transition: all .28s ease;
}
.ai-tc.open .ai-tc-detail {
    max-height: 720px; opacity: 1; margin-top: 12px; padding-top: 12px;
    border-top: 1px dashed var(--border);
}
.ai-tc-sec { margin-bottom: 11px; }
.ai-tc-sec h5 {
    font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 4px;
    display: flex; align-items: center; gap: 5px;
}
.ai-tc-sec h5::before {
    content: ""; width: 3px; height: 11px; border-radius: 2px; background: var(--primary);
}
.ai-tc-sec p, .ai-tc-sec li { font-size: 12px; color: var(--text-secondary); line-height: 1.75; }
.ai-tc-sec ul { margin: 0; padding-left: 16px; }
.ai-tc-sec li { margin-bottom: 2px; }
.ai-tc-dept { background: #faf5ff; border-left: 3px solid #a855f7; border-radius: 0 7px 7px 0; padding: 8px 10px; }
.ai-tc-dept h5::before { background: #a855f7; }
.ai-tc-samples { display: flex; gap: 5px; flex-wrap: wrap; }
.ai-tc-samples span {
    font-size: 10.5px; color: var(--text-secondary); background: #f1f5f9;
    padding: 1px 7px; border-radius: 4px;
}
.ai-tc-toggle {
    position: absolute; right: 16px; bottom: 13px;
    font-size: 10.5px; font-weight: 600; color: var(--primary);
}
.ai-tc-toggle::after { content: ""; }
.ai-tc.open .ai-tc-toggle { position: static; display: block; margin-top: 10px; }
.ai-empty { padding: 28px; text-align: center; font-size: 13px; color: var(--text-light); }

@media (max-width: 1280px) {
    .ai-insight-grid { grid-template-columns: repeat(2, 1fr); }
    .ai-top-cards { grid-template-columns: 1fr; }
    .ai-tc { border-right: none; border-bottom: 1px solid var(--border); }
    .ai-tc:last-child { border-bottom: none; }
    .ai-hero-bars { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .ai-insight-grid { grid-template-columns: 1fr; }
    .ai-hero-bars { grid-template-columns: 1fr; }
    .ai-hero-kpis { width: 100%; }
    .ai-kpi { flex: 1 1 0; min-width: 0; }
}

/* ==================== 安全员指标考核 ==================== */
.kpi-toolbar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: 14px;
}
.kpi-subtabs {
    display: flex; gap: 3px; padding: 4px; border-radius: 11px;
    background: #fff; border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.kpi-subtab {
    padding: 7px 20px; border: none; border-radius: 8px; cursor: pointer;
    font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
    background: transparent; transition: all .18s; white-space: nowrap;
}
.kpi-subtab:hover { background: #f1f5f9; color: var(--text); }
.kpi-subtab.active {
    color: #fff; background: linear-gradient(135deg, #7c3aed, #4f46e5);
    box-shadow: 0 3px 10px rgba(124, 58, 237, .28);
}
.kpi-toolbar-right { display: flex; gap: 8px; align-items: center; }

/* 总览条 */
.kpi-summary {
    display: flex; justify-content: space-between; align-items: center; gap: 18px;
    flex-wrap: wrap; padding: 16px 20px; margin-bottom: 14px; border-radius: 14px;
    background: linear-gradient(135deg, #faf5ff, #eef2ff 65%, #f8fafc);
    border: 1px solid #e9e5ff;
}
.kpi-sum-left { display: flex; align-items: center; gap: 16px; }
.kpi-sum-score {
    display: flex; align-items: baseline; gap: 2px; flex: 0 0 auto;
    padding-right: 16px; border-right: 1px solid #ddd6fe;
}
.kpi-sum-score b {
    font-size: 40px; font-weight: 800; line-height: 1; color: var(--gc, var(--primary));
    font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums;
}
.kpi-sum-score span { font-size: 12px; color: var(--text-light); }
.kpi-sum-name {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 700; color: var(--text);
}
.kpi-sum-sub { font-size: 12px; color: var(--text-light); margin-top: 5px; }
.kpi-grade {
    font-size: 11px; font-weight: 700; color: var(--gc, var(--text-secondary));
    background: color-mix(in srgb, var(--gc, #94a3b8) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--gc, #94a3b8) 38%, transparent);
    padding: 1px 9px; border-radius: 20px; white-space: nowrap;
}
.kpi-sum-keys { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi-key {
    min-width: 82px; padding: 9px 14px; border-radius: 10px; text-align: center;
    background: #fff; border: 1px solid var(--border);
}
.kpi-key b {
    display: block; font-size: 20px; font-weight: 800; line-height: 1.15; color: var(--text);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.kpi-key.is-warn b { color: var(--red); }
.kpi-key span { font-size: 11px; color: var(--text-light); }
.kpi-key em { font-style: normal; margin-left: 2px; }

/* 主体两栏 */
.kpi-main {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 14px;
}
.kpi-rank, .kpi-radar-card, .kpi-detail {
    background: #fff; border: 1px solid var(--border); border-radius: 13px; overflow: hidden;
}
.kpi-block-title {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    padding: 13px 16px; font-size: 14px; font-weight: 700; color: var(--text);
    border-bottom: 1px solid var(--border); background: #fbfcfe;
}
.kpi-block-title span { font-size: 11.5px; font-weight: 400; color: var(--text-light); }

/* 排名行 */
.kpi-row {
    display: flex; align-items: center; gap: 12px; padding: 11px 16px;
    border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .15s;
    border-left: 3px solid transparent;
}
.kpi-row:last-child { border-bottom: none; }
.kpi-row:hover { background: #fbfdff; }
.kpi-row.is-active { background: #f5f8ff; border-left-color: var(--primary); }
.kpi-row-avg { cursor: default; background: #fcfcfd; }
.kpi-row-avg:hover { background: #fcfcfd; }
.kpi-medal {
    flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff; background: #cbd5e1;
    font-family: ui-monospace, monospace;
}
.kpi-medal-1 { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 2px 8px -2px rgba(239,68,68,.5); }
.kpi-medal-2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.kpi-medal-3 { background: linear-gradient(135deg, #d97706, #b45309); }
.kpi-medal-n { background: #e2e8f0; color: #64748b; }
.kpi-medal-avg { background: #f1f5f9; color: #94a3b8; font-size: 11px; }
.kpi-row-main { flex: 1 1 auto; min-width: 0; }
.kpi-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.kpi-row-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.kpi-row-dept {
    font-size: 11px; color: var(--text-secondary); background: #f1f5f9;
    padding: 1px 7px; border-radius: 4px; max-width: 220px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kpi-row-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 12px; }
.kpi-mini { display: flex; align-items: center; gap: 5px; }
.kpi-mini > span { font-size: 10px; font-weight: 700; color: #94a3b8; width: 9px; }
.kpi-mini > i { flex: 1 1 auto; height: 5px; border-radius: 3px; background: #eef2f7; overflow: hidden; }
.kpi-mini > i > em { display: block; height: 100%; border-radius: 3px; transition: width .4s ease; }
.kpi-mini > b { font-size: 10.5px; font-weight: 700; color: var(--text-secondary); width: 22px; text-align: right; font-family: ui-monospace, monospace; }
.kpi-row-score {
    flex: 0 0 auto; display: flex; align-items: baseline; gap: 1px;
    min-width: 58px; justify-content: flex-end;
}
.kpi-row-score b {
    font-size: 22px; font-weight: 800; color: var(--gc, var(--text));
    font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums;
}
.kpi-row-score span { font-size: 10.5px; color: var(--text-light); }

/* 雷达图 */
.kpi-radar-box { height: 268px; padding: 10px 12px 0; }
.kpi-dim-legend {
    display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
    padding: 0 12px 14px; font-size: 11px; color: var(--text-light);
}
.kpi-dim-legend span { display: flex; align-items: center; gap: 5px; }
.kpi-dim-legend i { width: 7px; height: 7px; border-radius: 50%; display: block; }

/* 明细表 */
.kpi-table-wrap { overflow-x: auto; }
.kpi-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.kpi-table th {
    background: #f8fafc; color: var(--text-secondary); font-weight: 700; font-size: 11.5px;
    padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap;
}
.kpi-table td {
    padding: 9px 10px; border-bottom: 1px solid #f1f5f9; text-align: center;
    color: var(--text-secondary); white-space: nowrap;
}
.kpi-table tbody tr:hover td { background: #fbfdff; }
.kpi-item-name { font-size: 12.5px; font-weight: 600; color: var(--text); display: block; }
.kpi-item-desc { font-size: 10.5px; color: var(--text-light); display: block; margin-top: 2px; white-space: normal; max-width: 260px; }
.kpi-dim-tag { font-size: 11px; font-weight: 700; }
.kpi-score-cell { font-family: ui-monospace, monospace; }
.kpi-table td.is-full { color: var(--green); font-weight: 700; }
.kpi-table td.is-low { color: var(--red); font-weight: 700; }
.kpi-table td.is-nodata { color: #cbd5e1; }
.kpi-total-row td { background: #f8fafc; font-weight: 800; color: var(--text); border-top: 2px solid var(--border); }

.kpi-note {
    padding: 12px 16px; font-size: 11.5px; line-height: 1.8; color: var(--text-light);
    background: #fbfcfe; border-top: 1px solid var(--border);
}
.kpi-note b { color: var(--text-secondary); }

/* 后台考核设置 */
.admin-tip {
    font-size: 12.5px; line-height: 1.85; color: var(--text-secondary);
    background: #f8fafc; border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0;
    padding: 10px 14px; margin: 0;
}
.admin-tip b { color: var(--text); }
.kpi-admin-card { margin-top: 14px; }
.kpi-admin-sum { font-size: 12px; color: var(--text-light); }
.kpi-admin-sum b { font-size: 14px; color: var(--text); font-family: ui-monospace, monospace; }
.kpi-admin-sum b.is-ok { color: var(--green); }
.kpi-admin-sum b.is-warn { color: var(--orange); }
.kpi-admin-table th, .kpi-admin-table td { text-align: center; }
.form-input.kpi-in { padding: 5px 6px; font-size: 12.5px; }
.kpi-admin-foot {
    padding: 10px 16px; font-size: 11.5px; color: var(--text-light);
    background: #fbfcfe; border-top: 1px solid var(--border);
}

@media (max-width: 1280px) {
    .kpi-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .kpi-row-bars { grid-template-columns: repeat(2, 1fr); }
    .kpi-sum-keys { width: 100%; }
    .kpi-key { flex: 1 1 0; min-width: 0; }
}

/* 考核附页（月度报表内） */
.kpi-tgt-sub { display: block; font-size: 10px; color: var(--text-light); margin-top: 2px; }
.report-sub-title {
    font-size: 14px; font-weight: 700; color: var(--text);
    margin: 18px 0 10px; padding-left: 9px; border-left: 3px solid var(--primary);
}
.report-note {
    font-size: 11px; color: var(--text-light); line-height: 1.75;
    margin-top: 6px; padding: 8px 12px; background: #fbfcfe; border-radius: 6px;
}

/* 权限弹窗：分管范围提示 */
.perm-hint {
    font-size: 12px; line-height: 1.75; color: var(--text-secondary);
    background: #f5f8ff; border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0; padding: 8px 12px; margin: 0 0 14px;
}
.perm-hint b { color: var(--primary); }

/* 后台考核设置：自动目标值标记 */
.kpi-auto-tgt {
    display: inline-block; font-size: 11px; line-height: 1.4; text-align: center;
    color: var(--primary); background: var(--primary-light, #eff6ff);
    border: 1px dashed #bfdbfe; border-radius: 6px; padding: 3px 8px;
}

/* ==================== 注册身份选择卡片 ==================== */
.role-cards {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px;
}
.role-card {
    position: relative; display: block; cursor: pointer;
    border: 1.5px solid var(--border); border-radius: 10px; background: #fff;
    padding: 9px 11px; transition: all .16s;
}
.role-card:hover { border-color: #c7d2fe; background: #fbfcff; }
.role-card input[type="radio"] {
    position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.role-card-body { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.role-card-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.role-card-tag {
    font-size: 10px; font-weight: 600; color: #94a3b8; background: #f1f5f9;
    padding: 1px 6px; border-radius: 4px; white-space: nowrap; flex: 0 0 auto;
}
.role-card.active {
    border-color: var(--rc, var(--primary));
    background: color-mix(in srgb, var(--rc, #2563eb) 6%, #fff);
    box-shadow: 0 2px 8px -3px color-mix(in srgb, var(--rc, #2563eb) 45%, transparent);
}
.role-card.active .role-card-name { color: var(--rc, var(--primary)); font-weight: 700; }
.role-card.active .role-card-tag {
    background: color-mix(in srgb, var(--rc, #2563eb) 15%, #fff);
    color: var(--rc, var(--primary));
}
.role-card.active::after {
    content: "✓"; position: absolute; top: 6px; right: 8px;
    font-size: 10px; font-weight: 800; color: var(--rc, var(--primary));
}
.role-hint {
    font-size: 11.5px; line-height: 1.7; color: var(--text-secondary);
    background: #f8fafc; border-left: 3px solid var(--border);
    border-radius: 0 6px 6px 0; padding: 6px 10px; margin: 0;
}
.role-hint b { color: var(--text); }

/* ==================== 台账分页 ==================== */
.ledger-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px 4px;
}
.ledger-pager:empty { display: none; }
.pager-info { font-size: 13px; color: #64748b; }
.pager-info b { color: #0f172a; font-weight: 600; }
.pager-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-btn {
    min-width: 34px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
}
.pager-btn:hover:not(:disabled) { border-color: #2563eb; color: #2563eb; }
.pager-btn.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
}
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-dots { color: #94a3b8; padding: 0 2px; }

/* ==================== 工作台指标卡：本周/当月切换 ==================== */
.dash-stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
/* 指标卡标题 + 来源细分标签 */
.dash-stat-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}
.dash-src-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-light, #64748b);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    white-space: nowrap;
}
.dash-src-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.dash-src-item b {
    font-weight: 600;
    color: var(--text, #334155);
}
.dash-src-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex: none;
}
.dash-src-sep {
    color: #cbd5e1;
}
.dash-range-toggle {
    display: inline-flex;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.dash-range-btn {
    border: none;
    background: transparent;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
    line-height: 1.4;
}
.dash-range-btn:hover { color: #2563eb; }
.dash-range-btn.active {
    background: #fff;
    color: #2563eb;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

/* 月初空态引导：当月数据很少时提示一键回顾上月 */
.dash-month-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: -2px 0 14px;
    padding: 8px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
}
.dash-month-hint a {
    color: #b45309;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.dash-month-hint a:hover { text-decoration: underline; }

/* ==================== AI 智能分析展开区优化（v2） ==================== */
/* 洞察卡：明细条目行（色点 + 内容 + 徽章） */
.ai-ins-rows { display: flex; flex-direction: column; gap: 6px; }
.ai-ins-row {
    display: flex; align-items: center; gap: 8px;
    background: #f8fafc; border: 1px solid #eef2f7;
    border-radius: 8px; padding: 6px 10px;
}
.ai-ins-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ai-ins-row-main {
    flex: 1; min-width: 0; font-size: 13px; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-ins-row-main b { font-weight: 600; }
.ai-ins-badge {
    flex: none; font-size: 11.5px; line-height: 1.5;
    padding: 1px 8px; border-radius: 9px; white-space: nowrap;
}
/* 洞察卡：结论/建议提示条 */
.ai-ins-note {
    font-size: 13px; color: var(--text-secondary); line-height: 1.7;
    background: #f8fafc; border-left: 3px solid #cbd5e1;
    border-radius: 0 8px 8px 0; padding: 7px 10px; margin-bottom: 6px;
}
.ai-ins-note b { color: var(--text); font-weight: 600; }
.ai-ins-note.warn { background: #fff7ed; border-left-color: #f59e0b; color: #92400e; }
.ai-ins-note.warn b { color: #9a3412; }
.ai-ins-note.fix { background: #f0fdf4; border-left-color: #22c55e; color: #166534; }
.ai-ins-note:last-child { margin-bottom: 0; }
/* 洞察卡：零上报车间胶囊 */
.ai-ins-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ai-ins-chip { font-size: 12px; padding: 2px 10px; border-radius: 10px; }
.ai-ins-chip.red { background: #fee2e2; color: #b91c1c; font-weight: 600; }
.ai-ins-chip.amber { background: #fef3c7; color: #92400e; }
/* 洞察卡：闭环率迷你条 */
.ai-bar-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; color: var(--text-secondary); margin-top: 6px;
}
.ai-bar-row span { flex: none; width: 78px; }
.ai-bar { flex: 1; height: 8px; background: #eef2f7; border-radius: 4px; overflow: hidden; }
.ai-bar i { display: block; height: 100%; border-radius: 4px; }
.ai-bar-row b { flex: none; font-size: 13px; }
.ai-bar-row em { flex: none; font-style: normal; font-size: 11.5px; color: var(--text-light); }
/* 展开区字号与高度放开 */
.ai-ins-detail { font-size: 13px; }
.ai-ins.open .ai-ins-detail { max-height: 700px; }
.ai-tc-sec p, .ai-tc-sec li { font-size: 13px; }
.ai-tc-sec h5 { font-size: 12px; }
.ai-tc-samples span { font-size: 11.5px; padding: 2px 9px; }
/* TOP3：成因/对策/措施 三段横排浅底小节 */
.ai-tc-secs {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px; margin-bottom: 10px;
}
.ai-tc-secs .ai-tc-sec {
    border-radius: 8px; padding: 9px 11px; margin-bottom: 0;
}
.ai-tc-secs .ai-tc-sec h5 { margin-bottom: 5px; }
.ai-tc-secs .ai-tc-sec h5 svg { flex: none; }
.sec-cause { background: #eff6ff; }
.sec-cause h5 { color: #1d4ed8; }
.sec-cause h5::before { display: none; }
.sec-fix { background: #f0fdf4; }
.sec-fix h5 { color: #15803d; }
.sec-fix h5::before { display: none; }
.sec-measures { background: #fffbeb; }
.sec-measures h5 { color: #b45309; }
.sec-measures h5::before { display: none; }
.sec-measures ul { padding-left: 15px; margin: 0; }
.sec-measures li { margin-bottom: 3px; }
.sec-cause p, .sec-fix p { color: var(--text); }
@media (max-width: 900px) {
    .ai-tc-secs { grid-template-columns: 1fr; }
}

/* 台账表头点击排序 */
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sort:hover { color: var(--primary, #2563eb); }
.sort-arrow { font-size: 10px; color: var(--primary, #2563eb); font-weight: 700; }

/* ===== AI 增强模块：T1 趋势分析 ===== */
.ai-plus-tag {
    font-size: 11px; font-weight: 600; line-height: 1.6;
    padding: 1px 7px; border-radius: 999px; margin-left: 8px;
    background: #eff6ff; color: #1d4ed8; vertical-align: middle;
}
.ait-banner {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: 10px; margin-bottom: 14px;
    border: 1px solid transparent; line-height: 1.6;
}
.ait-banner-ic {
    flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff; margin-top: 1px;
}
.ait-banner-title { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.ait-banner-text { font-size: 12.5px; margin: 0; opacity: .88; }
.ait-danger { background: #fef2f2; border-color: #fecaca; }
.ait-danger .ait-banner-ic { background: #dc2626; }
.ait-danger .ait-banner-title { color: #b91c1c; }
.ait-warn { background: #fffbeb; border-color: #fde68a; }
.ait-warn .ait-banner-ic { background: #f59e0b; }
.ait-warn .ait-banner-title { color: #b45309; }
.ait-good { background: #f0fdf4; border-color: #bbf7d0; }
.ait-good .ait-banner-ic { background: #16a34a; }
.ait-good .ait-banner-title { color: #15803d; }
.ait-info { background: #f8fafc; border-color: #e2e8f0; }
.ait-info .ait-banner-ic { background: #64748b; }
.ait-info .ait-banner-title { color: var(--text); }

.ait-table-wrap { overflow-x: auto; }
.ait-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ait-table th {
    text-align: center; font-weight: 600; font-size: 11.5px;
    color: var(--text-secondary); padding: 8px 10px;
    background: #f8fafc; border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.ait-table th span { font-weight: 400; font-size: 10.5px; color: var(--text-light); }
.ait-table td {
    padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ait-table td.ait-dept { text-align: left; font-weight: 600; }
.ait-table tbody tr:hover { background: #f8fafc; }
.ait-table tfoot td { background: #f8fafc; font-weight: 700; border-bottom: none; }
.ait-table td.up { color: #dc2626; }
.ait-table td.down { color: #16a34a; }
.ait-arrow { font-size: 10px; margin-right: 3px; }
.ait-arrow.is-good { color: #16a34a; }
.ait-arrow.is-bad { color: #dc2626; }
.ait-arrow.is-flat { color: #94a3b8; }
.ait-note { font-size: 11.5px; color: var(--text-light); line-height: 1.7; margin: 10px 0 0; }

/* ==================== 部门闭环分析（统计页核心模块） ==================== */
.dept-analysis .card-header { flex-wrap: wrap; row-gap: 8px; }

/* A2 卡头考核摘要条 */
.dept-summary { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 20px 12px; }
.dept-chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; padding: 4px 13px; border-radius: 999px;
    background: #f1f5f9; color: #334155; white-space: nowrap;
}
.dept-chip b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dept-chip-good { background: #dcfce7; color: #166534; }
.dept-chip-warn { background: #fef3c7; color: #92400e; }
.dept-chip-bad { background: #fee2e2; color: #991b1b; }
.dept-chip-muted { background: #f8fafc; color: #94a3b8; }

/* 工具行：排序 / 视图 / 图表形态 */
.dept-tools { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 0 20px 12px; }
.dept-tools-label { font-size: 12px; color: var(--text-light); flex: 0 0 auto; }
.dept-tools .dash-range-toggle { display: inline-flex; gap: 0; }
.dept-tools .dash-range-btn { font-size: 13px; padding: 6px 14px; }

/* A1 大图区：比普通 chart-card 更高；车间多时外层出横向滚动条，内层按行数撑宽 */
.dept-chart-wrap { padding: 0 20px 16px; }
.dept-chart-scroll { overflow-x: auto; overflow-y: hidden; }
.dept-chart-scroll::-webkit-scrollbar { height: 8px; }
.dept-chart-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.dept-chart-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.dept-chart-inner { position: relative; height: 420px; min-width: 100%; }

/* B3 明细表 */
.dept-table-wrap { max-height: 460px; overflow-y: auto; padding: 0 20px 16px; }
.dept-table { font-size: 13.5px; }
.dept-table th { font-size: 12.5px; padding: 10px 12px; }
.dept-table td { padding: 10px 12px; font-size: 13.5px; }
.dept-table td.ait-dept { font-size: 14px; }
.dept-table td.dept-ok { color: #16a34a; font-weight: 600; }
.dept-table td.dept-bad { color: #dc2626; font-weight: 600; }
.dept-table td.dept-cat { color: #475569; }
.dept-rate-good { color: #16a34a; }
.dept-rate-warn { color: #d97706; }
.dept-rate-bad { color: #dc2626; }
.dept-up { color: #dc2626; font-weight: 700; }
.dept-down { color: #16a34a; font-weight: 700; }
.dept-flat { color: #94a3b8; }
.dept-warn { color: #dc2626; }

/* C2 零数据车间折叠行 */
.dept-zero { padding: 0 20px 12px; font-size: 13.5px; color: var(--text-light); }
.dept-zero:empty { display: none; }
.dept-zero .link { color: #2563eb; cursor: pointer; font-weight: 600; }
.dept-zero .link:hover { text-decoration: underline; }

/* B7 车间×类别热力：表格撑满整卡宽度 */
.dept-heat-head {
    padding: 12px 20px; border-top: 1px dashed var(--border);
    font-size: 13.5px; font-weight: 600; color: #475569;
    cursor: pointer; user-select: none;
}
.dept-heat-head:hover { color: #2563eb; }
.dept-heat-head .dept-heat-arrow { display: inline-block; width: 14px; color: #94a3b8; }
.dept-heat-head .dept-heat-hint { font-weight: 400; color: var(--text-light); font-size: 12px; margin-left: 6px; }
.dept-heat-body { padding: 0 20px 18px; max-height: 380px; overflow: auto; }
.dept-heat-empty { font-size: 13px; color: var(--text-light); padding: 8px 0; }
.dept-heat-table { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.dept-heat-table th {
    padding: 7px 8px; background: #f8fafc; color: #475569;
    font-weight: 600; white-space: nowrap; text-align: center;
    border-bottom: 1px solid var(--border);
}
.dept-heat-table tbody th { text-align: left; font-weight: 600; }
.dept-heat-table td {
    padding: 6px 8px; text-align: center; min-width: 42px;
    border: 1px solid #fff; font-variant-numeric: tabular-nums; font-weight: 600;
}
.dept-heat-table td.is-zero { color: #cbd5e1; font-weight: 400; }
.dept-heat-table td.is-sum { background: #f8fafc; font-weight: 700; color: #334155; }

/* ==================== 分布分析（类别 / 等级，统计页大模块） ==================== */
.dist-empty {
    position: absolute; inset: 0; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light); font-size: 13.5px; background: transparent;
}
.dist-empty a { color: #2563eb; cursor: pointer; font-weight: 600; margin: 0 5px; white-space: nowrap; }
.dist-empty a:hover { text-decoration: underline; }
.dist-dot {
    display: inline-block; width: 9px; height: 9px; border-radius: 50%;
    margin-right: 6px; vertical-align: 1px; flex: 0 0 auto;
}

/* ==================== 安全员考核：趋势 / 环比 / 连续标记 / 对比弹窗 ==================== */
.kpi-overview { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 4px 12px; }
.kpi-overview .dept-chip b { font-size: 13.5px; }
.kpi-spark { width: 110px; height: 24px; vertical-align: middle; }

/* E1 历史快照固化标识 */
.kpi-snap-chip {
    background: #eff6ff !important; color: #1d4ed8 !important;
    border: 1px dashed #93c5fd;
    cursor: help;
}
.kpi-snap-refix {
    color: #2563eb; font-weight: 700; cursor: pointer;
    text-decoration: underline dotted; margin-left: 4px;
}
.kpi-snap-refix:hover { color: #1d4ed8; text-decoration: underline; }
.kpi-rank-delta { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.kpi-rank-delta.is-up { background: #dcfce7; color: #16a34a; }
.kpi-rank-delta.is-down { background: #fee2e2; color: #dc2626; }
.kpi-rank-delta.is-flat { background: #f1f5f9; color: #94a3b8; }
.kpi-streak { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.kpi-streak.is-hot { background: #fef3c7; color: #b45309; }
.kpi-streak.is-low { background: #fee2e2; color: #b91c1c; }
.kpi-total-delta { font-size: 11px; font-style: normal; font-weight: 700; margin-left: 4px; }
.kpi-total-delta.is-up { color: #16a34a; }
.kpi-total-delta.is-down { color: #dc2626; }
.kpi-row-link {
    flex: 0 0 auto; font-size: 11.5px; color: #2563eb; cursor: pointer; font-weight: 600;
    padding: 2px 9px; border: 1px solid #dbeafe; border-radius: 999px; white-space: nowrap;
}
.kpi-row-link:hover { background: #eff6ff; }
.kpi-trend-card {
    margin-bottom: 14px; background: #fff; border: 1px solid var(--border);
    border-radius: 13px; padding: 14px 18px 12px;
}
.kpi-trend-box { height: 220px; margin-top: 6px; }
.kpi-comp-box { height: 300px; }
.kpi-table tr.kpi-click { cursor: pointer; }
.kpi-table tr.kpi-click:hover { background: #f8fafc; }

/* B4 车间下钻弹窗 */
.dept-drill-row {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
    margin-bottom: 6px; cursor: pointer; font-size: 13.5px; background: #fff;
}
.dept-drill-row:hover { background: #f8fafc; border-color: #cbd5e1; }
.dept-drill-row .dept-drill-id { color: #2563eb; flex: 0 0 auto; font-size: 12.5px; }
.dept-drill-row .dept-drill-desc { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dept-drill-row .dept-drill-dl { flex: 0 0 auto; color: var(--text-light); font-size: 12px; }
.dept-drill-row .tag { flex: 0 0 auto; }

@media (max-width: 768px) {
    .dept-chart-inner { height: 320px; }
}


/* ===== AI 增强模块：T3 反弹率 ===== */
.air-hero {
    display: flex; gap: 20px; align-items: center;
    padding: 16px 18px; border-radius: 10px; margin-bottom: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid var(--border);
}
.air-figure { flex: 0 0 auto; text-align: center; min-width: 96px; }
.air-figure b { display: block; font-size: 34px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.air-figure b small { font-size: 15px; margin-left: 2px; }
.air-figure span { font-size: 11.5px; color: var(--text-secondary); }
.air-meta { min-width: 0; }
.air-meta-line { font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--text); }
.air-meta-text { font-size: 12.5px; line-height: 1.75; margin: 0; color: var(--text-secondary); }
.air-hot { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.air-hot-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 8px; font-size: 12px;
    background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;
}
.air-hot-chip b {
    width: 16px; height: 16px; border-radius: 50%; background: #dc2626; color: #fff;
    font-size: 10px; display: inline-flex; align-items: center; justify-content: center;
}
.air-hot-chip em { font-style: normal; font-weight: 700; }
.air-list { display: flex; flex-direction: column; gap: 2px; }
.air-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px; font-size: 12.5px;
}
.air-row:hover { background: #f8fafc; }
.air-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.air-main { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.air-tag {
    flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 4px;
    background: #f1f5f9; color: var(--text-secondary);
}
.air-link { flex: 0 0 auto; font-size: 11.5px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.air-badge { flex: 0 0 auto; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
@media (max-width: 760px) {
    .air-row { flex-wrap: wrap; }
    .air-link { display: none; }
}

/* ===== AI 增强模块：W1 三级临期预警 ===== */
.aiw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.aiw-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #fff; }
.aiw-overdue { background: linear-gradient(180deg, #fef2f2 0%, #fff 60%); border-color: #fecaca; }
.aiw-d1 { background: linear-gradient(180deg, #fffbeb 0%, #fff 60%); border-color: #fde68a; }
.aiw-d3 { background: linear-gradient(180deg, #eff6ff 0%, #fff 60%); border-color: #bfdbfe; }
.aiw-head { display: flex; align-items: baseline; justify-content: space-between; }
.aiw-title { font-size: 13px; font-weight: 700; }
.aiw-count { font-size: 22px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.aiw-sub { font-size: 11.5px; color: var(--text-light); margin: 4px 0 8px; line-height: 1.5; }
.aiw-list { display: flex; flex-direction: column; gap: 1px; }
.aiw-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 5px 0; border-top: 1px dashed var(--border); }
.aiw-row:first-child { border-top: none; }
.aiw-id { flex: 0 0 auto; font-size: 11px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.aiw-main { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiw-due { flex: 0 0 auto; font-weight: 700; font-size: 11.5px; white-space: nowrap; }
.aiw-empty { font-size: 12px; color: var(--text-light); padding: 8px 0; text-align: center; }
.aiw-more { font-size: 11px; color: var(--text-light); margin: 8px 0 0; }
@media (max-width: 980px) { .aiw-grid { grid-template-columns: 1fr; } }

/* ===== AI 增强模块 · 排版优化（大字号 + 图标 + 折叠交互） ===== */

/* 通用图标容器：颜色跟随 currentColor */
.aip-ic, .aip-kpi-ic { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.aip-ic svg, .aip-kpi-ic svg {
    width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9;
    stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 三格指标（趋势卡顶部） ---------- */
.aip-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.aip-kpi {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: 12px;
    background: #f8fafc; border: 1px solid var(--border);
    transition: box-shadow .18s, transform .18s;
}
.aip-kpi:hover { box-shadow: 0 8px 20px -14px rgba(15, 23, 42, .35); transform: translateY(-1px); }
.aip-kpi-ic {
    width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px; font-size: 19px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #e8eefb; color: #2563eb;
}
.aip-kpi-body { min-width: 0; }
/* KPI 卡右下底纹大图标（低透明度，增强图形感不抢数据） */
.aip-kpi { position: relative; overflow: hidden; }
.aip-kpi-bg {
    position: absolute; right: -6px; bottom: -10px; pointer-events: none; opacity: .07;
}
.aip-kpi-bg svg { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: #334155; }
.aip-kpi.is-bad .aip-kpi-bg svg { color: #dc2626; opacity: 1; }
.aip-kpi.is-good .aip-kpi-bg svg { color: #16a34a; opacity: 1; }
.aip-kpi-body b {
    display: block; font-size: 23px; font-weight: 800; line-height: 1.15;
    color: var(--text); letter-spacing: -.4px; font-variant-numeric: tabular-nums;
}
.aip-kpi-body span { font-size: 12.5px; color: var(--text-secondary); }
.aip-kpi-body em { font-style: normal; display: block; font-size: 11.5px; color: var(--text-light); margin-top: 1px; }
.aip-kpi.is-bad { background: #fef2f2; border-color: #fecaca; }
.aip-kpi.is-bad .aip-kpi-ic { background: #fee2e2; color: #dc2626; }
.aip-kpi.is-bad .aip-kpi-body b { color: #b91c1c; }
.aip-kpi.is-good { background: #f0fdf4; border-color: #bbf7d0; }
.aip-kpi.is-good .aip-kpi-ic { background: #dcfce7; color: #16a34a; }
.aip-kpi.is-good .aip-kpi-body b { color: #15803d; }
.aip-kpi.is-flat .aip-kpi-ic { background: #f1f5f9; color: #64748b; }

/* ---------- 结论条 ---------- */
.aip-concl {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 13px 16px; border-radius: 12px; margin-bottom: 14px;
    background: #f8fafc; border: 1px solid var(--border);
}
.aip-concl > .aip-ic { font-size: 18px; margin-top: 1px; color: #64748b; }
.aip-concl p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--text); }
.aip-concl-main { min-width: 0; flex: 1 1 auto; }
.aip-concl-t { font-size: 14px !important; font-weight: 700; }
.aip-concl-t span { font-weight: 400; font-size: 12px; color: var(--text-light); margin-left: 8px; }
.aip-concl-s { font-size: 13px !important; color: var(--text-secondary) !important; margin-top: 3px !important; }
.aip-concl.ait-danger { background: #fef2f2; border-color: #fecaca; }
.aip-concl.ait-danger > .aip-ic { color: #dc2626; }
.aip-concl.ait-warn { background: #fffbeb; border-color: #fde68a; }
.aip-concl.ait-warn > .aip-ic { color: #f59e0b; }
.aip-concl.ait-good { background: #f0fdf4; border-color: #bbf7d0; }
.aip-concl.ait-good > .aip-ic { color: #16a34a; }
.aip-concl.ait-info { background: #f8fafc; border-color: #e2e8f0; }

/* ---------- 表格：加大字号与行高，增减用徽章 ---------- */
.ait-table { font-size: 13px; }
.ait-table th { font-size: 12px; padding: 10px 12px; }
.ait-table th span { display: block; font-size: 10.5px; margin-top: 2px; }
.ait-table td { padding: 11px 12px; font-size: 13px; }
.ait-table td.ait-dept { font-size: 13.5px; }
.ait-table td.ait-num b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ait-pill-cell { text-align: center; }
.aip-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.aip-pill svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.aip-pill.is-bad { background: #fee2e2; color: #b91c1c; }
.aip-pill.is-good { background: #dcfce7; color: #15803d; }
.aip-pill.is-flat { background: #f1f5f9; color: #64748b; }
.ait-blank { text-align: center; color: var(--text-light); padding: 24px 0; font-size: 13px; }
.ait-na { display: inline-block; font-size: 13px; color: var(--text-light); }
/* 趋势表行：可点击跳台账 */
.ait-row { cursor: pointer; transition: background .12s ease; }
.ait-row:hover td { background: #eff6ff; }
.ait-row:hover td.ait-dept { color: #1d4ed8; font-weight: 700; }
.ait-zero-row { cursor: pointer; }
.ait-zero-row td {
    text-align: center; font-size: 12.5px; color: var(--text-light);
    background: #fafbfd; border-top: 1px dashed var(--border);
}
.ait-zero-row:hover td { color: var(--text-secondary); background: #f1f5f9; }

/* ---------- 趋势紧凑排名条（bars 视图） ---------- */
.ait-bars { display: flex; flex-direction: column; gap: 3px; }
.ait-bar-row {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px; border-radius: 8px; cursor: pointer;
    transition: background .12s ease;
}
.ait-bar-row:hover { background: #eff6ff; }
.ait-bar-row:hover .ait-bar-name { color: #1d4ed8; font-weight: 700; }
.ait-bar-name {
    flex: 0 0 96px; font-size: 13px; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ait-bar-track {
    flex: 1 1 auto; height: 13px; border-radius: 4px;
    background: #f1f5f9; position: relative; min-width: 40px; overflow: hidden;
}
.ait-bar-track i {
    display: block; height: 100%; border-radius: 4px; min-width: 2px;
    transition: width .45s ease;
}
.ait-bar-track i.is-good { background: linear-gradient(90deg, #86efac, #22c55e); }
.ait-bar-track i.is-bad { background: linear-gradient(90deg, #fca5a5, #dc2626); }
.ait-bar-track i.is-flat { background: linear-gradient(90deg, #cbd5e1, #94a3b8); }
.ait-bar-num {
    flex: 0 0 26px; text-align: right; font-size: 14px; font-weight: 800; color: var(--text);
    font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace;
}
.ait-bar-pills { flex: 0 0 auto; display: inline-flex; gap: 5px; }
.ait-bar-pills .aip-pill { transform: scale(.92); transform-origin: right center; }
.ait-bar-zero {
    padding: 5px 8px; text-align: center; font-size: 12.5px; color: var(--text-light);
    background: #fafbfd; border-top: 1px dashed var(--border); border-radius: 6px;
    cursor: pointer;
}
.ait-bar-zero:hover { color: var(--text-secondary); background: #f1f5f9; }
.ait-bar-zero.is-blank { cursor: default; border-top: none; }
.ait-bar-total {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 8px 2px; margin-top: 2px; border-top: 1px solid var(--border); cursor: pointer;
}
.ait-bar-total .ait-bar-name { font-weight: 700; }
.ait-bar-total .ait-bar-num { color: #1d4ed8; }
.ait-bar-total:hover { background: #eff6ff; border-radius: 8px; }

/* ---------- 分区小标题 + 分段切换 ---------- */
.aip-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; flex-wrap: wrap; }
.aip-bar-title { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text); }
.aip-bar-title .aip-ic { font-size: 15px; color: var(--text-light); }
.aip-bar-right { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.aip-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: #f1f5f9; border: 1px solid var(--border); }
.aip-seg button {
    border: none; background: transparent; cursor: pointer; font-family: inherit;
    padding: 4px 11px; border-radius: 7px; font-size: 12.5px; color: var(--text-secondary);
}
.aip-seg button:hover { color: var(--text); }
.aip-seg button.active { background: #fff; color: #1d4ed8; font-weight: 700; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.aip-sec-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text); margin: 6px 0 9px; }
.aip-sec-h .aip-ic { font-size: 15px; color: var(--text-light); }
.aip-sec-h span { font-weight: 400; font-size: 11.5px; color: var(--text-light); }
.aip-link-btn {
    margin-left: auto; border: none; background: transparent; cursor: pointer; font-family: inherit;
    color: #2563eb; font-size: 12px; padding: 3px 8px; border-radius: 6px;
}
.aip-link-btn:hover { background: #eff6ff; }

/* ---------- 统计口径：默认收起 ---------- */
.aip-note { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 8px; }
.aip-note summary {
    display: inline-flex; align-items: center; gap: 5px;
    cursor: pointer; font-size: 12px; color: var(--text-light); list-style: none;
}
.aip-note summary::-webkit-details-marker { display: none; }
.aip-note summary svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.aip-note summary::after { content: "展开 ▾"; font-size: 11px; color: #94a3b8; }
.aip-note[open] summary::after { content: "收起 ▴"; }
.aip-note summary:hover { color: var(--text-secondary); }
.aip-note p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--text-secondary); }

/* ---------- 反弹率：环形 + 迷你指标 + 建议动作 ---------- */
.aip-rate-wrap { display: flex; gap: 20px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.aip-rate {
    width: 124px; height: 124px; flex: 0 0 124px; border-radius: 50%; position: relative;
    display: flex; align-items: center; justify-content: center;
    background: conic-gradient(var(--col) calc(var(--pct) * 1%), #e9eef6 0);
}
.aip-rate::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; }
/* 环上 5% 一档刻度线 */
.aip-rate::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: 1;
    background: repeating-conic-gradient(rgba(15, 23, 42, .16) 0deg .9deg, transparent .9deg 18deg);
    pointer-events: none;
}
.aip-rate-in { position: relative; z-index: 1; text-align: center; }
.aip-rate-in b { display: block; font-size: 27px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.aip-rate-in b small { font-size: 13px; margin-left: 1px; }
.aip-rate-in span { font-size: 11px; color: var(--text-secondary); }
.aip-rate-side { flex: 1 1 320px; min-width: 0; }
.aip-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.aip-mini { padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--border); text-align: center; }
.aip-mini b { display: block; font-size: 20px; font-weight: 800; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; }
.aip-mini span { font-size: 11.5px; color: var(--text-secondary); }
.aip-mini.is-bad { background: #fef2f2; border-color: #fecaca; }
.aip-mini.is-bad b { color: #b91c1c; }
.aip-rate-side .aip-concl { margin-bottom: 0; }
.aip-acts {
    border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px;
    background: linear-gradient(180deg, #f8fafc, #fff); margin-bottom: 14px;
}
.aip-acts-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.aip-acts-h .aip-ic { font-size: 15px; color: #7c3aed; }
.aip-acts-list { margin: 0; padding-left: 1.25em; font-size: 13px; line-height: 1.8; color: var(--text-secondary); }
.aip-acts-list li { margin-bottom: 5px; }
.aip-acts-list li:last-child { margin-bottom: 0; }

/* 反弹明细行：加大字号与点击反馈 */
.air-row { font-size: 13px; padding: 9px 10px; cursor: pointer; }
.air-row:hover { background: #f1f5f9; }
.air-hot-chip { font-size: 12.5px; }
.air-list .ai-empty { display: flex; align-items: center; justify-content: center; gap: 6px; }
.air-list .ai-empty .aip-ic { font-size: 15px; color: #16a34a; }

/* ---------- 预警三档卡片：图标 + 可折叠 ---------- */
.aiw-card { padding: 0; border-radius: 12px; overflow: hidden; }
.aiw-head {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; cursor: pointer; user-select: none;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}
.aiw-head:hover { background: rgba(255, 255, 255, .55); }
.aiw-ic { font-size: 17px; flex: 0 0 auto; display: inline-flex; }
.aiw-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.aiw-head-main { flex: 1 1 auto; min-width: 0; }
.aiw-title { font-size: 13.5px; font-weight: 700; margin: 0; line-height: 1.3; }
.aiw-sub { font-size: 11.5px; color: var(--text-light); }
.aiw-count { font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
/* 逾期数 > 0 时数字呼吸提醒 */
.aiw-count.is-hot { animation: aiwPulse 1.8s ease-in-out infinite; }
@keyframes aiwPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.14); opacity: .75; }
}
@media (prefers-reduced-motion: reduce) { .aiw-count.is-hot { animation: none; } }
.aiw-caret {
    width: 0; height: 0; flex: 0 0 auto; color: #94a3b8;
    border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor;
    transition: transform .2s;
}
.aiw-card.is-folded .aiw-caret { transform: rotate(-90deg); }
.aiw-card.is-folded .aiw-list,
.aiw-card.is-folded .aiw-more { display: none; }
.aiw-list { padding: 4px 14px 10px; }
.aiw-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; padding: 8px 6px; border-radius: 6px; cursor: pointer;
    border-top: 1px dashed var(--border);
}
.aiw-row:first-child { border-top: none; }
.aiw-row:hover { background: rgba(37, 99, 235, .06); }
.aiw-empty {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    font-size: 12.5px; color: var(--text-light); padding: 14px 0;
}
.aiw-empty .aip-ic { font-size: 14px; color: #16a34a; }
.aiw-more { font-size: 11.5px; color: var(--text-light); margin: 6px 0 0; padding: 0 14px 12px; }

@media (max-width: 980px) {
    .aip-kpis { grid-template-columns: 1fr; }
    .aip-rate-wrap { flex-direction: column; align-items: stretch; }
    .aip-rate { align-self: center; }
}


/* ==================== 风险分级管控（风险点台账） ==================== */
.risk-stats-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.risk-stat { padding: 18px 20px; border-left-width: 4px; }
.risk-stat .stat-body { width: 100%; }
.risk-stat .stat-label { font-size: 12.5px; }
.risk-stat .stat-value { font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.risk-stat-sub { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
.risk-stat-all { border-left-color: #2563eb; }
.risk-stat-all .stat-value { color: #1d4ed8; }
.risk-stat-red { border-left-color: #dc2626; }
.risk-stat-red .stat-value { color: #b91c1c; }
.risk-stat-orange { border-left-color: #ea580c; }
.risk-stat-orange .stat-value { color: #c2410c; }
.risk-stat-safe { border-left-color: #16a34a; }
.risk-stat-safe .stat-value { color: #15803d; }

.risk-card { margin-bottom: 20px; }
.risk-tag { font-size: 11.5px; font-weight: 500; color: var(--text-light); background: #f1f5f9; border-radius: 999px; padding: 2px 9px; margin-left: 6px; }
.risk-head-hint { font-size: 11.5px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.risk-head-ops { display: flex; gap: 8px; align-items: center; }

/* 四色分布 */
.risk-bar-wrap { margin-bottom: 18px; }
.risk-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #f1f5f9; }
.risk-seg { display: block; height: 100%; transition: width .3s ease; }
.risk-seg.risk-red { background: #dc2626; }
.risk-seg.risk-orange { background: #ea580c; }
.risk-seg.risk-yellow { background: #f0b429; }
.risk-seg.risk-blue { background: #2563eb; }
.risk-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.risk-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); }
.risk-legend-item b { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.risk-legend-item em { font-style: normal; font-size: 11.5px; color: var(--text-light); }
.risk-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.risk-dot.risk-red { background: #dc2626; }
.risk-dot.risk-orange { background: #ea580c; }
.risk-dot.risk-yellow { background: #f0b429; }
.risk-dot.risk-blue { background: #2563eb; }

/* 按车间分布 */
.risk-dept-list { display: flex; flex-direction: column; gap: 8px; }
.risk-dept-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; }
.risk-dept-name { font-size: 12.5px; color: var(--text); font-weight: 600; }
.risk-dept-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #f1f5f9; }
.risk-dept-num { font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.risk-dept-num em { font-style: normal; font-size: 11px; color: var(--text-light); }
.risk-flag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.risk-flag.risk-red { background: #fee2e2; color: #b91c1c; }
.risk-flag.risk-orange { background: #ffedd5; color: #c2410c; }

/* 筛选栏 */
.risk-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.risk-filters .form-input { min-width: 140px; max-width: 220px; height: 36px; font-size: 13px; }
.risk-filters .form-input[placeholder] { flex: 1; min-width: 200px; }
.risk-count { margin-left: auto; font-size: 12.5px; color: var(--text-light); }

/* 台账表格 */
.risk-table-wrap { overflow-x: auto; }
.risk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.risk-table th {
    background: #f8fafc; text-align: left; font-size: 12px; font-weight: 600; color: var(--text-secondary);
    padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.risk-table td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; color: var(--text-secondary); vertical-align: middle; }
.risk-table tbody tr:hover { background: #f8fafc; }
.risk-name-cell { max-width: 300px; }
.risk-name-cell b { display: block; font-size: 13.5px; color: var(--text); }
.risk-hazards { display: block; font-size: 11.5px; color: var(--text-light); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.risk-d-cell b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }

.risk-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.risk-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.risk-badge.risk-red { background: #fee2e2; color: #b91c1c; }
.risk-badge.risk-orange { background: #ffedd5; color: #c2410c; }
.risk-badge.risk-yellow { background: #fef3c7; color: #a16207; }
.risk-badge.risk-blue { background: #dbeafe; color: #1d4ed8; }

.risk-ops { white-space: nowrap; }
.risk-op {
    border: 1px solid var(--border); background: #fff; color: var(--text-secondary);
    font-family: inherit; font-size: 12px; padding: 3px 9px; border-radius: 7px; cursor: pointer; margin-right: 4px;
}
.risk-op:hover { background: #f1f5f9; color: var(--text); }
.risk-op.is-primary { border-color: #bfdbfe; color: #1d4ed8; background: #eff6ff; }
.risk-op.is-primary:hover { background: #dbeafe; }
.risk-op.is-danger { border-color: #fecaca; color: #b91c1c; }
.risk-op.is-danger:hover { background: #fee2e2; }
.risk-empty { text-align: center; color: var(--text-light); padding: 28px 0; font-size: 13px; }

/* 表单：LEC 评价区 */
.risk-lec { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; }
.risk-lec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.risk-lec-title { font-size: 13px; font-weight: 700; color: var(--text); }
.risk-lec-preview { font-size: 13px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.risk-lec-preview b { font-size: 17px; }
.risk-lec-preview em { display: block; font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--text-light); margin-top: 2px; }
.risk-lec-preview.risk-red { color: #b91c1c; }
.risk-lec-preview.risk-orange { color: #c2410c; }
.risk-lec-preview.risk-yellow { color: #a16207; }
.risk-lec-preview.risk-blue { color: #1d4ed8; }
.risk-lec-row { margin-bottom: 0; }

/* 详情 */
.risk-view-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.risk-view-head b { display: block; font-size: 15px; color: var(--text); }
.risk-view-head span { font-size: 12px; color: var(--text-light); }
.risk-view-d { margin-left: auto; font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.risk-view-d em { display: block; font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--text-light); }
.risk-view-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.risk-view-grid label { display: block; font-size: 11.5px; color: var(--text-light); margin-bottom: 3px; }
.risk-view-grid p { font-size: 13px; color: var(--text); line-height: 1.65; }

/* ==================== 月度报表（科技感版式） ==================== */
.rpt-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rpt-quick { display: inline-flex; gap: 2px; padding: 2px; background: #f1f5f9; border-radius: 9px; }
.rpt-quick .dash-range-btn { padding: 4px 12px; font-size: 12px; border-radius: 7px; }

/* 进入动效 */
.rpt { opacity: 0; transform: translateY(8px); transition: opacity .34s ease, transform .34s ease; }
.rpt.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .rpt { opacity: 1; transform: none; transition: none; }
}

/* 顶部：深色渐变头条 + 完成率环 */
.rpt-hero {
    display: flex; align-items: center; gap: 18px;
    padding: 16px 20px; border-radius: 14px; color: #fff; position: relative; overflow: hidden;
    background: linear-gradient(118deg, #0f172a 0%, #1e3a8a 52%, #2563eb 100%);
}
.rpt-hero::after {
    content: ''; position: absolute; right: -50px; top: -70px; width: 230px; height: 230px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 66%);
}
.rpt-hero-txt { flex: 1; min-width: 0; position: relative; z-index: 1; }
.rpt-hero-month { font-size: 11.5px; letter-spacing: .14em; color: #b9cdfb; font-variant-numeric: tabular-nums; }
.rpt-hero-txt h4 { font-size: 19px; font-weight: 700; margin: 5px 0 6px; letter-spacing: .01em; }
.rpt-hero-txt p { font-size: 12.5px; color: #d3e0ff; font-variant-numeric: tabular-nums; }
.rpt-ring {
    width: 94px; height: 94px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; position: relative; z-index: 1;
    background: conic-gradient(#2563eb 0 100%);
}
.rpt-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #14295c; }
.rpt-ring b { position: relative; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: -8px; }
.rpt-ring b i { font-size: 11px; font-style: normal; font-weight: 500; opacity: .8; }
.rpt-ring em { position: absolute; bottom: 17px; font-style: normal; font-size: 9.5px; color: #b3c6f0; letter-spacing: .02em; }

/* 指标矩阵 */
.rpt-mx { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.rpt-cell {
    display: flex; gap: 10px; padding: 12px 14px 11px; align-items: flex-start;
    border: 1px solid var(--border); border-radius: 12px; background: #fff;
    position: relative; overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.rpt-cell::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc); }
.rpt-cell:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15, 23, 42, .08); border-color: #dbe3ef; }
.rpt-cell-ic {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
    display: grid; place-items: center; color: var(--tc); background: var(--tbg);
}
.rpt-cell-ic svg { width: 17px; height: 17px; }
.rpt-cell-body { min-width: 0; display: flex; flex-direction: column; }
.rpt-cell-label { font-size: 11.5px; color: var(--text-light); }
.rpt-cell-val { display: flex; align-items: baseline; gap: 2px; margin: 2px 0 1px; }
.rpt-cell-val .rpt-num {
    font-size: 24px; font-weight: 700; line-height: 1.06; color: var(--tc);
    font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.rpt-cell-val i { font-style: normal; font-size: 11.5px; color: var(--text-light); }
.rpt-cell-sub { font-size: 11px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpt-num.is-na { color: var(--text-light) !important; }

.rpt-t-blue { --tc: #2563eb; --tbg: #eff6ff; }
.rpt-t-indigo { --tc: #4f46e5; --tbg: #eef2ff; }
.rpt-t-violet { --tc: #7c3aed; --tbg: #f5f3ff; }
.rpt-t-green { --tc: #16a34a; --tbg: #ecfdf5; }
.rpt-t-amber { --tc: #d97706; --tbg: #fffbeb; }
.rpt-t-red { --tc: #dc2626; --tbg: #fef2f2; }
.rpt-t-slate { --tc: #475569; --tbg: #f8fafc; }

/* 两个分区 */
.rpt-secs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.rpt-sec { border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px 14px; background: #fff; }
.rpt-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.rpt-sec-title { position: relative; padding-left: 10px; font-size: 13px; font-weight: 700; color: var(--text); }
.rpt-sec-title::before {
    content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 2px;
    background: linear-gradient(#2563eb, #7c3aed);
}
.rpt-sec-tip { font-size: 11.5px; color: var(--text-light); }

/* 类别分布条 */
.rpt-cats { display: flex; flex-direction: column; gap: 7px; }
.rpt-cat-row { display: grid; grid-template-columns: 96px 1fr 74px; gap: 10px; align-items: center; }
.rpt-cat-name { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpt-cat-track { height: 8px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.rpt-cat-fill { display: block; height: 100%; border-radius: 999px; animation: rpt-grow .55s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes rpt-grow { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
.rpt-cat-num { text-align: right; font-size: 11.5px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.rpt-cat-num b { font-size: 13px; color: var(--text); }
.rpt-cat-num i { font-style: normal; margin-left: 5px; }

/* 未闭环胶囊 */
.rpt-chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.rpt-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px;
    border: 1px solid var(--border); border-radius: 999px; background: #f8fafc;
    font-family: inherit; font-size: 11.5px; cursor: pointer;
    transition: transform .16s, box-shadow .16s, border-color .16s;
}
.rpt-chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.rpt-chip b { font-size: 11.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.rpt-chip em { font-style: normal; color: var(--text-secondary); max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpt-chip u { text-decoration: none; font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--border); }
.rpt-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15, 23, 42, .1); }
.rpt-chip.is-copied { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .12); }
.rpt-chip-rest { display: contents; }
.rpt-chip-rest[hidden] { display: none; }
.rpt-chip.is-todo { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.rpt-chip.is-doing { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.rpt-chip.is-wait { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.rpt-chip.is-appr { color: #7c3aed; background: #f5f3ff; border-color: #ddd6fe; }
.rpt-chip.is-accept { color: #475569; background: #f8fafc; border-color: #e2e8f0; }
.rpt-more {
    border: none; background: transparent; color: #1d4ed8; font-family: inherit;
    font-size: 11.5px; cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.rpt-more:hover { background: #eff6ff; }
.rpt-more.is-open { color: var(--text-light); }

.rpt-empty { font-size: 12px; color: var(--text-light); padding: 10px 0; }
.rpt-empty-ok { color: #15803d; }
.rpt-foot { font-size: 11px; color: var(--text-light); padding-top: 10px; border-top: 1px dashed var(--border); }

/* 安全员考核表（科技感） */
.rpt-kpi { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); }
.rpt-kpi-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.rpt-kpi-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.rpt-kpi-badge {
    font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
    background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
}
.rpt-kpi-meta { margin-left: auto; font-size: 11.5px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.rpt-kpi-meta b { color: var(--text); }
.rpt-kpi-meta b.is-alert { color: #dc2626; }

.rpt-kt-wrap { overflow: auto; max-height: 460px; border: 1px solid var(--border); border-radius: 12px; }
.rpt-kt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.rpt-kt thead th {
    position: sticky; top: 0; z-index: 2;
    background: linear-gradient(#f8fafc, #eef2f7);
    color: var(--text-secondary); font-size: 11.5px; font-weight: 700; text-align: left;
    padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.rpt-kt thead th i { font-style: normal; font-weight: 500; color: var(--text-light); margin-left: 2px; }
.rpt-kt th.is-num, .rpt-kt td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.rpt-kt tbody td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; color: var(--text-secondary); white-space: nowrap; }
.rpt-kt tbody tr:last-child td { border-bottom: none; }
.rpt-kt tbody tr { transition: background .15s; }
.rpt-kt tbody tr:hover { background: #f8fafc; }
.rpt-kt td.is-num i { font-style: normal; font-size: 10.5px; color: var(--text-light); margin-left: 1px; }
.rpt-kt td.is-na { color: var(--text-light); }
.rpt-kt td.is-alert { color: #dc2626; font-weight: 700; }
.rpt-kt th.c-rank, .rpt-kt td.c-rank { text-align: center; width: 58px; }
.rpt-kt th.c-grade, .rpt-kt td.c-grade { text-align: center; width: 78px; }

.rpt-medal { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11.5px; font-weight: 700; color: #fff; }
.rpt-medal.m1 { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 0 0 2px #fef3c7; }
.rpt-medal.m2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); box-shadow: 0 0 0 2px #f1f5f9; }
.rpt-medal.m3 { background: linear-gradient(135deg, #d8a373, #b45309); box-shadow: 0 0 0 2px #fdf2e9; }
.rpt-rank { display: inline-block; min-width: 22px; text-align: center; font-size: 12px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.rpt-name { font-weight: 600; color: var(--text); }
.rpt-dept { color: var(--text-light); font-size: 11.5px; }
.rpt-score { font-size: 14px; font-variant-numeric: tabular-nums; }
.rpt-od { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #fee2e2; color: #b91c1c; font-weight: 700; font-size: 11.5px; }
.rpt-od.is-zero { background: transparent; color: #cbd5e1; font-weight: 500; }
.rpt-gd {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; color: var(--gc);
    background: #f8fafc; background: color-mix(in srgb, var(--gc) 12%, #fff);
}

@media (max-width: 1280px) {
    .rpt-mx { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rpt-secs { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .rpt-mx { grid-template-columns: 1fr; }
    .rpt-hero { flex-direction: column; align-items: flex-start; }
    .rpt-cat-row { grid-template-columns: 80px 1fr 62px; }
}
