/* ============================================
   WORKOUT LIST + OVERVIEW (post-login screens)
============================================ */
.hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.4rem;
}
.hub-header h2 {
  margin: 0;
  color: #4b3f5c;
  font-size: 1.4rem;
}

.hub-signout {
  background: none;
  border: none;
  color: #5f5648;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}
/* Make the top-row links on the workout list the same size */
#workout-list-view .hub-signout {
  font-size: 0.9rem;
}
/* Workout title on the overview screen: use the full width */
#overview-view .hub-header h2 {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  line-height: 1.25;
}

.hub-subtitle {
  color: #8a8073;
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
}

/* Progress bar */
.hub-progress-track {
  height: 5px;
  background: #eee6da;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.6rem;
}
.hub-progress-fill {
  height: 100%;
  background: #c6b7e2;
  transition: width 0.4s ease;
}

/* Exercise list (overview) */
.hub-exercise-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #eee2f2;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.hub-exercise-row:hover { border-color: #c6b7e2; }
.hub-exercise-row.done {
  background: #f7f3ff;
  border-color: #ddd2eb;
}

.hub-exercise-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eee6da;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #8a8073;
}
.hub-exercise-row.done .hub-exercise-badge {
  background: #c6b7e2;
  color: #3f3550;
}

.hub-exercise-name {
  font-weight: 600;
  color: #333;
  font-size: 0.98rem;
}
.hub-exercise-meta {
  color: #8a8073;
  font-size: 0.82rem;
  margin-top: 2px;
}

/* Workout list */
#workout-list-view { display: none; }

.hub-workout-section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a7f74;
  margin: 1rem 0 0.5rem;
}

.hub-workout-row .hub-workout-date {
  font-size: 0.85rem;
  color: #3f3550;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: 0 0 1px #faf7f2;
}
.hub-workout-row .hub-workout-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #3f3550;
  flex: 1;
  min-width: 0;
  text-shadow: 0 0 1px #faf7f2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-workout-row {
  background: #eee6da;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(75, 63, 92, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hub-workout-row:hover {
  background: #c6b7e2;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(75, 63, 92, 0.35);
}
.hub-workout-row.completed:hover { filter: none; transform: none; box-shadow: none; }
.hub-workout-top-row {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.hub-workout-row.completed {
  background: #eee6da;
  box-shadow: none;
  cursor: default;
}
.hub-workout-row.completed .hub-workout-date { color: #3f3550; font-size: 0.75rem; text-shadow: none; }
.hub-workout-body {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.hub-workout-row.completed .hub-workout-title {
  color: #3f3550;
  font-size: 0.92rem;
  text-shadow: none;
  display: block;
}
.hub-completed-badge {
  background: #3fae7a;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.hub-view-summary-btn:hover {
  background: rgba(115, 224, 148, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.hub-view-summary-btn {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #3fae7a;
  color: #3fae7a;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hub-workout-row .hub-workout-title.expanded,
.hub-workout-row.completed .hub-workout-title.expanded {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
}

/* Completed cards use cursor: default, so show the title is tappable */
.hub-workout-row.completed .hub-workout-title {
  cursor: pointer;
}

#workout-summary-view {
  background: #eee6da;
  border-radius: 20px;
  padding: 1.5rem 1.25rem;
  margin: 0 auto;
  max-width: 420px;
  position: relative;
}

/* Note snippet on list-view workout cards */
.hub-workout-note {
  font-size: 0.8rem;
  color: #6b6070;
  margin-top: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.hub-workout-note.expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
  white-space: pre-wrap;
}

/* Note above the date in workout detail view */
.hub-workout-note-detail {
  color: #4b3f5c;
  background: #f3effa;
  border-left: 3px solid #ddd2eb;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  white-space: pre-wrap;
  display: none; /* toggled on in renderOverview when a note exists */
}

/* Tab row under "My Workouts" (Website / Workouts / History) */
.hub-tab-row {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid #ddd2eb;
  margin: 0.6rem 0 0.4rem;
}
.hub-tab {
  padding: 8px 0;
  margin-bottom: -1px;
  font-size: 0.95rem;
  color: #8a8073;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.hub-tab:hover:not(.active) {
  color: #4b3f5c;
}
.hub-tab.active {
  color: #4b3f5c;
  font-weight: 700;
  border-bottom-color: #4b3f5c;
}

/* Weekly note */
.hub-weekly-note {
  background: #ece6f5;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 0.9rem;
}
.hub-weekly-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.hub-weekly-note-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8073;
}
.hub-weekly-note-chev {
  font-size: 1.1rem;
  line-height: 1;
  color: #7c5cbf;
}
.hub-weekly-note-body {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4b3f5c;
  white-space: pre-wrap;
}
.hub-weekly-note.collapsed .hub-weekly-note-body {
  display: none;
}