/* ==================== 页面专属样式 v4.0 - 紧凑版 ==================== */

/* ========== 顶部滚动公告栏（跑马灯样式） ========== */
.scrolling-notification-bar {
    background: linear-gradient(135deg, rgba(88,166,255,0.08), rgba(163,113,247,0.06));
    border: 1px solid rgba(88,166,255,0.15);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    overflow: hidden;
    position: relative;
}
.scroll-bar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px 6px; border-bottom: 1px solid rgba(88,166,255,0.12);
    background: rgba(13,17,23,0.3);
}
.scroll-bar-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--accent-blue); }
.scroll-bar-count {
    font-size: 10px; padding: 2px 8px; border-radius: 10px;
    background: var(--accent-blue); color: white; font-weight: 600;
}
.scroll-bar-actions { display: flex; gap: 4px; }
.scroll-ctrl-btn {
    width: 26px; height: 22px; border: none; background: transparent;
    color: var(--text-muted); cursor: pointer; border-radius: 4px; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}
.scroll-ctrl-btn:hover { background: rgba(88,166,255,0.12); color: var(--accent-blue); }
.scroll-content-wrapper {
    height: 42px; overflow: hidden; position: relative;
    padding: 0 16px;
}
.scroll-track {
    display: flex; align-items: center; gap: 2px; height: 100%;
    animation: scrollLeft 30s linear infinite;
    width: max-content;
}
.scroll-track:hover { animation-play-state: paused; }
.scroll-track.paused { animation-play-state: paused; }
@keyframes scrollLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.scroll-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 14px; margin-right: 4px;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: 20px; white-space: nowrap; flex-shrink: 0;
    transition: all 0.2s; cursor: default; height: 30px;
    box-sizing: border-box;
}
.scroll-item:hover { border-color: var(--accent-blue); background: rgba(88,166,255,0.05); }
.scroll-item-icon { font-size: 14px; flex-shrink: 0; }
.scroll-item-text { font-size: 12px; color: var(--text-primary); font-weight: 500; line-height: 1; }
.scroll-item-time { font-size: 10px; color: var(--text-muted); margin-left: 4px; }

/* 紧急/重要条目高亮 */
.scroll-item.critical { border-color: rgba(248,81,73,0.35); background: rgba(248,81,73,0.04); }
.scroll-item.critical .scroll-item-text { color: var(--accent-red); font-weight: 600; }
.scroll-item.warning { border-color: rgba(210,153,34,0.3); background: rgba(210,153,34,0.03); }
.scroll-item.warning .scroll-item-text { color: var(--accent-yellow); }
.scroll-item.announcement { border-color: rgba(88,166,255,0.25); background: rgba(88,166,255,0.03); }
.scroll-item.tip { border-color: rgba(63,185,80,0.25); background: rgba(63,185,80,0.03); }

/* ========== 热力图实时数据条（移到顶部） ========== */
.heatmap-live-data-bar {
    display: flex; align-items: stretch; justify-content: space-between;
    background: linear-gradient(90deg, rgba(63,185,80,0.06), rgba(88,166,255,0.06), rgba(210,153,34,0.06));
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
    padding: 8px 16px; margin-bottom: 12px; gap: 0;
    flex-wrap: wrap;
}
.live-data-item {
    display: flex; align-items: center; gap: 6px; padding: 0 12px;
    position: relative;
}
.live-data-icon { font-size: 16px; }
.live-data-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.live-data-value {
    font-size: 18px; font-weight: 800; font-family: 'Courier New', monospace;
    color: var(--accent-blue); min-width: 45px; text-align: right;
}
.live-data-item.live-danger .live-data-value { color: var(--accent-red); }
.live-data-value.live-clock { font-size: 13px; color: var(--accent-green); min-width: 70px; }
.live-data-divider {
    width: 1px; background: var(--border-light); margin: 4px 4px;
}

/* 热力图区域 - 放大版（地标完整显示+可缩放） */
.heatmap-section-modern.heatmap-top { margin-bottom: 16px; padding: 14px !important; }
.heatmap-canvas-modern { text-align: center; padding: 4px 0; }
.map-container-wrapper {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
}

/* 缩放控制按钮 */
.heatmap-zoom-controls {
    position: absolute; top: 8px; right: 10px; z-index: 500;
    display: flex; gap: 3px; align-items: center;
    background: rgba(13,17,23,0.88); border: 1px solid #30363d;
    border-radius: 8px; padding: 4px 6px;
}
.heatmap-zoom-controls.leaflet-control-bar { z-index: 1000; }
.zoom-btn {
    width: 28px; height: 26px;
    background: transparent; border: 1px solid transparent;
    color: #c9d1d9; font-size: 14px; font-weight: 700; line-height: 1;
    cursor: pointer; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease;
}
.zoom-btn:hover {
    background: rgba(88,166,255,0.15); border-color: #58a6ff; color: white;
}
.zoom-btn.zoom-reset:hover {
    background: rgba(210,153,34,0.15); border-color: #d29922; color: #d29922;
}
.zoom-btn:active { transform: scale(0.92); }
.zoom-level-display {
    font-size: 11px; color: #58a6ff; font-weight: 700;
    min-width: 40px; text-align: center; font-family: 'Courier New', monospace;
}

#heatmap-svg-container {
    overflow: auto !important;
    max-height: 600px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    /* 隐藏滚动条但保留功能 */
    scrollbar-width: thin; scrollbar-color: #30363d transparent;
}
#heatmap-svg-container::-webkit-scrollbar { width: 6px; height: 6px; }
#heatmap-svg-container::-webkit-scrollbar-track { background: transparent; }
#heatmap-svg-container::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }
#heatmap-svg-container::-webkit-scrollbar-thumb:hover { background: #484f58; }

.campus-map-svg {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    width: 100% !important;
    height: auto !important;
    display: block;
}

/* 悬浮提示框 */
.area-tooltip {
    position: fixed; display: none; z-index: 9998;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 10px 14px; min-width: 200px;
    box-shadow: var(--shadow-lg); font-size: 11px;
}
.tooltip-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px solid var(--border-light); }
.tooltip-header strong { font-size: 12px; }
.tooltip-type-badge { background: var(--bg-tertiary); padding: 2px 7px; border-radius: 6px; font-size: 9px; color: var(--text-muted); }
.tooltip-body { color: var(--text-secondary); }
.tooltip-row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 11px; }
.tooltip-row span:first-child { color: var(--text-muted); }
.tooltip-footer { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--border-light); color: var(--accent-blue); font-size: 10px; text-align: center; cursor: pointer; }

/* 图例 - 紧凑版 */
.heatmap-legend-enhanced {
    margin-top: 10px; padding: 10px 14px; background: rgba(88,166,255,0.04);
    border: 1px solid rgba(88,166,255,0.12); border-radius: var(--radius-sm);
}
.heatmap-legend-enhanced h4 { font-size: 12px; margin-bottom: 6px; color: var(--text-primary); }
.legend-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.legend-item-enhanced { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--text-secondary); }
.dot-legend { width: 9px; height: 9px; border-radius: 50%; }
.legend-item-enhanced.normal .dot-legend { background: #3fb950; }
.legend-item-enhanced.warning .dot-legend { background: #d29922; }
.legend-item-enhanced.danger .dot-legend { background: #f85149; }
.dot-legend.flash { animation: pulseDot 1s infinite; }
@keyframes pulseDot { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
.legend-tip-enhanced { margin-top: 6px; font-size: 10px; color: var(--text-muted); line-height: 1.4; }

/* ========== 统计卡片 - 紧凑版 ========== */
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    margin-bottom: 16px;
}
.stat-card { padding: 14px 12px; text-align: center; }
.stat-card::before { height: 2px; }
.stat-icon { font-size: 24px; margin-bottom: 4px; }
.stat-number { font-size: 26px; font-weight: 800; font-family:'Courier New',monospace; }
.stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; line-height: 1.3; }
.stat-trend { font-size: 10px; margin-top: 4px; font-weight: 600; }

/* ========== 用户中心 ========== */
.user-actions-top { margin-bottom: 18px !important; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; }
.user-actions-top .action-btn-large { height: 48px !important; font-size: 13px !important; border-radius: var(--radius-sm) !important; }
.user-profile-section-modern { margin-bottom: 20px; }
.profile-main-modern { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.avatar-section { text-align: center; }
.avatar-ring { position: relative; display: inline-block; }
.profile-avatar-large { font-size: 60px; }
.avatar-status { position: absolute; bottom: 2px; right: 2px; width: 14px; height: 14px; background: var(--accent-green); border: 2px solid var(--bg-secondary); border-radius: 50%; }
.profile-name-large { font-size: 18px; font-weight: 700; margin: 8px 0 4px; }
.user-meta-info { font-size: 12px; color: var(--text-secondary); }
.credit-score-section h3 { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.score-display-circle { width: 150px; height: 150px; margin: 0 auto 10px; position: relative; }
.score-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-progress-ring { transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.score-text-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-value-big { font-size: 36px; font-weight: 800; color: var(--text-primary); font-family: 'Courier New', monospace; line-height: 1; }
.score-max-small { font-size: 14px; color: var(--text-muted); }
.level-rank-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.user-stats-modern { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stat-modern { background: var(--bg-tertiary); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.mini-stat-modern.success { border-top: 3px solid var(--accent-green); }
.mini-stat-modern.warning { border-top: 3px solid var(--accent-red); }
.mini-stat-modern.info { border-top: 3px solid var(--accent-blue); }
.mini-icon { font-size: 24px; margin-bottom: 4px; }
.mini-value { font-size: 22px; font-weight: 800; color: var(--text-primary); font-family: 'Courier New', monospace; }
.mini-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.mini-trend { font-size: 10px; margin-top: 3px; font-weight: 600; }
.mini-trend.up { color: var(--accent-green); } .mini-trend.down { color: var(--accent-red); }
.score-history-timeline {}
.timeline-item { display: grid; grid-template-columns: 95px 1fr 52px 62px; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 4px; background: var(--bg-tertiary); border-radius: var(--radius-sm); font-size: 12px; }
.timeline-item.positive { border-left: 3px solid var(--accent-green); }
.timeline-item.negative { border-left: 3px solid var(--accent-red); }
.timeline-date { color: var(--text-muted); font-size: 11px; }
.timeline-reason { color: var(--text-primary); font-size: 12px; }
.timeline-points { font-weight: 700; text-align: center; font-size: 12px; }
.points-pos { color: var(--accent-green); } .points-neg { color: var(--accent-red); }
.timeline-balance { color: var(--text-muted); text-align: right; font-size: 11px; }
.achievements-grid-modern { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.achievement-card-modern { display: flex; gap: 10px; padding: 12px; background: var(--bg-tertiary); border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.achievement-card-modern.achieved-card { border-color: rgba(63,185,80,0.35); background: rgba(63,185,80,0.04); }
.acm-icon { font-size: 28px; flex-shrink: 0; }
.acm-info { flex: 1; min-width: 0; }
.acm-title { font-weight: 700; font-size: 13px; }
.acm-desc { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.acm-status-text { font-size: 11px; margin-top: 4px; font-weight: 600; }
.status-done { color: var(--accent-green); } .status-doing { color: var(--accent-yellow); }
.violation-record-card-modern { background: var(--bg-tertiary); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; }
.vrc-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.vrc-location { font-weight: 700; font-size: 13px; }
.vrc-detail { color: var(--text-muted); font-size: 11px; }
.vrc-type { font-size: 10px; }
.vrc-body { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.vrc-points .red-text { color: var(--accent-red); font-size: 14px; }
.vrc-evidence { font-size: 11px; color: var(--text-muted); }
.vrc-footer { display: flex; gap: 12px; align-items: center; font-size: 11px; padding-top: 8px; border-top: 1px solid var(--border-light); }
.vrc-status { font-weight: 600; }
.vrc-status.status-special { color: var(--accent-yellow); }
.vrc-handler { color: var(--text-muted); }
.user-actions-modern { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }
.action-btn-large { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; font-size: 13px; border-radius: var(--radius-sm); cursor: pointer; border: none; font-weight: 600; transition: all 0.2s; font-family: inherit; }
.btn-icon { font-size: 16px; }
.action-btn-large:hover { transform: translateY(-2px); }

/* ========== 快捷功能卡片 ========== */
.quick-actions-grid-modern { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.action-card-enhanced { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 16px 12px; text-align: center; cursor: pointer; transition: all 0.25s ease; position: relative; overflow: hidden; }
.action-card-enhanced:hover { transform: translateY(-3px); border-color: var(--accent-blue); box-shadow: var(--shadow-md); }
.action-icon-circle { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 8px; }
.action-icon-circle.blue { background: rgba(88,166,255,0.15); }
.action-icon-circle.green { background: rgba(63,185,80,0.15); }
.action-icon-circle.purple { background: rgba(163,113,247,0.15); }
.action-icon-circle.red { background: rgba(248,81,73,0.15); }
.action-icon-circle.orange { background: rgba(219,109,40,0.15); }
.action-icon-circle.gold { background: rgba(210,153,34,0.15); }
.action-card-enhanced h3 { font-size: 13px; margin-bottom: 3px; }
.action-desc { font-size: 10px; color: var(--text-muted); line-height: 1.3; margin-bottom: 6px; }
.action-status-bar { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; display: inline-block; }
.action-status-bar.online { background: rgba(63,185,80,0.12); color: var(--accent-green); }
.action-status-bar.score { background: rgba(88,166,255,0.12); color: var(--accent-blue); }
.action-status-bar.updating { background: rgba(163,113,247,0.12); color: var(--accent-purple); }
.action-status-bar.urgent { background: rgba(248,81,73,0.12); color: var(--accent-red); }
.action-status-bar.repair { background: rgba(219,109,40,0.12); color: var(--accent-orange); }
.action-status-bar.rank { background: rgba(210,153,34,0.12); color: var(--accent-yellow); }

/* ========== 数据大屏 - 紧凑版 ========== */
.dashboard-header-enhanced { }
.dash-header-top-row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.dash-header-right-col { display: flex; align-items: center; gap: 8px; }

/* 统计卡片 - 紧凑版 */
.dash-stats-enhanced { gap: 10px; }
.dash-stats-enhanced .dash-stat-modern { padding: 14px 10px; }
.dash-stats-enhanced .dash-stat-icon { font-size: 22px; margin-bottom: 2px; }
.dash-stats-enhanced .dash-stat-label { font-size: 11px; margin-bottom: 2px; }
.dash-stats-enhanced .dash-stat-value { font-size: 24px; }
.dash-stats-enhanced .dash-stat-footer { margin-top: 4px; gap: 6px; font-size: 10px; }

.dashboard-stats-modern {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
.dash-stat-modern {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 14px 10px; text-align: center; position: relative; overflow: hidden;
}
.dash-stat-modern::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.dash-stat-modern:nth-child(1)::before { background: linear-gradient(90deg, #58a6ff, #79c0ff); }
.dash-stat-modern.danger::before { background: var(--accent-red); }
.dash-stat-modern.success::before { background: var(--accent-green); }
.dash-stat-modern.warning::before { background: var(--accent-yellow); }
.dash-stat-icon { font-size: 24px; margin-bottom: 4px; }
.dash-stat-icon.pulse { animation: iconPulse 2s infinite; }
@keyframes iconPulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.12);} }
.dash-stat-label { font-size: 11px; color: var(--text-secondary); margin-bottom: 2px; }
.dash-stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); font-family: 'Courier New', monospace; }
.dash-stat-value.danger-color { color: var(--accent-red); }
.dash-stat-footer { display: flex; justify-content: center; gap: 8px; margin-top: 6px; font-size: 10px; }
.trend-badge { padding: 2px 7px; border-radius: 6px; font-weight: 600; }
.trend-badge.up { background: rgba(63,185,80,0.12); color: var(--accent-green); }
.trend-badge.down { background: rgba(248,81,73,0.12); color: var(--accent-red); }
.trend-badge.down.good { background: rgba(63,185,80,0.12); color: var(--accent-green); }
.trend-badge.same { background: rgba(139,148,158,0.12); color: var(--text-muted); }
.update-indicator { color: var(--text-muted); }

/* 图表区 - 紧凑版 */
.charts-grid-enhanced { gap: 12px; margin-bottom: 16px; }
.chart-title-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border-light); }
.chart-title-bar span:first-child { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.chart-subtitle { font-size: 9px; color: var(--text-muted); }
.chart-large { flex: 1.4; }
.chart-small-wrap { flex: 1; }
.charts-grid-modern { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-bottom: 16px; }
.chart-container-modern { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 12px; }
.chart-wrapper { width: 100%; }

/* 排名区域 - 增强版 + 功能修复 */
.ranking-enhanced { }
.ranking-section-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.rank-filter-tags { display: flex; gap: 4px; }
.rank-tag {
    padding: 4px 12px; border-radius: 12px; font-size: 11px; font-weight: 600;
    cursor: pointer; background: var(--bg-tertiary); color: var(--text-muted);
    border: 1px solid transparent; transition: all 0.2s; user-select: none;
}
.rank-tag.active, .rank-tag:hover { background: rgba(88,166,255,0.12); color: var(--accent-blue); border-color: rgba(88,166,255,0.25); }

/* 排名列表 - 优化显示 */
.ranking-list-modern { }
.ranking-item-dashboard {
    display: grid; grid-template-columns: 44px 1fr 64px 72px 76px;
    gap: 8px; align-items: center; padding: 10px 12px;
    background: var(--bg-tertiary); border-radius: var(--radius-sm); margin-bottom: 4px;
    transition: background 0.2s, opacity 0.3s; animation: fadeInUp 0.4s both;
}
.ranking-item-dashboard.hidden-by-filter { display: none; }
.ranking-item-dashboard:hover { background: rgba(88,166,255,0.06); }
@keyframes fadeInUp { from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:translateY(0);} }
.rid-rank { font-size: 18px; font-weight: 800; color: var(--text-muted); text-align: center; }
.rid-rank.rid-top3 { font-size: 22px; }
/* Top3特殊颜色 */
.ranking-item-dashboard:nth-child(1) .rid-rank { color: #ffd700; }
.ranking-item-dashboard:nth-child(2) .rid-rank { color: #c0c0c0; }
.ranking-item-dashboard:nth-child(3) .rid-rank { color: #cd7f32; }
.rid-name { font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rid-violations { text-align: center; font-weight: 700; color: var(--accent-red); font-size: 13px; }
.rid-occupancy { text-align: center; color: var(--text-secondary); font-size: 11px; }
.rid-change { display: flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; justify-content: flex-end; }
.change-icon { font-size: 13px; }
.trend-up .change-icon { color: var(--accent-green); } .trend-up .change-val { color: var(--accent-green); }
.trend-down .change-icon { color: var(--accent-red); } .trend-down .change-val { color: var(--accent-red); }
.trend-same .change-icon { color: var(--text-muted); } .trend-same .change-val { color: var(--text-muted); }

/* 无结果提示 */
.ranking-no-results {
    text-align: center; padding: 20px 16px; color: var(--text-muted);
    font-size: 12px; background: var(--bg-tertiary); border-radius: var(--radius-sm);
}

/* 院系筛选标签 */
.dept-filter-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.dept-tag {
    padding: 3px 10px; border-radius: 10px; font-size: 10px; font-weight: 600;
    cursor: pointer; background: rgba(163,113,247,0.08); color: var(--accent-purple);
    border: 1px solid transparent; transition: all 0.2s; user-select: none;
}
.dept-tag.active, .dept-tag:hover { background: rgba(163,113,247,0.18); border-color: rgba(163,113,247,0.35); }
.dept-tag .dept-count { opacity: 0.7; margin-left: 2px; }

/* 本人位置高亮（院系内排名不在前12时显示） */
.my-dept-position-card {
    background: linear-gradient(135deg, rgba(163,113,247,0.08), rgba(88,166,255,0.06));
    border: 1px solid rgba(163,113,247,0.25);
    border-radius: var(--radius-md); padding: 12px 16px;
    margin-top: 10px; display: flex; align-items: center; gap: 12px;
    animation: fadeInUp 0.4s ease;
}
.my-dept-avatar { font-size: 28px; }
.my-dept-info { flex: 1; }
.my-dept-name { font-weight: 700; font-size: 13px; color: var(--text-primary); }
.my-dept-meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.my-dept-rank-badge {
    text-align: center; padding: 6px 14px;
    background: linear-gradient(135deg, #a371f7, #58a6ff);
    color: white; border-radius: 10px; font-weight: 800;
}
.my-dept-rank-num { font-size: 18px; display: block; line-height: 1; }
.my-dept-rank-label { font-size: 9px; opacity: 0.85; }

/* ========== 通知详情弹窗 ========== */
#notification-detail-modal .modal-content {
    max-width: 540px !important;
}

/* 智能公告引擎增强版弹窗样式 */
.announcement-modal-enhanced.modal {
    z-index: 10000;
}
.announcement-modal-enhanced .modal-content {
    max-width: 580px !important;
    background: var(--bg-card, #161b22);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(88,166,255,0.1);
    animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-detail-header {
    padding-bottom: 12px; border-bottom: 1px solid var(--border-light);
    margin-bottom: 14px;
}
.notif-detail-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notif-detail-icon-large { font-size: 26px; }
.notif-detail-title-text { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; }
.notif-detail-badge {
    padding: 3px 10px; border-radius: 8px; font-size: 11px; font-weight: 600;
}
.notif-badge-critical { background: rgba(248,81,73,0.15); color: var(--accent-red); border: 1px solid rgba(248,81,73,0.3); }
.notif-badge-warning { background: rgba(210,153,34,0.15); color: var(--accent-yellow); border: 1px solid rgba(210,153,34,0.3); }
.notif-badge-info { background: rgba(88,166,255,0.12); color: var(--accent-blue); border: 1px solid rgba(88,166,255,0.25); }
.notif-badge-tip { background: rgba(63,185,80,0.12); color: var(--accent-green); border: 1px solid rgba(63,185,80,0.25); }
.notif-badge-announcement { background: rgba(88,166,255,0.12); color: var(--accent-blue); border: 1px solid rgba(88,166,255,0.25); }
.notif-detail-time { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.notif-detail-body { font-size: 13px; line-height: 1.75; color: var(--text-secondary); padding: 12px 0; }
.notif-detail-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px; border-top: 1px solid var(--border-light); margin-top: 4px;
    gap: 8px; flex-wrap: wrap;
}
.notif-detail-source { font-size: 11px; color: var(--text-muted); }
.notif-detail-actions { display: flex; gap: 8px; }

/* ========== 区域详情模态框 ========== */
.modal-header-area-detail { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.detail-title-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-location-icon { font-size: 22px; }
.detail-title-line h2 { font-size: 18px; }
.type-badge-small { background: var(--bg-tertiary); color: var(--text-muted); padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: normal; }
.area-full-desc { color: var(--text-secondary); font-size: 12px; margin-top: 6px; line-height: 1.4; }
.detail-stats-flex { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.detail-stat-box { background: var(--bg-tertiary); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.detail-stat-box.has-violations { border-color: rgba(248,81,73,0.3); }
.stat-big-number { font-size: 28px; font-weight: 800; color: var(--accent-blue); font-family: 'Courier New', monospace; }
.stat-big-number small { font-size: 14px; color: var(--text-muted); font-weight: normal; }
.stat-label-text { color: var(--text-secondary); font-size: 11px; margin-top: 3px; }
.stat-sub-info { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.stat-icon-large { font-size: 24px; margin-bottom: 3px; }
.stat-medium-text { font-size: 14px; font-weight: 700; color: var(--accent-blue); font-family: monospace; }
.facilities-section { margin-bottom: 16px; }
.section-heading { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.ai-heading { color: var(--accent-blue) !important; }
.facilities-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.facility-tag { background: rgba(88,166,255,0.1); color: var(--accent-blue); padding: 3px 10px; border-radius: 10px; font-size: 11px; border: 1px solid rgba(88,166,255,0.2); }
.facility-extra-info { font-size: 11px; color: var(--text-muted); }
.extra-info-item { margin-right: 14px; }

.ai-monitor-section-enhanced { margin-top: 16px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden; }
.ai-monitor-preview { background: linear-gradient(135deg, #0d1117, #161b22); padding: 40px 20px; position: relative; min-height: 160px; display: flex; align-items: center; justify-content: center; }
.preview-placeholder { text-align: center; }
.preview-icon-large { font-size: 40px; margin-bottom: 8px; }
.preview-title { font-size: 14px; color: var(--text-primary); font-weight: 600; }
.preview-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.detection-overlay-boxes { position: absolute; inset: 0; pointer-events: none; }
.detect-box { position: absolute; border: 2px solid var(--accent-red); background: rgba(248,81,73,0.1); border-radius: 4px; padding: 3px 6px; font-size: 10px; color: white; white-space: nowrap; }
.detect-error { border-color: var(--accent-red); color: var(--accent-red); background: rgba(248,81,73,0.9); }
.detect-warn { border-color: var(--accent-yellow); color: var(--accent-yellow); background: rgba(210,153,34,0.9); top: 55%; left: 45%; }
.live-timestamp-badge { position: absolute; bottom: 10px; right: 10px; padding: 3px 10px; background: rgba(248,81,73,0.9); color: white; border-radius: 4px; font-size: 10px; font-weight: 600; }
.ai-analysis-report { padding: 14px; background: var(--bg-tertiary); }
.report-heading { font-size: 13px; margin-bottom: 12px; }
.analysis-metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.analysis-metric-item { background: var(--bg-primary); padding: 10px; border-radius: var(--radius-sm); text-align: center; font-size: 11px; }
.analysis-metric-item.danger { border: 1px solid rgba(248,81,73,0.3); }
.am-label { display: block; color: var(--text-muted); font-size: 10px; margin-bottom: 3px; }
.am-value { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.code-font { font-family: 'Courier New', monospace; color: var(--accent-purple); font-size: 11px !important; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.all-good-section { text-align: center; padding: 30px 16px; background: rgba(63,185,80,0.05); border-radius: var(--radius-sm); border: 1px solid rgba(63,185,80,0.2); }
.good-icon-huge { font-size: 44px; margin-bottom: 10px; }
.good-stats-row { margin-top: 12px; font-size: 12px; color: var(--text-secondary); }
.sep { margin: 0 6px; color: var(--border-color); }
.modal-footer-actions { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-light); }

/* ========== 监控中心 - 紧凑版 ========== */
.camera-selector-wrapper { margin-bottom: 14px; }
.cam-selector-v2 { }
.selector-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.cam-filter-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.form-control-sm { padding: 6px 10px; font-size: 11px; }
.cam-buttons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.cam-btn-v2 { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; font-size: 12px; font-family: inherit; color: var(--text-primary); text-align: left; }
.cam-btn-v2:hover { border-color: var(--accent-blue); background: rgba(88,166,255,0.06); }
.cam-btn-v2.active { border-color: var(--accent-blue); background: rgba(88,166,255,0.12); }
.cam-dot-online::before { content: ''; width: 7px; height: 7px; background: var(--accent-green); border-radius: 50%; display: inline-block; flex-shrink: 0; }
.cam-dot-offline::before { content: ''; width: 7px; height: 7px; background: var(--accent-red); border-radius: 50%; display: inline-block; flex-shrink: 0; }
.cam-dot-maintenance::before { content: ''; width: 7px; height: 7px; background: var(--accent-yellow); border-radius: 50%; display: inline-block; flex-shrink: 0; }
.cam-name-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cam-name-text { font-weight: 600; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-id-mini { font-size: 9px; color: var(--text-muted); }
.cam-res-tag { font-size: 9px; background: var(--bg-primary); padding: 2px 5px; border-radius: 3px; color: var(--text-muted); white-space: nowrap; }
.cam-btn-v2.has-alert { position: relative; }
.has-alert::after { content: ''; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; background: var(--accent-red); border-radius: 50%; }

.monitor-top-info { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.cam-display-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.live-dot { display: inline-block; width: 7px; height: 7px; background: var(--accent-red); border-radius: 50%; margin-right: 6px; animation: livePulse 1.5s infinite; }
@keyframes livePulse { 0%{box-shadow:0 0 0 0 rgba(248,81,73,0.5);} 70%{box-shadow:0 0 0 6px rgba(248,81,73,0);} 100%{box-shadow:0 0 0 0 rgba(248,81,73,0);} }
.cam-details-row { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11px; }
.detail-tag { font-size: 11px; color: var(--text-muted); }
.detail-sep { color: var(--border-color); }
.connection-badge { padding: 5px 12px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.connection-badge.status-online { background: rgba(63,185,80,0.12); color: var(--accent-green); }
.connection-badge.status-offline { background: rgba(248,81,73,0.12); color: var(--accent-red); }
.connection-badge.status-maintenance { background: rgba(210,153,34,0.12); color: var(--accent-yellow); }

.dual-screen-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.screen-panel { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden; }
.screen-header { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--bg-tertiary); border-bottom: 1px solid var(--border-color); }
.screen-header h3 { font-size: 13px; font-weight: 700; flex: 1; }
.header-tools { display: flex; gap: 3px; }
.tool-btn-sm { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; font-size: 12px; color: var(--text-secondary); }
.tool-btn-sm:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.rec-badge { color: var(--accent-red); font-weight: 700; font-size: 11px; animation: blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
.ai-badge { color: var(--accent-green); font-weight: 700; font-size: 11px; }
.ai-screen-header { background: rgba(63,185,80,0.06); }
.processing-status { padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 600; }
.processing-status.busy { background: rgba(210,153,34,0.15); color: var(--accent-yellow); animation: processingAnim 1.5s infinite; }
.processing-status.done { background: rgba(63,185,80,0.15); color: var(--accent-green); }
@keyframes processingAnim { 0%,100%{opacity:1;} 50%{opacity:0.5;} }
.screen-content { position: relative; min-height: 240px; background: linear-gradient(135deg, #0a0f16, #131b26); }
.placeholder-content { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 240px; gap: 6px; }
.placeholder-content .ph-icon { font-size: 38px; }
.placeholder-content .ph-text { font-size: 14px; font-weight: 600; }
.placeholder-content .ph-sub { font-size: 11px; color: var(--text-muted); }
.blue-theme .ph-icon, .blue-theme .ph-text { color: var(--accent-blue); opacity: 0.8; }
.green-theme .ph-icon, .green-theme .ph-text { color: var(--accent-green); opacity: 0.8; }
.overlay-timestamp { position: absolute; bottom: 6px; right: 8px; padding: 2px 8px; background: rgba(0,0,0,0.7); color: var(--text-muted); border-radius: 3px; font-size: 9px; font-family: monospace; }
.green-ts { color: var(--accent-green) !important; }
.ai-detect-box { position: absolute; border: 2px solid var(--accent-green); background: rgba(63,185,80,0.08); border-radius: 3px; min-width: 50px; min-height: 32px; }
.ai-detect-box.is-violation { border-color: var(--accent-red); background: rgba(248,81,73,0.1); }
.detect-tag-inner { position: absolute; bottom: -18px; left: -2px; padding: 2px 6px; font-size: 9px; font-weight: 600; white-space: nowrap; border-radius: 3px; }
.tag-ok { background: var(--accent-green); color: white; }
.tag-error { background: var(--accent-red); color: white; }
.conf-num { margin-left: 3px; opacity: 0.9; }
.conf-high { color: #fff; } .conf-mid { color: #ffe066; } .conf-low { color: #ffa07a; }

/* 分析面板 - 紧凑版 */
.analysis-panel-detailed { margin-top: 12px; }
.analysis-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.analysis-panel-header h3 { font-size: 13px; }
.summary-badge { padding: 4px 12px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.summary-bad { background: rgba(248,81,73,0.15); color: var(--accent-red); }
.summary-good { background: rgba(63,185,80,0.15); color: var(--accent-green); }
.analysis-body-layout { display: grid; grid-template-columns: 220px 1fr; gap: 12px; margin-bottom: 12px; }
.metrics-column { display: flex; flex-direction: column; gap: 6px; }
.metric-card-simple { background: var(--bg-tertiary); padding: 10px; border-radius: var(--radius-sm); text-align: center; }
.metric-card-simple.mcs-danger { border: 1px solid rgba(248,81,73,0.3); }
.mcs-label { font-size: 10px; color: var(--text-muted); }
.mcs-value { font-size: 18px; font-weight: 800; color: var(--text-primary); font-family: 'Courier New', monospace; }
.details-column { }
.dc-title { font-size: 12px; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); }
.detection-result-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-tertiary); border-radius: var(--radius-sm); margin-bottom: 6px; }
.detection-result-item.item-violation { border-left: 3px solid var(--accent-red); }
.detection-result-item.item-normal { border-left: 3px solid var(--accent-green); }
.dri-icon { font-size: 18px; }
.dri-info { flex: 1; }
.dri-type-line { font-size: 12px; font-weight: 600; }
.vehicle-id-text { color: var(--text-muted); font-weight: normal; font-size: 10px; }
.dri-result-line { font-size: 11px; margin-top: 1px; }
.result-bad { color: var(--accent-red); } .result-good { color: var(--accent-green); }
.dri-conf-col { text-align: right; min-width: 56px; }
.conf-val { font-size: 12px; font-weight: 700; display: block; }
.cv-high { color: var(--accent-green); } .cv-mid { color: var(--accent-yellow); } .cv-low { color: var(--accent-red); }
.conf-bar-track { height: 3px; background: var(--bg-primary); border-radius: 2px; margin-top: 3px; overflow: hidden; }
.conf-bar-fill { height: 100%; border-radius: 2px; transition: width 0.3s; }

.tech-specs-area { margin-top: 12px; }
.tech-summary-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--bg-tertiary); border-radius: var(--radius-sm); cursor: pointer; user-select: none; font-weight: 600; font-size: 12px; }
.tech-summary-bar:hover { background: rgba(88,166,255,0.08); }
.tech-ver-tag { font-size: 10px; color: var(--text-muted); font-weight: normal; }
.tech-details-content { padding: 12px 0; }
.tech-cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-bottom: 12px; }
.tech-card-item { background: var(--bg-tertiary); padding: 12px; border-radius: var(--radius-sm); }
.tech-card-item h5 { font-size: 12px; color: var(--accent-blue); margin-bottom: 4px; }
.tech-card-item p { font-size: 10px; color: var(--text-secondary); line-height: 1.4; }
.code-block-wrapper { border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden; }
.code-block-header { padding: 6px 12px; background: var(--bg-tertiary); font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--border-color); color: var(--text-secondary); }
.code-block-content { padding: 10px; background: #0d1117; font-size: 9px; line-height: 1.5; overflow-x: auto; font-family: 'Cascadia Code','Fira Code',Consolas,monospace; color: #c9d1d9; }
.no-data-msg { text-align: center; padding: 40px; color: var(--text-muted); }

/* ========== 排行榜模态框 - 紧凑版 ========== */
.ranking-period-selector { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.period-btn { padding: 6px 16px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-secondary); transition: all 0.2s; font-family: inherit; }
.period-btn.active { background: var(--accent-blue); color: white; border-color: var(--accent-blue); }
.period-btn:hover:not(.active) { border-color: var(--accent-blue); color: var(--accent-blue); }

.ranking-table-modern { overflow-x: auto; }
.ranking-table-modern table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ranking-table-modern th { padding: 10px 12px; text-align: left; background: var(--bg-tertiary); color: var(--text-secondary); font-weight: 600; font-size: 11px; border-bottom: 2px solid var(--border-color); position: sticky; top: 0; z-index: 1; }
.ranking-table-modern td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); }
.ranking-tr { transition: background 0.15s; }
.ranking-tr:hover { background: rgba(88,166,255,0.05); }
.ranking-tr.tr-me { background: rgba(163,113,247,0.08); }
.ranking-tr.tr-me:hover { background: rgba(163,113,247,0.15); }
.ranking-tr.tr-top3 td { font-weight: 600; }
.th-rank { width: 58px; } .th-name { width: auto; } .th-dept { width: 140px; }
.th-score { width: 75px; text-align: center; } .th-compliance { width: 85px; text-align: center; }
.th-energy { width: 90px; text-align: center; } .th-trend { width: 52px; text-align: center; }
.td-rank { font-weight: 700; }
.medal-md { font-size: 18px; }
.rank-num { color: var(--text-muted); font-weight: 600; }
.td-name { font-weight: 600; font-size: 12px; }
.me-tag-sm { background: var(--accent-purple); color: white; padding: 1px 6px; border-radius: 5px; font-size: 9px; margin-left: 5px; vertical-align: middle; font-weight: 600; }
.td-dept { color: var(--text-secondary); font-size: 11px; }
.td-score { text-align: center; }
.score-num { font-weight: 700; font-family: 'Courier New', monospace; }
.score-num.score-top { color: var(--accent-yellow); }
.td-compliance, .td-energy { text-align: center; color: var(--text-secondary); font-size: 11px; }
.td-trend { text-align: center; }
.trend-arrow-up { color: var(--accent-green); font-weight: 700; font-size: 14px; }
.trend-arrow-down { color: var(--accent-red); font-weight: 700; font-size: 14px; }

.ranking-controls-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.rank-search-box { flex: 1; min-width: 180px; }
.rank-filters { width: 140px; flex-shrink: 0; }
.ranking-footer-info { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.my-position-highlight { background: rgba(163,113,247,0.08); border: 1px solid rgba(163,113,247,0.2); padding: 12px 16px; border-radius: var(--radius-sm); text-align: center; font-size: 12px; margin-bottom: 8px; }
.my-position-highlight strong { color: var(--accent-purple); }
.ranking-note { font-size: 10px; color: var(--text-muted); text-align: center; line-height: 1.4; }

/* ========== 排行榜新布局样式（全校总榜+各院系网格） ========== */
.section-header-gold {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px; margin-bottom: 10px;
    background: linear-gradient(135deg, rgba(210,153,34,0.1), rgba(248,81,73,0.05));
    border: 1px solid rgba(210,153,34,0.22);
    border-radius: 10px;
}
.sh-icon { font-size: 20px; }
.sh-title { font-size: 15px; font-weight: 800; color: var(--accent-yellow); }
.sh-sub { font-size: 11px; color: var(--text-muted); margin-left: auto; }

.section-divider {
    margin: 16px 0; text-align: center; position: relative;
}
.section-divider::before {
    content: ''; position: absolute; left: 5%; right: 5%; top: 50%;
    border-top: 1px dashed var(--border-color);
}
.section-divider span {
    position: relative; background: var(--bg-card); padding: 0 16px;
    font-size: 11px; color: var(--text-muted);
}
.section-divider strong { color: var(--accent-blue); }

/* 院系双列网格 */
.dept-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.dept-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dept-card:hover {
    border-color: rgba(88,166,255,0.3);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.dc-header {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 13px;
    background: linear-gradient(135deg, rgba(88,166,255,0.06), rgba(163,113,247,0.03));
    border-bottom: 1px solid var(--border-light);
}
.dc-icon { font-size: 14px; flex-shrink: 0; }
.dc-name { font-size: 12px; font-weight: 700; color: var(--text-primary); flex: 1; }
.dc-badge {
    font-size: 9px; padding: 2px 8px; border-radius: 8px;
    background: var(--accent-blue); color: white; font-weight: 600;
}
.dc-table table { width: 100%; border-collapse: collapse; font-size: 11px; }
.dc-table thead th {
    padding: 6px 8px; text-align: left;
    background: var(--bg-tertiary); color: var(--text-secondary);
    font-size: 10px; font-weight: 600; border-bottom: 1px solid var(--border-light);
}
.dc-table td {
    padding: 5px 8px; border-bottom: 1px solid rgba(128,128,128,0.08);
}

.medal-sm { font-size: 13px; }
.rank-num-sm { font-size: 10px; color: var(--text-muted); font-weight: 600; }

/* 移动端院系网格单列 */
@media (max-width: 900px) {
    .dept-grid-container { grid-template-columns: 1fr; gap: 10px; }
}

/* 规则模态框内容 */
.rules-content-modern { max-height: 55vh; overflow-y: auto; padding-right: 6px; }
.rule-box { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 12px; line-height: 1.5; }
.info-box { background: rgba(88,166,255,0.08); border-left: 3px solid var(--accent-blue); }
.tip-box { background: rgba(210,153,34,0.08); border-left: 3px solid var(--accent-yellow); }
.penalty-table tr:nth-child(even) { background: var(--bg-tertiary); }
.bonus-table tr:nth-child(even) { background: var(--bg-tertiary); }
.points-positive.special { color: var(--accent-purple); }
.points-negative.critical { color: #ff6b6b; font-size: 14px; }
.rule-footer-note { margin-top: 12px; padding: 12px; background: var(--bg-tertiary); border-radius: var(--radius-sm); font-size: 11px; color: var(--text-secondary); line-height: 1.5; }

/* ========================================
   Leaflet + OSM 热力图地图样式
   ======================================== */

#leaflet-map-container {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
}

/* 自定义停车标记样式 - 语义化SVG图标 */
.custom-parking-marker {
    background: transparent !important;
    border: none !important;
}

.semantic-icon-wrapper {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.22s ease, filter 0.2s ease;
}
.semantic-icon-wrapper:hover {
    transform: scale(1.15) translateY(-3px) !important;
    z-index: 9999 !important;
    filter: brightness(1.08);
}
.semantic-icon-wrapper svg {
    display: block;
    transition: filter 0.2s ease;
}

/* 编号文字 */
.semantic-id {
    color: var(--text-primary, #e6edf3);
    font-weight: 800;
    font-family: 'Courier New', monospace;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    line-height: 1;
    margin-top: -2px;
    pointer-events: none;
    letter-spacing: -0.3px;
    opacity: 0.9;
}

/* 违规徽章 */
.semantic-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f85149, #da3633);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(13,17,23,0.85);
    z-index: 5;
    box-shadow: 0 2px 8px rgba(248,81,73,0.55);
    animation: semanticBadgePulse 1.8s infinite;
    padding: 0 3px;
}
@keyframes semanticBadgePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(248,81,73,0.55); transform: scale(1); }
    50% { box-shadow: 0 2px 14px rgba(248,81,73,0.85); transform: scale(1.08); }
}

/* Leaflet Popup 暗色适配 */
.parking-popup .leaflet-popup-content-wrapper {
    background: var(--bg-secondary, #1c2128) !important;
    color: var(--text-primary, #e6edf3) !important;
    border-radius: var(--radius-md, 10px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
    border: 1px solid var(--border-color, #30363d) !important;
}
.parking-popup .leaflet-popup-content { margin: 10px 12px !important; }
.parking-popup .leaflet-popup-tip { background: var(--bg-secondary, #1c2128) !important; }
.parking-popup .leaflet-popup-close-button {
    color: var(--text-muted, #8b949e) !important;
    font-size: 18px !important;
}
.parking-popup .leaflet-popup-close-button:hover { color: white !important; }

/* 隐藏 Leaflet 默认 attribution（可选） */
.leaflet-control-attribution {
    background: rgba(13,17,23,0.7) !important;
    font-size: 9px !important;
    color: rgba(255,255,255,0.45) !important;
}
.leaflet-control-attribution a { color: rgba(88,166,255,0.6) !important; }

/* 地图容器在暗色主题下的边框融合 */
.map-container-wrapper #leaflet-map-container {
    border-top: none;
}


/* ========================================
   移动端响应式自适应 v4.0 - 紧凑版
   ======================================== */

/* ===== 平板及以下 (<1024px) ===== */
@media (max-width: 1024px) {
    .main-container { max-width: 96%; padding: 12px; }
    .heatmap-zoom-controls { top: 4px; right: 6px; padding: 3px 4px; gap: 2px; z-index: 1000; }
    .zoom-btn { width: 24px; height: 22px; font-size: 12px; }
    .zoom-level-display { font-size: 10px; min-width: 34px; }
    #leaflet-map-container { height: 400px !important; }
    .profile-main-modern { grid-template-columns: 1fr; }
    .detail-stats-flex { grid-template-columns: 1fr; }
    .analysis-body-layout { grid-template-columns: 1fr; }
    .dashboard-stats-modern { grid-template-columns: repeat(2, 1fr); }
    .charts-grid-modern { grid-template-columns: 1fr; }
    .dual-screen-layout { display: flex !important; flex-direction: column !important; }
    .th-dept { display: none; } .td-dept { display: none; }
    .heatmap-live-data-bar { padding: 6px 12px; }
    .live-data-item { padding: 0 8px; }
    .live-data-label { font-size: 10px; }
    .live-data-value { font-size: 16px; min-width: 38px; }
    .scroll-item { padding: 4px 12px; font-size: 11px; height: 26px; }
    
    .btn { padding: 8px 16px; font-size: 13px; }
    .btn-sm { padding: 5px 12px; font-size: 12px; }
    .card { padding: 16px; margin-bottom: 14px; }
    .card-title { font-size: 15px; margin-bottom: 12px; }
    .page-header { padding: 25px 16px 18px; margin-bottom: 18px; }
    .page-header h1 { font-size: 22px; }
    .page-header p { font-size: 13px; }
}

/* ===== 手机横屏/小平板 (<900px) ===== */
@media (max-width: 900px) {
    .navbar { flex-direction: column; gap: 8px; padding: 8px 14px; position: relative; }
    .nav-brand { flex-wrap: wrap; justify-content: center; }
    .brand-text { font-size: 14px; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 3px; }
    .nav-link { padding: 5px 12px; font-size: 12px; flex: 1 1 auto; text-align: center; min-width: 60px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
    .stat-card { padding: 12px 10px; border-radius: var(--radius-sm); }
    .stat-card::before { height: 2px; }
    .stat-icon { font-size: 22px; }
    .stat-number { font-size: 24px; }
    .stat-label { font-size: 11px; }
    .stat-trend { font-size: 9px; margin-top: 4px; }

    .container { max-width: 100%; }
    #leaflet-map-container { height: 340px !important; }
    .heatmap-zoom-controls.leaflet-control-bar { z-index: 1000; }

    /* 滚动公告栏移动端 */
    .scrolling-notification-bar { margin-bottom: 12px; }
    .scroll-bar-header { padding: 6px 12px 5px; }
    .scroll-bar-title { font-size: 12px; }
    .scroll-content-wrapper { height: 36px; padding: 0 10px; }
    .scroll-item { padding: 4px 10px; height: 26px; }
    .scroll-item-text { font-size: 11px; }
    .scroll-item-time { display: none; }

    .user-actions-modern { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
    .user-actions-top { grid-template-columns: 1fr 1fr !important; gap: 8px !important; margin-bottom: 12px !important; }
    .user-actions-top .action-btn-large { height: 38px !important; font-size: 11px !important; padding: 5px 10px !important; gap: 5px !important; }
    .user-actions-top .action-btn-large .btn-icon { font-size: 14px !important; }
    .user-stats-modern { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
    .mini-stat-modern { padding: 10px 6px; }
    .mini-icon { font-size: 20px; margin-bottom: 3px; }
    .mini-value { font-size: 20px; }
    .mini-label { font-size: 10px; }
    .mini-trend { font-size: 9px; }
    .timeline-item { grid-template-columns: 78px 1fr 44px 50px; font-size: 11px; }
    .achievements-grid-modern { grid-template-columns: 1fr; gap: 8px; }
    .ranking-item-dashboard { grid-template-columns: 34px 1fr 54px 62px; }

    .dashboard-stats-modern { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
    .dash-stats-enhanced .dash-stat-value { font-size: 22px; }
    .chart-wrapper { height: 240px !important; }

    .cam-buttons-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions-grid-modern { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
    .action-card-enhanced { padding: 12px 10px; border-radius: var(--radius-sm); }
    .action-icon-circle { width: 38px; height: 38px; font-size: 18px; }
    .analysis-metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .ranking-controls-bar { flex-direction: column; gap: 6px; }
    .rank-filters { width: 100%; }
    .ranking-period-selector { gap: 3px; }
    .period-btn { padding: 5px 12px; font-size: 11px; }

    .th-energy { display: none; } .td-energy { display: none; }
    .th-compliance { display: none; } .td-compliance { display: none; }

    .heatmap-live-data-bar { flex-wrap: wrap; gap: 4px; padding: 6px 10px; }
    .live-data-divider { margin: 2px 2px; }
    .live-data-item { padding: 4px 6px; }
    .live-data-value { font-size: 15px; min-width: 32px; }
    
    .btn { padding: 7px 14px; font-size: 12px; }
    .btn-sm { padding: 4px 10px; font-size: 11px; }
    .card { padding: 14px; margin-bottom: 12px; }
    .card-title { font-size: 14px; margin-bottom: 10px; }
    .page-header { padding: 20px 14px 14px; margin-bottom: 14px; }
    .page-header h1 { font-size: 20px; }
    .page-header p { font-size: 12px; }
    .system-status-bar { gap: 10px; font-size: 11px; }
    .status-item { padding: 3px 8px; font-size: 11px; }

    /* 用户中心资料卡片中等屏幕紧凑化 */
    .profile-main-modern { padding: 12px; gap: 12px; margin-bottom: 10px; }
    .profile-avatar-large { font-size: 44px; }
    .profile-name-large { font-size: 15px; }
    .score-display-circle { width: 120px; height: 120px; }
    .score-value-big { font-size: 30px; }
    .credit-progress { width: 200px !important; margin: 10px auto !important; }

    /* 历史记录网格中等屏幕紧凑 */
    .history-records-grid { gap: 10px !important; }
    .history-records-grid > div { padding: 12px !important; }
}

/* ===== 手机竖屏 (<600px) ===== */
@media (max-width: 600px) {
    html { font-size: 14px; } body { font-size: 13px; }
    .main-container { padding: 6px; }

    /* 导航 */
    .navbar { padding: 6px 10px; gap: 6px; }
    .nav-brand { flex-direction: column; align-items: center; gap: 3px; }
    .logo-icon { font-size: 20px; } .brand-text { font-size: 13px; }
    .nav-links { width: 100%; justify-content: stretch; }
    .nav-link { padding: 7px 5px; font-size: 11px; flex: 1 1 0; text-align: center; min-width: 0; }

    /* 滚动公告栏 - 超紧凑 */
    .scrolling-notification-bar { margin-bottom: 10px; border-radius: var(--radius-sm); }
    .scroll-bar-header { padding: 5px 10px 4px; flex-wrap: wrap; gap: 4px; }
    .scroll-bar-title { font-size: 11px; }
    .scroll-content-wrapper { height: 32px; padding: 0 8px; }
    .scroll-item { padding: 3px 8px; height: 24px; border-radius: 14px; }
    .scroll-item-icon { font-size: 12px; }
    .scroll-item-text { font-size: 10px; }

    /* 实时数据条 */
    .heatmap-live-data-bar {
        flex-wrap: wrap; gap: 2px; padding: 6px 8px; border-radius: var(--radius-sm);
        margin-bottom: 8px;
    }
    .live-data-divider { display: none; }
    .live-data-item { padding: 4px 8px; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
    .live-data-icon { font-size: 14px; }
    .live-data-label { font-size: 9px; }
    .live-data-value { font-size: 14px; min-width: 0; }
    .live-data-value.live-clock { font-size: 11px; }

    /* 热力图 - Leaflet 移动端 */
    .heatmap-section-modern.heatmap-top { margin-bottom: 12px; padding: 10px 8px !important; }
    #leaflet-map-container { height: 300px !important; }
    .heatmap-zoom-controls { top: 2px; right: 4px; padding: 2px 3px; gap: 1px; z-index: 1000 !important; }
    .zoom-btn { width: 22px; height: 20px; font-size: 11px; padding:0; }
    .legend-grid { gap: 10px; }
    .legend-item-enhanced { font-size: 9px; }

    /* 统计卡片 */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
    .stat-card { padding: 10px 8px; border-radius: var(--radius-sm); }
    .stat-card::before { height: 2px; }
    .stat-icon { font-size: 20px; margin-bottom: 2px; }
    .stat-number { font-size: 22px; }
    .stat-label { font-size: 10px; line-height: 1.2; }
    .stat-trend { font-size: 9px; margin-top: 4px; }

    .quick-actions-grid-modern { grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 12px; }
    .action-card-enhanced { padding: 10px 8px; border-radius: var(--radius-sm); }
    .action-icon-circle { width: 34px; height: 34px; font-size: 16px; }
    .action-card-enhanced h3 { font-size: 12px; }
    .action-desc { font-size: 9px; }
    .action-status-bar { font-size: 9px; padding: 2px 6px; }

    /* 操作说明 */
    div[style*="margin-bottom:"][style*="background:rgba(248"] { margin-bottom: 10px !important; padding: 8px 10px !important; font-size: 10px !important; }

    /* 用户中心 */
    .user-actions-modern { grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
    .user-actions-top { grid-template-columns: 1fr 1fr !important; gap: 6px !important; margin-bottom: 10px !important; }
    .user-actions-top .action-btn-large { height: 36px !important; font-size: 11px !important; padding: 5px 8px !important; border-radius: var(--radius-sm) !important; gap: 4px !important; }
    .user-actions-top .action-btn-large .btn-icon { font-size: 13px !important; }
    .profile-main-modern { padding: 10px; border-radius: var(--radius-sm); margin-bottom: 10px; gap: 10px; }
    .avatar-section { text-align: center; }
    .profile-avatar-large { font-size: 40px; }
    .profile-name-large { font-size: 14px; margin: 4px 0 2px; }
    .user-meta-info { font-size: 10px; flex-wrap: wrap; justify-content: center; gap: 4px; }
    .credit-score-section h3 { font-size: 12px; margin-bottom: 6px; }
    .score-display-circle { width: 110px; height: 110px; margin: 0 auto 6px; }
    .score-value-big { font-size: 28px; }
    .score-max-small { font-size: 12px; }
    .level-rank-row { gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
    .level-rank-row .badge { font-size: 10px; padding: 2px 8px; }
    .credit-progress { width: 180px !important; margin: 8px auto !important; }
    .user-stats-modern { grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
    .mini-stat-modern { padding: 8px 5px; }
    .mini-icon { font-size: 18px; margin-bottom: 2px; }
    .mini-value { font-size: 18px; }
    .mini-label { font-size: 10px; margin-top: 2px; }
    .mini-trend { font-size: 9px; margin-top: 2px; }

    .timeline-item { grid-template-columns: 70px 1fr 38px 46px; gap: 5px; padding: 6px 8px; font-size: 10px; margin-bottom: 3px; }
    .timeline-date { font-size: 9px; }
    .timeline-reason { font-size: 10px; line-height: 1.2; }

    .achievements-grid-modern { grid-template-columns: 1fr 1fr; gap: 5px; }
    .achievement-card-modern { padding: 8px; gap: 6px; }
    .acm-icon { font-size: 20px; }
    .acm-title { font-size: 11px; }
    .acm-desc { font-size: 9px; margin-top: 1px; }
    .acm-status-text { font-size: 10px; margin-top: 2px; }

    .violation-record-card-modern { padding: 8px; margin-bottom: 5px; }
    .vrc-header { flex-wrap: wrap; gap: 3px; margin-bottom: 5px; }
    .vrc-location { font-size: 11px; }
    .vrc-detail { font-size: 10px; }
    .vrc-type { font-size: 9px; }
    .vrc-body { font-size: 10px; gap: 8px; margin-bottom: 5px; }
    .vrc-points .red-text { color: var(--accent-red); font-size: 12px; }
    .vrc-evidence { font-size: 10px; }
    .vrc-footer { flex-wrap: wrap; gap: 6px; font-size: 10px; padding-top: 5px; }

    /* 大屏页 */
    .dashboard-header-enhanced .dash-header-top-row { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
    .dash-header-right-col { justify-content: center; width: 100%; }
    .current-time { font-size: 11px; padding: 5px 14px; }
    .system-status-bar { font-size: 9px; gap: 5px; flex-wrap: wrap; justify-content: center; }
    .status-item { padding: 2px 6px; font-size: 9px; }

    .dashboard-stats-modern { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
    .dash-stat-modern { padding: 10px 8px; }
    .dash-stat-icon { font-size: 20px; }
    .dash-stat-value { font-size: 22px; }
    .dash-stat-label { font-size: 10px; }
    .charts-grid-modern { grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
    .chart-container-modern { padding: 10px; }
    .chart-title-bar span:first-child { font-size: 11px; }
    .chart-wrapper { height: 220px !important; }

    /* 排名 */
    .ranking-section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .rank-filter-tags { flex-wrap: wrap; }
    .rank-tag { padding: 3px 10px; font-size: 10px; }
    .ranking-item-dashboard { grid-template-columns: 26px 1fr 44px 48px; gap: 5px; padding: 8px; font-size: 10px; }
    .dept-filter-tags { margin-top: 6px; }
    .dept-tag { padding: 2px 8px; font-size: 9px; }
    .my-dept-position-card { flex-direction: column; text-align: center; padding: 10px; }
    .my-dept-avatar { font-size: 24px; }
    .my-dept-rank-badge { width: 100%; text-align: center; margin-top: 4px; }
    .rid-rank { font-size: 14px; }
    .rid-rank.rid-top3 { font-size: 17px; }
    .rid-name { font-size: 11px; }
    .rid-violations { font-size: 12px; }
    .rid-occupancy { font-size: 10px; }
    .rid-change { font-size: 10px; }

    /* 模态框 */
    .modal-content { max-width: 96%; max-height: 92vh; border-radius: var(--radius-sm); margin: 3px; }
    .modal-content.modal-lg { max-width: 96%; }
    .modal-title-custom { font-size: 15px; margin-bottom: 12px; }
    .modal-close { width: 26px; height: 26px; font-size: 17px; top: 8px; right: 8px; }

    .form-group label { font-size: 11px; }
    .form-control { padding: 7px 10px; font-size: 12px; }
    textarea.form-control { min-height: 60px; }
    .urgency-selector { flex-direction: column; gap: 5px; }
    .urgency-btn { padding: 7px 12px; font-size: 11px; }
    .modal-actions { flex-direction: column; gap: 6px; }
    .modal-actions .btn { width: 100%; justify-content: center; }

    .rules-content-modern { max-height: 50vh; }
    .rule-box { padding: 8px 10px; font-size: 11px; }
    .rule-section h3 { font-size: 12px; }
    .rules-table-modern { font-size: 10px; }
    .rules-table-modern th, .rules-table-modern td { padding: 6px 5px; }
    .level-grid { grid-template-columns: 1fr; gap: 8px; }
    .level-card { padding: 12px; }

    .ranking-controls-bar { gap: 6px; }
    .rank-search-box input { font-size: 12px; }
    .ranking-period-selector { gap: 3px; }
    .period-btn { padding: 5px 10px; font-size: 10px; }
    .ranking-table-modern { font-size: 10px; }
    .ranking-table-modern th { padding: 7px 8px; font-size: 9px; }
    .ranking-table-modern td { padding: 7px 8px; }
    .my-position-highlight { font-size: 11px; padding: 8px 12px; }
    .ranking-note { font-size: 9px; }

    .th-trend { display: none; } .td-trend { display: none; }

    .cam-filter-bar { flex-direction: column; }
    .cam-buttons-grid { grid-template-columns: 1fr 1fr; gap: 5px; }
    .cam-btn-v2 { padding: 7px 8px; font-size: 11px; }
    
    /* 公告引擎弹窗移动端适配 */
    .announcement-modal-enhanced .modal-content { 
        max-width: 96% !important; 
        margin: auto;
        max-height: 92vh;
        overflow-y: auto;
    }
    .notif-detail-title-text { font-size: 14px; }
    .notif-detail-body { font-size: 12.5px; line-height: 1.7; }
    .notif-detail-actions { flex-direction: column; gap: 6px; width: 100%; }
    .notif-detail-actions button { width: 100%; justify-content: center; }

    /* 双屏布局移动端堆叠 */
    .dual-screen-layout { display: flex !important; flex-direction: column !important; gap: 10px; }

    /* 分析面板移动端 */
    .analysis-body-layout { grid-template-columns: 1fr; gap: 8px; }
    
    /* 技术卡片 */
    .tech-cards-row { grid-template-columns: 1fr; gap: 6px; }

    /* 底部安全边距 */
    .main-container { padding-bottom: 20px; }

    /* 通用按钮紧凑化 */
    .btn { padding: 6px 12px; font-size: 11px; }
    .btn-sm { padding: 3px 8px; font-size: 10px; }
    .btn-xs { padding: 2px 6px; font-size: 9px; }

    /* 卡片通用紧凑化 */
    .card { padding: 12px; margin-bottom: 10px; }
    .card-title { font-size: 13px; margin-bottom: 8px; }

    /* 页头紧凑化 */
    .page-header { padding: 16px 10px 10px; margin-bottom: 12px; }
    .page-header h1 { font-size: 18px; margin-bottom: 6px; }
    .page-header p { font-size: 11px; }

    /* 表单紧凑化 */
    .form-group { margin-bottom: 12px; }
    .form-group label { font-size: 11px; margin-bottom: 4px; }
    .form-control { padding: 6px 8px; font-size: 11px; }
    textarea.form-control { min-height: 50px; }

    /* 徽章紧凑化 */
    .badge { padding: 2px 8px; font-size: 9px; }

    /* 进度条紧凑化 */
    .progress-bar { height: 6px; }
    .credit-progress { width: 200px !important; }

    /* 模态框紧凑化 */
    .modal-actions { gap: 5px; margin-top: 14px; }

    /* 紧急程度选择器紧凑化 */
    .urgency-btn { padding: 5px 10px; font-size: 10px; }

    /* 摄像头按钮更紧凑 */
    .cam-btn-v2 { padding: 6px 8px; font-size: 10px; }
    .cam-name-text { font-size: 10px; }
    .cam-id-mini { font-size: 8px; }

    /* 监控中心屏幕面板 */
    .screen-panel { border-radius: var(--radius-sm); }
    .screen-header { padding: 6px 10px; }
    .screen-header h3 { font-size: 12px; }
    .screen-content { min-height: 180px; }
    .placeholder-content { height: 180px; }
    .ph-icon { font-size: 32px; }
    .ph-text { font-size: 12px; }
    .ph-sub { font-size: 10px; }

    /* 分析面板紧凑化 */
    .analysis-panel-header { margin-bottom: 10px; gap: 6px; }
    .analysis-panel-header h3 { font-size: 12px; }
    .summary-badge { padding: 3px 10px; font-size: 10px; }
    .metric-card-simple { padding: 8px; }
    .mcs-value { font-size: 16px; }
    .detection-result-item { padding: 6px 8px; margin-bottom: 4px; }
    .dri-type-line { font-size: 11px; }
    .dri-result-line { font-size: 10px; }

    /* 技术规格区域紧凑化 */
    .tech-summary-bar { padding: 8px 12px; font-size: 11px; }
    .tech-card-item { padding: 10px; }
    .tech-card-item h5 { font-size: 11px; }
    .tech-card-item p { font-size: 9px; }
    .code-block-content { font-size: 8px; }

    /* 区域详情模态框紧凑化 */
    .detail-stat-box { padding: 10px; }
    .stat-big-number { font-size: 24px; }
    .stat-label-text { font-size: 10px; }
    .facility-tag { padding: 2px 8px; font-size: 10px; }

    /* 违规记录紧凑化 */
    .violation-history-modern .card-title { font-size: 13px; }

    /* 我的历史记录区域 */
    .user-profile-section-modern .card:last-child { margin-bottom: 10px; }
    .user-profile-section-modern .card:last-child > div:first-child { font-size: 12px; }
    .user-profile-section-modern .card:last-child > div:first-child > div { padding: 8px; }
    .user-profile-section-modern .card:last-child > div:first-child > div h4 { font-size: 12px; margin-bottom: 6px; }
    .user-profile-section-modern .card:last-child > div:first-child > div > div { font-size: 10px; padding: 3px 0; }

    /* 历史记录双列网格移动端紧凑（覆盖内联样式） */
    .history-records-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .history-records-grid > div {
        padding: 10px !important;
    }
    .history-records-grid h4 {
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }
    .history-records-grid > div > div {
        font-size: 10px !important;
    }
    .history-records-grid > div > div > div {
        padding: 3px 0 !important;
    }

    /* 通知详情弹窗紧凑化 */
    .notif-detail-header { padding-bottom: 10px; margin-bottom: 12px; }
    .notif-detail-icon-large { font-size: 22px; }
    .notif-detail-body { font-size: 12px; padding: 10px 0; }
    .notif-detail-footer { padding-top: 10px; margin-top: 4px; }

    /* 监控中心顶部信息紧凑化 */
    .monitor-top-info { flex-direction: column; align-items: flex-start; gap: 6px; }
    .cam-details-row { flex-wrap: wrap; gap: 5px; font-size: 10px; }
    .connection-badge { font-size: 10px; }

    /* 分析面板指标更紧凑 */
    .analysis-metrics-grid { grid-template-columns: 1fr 1fr; gap: 5px; }
    .analysis-metric-item { padding: 8px; }
    .am-value { font-size: 14px; }
    .detection-result-item { padding: 6px 8px; gap: 6px; }
    .dri-icon { font-size: 16px; }
    .dri-type-line { font-size: 11px; }
    .conf-val { font-size: 11px; }

    /* 区域详情模态框更紧凑 */
    .detail-stats-flex { grid-template-columns: 1fr; gap: 8px; }
    .detail-stat-box { padding: 10px; }
    .stat-big-number { font-size: 22px; }
    .facilities-tags { gap: 5px; }
    .facility-tag { font-size: 10px; padding: 2px 8px; }
    .ai-monitor-preview { padding: 30px 12px; min-height: 130px; }
    .preview-icon-large { font-size: 32px; }
    .preview-title { font-size: 12px; }
    .report-heading { font-size: 11px; }

    /* 技术规格区域更紧凑 */
    .tech-summary-bar { font-size: 11px; padding: 8px 12px; }
    .tech-cards-row { grid-template-columns: 1fr; }
    .tech-card-item { padding: 8px; }
    .code-block-content { font-size: 8px; padding: 8px; line-height: 1.4; }
}

/* ===== 超小屏幕 (<380px) ===== */
@media (max-width: 380px) {
    .nav-link { font-size: 10px; padding: 5px 3px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .stat-card { padding: 8px 6px; }
    .stat-number { font-size: 20px; } .stat-icon { font-size: 18px; }
    .stat-label { font-size: 9px; }

    .quick-actions-grid-modern { grid-template-columns: 1fr 1fr; gap: 5px; }
    .action-card-enhanced { padding: 8px 6px; }
    .action-icon-circle { width: 30px; height: 30px; font-size: 14px; }
    .action-card-enhanced h3 { font-size: 11px; }

    .dashboard-stats-modern { grid-template-columns: 1fr 1fr; gap: 6px; }
    .chart-wrapper { height: 190px !important; }

    .scroll-item { padding: 2px 6px; font-size: 9px; height: 22px; }
    .scroll-item-icon { font-size: 11px; }
    .scroll-item-text { font-size: 9px; }

    .ranking-item-dashboard { grid-template-columns: 22px 1fr 38px 42px; padding: 6px; }
    .dept-tag { font-size: 8px; padding: 2px 6px; }
    .my-dept-position-card { padding: 8px; }
    .rid-name { font-size: 10px; }

    .timeline-item { grid-template-columns: 62px 1fr 32px 40px; font-size: 9px; padding: 6px; }

    .cam-buttons-grid { grid-template-columns: 1fr; }

    /* 超小屏幕用户中心进一步紧凑 */
    .user-actions-top .action-btn-large { height: 32px !important; font-size: 10px !important; padding: 4px 6px !important; gap: 3px !important; }
    .user-actions-top .action-btn-large .btn-icon { font-size: 12px !important; }
    .profile-main-modern { padding: 8px; gap: 8px; margin-bottom: 8px; }
    .profile-avatar-large { font-size: 34px; }
    .profile-name-large { font-size: 13px; margin: 2px 0 1px; }
    .user-meta-info { font-size: 9px; }
    .score-display-circle { width: 96px; height: 96px; }
    .score-value-big { font-size: 24px; }
    .score-max-small { font-size: 10px; }
    .credit-progress { width: 150px !important; margin: 6px auto !important; }
    .mini-stat-modern { padding: 6px 4px; }
    .mini-icon { font-size: 16px; margin-bottom: 1px; }
    .mini-value { font-size: 16px; }
    .mini-label { font-size: 9px; }
    .mini-trend { font-size: 8px; }
    .achievement-card-modern { padding: 6px; gap: 4px; }
    .acm-icon { font-size: 18px; }
    .acm-title { font-size: 10px; }
    .acm-desc { font-size: 8px; }
}

/* ===== 横屏手机 ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .page-header { padding: 10px 12px; margin-bottom: 8px; }
    .page-header h1 { font-size: 15px; margin-bottom: 2px; }
    .page-header p { font-size: 10px; display: none; }
    .modal-content { max-height: 94vh; }
    .rules-content-modern { max-height: 40vh; }
}

/* ===== 打印 ===== */
@media print {
    .navbar, .btn, .modal, .system-notification,
    .loading-spinner, .annc-tab-btn, [onclick] { display: none !important; }
    body { background: white; color: black; }
    .main-container { max-width: 100%; padding: 0; }
    .page { display: block !important; page-break-after: always; }
    .page.active { display: block !important; }
    .scrolling-notification-bar { page-break-inside: avoid; }
}