/* ============================================
   HISTORY (stats, table, notes popups)
============================================ */
.hub-history-link {
  display: block;
  text-align: right;
  font-size: 0.7rem;
  color: #8a8073;
  text-decoration: underline;
  margin-bottom: 0.4rem;
}

.hub-history-date-group {
  border-bottom: 1px solid #eee2f2;
  padding: 0.8rem 0;
}

.hub-history-date {
  font-weight: 700;
  color: #333;
  margin-bottom: 0.4rem;
}

.hub-history-set {
  color: #8a8073;
  font-size: 0.9rem;
  padding: 2px 0;
}

.hub-history-stats-row {
  display: flex;
  justify-content: space-around;
  background: #f2ede4;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 1rem;
}
.hub-history-stat {
  text-align: center;
}
.hub-history-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #8a8073;
  margin-bottom: 4px;
}
.hub-history-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
}

.hub-history-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
}
.hub-history-table {
  border-radius: 12px;
  overflow: hidden;
  min-width: 500px; /* 5 columns x 80px min + gaps, below this the wrap scrolls instead */
}
.hub-history-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(80px, 1fr));
  align-items: center;
  padding: 8px 14px;
  column-gap: 0px;
  row-gap: 12px;
}
.hub-history-row:nth-child(odd) {
  background: #f2ede4;
}
.hub-history-row:nth-child(even) {
  background: #faf7f2;
}
.hub-history-row.header {
  background: #ddd2eb;
  font-weight: 700;
  color: #4b3f5c;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hub-history-cell {
  font-size: 0.9rem;
  color: #333;
  text-align: center;
}

.hub-history-summary-link {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.75rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 400;
  color: #7c5cbf;
  text-decoration: underline;
  cursor: pointer;
}

/* Note "..." button and popup */
.hub-note-dots {
  background: none;
  border: none;
  color: #8a8073;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0 4px;
}
.hub-note-popup {
  white-space: pre-wrap;
  position: absolute;
  max-width: 220px;
  background: #faf7f2;
  border: 1px solid #ddd2eb;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.75rem;
  color: #4b3f5c;
  line-height: 1.3;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  z-index: 999;
}