/* FitPulse Pro - Modern Dark Fitness UI (Emerald Athletic Minimalist System) */
:root {
  --bg-dark: #08090c;
  --bg-pitch: #000000;
  --bg-card: #13151b;
  --bg-card-elevated: #1a1e28;
  --bg-card-hover: #212634;
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-border-bright: rgba(0, 200, 150, 0.4);
  --border-subtle: #242834;

  /* Modern Athletic Emerald Palette (Inspired by Life Fitness / Apple Fitness+) */
  --emerald-primary: #00c896;
  --emerald-bright: #10b981;
  --emerald-dark: #059669;
  --emerald-glow: rgba(0, 200, 150, 0.35);
  --emerald-glow-subtle: rgba(0, 200, 150, 0.12);
  --primary-gradient: linear-gradient(135deg, #00c896 0%, #059669 100%);
  --primary-glow: rgba(0, 200, 150, 0.35);

  /* Compatibility bindings for existing components */
  --primary-red: #00c896;
  --primary-orange: #00c896;
  --accent-cyan: #00c896;
  --accent-cyan-glow: rgba(0, 200, 150, 0.25);
  --accent-green: #00c896;
  --accent-green-glow: rgba(0, 200, 150, 0.25);
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;

  /* Sage Green Muted Tags */
  --sage-tag-bg: rgba(0, 200, 150, 0.14);
  --sage-tag-border: rgba(0, 200, 150, 0.28);
  --sage-tag-text: #6ee7b7;

  /* High Legibility Dark Mode Typography */
  --text-main: #ffffff;
  --text-muted: #8e95a2;
  --text-dim: #5f6676;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --nav-height: 68px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

body {
  padding-bottom: calc(var(--nav-height) + 20px);
}

/* ============================================== */
/* APP HEADER */
/* ============================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  gap: 10px;
}

.header-left {
  display: flex;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 24px;
  line-height: 1;
}

.logo-text h1 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #fff;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 5px;
}

.logo-text h1 span {
  font-size: 10px;
  font-weight: 800;
  background: var(--primary-gradient);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
}

.logo-text p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.streak-pill {
  background: rgba(255, 107, 43, 0.12);
  border: 1px solid rgba(255, 107, 43, 0.28);
  color: #ff9248;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.streak-fire {
  font-size: 13px;
}

.streak-label {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

.header-icon-btn {
  background: var(--bg-card-elevated);
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.header-icon-btn:hover {
  color: #fff;
  border-color: var(--surface-border-bright);
}

/* ============================================== */
/* MAIN CONTAINER & TABS */
/* ============================================== */
.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 14px 20px;
}

.tab-page {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Common Section Headers */
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 22px 0 14px;
  gap: 12px;
}

.section-title-row h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.btn-link-action {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  padding: 4px 0;
  transition: var(--transition);
}

.btn-link-action:hover {
  filter: brightness(1.2);
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(255, 51, 75, 0.12);
  color: var(--primary-red);
  border: 1px solid rgba(255, 51, 75, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-tag.green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  border-color: rgba(16, 185, 129, 0.25);
}

/* ============================================== */
/* TAB 1: TODAY'S HERO CARD & DETECTED WORKOUT */
/* ============================================== */
.today-hero-card {
  background: linear-gradient(135deg, rgba(20, 28, 45, 0.85) 0%, rgba(12, 16, 26, 0.95) 100%);
  border: 1px solid var(--surface-border-bright);
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  margin-bottom: 20px;
}

.today-hero-card::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.today-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.today-detected-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 51, 75, 0.15);
  border: 1px solid rgba(255, 51, 75, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #fff;
}

.day-date-sub {
  color: #ff9248;
  font-weight: 600;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-red);
  box-shadow: 0 0 10px var(--primary-red);
}

.live-dot.pulse {
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

.today-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.today-status-badge.completed {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.today-hero-card h2 {
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
  line-height: 1.2;
}

.today-workout-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 18px;
}

/* Today's Metrics Grid */
.today-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.metric-card {
  background: rgba(10, 14, 23, 0.7);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.metric-icon {
  font-size: 16px;
}

.metric-val {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  white-space: nowrap;
}

.metric-lbl {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Today CTA Button */
.today-cta-box {
  display: flex;
}

.btn-start-hero {
  width: 100%;
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px var(--primary-glow);
  transition: var(--transition);
}

.btn-start-hero:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 28px var(--primary-glow);
}

.btn-start-hero:active {
  transform: translateY(0);
}

.btn-start-hero .btn-icon {
  font-size: 16px;
}

/* Rest Day Card */
.rest-day-card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
}

.rest-day-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

.rest-day-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  color: #fff;
  margin-bottom: 8px;
}

.rest-day-card p {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 440px;
  margin: 0 auto 16px;
}

/* ============================================== */
/* EXERCISE CARDS LIST (TODAY & SCHEDULE) */
/* ============================================== */
.exercises-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 14px;
  align-items: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.exercise-card:hover {
  border-color: var(--surface-border-bright);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.exercise-card.is-finisher::before {
  content: 'METABOLIC FINISHER';
  position: absolute;
  top: 6px;
  right: 12px;
  font-size: 9px;
  font-weight: 800;
  color: var(--primary-orange);
  letter-spacing: 0.6px;
}

.ex-thumb-box {
  width: 88px;
  height: 72px;
  background: #000;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.ex-thumb-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.play-overlay-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 18px;
  transition: var(--transition);
}

.exercise-card:hover .play-overlay-icon {
  background: rgba(255, 51, 75, 0.55);
}

.ex-info-box {
  min-width: 0;
}

.ex-info-box h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.tag-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.tag-badge.muscle {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-cyan);
}

.tag-badge.equipment {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.tag-badge.compound {
  background: rgba(255, 107, 43, 0.14);
  color: var(--primary-orange);
}

.ex-prescription {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ex-prescription span {
  color: var(--text-dim);
  font-weight: 400;
}

.ex-coach-tip {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-actions-box {
  display: flex;
  align-items: center;
}

.btn-card-preview {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--surface-border);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-card-preview:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
}

/* ============================================== */
/* TAB 2: SCHEDULE & MONDAY - SUNDAY BAR */
/* ============================================== */
.schedule-header-card {
  background: linear-gradient(135deg, rgba(20, 26, 40, 0.8), rgba(12, 16, 24, 0.95));
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
}

.schedule-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.cycle-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(7, 9, 14, 0.7);
  border: 1px solid var(--surface-border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--text-muted);
}

.cycle-picker select {
  background: none;
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.cycle-picker select option {
  background: #101420;
  color: #fff;
}

.schedule-header-card h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.schedule-header-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.schedule-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 9, 14, 0.5);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.strip-val {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.strip-lbl {
  font-size: 10px;
  color: var(--text-dim);
}

.strip-divider {
  width: 1px;
  height: 24px;
  background: var(--surface-border);
}

/* Horizontal Day Picker Bar */
.days-scroll-wrapper {
  overflow-x: auto;
  margin: 0 -16px 16px;
  padding: 0 16px 6px;
  -webkit-overflow-scrolling: touch;
}

.days-bar {
  display: flex;
  gap: 8px;
  min-width: max-content;
}

.day-pill {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  min-width: 78px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.day-pill:hover {
  border-color: var(--surface-border-bright);
}

.day-pill.active {
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.day-pill.is-today::before {
  content: 'TODAY';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-cyan);
  color: #000;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.day-pill-name {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.day-pill-sub {
  font-size: 11px;
  color: var(--text-dim);
}

.day-pill.active .day-pill-sub {
  color: rgba(255, 255, 255, 0.9);
}

/* Selected Day Banner */
.selected-day-banner {
  background: var(--bg-card-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.selected-day-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
}

.selected-day-banner h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.selected-day-banner p {
  font-size: 12px;
  color: var(--text-muted);
}

.selected-day-action-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.selected-day-chips {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.btn-start-action {
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: var(--transition);
}

.btn-start-action:hover {
  transform: translateY(-1px);
}

/* ============================================== */
/* TAB 3: TRACKING & DAY-WISE PERFORMANCE */
/* ============================================== */
.performance-hero-card {
  background: linear-gradient(135deg, rgba(20, 28, 44, 0.9), rgba(10, 14, 22, 0.95));
  border: 1px solid var(--surface-border-bright);
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.perf-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 12px;
}

.perf-header-row h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

.streak-badge-large {
  background: rgba(255, 107, 43, 0.15);
  border: 1px solid rgba(255, 107, 43, 0.35);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

.streak-badge-large .fire-icon {
  font-size: 24px;
}

.streak-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: #ff9248;
  line-height: 1;
  display: block;
}

.streak-sub {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 4-Stat High Performance Grid */
.perf-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.perf-stat-box {
  background: rgba(10, 14, 23, 0.7);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.perf-stat-icon {
  font-size: 16px;
}

.perf-stat-val {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.perf-stat-lbl {
  font-size: 10px;
  color: var(--text-dim);
}

/* 7-Day Consistency Week Ring */
.weekly-consistency-box {
  background: rgba(10, 14, 23, 0.5);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.consistency-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.consistency-hint {
  font-size: 11px;
  color: var(--accent-green);
  font-weight: 700;
}

.consistency-days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.consistency-day-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.consistency-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
  transition: var(--transition);
}

.consistency-day-col.done .consistency-ring {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #000;
  box-shadow: 0 0 10px var(--accent-green-glow);
}

.consistency-day-col.today .consistency-ring {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
}

.consistency-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.consistency-day-col.today .consistency-lbl {
  color: var(--accent-cyan);
  font-weight: 800;
}

/* Day-Wise Workout Log History List */
.log-actions-row {
  display: flex;
  gap: 8px;
}

.btn-primary-xs {
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.btn-ghost-xs {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--surface-border);
  color: var(--text-dim);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.btn-ghost-xs:hover {
  color: var(--primary-red);
}

.workout-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: var(--transition);
}

.history-card:hover {
  border-color: var(--surface-border-bright);
}

.history-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.history-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-complete-tag {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.history-card h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.history-metrics-row {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--surface-border);
}

.history-metric-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.history-metric-item strong {
  color: #fff;
}

.history-details-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
}

.history-details-toggle:hover {
  color: var(--accent-cyan);
}

.history-breakdown-box {
  margin-top: 10px;
  background: rgba(7, 9, 14, 0.5);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: none;
  font-size: 12px;
}

.history-breakdown-box.open {
  display: block;
}

.history-exercise-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.history-exercise-line:last-child {
  border-bottom: none;
}

.empty-history-card {
  background: var(--bg-card);
  border: 1px dashed var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
}

.empty-history-icon {
  font-size: 38px;
  margin-bottom: 10px;
}

.empty-history-card h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  color: #fff;
  margin-bottom: 4px;
}

.empty-history-card p {
  font-size: 12px;
  color: var(--text-dim);
}

/* ============================================== */
/* TAB 4: EXERCISE VAULT & SEARCH */
/* ============================================== */
.library-header {
  margin-bottom: 16px;
}

.library-header h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.library-header p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.search-box-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-dim);
}

.search-input-wrapper input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 10px 34px 10px 36px;
  border-radius: var(--radius-full);
  outline: none;
  transition: var(--transition);
}

.search-input-wrapper input:focus {
  border-color: var(--primary-red);
  background: var(--bg-card-elevated);
}

.btn-clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  display: none;
}

.gender-pill-toggle {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-full);
  padding: 3px;
}

.gender-pill-toggle .pill-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.gender-pill-toggle .pill-btn.active {
  background: var(--primary-red);
  color: #fff;
}

.category-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px 12px;
  padding: 0 16px 4px;
  -webkit-overflow-scrolling: touch;
}

.chip {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.chip:hover {
  color: #fff;
  border-color: var(--surface-border-bright);
}

.chip.active {
  background: #fff;
  color: #000;
  font-weight: 700;
  border-color: #fff;
}

.library-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.library-sort-select select {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  outline: none;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.lib-card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
}

.lib-card:hover {
  transform: translateY(-2px);
  border-color: var(--surface-border-bright);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lib-video-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  overflow: hidden;
}

.lib-video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.lib-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lib-card-body h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
  line-height: 1.25;
}

.lib-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================== */
/* TAB 5: SETTINGS & ANDROID SYNC */
/* ============================================== */
.settings-container {
  max-width: 720px;
  margin: 0 auto;
}

.settings-header {
  margin-bottom: 20px;
}

.settings-header h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.settings-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.card-section {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
}

.section-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.card-section h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.goal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.goal-card {
  background: var(--bg-card-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.goal-card:hover {
  border-color: var(--surface-border-bright);
}

.goal-card.active {
  border-color: var(--primary-red);
  background: rgba(255, 51, 75, 0.08);
}

.goal-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.goal-info {
  flex: 1;
}

.goal-info h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.goal-info p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

.goal-check {
  font-size: 16px;
  color: var(--text-dim);
  font-weight: bold;
}

.goal-card.active .goal-check {
  color: var(--primary-red);
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.persona-card {
  background: var(--bg-card-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.persona-card:hover {
  border-color: var(--surface-border-bright);
}

.persona-card.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.08);
}

.persona-icon {
  font-size: 26px;
  display: block;
  margin-bottom: 6px;
}

.persona-card h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.persona-card p {
  font-size: 11px;
  color: var(--text-dim);
}

.level-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  background: var(--bg-card-elevated);
  border: 1px solid var(--surface-border);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  outline: none;
}

.form-control option {
  background: #101420;
}

.btn-generate-glow {
  width: 100%;
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 14px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: var(--transition);
}

.btn-generate-glow:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* In-Page Android Sync Section */
.sync-card-section {
  border-color: rgba(0, 229, 255, 0.3);
  background: linear-gradient(135deg, rgba(14, 22, 36, 0.95), rgba(8, 12, 20, 0.95));
}

.sync-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.sync-icon {
  font-size: 28px;
}

.sync-header h3 {
  margin-bottom: 2px;
}

.sync-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.lan-ip-box {
  background: rgba(7, 9, 14, 0.7);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.lan-ip-box label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.lan-ip-list code {
  display: block;
  background: #000;
  color: var(--accent-cyan);
  font-family: monospace;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.lan-instruction {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

.lan-app-box {
  background: rgba(7, 9, 14, 0.4);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 12px;
}

.lan-app-box h4 {
  color: #fff;
  font-size: 13px;
  margin-bottom: 4px;
}

.lan-app-box p {
  color: var(--text-dim);
  margin-bottom: 6px;
}

.lan-app-box ul {
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 11px;
}

.lan-app-box li {
  margin-bottom: 2px;
}

/* ============================================== */
/* DEDICATED FULL-SCREEN SCREEN 1: LIVE WORKOUT PLAYER (NO POPUPS) */
/* ============================================== */
.fullscreen-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #07090e;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fullscreen-view.open {
  display: flex;
  animation: slideViewIn 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideViewIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.live-player-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 14, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
}

.btn-view-back {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-view-back:hover {
  background: rgba(255, 255, 255, 0.16);
}

.back-arrow {
  font-size: 15px;
}

.live-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.live-pulse-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.live-counter-tag {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.sound-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.live-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 61px;
  z-index: 50;
}

.live-progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.live-player-body {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 16px;
  padding-bottom: 90px;
}

.live-video-card {
  margin-bottom: 16px;
}

.live-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--surface-border);
}

.live-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-badges-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}

.video-badge {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.video-badge.equipment {
  color: var(--accent-cyan);
}

.live-exercise-details-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.live-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.live-title-row h2 {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.live-target-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.live-difficulty-pill {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.live-cue-card {
  background: rgba(255, 107, 43, 0.08);
  border-left: 3px solid var(--primary-orange);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.cue-icon {
  font-size: 14px;
  flex-shrink: 0;
}

/* Interactive Sets Logger Card */
.live-sets-logger-card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.sets-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sets-header-row h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.sets-help-text {
  font-size: 11px;
  color: var(--text-dim);
}

.sets-interactive-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.set-row-item {
  background: var(--bg-card-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.set-row-item.done {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.set-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.set-index-badge {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.set-inputs-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.set-input-box {
  width: 54px;
  background: rgba(7, 9, 14, 0.7);
  border: 1px solid var(--surface-border);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  text-align: center;
  outline: none;
}

.set-input-box:focus {
  border-color: var(--accent-cyan);
}

.btn-set-complete {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--surface-border-bright);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-set-complete.done {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #000;
  box-shadow: 0 0 10px var(--accent-green-glow);
}

/* Sleek Rest Timer Card */
.rest-timer-card {
  background: linear-gradient(135deg, rgba(14, 20, 32, 0.9), rgba(10, 14, 22, 0.95));
  border: 1px solid var(--surface-border-bright);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rest-timer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rest-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--accent-cyan);
}

.rest-time-remaining {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.rest-timer-btn-row {
  display: flex;
  gap: 8px;
}

.rest-adjust-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--surface-border);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.rest-action-main {
  flex: 1;
  background: var(--accent-cyan);
  color: #000;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 2px 10px var(--accent-cyan-glow);
}

.rest-skip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--surface-border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  cursor: pointer;
}

/* Sticky Bottom Navigation Controls */
.live-player-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(7, 9, 14, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--surface-border);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto;
}

.btn-live-prev {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--surface-border);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-live-next {
  flex: 1;
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 16px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================== */
/* DEDICATED FULL-SCREEN SCREEN 2: EXERCISE DETAIL VIEW */
/* ============================================== */
.detail-view-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 14, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}

.detail-view-header h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.detail-view-content {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: 16px 16px 40px;
}

.detail-video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
  border: 1px solid var(--surface-border);
}

.detail-video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-loading-spinner {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
}

.video-loading-spinner.active {
  display: flex;
}

.spinner-ring {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--primary-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.detail-body-card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-exercise-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.spec-card {
  background: var(--bg-card-elevated);
  border: 1px solid var(--surface-border);
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.spec-lbl {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.spec-val {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.coaching-cue-card {
  background: rgba(255, 107, 43, 0.08);
  border-left: 3px solid var(--primary-orange);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.coaching-cue-card h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-orange);
  margin-bottom: 4px;
}

.coaching-cue-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.btn-primary-block {
  width: 100%;
  background: var(--bg-card-elevated);
  border: 1px solid var(--surface-border-bright);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary-block:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
}

/* ============================================== */
/* CELEBRATION VIEW */
/* ============================================== */
.celebration-view {
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at center, #151d2f 0%, #07090e 100%);
}

.celebration-card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border-bright);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: modalScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.celebration-trophy {
  font-size: 54px;
  margin-bottom: 12px;
  animation: bounce 1s infinite alternate ease-in-out;
}

@keyframes bounce {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-8px);
  }
}

.celebration-card h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.celebration-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.celebration-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.celeb-stat {
  background: var(--bg-card-elevated);
  border: 1px solid var(--surface-border);
  padding: 12px;
  border-radius: var(--radius-md);
}

.celeb-val {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  display: block;
}

.celeb-lbl {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.celebration-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-celebrate-primary {
  width: 100%;
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-celebrate-ghost {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px;
  cursor: pointer;
}

/* ============================================== */
/* MOBILE BOTTOM NAVIGATION BAR (EMERALD ATHLETIC SIGNATURE BAR) */
/* ============================================== */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 70;
  height: var(--nav-height);
  background: rgba(13, 14, 18, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6);
}

.nav-tab {
  background: none;
  border: none;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-size: 11px;
  font-weight: 500;
  min-width: 56px;
  position: relative;
}

.nav-tab .nav-svg-icon {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  stroke-width: 2;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab .tab-icon {
  font-size: 19px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab:hover {
  color: #ffffff;
}

.nav-tab:hover .nav-svg-icon {
  stroke: #ffffff;
}

.nav-tab.active {
  color: #ffffff;
}

.nav-tab.active .nav-svg-icon {
  stroke: var(--emerald-primary);
  transform: translateY(-2px);
}

.nav-tab.active .tab-icon {
  transform: translateY(-2px) scale(1.1);
}

.nav-tab.active .tab-label {
  color: var(--emerald-primary);
  font-weight: 700;
}

/* Elevated Center Circular Lifter Floating Action Button */
.nav-fab-center {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  position: relative;
  top: -14px;
  z-index: 75;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-fab-center:active {
  transform: scale(0.92);
}

.fab-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--emerald-primary);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 200, 150, 0.55), 0 0 0 4px #0d0e12;
  transition: all 0.25s ease;
}

.nav-fab-center:hover .fab-circle {
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(0, 200, 150, 0.75), 0 0 0 4px #0d0e12;
}

.fab-lifter-icon {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

/* ============================================== */
/* RESPONSIVE BREAKPOINTS (AIRY & DE-CONGESTED) */
/* ============================================== */
@media (max-width: 480px) {
  .today-metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .perf-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .exercise-card {
    grid-template-columns: 78px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .ex-actions-box {
    grid-column: 1 / -1;
  }

  .btn-card-preview {
    width: 100%;
    justify-content: center;
  }

  .persona-grid {
    grid-template-columns: 1fr;
  }

  .level-split-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================== */
/* LIVE STOPWATCH, DUAL TIMER & COMPACT VIDEO STYLES */
/* ============================================== */
.live-stopwatch-pill {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent-cyan);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
}

.live-stopwatch-pill:hover {
  background: rgba(0, 229, 255, 0.22);
  transform: translateY(-1px);
}

.countdown-mode-tag {
  font-size: 10px;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.live-stopwatch-pill.countdown-warning {
  background: rgba(255, 170, 0, 0.15);
  border-color: rgba(255, 170, 0, 0.4);
  color: #ffaa00;
}

.live-stopwatch-pill.countdown-urgent {
  background: rgba(255, 51, 75, 0.2);
  border-color: var(--primary-red);
  color: #ff4d6d;
  animation: pulseCountdown 1.2s infinite;
}

.live-stopwatch-pill.countdown-overtime {
  background: rgba(255, 107, 43, 0.25);
  border-color: var(--primary-orange);
  color: var(--primary-orange);
}

@keyframes pulseCountdown {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 51, 75, 0.4); }
  50% { transform: scale(1.04); box-shadow: 0 0 12px rgba(255, 51, 75, 0.6); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 51, 75, 0); }
}

/* ============================================== */
/* SESSION REVERSE COUNTDOWN DASHBOARD CARD */
/* ============================================== */
.session-countdown-card {
  background: linear-gradient(135deg, rgba(18, 24, 38, 0.95), rgba(12, 16, 26, 0.98));
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.session-countdown-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--primary-red));
}

.dash-countdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.dash-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.dash-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-dim);
  display: block;
}

.dash-target-label {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 600;
}

.countdown-adjust-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-adjust-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--surface-border);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.dash-adjust-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #3b4963;
}

.dash-adjust-btn.pause {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.3);
  color: var(--accent-cyan);
}

.dash-countdown-clock-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 8px;
}

.dash-countdown-clock {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 1.5px;
  line-height: 1;
  color: var(--accent-cyan);
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
  transition: color 0.3s ease;
}

.dash-countdown-clock.warning {
  color: #ffaa00;
  text-shadow: 0 0 20px rgba(255, 170, 0, 0.35);
}

.dash-countdown-clock.urgent {
  color: #ff334b;
  text-shadow: 0 0 20px rgba(255, 51, 75, 0.5);
  animation: pulseClock 1s infinite;
}

.dash-countdown-clock.overtime {
  color: var(--primary-orange);
  text-shadow: 0 0 20px rgba(255, 107, 43, 0.5);
}

@keyframes pulseClock {
  0% { opacity: 0.85; }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0.85; }
}

.dash-countdown-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.countdown-phase-tag {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
}

.countdown-phase-tag.warning {
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
}

.countdown-phase-tag.urgent {
  background: rgba(255, 51, 75, 0.2);
  color: #ff4d6d;
}

.countdown-phase-tag.overtime {
  background: rgba(255, 107, 43, 0.2);
  color: var(--primary-orange);
}

.countdown-elapsed-sub {
  font-size: 11px;
  color: var(--text-dim);
}

.countdown-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.countdown-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--primary-red));
  border-radius: var(--radius-full);
  transition: width 1s linear, background 0.3s ease;
}

.countdown-fill.warning {
  background: linear-gradient(90deg, #ffaa00, var(--primary-orange));
}

.countdown-fill.urgent {
  background: linear-gradient(90deg, #ff334b, #ff0055);
}

.live-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--surface-border);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: var(--transition);
}

.icon-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-collapse-video {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

.btn-collapse-video:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
}

.live-video-card.compact-mode .live-video-frame {
  aspect-ratio: auto;
  height: 125px;
}

.live-video-card.hide-video {
  margin-bottom: 8px;
}

.live-video-card.hide-video .live-video-frame {
  height: 38px;
  aspect-ratio: auto;
  background: rgba(14, 20, 32, 0.85);
  border: 1px dashed var(--surface-border-bright);
}

.live-video-card.hide-video video,
.live-video-card.hide-video .video-badges-overlay {
  display: none;
}

.live-video-card.hide-video .btn-collapse-video {
  position: static;
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.timer-mode-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timer-sub-hint {
  font-size: 10px;
  color: var(--text-dim);
}

.rest-badge.active-exercise {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.rest-badge.resting {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* ============================================== */
/* CALIBRATED FOR 5.8-INCH SMARTPHONES (≤ 390px) */
/* (iPhone X/XS/11Pro/Mini, Galaxy S8/S9/S10e, Pixel 4/5) */
/* ============================================== */
@media (max-width: 400px) {
  html, body {
    font-size: 13.5px;
  }

  .main-content {
    padding: 10px 10px 18px;
  }

  .app-header {
    padding: 8px 12px;
  }

  .logo-icon {
    font-size: 20px;
  }

  .logo-text h1 {
    font-size: 16px;
  }

  .streak-pill {
    padding: 4px 8px;
    font-size: 11px;
  }

  .today-hero-card {
    padding: 14px 12px;
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
  }

  .today-hero-card h2 {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .today-workout-desc {
    font-size: 11.5px;
    margin-bottom: 12px;
  }

  .today-metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
  }

  .metric-card {
    padding: 6px 4px;
    border-radius: var(--radius-sm);
  }

  .metric-icon {
    font-size: 14px;
  }

  .metric-val {
    font-size: 12px;
  }

  .btn-start-hero {
    padding: 11px 16px;
    font-size: 14px;
    border-radius: var(--radius-md);
  }

  .section-title-row {
    margin: 16px 0 10px;
  }

  .section-title-row h3 {
    font-size: 15px;
  }

  .exercise-card {
    grid-template-columns: 66px 1fr;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius-md);
  }

  .ex-thumb-box {
    width: 66px;
    height: 54px;
  }

  .ex-info-box h4 {
    font-size: 13px;
  }

  .ex-prescription {
    font-size: 11px;
    gap: 5px;
  }

  .ex-coach-tip {
    font-size: 10px;
  }

  /* Live Player on 5.8-inch */
  .live-player-header {
    padding: 8px 10px;
  }

  .live-player-body {
    padding: 8px 10px 70px;
  }

  .live-video-frame {
    aspect-ratio: auto;
    height: 150px;
    border-radius: var(--radius-md);
  }

  .live-title-row h2 {
    font-size: 16px;
  }

  .live-target-desc {
    font-size: 11.5px;
  }

  .live-cue-card {
    padding: 8px 10px;
    font-size: 11px;
  }

  .live-sets-logger-card {
    padding: 10px;
    border-radius: var(--radius-md);
  }

  .set-row-item {
    padding: 6px 8px;
    border-radius: var(--radius-sm);
  }

  .set-index-badge {
    font-size: 11px;
  }

  .set-inputs-wrap {
    font-size: 11px;
    gap: 4px;
  }

  .set-input-box {
    width: 42px;
    padding: 3px 2px;
    font-size: 11px;
  }

  .btn-set-complete {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .rest-timer-card {
    padding: 10px 12px;
    border-radius: var(--radius-md);
  }

  .rest-time-remaining {
    font-size: 24px;
  }

  .rest-adjust-btn, .rest-skip-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .rest-action-main {
    padding: 6px 12px;
    font-size: 12px;
  }

  .live-player-footer {
    padding: 8px 10px;
  }

  .btn-live-prev, .btn-live-next {
    padding: 9px 12px;
    font-size: 13px;
  }

  /* Bottom Navigation on 5.8-inch */
  .nav-bar {
    height: 52px;
    padding: 0 4px;
  }

  .nav-tab {
    padding: 3px 4px;
    font-size: 10px;
    min-width: 46px;
  }

  .nav-tab .tab-icon {
    font-size: 16px;
  }
}

/* ======================================================= */
/* DECIDED DURATION SELECTOR (TODAY TAB & SCHEDULE) */
/* ======================================================= */
.today-duration-decider {
  background: linear-gradient(135deg, rgba(20, 24, 34, 0.95), rgba(13, 16, 24, 0.95));
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-lg, 16px);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.decider-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.decider-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.decider-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.5));
}

.decider-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--primary, #00e5ff);
  text-transform: uppercase;
}

.decider-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #8b9bb4);
}

.decider-active-badge {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

.duration-chips-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 520px) {
  .duration-chips-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.duration-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
}

.duration-chip:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.3);
  transform: translateY(-2px);
}

.duration-chip.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(0, 150, 255, 0.35));
  border: 1px solid #00e5ff;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35), inset 0 0 8px rgba(0, 229, 255, 0.2);
}

.duration-chip .chip-mins {
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  color: #fff;
}

.duration-chip.active .chip-mins {
  color: #00e5ff;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.duration-chip .chip-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted, #8b9bb4);
  margin-top: 2px;
}

.duration-chip.active .chip-tag {
  color: #d1f7ff;
}

.duration-chip.custom {
  border-style: dashed;
}

/* ======================================================= */
/* SESSION REVERSE COUNTDOWN DASHBOARD CARD (LIVE WORKOUT) */
/* ======================================================= */
.session-countdown-card {
  background: linear-gradient(135deg, #0e121d 0%, #080a10 100%);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: var(--radius-lg, 16px);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.session-countdown-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00e5ff, transparent);
  animation: scanline 4s linear infinite;
}

@keyframes scanline {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.dash-countdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.dash-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 10px #00e5ff;
  animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.dash-title {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary, #00e5ff);
}

.dash-target-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #8b9bb4);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

.countdown-adjust-row {
  display: flex;
  gap: 6px;
}

.dash-adjust-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-adjust-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
}

.dash-adjust-btn.pause {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.3);
  color: #00e5ff;
}

/* Quick Target Switcher Inside Session */
.dash-target-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.switcher-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim, #637592);
  text-transform: uppercase;
}

.switcher-chips {
  display: flex;
  gap: 6px;
}

.live-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ccc;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.live-chip.active {
  background: #00e5ff;
  color: #000;
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.dash-countdown-clock-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 10px;
}

.dash-countdown-clock {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  color: #00e5ff;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.dash-countdown-clock.warning {
  color: #ffb300;
  text-shadow: 0 0 20px rgba(255, 179, 0, 0.6);
}

.dash-countdown-clock.urgent {
  color: #ff3d00;
  text-shadow: 0 0 25px rgba(255, 61, 0, 0.8);
  animation: urgentBeat 1s ease-in-out infinite;
}

@keyframes urgentBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.dash-countdown-clock.overtime {
  color: #ff1744;
  text-shadow: 0 0 30px rgba(255, 23, 68, 0.9);
  animation: overtimeFlash 1.5s ease-in-out infinite;
}

@keyframes overtimeFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.dash-countdown-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.countdown-phase-tag {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: #00e5ff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.countdown-phase-tag.warning {
  background: rgba(255, 179, 0, 0.15);
  border-color: rgba(255, 179, 0, 0.4);
  color: #ffb300;
}

.countdown-phase-tag.urgent {
  background: rgba(255, 61, 0, 0.2);
  border-color: #ff3d00;
  color: #ff3d00;
}

.countdown-phase-tag.overtime {
  background: rgba(255, 23, 68, 0.25);
  border-color: #ff1744;
  color: #ff1744;
}

.countdown-elapsed-sub {
  font-size: 11px;
  color: var(--text-dim, #637592);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

.countdown-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.countdown-fill {
  height: 100%;
  background: linear-gradient(90deg, #0096ff, #00e5ff);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.8);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.countdown-fill.overtime {
  background: #ff1744;
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.8);
}

/* Header Top Stopwatch Pill Countdown States */
.live-stopwatch-pill {
  cursor: pointer;
  transition: all 0.2s ease;
}

.live-stopwatch-pill:hover {
  transform: scale(1.04);
}

.live-stopwatch-pill.countdown-warning {
  background: rgba(255, 179, 0, 0.15);
  border-color: #ffb300;
  color: #ffb300;
}

.live-stopwatch-pill.countdown-urgent {
  background: rgba(255, 61, 0, 0.2);
  border-color: #ff3d00;
  color: #ff3d00;
  animation: urgentBeat 1s ease-in-out infinite;
}

.live-stopwatch-pill.countdown-overtime {
  background: rgba(255, 23, 68, 0.25);
  border-color: #ff1744;
  color: #ff1744;
}

.timer-type-sub {
  font-size: 10px;
  color: var(--text-muted, #8b9bb4);
  font-weight: 600;
  margin-top: 2px;
}

/* ========================================================== */
/* LIFE FITNESS & APPLE FITNESS+ MINIMALIST ATHLETIC ADDITIONS */
/* ========================================================== */

/* 1. HOME SCREEN: Training Plan & 7-Day Calendar Strip */
.training-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.plan-header-title h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.plan-remaining-badge {
  font-size: 12px;
  color: var(--text-muted);
}

.plan-edit-btn {
  background: none;
  border: none;
  color: var(--emerald-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
}

.plan-edit-btn:hover {
  background: rgba(0, 200, 150, 0.12);
}

.calendar-day-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.calendar-day-strip::-webkit-scrollbar {
  display: none;
}

.day-pill-item {
  flex: 1;
  min-width: 44px;
  padding: 10px 4px;
  border-radius: 20px;
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
}

.day-pill-item .day-name {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: capitalize;
}

.day-pill-item .day-number {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.day-pill-item.active {
  border-color: var(--emerald-primary);
  background: rgba(0, 200, 150, 0.08);
}

.day-pill-item.active .day-name {
  color: var(--emerald-primary);
}

.day-pill-item.active .day-number {
  color: var(--emerald-primary);
  font-weight: 800;
}

/* 2. CINEMATIC HERO WORKOUT CARD */
.hero-cinematic-card {
  position: relative;
  min-height: 250px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(14, 17, 24, 0.25) 0%, rgba(9, 11, 15, 0.94) 80%),
              radial-gradient(circle at 80% 20%, rgba(0, 200, 150, 0.12) 0%, transparent 60%),
              #12151e;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  margin-bottom: 22px;
}

.hero-cinematic-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.35;
  pointer-events: none;
}

.hero-card-content {
  position: relative;
  z-index: 2;
}

.hero-routine-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.hero-routine-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.hero-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-meta-item strong {
  color: #ffffff;
  font-weight: 700;
}

.hero-start-btn-outline {
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.22s ease;
  letter-spacing: 0.3px;
}

.hero-start-btn-outline:hover {
  background: #ffffff;
  color: #000000;
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
}

.hero-start-btn-outline:active {
  transform: scale(0.96);
}

/* 3. AI WORKOUTS DISCOVER CAROUSEL */
.ai-workouts-section {
  margin-top: 26px;
  margin-bottom: 24px;
}

.ai-workouts-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
}

.ai-workouts-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
}

.ai-workouts-scroll::-webkit-scrollbar {
  display: none;
}

.ai-workout-card {
  min-width: 200px;
  flex: 0 0 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-workout-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 200, 150, 0.3);
}

.ai-workout-thumb {
  width: 100%;
  height: 100px;
  background: #191c26;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.ai-workout-body {
  padding: 10px 12px;
}

.ai-workout-body h4 {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 3px;
}

.ai-workout-body p {
  font-size: 11px;
  color: var(--text-muted);
}

/* 4. PROGRESS SCREEN (TONNAGE & 2-COLUMN METRIC GRID) */
.progress-sub-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.prog-subtab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 10px 2px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.prog-subtab-btn:hover {
  color: #ffffff;
}

.prog-subtab-btn.active {
  color: #ffffff;
}

.prog-subtab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--emerald-primary);
  border-radius: 2px;
}

.tonnage-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 18px;
}

.tonnage-label-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.tonnage-headline-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}

.tonnage-headline-val {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 900;
  color: #ffffff;
}

.tonnage-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
}

.tonnage-graph-mock {
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0 4px;
  position: relative;
}

.ton-grid-line {
  width: 100%;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.ton-axis-labels {
  display: flex;
  justify-content: space-around;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.ton-dots-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.ton-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.ton-dot.active {
  background: var(--emerald-primary);
  width: 16px;
  border-radius: 6px;
}

.progress-metric-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.prog-metric-card-square {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.prog-metric-card-square:hover {
  border-color: rgba(0, 200, 150, 0.3);
}

.prog-icon-val-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prog-icon-emerald {
  color: var(--emerald-primary);
  font-size: 18px;
  stroke: var(--emerald-primary);
}

.prog-card-number {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.prog-card-unit {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: -4px;
}

.prog-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* 5. SETTINGS SCREEN: Modern Dark List */
.settings-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-profile-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.settings-profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #20242f;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.settings-profile-info {
  flex: 1;
}

.settings-profile-name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.settings-profile-email {
  font-size: 12px;
  color: var(--text-muted);
}

.settings-chevron {
  color: var(--text-dim);
  font-size: 20px;
}

.settings-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 24px 0 10px 4px;
}

.settings-rows-group {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
}

.settings-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 14px;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.settings-row-item:last-child {
  border-bottom: none;
}

.settings-row-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.settings-row-val {
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-radio-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #ffffff;
  cursor: pointer;
}

.settings-radio-label input[type="radio"] {
  accent-color: var(--emerald-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* 6. WORKOUT DETAIL SCREEN: Life Fitness Styled Pill & Quick Stats */
.workout-detail-hero-btn {
  background: var(--emerald-primary);
  color: #000000;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 14px 28px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px auto;
  box-shadow: 0 4px 20px rgba(0, 200, 150, 0.5);
  transition: all 0.2s ease;
  width: 90%;
  max-width: 320px;
}

.workout-detail-hero-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 26px rgba(0, 200, 150, 0.7);
}

.detail-3col-stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px 10px;
  margin: 14px 0;
}

.detail-stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.detail-stat-val-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.detail-stat-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: lowercase;
}

.detail-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.detail-tag-chip {
  background: var(--sage-tag-bg);
  border: 1px solid var(--sage-tag-border);
  color: var(--sage-tag-text);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
}

/* ==========================================
   EXERCISE SWAP & ALTERNATIVES MODAL STYLING
   ========================================== */
.btn-card-swap {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-card-swap:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  transform: translateY(-1px);
}

.live-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-swap-pill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #10b981;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.btn-swap-pill:hover {
  background: #10b981;
  color: #06090e;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet-dialog {
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 12px 18px 24px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-sheet-dialog {
  transform: translateY(0);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0 auto 12px;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sheet-badge {
  font-size: 10px;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 3px;
}

.sheet-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
}

.sheet-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.btn-sheet-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.swap-filters-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.swap-filters-hint strong {
  color: #38bdf8;
}

.swap-hint-sub {
  color: #10b981;
}

.sheet-alternatives-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 55vh;
  padding-right: 4px;
}

.alt-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #141c2b;
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.alt-item-card:hover {
  background: #192437;
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

.alt-thumb-box {
  position: relative;
  width: 68px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.alt-thumb-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.alt-play-badge {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}

.alt-info-box {
  flex: 1;
  min-width: 0;
}

.alt-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alt-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.alt-equipment-pill {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.alt-difficulty-pill {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.alt-compound-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-alt-select {
  background: #10b981;
  border: none;
  color: #06090e;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.btn-alt-select:hover {
  transform: scale(1.05);
}

.swap-loading-state,
.swap-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 13px;
  gap: 10px;
}

/* ============================================== */
/* SWIPE HANDLE & DRAG-TO-MINIMIZE STYLES */
/* ============================================== */
.swipe-handle-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 16px 4px;
  background: var(--bg-card, #131722);
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.swipe-handle-bar:active {
  cursor: grabbing;
}

.swipe-pill {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: #3e485e;
  transition: background 0.2s ease, width 0.2s ease;
}

.swipe-handle-bar:hover .swipe-pill {
  background: var(--emerald-primary, #00e599);
  width: 52px;
}

.swipe-hint {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
  letter-spacing: 0.2px;
}

/* ============================================== */
/* LIVE WORKOUT FLOATING DOCK (MINI PLAYER) */
/* ============================================== */
.live-workout-dock {
  position: fixed;
  bottom: 74px; /* Sits right above bottom navigation */
  left: 12px;
  right: 12px;
  max-width: 600px;
  margin: 0 auto;
  z-index: 95;
  background: rgba(20, 24, 34, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid #00e599;
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0, 229, 153, 0.25), 0 4px 12px rgba(0, 0, 0, 0.6);
  animation: slideDockUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.live-workout-dock.hidden {
  display: none !important;
}

@keyframes slideDockUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.dock-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00e599;
  box-shadow: 0 0 10px #00e599;
  flex-shrink: 0;
  animation: pulseDot 1.4s infinite alternate;
}

@keyframes pulseDot {
  from { opacity: 0.5; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.15); }
}

.dock-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.dock-tag {
  font-size: 10px;
  font-weight: 800;
  color: #00e599;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.dock-exercise {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-dock-resume {
  background: #00e599;
  border: none;
  color: #05070a;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-dock-resume:hover {
  transform: scale(1.05);
  background: #10b981;
}

.btn-dock-end {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-dock-end:hover {
  background: rgba(255, 65, 108, 0.2);
  color: #ff416c;
  border-color: #ff416c;
}

/* Quick Select Move Pill for Exercises on Home Page during Active Workout */
.btn-quick-select-move {
  background: rgba(0, 229, 153, 0.15);
  border: 1px solid #00e599;
  color: #00e599;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s ease;
}

.btn-quick-select-move:hover {
  background: #00e599;
  color: #05070a;
}