/* DuoFit Linear-Style Design System */

:root {
  /* Linear Premium Dark System Colors */
  --bg-charcoal: #080710; /* Very dark rich background */
  --bg-panel: #0d0c15; /* Elegant panel background */
  --bg-panel-light: #12111a; /* Elevated layer background */
  --border-subtle: rgba(255, 255, 255, 0.08); /* Minimal borders */
  --border-focus: rgba(255, 255, 255, 0.18); /* Focused state */
  
  /* Brand Primary & Accents (Linear Brand Theme) */
  --brand-primary: #5e6ad2; /* Indigo Primary */
  --brand-accent: #6e7bf2; /* Bright Indigo Accent */
  --brand-light: #8590ff; /* Light Indigo Highlight */
  --brand-dark: #3f479a; /* Deep Indigo shadow */
  --brand-translucent: rgba(94, 106, 210, 0.12); /* Translucent glow background */
  --brand-glow: rgba(94, 106, 210, 0.25); /* Glow shadow tint */
  
  /* Neutrals */
  --text-white: #f7f7f8; /* Crisp clean off-white */
  --text-gray: #8a8f98; /* Muted gray */
  --text-gray-dark: #5e6168; /* Deep muted gray */
  --bg-input: #12111a; /* Input fields background */
  
  /* Status Colors */
  --status-success: #4cd964;
  --status-rest: #8a8f98;
  --status-moesha: #a176f2; /* Beautiful royal purple/violet for her */
  --status-dean: #38bdf8;  /* Crisp ocean blue for him */

  /* Timing & Animations */
  --transition-smooth: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-spring: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  
  /* Safe Area variables for modern mobile phones (PWA support) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Global resets & scrollbars */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Inter', -apple-system, sans-serif;
}

body {
  background-color: var(--bg-charcoal);
  color: var(--text-white);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Base scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-charcoal);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-panel-light);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-primary);
}

/* APP WRAPPER */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  position: relative;
}

/* HEADER STYLE */
.app-header {
  height: 65px;
  min-height: 65px;
  background-color: var(--bg-charcoal);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 10;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-svg {
  width: 32px;
  height: 32px;
}

.logo-svg circle {
  stroke: var(--brand-primary) !important;
}
.logo-svg path {
  fill: var(--brand-accent) !important;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: 'Outfit', sans-serif;
  color: var(--text-white);
}

.logo-highlight {
  color: var(--brand-primary);
}

/* PROFILE SWITCHER */
.profile-toggle-container {
  display: flex;
  align-items: center;
}

.profile-switch {
  position: relative;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: 6px;
  display: flex;
  width: 210px;
}

.profile-toggle-btn {
  background: none;
  border: none;
  color: var(--text-gray);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  transition: var(--transition-smooth);
}

.profile-toggle-btn .avatar {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.profile-toggle-btn.active {
  color: var(--text-white);
}

.profile-toggle-btn.active .avatar-moesha {
  background-color: var(--status-moesha);
  border-color: var(--status-moesha);
  color: var(--bg-charcoal);
}

.profile-toggle-btn.active .avatar-dean {
  background-color: var(--status-dean);
  border-color: var(--status-dean);
  color: var(--bg-charcoal);
}

/* MAIN SCROLLABLE CONTENT */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.app-section {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  max-width: 800px;
  margin: 0 auto;
}

.app-section.active {
  display: flex;
}

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

/* WELCOME HERO */
.welcome-hero {
  margin-bottom: 4px;
}

.welcome-hero h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.1;
  margin-bottom: 4px;
}

.welcome-hero p {
  color: var(--text-gray);
  font-size: 14px;
}

/* COUPLE BANNER */
.joint-status-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  overflow: hidden;
  position: relative;
  transition: var(--transition-smooth);
}

.joint-status-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.joint-card-accent {
  width: 4px;
  background-color: var(--brand-primary);
  flex-shrink: 0;
}

.joint-card-body {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 16px;
  width: 100%;
}

.joint-icon {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.joint-info {
  flex: 1;
}

.joint-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--brand-light);
  display: block;
  margin-bottom: 2px;
}

.joint-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 2px;
}

.joint-info p {
  font-size: 12px;
  color: var(--text-gray);
}

.btn-start-action {
  background-color: var(--brand-primary);
  color: var(--text-white);
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-start-action:hover {
  background-color: var(--brand-accent);
  box-shadow: 0 0 12px var(--brand-glow);
}

/* GRID LAYOUTS */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

@media (max-width: 680px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  border-color: var(--border-focus);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-white);
}

.card-icon {
  color: var(--text-gray);
  display: flex;
  align-items: center;
}

/* CALORIE CARD */
.calorie-ring-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  flex: 1;
}

.svg-ring-container {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  stroke: rgba(255,255,255,0.03);
}

.progress-ring-bar {
  transition: stroke-dashoffset 0.35s;
}

.calorie-ring-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.calorie-ring-text .large-number {
  font-size: 22px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--text-white);
  line-height: 1;
}

.calorie-ring-text .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-gray);
  margin-top: 2px;
}

.calorie-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-item .number {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
}

.detail-item .label {
  font-size: 11px;
  color: var(--text-gray);
}

.detail-item.divider {
  height: 1px;
  background-color: var(--border-subtle);
  width: 40px;
}

/* MINI STACKED CARDS */
.stacked-stat-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mini-card {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.mini-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  flex-shrink: 0;
}

.mini-card-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-card-details .label {
  font-size: 11px;
  color: var(--text-gray);
}

.mini-card-numbers {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.mini-card-numbers .number {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
}

.mini-card-numbers .sub-label {
  font-size: 11px;
  color: var(--text-gray-dark);
}

.progress-bar-container {
  height: 4px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
  width: 100%;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--brand-primary);
  border-radius: 2px;
  transition: width 0.4s;
}

.btn-plus-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-plus-icon:hover {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

/* COUPE DOUBLE ON DASHBOARD */
.double-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* FOOTER NAVIGATION */
.app-footer-nav {
  height: 60px;
  background-color: var(--bg-charcoal);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  z-index: 10;
  padding-bottom: var(--safe-bottom);
}

.nav-links {
  display: flex;
  width: 100%;
  height: 100%;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-gray-dark);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  gap: 4px;
  transition: var(--transition-smooth);
}

.nav-item .nav-icon {
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  color: var(--text-gray);
}

.nav-item.active {
  color: var(--brand-light);
}

.nav-item.active .nav-icon {
  transform: translateY(-1px);
  color: var(--brand-light);
  filter: drop-shadow(0 0 6px var(--brand-glow));
}

/* WORKOUTS TAB */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-title-row h2 {
  font-size: 22px;
  font-weight: 800;
}

.section-title-row p {
  font-size: 13px;
  color: var(--text-gray);
}

.workout-intro-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 600px) {
  .workout-intro-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .workout-intro-card button {
    width: 100%;
  }
}

.intro-card-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.intro-card-body p {
  font-size: 13px;
  color: var(--text-gray);
}

.routine-days-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.routine-day-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition-smooth);
}

.routine-day-card:hover {
  border-color: var(--border-focus);
}

.routine-day-card.active-day {
  border-color: var(--brand-primary);
  background-color: rgba(94, 106, 210, 0.015);
  box-shadow: 0 0 15px rgba(94, 106, 210, 0.04);
}

.day-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.day-routine-details h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 2px;
}

.day-routine-details p {
  font-size: 12px;
  color: var(--text-gray);
}

.routine-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-gray);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-joint {
  background-color: rgba(94, 106, 210, 0.08);
  color: var(--brand-light);
  border: 1px solid rgba(94, 106, 210, 0.2);
}

.badge-dean {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-white);
  border: 1px solid var(--border-focus);
}

.badge-legs { background-color: rgba(255, 255, 255, 0.03); color: var(--text-gray); border: 1px solid var(--border-subtle); }
.badge-chest { background-color: rgba(255, 255, 255, 0.03); color: var(--text-gray); border: 1px solid var(--border-subtle); }
.badge-split { background-color: rgba(255, 255, 255, 0.03); color: var(--text-gray); border: 1px solid var(--border-subtle); }
.badge-back { background-color: rgba(255, 255, 255, 0.03); color: var(--text-gray); border: 1px solid var(--border-subtle); }
.badge-weakpoint { background-color: rgba(255, 255, 255, 0.03); color: var(--text-gray); border: 1px solid var(--border-subtle); }
.badge-shoulders { background-color: rgba(255, 255, 255, 0.03); color: var(--text-gray); border: 1px solid var(--border-subtle); }
.badge-rest { background-color: rgba(255, 255, 255, 0.02); color: var(--text-gray-dark); border: 1px solid var(--border-subtle); }

.btn-row-action {
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-row-action:hover, .routine-day-card.active-day .btn-row-action {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

/* NUTRITION TAB */
.nutrition-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

@media (max-width: 680px) {
  .nutrition-grid {
    grid-template-columns: 1fr;
  }
}

.macro-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--bg-panel-light);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  padding: 16px;
}

.macro-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.macro-col {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.macro-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.macro-label {
  font-size: 11px;
  color: var(--text-gray);
  text-transform: uppercase;
  font-weight: 600;
}

.macro-nums {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
}

.macro-nums .muted {
  font-size: 10px;
  color: var(--text-gray-dark);
}

.macro-bar-bg {
  height: 4px;
  background-color: rgba(255,255,255,0.02);
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}

.protein-fill { background-color: var(--brand-primary); height: 100%; border-radius: 2px; transition: width 0.4s; }
.carbs-fill { background-color: #dfdfdf; height: 100%; border-radius: 2px; transition: width 0.4s; }
.fats-fill { background-color: var(--text-gray-dark); height: 100%; border-radius: 2px; transition: width 0.4s; }

/* AI ANALYSIS DROPZONE */
.badge-ai {
  background-color: rgba(94, 106, 210, 0.08);
  color: var(--brand-light);
  border: 1px solid rgba(94, 106, 210, 0.2);
}

.camera-info {
  font-size: 12px;
  color: var(--text-gray);
  line-height: 1.4;
}

.ai-dropzone {
  border: 1.5px dashed var(--border-subtle);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.01);
  transition: var(--transition-smooth);
}

.ai-dropzone:hover {
  border-color: var(--brand-primary);
  background-color: rgba(94, 106, 210, 0.02);
}

.ai-feedback-container {
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 16px;
  background-color: var(--bg-panel-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-results-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ai-stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid var(--border-subtle);
  padding-left: 8px;
}

.ai-stat-box .num {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
}

.ai-stat-box .lbl {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-gray);
}

.confidence-tag {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--status-success);
  font-weight: 700;
}

/* MEAL LOGGER HISTORY */
.logged-meals-card {
  grid-column: span 2;
}

@media (max-width: 680px) {
  .logged-meals-card {
    grid-column: span 1;
  }
}

.meals-category-group {
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}

.meals-category-group:last-child {
  border-bottom: none;
}

.meal-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.meal-group-header h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meals-sublist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 5px;
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
}

.meal-item-name {
  font-weight: 600;
  color: var(--text-white);
}

.meal-item-sub {
  font-size: 11px;
  color: var(--text-gray);
}

.meal-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meal-item-right .kcals {
  font-weight: 700;
  color: var(--brand-light);
}

.btn-delete-meal {
  background: none;
  border: none;
  color: var(--text-gray-dark);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
}

.btn-delete-meal:hover {
  color: #ff7f7f;
}

.empty-history {
  font-size: 12px;
  color: var(--text-gray-dark);
  text-align: center;
  padding: 16px 0;
}

/* PROGRESSIONS TAB (ANALYTICS) */
.analytics-header-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
}

.chart-selector-tabs {
  display: flex;
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.chart-tab-btn {
  background: none;
  border: none;
  color: var(--text-gray);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  text-align: center;
  transition: var(--transition-smooth);
}

.chart-tab-btn.active {
  background-color: var(--brand-primary);
  color: var(--text-white);
}

.chart-rendering-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
}

.chart-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-meta-left h3 {
  font-size: 16px;
  font-weight: 700;
}

.chart-meta-left p {
  font-size: 11px;
  color: var(--text-gray);
}

.badge-trend {
  background-color: rgba(76, 217, 100, 0.08);
  color: var(--status-success);
  border: 1px solid rgba(76, 217, 100, 0.15);
}

.svg-chart-container {
  width: 100%;
  height: 220px;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.svg-chart-container svg {
  display: block;
}

/* TABLE STYLING FOR LOGS */
.logs-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.logs-table th {
  background-color: var(--bg-panel-light);
  color: var(--text-gray);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.logs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-white);
}

.logs-table tr:last-child td {
  border-bottom: none;
}

/* SETTINGS TAB */
.install-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.accordion-item {
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  overflow: hidden;
}

.accordion-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.accordion-header h4 {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  margin-left: 10px;
}

.accordion-chevron {
  font-size: 8px;
  color: var(--text-gray-dark);
  transition: transform 0.25s;
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  background-color: rgba(255, 255, 255, 0.005);
}

.accordion-item.open .accordion-content {
  display: block;
}

.platform-logo {
  display: flex;
  align-items: center;
  color: var(--text-gray);
}

.step-list {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--text-gray);
}

/* FORM FIELDS FOR GOALS */
.settings-goals-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-section-couple {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-section-couple {
    grid-template-columns: 1fr;
  }
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-column h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  border-bottom: 1.5px solid var(--border-subtle);
  padding-bottom: 6px;
}

.form-title-moesha { color: var(--status-moesha); }
.form-title-dean { color: var(--status-dean); }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  color: var(--text-gray);
  font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  padding: 10px 12px;
  color: var(--text-white);
  font-size: 13px;
  width: 100%;
  transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 8px rgba(94, 106, 210, 0.15);
}

.form-divider {
  height: 1px;
  background-color: var(--border-subtle);
  width: 100%;
}

.full-width-form h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.full-width-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: var(--text-white);
  border: none;
  padding: 11px 20px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background-color: var(--brand-accent);
  box-shadow: 0 0 15px var(--brand-glow);
}

.w-100 {
  width: 100%;
}

/* ======================================================== */
/* WORKOUT RUNNER / PLAYER (MODAL / FULL SCREEN OVERLAY) */
/* ======================================================== */
.workout-player-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-charcoal);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.workout-player-modal.hidden {
  display: none;
}

.player-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.player-header {
  height: 65px;
  min-height: 65px;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-routine-title {
  display: flex;
  flex-direction: column;
}

.active-workout-badge {
  font-size: 9px;
  font-weight: 800;
  color: var(--status-success);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-success);
  box-shadow: 0 0 8px var(--status-success);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.player-routine-title h2 {
  font-size: 16px;
  font-weight: 700;
}

.btn-close-modal {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-close-modal:hover {
  background-color: var(--bg-panel-light);
}

/* DUO PLAYER MODE SELECTION */
.player-partner-switcher {
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.switcher-label {
  font-size: 11px;
  color: var(--text-gray);
  font-weight: 600;
  text-transform: uppercase;
}

.dual-tracker-tabs {
  display: flex;
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  padding: 2px;
  border-radius: 4px;
  width: 240px;
}

.btn-partner-tab {
  background: none;
  border: none;
  color: var(--text-gray);
  padding: 5px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  text-align: center;
  transition: var(--transition-smooth);
}

.btn-partner-tab.active {
  color: var(--text-white);
}

#player-switch-moesha.active { background-color: var(--status-moesha); color: var(--bg-charcoal); }
#player-switch-dean.active { background-color: var(--status-dean); color: var(--bg-charcoal); }

/* PLAYER BODY - TWO COLUMNS */
.player-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

@media (max-width: 680px) {
  .player-body {
    grid-template-columns: 1fr;
  }
}

.player-exercise-details-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
}

@media (max-width: 680px) {
  .player-exercise-details-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}

.exercise-illustration-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.illustration-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.barbell-svg {
  width: 140px;
  height: 140px;
}

.exercise-player-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exercise-player-meta .exercise-index {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--brand-light);
  letter-spacing: 0.05em;
  font-weight: 700;
}

.exercise-player-meta h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-white);
}

.exercise-player-meta p {
  font-size: 12px;
  color: var(--text-gray);
  line-height: 1.4;
}

.exercise-protip-badge {
  background-color: rgba(255,255,255,0.01);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 12px;
  font-size: 11px;
  color: var(--text-gray);
  display: flex;
  gap: 8px;
}

.exercise-protip-badge svg {
  flex-shrink: 0;
  color: var(--brand-primary);
}

/* SETS LOGGING PANEL */
.player-sets-logging-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  background-color: rgba(255,255,255,0.003);
}

.player-tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tracker-user-name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.moesha-accent { color: var(--status-moesha); }
.dean-accent { color: var(--status-dean); }

.tracker-add-set-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.tracker-add-set-btn:hover {
  background-color: var(--bg-panel-light);
}

.sets-table-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.set-row-item {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: var(--transition-smooth);
}

.set-row-item.completed {
  border-color: rgba(76, 217, 100, 0.2);
  background-color: rgba(76, 217, 100, 0.005);
}

.set-num-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-gray);
  width: 32px;
}

.set-row-item.completed .set-num-label {
  color: var(--status-success);
}

.set-inputs-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.set-input-sub {
  display: flex;
  align-items: center;
  gap: 6px;
}

.set-input-sub label {
  font-size: 11px;
  color: var(--text-gray-dark);
}

.set-input-sub input {
  width: 54px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 4px 6px;
  color: var(--text-white);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.set-input-sub input:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.btn-complete-set-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: var(--transition-smooth);
}

.btn-complete-set-check:hover {
  border-color: var(--status-success);
}

.set-row-item.completed .btn-complete-set-check {
  background-color: var(--status-success);
  border-color: var(--status-success);
  color: var(--bg-charcoal);
}

.btn-remove-set {
  background: none;
  border: none;
  color: var(--text-gray-dark);
  cursor: pointer;
  font-size: 13px;
}

.btn-remove-set:hover {
  color: #ff7f7f;
}

/* RADIAL REST TIMER CARD */
.player-timer-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition-smooth);
}

/* ACTIVE GLOWING TIMER IN COUPE BRAND VIOLET */
.player-timer-card.rest-timer-active {
  border-color: var(--brand-accent);
  background-color: rgba(94, 106, 210, 0.01);
  box-shadow: 0 0 15px rgba(94, 106, 210, 0.03);
}

.player-timer-card.rest-timer-inactive {
  opacity: 0.55;
}

.timer-radial-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
}

.timer-svg {
  transform: rotate(-90deg);
}

.timer-ring-bg {
  stroke: rgba(255,255,255,0.03);
}

.timer-ring-bar {
  transition: stroke-dashoffset 0.1s linear;
}

.timer-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-white);
}

.timer-controls-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.timer-controls-row .title {
  font-size: 12px;
  font-weight: 700;
}

.timer-preset-btns {
  display: flex;
  gap: 8px;
}

.btn-timer-preset {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-gray);
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 600;
}

.btn-timer-preset:hover {
  background-color: var(--bg-panel-light);
  color: var(--text-white);
}

.btn-timer-action {
  background: none;
  border: none;
  color: var(--brand-light);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  width: max-content;
}

.btn-timer-action:hover {
  color: var(--text-white);
}

/* BOTTOM NAVIGATION CONTROL BUTTONS FOR PLAYER */
.player-bottom-navigation {
  height: 70px;
  border-top: 1px solid var(--border-subtle);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-charcoal);
}

.btn-secondary {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 10px 16px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background-color: var(--bg-panel-light);
}

.player-nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ======================================================== */
/* APP MODALS STYLE (FOR FORMS & ALERTS) */
/* ======================================================== */
.app-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(5, 4, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-modal.hidden {
  display: none;
}

.modal-content {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-focus);
  border-radius: 8px;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: modalSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

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

.modal-header-panel {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header-panel h3 {
  font-size: 15px;
  font-weight: 700;
}

.btn-modal-x {
  background: none;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  font-size: 16px;
}

.modal-body-panel {
  padding: 20px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* MULTI-STEP ONBOARDING WIZARD SYSTEM */
.onboarding-modal-content {
  max-width: 500px;
}

.onboard-step-container {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.onboard-step-container.active-step {
  display: flex;
}

.onboard-progress-tracker {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.onboard-dot {
  flex: 1;
  height: 3px;
  background-color: var(--bg-panel-light);
  border-radius: 1px;
}

.onboard-dot.filled {
  background-color: var(--brand-primary);
}

.onboard-step-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.onboard-step-desc {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.4;
}

.onboard-selection-box-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.selection-card-item {
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 16px;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.selection-card-item:hover {
  border-color: var(--border-focus);
}

.selection-card-item.selected {
  border-color: var(--brand-primary);
  background-color: rgba(94, 106, 210, 0.02);
}

.selection-card-item .selection-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.selection-card-item.selected .selection-dot {
  border-color: var(--brand-primary);
  background-color: var(--brand-primary);
}

.selection-card-item .selection-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
}

.selection-card-item .selection-name {
  font-size: 13px;
  font-weight: 700;
}

.onboard-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

/* RECENT WORKOUT SUMMARY REWARD SCREEN (CONGRATS MODAL) */
.workout-congrats-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-focus);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  padding: 32px 24px 24px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.congrats-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background-color: var(--brand-primary);
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

.workout-congrats-card h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.congrats-sub {
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 24px;
}

.congrats-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.con-stat {
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.con-stat .num {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-white);
  font-family: 'Outfit', sans-serif;
}

.con-stat .lbl {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-gray);
  margin-top: 2px;
}

/* BANNER PROMPTS FOR INSTALL */
.pwa-install-banner {
  position: fixed;
  bottom: 76px;
  left: 16px;
  right: 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-focus);
  border-radius: 8px;
  padding: 14px 16px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: bannerSlideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

.pwa-install-banner.hidden {
  display: none;
}

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

.banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background-color: var(--bg-panel-light);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.banner-text h4 {
  font-size: 13px;
  font-weight: 700;
}

.banner-text p {
  font-size: 11px;
  color: var(--text-gray);
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-banner-action {
  background-color: var(--brand-primary);
  color: var(--text-white);
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-banner-close {
  background: none;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  padding: 4px;
  font-size: 12px;
}

/* ======================================================== */
/* PREMIUM INTERACTIVE ADDITIONS & OVERLAYS */
/* ======================================================== */

/* AI Dropzone Image Preview and Laser Scan Overlay */
.ai-preview-wrapper {
  position: relative;
  width: 100%;
  max-height: 180px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.ai-preview-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.ai-scan-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-accent), transparent);
  box-shadow: 0 0 10px var(--brand-accent);
  animation: laserSweep 2s ease-in-out infinite;
}

@keyframes laserSweep {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

/* Monochromatic Connectivity Badge */
.network-status-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-panel);
  transition: var(--transition-smooth);
}

.network-status-badge.online {
  color: var(--status-success);
  border-color: rgba(76, 217, 100, 0.15);
}

.network-status-badge.offline {
  color: var(--text-gray);
  border-color: var(--border-subtle);
}

/* Rest Timer Interval Fine-Tuner Buttons */
.btn-timer-adj {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-gray);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition-smooth);
}

.btn-timer-adj:hover {
  background-color: var(--bg-panel-light);
  color: var(--text-white);
  border-color: var(--border-focus);
}

/* Interactive SVG Chart coordinate glow */
.chart-tooltip-trigger {
  cursor: pointer;
  transition: r 0.25s;
}

.chart-tooltip-trigger:hover {
  r: 6px;
}

/* Collapsible Analytics log sets */
.log-details-accordion {
  font-size: 11px;
  color: var(--text-gray);
  padding: 4px 14px;
  background-color: rgba(255, 255, 255, 0.003);
  border-bottom: 1px solid var(--border-subtle);
  animation: fadeIn 0.2s ease-out;
}

