/* 首页模块统一样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f5f5; color: #333; }

/* ========== 监管看板 ========== */
.dashboard { padding: 0; }

/* 筛选条 */
.filter-bar { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 12px 20px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.filter-left { display: flex; align-items: center; gap: 12px; }
.filter-left label { font-size: 13px; color: #666; }
.filter-left select { border: 1px solid #d0d0d0; border-radius: 4px; padding: 5px 10px; font-size: 13px; color: #333; outline: none; }
.filter-left select:focus { border-color: #1a56db; }
.time-btns { display: flex; gap: 4px; }
.time-btn { padding: 4px 12px; font-size: 12px; border: 1px solid #d0d0d0; border-radius: 4px; cursor: pointer; color: #666; background: #fff; }
.time-btn.active { background: #1a56db; color: #fff; border-color: #1a56db; }
.time-btn:hover:not(.active) { border-color: #1a56db; color: #1a56db; }
.filter-right { display: flex; align-items: center; gap: 12px; }
.refresh-btn { padding: 5px 14px; font-size: 13px; border: 1px solid #d0d0d0; border-radius: 4px; cursor: pointer; background: #fff; color: #555; }
.refresh-btn:hover { border-color: #1a56db; color: #1a56db; }
.update-time { font-size: 12px; color: #999; }
.custom-date-row { display: none; align-items: center; gap: 8px; margin-top: 8px; }
.custom-date-row.show { display: flex; }
.custom-date-row input[type="date"] { border: 1px solid #d0d0d0; border-radius: 4px; padding: 4px 8px; font-size: 12px; color: #333; }
.custom-date-row .btn-apply { padding: 4px 12px; font-size: 12px; background: #1a56db; color: #fff; border: none; border-radius: 4px; cursor: pointer; }

/* 指标卡片行 */
.card-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.metric-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 18px 20px; cursor: pointer; transition: box-shadow 0.2s, border-color 0.2s; position: relative; }
.metric-card:hover { box-shadow: 0 2px 12px rgba(26,86,219,0.1); border-color: #1a56db; }
.metric-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.metric-icon { font-size: 18px; }
.metric-title { font-size: 14px; color: #666; }
.metric-value { font-size: 32px; font-weight: bold; color: #333; margin-bottom: 8px; }
.metric-value.alert { color: #e74c3c; }
.metric-sub { font-size: 12px; color: #888; display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.metric-tag { padding: 2px 8px; border-radius: 3px; font-size: 11px; }
.tag-green { background: #e8f5e9; color: #2e7d32; }
.tag-orange { background: #fff3e0; color: #e65100; }
.tag-blue { background: #e3f2fd; color: #1565c0; }
.metric-change { font-size: 12px; color: #888; }
.metric-change.up { color: #2e7d32; }
.metric-change.down { color: #e74c3c; }
.alert-text { color: #e74c3c !important; }
.alert-card { border-left: 3px solid #e74c3c; }
.progress-bar { height: 4px; background: #e8e8e8; border-radius: 2px; margin-top: 8px; }
.progress-fill { height: 100%; background: #1a56db; border-radius: 2px; transition: width 0.5s; }
.metric-tooltip { display: none; position: absolute; top: 100%; left: 0; background: #333; color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 4px; z-index: 10; white-space: nowrap; margin-top: 4px; }
.metric-card:hover .metric-tooltip { display: block; }

/* 中间行 */
.mid-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* 面板通用 */
.panel { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.panel-header { padding: 14px 20px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.panel-title { font-size: 15px; font-weight: bold; color: #333; }
.panel-subtitle { font-size: 12px; color: #999; }
.panel-badge { background: #e74c3c; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.panel-actions { display: flex; gap: 4px; }
.view-toggle { padding: 3px 10px; font-size: 12px; border: 1px solid #d0d0d0; border-radius: 3px; cursor: pointer; color: #666; background: #fff; }
.view-toggle.active { background: #1a56db; color: #fff; border-color: #1a56db; }
.panel-body { padding: 16px 20px; }

/* 高德地图容器 */
.amap-container { width: 100%; height: 320px; border-radius: 6px; overflow: hidden; border: 1px solid #e0e0e0; }
.amap-logo, .amap-copyright { display: none !important; }

/* 地图标记自定义 */
.map-marker-label { padding: 4px 10px; border-radius: 4px; font-size: 12px; color: #fff; white-space: nowrap; font-weight: bold; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.map-marker-label.high { background: #e74c3c; }
.map-marker-label.mid { background: #f39c12; }
.map-marker-label.low { background: #2ecc71; }
.map-marker-label .marker-count { font-size: 16px; margin-right: 2px; }
.map-marker-label .marker-name { font-size: 11px; opacity: 0.9; }

/* 地图信息窗体 */
.amap-info-content { font-family: "Microsoft YaHei","PingFang SC",sans-serif; padding: 4px; }
.map-info-title { font-size: 14px; font-weight: bold; color: #333; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #f0f0f0; }
.map-info-row { display: flex; justify-content: space-between; font-size: 12px; color: #666; padding: 3px 0; }
.map-info-row .info-val { font-weight: bold; color: #333; }
.map-info-row .info-val.alert { color: #e74c3c; }
.map-info-action { margin-top: 8px; text-align: center; }
.map-info-action a { color: #1a56db; font-size: 12px; text-decoration: none; cursor: pointer; }
.map-info-action a:hover { text-decoration: underline; }

/* 地图图例 */
.map-legend { display: flex; gap: 16px; margin-top: 12px; justify-content: center; }
.legend-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #888; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-high { background: #e74c3c; box-shadow: 0 0 6px rgba(231,76,60,0.4); }
.dot-mid { background: #f39c12; box-shadow: 0 0 6px rgba(243,156,18,0.4); }
.dot-low { background: #2ecc71; box-shadow: 0 0 6px rgba(46,204,113,0.4); }
.hidden { display: none !important; }

/* 列表视图 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: #f8f8f8; padding: 8px 12px; text-align: left; color: #666; border-bottom: 1px solid #e0e0e0; font-weight: normal; }
.data-table td { padding: 8px 12px; border-bottom: 1px solid #f0f0f0; color: #333; }
.data-table tr:hover td { background: #f0f4ff; }
.data-table td.clickable { color: #1a56db; cursor: pointer; text-decoration: underline; }

/* 问题类型图表 */
.chart-area { display: flex; align-items: center; gap: 20px; }
.pie-chart { flex-shrink: 0; }
.donut { width: 160px; height: 160px; }
.pie-center-num { font-size: 24px; font-weight: bold; fill: #333; }
.pie-center-label { font-size: 11px; fill: #999; }
.chart-legend { flex: 1; }
.legend-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.legend-row:hover { background: #f8f9ff; }
.legend-color { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }
.legend-text { flex: 1; color: #555; }
.legend-val { font-weight: bold; color: #333; width: 36px; text-align: right; }
.legend-change { font-size: 11px; width: 32px; text-align: right; }
.legend-change.up { color: #e74c3c; }
.legend-change.down { color: #2e7d32; }
.severity-row { display: flex; gap: 10px; margin-top: 12px; }
.severity-tag { padding: 3px 10px; border-radius: 3px; font-size: 12px; cursor: pointer; }
.severity-tag:hover { opacity: 0.8; }
.sev-serious { background: #fde8e8; color: #c0392b; }
.sev-heavy { background: #fef3e2; color: #d35400; }
.sev-normal { background: #e8f5e9; color: #27ae60; }

/* 下半行 */
.bottom-row { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }

/* 趋势图 */
.trend-chart { display: flex; height: 160px; }
.trend-y-axis { display: flex; flex-direction: column; justify-content: space-between; padding-right: 8px; font-size: 11px; color: #999; min-width: 36px; text-align: right; }
.trend-area { flex: 1; position: relative; }
.trend-grid { position: absolute; top: 0; left: 0; right: 0; bottom: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.grid-line { border-bottom: 1px dashed #e8e8e8; flex: 1; }
.trend-svg { position: absolute; top: 0; left: 0; width: 100%; height: calc(100% - 24px); }
.trend-x-labels { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 10px; color: #999; }
.trend-summary { display: flex; gap: 20px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.trend-stat { display: flex; flex-direction: column; cursor: pointer; }
.trend-stat:hover .stat-val { color: #1a56db; }
.stat-label { font-size: 12px; color: #999; }
.stat-val { font-size: 16px; font-weight: bold; color: #333; }

/* 重点企业预警 */
.warning-list { display: flex; flex-direction: column; gap: 8px; }
.warning-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #f0f0f0; border-radius: 6px; cursor: pointer; transition: background 0.2s; }
.warning-item:hover { background: #f8f9ff; border-color: #d0d8f0; }
.warning-type { padding: 3px 8px; border-radius: 3px; font-size: 11px; white-space: nowrap; flex-shrink: 0; }
.type-complaint { background: #fde8e8; color: #c0392b; }
.type-rectify { background: #fef3e2; color: #d35400; }
.type-credit { background: #e8f0fe; color: #1a56db; }
.type-qualify { background: #fff3e0; color: #e65100; }
.warning-info { flex: 1; }
.warning-name { font-size: 14px; color: #333; font-weight: 500; }
.warning-detail { font-size: 12px; color: #888; margin-top: 2px; }
.warning-arrow { font-size: 18px; color: #ccc; }

/* ========== 消息中心 ========== */
.message-center { padding: 0; }

/* 工具栏 */
.msg-toolbar { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 12px 20px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.toolbar-left { display: flex; gap: 4px; flex-wrap: wrap; }
.msg-type-filter { padding: 5px 14px; font-size: 12px; border: 1px solid #d0d0d0; border-radius: 4px; cursor: pointer; color: #666; background: #fff; transition: all 0.2s; }
.msg-type-filter.active { background: #1a56db; color: #fff; border-color: #1a56db; }
.msg-type-filter:hover:not(.active) { border-color: #1a56db; color: #1a56db; }
.toolbar-right { display: flex; gap: 8px; }
.btn-text { border: none; background: none; color: #1a56db; font-size: 13px; cursor: pointer; padding: 4px 8px; }
.btn-text:hover { text-decoration: underline; }

/* 未读统计 */
.unread-summary { background: #e8f0fe; border: 1px solid #d0d8f0; border-radius: 6px; padding: 10px 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.unread-icon { font-size: 16px; }
.unread-text { font-size: 13px; color: #1a56db; }
.unread-text b { font-size: 16px; }

/* 消息列表 */
.msg-list { display: flex; flex-direction: column; gap: 6px; }
.msg-item { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 14px 18px; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; transition: all 0.2s; }
.msg-item:hover { border-color: #1a56db; box-shadow: 0 2px 8px rgba(26,86,219,0.08); }
.msg-item.unread { border-left: 3px solid #1a56db; background: #f8faff; }
.msg-dot { width: 8px; height: 8px; border-radius: 50%; background: #1a56db; flex-shrink: 0; margin-top: 6px; }
.msg-type-icon { padding: 3px 8px; border-radius: 3px; font-size: 11px; white-space: nowrap; flex-shrink: 0; margin-top: 2px; }
.type-audit { background: #e3f2fd; color: #1565c0; }
.type-rectify { background: #fde8e8; color: #c0392b; }
.type-complaint { background: #fff3e0; color: #e65100; }
.type-task { background: #e8f5e9; color: #2e7d32; }
.type-qualify { background: #fce4ec; color: #c62828; }
.type-system { background: #f3e5f5; color: #7b1fa2; }
.msg-content { flex: 1; min-width: 0; }
.msg-title { font-size: 14px; color: #333; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item.unread .msg-title { font-weight: bold; }
.msg-desc { font-size: 12px; color: #888; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg-time { font-size: 11px; color: #bbb; margin-top: 4px; }
.msg-action { color: #1a56db; font-size: 14px; flex-shrink: 0; margin-top: 4px; }
.msg-check { width: 16px; height: 16px; border: 1px solid #d0d0d0; border-radius: 3px; flex-shrink: 0; margin-top: 4px; cursor: pointer; accent-color: #1a56db; }

/* 分页 */
.msg-pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 10px 0; }
.page-info { font-size: 12px; color: #999; }
.page-btns { display: flex; gap: 4px; }
.page-btn { padding: 4px 10px; font-size: 12px; border: 1px solid #d0d0d0; border-radius: 3px; cursor: pointer; color: #666; background: #fff; }
.page-btn.active { background: #1a56db; color: #fff; border-color: #1a56db; }
.page-btn.disabled { color: #ccc; cursor: not-allowed; }
.page-btn:hover:not(.active):not(.disabled) { border-color: #1a56db; color: #1a56db; }

/* 消息详情弹窗 */
.msg-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 100; }
.msg-modal-overlay.show { display: flex; align-items: center; justify-content: center; }
.msg-modal { background: #fff; border-radius: 8px; width: 520px; max-height: 80vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.msg-modal-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.msg-modal-title { font-size: 16px; font-weight: bold; color: #333; }
.msg-modal-close { font-size: 20px; color: #999; cursor: pointer; border: none; background: none; }
.msg-modal-close:hover { color: #333; }
.msg-modal-body { padding: 20px; }
.msg-modal-meta { display: flex; gap: 12px; margin-bottom: 12px; font-size: 12px; color: #999; }
.msg-modal-content { font-size: 14px; color: #333; line-height: 1.8; }
.msg-modal-footer { padding: 12px 20px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 8px; }
.btn-primary { padding: 6px 20px; font-size: 13px; background: #1a56db; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.btn-primary:hover { background: #1446b8; }
.btn-secondary { padding: 6px 20px; font-size: 13px; background: #fff; color: #666; border: 1px solid #d0d0d0; border-radius: 4px; cursor: pointer; }
.btn-secondary:hover { border-color: #1a56db; color: #1a56db; }

/* ========== 快捷待办 ========== */
.todo-center { padding: 0; }

/* 统计栏 */
.todo-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.todo-stat-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 14px 16px; text-align: center; cursor: pointer; transition: all 0.2s; }
.todo-stat-card:hover { border-color: #1a56db; box-shadow: 0 2px 8px rgba(26,86,219,0.08); }
.todo-stat-card.active { border-color: #1a56db; background: #f0f4ff; }
.todo-stat-card .stat-num { font-size: 28px; font-weight: bold; color: #333; }
.todo-stat-card .stat-label { font-size: 12px; color: #999; margin-top: 4px; }
.todo-stat-card.stat-urgent { border-left: 3px solid #e74c3c; }
.todo-stat-card.stat-urgent .stat-num { color: #e74c3c; }

/* 类型筛选 */
.todo-filter { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 10px 16px; margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.todo-type-btn { padding: 5px 14px; font-size: 12px; border: 1px solid #d0d0d0; border-radius: 4px; cursor: pointer; color: #666; background: #fff; transition: all 0.2s; }
.todo-type-btn i { font-style: normal; background: #e8e8e8; color: #666; padding: 1px 6px; border-radius: 8px; font-size: 11px; margin-left: 4px; }
.todo-type-btn.active { background: #1a56db; color: #fff; border-color: #1a56db; }
.todo-type-btn.active i { background: rgba(255,255,255,0.3); color: #fff; }
.todo-type-btn:hover:not(.active) { border-color: #1a56db; color: #1a56db; }
.todo-type-btn.type-overdue { border-color: #f5c6cb; color: #c0392b; }
.todo-type-btn.type-overdue i { background: #fde8e8; color: #c0392b; }
.todo-type-btn.type-overdue.active { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.todo-type-btn.type-overdue.active i { background: rgba(255,255,255,0.3); color: #fff; }

/* 待办列表 */
.todo-list { display: flex; flex-direction: column; gap: 6px; }
.todo-item { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: all 0.2s; }
.todo-item:hover { border-color: #1a56db; box-shadow: 0 2px 8px rgba(26,86,219,0.08); }
.todo-item.overdue { border-left: 3px solid #e74c3c; background: #fff8f8; }
.todo-item.done { opacity: 0.5; text-decoration: line-through; }
.todo-badge { padding: 3px 10px; border-radius: 3px; font-size: 11px; white-space: nowrap; flex-shrink: 0; }
.badge-overdue { background: #fde8e8; color: #c0392b; font-weight: bold; }
.badge-audit { background: #e3f2fd; color: #1565c0; }
.badge-dispatch { background: #e8f5e9; color: #2e7d32; }
.badge-verify { background: #fff3e0; color: #e65100; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 14px; color: #333; font-weight: 500; margin-bottom: 6px; }
.todo-item.overdue .todo-title { color: #c0392b; font-weight: bold; }
.todo-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.todo-project { font-size: 12px; color: #888; }
.todo-type-tag { padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.tag-audit { background: #e3f2fd; color: #1565c0; }
.tag-project { background: #e8f0fe; color: #1a56db; }
.tag-check { background: #e8f5e9; color: #2e7d32; }
.tag-complaint { background: #fff3e0; color: #e65100; }
.tag-rectify { background: #fef3e2; color: #d35400; }
.todo-deadline { font-size: 12px; color: #999; }
.todo-deadline.overdue-text { color: #e74c3c; font-weight: 500; }
.todo-deadline.urgent-text { color: #e74c3c; font-weight: bold; }
.todo-action { color: #1a56db; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.todo-item.overdue .todo-action { color: #c0392b; font-weight: bold; }

/* 待办确认弹窗 */
.confirm-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 100; }
.confirm-overlay.show { display: flex; align-items: center; justify-content: center; }
.confirm-box { background: #fff; border-radius: 8px; width: 400px; padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); text-align: center; }
.confirm-icon { font-size: 40px; margin-bottom: 12px; }
.confirm-title { font-size: 16px; font-weight: bold; color: #333; margin-bottom: 8px; }
.confirm-desc { font-size: 13px; color: #888; margin-bottom: 20px; line-height: 1.6; }
.confirm-btns { display: flex; justify-content: center; gap: 12px; }
