/* ============================================
   CLIENT HUB — shared page wrapper
============================================ */
.hub-wrap {
  max-width: 460px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
}

/* ============================================
   LOGIN SCREEN
============================================ */
#login-screen {
  background: #f2ede4;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
}

#login-screen h2 {
  margin: 0 0 0.4rem;
  color: #4b3f5c;
  font-size: 1.5rem;
}

#login-screen p.hint {
  margin: 0 0 1.6rem;
  color: #5f5648;
  font-size: 0.9rem;
}

.hub-input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.9rem;
  border: 1px solid #ddd2eb;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #222;
}

.hub-input:focus {
  outline: none;
  border-color: #c6b7e2;
}

.hub-btn {
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 999px;
  background-color: #c6b7e2;
  color: #3f3550;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.hub-btn:hover {
  background-color: #ddd2eb;
  transform: translateY(-1px);
}

.hub-error {
  color: #b3441f;
  font-size: 0.85rem;
  margin-top: 0.8rem;
  min-height: 1.2rem;
}
/* ============================================
   LOGIN / SIGNUP TOGGLE
============================================ */
.hub-toggle {
  display: flex;
  gap: 6px;
  background: #eee6da;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1.4rem;
}
.hub-toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 0;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #8a8073;
  cursor: pointer;
}
.hub-toggle-btn.active {
  background: #fff;
  color: #4b3f5c;
}

.hub-success {
  color: #4a7a55;
  font-size: 0.85rem;
  margin-top: 0.8rem;
}
/* ============================================
   APP SCREEN (post-login)
============================================ */
#app-screen { display: none; }

.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;
}

.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;
}

/* Exercise detail view */
#detail-view { display: none; }

.hub-back-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #4b3f5c;
  cursor: pointer;
  padding: 4px 8px;
  margin-bottom: 0.6rem;
}

.hub-video-box {
  background: linear-gradient(135deg, #eee2f2, #f2ede4);
  border-radius: 16px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a698b8;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

.hub-exercise-title {
  color: #333;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}
.hub-exercise-target {
  color: #8a8073;
  font-size: 0.85rem;
  margin: 0;
}

.hub-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #f2ede4;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 0.8rem;
}

.hub-stepper {
  text-align: center;
}
.hub-stepper-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #8a8073;
  margin-bottom: 6px;
}
.hub-stepper-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hub-stepper-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #ddd2eb;
  color: #4b3f5c;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.hub-stepper-value {
  border: none;
  background: transparent;
  text-align: center;
  font-family: inherit;
  outline: none;
  font-size: 1.6rem;
  font-weight: 700;
  color: #333;
  width: 60px;
  box-sizing: border-box;
}

.hub-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.hub-sets-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #8a8073;
  margin: 0;
}

.hub-target-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.hub-set-dots {
  display: flex;
  gap: 4px;
}

.hub-set-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #c6b7e2;
  transition: background-color 0.2s ease;
}

.hub-set-dot.filled {
  background: #c6b7e2;
}

.hub-action-row {
  display: flex;
  gap: 10px;
}

.hub-skip-btn {
  flex: 1;
  background: #fff;
  border: 1px solid #ddd2eb;
  border-radius: 12px;
  color: #5f5648;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 13px 0;
}

.hub-done-btn {
  flex: 2;
  background: #c6b7e2;
  border: none;
  border-radius: 12px;
  color: #3f3550;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 13px 0;
  transition: background-color 0.2s ease;
}
.hub-done-btn:hover { background-color: #ddd2eb; }

.hub-loading, .hub-empty {
  text-align: center;
  color: #8a8073;
  padding: 2rem 0;
}
/* ============================================
   CONFIRMATION PAGE LINK BUTTON
============================================ */
.hub-btn-link {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background-color: #c6b7e2;
  color: #3f3550;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.hub-btn-link:hover {
  background-color: #ddd2eb;
  transform: translateY(-1px);
}
/* ============================================
   COACH DASHBOARD ADD-ONS
============================================ */
textarea.hub-input {
  resize: vertical;
  font-family: inherit;
}

.hub-client-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #eee2f2;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.hub-client-row:hover { border-color: #c6b7e2; }
.hub-client-row .name { font-weight: 600; color: #333; }
.hub-client-row .email { color: #8a8073; font-size: 0.82rem; margin-top: 2px; }

.hub-workout-row {
  background: #f7f3ff;
  border: 1px solid #ddd2eb;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
}
.hub-workout-row:hover { border-color: #c6b7e2; }
.hub-workout-row .title { font-weight: 600; color: #333; font-size: 0.92rem; }
.hub-workout-row .date { color: #8a8073; font-size: 0.8rem; margin-top: 2px; }

.hub-coach-exercise-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #eee2f2;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.hub-coach-exercise-row .name { font-weight: 600; color: #333; font-size: 0.92rem; }
.hub-coach-exercise-row .spec { color: #8a8073; font-size: 0.8rem; margin-top: 2px; }

.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 {
  border-radius: 12px;
  overflow: hidden;
}

.hub-history-row {
  display: flex;
  padding: 10px 14px;
}

.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;
}

.hub-history-cell {
  flex: 1;
  font-size: 0.9rem;
  color: #333;
}

.hub-history-cell.date {
  text-align: left;
}

.hub-history-cell.reps {
  text-align: center;
}

.hub-history-cell.weight {
  text-align: right;
}
.exercise-search-input {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 4px;
  box-sizing: border-box;
  font-size: 14px;
}

.exercise-search-results {
  height: 200px;        /* was max-height */
  overflow-y: scroll;    /* was auto — forces the scrollbar to always show */
  border: 1px solid #ddd;
  border-radius: 6px;
}

.exercise-option {
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.exercise-option:last-child {
  border-bottom: none;
}

.exercise-option:hover {
  background-color: #f0f0f5;
}
.tag-picker-wrap {
  position: relative;
  margin-bottom: 0.6rem;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.tag-chip {
  background: #ece6f5;
  color: #4b3f5c;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-chip .remove-tag {
  cursor: pointer;
  font-weight: bold;
}

.tag-suggestions {
  position: absolute;
  z-index: 10;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  max-height: 180px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

.tag-suggestion-item {
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}

.tag-suggestion-item:hover {
  background: #f0f0f5;
}

.tag-suggestion-create {
  font-style: italic;
  color: #6b5b8a;
}
.tag-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag-filter-chip {
  background: #f0f0f5;
  color: #4b3f5c;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid #ddd;
}

.tag-filter-chip:hover {
  background: #e4e0ee;
}

.tag-filter-chip.active {
  background: #6b5b8a;
  color: #fff;
  border-color: #6b5b8a;
}
.hub-video-box {
  position: relative;
  overflow: hidden;
  cursor: default;
}

.hub-video-box.has-video {
  cursor: pointer;
}

.hub-video-box iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: inherit;
}

.hub-video-box .play-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #7c5cbf; /* adjust to match your purple */
  pointer-events: none;
}
#workout-list-view { display: none; }

.hub-workout-row {
  padding: 1rem;
  border-radius: 12px;
  background: #f5f0ea;
  margin-bottom: 0.75rem;
  cursor: pointer;
}
.hub-workout-row:hover { background: #eee3d6; }
.hub-workout-row .hub-workout-date {
  font-size: 0.85rem;
  color: #8a7f74;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hub-workout-row .hub-workout-title {
  font-weight: 600;
  font-size: 1.05rem;
}
.hub-workout-section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a7f74;
  margin: 1rem 0 0.5rem;
}
.hub-completed-badge {
  color: #4a8f5c;
  font-weight: 600;
  margin-left: 0.5rem;
}