/* ═══════════════════════════════════════════
   Hyper-V Monitor — 总览页样式
   ═══════════════════════════════════════════ */

/* ── 分组区块 ── */
.group-section {
  margin-bottom: 20px;
}

.group-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1d2e;
  padding: 10px 0;
  border-bottom: 2px solid #4a90d9;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-title .count {
  font-size: 12px;
  font-weight: 400;
  color: #888;
}

/* ── 三列布局 ── */
.overview-row {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}

.overview-col {
  flex: 1;
  min-width: 0;
  max-width: 33.33%;
}

.overview-col-title {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: #f8f9fb;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.overview-col-title .icon {
  font-size: 16px;
}

/* ── TOP 列表 ── */
.top-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.top-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #eee;
  transition: box-shadow 0.15s;
  cursor: pointer;
  gap: 10px;
}

.top-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: #d0d7e0;
}

.top-item.selected {
  border-color: #4a90d9;
  background: #eef3ff;
  box-shadow: 0 0 0 2px rgba(74,144,217,0.3);
}

.top-item .rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.rank-2 { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #a0522d); }
.rank-other { background: #e5e7eb; color: #6b7280 !important; }

.top-item .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.top-item .name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1d2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-item .host {
  font-size: 11px;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-item .ip {
  font-size: 11px;
  color: #aaa;
  font-family: Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-item .val {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-family: Consolas, monospace;
}

.val-traffic { color: #34d399; }
.val-cpu-warn { color: #ef4444; }
.val-cpu-mid { color: #f59e0b; }
.val-cpu-ok { color: #3b82f6; }

/* ── 排名进度条 ── */
.top-item .bar-wrap {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: #f0f0f0;
  width: 100%;
  border-radius: 0 0 6px 6px;
}

.top-item {
  position: relative;
  overflow: hidden;
}

.top-item .bar-fill {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  border-radius: 0 0 6px 6px;
  transition: width 0.5s ease;
}

.bar-traffic { background: linear-gradient(90deg, #34d399, #6ee7b7); }
.bar-cpu { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bar-disk { background: linear-gradient(90deg, #8b5cf6, #c4b5fd); }
.val-disk { color: #8b5cf6; }

/* ── 空状态 ── */
.top-empty {
  padding: 20px;
  text-align: center;
  color: #bbb;
  font-size: 13px;
  background: #fff;
  border-radius: 6px;
  border: 1px dashed #e0e0e0;
}

/* ── 合并模式（流量+CPU 同一行，仅存在一种数据时） ── */
.overview-single .overview-col {
  flex: none;
  width: 100%;
}

/* ── 刷新动画 ── */
.group-section.refreshing .top-item {
  opacity: 0.6;
  transition: opacity 0.15s;
}

/* ── 响应式 ── */
@media (max-width: 900px) {
  .overview-row {
    flex-direction: column;
  }
  .overview-col {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
}
