/* CSS Design System for FitMers Prestige Desktop - Premium Version */
:root {
  --bg-primary: #070708;
  --bg-secondary: #111113;
  --bg-elevated: #171416;
  --bg-gradient:
    linear-gradient(135deg, rgba(213, 26, 45, 0.08) 0%, transparent 32%),
    radial-gradient(circle at 50% 0%, #171416 0%, #070708 58%, #030304 100%);
  
  --card-bg: rgba(18, 16, 18, 0.78);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-strong: rgba(255, 255, 255, 0.14);
  --card-border-glow: rgba(213, 26, 45, 0.24);
  
  --primary: #b51224;
  --primary-hover: #d51a2d;
  --primary-deep: #5f0710;
  --primary-glow: rgba(213, 26, 45, 0.28);
  --primary-gradient: linear-gradient(135deg, #7b0914 0%, #b51224 48%, #ef3f4f 100%);
  
  --secondary: #4f1118;
  --tertiary: #ff4d5e;
  --accent-gold: #f5b84b;
  --accent-gold-muted: rgba(245, 184, 75, 0.16);
  
  --text-main: #f7f2f2;
  --text-muted: #aaa3aa;
  --text-subtle: #777179;
  --text-dark: #070708;
  
  --color-green: #00e676;
  --color-green-grad: linear-gradient(135deg, #00e676 0%, #00b0ff 100%);
  --color-blue: #00b0ff;
  --color-blue-grad: linear-gradient(135deg, #00b0ff 0%, #2979ff 100%);
  --color-orange: #ff9100;
  --color-orange-grad: linear-gradient(135deg, #ff9100 0%, #ff3d00 100%);
  --color-purple: #f5b84b;
  --color-purple-grad: linear-gradient(135deg, #f5b84b 0%, #b51224 100%);

  --sidebar-width: 75px;
  --transition-speed: 0.22s;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --border-radius-lg: 12px;
  --border-radius-md: 10px;
  --border-radius-sm: 8px;
  --shadow-elevated: 0 18px 45px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background-color var(--transition-speed) ease;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--tertiary);
  border: 2px solid transparent;
  background-clip: padding-box;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient glow effects behind the app */
body::before, body::after {
  display: none;
}

/* App Container */
.app-container {
  display: flex;
  height: 100vh;
  position: relative;
}

/* Sidebar Styling */
.sidebar {
  position: fixed;
  left: 1.25rem;
  top: 0;
  bottom: 0;
  margin: auto 0;
  width: 70px;
  height: fit-content;
  background-color: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0.5rem;
  align-items: center;
  gap: 2rem;
  z-index: 1000;
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  transition: all var(--transition-speed) ease;
}

.sidebar .profile-card {
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  gap: 0.5rem;
}

.logo-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-hover) 62%, var(--accent-gold) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  margin: 0;
  box-shadow: 0 8px 18px rgba(213, 26, 45, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  position: relative;
  overflow: hidden;
}

.logo-circle::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.1) 50%, transparent 55%);
  transform: rotate(30deg);
  animation: logoShine 6s infinite;
}

@keyframes logoShine {
  0% { transform: translate(-30%, -30%) rotate(30deg); }
  20%, 100% { transform: translate(30%, 30%) rotate(30deg); }
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  align-items: center;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--border-radius-md);
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  border: 1px solid transparent;
}

.nav-item i {
  font-size: 1.35rem;
  transition: transform var(--transition-speed) ease;
}

.nav-item:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nav-item:hover i {
  transform: scale(1.15);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(213, 26, 45, 0.2) 0%, rgba(245, 184, 75, 0.06) 100%);
  border-color: rgba(213, 26, 45, 0.38);
  box-shadow: 0 0 16px rgba(213, 26, 45, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.nav-item.active i {
  color: var(--tertiary);
  text-shadow: 0 0 10px var(--primary-glow);
}



/* Topbar Layout & Sync */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.sync-topbar {
  display: none !important;
}

.sync-topbar .btn {
  border-radius: 20px;
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-right: 1px solid var(--card-border);
  padding-right: 1rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  position: relative;
}

.status-dot.online {
  background-color: var(--color-green);
  box-shadow: 0 0 12px var(--color-green);
  animation: pulseGreen 2s infinite;
}

.status-dot.offline {
  background-color: var(--primary-hover);
  box-shadow: 0 0 12px var(--primary-hover);
  animation: pulseRed 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

@keyframes pulseRed {
  0% { box-shadow: 0 0 0 0 rgba(204, 0, 24, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(204, 0, 24, 0); }
  100% { box-shadow: 0 0 0 0 rgba(204, 0, 24, 0); }
}

.status-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sync-actions {
  display: flex;
  gap: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-family);
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all var(--transition-speed) cubic-bezier(0.165, 0.84, 0.44, 1);
  font-size: 0.85rem;
  padding: 0.75rem 1.25rem;
  min-height: 42px;
}

.btn:focus-visible,
.nav-item:focus-visible,
.form-control:focus-visible,
.login-user-card:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 8px 22px var(--primary-glow), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9c0f1e 0%, var(--primary-hover) 64%, #ff5b68 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(213, 26, 45, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.045);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.075);
  border-color: var(--card-border-strong);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: rgba(255, 42, 84, 0.08);
  color: #ff3b68;
  border: 1px solid rgba(255, 42, 84, 0.18);
}

.btn-danger:hover {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px var(--primary-glow);
}

.btn-sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
}

/* Main Content Styling */
.main-content {
  flex-grow: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 2.5rem 3.5rem 2.5rem 7.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 5;
}

/* Topbar */
.topbar {
  display: none !important;
}

.topbar-left {
  display: none !important;
}

.greeting-area h1 {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, var(--tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0;
}

.greeting-area p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: all var(--transition-speed) ease;
}

.profile-card:hover {
  transform: translateY(-1px);
}

.avatar-area {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  border: 1px solid rgba(255, 59, 92, 0.3);
  box-shadow: 0 0 10px rgba(255, 59, 92, 0.2);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.avatar-area:hover {
  transform: scale(1.08);
  border-color: var(--tertiary);
  box-shadow: 0 0 15px rgba(255, 59, 92, 0.4);
}

.profile-info {
  display: none !important;
}

.profile-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.profile-level {
  font-size: 0.65rem;
  color: var(--tertiary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.15rem;
  background: rgba(255, 59, 92, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
  width: fit-content;
  border: 1px solid rgba(255, 59, 92, 0.15);
}

/* Tab Content Visibility */
.tab-content {
  display: none;
  flex-direction: column;
  gap: 2.5rem;
}

.tab-content.active {
  display: flex;
  animation: fadeInUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-soft), inset 0 1px 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--transition-speed) cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 100%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-strong);
  box-shadow: var(--shadow-elevated);
}

.stat-card:hover:has(.stat-icon.red) {
  border-color: rgba(255, 42, 84, 0.45);
  box-shadow: 0 15px 35px rgba(255, 42, 84, 0.15), 0 0 15px rgba(255, 42, 84, 0.1);
}

.stat-card:hover:has(.stat-icon.orange) {
  border-color: rgba(255, 145, 0, 0.45);
  box-shadow: 0 15px 35px rgba(255, 145, 0, 0.15), 0 0 15px rgba(255, 145, 0, 0.1);
}

.stat-card:hover:has(.stat-icon.green) {
  border-color: rgba(0, 230, 118, 0.45);
  box-shadow: 0 15px 35px rgba(0, 230, 118, 0.15), 0 0 15px rgba(0, 230, 118, 0.1);
}

.stat-card:hover:has(.stat-icon.blue) {
  border-color: rgba(0, 176, 255, 0.45);
  box-shadow: 0 15px 35px rgba(0, 176, 255, 0.15), 0 0 15px rgba(0, 176, 255, 0.1);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  position: relative;
  z-index: 2;
}

.stat-icon.red { 
  background: rgba(213, 26, 45, 0.14); 
  color: var(--tertiary);
  border: 1px solid rgba(213, 26, 45, 0.24);
  box-shadow: 0 0 15px rgba(213, 26, 45, 0.18);
}
.stat-icon.orange { 
  background: rgba(255, 145, 0, 0.12); 
  color: var(--color-orange);
  border: 1px solid rgba(255, 145, 0, 0.2);
  box-shadow: 0 0 15px rgba(255, 145, 0, 0.25);
}
.stat-icon.green { 
  background: rgba(0, 230, 118, 0.12); 
  color: var(--color-green);
  border: 1px solid rgba(0, 230, 118, 0.2);
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.25);
}
.stat-icon.blue { 
  background: rgba(0, 176, 255, 0.12); 
  color: var(--color-blue);
  border: 1px solid rgba(0, 176, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 176, 255, 0.25);
}

.stat-details {
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.stat-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-details h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.2rem 0;
  color: #fff;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Widgets Container */
.widgets-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
}

.workout-management-grid {
  align-items: start;
  margin-bottom: 2rem;
}

.workout-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

.workout-points-hint {
  color: var(--accent-gold);
  font-size: 0.84rem;
  font-weight: 700;
  margin: -0.2rem 0 1rem;
}

.workout-history-card {
  min-width: 0;
}

.workout-history-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.workout-history-table {
  min-width: 570px;
}

.workout-history-table th,
.workout-history-table td {
  white-space: nowrap;
}

.workout-history-name {
  color: #fff;
  font-weight: 700;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workout-history-empty {
  color: var(--text-muted);
  padding: 1.5rem !important;
  text-align: center;
  white-space: normal !important;
}

.body-measurement-grid {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.5fr);
  align-items: start;
  margin-top: 1.5rem;
}

.body-measurement-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.9rem;
}

.body-measurement-fields .form-group { min-width: 0; }
.form-hint { color: var(--text-muted); font-size: 0.75rem; line-height: 1.45; }
.body-measurement-notes { min-height: 88px; resize: vertical; }
.body-measurement-history-card { min-width: 0; }

.body-measurement-latest {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.25rem;
}

.body-measurement-metric {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.body-measurement-metric-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.body-measurement-metric-value { color: #fff; font-size: 1.05rem; font-weight: 800; }
.body-measurement-delta { display: block; margin-top: 0.2rem; color: var(--text-muted); font-size: 0.72rem; }
.body-measurement-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.body-measurement-table { min-width: 760px; }
.body-measurement-table th,
.body-measurement-table td { white-space: nowrap; }
.body-measurement-date-button { padding: 0; border: 0; background: transparent; color: var(--tertiary); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.body-measurement-date-button:focus-visible { outline: 2px solid var(--tertiary); outline-offset: 3px; border-radius: 2px; }
.body-measurement-empty { color: var(--text-muted); padding: 1.5rem !important; text-align: center; white-space: normal !important; }

.workout-session-modal {
  z-index: 1200;
  padding: clamp(0.5rem, 3vw, 2rem);
}

.workout-session-dialog {
  max-width: 900px;
  max-height: min(92vh, 1000px);
  max-height: min(92dvh, 1000px);
}

.workout-session-header {
  align-items: flex-start;
  background: var(--bg-secondary);
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

.workout-session-header h3 {
  margin-top: 0.2rem;
}

.workout-session-eyebrow,
.workout-session-stat-label {
  color: var(--accent-gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.workout-session-subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.workout-session-stats {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
}

.workout-session-stats > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.workout-session-stats strong {
  color: #fff;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.workout-session-notice {
  background: rgba(232, 177, 75, 0.09);
  border: 1px solid rgba(232, 177, 75, 0.25);
  border-radius: 12px;
  color: #f5d79b;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
}

.workout-session-exercise {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  margin-bottom: 1rem;
  padding: 1.15rem;
}

.workout-session-exercise-heading,
.day-workout-actions {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
}

.workout-session-exercise-heading > div {
  align-items: center;
  display: flex;
  gap: 0.7rem;
  min-width: 0;
}

.workout-session-exercise-heading h4 {
  color: #fff;
  font-size: 1.02rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.workout-session-exercise-number {
  align-items: center;
  background: rgba(231, 76, 60, 0.12);
  border-radius: 10px;
  color: var(--primary);
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 0.74rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
}

.workout-session-target {
  color: var(--text-muted);
  flex: 0 0 auto;
  font-size: 0.78rem;
}

.workout-session-set-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.workout-session-set-row {
  align-items: end;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  border-radius: 12px;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(115px, 0.8fr) minmax(100px, 1fr) minmax(120px, 1fr);
  padding: 0.7rem;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.workout-session-set-row.is-complete {
  background: rgba(78, 201, 147, 0.08);
  border-color: rgba(78, 201, 147, 0.25);
}

.workout-session-set-toggle {
  align-items: center;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 0.85rem;
  font-weight: 750;
  gap: 0.65rem;
  min-height: 42px;
}

.workout-session-set-toggle input {
  accent-color: #4ec993;
  height: 18px;
  width: 18px;
}

.workout-session-set-field {
  color: var(--text-muted);
  display: grid;
  font-size: 0.7rem;
  font-weight: 700;
  gap: 0.25rem;
  letter-spacing: 0.04em;
}

.workout-session-set-field .form-control {
  min-height: 40px;
  padding: 0.45rem 0.65rem;
}

/* Coach: account-backed guidance and progress */
.coach-page { gap: 1.2rem; min-width: 0; }
.coach-page-header,
.coach-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.coach-page-header h2 { margin: 0.2rem 0 0.4rem; color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.coach-page-header .data-explainer { max-width: 680px; margin-bottom: 0; }
.coach-eyebrow { margin: 0; color: var(--tertiary); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.12em; }
.coach-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }
.coach-kpi {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 0.15rem 0.75rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
}
.coach-kpi-icon { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--tertiary); background: rgba(245,184,75,0.09); }
.coach-kpi-label { color: var(--text-muted); font-size: 0.7rem; line-height: 1.3; }
.coach-kpi strong { min-width: 0; overflow-wrap: anywhere; color: #fff; font-size: clamp(0.95rem, 1.6vw, 1.2rem); }
.coach-actions-card,
.coach-feature-grid > .widget-card,
.coach-achievements-card,
.coach-measurement-card { min-width: 0; }
.coach-card-header { margin-bottom: 1.1rem; padding-bottom: 0.9rem; }
.coach-card-header .widget-header { margin-bottom: 0; }
.coach-card-header h3 { margin-bottom: 0.3rem; }
.coach-card-header .data-explainer { margin: 0; }
.coach-live-tag,
.coach-count,
.coach-trend {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.coach-live-tag { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.55rem; border: 1px solid rgba(0,210,138,0.2); border-radius: 999px; color: #8de6c3; background: rgba(0,210,138,0.05); }
.coach-live-tag span { width: 6px; height: 6px; border-radius: 50%; background: #00d28a; box-shadow: 0 0 8px rgba(0,210,138,0.8); }
.coach-actions { display: grid; gap: 0.65rem; }
.coach-action { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; padding: 0.9rem; border: 1px solid var(--card-border); border-radius: 13px; background: rgba(255,255,255,0.018); }
.coach-action.is-priority { border-color: rgba(245,184,75,0.25); background: linear-gradient(100deg, rgba(245,184,75,0.07), rgba(255,255,255,0.015)); }
.coach-action-index { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(245,184,75,0.25); border-radius: 10px; color: var(--tertiary); font-size: 0.72rem; font-weight: 800; }
.coach-action-copy { min-width: 0; }
.coach-action-copy h4 { margin: 0 0 0.2rem; color: #fff; font-size: 0.9rem; }
.coach-action-copy p { margin: 0; color: var(--text-muted); font-size: 0.76rem; line-height: 1.5; }
.coach-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; min-width: 0; }
.coach-calorie-card { background: radial-gradient(ellipse at top right, rgba(245,184,75,0.08), transparent 52%), var(--card-bg); }
.coach-calorie-target { margin: 0.5rem 0 1.15rem; }
.coach-calorie-status { color: var(--tertiary); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; }
.coach-calorie-values { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.5rem 0 0.3rem; }
.coach-calorie-values strong { color: #fff; font-size: clamp(2rem, 4vw, 2.7rem); letter-spacing: -0.04em; line-height: 1.1; }
.coach-calorie-values span { color: var(--text-muted); font-size: 0.8rem; }
.coach-calorie-delta { display: inline-block; margin: 0.25rem 0 0.55rem; padding: 0.25rem 0.5rem; border: 1px solid rgba(245,184,75,0.18); border-radius: 999px; color: var(--tertiary); font-size: 0.68rem; font-weight: 700; }
.coach-calorie-target p { max-width: 550px; margin: 0.35rem 0 0; color: var(--text-muted); font-size: 0.76rem; line-height: 1.55; }
.coach-trend { align-self: flex-start; padding: 0.4rem 0.55rem; border-radius: 999px; background: rgba(255,255,255,0.035); }
.coach-trend.is-up { color: #8de6c3; background: rgba(0,210,138,0.08); }
.coach-trend.is-down { color: #ffb2a5; background: rgba(255,95,73,0.08); }
.coach-volume-chart { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: end; gap: 0.45rem; min-height: 190px; padding: 0.35rem 0 0; }
.coach-volume-column { display: grid; grid-template-rows: 20px minmax(74px, 1fr) 24px; justify-items: center; align-items: end; min-width: 0; height: 100%; }
.coach-volume-value { overflow: hidden; max-width: 100%; color: var(--text-muted); font-size: 0.58rem; text-overflow: ellipsis; white-space: nowrap; }
.coach-volume-bar { display: block; align-self: end; width: min(100%, 30px); height: var(--coach-volume-height); min-height: 3px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, rgba(213,26,45,0.75), rgba(213,26,45,0.27)); }
.coach-volume-bar.is-current { background: linear-gradient(180deg, var(--tertiary), rgba(245,184,75,0.32)); }
.coach-volume-label { align-self: end; color: var(--text-muted); font-size: 0.57rem; white-space: nowrap; }
.coach-chart-legend { display: flex; justify-content: space-between; margin-top: 0.45rem; color: var(--text-muted); font-size: 0.64rem; }
.coach-chart-legend span:first-child::before { display: inline-block; width: 8px; height: 8px; margin-right: 0.4rem; border-radius: 2px; background: var(--tertiary); content: ''; }
.coach-lifts { display: grid; gap: 0.45rem; }
.coach-lift-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 0.65rem; padding: 0.65rem 0.15rem; border-bottom: 1px solid rgba(255,255,255,0.055); }
.coach-lift-row:last-child { border-bottom: 0; }
.coach-lift-rank { color: var(--tertiary); font-size: 0.76rem; font-weight: 800; }
.coach-lift-name,
.coach-lift-estimate { display: flex; min-width: 0; flex-direction: column; gap: 0.18rem; }
.coach-lift-name strong { overflow: hidden; color: #fff; font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.coach-lift-name span,
.coach-lift-estimate span { color: var(--text-muted); font-size: 0.63rem; }
.coach-lift-estimate { align-items: flex-end; }
.coach-lift-estimate strong { color: #fff; font-size: 0.82rem; white-space: nowrap; }
.coach-balance { display: grid; gap: 0.75rem; }
.coach-balance-label { display: flex; justify-content: space-between; margin-bottom: 0.28rem; color: var(--text-muted); font-size: 0.7rem; }
.coach-balance-label strong { color: #fff; font-size: 0.68rem; }
.coach-balance-track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.07); }
.coach-balance-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--tertiary)); }
.coach-balance-note { margin: 0.25rem 0 0; padding: 0.7rem; border: 1px solid rgba(245,184,75,0.16); border-radius: 10px; color: #e4c997; background: rgba(245,184,75,0.045); font-size: 0.69rem; line-height: 1.5; }
.coach-achievements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.coach-achievement { display: flex; gap: 0.65rem; min-width: 0; padding: 0.8rem; border: 1px solid var(--card-border); border-radius: 12px; background: rgba(255,255,255,0.014); opacity: 0.78; }
.coach-achievement.is-unlocked { border-color: rgba(245,184,75,0.2); background: rgba(245,184,75,0.035); opacity: 1; }
.coach-achievement-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; color: var(--text-muted); background: rgba(255,255,255,0.045); }
.coach-achievement.is-unlocked .coach-achievement-icon { color: var(--tertiary); background: rgba(245,184,75,0.1); }
.coach-achievement-copy { min-width: 0; flex: 1; }
.coach-achievement-copy > div:first-child { display: flex; justify-content: space-between; gap: 0.35rem; }
.coach-achievement-copy strong { overflow: hidden; color: #fff; font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.coach-achievement-copy > div:first-child span { color: var(--tertiary); font-size: 0.52rem; font-weight: 800; }
.coach-achievement-copy p { min-height: 2.3em; margin: 0.25rem 0 0.45rem; color: var(--text-muted); font-size: 0.62rem; line-height: 1.4; }
.coach-achievement-progress { height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.08); }
.coach-achievement-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--tertiary)); }
.coach-achievement-copy small { display: block; margin-top: 0.25rem; color: var(--text-muted); font-size: 0.57rem; text-align: right; }
.coach-measurements { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 0.6rem; }
.coach-measurement-value { display: flex; min-width: 0; flex-direction: column; gap: 0.3rem; padding: 0.75rem; border: 1px solid var(--card-border); border-radius: 11px; background: rgba(255,255,255,0.018); }
.coach-measurement-value span { color: var(--text-muted); font-size: 0.64rem; }
.coach-measurement-value strong { color: #fff; font-size: 0.92rem; }
.coach-empty { margin: 0; padding: 1.2rem 0.5rem; color: var(--text-muted); font-size: 0.76rem; line-height: 1.55; text-align: center; }

@media (max-width: 920px) {
  .coach-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .coach-page { gap: 0.95rem; }
  .coach-page-header { align-items: flex-start; }
  .coach-page-header > .btn { flex: 0 0 auto; padding: 0.55rem 0.65rem; font-size: 0.68rem; }
  .coach-page-header .data-explainer { font-size: 0.7rem; }
  .coach-kpi-grid { gap: 0.55rem; }
  .coach-kpi { grid-template-columns: 32px minmax(0, 1fr); gap: 0.12rem 0.5rem; padding: 0.7rem 0.6rem; }
  .coach-kpi-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 0.75rem; }
  .coach-kpi-label { font-size: 0.59rem; }
  .coach-kpi strong { font-size: 0.9rem; }
  .coach-action { grid-template-columns: 28px minmax(0, 1fr); gap: 0.55rem; padding: 0.7rem; }
  .coach-action-index { width: 27px; height: 27px; }
  .coach-action-copy h4 { font-size: 0.79rem; }
  .coach-action-copy p { font-size: 0.7rem; }
  .coach-action > .btn { grid-column: 2; justify-self: start; margin-top: 0.1rem; }
  .coach-feature-grid { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
  .coach-feature-grid > .widget-card,
  .coach-actions-card,
  .coach-achievements-card,
  .coach-measurement-card { padding: 1rem; }
  .coach-card-header { gap: 0.55rem; }
  .coach-card-header h3 { gap: 0.5rem; font-size: 0.95rem; }
  .coach-live-tag { font-size: 0.51rem; }
  .coach-volume-chart { min-height: 165px; gap: 0.25rem; }
  .coach-volume-label { font-size: 0.5rem; }
  .coach-volume-value { font-size: 0.5rem; }
  .coach-achievements { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
  .coach-achievement { gap: 0.45rem; padding: 0.6rem; }
  .coach-achievement-icon { flex-basis: 26px; width: 26px; height: 26px; }
  .coach-achievement-copy > div:first-child { flex-direction: column; gap: 0.1rem; }
  .coach-achievement-copy > div:first-child span { align-self: flex-start; }
  .coach-count { font-size: 0.55rem; }
  .coach-measurements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar .nav-menu { justify-content: space-between; gap: 0; }
  .sidebar .nav-item { width: auto; min-width: 0; max-width: 48px; flex: 1 1 0; }
}

.workout-session-footer {
  background: var(--bg-secondary);
  bottom: 0;
  position: sticky;
}

.widget-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color var(--transition-speed) ease;
}

.widget-card:hover {
  border-color: rgba(255, 59, 92, 0.25);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35), 0 0 15px rgba(255, 59, 92, 0.05);
}

.widget-header {
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.widget-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
}

.widget-header h3 i {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

/* User Profile detail layout */
.profile-details-grid {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.detail-item {
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  transition: all var(--transition-speed) ease;
}

.detail-item:hover {
  background: rgba(255, 255, 255, 0.01);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-bottom-color: rgba(255, 59, 92, 0.1);
}

.detail-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-item strong {
  color: var(--text-muted);
  font-weight: 500;
}

.detail-item span {
  font-weight: 700;
  color: #fff;
}

/* Charts Containers */
.chart-container {
  height: 260px;
  position: relative;
}

.chart-container-donut {
  height: 240px;
  position: relative;
  display: flex;
  justify-content: center;
}

.chart-container-large {
  height: 320px;
  position: relative;
}

.full-width-widget {
  grid-column: span 2;
}

/* Forms layout */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  font-family: var(--font-family);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-speed) ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.form-control:focus {
  border-color: rgba(213, 26, 45, 0.62);
  box-shadow: 0 0 0 4px rgba(213, 26, 45, 0.12);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.form-control:focus {
  border-color: var(--tertiary);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(255, 59, 92, 0.25), inset 0 1px 2px rgba(0,0,0,0.15);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b8a9f' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 1.25rem) center;
  padding-right: 2.5rem;
}

select.form-control option {
  background-color: var(--bg-secondary);
  color: #fff;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.col {
  flex: 1;
}

/* Section Header Styles */
.section-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1.25rem;
}

.section-actions h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
}

/* Program Cards layout */
.programs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

.program-card {
  position: relative;
  overflow: hidden;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15), inset 0 1px 1px rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.program-card:hover::before {
  opacity: 1;
}

.program-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 42, 84, 0.35);
  box-shadow: 0 20px 40px rgba(255, 42, 84, 0.15);
}

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

.program-card-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.days-badge {
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.program-meta {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.meta-item i {
  color: var(--tertiary);
  font-size: 0.9rem;
}

.program-details-expanded {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0;
  transition: max-height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease, margin-top 0.3s ease, padding-top 0.3s ease;
}

.program-details-expanded.active {
  max-height: 600px;
  opacity: 1;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  overflow-y: auto;
}

.day-block {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-md);
  padding: 1.1rem;
}

.day-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 0.6rem;
  margin-bottom: 0.85rem;
}

.day-block-header h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--tertiary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.day-exercise-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-weight: 600;
}

.exercises-table {
  width: 100%;
  border-collapse: collapse;
}

.exercises-table th, .exercises-table td {
  padding: 0.55rem 0.4rem;
  text-align: left;
  font-size: 0.82rem;
}

.exercises-table th {
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.exercises-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.01);
}

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

.exercise-name-cell {
  color: #fff;
  font-weight: 700;
}

.exercise-tip-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.exercise-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  letter-spacing: 0.3px;
}

.exercise-badge.chest { background: rgba(255, 145, 0, 0.1); color: var(--color-orange); border: 1px solid rgba(255, 145, 0, 0.2); }
.exercise-badge.back { background: rgba(0, 176, 255, 0.1); color: var(--color-blue); border: 1px solid rgba(0, 176, 255, 0.2); }
.exercise-badge.legs { background: rgba(0, 230, 118, 0.1); color: var(--color-green); border: 1px solid rgba(0, 230, 118, 0.2); }
.exercise-badge.shoulders { background: rgba(213, 0, 249, 0.1); color: var(--color-purple); border: 1px solid rgba(213, 0, 249, 0.2); }
.exercise-badge.arms { background: rgba(213, 0, 249, 0.1); color: var(--color-purple); border: 1px solid rgba(213, 0, 249, 0.2); }
.exercise-badge.cardio { background: rgba(255, 59, 92, 0.1); color: var(--tertiary); border: 1px solid rgba(255, 59, 92, 0.2); }

.program-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.25rem;
  margin-top: 0.5rem;
}

.program-actions {
  display: flex;
  gap: 0.5rem;
}

.program-actions .btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

/* Modal and overlays */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(6, 5, 11, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInModal 0.25s ease;
}

.modal.active {
  display: flex;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  width: 100%;
  max-width: 850px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 24px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  animation: scaleInModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleInModal {
  to { transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding: 1.5rem 2rem;
}

.modal-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-speed);
}

.modal-close:hover {
  color: var(--primary);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  border-top: 1px solid var(--card-border);
  padding-top: 1.5rem;
}

.days-section {
  margin-top: 2rem;
  border-top: 1px solid var(--card-border);
  padding-top: 1.5rem;
}

.days-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.days-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.days-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Individual Day edit panel */
.day-edit-card {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  position: relative;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.02);
}

.day-title-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.exercises-edit-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
  border-left: 2px solid rgba(255, 42, 84, 0.25);
  padding-left: 1.25rem;
}

.exercise-edit-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr 2fr auto;
  gap: 0.75rem;
  align-items: center;
}

/* Meals List */
.meals-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.meal-item {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 0.95rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-speed) ease;
}

.meal-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.meal-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meal-badge.kahvalti { background-color: rgba(0, 176, 255, 0.15); color: var(--color-blue); }
.meal-badge.öğle { background-color: rgba(255, 145, 0, 0.15); color: var(--color-orange); }
.meal-badge.akşam { background-color: rgba(213, 0, 249, 0.15); color: var(--color-purple); }
.meal-badge.ara { background-color: rgba(0, 230, 118, 0.15); color: var(--color-green); }

.meal-info-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.meal-name-text {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.meal-cals-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 500;
}

.meal-right-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.meal-complete-btn {
  background: none;
  border: none;
  color: var(--color-green);
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s;
}

.meal-complete-btn:hover {
  transform: scale(1.15);
}

.meal-item.completed {
  opacity: 0.7;
}

.meal-item.completed .meal-name-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--primary);
  border-left: 5px solid var(--primary);
  color: #fff;
  padding: 1.1rem 1.65rem;
  border-radius: var(--border-radius-md);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 42, 84, 0.1);
  z-index: 2000;
  display: none;
  font-weight: 600;
  font-size: 0.92rem;
  animation: slideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.active {
  display: block;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- VITRUVA DASHBOARD PREMIUM STYLING --- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.25rem;
  align-items: start;
  width: 100%;
}

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

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Hero Banner */
.hero-banner {
  position: relative;
  border-radius: 18px;
  height: 320px;
  background-image:
    linear-gradient(90deg, rgba(6, 5, 6, 0.98) 0%, rgba(10, 8, 10, 0.86) 48%, rgba(12, 8, 9, 0.32) 100%),
    url('hero_bg.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 3rem;
  border: 1px solid var(--card-border-strong);
  box-shadow: var(--shadow-elevated), inset 0 1px 2px rgba(255,255,255,0.06);
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  background:
    linear-gradient(to left, rgba(213, 26, 45, 0.13) 0%, transparent 78%),
    linear-gradient(to top, rgba(245, 184, 75, 0.08) 0%, transparent 52%);
  pointer-events: none;
}

.hero-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-gold), var(--primary-hover));
}

.hero-content {
  max-width: 55%;
  z-index: 2;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 35%, #ffb4bc 72%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 0.95rem;
  color: #c5bec4;
  margin-bottom: 1.75rem;
  font-weight: 500;
  line-height: 1.5;
}

.hero-btn {
  width: fit-content;
  padding: 0.85rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(213, 26, 45, 0.3);
  transition: all 0.3s ease;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(213, 26, 45, 0.38);
}

/* Sections & Header */
.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.section-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

.view-all-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity 0.2s;
}

.view-all-link:hover {
  opacity: 0.8;
}

/* Plan and Program Grids */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

/* Plan Cards */
.plan-card {
  position: relative;
  border-radius: 18px;
  height: 190px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-speed) cubic-bezier(0.165, 0.84, 0.44, 1);
}

.plan-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 59, 92, 0.3);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5), 0 0 10px rgba(255, 59, 92, 0.1);
}

.plan-card-body {
  z-index: 2;
  width: 100%;
}

.plan-card-body h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

.plan-card-body p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 600;
  text-transform: uppercase;
}

.plan-duration {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--tertiary);
  background: rgba(255, 59, 92, 0.12);
  padding: 3px 8px;
  border-radius: 8px;
  margin-top: 0.6rem;
  font-weight: 700;
  border: 1px solid rgba(255, 59, 92, 0.15);
}

/* Program Recommend Cards */
.program-recommend-card {
  position: relative;
  border-radius: 18px;
  height: 140px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.02);
}

.program-recommend-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, transparent 100%);
  pointer-events: none;
}

.program-recommend-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 59, 92, 0.25);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35), 0 0 15px rgba(255, 59, 92, 0.05);
}

.rec-card-content h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

.rec-card-content p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-weight: 500;
  line-height: 1.2;
}

.rec-badge {
  display: inline-block;
  font-size: 0.65rem;
  color: #fff;
  background: rgba(255,255,255,0.05);
  padding: 2px 7px;
  border-radius: 6px;
  margin-top: 0.65rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Plus Recommend Card */
.plus-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  border-color: rgba(255, 59, 92, 0.25);
  background: rgba(255, 59, 92, 0.01);
}

.plus-card:hover {
  border-color: var(--tertiary);
  background: rgba(255, 59, 92, 0.03);
}

.plus-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 59, 92, 0.1);
  color: var(--tertiary);
  margin-top: 0.6rem;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 59, 92, 0.2);
  transition: all 0.3s ease;
}

.plus-card:hover .plus-icon {
  background: var(--tertiary);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Right Side Panel (Status Panel) */
.dashboard-side-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.75rem;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.side-panel-widget {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 1.5rem;
}

.side-panel-widget:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

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

.widget-header-mini h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
  text-transform: uppercase;
}

.time-range-badge, .active-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 59, 92, 0.08);
  color: var(--tertiary);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 59, 92, 0.15);
}

/* Circular Progress Widget */
.progress-ring-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 160px;
}

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

.progress-ring-bar {
  filter: drop-shadow(0 0 6px var(--primary-glow));
}

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

.progress-ring-value .percentage {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
  line-height: 1;
}

.progress-ring-value .label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Calories Progress Widget */
.calories-value {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.calories-value .current {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

.calories-value .target {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 10px;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Active Days Indicator */
.active-days-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.day-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: all var(--transition-speed) ease;
}

.day-dot.active {
  background: var(--primary-gradient);
  border-color: var(--tertiary);
  color: #fff;
  box-shadow: 0 0 8px var(--primary-glow);
}

/* Body Analysis Widget */
.body-analysis-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.analysis-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  padding-bottom: 0.65rem;
}

.analysis-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.analysis-label {
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.analysis-label i {
  color: var(--tertiary);
  font-size: 0.9rem;
}

.analysis-val {
  color: #fff;
  font-weight: 700;
}

/* Quote widget */
.quote-widget {
  border-left: 3px solid var(--tertiary);
  background: rgba(255, 59, 92, 0.02);
  padding: 0.95rem 1.25rem;
  border-radius: 0 12px 12px 0;
}

.quote-widget p {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  letter-spacing: 0.5px;
}

/* Exercise Library Section styling */
.exercise-library-section {
  margin-top: 3.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
}

.library-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.library-filters .filter-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-size: 0.82rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.library-filters .filter-badge:hover, 
.library-filters .filter-badge.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: translateY(-1px);
}

.exercise-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.exercise-library-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.exercise-library-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 59, 92, 0.25);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.library-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.library-card-header h4 {
  font-size: 1rem;
  font-weight: 750;
  color: #fff;
}

.library-card-details {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.4rem 0;
}

.library-card-details span strong {
  color: #fff;
}

.library-card-tip {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
  margin-top: 0.25rem;
}

/* Add core category badge colors if not present */
.exercise-badge.core {
  background: rgba(0, 176, 255, 0.1);
  color: var(--color-blue);
  border: 1px solid rgba(0, 176, 255, 0.2);
}

/* Sub-tab Navigation inside Programs Tab */
.sub-tab-nav {
  display: flex;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
}

.sub-tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-speed) ease;
  border-radius: var(--border-radius-md);
}

.sub-tab-btn i {
  font-size: 0.95rem;
}

.sub-tab-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.sub-tab-btn.active {
  color: #fff;
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Sub-tab Content Visibility */
.subtab-content {
  display: none;
  animation: subtabFadeIn 0.35s ease;
}

.subtab-content.active {
  display: block;
}

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

/* Weekly Meal Planner Styles */
.weekly-planner-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.planner-day-row {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s ease;
}

.planner-day-row:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.planner-day-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--tertiary);
  width: 100px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.planner-day-meals {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: right;
  line-height: 1.4;
}

/* Preset Buttons */
.preset-buttons .btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-buttons .btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.1);
}

/* Calorie Ring Wrapper */
.calorie-ring-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  min-height: 180px;
}

/* Macro progress bar styling */
.macro-progress-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.macro-progress-item {
  display: flex;
  flex-direction: column;
}

/* Custom Tooltips for Sidebar Navigation */
.nav-item {
  position: relative;
}

.nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  background: rgba(9, 9, 9, 0.95);
  border: 1px solid var(--card-border);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--border-radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 59, 92, 0.1);
  backdrop-filter: blur(10px);
  z-index: 10000;
  letter-spacing: 0.5px;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: calc(100% + 9px);
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  border-width: 4px;
  border-style: solid;
  border-color: transparent var(--card-border) transparent transparent;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 10000;
}

.nav-item:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.nav-item:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Reports Summary Cards */
.summary-card {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.summary-stat-value {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin: 0.65rem 0 0.35rem 0;
}

.summary-stat-value span:first-child {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

.summary-stat-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

/* Trend Badges */
.trend-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: 0.25px;
}

.trend-badge.positive {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.trend-badge.negative {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.trend-badge.neutral {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Profile Card Hover interaction */
.profile-card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 8px rgba(255, 59, 92, 0.05);
}

/* Login Overlay Styles */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(135deg, rgba(213, 26, 45, 0.08), transparent 38%),
    rgba(5, 5, 6, 0.97);
  backdrop-filter: blur(25px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.login-overlay.active {
  display: flex;
}

.login-box {
  width: 100%;
  max-width: 520px;
  padding: 3rem 2.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 24px 70px rgba(0,0,0,0.65), 0 0 36px rgba(213, 26, 45, 0.08);
  border: 1px solid var(--card-border-strong);
  background: rgba(18, 16, 18, 0.82) !important;
  text-align: center;
}

/* User Profile Selection Grid */
.login-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.login-user-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 1.25rem 0.5rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.login-user-card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(245, 184, 75, 0.32);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 10px rgba(255, 59, 92, 0.08);
}

.login-user-avatar {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid rgba(213, 26, 45, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  position: relative;
  box-shadow: 0 0 12px rgba(213, 26, 45, 0.16);
}

.login-user-card:hover .login-user-avatar {
  border-color: var(--accent-gold);
  box-shadow: 0 0 16px rgba(245, 184, 75, 0.18);
}

.login-user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
}

.login-user-level {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Login experience refresh */
.login-overlay {
  background: #070708;
  padding: clamp(1rem, 3vw, 2.5rem);
  overflow-y: auto;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(390px, 0.82fr);
  width: min(1120px, 100%);
  max-width: 1120px;
  min-height: min(720px, calc(100vh - 3rem));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: #111113 !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.025);
  text-align: left;
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 680px;
  padding: clamp(1.75rem, 4vw, 3rem);
  overflow: hidden;
  isolation: isolate;
  background-image:
    linear-gradient(180deg, rgba(4, 4, 5, 0.45) 0%, rgba(4, 4, 5, 0.08) 34%, rgba(4, 4, 5, 0.9) 100%),
    linear-gradient(90deg, rgba(4, 4, 5, 0.74) 0%, rgba(4, 4, 5, 0.1) 100%),
    url('hero_bg.png');
  background-position: center, center, 62% center;
  background-size: cover;
}

.login-visual::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(135deg, rgba(213, 26, 45, 0.22), transparent 30%);
  pointer-events: none;
}

.login-visual::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -18%;
  bottom: -20%;
  width: 65%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 77, 94, 0.24);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(255, 77, 94, 0.035), 0 0 0 44px rgba(255, 77, 94, 0.02);
  pointer-events: none;
}

.login-visual-top,
.login-visual-footer,
.login-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-visual-top {
  gap: 0.75rem;
}

.login-brand-link {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.login-brand-link:focus-visible {
  border-radius: 12px;
  outline: 2px solid var(--accent-gold);
  outline-offset: 5px;
}

.login-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 13px;
  background: linear-gradient(145deg, #9e1020, #ef3f4f);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.08em;
  box-shadow: 0 10px 26px rgba(213, 26, 45, 0.32);
}

.login-brand-name {
  flex: 1;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.login-brand-name span {
  color: var(--tertiary);
}

.login-visual-content {
  max-width: 430px;
  margin: auto 0;
  padding: 4rem 0 3rem;
}

.login-kicker,
.login-secure-label,
.login-account-scope,
.login-eyebrow,
.login-metric span,
.login-visual-footer,
.login-panel-footer {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.login-kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.35rem;
  color: #f5b84b;
  font-size: 0.68rem;
  font-weight: 800;
}

.login-kicker-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 12px rgba(245, 184, 75, 0.8);
}

.login-visual h1 {
  max-width: 420px;
  color: #fff;
  font-size: clamp(3rem, 6vw, 5.3rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.login-visual h1 em {
  color: var(--tertiary);
  font-style: normal;
}

.login-visual-copy {
  max-width: 330px;
  margin-top: 1.65rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.7;
}

.login-metrics {
  display: flex;
  gap: 0;
  margin-top: 2.5rem;
}

.login-metric {
  min-width: 100px;
  padding-right: 1.5rem;
  margin-right: 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.login-metric:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}

.login-metric strong {
  display: block;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
}

.login-metric span {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.57rem;
  font-weight: 700;
}

.login-visual-footer {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.58rem;
  font-weight: 700;
}

.login-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 3.5rem) clamp(1.5rem, 5vw, 4.5rem);
  background: #111113;
}

.login-panel-top {
  gap: 0.75rem;
  margin-bottom: auto;
  color: var(--text-subtle);
  font-size: 0.61rem;
  font-weight: 800;
}

.login-secure-label,
.login-account-scope {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.login-secure-label i {
  color: var(--tertiary);
  font-size: 0.75rem;
}

.login-account-scope {
  color: var(--text-subtle);
  letter-spacing: 0.07em;
}

.login-header {
  margin: auto 0 2.25rem;
  text-align: left;
}

.login-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 1.45rem;
  place-items: center;
  border: 1px solid rgba(255, 77, 94, 0.28);
  border-radius: 14px;
  background: rgba(213, 26, 45, 0.12);
  color: var(--tertiary);
  box-shadow: 0 0 24px rgba(213, 26, 45, 0.12);
}

.login-eyebrow {
  margin-bottom: 0.6rem;
  color: var(--tertiary);
  font-size: 0.64rem;
  font-weight: 800;
}

.login-header h2 {
  color: #fff;
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.login-header h2 span {
  color: rgba(255, 255, 255, 0.42);
}

.login-subtitle {
  max-width: 300px;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.login-form {
  margin: 0;
  text-align: left;
}

.login-form .form-group + .form-group {
  margin-top: 1.1rem;
}

.login-form label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.login-form label > span {
  color: var(--text-subtle);
  font-size: 0.56rem;
  letter-spacing: 0.05em;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap > i {
  position: absolute;
  top: 50%;
  left: 1rem;
  z-index: 1;
  color: var(--text-subtle);
  font-size: 0.85rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-form .form-control {
  width: 100%;
  min-height: 53px;
  padding: 0.9rem 1rem 0.9rem 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  font-size: 0.86rem;
  transition: border-color var(--transition-speed) ease, background var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.login-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.27);
}

.login-form .form-control:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.login-form .form-control:focus {
  border-color: rgba(255, 77, 94, 0.7);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 0 0 4px rgba(213, 26, 45, 0.1);
  outline: 0;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 1.35rem;
}

.login-checkbox {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 0.55rem;
  margin: 0 !important;
  color: var(--text-muted) !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
}

.login-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.login-checkbox-mark {
  width: 15px;
  height: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.login-checkbox input:checked + .login-checkbox-mark {
  border-color: var(--tertiary);
  background: var(--tertiary);
  box-shadow: 0 0 10px rgba(255, 77, 94, 0.32);
}

.login-checkbox input:checked + .login-checkbox-mark::after {
  content: '\2713';
  display: block;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 13px;
  text-align: center;
}

.login-security {
  color: var(--text-subtle);
  font-size: 0.62rem;
  white-space: nowrap;
}

.login-security i {
  margin-right: 0.25rem;
  color: #6fc894;
}

.login-submit {
  min-height: 54px;
  justify-content: space-between;
  padding: 0.85rem 1rem 0.85rem 1.2rem;
  border-radius: 12px;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.login-submit i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.72rem;
}

.login-form .btn-link {
  min-height: 44px;
  margin-top: 0.35rem;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--tertiary);
}

.login-form .btn-link:hover {
  background: rgba(255, 77, 94, 0.08);
  color: #ff8993;
}

.login-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 1.1rem;
  color: var(--text-subtle);
  font-size: 0.65rem;
  line-height: 1.5;
}

.login-note i {
  margin-top: 0.12rem;
  color: var(--text-muted);
}

.login-signup-form .form-group + .form-group {
  margin-top: 0.85rem;
}

.login-signup-form .login-submit {
  margin-top: 1.35rem;
}

.login-mode-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1.35rem;
  color: var(--text-subtle);
  font-size: 0.72rem;
}

.login-mode-switch button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tertiary);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: color var(--transition-speed) ease;
}

.login-mode-switch button:hover {
  color: #ff8993;
}

.login-mode-switch button:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--accent-gold);
  outline-offset: 4px;
}

.login-panel-footer {
  margin-top: auto;
  padding-top: 2.25rem;
  color: var(--text-subtle);
  font-size: 0.55rem;
  font-weight: 700;
}

.login-panel-footer span {
  margin: 0 0.35rem;
  color: var(--tertiary);
}

.login-secondary-section {
  grid-column: 1 / -1;
  padding: 0 3rem 2rem;
}

.login-secondary-section h4 {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-add-form {
  display: flex;
  gap: 0.75rem;
}

.login-add-form .form-control {
  flex: 1;
  min-width: 0;
}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 560px;
    min-height: auto;
  }

  .login-visual {
    min-height: 340px;
    padding: 1.5rem;
    background-position: center, center, 55% 52%;
  }

  .login-visual-content {
    padding: 3.5rem 0 1rem;
  }

  .login-visual h1 {
    font-size: clamp(2.6rem, 9vw, 4.2rem);
  }

  .login-visual-copy {
    display: none;
  }

  .login-metrics {
    margin-top: 1.5rem;
  }

  .login-panel {
    min-height: 560px;
    padding: 1.75rem clamp(1.5rem, 7vw, 4rem) 2rem;
  }

  .login-secondary-section {
    padding: 0 1.5rem 1.5rem;
  }
}

@media (max-width: 430px) {
  .workout-session-footer { align-items: stretch; flex-direction: column-reverse; }
  .workout-session-footer .btn { width: 100%; }

  .login-overlay {
    padding: 0;
    align-items: flex-start;
  }

  .login-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .login-visual {
    min-height: 116px;
    padding: 1rem 1.25rem;
    background-position: center, center, 55% 42%;
  }

  .login-visual-content,
  .login-visual-footer {
    display: none;
  }

  .login-panel {
    min-height: 0;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .login-panel-top {
    margin-bottom: 1.25rem;
  }

  .login-header {
    margin: 0 0 1.35rem;
  }

  .login-avatar {
    width: 38px;
    height: 38px;
    margin-bottom: 0.9rem;
  }

  .login-header h2 {
    font-size: 2rem;
  }

  .login-subtitle {
    margin-top: 0.65rem;
  }

  .login-form .form-group + .form-group {
    margin-top: 0.85rem;
  }

  .login-form .form-control {
    min-height: 49px;
  }

  .login-options {
    align-items: center;
    flex-direction: row;
    gap: 0.5rem;
    margin: 0.8rem 0 1rem;
  }

  .login-security {
    align-self: flex-end;
  }

  .login-note {
    margin-top: 0.75rem;
  }

  .login-mode-switch {
    flex-wrap: wrap;
    margin-top: 1rem;
  }

  .login-panel-footer {
    padding-top: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-form .form-control,
  .btn,
  .login-user-card {
    transition: none;
  }
}

/* --- LIVE MOBILE DATA DASHBOARD --- */
.topbar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.topbar-left {
  display: flex !important;
  align-items: center;
  gap: 0.9rem;
}

.sync-topbar {
  display: flex !important;
  align-items: center;
  gap: 1rem;
}

.sync-status > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sync-detail {
  color: var(--text-muted);
  font-size: 0.65rem;
}

#btn-refresh.is-loading i {
  animation: liveSpin 0.8s linear infinite;
}

@keyframes liveSpin {
  to { transform: rotate(360deg); }
}

.hero-eyebrow,
.section-kicker {
  color: var(--accent-gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.hero-live-summary {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 0.6rem;
}

.hero-live-summary > div {
  display: flex;
  min-width: 100px;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(8, 7, 8, 0.72);
  backdrop-filter: blur(16px);
}

.hero-live-summary strong {
  color: #fff;
  font-size: 1.25rem;
}

.hero-live-summary span {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.live-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.live-metric-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.live-metric-card > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.live-metric-card span:not(.metric-icon),
.live-metric-card small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-metric-card strong {
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-icon,
.activity-icon,
.dashboard-program-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.metric-icon-red,
.activity-icon.red { color: #ff6a78; background: rgba(255, 59, 92, 0.12); }
.metric-icon-gold,
.activity-icon.gold { color: var(--accent-gold); background: rgba(245, 184, 75, 0.11); }
.metric-icon-blue { color: #5ecbff; background: rgba(0, 176, 255, 0.11); }
.metric-icon-green { color: var(--color-green); background: rgba(0, 210, 138, 0.11); }

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
}

.dashboard-program-list,
.recent-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.dashboard-program-card,
.recent-activity-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  color: inherit;
  background: var(--card-bg);
}

.dashboard-program-card {
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dashboard-program-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 59, 92, 0.32);
}

.dashboard-program-icon {
  color: var(--tertiary);
  background: rgba(255, 59, 92, 0.1);
}

.dashboard-program-copy,
.recent-activity-row > div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.dashboard-program-copy strong,
.recent-activity-row strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-program-copy small,
.recent-activity-row small {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.dashboard-program-card > .fa-chevron-right {
  color: var(--text-muted);
}

.dashboard-empty-state {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.25rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--text-muted);
  text-align: left;
}

.dashboard-empty-state > i {
  color: var(--tertiary);
  font-size: 1.4rem;
}

.dashboard-empty-state > div {
  display: flex;
  flex-direction: column;
}

.dashboard-empty-state strong { color: #fff; }
.dashboard-empty-state span { font-size: 0.75rem; }

.weekly-activity-card {
  padding: 1.2rem 1.2rem 0.9rem;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--card-bg);
}

.weekly-bars {
  display: grid;
  height: 180px;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 0.7rem;
}

.weekly-bar-column {
  display: grid;
  min-width: 0;
  grid-template-rows: 22px 1fr 20px;
  gap: 0.3rem;
  text-align: center;
}

.weekly-bar-value,
.weekly-bar-column small {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.weekly-bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.weekly-bar-track span {
  width: 100%;
  min-height: 2px;
  border-radius: 9px;
  background: linear-gradient(180deg, var(--accent-gold), var(--tertiary));
  box-shadow: 0 0 12px rgba(255, 59, 92, 0.18);
}

.recent-activity-row time {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.health-state {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.health-state.connected {
  color: var(--color-green);
}

.health-sync-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.health-sync-values > div {
  display: flex;
  flex-direction: column;
  padding: 0.7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.health-sync-values strong { color: #fff; font-size: 1.05rem; }
.health-sync-values span,
.health-sync-widget small { color: var(--text-muted); font-size: 0.68rem; }

.data-explainer {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.form-control[readonly] {
  color: #fff;
  border-color: rgba(245, 184, 75, 0.18);
  background: rgba(245, 184, 75, 0.035);
}

.weekly-planner-list {
  display: flex;
  max-height: 380px;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.synced-day-row {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.exercise-edit-row {
  grid-template-columns: minmax(160px, 2fr) repeat(3, minmax(70px, 0.7fr)) minmax(110px, 1fr) repeat(3, minmax(85px, 0.8fr)) minmax(150px, 1.5fr) auto;
}

@media (max-width: 1450px) {
  .live-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-live-summary { display: none; }
  .hero-content { max-width: 72%; }
}

@media (max-width: 920px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .topbar-right,
  .sync-topbar { width: 100%; }
  .sync-topbar { justify-content: space-between; }
  .hero-banner { height: auto; min-height: 280px; padding: 2rem; }
  .hero-content { max-width: 90%; }
  .hero-content h1 { font-size: 2rem; }
  .workout-management-grid { grid-template-columns: minmax(0, 1fr); }
  .body-measurement-grid { grid-template-columns: minmax(0, 1fr); }
  .workout-session-dialog { max-height: 94vh; max-height: 94dvh; }
  .exercise-edit-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exercise-edit-row .ex-name,
  .exercise-edit-row .ex-tips { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .app-container {
    height: 100vh;
    height: 100dvh;
    min-width: 0;
  }

  .main-content {
    width: 100%;
    min-width: 0;
    height: 100vh;
    height: 100dvh;
    padding: 1rem 1rem calc(5.75rem + env(safe-area-inset-bottom));
    gap: 1.25rem;
  }

  .widgets-container { grid-template-columns: minmax(0, 1fr); }
  .full-width-widget { grid-column: 1 / -1; }
  .workout-form-grid { grid-template-columns: minmax(0, 1fr); }
  .workout-session-modal { padding: 0.25rem; }
  .workout-session-dialog { border-radius: 16px; max-height: calc(100vh - 0.5rem); max-height: calc(100dvh - 0.5rem); }
  .workout-session-header { padding: 1rem; }
  .workout-session-header h3 { font-size: 1.1rem; }
  .workout-session-body { padding: 1rem; }
  .workout-session-stats { gap: 1rem; margin-bottom: 1rem; padding: 0.8rem; }
  .workout-session-exercise { border-radius: 14px; padding: 0.8rem; }
  .workout-session-exercise-heading { align-items: flex-start; flex-direction: column; gap: 0.45rem; }
  .workout-session-set-row { gap: 0.4rem; grid-template-columns: minmax(60px, 0.7fr) minmax(70px, 1fr) minmax(82px, 1fr); padding: 0.45rem; }
  .workout-session-set-toggle { gap: 0.35rem; }
  .workout-session-set-toggle span { font-size: 0.74rem; }
  .workout-session-set-field { font-size: 0.62rem; }
  .workout-session-set-field .form-control { font-size: 0.85rem; padding: 0.4rem; }
  .workout-session-footer { gap: 0.55rem; margin-top: 1rem; padding: 1rem; }
  .day-workout-actions { align-items: flex-end; flex-direction: column; }

  .sidebar {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0.4rem 0.75rem calc(0.4rem + env(safe-area-inset-bottom));
    flex-direction: row;
    justify-content: center;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }

  .nav-menu {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    gap: 0.2rem;
  }

  .nav-item {
    width: 48px;
    height: 48px;
  }

  .sidebar .profile-card {
    display: none;
  }

  .dashboard-layout,
  .dashboard-main,
  .dashboard-section,
  .dashboard-side-panel,
  .hero-banner,
  .live-metrics-grid {
    min-width: 0;
  }

  .dashboard-layout {
    width: 100%;
  }

  .dashboard-main {
    width: 100%;
    gap: 1.25rem;
  }

  .hero-banner {
    min-height: 270px;
    height: auto;
    padding: 1.25rem;
    align-items: flex-end;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-content h1 {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .live-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .live-metric-card {
    gap: 0.55rem;
    padding: 0.75rem;
  }

  .section-header {
    align-items: flex-start;
    gap: 0.65rem;
  }

  .section-header h2 {
    font-size: 1.1rem;
  }

  .weekly-bars { gap: 0.3rem; }
  .sync-detail { display: none; }
  .recent-activity-row time { display: none; }
}
