/* ========== DASHBOARD ENTRANCE ANIMATIONS ========== */
.greeting-section { animation: dashIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.stats-row { animation: dashIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both; }
.stat-card:nth-child(1) { animation: statPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
.stat-card:nth-child(2) { animation: statPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.stat-card:nth-child(3) { animation: statPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }

@keyframes statPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.week-strip-container { animation: dashIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.today-workout-card { animation: dashIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }

@keyframes dashIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== GREETING ========== */
.greeting-section {
  padding: var(--space-sm) 0;
}

.hero-greeting {
  font-size: clamp(28px, 8vw, 38px) !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em !important;
  text-transform: none;
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.greeting-section h2 {

  font-size: 1.75rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  text-transform: none;
  line-height: 1.2;
  color: rgba(255,255,255,0.9);
}

.greeting-section .text-secondary {
  font-size: 0.8125rem;
  margin-top: 3px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.greeting-section .text-secondary:last-child {
  color: rgba(204,255,0,0.7);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* ========== STATS ROW ========== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: var(--space-md);
}

.stat-card {
  padding: 16px 10px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: none;
  border-radius: 16px;
  transition: transform 0.15s cubic-bezier(0.32, 0.72, 0, 1);
}

.stat-card:active {
  transform: scale(0.96);
}

/* Subtle top-edge glow */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(204,255,0,0.2), transparent);
}

.stat-value {

  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.5625rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ========== SECTION HEADER ========== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: var(--space-md) 0 var(--space-xs);
}

.section-header h2 {

  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text-primary);
}

.section-header h3 {

  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
  color: var(--text-tertiary);
}

/* ========== COACH LINK BANNER ========== */
.coach-link-banner {
  padding: var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-lg);
  border-color: rgba(204,255,0,0.12);
  text-align: center;
  background: linear-gradient(150deg, rgba(204,255,0,0.05) 0%, rgba(10,10,10,0.95) 60%);
  position: relative;
  overflow: hidden;
}

.coach-link-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  opacity: 0.4;
}

.coach-link-banner h3 {

  font-size: 1.375rem;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--lime);
  margin-bottom: 6px;
}

.coach-link-banner p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

/* ========== PROFILE ========== */
.profile-card {
  padding: var(--space-lg);
}

.profile-coach-name {
  padding: 12px 14px;
  background: var(--lime-subtle);
  border: 1px solid var(--lime-border);
  border-radius: 8px;
  color: var(--lime);

  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Profile banner + avatar */
.profile-banner-section {
  position: relative;
  margin-bottom: var(--space-lg);
}

.profile-banner {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, rgba(204,255,0,0.08) 0%, rgba(30,30,32,1) 100%);
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.profile-banner.has-banner {
  background: none;
  background-size: cover;
  background-position: center;
}

.profile-banner-edit {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.5);
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.profile-avatar-over-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -50px;
  position: relative;
  z-index: 2;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) 0;
}

.profile-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  border: 3px solid var(--bg-primary);
}

.profile-avatar-lg.has-photo {
  color: transparent;
}

.profile-avatar-edit {
  margin-top: 6px;
  font-size: 13px;
  color: var(--lime);
  font-weight: 500;
  cursor: pointer;
}

/* ============================================================
   CLIENT PROFILE — iOS-style settings rows.
   ============================================================ */
.profile-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 18px 6px 6px;
}

.profile-list {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
  background: rgba(255,255,255,0.04);
  border: 0.5px solid var(--border-primary);
  border-radius: 12px;
  overflow: hidden;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--text-primary);
  border-top: 0.5px solid var(--border-primary);
  cursor: pointer;
  transition: background 0.12s;
}
.profile-row:first-child { border-top: none; }
.profile-row:active { background: rgba(255,255,255,0.04); }
.profile-row.locked { cursor: default; }
.profile-row.locked:active { background: transparent; }
.profile-row.locked .profile-row-chev { display: none; }

.profile-row-label {
  color: var(--text-secondary);
  font-weight: 500;
}
.profile-row-value {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  max-width: 60%;
  text-align: right;
}
.profile-row-value span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-row-chev {
  color: var(--text-tertiary);
  font-size: 18px;
  line-height: 1;
  font-weight: 300;
}

/* Coach card on profile */
.profile-coach-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border: 0.5px solid var(--border-primary);
  border-radius: 12px;
  margin-top: 18px;
}
.profile-coach-card .profile-coach-avatar {
  width: 44px;
  height: 44px;
  font-size: 17px;
}
.profile-coach-meta { flex: 1; min-width: 0; }
.profile-coach-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.profile-coach-card .profile-coach-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-signout {
  display: block;
  width: 100%;
  margin: 28px 0 12px;
  background: none;
  border: none;
  color: var(--danger);
  font-size: 15px;
  font-weight: 500;
  padding: 12px;
  cursor: pointer;
  text-align: center;
}
.profile-signout:active { opacity: 0.7; }

/* Field editor — bottom sheet for inline edits */
.profile-editor {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
}
.profile-editor-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}
.profile-editor-sheet {
  position: relative;
  width: 100%;
  background: var(--bg-secondary, #111);
  border-radius: 16px 16px 0 0;
  padding: 14px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  border: 0.5px solid var(--border-primary);
  border-bottom: none;
}
.profile-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.profile-editor-cancel,
.profile-editor-save {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 4px;
}
.profile-editor-save { color: var(--lime); font-weight: 600; }
.profile-editor-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.profile-editor-body input,
.profile-editor-body select {
  width: 100%;
  font-size: 16px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border: 0.5px solid var(--border-primary);
  border-radius: 10px;
}

.profile-info-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.profile-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.profile-info-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.profile-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Specialty chips */
.chip-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-option {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;

}

.chip-option.selected {
  background: var(--lime);
  color: #000;
  border-color: var(--lime);
}

.chip-option:active {
  transform: scale(0.95);
}

/* Qualifications */
.qualification-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 13px;
  margin: 0 4px 4px 0;
}

.qualification-chip button {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 50px;
  height: 28px;
  display: inline-block;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-tertiary);
  border-radius: 28px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--lime);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Coach profile collapsible sections */
.coach-profile-section {
  margin-bottom: var(--space-sm);
  overflow: hidden;
}

.coach-profile-section summary {
  padding: var(--space-md);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coach-profile-section summary::after {
  content: '›';
  font-size: 18px;
  color: var(--text-tertiary);
  transition: transform 0.2s;
}

.coach-profile-section[open] summary::after {
  transform: rotate(90deg);
}

/* ========== TODAY'S WORKOUT ========== */
.today-workout-card {
  width: 100%;
  padding: 20px 16px 16px;
  margin-bottom: var(--space-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.today-workout-card:active {
  transform: scale(0.985);
}

/* Ambient glow behind the card */
.today-workout-card::before {
  content: '';
  position: absolute;
  top: -30%; left: -10%;
  width: 60%; height: 80%;
  background: radial-gradient(ellipse, rgba(204,255,0,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.today-workout-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(204,255,0,0.1), transparent);
}

/* Title row: name on the left, status pill + preview eye on the right. */
.workout-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  position: relative;
  z-index: 2;
}

.workout-card-head .workout-name {
  flex: 1;
  min-width: 0;
}

.card-eye-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin: -4px -4px -4px 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.card-eye-btn:active {
  color: var(--lime);
  background: var(--lime-tint);
}

.today-workout-card .workout-name {

  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.today-workout-card .workout-meta {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  margin-bottom: var(--space-lg);
}

.today-workout-card .start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 24px;
  background: var(--lime);
  color: #000;
  border: none;
  border-radius: 12px;

  font-weight: 600;
  font-size: 17px;
  text-transform: none;
  letter-spacing: -0.01em;
  cursor: pointer;
  min-height: 52px;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
  position: relative;
  z-index: 2;
  margin-top: 12px;
  box-shadow: 0 0 20px rgba(204,255,0,0.1), 0 2px 8px rgba(0,0,0,0.3);
}

.today-workout-card .start-btn:active {
  transform: scale(0.975);
  box-shadow: 0 0 30px rgba(204,255,0,0.15), 0 1px 4px rgba(0,0,0,0.4);
}

.no-workout {
  text-align: center;
  padding: var(--space-md) 0;
  color: var(--text-secondary);
}

.no-workout p:first-child {

  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-tertiary);
  margin-bottom: var(--space-xs);
}

/* ========== WEIGHT ENTRY ========== */
.weight-entry-compact {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
}

.weight-entry-compact input[type="number"] {
  flex: 1;
  min-width: 0;
}

.weight-entry-compact select {
  width: 64px;
  flex-shrink: 0;
}

.weight-cal-btn {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.weight-cal-btn:hover {
  color: var(--lime);
}

/* ========== WORKOUT PREVIEW ========== */
/* Header and footer are fixed rails either side of the scrolling list — see the
   #workoutPreviewView .view-content rule in workout.css. The view already pads
   for the safe area, so this must not add it a second time. */
.workout-preview-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  background: var(--bg-primary);
  flex-shrink: 0;
}

.workout-preview-header h2 {

  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: none;
  margin: 0;
}

.exercise-preview-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-xs);
}

.exercise-preview-num {

  font-size: 0.75rem;
  color: var(--lime);
  min-width: 20px;
  padding-top: 2px;
  flex-shrink: 0;
}

.exercise-preview-body {
  flex: 1;
  min-width: 0;
}

.exercise-preview-name {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 2px;
}

.exercise-preview-muscle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: none;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.exercise-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.exercise-preview-chip {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lime);
  background: rgba(180, 255, 0, 0.1);
  border: 1px solid rgba(180, 255, 0, 0.25);
  border-radius: 4px;
  padding: 2px 8px;
  letter-spacing: 0.03em;
}

.workout-preview-footer {
  padding: var(--space-md) 0;
  padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  background: var(--bg-primary);
  flex-shrink: 0;
}

