/* ═══════════════════════════════════════════════════════════════
   MY PERSONAL TRAINER CRM — Branded Stylesheet (Light Cyberpunk Glass)
   Colors: Primary Pink #E0217E | Crimson #FF2E7E | Teal #2CB5A2
   Fonts: Anton (headers) | Rubik (body)
   Design: Light cyberpunk — frosted-glass surfaces on a cool neon mesh,
           pink/teal neon accents, dark sidebar brand signature.
           (Light counterpart of the dark gateway/login/download theme.)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --red: #E0217E;
  --crimson: #FF2E7E;
  --teal: #2CB5A2;
  --black: #040404;
  --white: #ffffff;
  --silver: rgba(4, 4, 4, 0.62);
  --steel: rgba(4, 4, 4, 0.64);

  /* Surfaces — canonical light-cyber (theme.v2 brand.cyber): crisp white cards */
  --card: rgba(255, 255, 255, 0.90);
  --card-solid: #ffffff;
  --input: rgba(255, 255, 255, 0.96);
  --border: rgba(4, 4, 4, 0.12);
  --glass-blur: blur(10px) saturate(135%);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.75);

  /* Dark sidebar (brand signature — matches the dark gateway shell) */
  --sidebar: #07070f;
  --sidebar-text: rgba(255, 255, 255, 0.78);

  /* Light-cyber base (theme.v2 brand.cyber.bg) */
  --body-bg: #FFF2F8;
  --text: #040404;

  --success: #10B981;
  --warning: #d97706;
  --info: #3B82F6;
  --danger: #EF4444;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(60, 40, 90, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --glow-pink: 0 0 0 1px rgba(224, 33, 126, 0.35), 0 10px 30px rgba(224, 33, 126, 0.20);
  --glow-teal: 0 0 0 1px rgba(44, 181, 162, 0.35), 0 10px 30px rgba(44, 181, 162, 0.20);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Rubik', 'Glacial Indifference', sans-serif;
  /* Canonical light-cyber backdrop (theme.v2 ClientThemeBackdrop):
     pink/teal base gradient + 3 soft diagonal bands (teal top, pink lower). */
  background-color: #FFF2F8;
  background-image:
    linear-gradient(167deg, transparent 6%,  rgba(44, 181, 162, 0.24) 11%, rgba(44, 181, 162, 0.24) 23%, transparent 28%),
    linear-gradient(193deg, transparent 40%, rgba(224, 33, 126, 0.20) 46%, rgba(224, 33, 126, 0.20) 59%, transparent 64%),
    linear-gradient(195deg, transparent 72%, rgba(224, 33, 126, 0.17) 77%, rgba(224, 33, 126, 0.17) 90%, transparent 95%),
    linear-gradient(135deg, #FFF2F8 0%, #E3FBF7 58%, #FFF2F8 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
}

/* Faint brand watermark, top-right (mirrors theme.v2 ClientThemeBackdrop) */
body::before {
  content: '';
  position: fixed;
  top: 28px;
  right: -34px;
  width: 320px;
  height: 320px;
  z-index: 0;
  pointer-events: none;
  background: url('../images/mypt-logo-pink-transparent.png') no-repeat center / contain;
  opacity: 0.06;
}

/* Keep app chrome above the watermark layer */
.sidebar, .main-content { position: relative; z-index: 1; }

a {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--crimson);
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: 'Anton', 'Oswald', sans-serif;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--black);
}

.mt-2 {
  margin-top: 8px;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0%, 100% {
    background-position: -1000px 0;
  }
  50% {
    background-position: 1000px 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Layout ─── */
.app-layout {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.sidebar {
  width: 250px;
  background: linear-gradient(180deg, var(--sidebar), #11111d);
  border-right: 1px solid rgba(224, 33, 126, 0.22);
  box-shadow: 1px 0 0 rgba(44, 181, 162, 0.12), 8px 0 32px rgba(7, 7, 15, 0.18);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease-out;
}

.main-content {
  margin-left: 250px;
  min-height: 100vh;
  overflow-x: hidden;
  transition: margin-left 0.28s ease-out;
}

.content-wrapper {
  padding: 24px;
  max-width: 100%;
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
}

/* ─── Sidebar ─── */
.sidebar-header {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 46, 126, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 46, 126, 0.08), rgba(4, 4, 4, 0)),
    var(--sidebar);
  position: relative;
}

.brand-text {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark-shell {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  border: 1px solid rgba(255, 46, 126, 0.18);
  background: rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-logo-image {
  display: block;
  max-width: 100%;
  height: auto;
}

.brand-logo-header {
  width: 100%;
  max-width: 188px;
  height: auto;
  object-fit: contain;
}

.brand-logo-mark {
  width: auto;
  max-width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-fallback-mark {
  font-family: 'Anton', 'Oswald', sans-serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--white);
}

.brand-name {
  display: block;
  color: var(--white);
  font-family: 'Anton', 'Oswald', sans-serif;
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: 0.03em;
}

.brand-sub {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.77rem;
  letter-spacing: 0.03em;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-item {
  padding: 12px 16px;
  margin: 0 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  color: var(--sidebar-text);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  position: relative;
  min-height: 44px;
  justify-content: flex-start;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
  transform: translateX(4px);
}

.nav-item.active {
  background-color: rgba(224, 33, 126, 0.18);
  color: var(--white);
  font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--red);
  border-radius: 0 10px 10px 0;
}

/* Phosphor sidebar nav icons (img tags) */
.nav-item img.nav-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  opacity: 0.85;
  filter: brightness(0) invert(1);
  margin-right: 0; /* gap handled by flex parent */
  flex-shrink: 0;
}
.nav-item.active img.nav-icon {
  opacity: 1;
  filter: brightness(0) invert(1) drop-shadow(0 0 4px rgba(224,33,126,0.5));
}
.nav-item:hover img.nav-icon {
  opacity: 1;
}

.nav-section-title {
  padding: 16px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sidebar-text);
  opacity: 0.7;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-height: 44px;
}

.user-info:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: bold;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  color: var(--white);
  font-size: 13px;
}

.user-role {
  font-size: 11px;
  color: var(--sidebar-text);
}

/* ─── Mobile Header ─── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--sidebar);
  border-bottom: 1px solid rgba(0,0,0,0.15);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 99;
}

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--white);
  font-size: 24px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.hamburger:active {
  transform: scale(0.95);
}

.mobile-logo {
  width: 140px;
  height: 40px;
  object-fit: contain;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  max-height: 44px;
}

.mobile-brand-mark {
  height: 36px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.mobile-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 95;
  animation: fadeIn 0.3s ease;
}

/* ─── Main Dashboard ─── */
.dashboard-header {
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease 0.1s both;
}

.dashboard-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--black);
}

.dashboard-subtitle {
  color: var(--silver);
  font-size: 14px;
}

/* ─── Cards ─── */
.card {
  background: var(--card);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s ease;
  animation: scaleIn 0.35s ease both;
  box-shadow: var(--shadow), var(--glass-highlight);
}

.card:nth-child(1) {
  animation-delay: 0.05s;
}

.card:nth-child(2) {
  animation-delay: 0.1s;
}

.card:nth-child(3) {
  animation-delay: 0.15s;
}

.card:nth-child(4) {
  animation-delay: 0.2s;
}

.card:nth-child(5) {
  animation-delay: 0.25s;
}

.card:hover {
  border-color: rgba(224, 33, 126, 0.45);
  box-shadow: var(--glow-pink), var(--glass-highlight);
}

/* ─── Stats Cards ─── */
.stat-card {
  background: var(--card);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: scaleIn 0.35s ease both;
  box-shadow: var(--shadow), var(--glass-highlight);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-left: 4px solid var(--red);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-pink), var(--glass-highlight);
  border-color: rgba(224, 33, 126, 0.45);
}

.stat-label {
  color: var(--silver);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
}

.stat-change {
  font-size: 12px;
  margin-top: 8px;
  color: var(--silver);
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

/* ─── Stats Grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  animation: fadeInUp 0.4s ease 0.2s both;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  min-width: 44px;
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary,
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--crimson));
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(224, 33, 126, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn.primary:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #C4186A, #9E1257);
  box-shadow: var(--glow-pink), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

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

.btn.secondary:hover,
.btn-secondary:hover {
  background: var(--input);
  border-color: var(--red);
  color: var(--red);
  font-weight: 700;
}

.btn.danger {
  background: var(--danger);
  color: var(--white);
}

.btn.danger:hover {
  background: #b91c1c;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Forms & Inputs ─── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}

.form-input,
.form-select,
textarea {
  width: 100%;
  padding: 12px;
  background: var(--input);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
  transition: all 0.2s ease;
  min-height: 44px;
}

.form-input::placeholder {
  color: var(--silver);
}

.form-input:focus,
.form-select:focus,
textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224, 33, 126, 0.18), 0 6px 18px rgba(224, 33, 126, 0.12);
  background: var(--input);
}

.form-input:focus-visible,
.form-select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: 'Rubik', sans-serif;
}

/* ─── Tables ─── */
.table-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.table-scroll::-webkit-scrollbar {
  height: 6px;
}

.table-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--silver);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
}

thead {
  background: var(--input);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 12px;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tbody tr {
  transition: background-color 0.2s ease;
}

tbody tr:hover {
  background-color: rgba(132, 12, 26, 0.04);
}

tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* ─── Modals & Overlays ─── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 8, 24, 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}

.modal-panel {
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.3s ease;
  box-shadow: 0 24px 70px rgba(40, 20, 70, 0.28), var(--glass-highlight);
}

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

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
}

.modal-close {
  background: none;
  border: none;
  color: var(--silver);
  cursor: pointer;
  font-size: 24px;
  padding: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

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

.modal-close:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ─── Flash Messages ─── */
.flash {
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 10px;
  padding: 16px 20px;
  z-index: 950;
  animation: slideInRight 0.3s ease, fadeInUp 0.3s ease;
  box-shadow: var(--shadow), var(--glass-highlight);
  max-width: 400px;
  color: var(--text);
}

.flash.success {
  border-left-color: var(--success);
  background: rgba(22, 163, 74, 0.08);
}

.flash.warning {
  border-left-color: var(--warning);
  background: rgba(217, 119, 6, 0.08);
}

.flash.danger {
  border-left-color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
}

.flash.info {
  border-left-color: var(--info);
  background: rgba(37, 99, 235, 0.08);
}

/* ─── Tabs ─── */
.tabs-container {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  animation: slideInRight 0.4s ease;
}

.tab-button {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--silver);
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-button:hover {
  color: var(--text);
  background-color: rgba(132, 12, 26, 0.05);
}

.tab-button.active {
  color: var(--red);
  border-bottom-color: var(--red);
  font-weight: 700;
}

.tab-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

/* ─── Accessibility: Skip Link ─── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--red);
  color: var(--white);
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 0 0 10px 0;
  font-weight: 600;
  z-index: 1001;
}

.skip-link:focus {
  top: 0;
}

/* ─── WORKOUT SECTION ─── */
.workout-shell {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 24px;
  animation: fadeInUp 0.4s ease 0.1s both;
}

.workout-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.workout-list-header {
  padding: 20px;
  background: var(--input);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workout-list-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--black);
}

.workout-list-content {
  max-height: 600px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.workout-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  color: var(--text);
}

.workout-item:last-child {
  border-bottom: none;
}

.workout-item:hover {
  background: rgba(132, 12, 26, 0.06);
  padding-left: 20px;
}

.workout-item.active {
  background: rgba(132, 12, 26, 0.1);
  border-left: 3px solid var(--red);
  color: var(--red);
  font-weight: 600;
}

.workout-item-name {
  flex: 1;
  font-weight: 600;
}

.workout-item-date {
  color: var(--silver);
  font-size: 12px;
}

.workout-queue {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.workout-queue-header {
  padding: 20px;
  background: var(--input);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workout-queue-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--black);
}

.workout-queue-content {
  max-height: 600px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.workout-queue-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
  animation: slideInRight 0.3s ease;
  color: var(--text);
}

.workout-queue-item:last-child {
  border-bottom: none;
}

.workout-queue-item:hover {
  background: rgba(132, 12, 26, 0.06);
  transform: translateX(4px);
  box-shadow: inset 0 1px 3px rgba(132, 12, 26, 0.08);
}

.workout-queue-item-name {
  font-weight: 600;
  color: var(--black);
  word-break: break-word;
}

.workout-queue-item-meta {
  font-size: 12px;
  color: var(--silver);
  display: flex;
  gap: 12px;
}

/* ─── NUTRITION SECTION ─── */
.nutrition-shell {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 24px;
  animation: fadeInUp 0.4s ease 0.1s both;
}

.nutrition-intake,
.nutrition-breakdown {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.nutrition-header {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  color: var(--black);
}

.nutrition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
  min-height: 44px;
  color: var(--text);
}

.nutrition-item:last-child {
  border-bottom: none;
}

.nutrition-item:hover {
  padding-left: 8px;
}

.nutrition-item-label {
  color: var(--silver);
  font-size: 13px;
}

.nutrition-item-value {
  font-weight: 600;
  color: var(--black);
}

.nutrition-macro {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nutrition-macro-label {
  color: var(--silver);
  font-size: 12px;
}

.nutrition-macro-value {
  font-weight: 700;
  color: var(--black);
}

/* ─── INCIDENT SECTION ─── */
.incident-shell {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 24px;
  animation: fadeInUp 0.4s ease 0.1s both;
}

.incident-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.incident-list-header {
  padding: 20px;
  background: var(--input);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.incident-list-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--black);
}

.incident-list-content {
  max-height: 600px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.incident-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
}

.incident-item:last-child {
  border-bottom: none;
}

.incident-item:hover {
  background: rgba(132, 12, 26, 0.06);
  padding-left: 20px;
}

.incident-item.active {
  background: rgba(132, 12, 26, 0.1);
  border-left: 3px solid var(--red);
}

.incident-item-title {
  font-weight: 600;
  color: var(--black);
}

.incident-item-date {
  color: var(--silver);
  font-size: 12px;
}

.incident-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.incident-detail-header {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.incident-detail-title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--black);
}

.incident-detail-meta {
  font-size: 12px;
  color: var(--silver);
  display: flex;
  gap: 16px;
}

.incident-detail-section {
  margin-bottom: 20px;
}

.incident-detail-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--text);
}

.incident-detail-text {
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
}

/* ─── ATHLETE SWITCHER ─── */
.athlete-switcher {
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease both;
}

.athlete-select {
  width: 100%;
  padding: 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.athlete-select:hover {
  border-color: var(--red);
}

.athlete-select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(132, 12, 26, 0.1);
}

/* ─── BADGES & TAGS ─── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.primary {
  background: rgba(132, 12, 26, 0.15);
  color: var(--red);
}

.badge.success {
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
}

.badge.warning {
  background: rgba(217, 119, 6, 0.15);
  color: var(--warning);
}

.badge.danger {
  background: rgba(220, 38, 38, 0.15);
  color: var(--danger);
}

.badge.info {
  background: rgba(37, 99, 235, 0.15);
  color: var(--info);
}

/* ─── PHV BADGES ─── */
.phv-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.phv-badge.pre, .phv-badge.phv-pre_phv {
  background: rgba(37, 99, 235, 0.15);
  color: var(--info);
}

.phv-badge.peri, .phv-badge.phv-circa_phv {
  background: rgba(217, 119, 6, 0.15);
  color: var(--warning);
}

.phv-badge.peak {
  background: rgba(132, 12, 26, 0.15);
  color: var(--red);
}

.phv-badge.post, .phv-badge.phv-post_phv {
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
}

.phv-badge.phv-mature {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

/* ─── SCORE BADGES ─── */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}

.score-badge.low {
  background: rgba(220, 38, 38, 0.15);
  color: var(--danger);
}

.score-badge.medium {
  background: rgba(217, 119, 6, 0.15);
  color: var(--warning);
}

.score-badge.good {
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
}

.score-badge.excellent {
  background: rgba(37, 99, 235, 0.15);
  color: var(--info);
}

/* ─── AMSC COLORS ─── */
/* Note: .amsc-1 through .amsc-4 are defined in the AMSC component section
   below using the standard status CSS variables (--danger, --warning, --info, --success). */

/* ─── LOADING STATES ─── */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--input) 25%, var(--border) 50%, var(--input) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ─── RESPONSIVE MOBILE ─── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 100%;
    z-index: 98;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-header {
    display: flex;
  }

  .main-content > .athlete-switcher {
    margin-top: calc(60px + env(safe-area-inset-top, 0px));
  }

  .main-content > .athlete-switcher + .content-wrapper {
    margin-top: 0;
  }

  .hamburger {
    display: flex;
  }

  .sidebar-overlay.show {
    display: block;
  }

  .content-wrapper {
    padding: 20px;
    margin-top: calc(60px + env(safe-area-inset-top, 0px));
  }

  .workout-shell,
  .nutrition-shell,
  .incident-shell {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .card,
  .stat-card {
    padding: 16px;
  }

  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  body.sidebar-open {
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 100%;
  }

  .content-wrapper {
    padding: 16px;
    margin-top: calc(60px + env(safe-area-inset-top, 0px));
  }

  .dashboard-title {
    font-size: 22px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .workout-shell,
  .nutrition-shell,
  .incident-shell {
    grid-template-columns: 1fr;
  }

  .card,
  .stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 24px;
  }

  table {
    font-size: 12px;
  }

  th, td {
    padding: 8px;
  }

  .modal-panel {
    padding: 20px;
  }

  .flash {
    max-width: calc(100vw - 40px);
    right: 20px;
  }
}

/* ─── iOS SAFE AREA ─── */
@supports (padding: max(0px)) {
  .sidebar {
    padding-left: max(0px, env(safe-area-inset-left));
  }

  .mobile-header {
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: max(16px, env(safe-area-inset-right));
    padding-left: max(16px, env(safe-area-inset-left));
    height: calc(60px + env(safe-area-inset-top, 0px));
  }

  .content-wrapper {
    padding-right: max(24px, env(safe-area-inset-right));
    padding-left: max(24px, env(safe-area-inset-left));
  }
}

/* ─── PRINT STYLES ─── */
@media print {
  .sidebar,
  .mobile-header,
  .hamburger,
  .btn,
  .flash,
  .modal-overlay {
    display: none !important;
  }

  body {
    background: var(--white);
    color: var(--text);
  }

  .main-content,
  .content-wrapper {
    margin-left: 0;
    padding: 0;
  }

  .card,
  .stat-card,
  .modal-panel {
    border: 1px solid var(--border);
    box-shadow: none;
    page-break-inside: avoid;
  }

  a {
    color: var(--red);
    text-decoration: underline;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
  }

  table {
    page-break-inside: avoid;
  }
}

/* ─── SCROLLBAR STYLES ─── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--input);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--silver);
}

/* ─── FOCUS RING UTILITY ─── */
.focus-ring:focus {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ─── UTILITY CLASSES ─── */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.mt-1 { margin-top: 4px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

.rounded {
  border-radius: var(--radius);
}

.shadow {
  box-shadow: var(--shadow);
}

.no-shadow {
  box-shadow: none;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.break-word {
  word-break: break-word;
}

/* ─── GRID UTILITIES ─── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENT-SPECIFIC STYLES — Appended Sections
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   1. ATHLETE SWITCHER
   ────────────────────────────────────────────────────────────── */
.athlete-switcher {
  position: relative;
}

.athlete-switcher-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.athlete-switcher-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.athlete-switcher-trigger:hover {
  background: rgba(0,0,0,0.03);
}

.athlete-switcher-trigger-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--silver);
  font-weight: 600;
}

.athlete-switcher-trigger-main {
  font-weight: 600;
  color: var(--text);
}

.athlete-switcher-trigger-copy {
  font-size: 12px;
  color: var(--steel);
  margin-left: 4px;
}

.athlete-switcher-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--border);
  border-radius: 4px;
  font-size: 10px;
  color: var(--steel);
  font-weight: 600;
  margin-left: auto;
}

.athlete-switcher-nav {
  display: flex;
  gap: 8px;
}

.athlete-switcher-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInRight 0.3s ease;
}

.athlete-switcher-panel[hidden] {
  display: none !important;
}

.athlete-switcher-close {
  align-self: flex-end;
  padding: 16px;
  cursor: pointer;
  font-size: 18px;
  color: var(--steel);
}

.athlete-switcher-search-row {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.athlete-switcher-search-row input {
  width: 100%;
  padding: 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.athlete-switcher-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.athlete-switcher-item {
  padding: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.athlete-switcher-item:hover {
  background: rgba(0,0,0,0.03);
}

.athlete-switcher-item-main {
  flex: 1;
}

.athlete-switcher-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.athlete-switcher-copy {
  font-size: 12px;
  color: var(--steel);
}

.athlete-switcher-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.athlete-switcher-meta {
  font-size: 12px;
  color: var(--silver);
}

.athlete-switcher-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.athlete-switcher-pill {
  display: inline-block;
  padding: 4px 8px;
  background: var(--input);
  border-radius: 4px;
  font-size: 11px;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.athlete-switcher-pin-btn {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver);
  transition: all 0.2s ease;
}

.athlete-switcher-pin-btn:hover {
  color: var(--red);
}

.athlete-switcher-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--silver);
}

.athlete-switcher-empty[hidden],
.athlete-switcher-section[hidden] {
  display: none !important;
}

.athlete-switcher-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.athlete-switcher-panel-head h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
}

.athlete-switcher-panel-head p {
  font-size: 13px;
  color: var(--silver);
  margin: 0;
}

.athlete-switcher-tip-row {
  padding: 8px 20px;
  font-size: 12px;
  color: var(--silver);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.athlete-switcher-section {
  margin-bottom: 8px;
}

.athlete-switcher-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 4px;
}

.athlete-switcher-section-head h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--silver);
  margin: 0;
}

.athlete-switcher-section-head span {
  font-size: 12px;
  color: var(--steel);
  background: var(--input);
  padding: 2px 8px;
  border-radius: 10px;
}

.athlete-switcher-select {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--input);
}

.athlete-switcher-select button {
  width: 100%;
  padding: 12px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.athlete-switcher-select button:hover {
  background: var(--crimson);
}

@media (max-width: 640px) {
  .athlete-switcher-panel {
    width: 100%;
  }
}

/* ──────────────────────────────────────────────────────────────
   2. WORKOUT QUICK SWITCH
   ────────────────────────────────────────────────────────────── */
.workout-quick-switch {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.workout-quick-switch-bar {
  padding: 12px 20px;
}

.workout-quick-switch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.workout-quick-switch-head-actions {
  display: flex;
  gap: 8px;
}

.workout-quick-switch-head-actions button {
  padding: 6px 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.workout-quick-switch-head-actions button:hover {
  background: rgba(0,0,0,0.03);
}

.workout-quick-switch-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.workout-quick-switch-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.workout-quick-switch-chip:hover {
  background: rgba(0,0,0,0.03);
}

.workout-quick-switch-chip.is-active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.workout-quick-switch-chip.is-active .workout-quick-switch-chip-status {
  color: var(--white);
}

.workout-quick-switch-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.workout-quick-switch-chip.is-active .workout-quick-switch-avatar {
  background: rgba(255,255,255,0.3);
}

.workout-quick-switch-chip-copy {
  font-size: 11px;
  color: var(--silver);
}

.workout-quick-switch-chip.is-active .workout-quick-switch-chip-copy {
  color: rgba(255,255,255,0.8);
}

.workout-quick-switch-chip-name {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}

.workout-quick-switch-chip.is-active .workout-quick-switch-chip-name {
  color: var(--white);
}

.workout-quick-switch-chip-status {
  font-size: 10px;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.workout-quick-switch-chip-status.is-ready {
  color: #22c55e;
}

.workout-quick-switch-chip-status.is-progress {
  color: #60a5fa;
}

.workout-quick-switch-chip-status.is-completed {
  color: var(--white);
}

.workout-quick-switch-chip-status.is-review {
  color: #f59e0b;
}

.workout-quick-switch-chip-status.is-skipped {
  color: #cbd5f5;
}

.workout-quick-switch-chip-status.is-cancelled {
  color: #ef4444;
}

.workout-quick-switch-empty {
  padding: 20px;
  text-align: center;
  color: var(--silver);
  font-size: 12px;
}

.workout-quick-switch-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.workout-quick-switch-modal[hidden] {
  display: none !important;
}

.workout-quick-switch-modal-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workout-quick-switch-confirm {
  padding: 20px;
  background: var(--input);
  border-top: 1px solid var(--border);
}

.workout-quick-switch-confirm-card {
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.workout-quick-switch-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--steel);
  padding: 0;
}

.workout-quick-switch-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workout-quick-switch-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.workout-quick-switch-option {
  padding: 12px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.workout-quick-switch-option:hover {
  background: var(--input);
}

.workout-quick-switch-selected-strip {
  padding: 12px 20px;
  background: var(--input);
  border-bottom: 1px solid var(--border);
}

.workout-quick-switch-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--red);
  color: var(--white);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.workout-quick-switch-active-badge {
  display: inline-block;
  padding: 4px 8px;
  background: var(--success);
  color: var(--white);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.workout-quick-switch-select {
  padding: 16px;
  background: var(--input);
  border-top: 1px solid var(--border);
}

.workout-quick-switch-select button {
  width: 100%;
  padding: 12px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workout-quick-switch-select button:hover {
  background: var(--crimson);
}

@media (max-width: 680px) {
  .workout-quick-switch-chip {
    padding: 6px 10px;
    font-size: 12px;
  }

  .workout-quick-switch-avatar {
    width: 20px;
    height: 20px;
  }
}

/* ──────────────────────────────────────────────────────────────
   3. AMSC (Athletic Movement System Categories)
   ────────────────────────────────────────────────────────────── */
.amsc-cell {
  text-align: center;
  font-weight: 600;
  padding: 8px;
}

.amsc-1 {
  color: var(--danger);
}

.amsc-2 {
  color: var(--warning);
}

.amsc-3 {
  color: var(--info);
}

.amsc-4 {
  color: var(--success);
}

.amsc-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  font-size: 12px;
}

.amsc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.amsc-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.amsc-recorder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.amsc-clip-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 8px 10px;
}

.amsc-clip-controls {
  padding: 6px 0;
  display: flex;
  gap: 6px;
  align-items: center;
}

.amsc-clip-controls button {
  flex: 1;
  padding: 6px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.amsc-clip-controls button:hover {
  background: rgba(0,0,0,0.03);
}

.amsc-clip-meta {
  padding: 4px 0;
  font-size: 11px;
  color: var(--steel);
}

.amsc-recorder-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.amsc-recorder-modal[hidden] {
  display: none !important;
}

.amsc-recorder-panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.amsc-recorder-actions {
  display: flex;
  gap: 12px;
  padding: 16px 0;
}

.amsc-recorder-actions button {
  flex: 1;
  padding: 12px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.amsc-recorder-actions button:hover {
  background: var(--crimson);
}

/* ──────────────────────────────────────────────────────────────
   4. SCREENING
   ────────────────────────────────────────────────────────────── */
.screening-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.screening-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.screening-label {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: block;
  font-size: 14px;
}

.score-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.score-btn {
  position: relative;
  cursor: pointer;
}

.score-btn input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.score-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--input);
  border: 2px solid var(--border);
  border-radius: 4px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.score-btn input:checked + .score-num {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

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

/* ──────────────────────────────────────────────────────────────
   5. INCIDENT MODAL
   ────────────────────────────────────────────────────────────── */
.incident-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.incident-modal[hidden] {
  display: none !important;
}

.incident-modal-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.incident-modal-header h2 {
  font-size: 18px;
  margin: 0;
}

.incident-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--steel);
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.incident-tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--input);
}

.incident-tab-btn {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: var(--steel);
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.incident-tab-btn:hover {
  background: rgba(0,0,0,0.03);
}

.incident-tab-btn.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

.incident-tab-panel {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.incident-entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.incident-entry-card {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.incident-mini-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
}

.incident-case-item {
  padding: 12px;
  background: var(--input);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.incident-case-item:hover {
  background: rgba(0,0,0,0.03);
}

.incident-library-item {
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.incident-library-item:hover {
  background: rgba(0,0,0,0.03);
}

.incident-inline-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px 0;
}

.incident-inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.incident-inline-form label {
  font-weight: 600;
  font-size: 12px;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.incident-inline-form input,
.incident-inline-form textarea,
.incident-inline-form select {
  padding: 8px 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  color: var(--text);
}

.incident-inline-form textarea {
  resize: vertical;
  min-height: 60px;
}

@media (max-width: 900px) {
  .incident-modal {
    padding: 0;
  }

  .incident-modal-panel {
    max-height: 100vh;
    border-radius: 0;
  }

  .incident-inline-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────────────────────────
   6. NUTRITION
   ────────────────────────────────────────────────────────────── */
.nutrition-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.nutrition-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.nutrition-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nutrition-stat-card h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--silver);
  margin-bottom: 8px;
}

.nutrition-stat-card p {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.nutrition-item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nutrition-entry-card {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
}

.nutrition-chip-card {
  display: inline-block;
  padding: 6px 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--steel);
  margin: 4px;
}

.nutrition-entry-status {
  display: inline-block;
  padding: 4px 8px;
  background: var(--success);
  color: var(--white);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.nutrition-entry-macros {
  display: flex;
  gap: 8px;
  margin: 8px 0;
  font-size: 12px;
}

.nutrition-entry-macros span {
  padding: 4px 8px;
  background: var(--border);
  border-radius: 4px;
  color: var(--steel);
}

.nutrition-helper-text {
  font-size: 12px;
  color: var(--silver);
  margin-top: 8px;
}

.nutrition-caution-box {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 12px;
  color: #92400e;
  font-size: 12px;
  margin: 12px 0;
}

.nutrition-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nutrition-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nutrition-pick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.nutrition-macro-row {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.nutrition-micro-row {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
}

.nutrition-prescription-header {
  align-items: flex-start;
  gap: 12px;
}

.nutrition-gold-status {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--border);
  color: var(--silver);
  background: #fff;
}

.nutrition-gold-status.is-on {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.nutrition-gold-status.is-off {
  color: #92400e;
  border-color: #fcd34d;
  background: #fffbeb;
}

.nutrition-prescription-callout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #f7c2dc;
  border-radius: 12px;
  background: #fff5fa;
}

.nutrition-prescription-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.nutrition-prescription-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--dark);
  font-family: 'Anton', 'Oswald', sans-serif;
}

.nutrition-prescription-section > summary::-webkit-details-marker {
  display: none;
}

.nutrition-prescription-section > summary::after {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--steel);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.nutrition-prescription-section[open] > summary {
  margin-bottom: 8px;
}

.nutrition-prescription-section[open] > summary::after {
  content: '-';
}

.nutrition-prescription-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--dark);
}

.nutrition-target-preview {
  align-self: flex-end;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--steel);
  background: #fff;
}

.nutrition-prescription-section .nutrition-macro-row,
.nutrition-prescription-section .nutrition-micro-row {
  flex-wrap: wrap;
}

.nutrition-prescription-section .nutrition-macro-row > .form-group,
.nutrition-prescription-section .nutrition-micro-row > .form-group {
  flex: 1 1 120px;
  min-width: 0;
}

.nutrition-source-row,
.nutrition-preset-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.nutrition-source-row {
  margin: 8px 0 10px;
}

.nutrition-requirement-field {
  min-width: 0;
}

.nutrition-preset-pills {
  margin: 4px 0 8px;
}

.nutrition-preset-chip {
  appearance: none;
  border: 1px solid #f7c2dc;
  border-radius: 999px;
  background: #fff5fa;
  color: #8a124b;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  padding: 6px 9px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.nutrition-preset-chip:hover,
.nutrition-preset-chip:focus-visible {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(224, 33, 126, .12);
  outline: none;
}

.nutrition-source-chip {
  white-space: normal;
  text-align: left;
}

.nutrition-meal-structure-grid,
.nutrition-day-target-grid,
.nutrition-clinical-grid {
  display: grid;
  gap: 10px;
}

.nutrition-meal-structure-grid,
.nutrition-day-target-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nutrition-clinical-grid {
  grid-template-columns: 1fr;
}

.nutrition-meal-structure-row,
.nutrition-day-target-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.nutrition-meal-structure-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(70px, .8fr) minmax(80px, .8fr);
  align-items: end;
  gap: 8px;
}

.nutrition-meal-structure-row label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--silver);
}

.nutrition-checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--steel);
}

.nutrition-prescription-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

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

  .nutrition-prescription-callout,
  .nutrition-prescription-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nutrition-meal-structure-grid,
  .nutrition-day-target-grid {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────────────────────────
   7. ASPECT CARDS & LESSONS
   ────────────────────────────────────────────────────────────── */
.aspect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.aspect-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  cursor: pointer;
}

.aspect-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.aspect-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.aspect-info {
  padding: 16px;
}

.aspect-name {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}

.aspect-pillar {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--silver);
  margin-bottom: 8px;
}

.aspect-desc {
  font-size: 12px;
  color: var(--steel);
  line-height: 1.5;
  margin-bottom: 8px;
}

.aspect-count {
  font-size: 12px;
  color: var(--silver);
  font-weight: 600;
}

.aspect-hero {
  position: relative;
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #ffffff 0%, #F7F7F5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.aspect-hero-icon {
  font-size: 64px;
  opacity: 0.8;
}

.aspect-hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aspect-card-art {
  width: 100%;
  height: 160px;
  background: var(--input);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lesson-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.lesson-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.lesson-number {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.lesson-info {
  padding: 16px 20px 20px;
  flex: 1;
  min-width: 0;
}

.lesson-title {
  font-weight: 700;
  color: var(--text);
  font-size: 17px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.lesson-subtitle {
  font-size: 14px;
  color: var(--steel);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.lesson-tag {
  display: inline-block;
  padding: 5px 10px;
  background: var(--input);
  border-radius: 6px;
  font-size: 12px;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

.lesson-arrow {
  color: var(--red);
  font-weight: 600;
  margin-left: auto;
  font-size: 20px;
  padding: 16px;
  display: flex;
  align-items: center;
}

.lesson-card-art {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #ffffff 0%, #F7F7F5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.lesson-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lesson-meta-bar {
  padding: 12px 20px;
  background: var(--input);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 20px;
  font-size: 13px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-label {
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  font-size: 11px;
}

.meta-value {
  color: var(--steel);
  font-weight: 600;
}

.lesson-hero-media {
  width: 100%;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.lesson-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lesson-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lesson-detail .card {
  margin-bottom: 0;
}

.lesson-detail .card-body p {
  font-size: 15px;
  line-height: 1.6;
}

.cue-item,
.fault-item,
.prog-item,
.reg-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
}

.cue-item:last-child,
.fault-item:last-child,
.prog-item:last-child,
.reg-item:last-child {
  border-bottom: none;
}

.equipment-tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--steel);
  margin: 0 6px 6px 0;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 20px;
}

@media (max-width: 768px) {
  .card-grid-2 {
    grid-template-columns: 1fr;
  }
}

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

  .lesson-card {
    flex-direction: row;
  }

  .lesson-card-art {
    width: 180px;
    height: auto;
    min-height: 160px;
    flex-shrink: 0;
  }
}

/* ──────────────────────────────────────────────────────────────
   8. EXERCISE BLOCKS
   ────────────────────────────────────────────────────────────── */
.exercise-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.exercise-num {
  display: inline-block;
  width: 36px;
  height: 36px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--steel);
  margin-bottom: 12px;
}

.exercise-num-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.exercise-content {
  margin-top: 12px;
}

.exercise-name {
  font-weight: 600;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 8px;
}

.exercise-detail {
  font-size: 13px;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.exercise-prescription {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.rx-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--steel);
  font-weight: 600;
}

.exercise-cues {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
  color: var(--steel);
}

.exercise-cues h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--silver);
  margin-bottom: 12px;
}

.exercise-visual {
  margin-top: 16px;
  overflow: hidden;
  border-radius: var(--radius);
}

.exercise-visual img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--radius);
}

.exercise-visual-main {
  width: 280px;
  min-width: 280px;
  height: auto;
  min-height: 200px;
  max-height: 320px;
  background: var(--input);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin-bottom: 0;
  overflow: hidden;
}

.exercise-visual-main img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}

.exercise-block-main {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .exercise-block-main {
    flex-direction: column;
  }
  .exercise-visual-main {
    width: 100%;
    min-width: 0;
    height: 200px;
  }
}

.exercise-setup {
  flex: 1;
}

.exercise-constraints {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--input);
  border-left: 3px solid var(--warning);
  border-radius: 4px;
  font-size: 14px;
  color: var(--steel);
  line-height: 1.5;
}

.exercise-faults-inline {
  margin-top: 12px;
  padding: 12px 16px;
  background: #fee2e2;
  border-left: 3px solid var(--danger);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
}

.fault-tag {
  display: inline-block;
  padding: 4px 8px;
  background: var(--danger);
  color: var(--white);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.exercise-animation-desc {
  font-size: 12px;
  color: var(--steel);
  margin-top: 12px;
  line-height: 1.6;
}

.exercise-image-desc {
  font-size: 12px;
  color: var(--silver);
  margin-top: 8px;
  font-style: italic;
}

.media-frame {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #ffffff 0%, #F7F7F5 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-frame img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 980px) {
  .exercise-block-main {
    flex-direction: column;
  }
}

/* ──────────────────────────────────────────────────────────────
   9. WORKOUT COMPONENTS
   ────────────────────────────────────────────────────────────── */
.workout-shell {
  display: grid;
  grid-template-columns: 1.65fr 0.95fr;
  gap: 24px;
}

.workout-hero-card {
  position: relative;
  min-height: 340px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.workout-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(224,33,126,0.82) 0%, rgba(4,4,4,0.84) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: var(--white);
}

.workout-hero-content {
  position: relative;
  z-index: 2;
}

.workout-hero-kicker-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.workout-hero-kicker {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.workout-mini-kicker {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

/* ── Adaptive Recommendation Strip (coach workout player) ────────── */
.workout-suggestion-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin: 12px 0;
  border-radius: var(--radius);
  border-left: 4px solid #f59e0b;
  background: linear-gradient(135deg, #fffcf0, #fff8e1);
}
.workout-suggestion-strip[data-action="progress_load"],
.workout-suggestion-strip[data-action="progress_reps"] {
  border-left-color: #22c55e;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}
.workout-suggestion-strip[data-action="regress"],
.workout-suggestion-strip[data-action="swap_regression"] {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, #fff5f5, #fef2f2);
}
.workout-suggestion-copy {
  flex: 1;
  min-width: 0;
}
.workout-suggestion-copy strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.workout-suggestion-copy div {
  font-size: 0.8125rem;
  color: var(--silver);
  line-height: 1.4;
}
.workout-history-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}
.workout-history-strip {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  margin: 8px 0;
  background: var(--input);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.workout-history-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 60px;
}
.workout-history-stat small {
  font-size: 0.6875rem;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.workout-history-stat span {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}
.workout-history-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}
.workout-history-trend[data-trend="up"] { color: #22c55e; background: #f0fdf4; }
.workout-history-trend[data-trend="down"] { color: #ef4444; background: #fef2f2; }
.workout-history-trend[data-trend="flat"] { color: #6b7280; background: #f3f4f6; }
.workout-history-trend[data-trend="unstable"] { color: #f59e0b; background: #fffbeb; }

.workout-hero-main h2 {
  font-size: 28px;
  margin-bottom: 4px;
  color: var(--white);
}

.workout-hero-main p {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 12px;
  line-height: 1.6;
}

.workout-hero-meta {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 12px;
}

.workout-hero-pill {
  display: inline-block;
  padding: 6px 12px;
  background: var(--red);
  color: var(--white);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.workout-side-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.workout-side-panel-head {
  padding: 16px;
  background: var(--input);
  border-bottom: 1px solid var(--border);
}

.workout-side-panel-head h3 {
  font-size: 14px;
  margin: 0;
}

.workout-athlete-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--input);
  border-bottom: 1px solid var(--border);
}

.workout-athlete-badge img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.workout-athlete-badge .details {
  flex: 1;
}

.workout-athlete-badge .name {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}

.workout-athlete-badge .meta {
  font-size: 11px;
  color: var(--silver);
}

.workout-session-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.workout-session-stat {
  text-align: center;
}

.workout-session-stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--silver);
  font-weight: 600;
  margin-bottom: 4px;
}

.workout-session-stat .value {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.workout-empty-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--silver);
}

.workout-side-note {
  padding: 16px;
  background: var(--input);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--steel);
  line-height: 1.6;
}

.workout-section-copy {
  font-size: 12px;
  color: var(--steel);
  margin: 16px 0;
  line-height: 1.6;
}

.workout-player-empty {
  padding: 40px 20px;
  text-align: center;
  background: var(--input);
  border-radius: var(--radius);
  color: var(--silver);
  font-size: 14px;
}

.workout-queue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.workout-queue-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.workout-queue-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.workout-queue-thumb {
  width: 72px;
  min-width: 72px;
  height: auto;
  min-height: 56px;
  background: linear-gradient(135deg, #ffffff 0%, #F7F7F5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: var(--radius) 0 0 var(--radius);
}

.workout-queue-thumb img,
.workout-queue-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workout-queue-copy {
  padding: 8px 10px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.workout-queue-copy strong,
.workout-queue-copy .name {
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.workout-queue-copy span,
.workout-queue-copy .meta {
  font-size: 10.5px;
  color: var(--silver);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.workout-section-shell {
  margin-bottom: 18px;
}

.workout-section-header {
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--red);
}

.workout-section-header h3 {
  font-size: 15px;
  margin: 0;
}

.workout-player-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 12px;
}

.workout-player-top {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

.workout-player-media {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, #ffffff 0%, #F7F7F5 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.workout-player-media img,
.workout-player-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.workout-player-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

.workout-player-header {
  margin-bottom: 10px;
}

.workout-player-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workout-player-desc {
  font-size: 12px;
  color: var(--steel);
  line-height: 1.5;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.workout-player-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.workout-player-badges .badge {
  display: inline-block;
  padding: 3px 8px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.workout-prescription-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workout-prescription-pill {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--steel);
}

.workout-note-callout {
  background: #fef3c7;
  border-left: 4px solid #fcd34d;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 12px;
  color: #92400e;
}

.workout-note-callout-athlete {
  font-weight: 600;
  color: #1f2937;
}

.workout-timer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.workout-timer-card {
  background: var(--input);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
  transition: all 0.2s ease;
}

.workout-timer-card.is-running {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

.workout-timer-card.is-finished {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--white);
}

.workout-timer-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
  color: var(--silver);
  margin-bottom: 8px;
}

.workout-timer-card.is-running .workout-timer-label,
.workout-timer-card.is-finished .workout-timer-label {
  color: rgba(255,255,255,0.8);
}

.workout-timer-display {
  font-family: 'Anton', 'Oswald', sans-serif;
  font-size: 42px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.workout-timer-card.is-running .workout-timer-display,
.workout-timer-card.is-finished .workout-timer-display {
  color: var(--white);
}

.workout-timer-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.workout-timer-actions button {
  flex: 1;
  padding: 8px;
  background: var(--border);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.workout-timer-actions button:hover {
  background: rgba(0,0,0,0.1);
}

.workout-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.workout-set-card {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workout-set-card:hover {
  background: rgba(0,0,0,0.03);
}

.workout-set-card.completed {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}

.workout-single-input-block {
  margin: 16px 0;
}

.workout-single-input-block label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--steel);
  margin-bottom: 8px;
}

.workout-single-input-block input {
  width: 100%;
  padding: 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  font-family: 'Rubik', sans-serif;
}

.workout-player-completion {
  padding: 16px;
  background: var(--success);
  color: var(--white);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  margin: 16px 0;
}

.workout-set-card-head {
  font-weight: 600;
  margin-bottom: 8px;
}

.workout-set-rx {
  font-size: 11px;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.workout-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.workout-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.workout-field-group {
  display: flex;
  flex-direction: column;
}

.workout-field-group--full {
  grid-column: 1 / -1;
}

.workout-field-label {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--steel);
  margin-bottom: 8px;
}

.workout-summary-card {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}

.workout-summary-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--silver);
  font-weight: 600;
  margin-bottom: 4px;
}

.workout-summary-card .value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.workout-summary-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.workout-summary-actions button {
  flex: 1;
  padding: 12px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workout-summary-actions button:hover {
  background: var(--crimson);
}

.workout-page-header {
  margin-bottom: 24px;
}

.workout-page-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.workout-exercise-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.workout-exercise-media {
  width: 100%;
  height: 350px;
  background: linear-gradient(135deg, #ffffff 0%, #F7F7F5 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  overflow: hidden;
}

.workout-exercise-media img,
.workout-exercise-media video {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.workout-exercise-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.workout-day-view {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.workout-day-view.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.workout-player-nav {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.workout-player-step {
  flex: 1;
  padding: 8px 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.workout-player-step:hover {
  background: rgba(0,0,0,0.03);
}

.workout-player-step.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.workout-player-jumps {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  font-size: 12px;
}

.workout-jump-link {
  padding: 6px 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--red);
  font-weight: 600;
}

.workout-jump-link:hover {
  background: rgba(0,0,0,0.03);
}

@media (max-width: 1180px) {
  .workout-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .workout-player-top {
    grid-template-columns: 1fr;
  }

  .workout-exercise-layout {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────────────────────────
   10. LOGIN PAGE
   ────────────────────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(255, 46, 126, 0.10), transparent 34%),
    #ffffff;
  position: relative;
  overflow: hidden;
}

.login-page-embed {
  min-height: auto;
  padding: 28px 20px;
  background:
    radial-gradient(circle at top right, rgba(44, 181, 162, 0.10), transparent 34%),
    #f6f8fb;
}

.login-page-embed .login-bg-accent {
  inset: auto -14% -24% auto;
  width: 380px;
  height: 380px;
  opacity: 0.65;
}

.login-bg-accent {
  position: absolute;
  inset: auto -10% -12% auto;
  width: 520px;
  height: 520px;
  background:
    repeating-linear-gradient(-36deg, rgba(224,33,126,0.08) 0 16px, rgba(44,181,162,0.08) 16px 32px),
    radial-gradient(circle at center, rgba(255,46,126,0.18), rgba(255,46,126,0));
  border-radius: 50%;
  pointer-events: none;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 2;
}

.login-card-wide {
  max-width: 860px;
}

.login-card-embed {
  max-width: 780px;
}

.login-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--black);
  border: 1px solid rgba(4, 4, 4, 0.12);
  border-radius: 28px;
  font-weight: 600;
  font-size: 28px;
  box-shadow: 0 12px 28px rgba(4, 4, 4, 0.08);
}

.login-logo-full {
  display: block;
  width: 64px;
  height: auto;
  margin: 0 auto;
}

.login-logo-mark {
  width: 58px;
  height: auto;
}

.login-logo .brand-fallback-mark {
  color: var(--black);
}

.login-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 10px;
  text-align: center;
}

.login-card h1 {
  font-size: 2rem;
  margin-bottom: 6px;
  text-align: center;
}

.login-card p {
  color: var(--steel);
  margin-bottom: 16px;
  line-height: 1.6;
}

.login-intro {
  text-align: center;
  margin-bottom: 6px;
}

.login-meta {
  text-align: center;
  font-size: 12px;
}

.login-embed-note {
  text-align: center;
  font-size: 12px;
  color: var(--red);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.login-entry-copy {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 20px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-card label {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--steel);
}

.login-card input {
  padding: 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text);
  font-family: 'Rubik', 'Glacial Indifference', sans-serif;
}

.login-card button {
  padding: 14px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.login-card button:hover {
  background: var(--crimson);
  box-shadow: 0 10px 28px rgba(224, 33, 126, 0.22);
}

.login-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.login-role-option {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(4, 4, 4, 0.12);
  background: rgba(4, 4, 4, 0.02);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-role-option:hover {
  transform: translateY(-1px);
  border-color: rgba(224, 33, 126, 0.28);
  box-shadow: 0 12px 28px rgba(4, 4, 4, 0.06);
}

.login-role-option.is-active {
  border-color: rgba(224, 33, 126, 0.42);
  background: linear-gradient(180deg, rgba(224, 33, 126, 0.08), rgba(44, 181, 162, 0.08));
}

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

.login-role-option span {
  font-weight: 700;
  color: var(--text);
}

.login-role-option small {
  color: var(--steel);
  line-height: 1.5;
}

.login-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.login-download-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(4, 4, 4, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.96));
}

.login-download-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 8px;
}

.login-download-card p {
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.login-download-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

.login-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.login-download-pending {
  font-size: 0.88rem;
  color: var(--steel);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--silver);
}

.login-footer a {
  color: var(--red);
}

.login-role-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.login-role-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.login-pwa-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(224,33,126,0.06), rgba(44,181,162,0.06));
  border: 1px solid rgba(224,33,126,0.15);
}

.login-pwa-banner .login-pwa-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.login-pwa-banner strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text);
}

.login-pwa-banner p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--steel);
}

.login-pwa-banner em {
  color: var(--red);
  font-style: normal;
  font-weight: 600;
}

@media (max-width: 720px) {
  .login-card {
    padding: 28px 22px;
    margin: 18px;
  }

  .login-role-grid {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────────────────────────
   11. ASSESSMENT
   ────────────────────────────────────────────────────────────── */
.assessment-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.assessment-chip {
  display: inline-block;
  padding: 8px 12px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.assessment-rule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assessment-rule-list li {
  padding: 8px 12px;
  background: var(--input);
  border-radius: 4px;
  font-size: 12px;
  color: var(--steel);
  list-style: none;
}

.csv-contract-example {
  background: #1f2937;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 11px;
  overflow-x: auto;
  margin: 12px 0;
  line-height: 1.6;
}

.athlete-assessment-launcher {
  padding: 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.athlete-assessment-launcher:hover {
  background: rgba(0,0,0,0.03);
}

.assessment-template-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.assessment-template-picker-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.assessment-template-picker-title {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.assessment-template-option {
  padding: 8px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--steel);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.assessment-template-option:hover {
  background: rgba(0,0,0,0.03);
}

/* ──────────────────────────────────────────────────────────────
   12. WORKOUT BUILDER
   ────────────────────────────────────────────────────────────── */
.workout-builder-day {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.workout-builder-day-header {
  padding: 16px 20px;
  background: var(--input);
  border-bottom: 1px solid var(--border);
}

.workout-builder-day-header h3 {
  margin: 0;
  font-size: 16px;
}

.workout-builder-section {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.workout-builder-section:last-of-type {
  border-bottom: none;
}

.workout-builder-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.workout-builder-section-header h4 {
  margin: 0;
  font-size: 14px;
}

.builder-exercise-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.builder-exercise-list li {
  list-style: none;
}

.builder-exercise-list-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.builder-exercise-list-item:hover {
  background: rgba(0,0,0,0.03);
}

.builder-exercise-media {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ffffff 0%, #F7F7F5 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.builder-exercise-copy {
  flex: 1;
}

.builder-exercise-copy .name {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 4px;
}

.builder-exercise-copy .meta {
  font-size: 11px;
  color: var(--silver);
}

.builder-inline-form {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
}

.builder-inline-form input,
.builder-inline-form select,
.builder-inline-form textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Rubik', sans-serif;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 8px;
}

/* ──────────────────────────────────────────────────────────────
   13. PHV BARS
   ────────────────────────────────────────────────────────────── */
.phv-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.phv-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phv-label {
  width: 120px;
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.phv-bar-track {
  flex: 1;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.phv-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--warning) 50%, var(--success) 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.phv-count {
  width: 50px;
  text-align: right;
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  flex-shrink: 0;
}

.phv-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.phv-tab {
  padding: 12px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: var(--steel);
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.phv-tab:hover {
  color: var(--text);
}

.phv-tab.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ──────────────────────────────────────────────────────────────
   14. EQUIPMENT & CUES
   ────────────────────────────────────────────────────────────── */
.equipment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.equipment-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--steel);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cue-item {
  padding: 14px 16px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--steel);
  line-height: 1.6;
}

.fault-item {
  padding: 14px 16px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--danger);
  line-height: 1.6;
}

.prog-item,
.reg-item {
  padding: 14px 16px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--steel);
  line-height: 1.5;
}

.reg-item {
  padding: 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--steel);
}

/* ──────────────────────────────────────────────────────────────
   15. TABLE ENHANCEMENTS
   ────────────────────────────────────────────────────────────── */
.table-scroll-shell {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.table-scroll-top {
  background: var(--card);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.table-scroll-main {
  overflow-x: auto;
  overflow-y: hidden;
}

.table-scroll-spacer {
  height: 12px;
}

.athlete-table-help {
  font-size: 12px;
  color: var(--silver);
  margin-top: 8px;
}

.table-sort-link {
  cursor: pointer;
  color: var(--red);
  font-weight: 600;
  transition: all 0.2s ease;
}

.table-sort-link:hover {
  color: var(--crimson);
}

.sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
}

.athlete-list-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
  background: var(--card);
}

.athlete-list-table thead {
  background: var(--input);
  border-bottom: 2px solid var(--border);
}

.athlete-list-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--steel);
}

.athlete-list-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}

.athlete-list-table tbody tr:hover {
  background: rgba(0,0,0,0.02);
}

.athlete-list-table .col-athlete {
  width: 15%;
}

.athlete-list-table .col-age {
  width: 8%;
}

.athlete-list-table .col-sport {
  width: 10%;
}

.athlete-list-table .col-phv {
  width: 8%;
}

.athlete-list-table .col-score {
  width: 8%;
}

.athlete-list-table .col-evidence {
  width: 8%;
}

.athlete-list-table .col-confidence {
  width: 8%;
}

.athlete-list-table .col-rank {
  width: 8%;
}

.athlete-list-table .col-program {
  width: 10%;
}

.athlete-list-table .col-coach {
  width: 10%;
}

.athlete-list-table .col-status {
  width: 8%;
}

.athlete-list-table .col-actions {
  width: 8%;
}

/* ──────────────────────────────────────────────────────────────
   16. UTILITIES & BADGES
   ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--input);
  color: var(--steel);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-danger {
  background: #fee2e2;
  color: var(--danger);
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-info {
  background: #dbeafe;
  color: var(--info);
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.field-help {
  font-size: 11px;
  color: var(--silver);
  margin-top: 4px;
  font-style: italic;
}

body.modal-open {
  overflow: hidden;
}

.detail-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: #6b7280;
  flex-shrink: 0;
  min-width: 0;
}

.detail-value {
  font-weight: 600;
  text-align: right;
  color: var(--text);
  word-break: break-word;
}

.alert-box {
  padding: 16px;
  border-radius: var(--radius);
  border-left: 4px solid var(--border);
  background: var(--input);
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.6;
}

.alert-warning {
  border-left-color: var(--warning);
  background: #fef3c7;
  color: #92400e;
}

.alert-info {
  border-left-color: var(--info);
  background: #dbeafe;
  color: #1e40af;
}

.talent-warning {
  padding: 12px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  color: #92400e;
  font-size: 12px;
}

/* ──────────────────────────────────────────────────────────────
   17. RESPONSIVE BREAKPOINTS FOR COMPONENTS
   ────────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .workout-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .aspect-grid,
  .lesson-card {
    flex-direction: column;
  }

  .workout-player-top {
    grid-template-columns: 1fr;
  }

  .exercise-block-main {
    flex-direction: column;
  }

  .workout-exercise-layout {
    grid-template-columns: 1fr;
  }
}

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

  .incident-modal {
    padding: 0;
  }

  .incident-modal-panel {
    max-height: 100vh;
    border-radius: 0;
  }
}

@media (max-width: 680px) {
  .workout-quick-switch-chip {
    padding: 6px 10px;
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .athlete-switcher-panel {
    width: 100%;
  }

  .screening-grid {
    grid-template-columns: 1fr;
  }
}

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

  .card-grid-3,
  .detail-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────────────────────────
   18. PRINT STYLES
   ────────────────────────────────────────────────────────────── */
@media print {
  .sidebar,
  .mobile-header,
  button,
  .workout-quick-switch,
  .athlete-switcher-bar,
  .filter-row,
  .workout-summary-actions,
  .incident-modal-close {
    display: none !important;
  }

  body {
    background: var(--white);
  }

  .card {
    box-shadow: none;
    border: 1px solid var(--border);
  }
}

/* ══════════════════════════════════════════════════════════════
   WORKOUT BUILDER — Compact & Efficient Layout
   ══════════════════════════════════════════════════════════════ */

.builder-card {
  border-radius: var(--radius);
  overflow: hidden;
}

.builder-compact-input {
  font-size: 12px !important;
  padding: 6px 8px !important;
  height: 32px;
}

select.builder-compact-input {
  padding-right: 24px !important;
}

.builder-compact-input::placeholder {
  color: var(--silver);
  font-size: 11px;
}

/* Exercise table */
.builder-exercise-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.builder-exercise-table thead th {
  padding: 6px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--silver);
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  text-align: left;
  background: var(--input);
  white-space: nowrap;
}

.builder-exercise-table tbody td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.builder-exercise-row:hover {
  background: rgba(132, 12, 26, 0.03);
}

.builder-ex-num {
  text-align: center;
  font-weight: 700;
  color: var(--silver);
  font-size: 11px;
}

/* Rx type chips */
.builder-rx-chip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.builder-rx-chip.builder-rx-percent1rm,
.builder-rx-chip.builder-rx-percentworkingmax {
  background: rgba(132, 12, 26, 0.12);
  color: var(--red);
}

.builder-rx-chip.builder-rx-fixedload {
  background: rgba(37, 99, 235, 0.1);
  color: var(--info);
}

.builder-rx-chip.builder-rx-bodyweight {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.builder-rx-chip.builder-rx-repsonly {
  background: var(--input);
  color: var(--steel);
}

.builder-rx-chip.builder-rx-rpetarget,
.builder-rx-chip.builder-rx-rirtarget {
  background: rgba(217, 119, 6, 0.1);
  color: var(--warning);
}

.builder-rx-chip.builder-rx-time,
.builder-rx-chip.builder-rx-distance,
.builder-rx-chip.builder-rx-calories {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

/* Quick-add presets */
.builder-quick-add {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.builder-preset-btn {
  display: inline-block;
  padding: 3px 8px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--steel);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.builder-preset-btn:hover {
  background: rgba(132, 12, 26, 0.08);
  border-color: var(--red);
  color: var(--red);
}

/* Toggle advanced */
.builder-toggle-adv {
  display: inline-block;
  padding: 0;
  background: none;
  border: none;
  color: var(--silver);
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.builder-toggle-adv:hover {
  color: var(--red);
}

/* Calculator grid */
.builder-calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.builder-calc-row {
  display: contents;
}

.builder-calc-row > span {
  padding: 6px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}

.builder-calc-header > span {
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--silver);
  background: var(--input);
  padding: 8px 10px;
}

/* Simple percentage table for calculator */
.builder-pct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.builder-pct-table th {
  padding: 6px 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--silver);
  font-weight: 700;
  background: var(--input);
  border-bottom: 2px solid var(--border);
  text-align: left;
}

.builder-pct-table td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
}

.builder-pct-table tr:hover {
  background: rgba(132, 12, 26, 0.03);
}

.builder-pct-table .pct-highlight {
  background: rgba(132, 12, 26, 0.06);
  font-weight: 700;
}

.builder-pct-table .pct-load {
  font-weight: 700;
  color: var(--red);
}

.builder-pct-table .pct-use {
  color: var(--silver);
  font-size: 11px;
}

/* Day card */
.builder-day-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Builder section separator */
.builder-section {
  border-bottom: 1px solid var(--border);
}

.builder-section:last-child {
  border-bottom: none;
}

/* Load preview badge */
.builder-load-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Responsive builder */
@media (max-width: 768px) {
  .builder-exercise-table {
    font-size: 11px;
  }

  .builder-exercise-table thead th,
  .builder-exercise-table tbody td {
    padding: 5px 4px;
  }

  .builder-quick-add {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
}

/* ══════════════════════════════════════════════════════════════
   LESSON PLANS — Complete Redesign
   ══════════════════════════════════════════════════════════════ */

/* ── Header ── */
.lp-header { margin-bottom: 16px; }
.lp-back {
  display: inline-block;
  font-size: 13px;
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 8px;
}
.lp-back:hover { text-decoration: underline; }

.lp-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.lp-header-info { flex: 1; min-width: 0; }
.lp-header-actions { display: flex; gap: 8px; flex-shrink: 0; }

.lp-header-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.lp-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.lp-badge-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--steel);
}

.lp-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 4px;
}
.lp-subtitle {
  font-size: 15px;
  color: var(--steel);
  line-height: 1.5;
  margin: 0;
}

/* ── Hero Image ── */
.lp-hero {
  width: 100%;
  height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--input);
}
.lp-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Stats Bar ── */
.lp-stats-bar {
  display: flex;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.lp-stat {
  flex: 1;
  padding: 14px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.lp-stat:last-child { border-right: none; }
.lp-stat-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.lp-stat-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--silver);
  font-weight: 600;
  margin-top: 2px;
}

/* ── 2-column grid ── */
.lp-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .lp-grid-2 { grid-template-columns: 1fr; }
}

/* ── Equipment tags ── */
.lp-equip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-equip-tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--steel);
}

/* ── Exercise Block Cards ── */
.lp-block-card { margin-bottom: 16px; overflow: hidden; }
.lp-block-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--input);
}
.lp-block-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.lp-block-meta {
  font-size: 12px;
  color: var(--silver);
  margin-top: 2px;
}

/* ── Warm-Up / Cool-Down exercise rows ── */
.lp-exercise-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.lp-exercise-row:last-child { border-bottom: none; }
.lp-exercise-row:hover { background: rgba(132, 12, 26, 0.02); }

.lp-ex-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--input);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--steel);
  flex-shrink: 0;
}

.lp-ex-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--input);
}
.lp-ex-img img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.lp-ex-info { flex: 1; min-width: 0; }
.lp-ex-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.lp-ex-name-lg { font-size: 18px; }

.lp-ex-rx {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.lp-rx-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--steel);
  white-space: nowrap;
}
.lp-rx-primary {
  background: rgba(132, 12, 26, 0.08);
  border-color: rgba(132, 12, 26, 0.2);
  color: var(--red);
}

.lp-ex-cues {
  font-size: 13px;
  color: var(--silver);
  line-height: 1.5;
  margin-top: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ── Main Block exercise cards ── */
.lp-exercise-card {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.lp-exercise-card:last-child { border-bottom: none; }

.lp-main-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.lp-main-img {
  width: 200px;
  min-width: 200px;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: var(--input);
  flex-shrink: 0;
}
.lp-main-img img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.lp-main-num {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.lp-main-content {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  .lp-main-layout { flex-direction: column; }
  .lp-main-img { width: 100%; min-width: 0; height: 180px; }
}

/* ── Setup, Constraints, Faults inside exercise cards ── */
.lp-setup {
  font-size: 14px;
  color: var(--steel);
  margin-bottom: 8px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.lp-constraint {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(217, 119, 6, 0.06);
  border-left: 3px solid var(--warning);
  border-radius: 4px;
  font-size: 14px;
  color: var(--steel);
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.lp-faults-row {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(220, 38, 38, 0.04);
  border-left: 3px solid var(--danger);
  border-radius: 4px;
  font-size: 13px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.lp-fault-chip {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(220, 38, 38, 0.08);
  border-radius: 4px;
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
}

.lp-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--silver);
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
}

/* ── List Items (cues, faults, progressions, regressions) ── */
.lp-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
  color: var(--steel);
}
.lp-list-item:last-child { border-bottom: none; }

.lp-list-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--steel);
  flex-shrink: 0;
  margin-top: 1px;
}
.lp-list-num-danger {
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
}

.lp-list-icon {
  font-size: 10px;
  margin-top: 4px;
  flex-shrink: 0;
}
.lp-list-prog .lp-list-icon { color: var(--success); }
.lp-list-reg .lp-list-icon { color: var(--danger); }

/* ══════════════════════════════════════════════════════════════
   LESSON PLAN LIST / ASPECT GRID
   ══════════════════════════════════════════════════════════════ */

/* ── Aspect Grid ── */
.lp-aspect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.lp-aspect-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.lp-aspect-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.lp-aspect-img {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: var(--input);
}
.lp-aspect-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lp-aspect-body { padding: 14px 16px; }
.lp-aspect-pillar {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--silver);
  margin-bottom: 4px;
}
.lp-aspect-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.lp-aspect-desc {
  font-size: 13px;
  color: var(--steel);
  line-height: 1.5;
  margin-bottom: 8px;
}
.lp-aspect-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
}

/* ── Aspect Hero ── */
.lp-aspect-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  padding: 0;
}
.lp-aspect-hero-img {
  width: 200px;
  min-width: 200px;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--input);
}
.lp-aspect-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lp-aspect-hero-info {
  padding: 20px 24px 20px 0;
  flex: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  .lp-aspect-hero { flex-direction: column; }
  .lp-aspect-hero-img { width: 100%; min-width: 0; height: 160px; }
  .lp-aspect-hero-info { padding: 16px; }
}

/* ── PHV Tabs ── */
.lp-phv-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.lp-phv-tab {
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--steel);
  background: var(--card);
  border: 2px solid var(--border);
  transition: all 0.2s ease;
}
.lp-phv-tab:hover {
  border-color: var(--tc, var(--red));
  color: var(--tc, var(--red));
}
.lp-phv-tab.active {
  background: var(--tc, var(--red));
  color: #fff;
  border-color: var(--tc, var(--red));
}

/* ── Lesson Cards in List ── */
.lp-lesson-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lp-lesson-card {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.lp-lesson-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.lp-lesson-img {
  width: 160px;
  min-width: 160px;
  height: 120px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: var(--input);
}
.lp-lesson-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lp-lesson-num {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.lp-lesson-body {
  padding: 14px 20px;
  flex: 1;
  min-width: 0;
}
.lp-lesson-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}
.lp-lesson-sub {
  font-size: 13px;
  color: var(--steel);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lp-lesson-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lp-lesson-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--input);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.lp-lesson-arrow {
  padding: 16px;
  color: var(--red);
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .lp-lesson-card { flex-direction: column; }
  .lp-lesson-img { width: 100%; min-width: 0; height: 160px; }
  .lp-lesson-arrow { display: none; }
  .lp-stats-bar { flex-wrap: wrap; }
  .lp-stat { min-width: 50%; border-bottom: 1px solid var(--border); }
}


/* ──────────────────────────────────────────────────────────────
   WORKOUT QUICK SWITCH — DOCK ENHANCEMENT
   ────────────────────────────────────────────────────────────── */
body.has-workout-quick-switch-dock .content-wrapper {
  padding-bottom: 180px;
}

.workout-quick-switch {
  position: fixed;
  right: 26px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 940;
  background: transparent;
  border: none;
  max-width: min(560px, calc(100vw - 48px));
}

.workout-quick-switch-dock-shell {
  position: relative;
}

.workout-quick-switch-dock {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 26px;
  background: rgba(17, 17, 17, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(18px);
}

.workout-quick-switch-dock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workout-quick-switch-dock-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.workout-quick-switch-dock-copy strong {
  color: var(--white);
  font-size: 16px;
  letter-spacing: 0.01em;
}

.workout-quick-switch-dock-context {
  color: rgba(238, 241, 239, 0.62);
  font-size: 12px;
  line-height: 1.35;
}

.workout-quick-switch-dock-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workout-quick-switch-ghost-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.workout-quick-switch-ghost-btn:hover,
.workout-quick-switch-ghost-btn:focus-visible {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
  outline: none;
}

.workout-quick-switch-ghost-btn.is-danger-soft {
  color: #ffd1d7;
  border-color: rgba(255, 83, 106, 0.3);
  background: rgba(255, 83, 106, 0.08);
}

.workout-quick-switch-rail-wrap {
  position: relative;
}

.workout-quick-switch-rail {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.workout-quick-switch-rail::-webkit-scrollbar {
  display: none;
}

.workout-quick-switch-bubble-shell {
  position: relative;
  flex: 0 0 auto;
}

.workout-quick-switch-bubble {
  position: relative;
  width: 94px;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 10px 10px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.045);
  color: var(--white);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.workout-quick-switch-bubble:hover,
.workout-quick-switch-bubble:focus-visible {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.07);
  outline: none;
}

.workout-quick-switch-bubble.is-active,
.workout-quick-switch-bubble-shell.is-active .workout-quick-switch-bubble {
  border-color: rgba(255,255,255,0.22);
  box-shadow: inset 0 0 0 1px rgba(120, 226, 207, 0.16), 0 12px 30px rgba(0,0,0,0.24);
  background: rgba(255,255,255,0.085);
}

.workout-quick-switch-bubble-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0 rgba(120, 226, 207, 0);
  transition: box-shadow 0.22s ease;
  pointer-events: none;
}

.workout-quick-switch-bubble.is-active .workout-quick-switch-bubble-ring,
.workout-quick-switch-bubble-shell.is-active .workout-quick-switch-bubble-ring {
  box-shadow: inset 0 0 0 1px rgba(120, 226, 207, 0.28);
}

.workout-quick-switch-bubble .workout-quick-switch-avatar {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}

.workout-quick-switch-bubble .workout-quick-switch-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workout-quick-switch-bubble-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.workout-quick-switch-bubble-name {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.workout-quick-switch-bubble-status {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(238, 241, 239, 0.7);
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.workout-quick-switch-bubble-status.is-ready { color: #8ef0ba; }
.workout-quick-switch-bubble-status.is-progress { color: #7cd4ff; }
.workout-quick-switch-bubble-status.is-completed { color: #d6fff3; }
.workout-quick-switch-bubble-status.is-review { color: #f7ca75; }
.workout-quick-switch-bubble-status.is-skipped { color: #d6d9e0; }
.workout-quick-switch-bubble-status.is-cancelled { color: #ff929e; }

.workout-quick-switch-bubble-grip {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(12,12,12,0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  cursor: grab;
  color: rgba(255,255,255,0.75);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.workout-quick-switch-bubble-grip span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.workout-quick-switch-bubble-grip:hover,
.workout-quick-switch-bubble-grip:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
  outline: none;
}

@media (hover: hover) and (pointer: fine) {
  .workout-quick-switch-bubble-grip {
    opacity: 0.36;
  }

  .workout-quick-switch-bubble-shell:hover .workout-quick-switch-bubble-grip,
  .workout-quick-switch-bubble-shell:focus-within .workout-quick-switch-bubble-grip {
    opacity: 1;
  }
}

.workout-quick-switch-empty-dock {
  min-width: 230px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: rgba(238, 241, 239, 0.75);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.workout-quick-switch-postponed-panel {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workout-quick-switch-postponed-head strong {
  color: var(--white);
  font-size: 13px;
}

.workout-quick-switch-postponed-head span {
  display: block;
  color: rgba(238, 241, 239, 0.62);
  font-size: 11px;
  margin-top: 2px;
}

.workout-quick-switch-postponed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workout-quick-switch-postponed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.workout-quick-switch-postponed-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workout-quick-switch-postponed-copy {
  min-width: 0;
}

.workout-quick-switch-postponed-copy strong,
.workout-quick-switch-postponed-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workout-quick-switch-postponed-copy strong {
  color: var(--white);
  font-size: 13px;
}

.workout-quick-switch-postponed-copy span {
  color: rgba(238, 241, 239, 0.65);
  font-size: 11px;
}

.workout-quick-switch-postponed-item .workout-quick-switch-avatar {
  width: 34px;
  height: 34px;
}

.workout-quick-switch-postponed-restore {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--white);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.workout-quick-switch-drop-target {
  position: fixed;
  right: 26px;
  bottom: calc(162px + env(safe-area-inset-bottom, 0px));
  width: 220px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 88, 115, 0.35);
  background: rgba(55, 11, 18, 0.94);
  box-shadow: 0 18px 40px rgba(0,0,0,0.34);
  color: #ffe5e8;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.workout-quick-switch-drop-target strong {
  font-size: 13px;
}

.workout-quick-switch-drop-target span {
  font-size: 11px;
  color: rgba(255, 229, 232, 0.74);
}

.workout-quick-switch-drop-target.is-active {
  background: rgba(84, 14, 25, 0.98);
  border-color: rgba(255, 88, 115, 0.6);
  transform: scale(1.02);
}

.workout-quick-switch-manage-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: min(300px, calc(100vw - 24px));
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(18,18,18,0.98);
  box-shadow: 0 20px 44px rgba(0,0,0,0.45);
  backdrop-filter: blur(18px);
  z-index: 980;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workout-quick-switch-manage-menu[hidden] {
  display: none !important;
}

.workout-quick-switch-manage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workout-quick-switch-manage-head strong,
.workout-quick-switch-manage-head span {
  display: block;
}

.workout-quick-switch-manage-head strong {
  color: var(--white);
  font-size: 14px;
}

.workout-quick-switch-manage-head span {
  color: rgba(238,241,239,0.66);
  font-size: 11px;
  margin-top: 3px;
  line-height: 1.4;
}

.workout-quick-switch-menu-close {
  border: none;
  background: rgba(255,255,255,0.06);
  color: var(--white);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  cursor: pointer;
}

.workout-quick-switch-menu-grid,
.workout-quick-switch-menu-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.workout-quick-switch-menu-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--white);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.workout-quick-switch-menu-btn:hover,
.workout-quick-switch-menu-btn:focus-visible,
.workout-quick-switch-postponed-restore:hover,
.workout-quick-switch-postponed-restore:focus-visible {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
  outline: none;
}

.workout-quick-switch-menu-btn[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.workout-quick-switch-menu-btn.is-danger {
  border-color: rgba(255, 88, 115, 0.3);
  background: rgba(255, 88, 115, 0.1);
  color: #ffe0e5;
}

.workout-quick-switch-menu-section,
.workout-quick-switch-menu-custom-time {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workout-quick-switch-menu-label,
.workout-quick-switch-menu-custom-time label {
  color: rgba(238,241,239,0.72);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.workout-quick-switch-menu-custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.workout-quick-switch-menu-custom-row .form-input {
  min-width: 0;
}

.workout-quick-switch-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  z-index: 970;
  pointer-events: none;
  opacity: 0.96;
  transform: translate3d(0, 0, 0) scale(1.02);
}

.workout-quick-switch-bubble-shell.is-drag-source {
  opacity: 0.18;
}

.workout-quick-switch-placeholder {
  width: 94px;
  min-height: 98px;
  border-radius: 24px;
  border: 1px dashed rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.03);
  flex: 0 0 auto;
}

.workout-quick-switch-selection-summary,
.workout-quick-switch-modal-actions,
.workout-quick-switch-toolbar-actions,
.workout-quick-switch-option-copy small,
.workout-quick-switch-selected-chip-main,
.workout-quick-switch-selected-chip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workout-quick-switch-selection-summary,
.workout-quick-switch-modal-actions {
  justify-content: space-between;
}

.workout-quick-switch-modal-head {
  position: relative;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.workout-quick-switch-modal-head h3 {
  margin: 0;
  color: var(--white);
}

.workout-quick-switch-modal-head p {
  margin: 4px 0 0;
  color: var(--silver);
  font-size: 13px;
}

.workout-quick-switch-toolbar,
.workout-quick-switch-selection-summary,
.workout-quick-switch-modal-actions {
  padding: 14px 20px;
}

.workout-quick-switch-selected-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.workout-quick-switch-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
}

.workout-quick-switch-selected-chip-actions button {
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-radius: 999px;
  min-width: 24px;
  height: 24px;
  cursor: pointer;
}

.workout-quick-switch-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
}

.workout-quick-switch-option.is-selected,
.workout-quick-switch-option:hover {
  border-color: rgba(255,255,255,0.12);
}

.workout-quick-switch-option-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.workout-quick-switch-option-copy small {
  color: var(--silver);
  font-size: 11px;
}

.workout-quick-switch-empty-search {
  padding: 0 20px 16px;
  color: var(--silver);
}

.workout-quick-switch-confirm-card {
  max-width: 440px;
  margin: auto;
}

@media (max-width: 900px) {
  body.has-workout-quick-switch-dock .content-wrapper {
    padding-bottom: 214px;
  }

  .workout-quick-switch {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }

  .workout-quick-switch-dock {
    border-radius: 24px;
    padding: 12px;
  }

  .workout-quick-switch-drop-target {
    left: 12px;
    right: 12px;
    bottom: calc(152px + env(safe-area-inset-bottom, 0px));
    width: auto;
  }
}

@media (max-width: 640px) {
  .workout-quick-switch-dock-head {
    flex-direction: column;
    align-items: stretch;
  }

  .workout-quick-switch-dock-tools {
    justify-content: flex-start;
  }

  .workout-quick-switch-bubble,
  .workout-quick-switch-placeholder {
    width: 84px;
    min-height: 92px;
  }

  .workout-quick-switch-menu-grid,
  .workout-quick-switch-menu-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .workout-quick-switch,
  .workout-quick-switch * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


.predictive-search-dropdown{
  position:absolute;
  z-index:1400;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(9,9,11,.98);
  box-shadow:0 18px 40px rgba(0,0,0,.32);
  border-radius:16px;
  overflow:hidden;
  backdrop-filter:blur(16px);
}
.predictive-search-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:10px 12px 8px;
  font-size:.72rem;
  color:rgba(255,255,255,.72);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.predictive-search-meta span{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.86);
}
.predictive-search-items{
  display:flex;
  flex-direction:column;
  padding:6px;
}
.predictive-search-item{
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  font:inherit;
  cursor:pointer;
}
.predictive-search-item:hover,
.predictive-search-item.is-active{
  background:rgba(255,255,255,.08);
}
.predictive-search-empty{
  padding:12px;
  color:rgba(255,255,255,.62);
  font-size:.82rem;
}
@media (max-width: 640px){
  .predictive-search-dropdown{
    max-width:min(92vw, 420px);
  }
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD MOBILE POLISH — Missing class definitions & fixes
   ══════════════════════════════════════════════════════════════ */

/* ─── Page Header (used by dashboard, other pages) ─── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 28px;
  line-height: 1.2;
  margin: 0;
}

.page-subtitle {
  color: var(--silver);
  font-size: 0.88rem;
  margin-top: 0.25rem;
  line-height: 1.5;
}

/* ─── Card Header / Body (used in dashboard cards, incident cards, etc.) ─── */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  margin: 0;
  font-size: 18px;
}

.card-body {
  /* let content breathe without extra wrapper padding */
}

.card-body.p-0,
.p-0 {
  padding: 0 !important;
}

.card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--red);
  white-space: nowrap;
}

.card-link:hover {
  color: var(--crimson);
  text-decoration: underline;
}

/* ─── Empty State ─── */
.empty-state {
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--silver);
  font-size: 0.875rem;
  line-height: 1.6;
}

.empty-state a {
  font-weight: 600;
}

/* ─── Quick Actions Grid ─── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Rubik', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--input);
  text-align: center;
  transition: all 0.2s ease;
  min-height: 44px;
  text-decoration: none;
}

.quick-action-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(224, 33, 126, 0.04);
  text-decoration: none;
}

/* ─── Stat Card Mini Variant (injury row) ─── */
.stat-card.mini {
  padding: 14px;
}

.stat-card.mini .stat-label {
  font-size: 11px;
  margin-bottom: 4px;
}

/* ─── Incident Mini Card Meta ─── */
.incident-mini-meta {
  font-size: 0.82rem;
  color: var(--silver);
  line-height: 1.5;
  margin-top: 2px;
}

/* ─── Dashboard responsive: 768px ─── */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .page-title {
    font-size: 24px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .card-header h3 {
    font-size: 16px;
  }

  .card-grid-3 {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .quick-action-btn {
    font-size: 12px;
    padding: 8px 10px;
  }

  .phv-label {
    width: 90px;
    font-size: 11px;
  }

  .phv-count {
    width: 36px;
    font-size: 11px;
  }
}

/* ─── Dashboard responsive: 480px ─── */
@media (max-width: 480px) {
  .page-title {
    font-size: 22px;
  }

  .page-subtitle {
    font-size: 0.82rem;
  }

  .card-header h3 {
    font-size: 15px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .stat-card.mini {
    padding: 10px;
  }

  .stat-card.mini .stat-label {
    font-size: 10px;
  }

  .stat-card.mini .stat-value {
    font-size: 16px !important;
  }

  .detail-row {
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  .detail-label {
    font-size: 0.8rem;
  }

  .incident-mini-card {
    padding: 10px;
  }

  .incident-mini-meta {
    font-size: 0.78rem;
  }

  .phv-label {
    width: 72px;
    font-size: 10px;
  }

  .phv-bar-track {
    height: 16px;
  }

  .phv-count {
    width: 30px;
    font-size: 10px;
  }

  .empty-state {
    padding: 1rem 0.75rem;
    font-size: 0.82rem;
  }
}

/* ================================================================
   NOTIFICATION SYSTEM
   ================================================================ */

.notif-bell {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.notif-bell:hover { background: rgba(255,255,255,0.1); }
.notif-bell--sidebar { margin-left: auto; }
.notif-bell--mobile { margin-left: auto; margin-right: 8px; }

.notif-badge {
  position: absolute;
  top: 0; right: 0;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  background: var(--red, #E0217E);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
  line-height: 18px;
  padding: 0 4px;
  pointer-events: none;
}

.notif-panel {
  position: fixed;
  z-index: 1100;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleIn 0.2s ease;
}
.notif-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
  border-bottom: 1px solid var(--border, #e5e5e5);
}
.notif-panel__title {
  font-family: Anton, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black, #040404);
  margin: 0;
}
.notif-panel__mark-all {
  background: none;
  border: none;
  color: var(--red, #E0217E);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.notif-panel__mark-all:hover { background: rgba(224,33,126,0.08); }

.notif-panel__tabs {
  display: flex;
  gap: 2px;
  padding: 8px 16px 0;
  overflow-x: auto;
}
.notif-tab {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--steel, #5e5a5d);
  cursor: pointer;
  border-radius: 16px;
  white-space: nowrap;
  transition: all 0.15s;
}
.notif-tab:hover { background: rgba(0,0,0,0.04); }
.notif-tab.active {
  background: var(--red, #E0217E);
  color: #fff;
}

.notif-panel__list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  max-height: 50vh;
}
.notif-panel__empty,
.notif-panel__loading {
  padding: 32px 20px;
  text-align: center;
  color: var(--steel, #5e5a5d);
  font-size: 0.85rem;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
}
.notif-item:hover { background: rgba(0,0,0,0.02); }
.notif-item--unread {
  background: rgba(224,33,126,0.04);
  border-left-color: var(--red, #E0217E);
}
.notif-item--urgent { border-left-color: var(--danger, #dc2626); }

.notif-item__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(224,33,126,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-item__icon img { opacity: 0.7; }

.notif-item__content { flex: 1; min-width: 0; }
.notif-item__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--black, #040404);
  line-height: 1.3;
}
.notif-item--unread .notif-item__title { font-weight: 700; }
.notif-item__body {
  font-size: 0.78rem;
  color: var(--steel, #5e5a5d);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item__time {
  font-size: 0.7rem;
  color: var(--silver, #999);
  margin-top: 4px;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .notif-panel {
    border-radius: 0 0 16px 16px;
    max-height: 80vh;
  }
  .notif-bell--sidebar { display: none; }
}
@media (min-width: 768px) {
  .notif-bell--mobile { display: none; }
}

/* ── Workout Section Accordion ─────────────────── */
.pt-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
    border-radius: 8px;
    transition: background-color 0.15s;
}
.pt-section-header:hover {
    background-color: var(--color-bg-hover, #f5f5f5);
}
.pt-section-header .pt-section-chevron {
    transition: transform 0.2s ease;
    font-size: 0.875rem;
    color: var(--color-text-muted, #6b7280);
}
.pt-section--collapsed .pt-section-chevron {
    transform: rotate(-90deg);
}
.pt-section-body {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.pt-section--collapsed .pt-section-body {
    max-height: 0;
    padding: 0;
}

/* ============================================================
   Conditioning Hub  (added 2026-04-17 — Phase 1)
   See pages/portal_home.php for markup, includes/conditioning_render_helpers.php for data.
   All custom classes are .pt-cond-* prefixed to avoid collisions.
   ============================================================ */

.pt-cond-hub {
    margin-top: var(--pt-space-md);
}
.pt-cond-recovery-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
}
.pt-cond-recovery-chip__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Hero card with pink → teal gradient */
.pt-cond-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--pt-space-md);
    align-items: center;
    padding: var(--pt-space-md);
    border-radius: var(--pt-radius-lg, 16px);
    background: linear-gradient(135deg, #E0217E 0%, #2CB5A2 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(224, 33, 126, 0.18), 0 2px 6px rgba(44, 181, 162, 0.12);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--pt-space-md);
}
.pt-cond-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 4px 4px;
    opacity: 0.6;
    pointer-events: none;
}
.pt-cond-hero__copy { position: relative; z-index: 1; min-width: 0; }
.pt-cond-hero__eyebrow {
    font-size: 0.688rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    opacity: 0.82;
    margin-bottom: 4px;
}
.pt-cond-hero__title {
    font-family: 'Anton', sans-serif;
    font-size: 1.875rem;
    line-height: 1.05;
    margin: 0 0 6px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.pt-cond-hero__rationale {
    font-size: 0.813rem;
    line-height: 1.4;
    margin: 0 0 var(--pt-space-sm);
    opacity: 0.95;
    max-width: 38ch;
}
.pt-cond-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 999px;
    background: #ffffff;
    color: #E0217E;
    border: none;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    touch-action: manipulation;
    min-height: 44px;
}
.pt-cond-hero__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.22);
}
.pt-cond-hero__cta:active { transform: translateY(0); }

.pt-cond-hero__rings { position: relative; z-index: 1; text-align: center; }
.pt-cond-hero__ring-legend {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
    font-size: 0.688rem;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
}
.pt-cond-hero__ring-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-end;
}
.pt-cond-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
}

/* Stat tile row */
.pt-cond-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--pt-space-sm);
    margin-bottom: var(--pt-space-md);
}
.pt-cond-tile {
    background: var(--pt-card, #ffffff);
    border: 1px solid var(--pt-divider, #E5E7EB);
    border-radius: var(--pt-radius-md, 12px);
    padding: var(--pt-space-sm) var(--pt-space-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pt-cond-tile__label {
    font-size: 0.688rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pt-text-muted, #64748B);
}
.pt-cond-tile__value {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--pt-text, #1F2937);
    font-family: 'Anton', sans-serif;
}
.pt-cond-tile__value--lg { font-size: 1.5rem; }
.pt-cond-tile__value small { font-size: 0.688rem; font-weight: 600; opacity: 0.7; }
.pt-cond-tile__bar {
    height: 6px;
    background: rgba(44, 181, 162, 0.12);
    border-radius: 999px;
    overflow: hidden;
    margin: 4px 0;
}
.pt-cond-tile__bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pt-cond-tile__caption {
    font-size: 0.688rem;
    color: var(--pt-text-muted, #64748B);
    line-height: 1.35;
}
.pt-cond-tile__cta {
    margin-top: 6px;
    padding: 4px 10px;
    background: var(--pt-pink-tint, rgba(224, 33, 126, 0.10));
    color: var(--pt-pink, #E0217E);
    border: none;
    border-radius: var(--pt-radius-sm, 6px);
    font-size: 0.688rem;
    font-weight: 700;
    cursor: pointer;
    align-self: flex-start;
    min-height: 32px;
    touch-action: manipulation;
}
.pt-cond-tile__cta:hover { background: rgba(224, 33, 126, 0.15); }

/* Medal strip */
.pt-cond-medals {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--pt-space-xs, 6px);
    margin-bottom: var(--pt-space-md);
}
@media (max-width: 600px) {
    .pt-cond-medals { grid-template-columns: repeat(3, 1fr); }
}
.pt-cond-medal {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 8px 4px;
    background: var(--pt-surface, #F8FAFC);
    border-radius: var(--pt-radius-md, 12px);
}
.pt-cond-medal__disc {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Anton', sans-serif;
    font-size: 1rem;
    font-weight: 800;
}
.pt-cond-medal__label {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--pt-text, #1F2937);
    line-height: 1.15;
}
.pt-cond-medal__sub {
    font-size: 0.625rem;
    color: var(--pt-text-muted, #64748B);
}

/* Quick-log details */
.pt-cond-quicklog {
    background: var(--pt-card, #ffffff);
    border: 1px solid var(--pt-divider, #E5E7EB);
    border-radius: var(--pt-radius-md, 12px);
    padding: var(--pt-space-sm);
}
.pt-cond-quicklog > summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--pt-text, #1F2937);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pt-cond-quicklog > summary::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--pt-pink, #E0217E);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}
.pt-cond-quicklog[open] > summary::before { content: "−"; }
.pt-cond-quicklog__form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--pt-space-sm);
    margin-top: var(--pt-space-sm);
}
.pt-cond-quicklog__form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pt-text-muted, #64748B);
}
.pt-cond-quicklog__form input,
.pt-cond-quicklog__form select {
    padding: 8px 10px;
    border: 1px solid var(--pt-divider, #E5E7EB);
    border-radius: var(--pt-radius-sm, 6px);
    font-size: 0.875rem;
    background: var(--pt-bg, #ffffff);
    color: var(--pt-text, #1F2937);
    min-height: 40px;
}
.pt-cond-quicklog__notes { grid-column: 1 / -1; }
.pt-cond-quicklog__form button[type="submit"] {
    grid-column: 1 / -1;
    margin-top: var(--pt-space-xs, 6px);
}
.pt-cond-quicklog__status {
    grid-column: 1 / -1;
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--pt-teal, #2CB5A2);
    min-height: 1em;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .pt-cond-hero__cta { transition: none; }
    .pt-cond-tile__bar-fill { transition: none; }
}

/* ── v259 G-3 — Language toggle pill (EN | MT) ──
 * Used by gateway.php, download.php, pages/login.php via webLocalePillHtml().
 * gateway.php and download.php also inline the same rules in their own <style> blocks
 * because they don't load style.css; this block keeps login.php (which DOES load style.css)
 * styled consistently.
 */
.mypt-lang-pill {
    display: inline-flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    padding: 3px;
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
}
.mypt-lang-pill a {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.mypt-lang-pill a.on {
    background: var(--hot, #E0217E);
    color: #fff;
}
.mypt-lang-pill a.off {
    color: var(--steel, rgba(247, 247, 245, 0.55));
}
.mypt-lang-pill a.off:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
