/* ========== 热力图模块 ========== */
.hm-container { display: flex; flex-direction: column; gap: 1rem; }

.hm-controls { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; padding: 0.5rem 0; }
.hm-tab-group { display: flex; gap: 0.25rem; }
.hm-tab { padding: 0.3rem 0.7rem; border-radius: var(--tw-radius-sm); background: var(--tw-bg-secondary); border: 1px solid var(--tw-border); font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.hm-tab.active { background: var(--tw-accent); color: #fff; border-color: var(--tw-accent); }

.hm-config { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.hm-config label { font-size: 0.8rem; color: var(--tw-text-secondary); }
.hm-config select, .hm-config input { padding: 0.25rem 0.5rem; border-radius: var(--tw-radius-sm); border: 1px solid var(--tw-border); background: var(--tw-bg-primary); color: var(--tw-text-primary); font-size: 0.8rem; width: auto; }

.heatmap-wrapper { position: relative; overflow-x: auto; }
.heatmap-wrapper canvas { display: block; border-radius: var(--tw-radius); background: var(--tw-bg-card); border: 1px solid var(--tw-border); }

.heatmap-tooltip { position: fixed; z-index: 1000; background: var(--tw-text-primary); color: var(--tw-bg-primary); padding: 0.3rem 0.6rem; border-radius: var(--tw-radius-sm); font-size: 0.75rem; pointer-events: none; white-space: nowrap; transform: translate(-50%, -100%); }

.hm-legend { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--tw-text-muted); }
.hm-legend-bar { width: 100px; height: 10px; border-radius: 5px; background: linear-gradient(to right, #e8f5e9, #1b5e20); }

.hm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.6rem; padding: 0.8rem; border-radius: var(--tw-radius); background: var(--tw-bg-secondary); }
.hm-stat { text-align: center; }
.hm-stat-value { font-size: 1.4rem; font-weight: 700; color: var(--tw-accent); }
.hm-stat-label { font-size: 0.75rem; color: var(--tw-text-muted); margin-top: 0.1rem; }

.hm-day-detail { padding: 0.8rem; border-radius: var(--tw-radius); background: var(--tw-bg-secondary); margin-top: 0.5rem; }
.hm-day-detail h4 { margin-bottom: 0.4rem; }
.hm-day-detail ul { list-style: none; padding: 0; }
.hm-day-detail li { padding: 0.3rem 0; font-size: 0.85rem; border-bottom: 1px solid var(--tw-border); }
.hm-day-detail li:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .hm-controls { gap: 0.3rem; }
  .hm-tab { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
  .hm-stats { grid-template-columns: repeat(2, 1fr); }
}
