/* ==========================================================================
   PT WORKOUT STUDIO - APPLE MINIMALIST ARANCIO, NERO E BIANCO (DARK)
   & ARANCIO, BIANCO E GRIGIO CHIARO (LIGHT)
   Colors: var(--fz-orange) (FZ Orange), #000000 (Black), #ffffff (White), #f3f4f6 (Light Gray)
   Strictly ZERO EMOJIS anywhere.
   ========================================================================== */

:root {
  --bg-primary: #000000;
  --bg-secondary: #0c0c0e;
  --bg-tertiary: #141417;
  --bg-card: #0e0e11;
  --border-subtle: #27272a;
  --border-strong: #3f3f46;
  
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-white: #ffffff;
  
  --fz-orange: #ff6b00;
  --fz-orange-hover: #ea580c;
  --fz-orange-light: #ffa64d;
  --fz-orange-gradient: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  --card-radius: 12px;
  --btn-radius: 8px;
  --input-radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   FZ Splash Screen (3s on load/refresh)
   Pulsing stylized FZ logo at center of screen
   Full Black background for dark mode (#000000)
   Full White (un filo meno luminoso #f0f2f5) for light mode
   ========================================================================== */
.fz-splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  z-index: 99999999;
  background-color: #000000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
  pointer-events: all;
  overflow: hidden;
}

body.splash-active {
  overflow: hidden !important;
}

body.splash-active #athlete-view,
body.splash-active main {
  visibility: hidden !important;
}

.fz-splash-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.fz-splash-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.fz-splash-logo {
  width: clamp(90px, 18vw, 140px);
  height: auto;
  object-fit: contain;
  animation: fzSplashPulse 1.5s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes fzSplashPulse {
  0% {
    transform: scale(0.95);
  }
  50% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(0.95);
  }
}

/* Header */
header {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border-bottom: 2px solid #c2410c;
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.32);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  padding: 2px 0;
}

.brand:hover {
  transform: scale(1.04);
  opacity: 0.95;
}

.header-fz-logo {
  height: 42px;
  width: auto;
  max-height: 42px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.nav-tabs {
  display: flex;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.nav-tab {
  background: transparent;
  border: 1.5px solid transparent;
  color: rgba(255, 255, 255, 0.92);
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: transparent;
}

.nav-tab.active {
  background: #ffffff;
  color: var(--fz-orange-hover);
  font-weight: 800;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.header-actions .btn-outline {
  background: #ffffff;
  color: var(--fz-orange-hover);
  border: 1.5px solid #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.header-actions .btn-outline:hover {
  background: #fff7ed;
  color: #c2410c;
  border-color: #ffffff;
  transform: translateY(-1px);
}

.header-actions .theme-toggle-btn {
  background: #ffffff;
  border: 1.5px solid #ffffff;
  color: var(--fz-orange-hover);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.header-actions .theme-toggle-btn:hover {
  background: #fff7ed;
  color: #c2410c;
  transform: translateY(-1px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  background: #141417;
  color: var(--text-primary);
}

.btn:hover {
  background: #222226;
  border-color: #3f3f46;
  color: #fff;
}

.btn-primary {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border-color: var(--fz-orange);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--fz-orange-hover) 0%, var(--fz-orange-hover) 100%);
  border-color: var(--fz-orange);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.5);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: #18181b;
  border-color: var(--fz-orange);
  color: var(--fz-orange);
}

.btn-danger {
  background: transparent;
  border-color: #3f3f46;
  color: #a1a1aa;
}
.btn-danger:hover {
  background: #27272a;
  color: #ef4444;
  border-color: #7f1d1d;
}

.btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
}

/* Theme Switcher Button (Top Right Header) */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  background: #141417;
  color: var(--fz-orange);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: #222226;
  border-color: var(--fz-orange);
  color: #ffa64d;
  box-shadow: 0 0 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
  transform: translateY(-1px);
}

.theme-toggle-btn svg {
  width: 17px;
  height: 17px;
}

.theme-icon-sun {
  display: block;
}

.theme-icon-moon {
  display: none;
}

body.light-theme .theme-icon-sun {
  display: none;
}

body.light-theme .theme-icon-moon {
  display: block;
}

/* Main Container */
main {
  flex: 1;
  padding: 1.5rem 2rem;
  max-width: 1720px;
  width: 100%;
  margin: 0 auto;
}

.view-section {
  display: none;
}
.view-section.active {
  display: block;
}

/* Generator Form Grid */
.generator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .generator-layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 1.5rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  background-color: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--input-radius);
  color: var(--text-white);
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.15s ease;
  width: 100%;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23a1a1aa'%3e%3cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem 1rem;
  padding-right: 2.2rem;
  cursor: pointer;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #52525b;
  background-color: #121214;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

/* ==========================================================================
   CUSTOM APPLE SELECT DROPDOWN (Zero OS Popup, Pure Apple Dark Glassmorphism)
   ========================================================================== */

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  background-color: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--input-radius);
  color: var(--text-white);
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  user-select: none;
}

.custom-select-trigger:hover {
  background-color: #121214;
  border-color: #52525b;
}

.custom-select-trigger.open,
.custom-select-trigger:focus {
  outline: none;
  background-color: #121214;
  border-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.custom-select-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
  font-weight: 500;
}

.custom-select-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s;
  flex-shrink: 0;
}

.custom-select-trigger.open .custom-select-arrow {
  transform: rotate(180deg);
  color: #ffffff;
}

/* Dropdown Menu */
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(18, 18, 22, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid #3f3f46;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 5px;
  max-height: 340px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.custom-select-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Custom Scrollbar */
.custom-select-dropdown::-webkit-scrollbar {
  width: 5px;
}
.custom-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 3px;
}
.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #52525b;
}

/* Group Labels & Accordion Category Headers */
.custom-select-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  padding: 8px 10px 4px 10px;
  pointer-events: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
}
.custom-select-group-label:first-child {
  border-top: none;
  margin-top: 0;
}

/* Accordion Categories in Custom Select */
.custom-select-group {
  margin-bottom: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  transition: all 0.2s ease;
}

.custom-select-group:last-child {
  margin-bottom: 0;
}

.custom-select-group.expanded {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(247, 200, 159, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-select-group-header {
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.custom-select-group-header:hover {
  background: rgba(255, 255, 255, 0.06);
}

.custom-select-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f4f4f5;
  letter-spacing: 0.2px;
}

.custom-select-group.expanded .custom-select-group-title {
  color: #f7c89f;
}

.custom-select-group-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-select-group-count {
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  padding: 1px 7px;
  border-radius: 10px;
}

.custom-select-group.expanded .custom-select-group-count {
  background: rgba(141, 91, 56, 0.35);
  color: #f7c89f;
}

.custom-select-group-chevron {
  width: 15px;
  height: 15px;
  color: #71717a;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s;
}

.custom-select-group.expanded .custom-select-group-chevron {
  transform: rotate(180deg);
  color: #f7c89f;
}

.custom-select-group-options {
  display: none;
  padding: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.25);
}

.custom-select-group.expanded .custom-select-group-options {
  display: block;
  animation: fadeIn 0.18s ease-out;
}

/* Option Items */
.custom-select-option {
  padding: 8px 12px;
  font-size: 0.83rem;
  color: #d4d4d8;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: all 0.12s ease;
  user-select: none;
  margin-bottom: 2px;
}

.custom-select-option:last-child {
  margin-bottom: 0;
}

.custom-select-option:hover {
  background: #27272a;
  color: #ffffff;
}

.custom-select-option.selected {
  background: #27272a;
  color: #ffffff;
  font-weight: 600;
  border-left: 3px solid #f7c89f;
}

.custom-select-option-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.custom-select-option-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f4f4f5;
  line-height: 1.3;
}

.custom-select-option-desc {
  font-size: 0.71rem;
  color: #94a3b8;
  line-height: 1.35;
  font-weight: 400;
}

.custom-select-option:hover .custom-select-option-desc,
.custom-select-option.selected .custom-select-option-desc {
  color: #d1d5db;
}

.custom-select-option-text {
  flex: 1;
  white-space: normal;
  line-height: 1.35;
}

.custom-select-checkmark {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f7c89f;
  opacity: 0;
  flex-shrink: 0;
}

.custom-select-option.selected .custom-select-checkmark {
  opacity: 1;
}

/* Preset Tags (1-Click Setup) Fuori dalla Lista Principale */
.preset-tags-wrapper {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
  background: rgba(18, 18, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
}

.preset-tags-header {
  margin-bottom: 8px;
}

.preset-tags-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #f7c89f;
  display: block;
}

.preset-tags-hint {
  font-size: 0.71rem;
  color: #71717a;
  margin-top: 2px;
  display: block;
}

.preset-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.preset-tag-btn {
  background: #141417;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #d4d4d8;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 6px 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-family: inherit;
  line-height: 1.25;
}

.preset-tag-btn:hover {
  background: #27272a;
  border-color: var(--fz-orange);
  color: #ffffff;
  transform: translateY(-1px);
}

.preset-tag-btn.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border-color: var(--fz-orange);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

/* Compact variant for cards */
.custom-select-wrapper.compact .custom-select-trigger {
  padding: 4px 8px;
  font-size: 0.78rem;
  border-radius: 6px;
}
.custom-select-wrapper.compact .custom-select-dropdown {
  max-height: 220px;
}

/* Segmented Control */
.segmented-control {
  display: flex;
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--input-radius);
  padding: 2px;
}

.segmented-control input[type="radio"] {
  display: none;
}

.segmented-control label {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.segmented-control input[type="radio"]:checked + label {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
}

/* Day Selector Pills */
.days-selector {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.day-pill {
  flex: 1;
  min-width: 70px;
  text-align: center;
  padding: 0.5rem;
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.day-pill:hover {
  border-color: var(--fz-orange);
  color: #fff;
}

.day-pill.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff;
  border-color: var(--fz-orange);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

/* Duration Selector Pills */
.duration-selector {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.duration-pill {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 0.5rem 0.35rem;
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.duration-pill:hover {
  border-color: var(--fz-orange);
  color: #fff;
}

.duration-pill.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff;
  border-color: var(--fz-orange);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

/* Injury & Pathology Chips */
.injury-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.injury-chip {
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.injury-chip:hover {
  border-color: #ef4444;
  color: #fca5a5;
}

.injury-chip.selected {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ffffff;
  font-weight: 600;
}

/* Safety Adaptation Banner (Editor View) */
.safety-adaptation-banner {
  background: #131316;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.safety-banner-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.safety-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.safety-meta {
  font-size: 0.78rem;
  color: #d4d4d8;
  font-weight: 500;
}

.safety-banner-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.76rem;
  color: #a1a1aa;
  line-height: 1.4;
}

.safety-injury-item strong {
  color: #ffffff;
}

/* Session Duration Badge in Sheet */
.session-duration-pill {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.9);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 0.5rem;
  letter-spacing: 0.3px;
}

/* Super Serie Shaded Rows (Barre Grigie) */
.superset-row {
  background: #18181b !important;
  border-left: 3px solid var(--fz-orange);
}

.superset-row td {
  background: #18181b !important;
}

.superset-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.2);
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-block;
  vertical-align: middle;
}

/* Super Serie Dividing Line (Separatore Bianco tra Superset) */
.superset-divider-row {
  height: 8px !important;
  line-height: 0 !important;
}

.superset-divider-row td.superset-divider-cell {
  padding: 4px 0 !important;
  background: transparent !important;
  border: none !important;
  height: 8px !important;
}

.superset-white-divider-line {
  height: 3px;
  background: #ffffff;
  border-radius: 2px;
  width: 100%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 0 2px rgba(255, 255, 255, 0.9);
}

body.light-theme .superset-divider-row td.superset-divider-cell {
  background: #f8fafc !important;
}

body.light-theme .superset-white-divider-line {
  height: 5px;
  background: #ffffff;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Live Generation Animation Indicator */
.live-generating-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: livePulse 1.4s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes livePulse {
  to {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
}

/* Cursore Lampeggiante che segue lo sviluppo live della scheda */
.generation-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.15rem;
  background-color: var(--fz-orange);
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.85);
  animation: typingCursorBlink 0.65s infinite ease-in-out;
}

@keyframes typingCursorBlink {
  0%, 100% {
    opacity: 1;
    transform: scaleY(1);
  }
  50% {
    opacity: 0;
    transform: scaleY(0.7);
  }
}

.row-insert-flash {
  animation: rowFlash 0.5s ease-out;
}

@keyframes rowFlash {
  0% {
    background-color: rgba(247, 200, 159, 0.25) !important;
  }
  100% {
    background-color: transparent !important;
  }
}

@media print {
  .superset-row, .superset-row td {
    background-color: #e5e7eb !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .superset-divider-row td {
    background-color: #ffffff !important;
    height: 6px !important;
    border: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .superset-white-divider-line {
    background: #ffffff !important;
    height: 4px !important;
    border-top: 1px solid #ffffff !important;
    border-bottom: 1px solid #ffffff !important;
    box-shadow: none !important;
  }
}

/* Limitazioni Fisiche & Infortuni (Menu a Tendina) */
#injury-group-container {
  margin-top: 0.35rem;
}

.injury-toggle-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: #111114;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  outline: none;
  box-sizing: border-box;
}

.injury-toggle-btn:hover {
  border-color: #52525b;
  background: #17171b;
}

.injury-toggle-btn.open {
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.04);
}

.inj-title-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.inj-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.inj-subtitle {
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.inj-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.inj-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}

.inj-status-badge.active {
  color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.14);
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

.inj-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.22s ease, color 0.18s ease;
}

.inj-chevron.open {
  transform: rotate(180deg);
  color: var(--fz-orange);
}

.injury-dropdown {
  margin-top: 0.45rem;
  padding: 0.75rem 0.85rem;
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  animation: splitFadeDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .injury-toggle-btn {
  background: #ffffff;
  border-color: #cbd5e1;
}

body.light-theme .injury-toggle-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

body.light-theme .injury-toggle-btn.open {
  border-color: var(--fz-orange-hover);
  background: rgba(234, 88, 12, 0.04);
}

body.light-theme .inj-title {
  color: #0f172a;
}

body.light-theme .inj-subtitle {
  color: #64748b;
}

body.light-theme .injury-dropdown {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .inj-status-badge {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
}

body.light-theme .inj-status-badge.active {
  color: var(--fz-orange-hover);
  background: rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.3);
}

/* Focus Muscle Selector (Menu a Tendina) */
#focus-muscle-group-container {
  margin-top: 0.35rem;
}

.focus-muscle-toggle-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: #111114;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  outline: none;
  box-sizing: border-box;
}

.focus-muscle-toggle-btn:hover {
  border-color: #52525b;
  background: #17171b;
}

.focus-muscle-toggle-btn.open {
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.04);
}

.fmt-title-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.fmt-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fmt-subtitle {
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.fmt-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fmt-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}

.fmt-status-badge.active {
  color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.14);
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

.fmt-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.22s ease, color 0.18s ease;
}

.fmt-chevron.open {
  transform: rotate(180deg);
  color: var(--fz-orange);
}

.focus-muscle-dropdown {
  margin-top: 0.45rem;
  padding: 0.75rem 0.85rem;
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  animation: splitFadeDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .focus-muscle-toggle-btn {
  background: #ffffff;
  border-color: #cbd5e1;
}

body.light-theme .focus-muscle-toggle-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

body.light-theme .focus-muscle-toggle-btn.open {
  border-color: var(--fz-orange-hover);
  background: rgba(234, 88, 12, 0.04);
}

body.light-theme .fmt-title {
  color: #0f172a;
}

body.light-theme .fmt-subtitle {
  color: #64748b;
}

body.light-theme .focus-muscle-dropdown {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .fmt-status-badge {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
}

body.light-theme .fmt-status-badge.active {
  color: var(--fz-orange-hover);
  background: rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.3);
}

.focus-muscle-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.muscle-focus-chip {
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.muscle-focus-chip:hover {
  border-color: var(--fz-orange);
  color: #fff;
}

.muscle-focus-chip.selected {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border-color: var(--fz-orange);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

/* Prompt Tags */
.prompt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.prompt-tag {
  background: #18181b;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.12s;
}

.prompt-tag:hover {
  background: #27272a;
  color: #fff;
  border-color: #52525b;
}

/* ==========================================================================
   FZ ACCESS GATE / LOCK SCREEN (FZ2000)
   ========================================================================== */
.fz-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fz-gate-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 30px rgba(var(--fz-orange-rgb, 255,107,0), 0.15);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: fzGatePop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fzGatePop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.fz-gate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange) 100%);
  color: #000;
  font-weight: 900;
  font-size: 1.5rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 20px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

.fz-gate-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 0.35rem;
}

.fz-gate-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.fz-gate-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.fz-gate-input-wrap label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.fz-gate-input-wrap input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: #09090b;
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-align: center;
  transition: all 0.2s;
}

.fz-gate-input-wrap input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
}

.fz-gate-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  text-align: center;
  font-weight: 500;
}

.fz-gate-btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}

/* ==========================================================================
   DUAL-GROUP VARIANTS BAR
   ========================================================================== */
.variants-bar-container {
  background: #18181b;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variants-group-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.variants-group-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 220px;
}

.variants-badge-target {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.variants-badge-method {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.15);
  color: #ff9944;
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.variants-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.variants-btn-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.variant-btn {
  background: #09090b;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.38rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
}

.variant-btn:hover {
  border-color: #52525b;
  color: #fff;
}

.variant-btn.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
}

.variant-btn.method-btn {
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
  color: #e4e4e7;
}

.variant-btn.method-btn:hover {
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.6);
  color: #ffaa55;
}

.variant-btn.method-btn.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange) 100%);
  color: #000000;
  border-color: var(--fz-orange);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

/* ==========================================================================
   AMOS CHESSA 07/04 LAYOUT (NUMBERS & EXCEL OFFICIAL TEMPLATE)
   ========================================================================== */

.sheet-container {
  background: #111113;
  color: #ffffff;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid var(--border-subtle);
  margin-top: 1rem;
  overflow-x: auto;
}

/* Top Header Box (3 Blocks: Left, Center FZ Logo, Right) */
.sheet-header-amos {
  display: grid;
  grid-template-columns: 1fr 130px 1.6fr;
  border: 1.5px solid #3f3f46;
  border-radius: 8px;
  background: #18181b;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

@media (max-width: 900px) {
  .sheet-header-amos {
    grid-template-columns: 1fr;
  }
}

.amos-header-left {
  display: grid;
  grid-template-rows: 1fr 1fr;
  border-right: 1.5px solid #3f3f46;
}

.amos-subrow {
  display: grid;
  grid-template-columns: 75px 1.2fr 85px 1.2fr;
  border-bottom: 1px solid #27272a;
}
.amos-subrow:last-child {
  border-bottom: none;
}

.amos-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-right: 1.5px solid #3f3f46;
  background: #141416;
}

.fz-logo-emblem {
  border: 2px solid var(--fz-orange);
  border-radius: 8px;
  padding: 4px 10px;
  text-align: center;
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fz-monogram {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ff7700;
  letter-spacing: 1.5px;
  font-style: italic;
  line-height: 1;
}

.fz-subtext {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.amos-header-right {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.amos-right-row1 {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-bottom: 1px solid #27272a;
}

.amos-right-row2 {
  display: grid;
  grid-template-columns: 110px 1fr;
}

.sheet-cell-label {
  background: #222226;
  font-weight: 700;
  padding: 5px 8px;
  border-right: 1px solid #27272a;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
}

.sheet-cell-val {
  padding: 3px 6px;
  border-right: 1px solid #27272a;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.76rem;
  color: #fff;
}
.sheet-cell-val:last-child {
  border-right: none;
}

.editable-field {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
  padding: 2px 4px;
  border-radius: 4px;
}
.editable-field:hover, .editable-field:focus {
  background: #09090b;
  border-color: #52525b;
  outline: none;
}

/* Unified AMOS CHESSA Table (Web Editor Layout) */
.sheet-table-amos {
  width: 100%;
  border-collapse: collapse;
  background: #161618;
  border: 1.5px solid #3f3f46;
  border-radius: 8px;
  overflow: hidden;
}

.sheet-table-amos th {
  background: #222226;
  color: #ffffff;
  padding: 8px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid #3f3f46;
  border-right: 1px solid #27272a;
  text-align: center;
}
.sheet-table-amos th.col-ex {
  text-align: left;
  padding-left: 14px;
  min-width: 280px;
}

.sheet-table-amos td {
  padding: 4px 8px;
  border-bottom: 1px solid #222226;
  border-right: 1px solid #222226;
  font-size: 0.78rem;
  color: #ffffff;
}

.sheet-table-amos td.col-ex {
  min-width: 280px;
  width: auto;
  padding: 4px 10px;
}

.exercise-name-input,
.sheet-table-amos td.col-ex input.editable-field {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  width: 100%;
  padding: 5px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.exercise-name-input:hover,
.exercise-name-input:focus,
.sheet-table-amos td.col-ex input.editable-field:hover,
.sheet-table-amos td.col-ex input.editable-field:focus {
  background: #09090b;
  border-color: #52525b;
}

.reps-rest-input,
.sheet-table-amos td.col-reps input.editable-field,
.sheet-table-amos td.col-rest input.editable-field {
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  padding: 4px 6px;
}

.sheet-table-amos tr:hover {
  background: #1d1d21;
}

.tracking-header-col {
  width: 65px;
  min-width: 60px;
}

.tracking-group {
  padding: 0 !important;
  width: 65px;
  min-width: 60px;
}

.tracking-subcols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 100%;
  min-height: 28px;
}

.subcol {
  border-right: 1px dashed #3f3f46;
  height: 100%;
  display: block;
}
.subcol:last-child {
  border-right: none;
}

/* Solid Orange Session Divider Rows */
.session-divider-row {
  background: var(--fz-orange) !important;
}

.session-divider-row td {
  padding: 4px 10px !important;
  background: var(--fz-orange) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.70rem !important;
  letter-spacing: 0.5px;
  border: none !important;
}

.session-divider-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-btn {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.65rem;
  transition: all 0.12s;
}
.table-btn:hover {
  background: #27272a;
  color: #ffffff;
  border-color: #3f3f46;
}
.table-btn.active-ss {
  background: rgba(217, 119, 54, 0.25);
  color: #f7c89f;
  border-color: rgba(247, 200, 159, 0.4);
  font-weight: 700;
}
.table-btn.active-ss:hover {
  background: rgba(217, 119, 54, 0.4);
  color: #ffffff;
}

.btn-swap-variant {
  background: #1e1e22;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-swap-variant:hover {
  background: #27272a;
  color: #fff;
  border-color: #52525b;
}

/* Drag and Drop Styling for Exercise Rows */
.draggable-exercise-row {
  transition: background 0.12s ease, opacity 0.12s ease;
}

.drag-handle-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: grab;
  user-select: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.drag-handle-wrapper:hover {
  background: rgba(249, 115, 22, 0.18);
}

.drag-handle-wrapper:active {
  cursor: grabbing;
}

.drag-handle-icon {
  font-size: 0.95rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.8;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.drag-handle-wrapper:hover .drag-handle-icon {
  opacity: 1;
  transform: scale(1.15);
}

.drag-row-number {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.draggable-exercise-row.is-dragging {
  opacity: 0.35 !important;
  background: rgba(249, 115, 22, 0.12) !important;
  outline: 1px dashed var(--accent) !important;
}

.draggable-exercise-row.drop-indicator-top {
  border-top: 3px solid var(--fz-orange) !important;
  box-shadow: 0 -3px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
}

.draggable-exercise-row.drop-indicator-bottom {
  border-bottom: 3px solid var(--fz-orange) !important;
  box-shadow: 0 3px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
}

.session-divider-row.drop-target-day {
  outline: 2px solid #ffffff !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5) !important;
}

/* Database View */
.database-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-box input {
  width: 100%;
  padding-left: 1rem;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.category-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
}

.category-chip:hover {
  border-color: #52525b;
  color: #fff;
}

.category-chip.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border-color: var(--fz-orange);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

.exercise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.85rem;
}

.exercise-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all 0.2s ease;
  position: relative;
}

.exercise-card:hover {
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
  background: #161619;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.exercise-card:focus-within,
.exercise-card:has(.custom-select-dropdown.open) {
  z-index: 30;
  border-color: var(--fz-orange);
}

.exercise-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.exercise-card-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  line-height: 1.3;
}

.exercise-card-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #27272a;
  color: #a1a1aa;
  font-weight: 500;
  white-space: nowrap;
}

.exercise-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.exercise-meta b {
  color: var(--text-secondary);
}

.exercise-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.exercise-actions .custom-select-wrapper {
  width: 100%;
}

.exercise-actions .custom-select-wrapper.compact .custom-select-trigger {
  width: 100%;
  min-height: 38px;
  height: auto;
  padding: 7px 10px;
  font-size: 0.8rem;
  line-height: 1.35;
  border-radius: 7px;
  background: #09090b;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  box-sizing: border-box;
}

.exercise-actions .custom-select-wrapper.compact .custom-select-label {
  flex: 1;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  text-overflow: unset;
  text-align: left;
  line-height: 1.35;
  color: #ffffff;
}

.exercise-actions .custom-select-wrapper.compact .custom-select-dropdown {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.exercise-actions .custom-select-wrapper.compact .custom-select-option {
  white-space: normal;
  word-break: break-word;
  padding: 8px 10px;
  font-size: 0.8rem;
  line-height: 1.35;
  align-items: flex-start;
}

.exercise-actions .custom-select-wrapper.compact .custom-select-option-text {
  flex: 1;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.35;
}

.exercise-actions select.select-day-target {
  width: 100%;
  min-height: 38px;
  height: auto;
  padding: 7px 10px;
  font-size: 0.8rem;
  line-height: 1.35;
  border-radius: 7px;
  background: #09090b;
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  box-sizing: border-box;
  white-space: normal;
}

.exercise-actions .btn-add-exercise-to-day {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.exercise-actions .btn-add-exercise-to-day:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
  filter: brightness(1.08);
}

.exercise-actions .btn-add-exercise-to-day:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  padding: 1rem;
}
.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  padding: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

.variants-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.variant-item {
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.12s;
}

.variant-item:hover {
  border-color: #ffffff;
  background: #18181b;
}

.variant-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.variant-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #27272a;
  color: #ffffff;
  border: 1px solid #3f3f46;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  font-size: 0.85rem;
  font-weight: 500;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Client Archive & Optimization Studio */
.archive-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .archive-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   APPLE-STYLE NOTIFICATION BANNER (AVVISO SCHEDE DA AGGIORNARE)
   ========================================================================== */
.apple-banner-wrapper {
  margin-bottom: 1.25rem;
}

.apple-notification-banner {
  background: rgba(24, 24, 28, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: appleBannerAppear 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

body.light-theme .apple-notification-banner {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

@keyframes appleBannerAppear {
  0% { opacity: 0; transform: translateY(-8px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.apple-notification-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #ef4444;
}

.anb-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.anb-icon-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

body.light-theme .anb-icon-box {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

.anb-logo {
  max-width: 26px;
  max-height: 26px;
  object-fit: contain;
}

.apple-alert-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444, 0 0 4px #ef4444;
  animation: appleDotPulse 2s infinite ease-in-out;
  border: 2px solid #18181c;
}

body.light-theme .apple-alert-dot {
  border-color: #ffffff;
}

@keyframes appleDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 8px #ef4444; }
  50% { transform: scale(1.18); opacity: 0.85; box-shadow: 0 0 14px #ef4444; }
}

.anb-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.anb-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.4px;
}

.anb-brand {
  color: var(--fz-orange-hover);
  font-weight: 800;
}

.anb-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.light-theme .anb-title {
  color: #0f172a;
}

.anb-badge-alert {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
  font-size: 0.62rem;
  font-weight: 900;
  padding: 1.5px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.anb-message {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
}

body.light-theme .anb-message {
  color: #475569;
}

.anb-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.anb-btn-sound {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.anb-btn-sound:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

body.light-theme .anb-btn-sound {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: #334155;
}

body.light-theme .anb-btn-sound:hover {
  background: rgba(0, 0, 0, 0.08);
}

.anb-btn-action {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: none;
  font-size: 0.80rem;
  font-weight: 800;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.anb-btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.55);
}

@media (max-width: 840px) {
  .apple-notification-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .anb-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   ARCHIVIO DUAL SIDEBAR TABS & PENDING CLIENTS
   ========================================================================== */
.archive-sidebar-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.archive-nav-tab {
  background: #09090b;
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  position: relative;
}

body.light-theme .archive-nav-tab {
  background: #ffffff;
  border-color: #cbd5e1;
}

.archive-nav-tab:hover {
  border-color: #52525b;
  background: #141416;
}

body.light-theme .archive-nav-tab:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.archive-nav-tab.active {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.1);
  border-color: var(--fz-orange);
  box-shadow: 0 2px 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.2);
}

body.light-theme .archive-nav-tab.active {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.08);
  border-color: var(--fz-orange-hover);
}

.ant-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.ant-tab-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.1px;
}

body.light-theme .ant-tab-title {
  color: #0f172a;
}

.archive-nav-tab.active .ant-tab-title {
  color: var(--fz-orange);
}

.ant-tab-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.ant-tab-badge {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  border-radius: 0;
  min-width: auto;
  text-align: right;
  letter-spacing: -0.5px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex-shrink: 0;
  margin-left: 8px;
  display: inline-block;
}

.badge-pending {
  background: transparent !important;
  border: none !important;
  color: #38bdf8;
}

body.light-theme .badge-pending {
  color: #0284c7;
}

.badge-pending-intake {
  background: transparent !important;
  border: none !important;
  color: #38bdf8;
}

body.light-theme .badge-pending-intake {
  color: #0284c7;
}

.badge-active-count {
  background: transparent !important;
  border: none !important;
  color: #34d399;
}

body.light-theme .badge-active-count {
  color: #059669;
}

.badge-trials {
  background: transparent !important;
  border: none !important;
  color: #ff8533;
}

body.light-theme .badge-trials {
  color: #ea580c;
}

.badge-trash-count {
  background: transparent !important;
  border: none !important;
  color: #f87171;
}

body.light-theme .badge-trash-count {
  color: #dc2626;
}

.trash-badge-type {
  font-size: 0.60rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 9999px;
  display: inline-block;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.client-list-item.trash-item {
  border-left: 3.5px solid #ef4444;
}

.badge-trial-status {
  font-size: 0.60rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 9999px;
  display: inline-block;
}

.badge-trial-status.in_attesa {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.2);
  color: #ff8533;
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
}

.badge-trial-status.confermata {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-trial-status.svolta {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.client-list-item.trial-item {
  border-left: 3.5px solid var(--fz-orange);
}

.trial-course-tag {
  display: block;
  font-size: 0.74rem;
  font-weight: 850;
  color: var(--fz-orange);
  margin-top: 3px;
  line-height: 1.25;
}

.trial-date-line {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.25;
}

.apple-tab-red-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: appleDotPulse 2s infinite ease-in-out;
  margin-left: 5px;
  flex-shrink: 0;
  display: inline-block;
}

/* Subfilters */
.archive-subfilters {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.subfilter-pill {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

body.light-theme .subfilter-pill {
  border-color: #cbd5e1;
}

.subfilter-pill:hover {
  border-color: #52525b;
  color: #ffffff;
}

body.light-theme .subfilter-pill:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.subfilter-pill.active {
  background: var(--bg-tertiary);
  border-color: var(--fz-orange);
  color: var(--fz-orange);
  font-weight: 800;
}

.dot-small-red {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
}

/* Pending Client Anamnesi Grid */
.pending-anamnesi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .pending-anamnesi-grid {
    grid-template-columns: 1fr;
  }
}

.pa-box {
  background: #111114;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

body.light-theme .pa-box {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.pa-box.pa-full {
  grid-column: 1 / -1;
}

.pa-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pa-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pa-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   PRESA DATI ONLINE & SCHEDA ANAMNESI (MOBILE-FIRST & DESKTOP)
   ========================================================================== */
.online-intake-modal-content {
  background: #121215;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

body.light-theme .online-intake-modal-content {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.oi-card {
  background: #17171c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

body.light-theme .oi-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.oi-card-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fz-orange);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

body.light-theme .oi-card-title {
  color: var(--fz-orange-hover);
}

.oi-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.oi-pill {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.48rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.light-theme .oi-pill {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.oi-pill:hover {
  background: #27272a;
  color: #ffffff;
  border-color: #71717a;
}

body.light-theme .oi-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.oi-pill.active {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.15);
  border-color: var(--fz-orange);
  color: #ff8533;
  box-shadow: 0 0 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
}

body.light-theme .oi-pill.active {
  background: rgba(234, 88, 12, 0.12);
  border-color: var(--fz-orange-hover);
  color: var(--fz-orange-hover);
}

.oi-grid-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 0.45rem;
}

.oi-opt-card {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 0.6rem 0.7rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.light-theme .oi-opt-card {
  background: #ffffff;
  border-color: #cbd5e1;
}

.oi-opt-card:hover {
  border-color: #52525b;
  background: #1c1c21;
}

body.light-theme .oi-opt-card:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.oi-opt-card.active {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  border-color: var(--fz-orange);
  box-shadow: 0 0 12px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
}

body.light-theme .oi-opt-card.active {
  background: rgba(234, 88, 12, 0.1);
  border-color: var(--fz-orange-hover);
}

.oi-opt-main {
  font-size: 0.8rem;
  font-weight: 800;
  color: #f8fafc;
}

body.light-theme .oi-opt-main {
  color: #0f172a;
}

.oi-opt-card.active .oi-opt-main {
  color: var(--fz-orange);
}

body.light-theme .oi-opt-card.active .oi-opt-main {
  color: var(--fz-orange-hover);
}

.oi-opt-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.oi-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.oi-quick-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
}

body.light-theme .oi-quick-tag {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}

.oi-quick-tag:hover {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.15);
  border-color: var(--fz-orange);
  color: #f8fafc;
}

body.light-theme .oi-quick-tag:hover {
  background: rgba(234, 88, 12, 0.1);
  border-color: var(--fz-orange-hover);
  color: #0f172a;
}

.oi-footer-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .oi-footer-actions {
  border-top-color: #e2e8f0;
}

.oi-btn-save {
  flex: 1;
  justify-content: center;
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.82rem;
}

.oi-btn-preload {
  flex: 1.3;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  font-weight: 800;
  font-size: 0.85rem;
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  box-shadow: 0 4px 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
  white-space: nowrap;
}

.oi-btn-preload:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
}

@media (max-width: 640px) {
  .online-intake-modal-content {
    padding: 1rem 0.85rem;
    max-height: 96vh;
    border-radius: 12px;
  }
  .oi-card {
    padding: 0.75rem;
    margin-bottom: 0.65rem;
  }
  .oi-grid-options {
    grid-template-columns: 1fr 1fr;
  }
  .oi-footer-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  .oi-btn-save, .oi-btn-preload {
    width: 100%;
    flex: none;
  }
}

.clients-sidebar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 800px;
  overflow-y: auto;
}

.client-list-item {
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  transition: all 0.12s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.client-list-item:hover {
  border-color: #52525b;
  background: #141416;
}

.client-list-item.active {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  border-color: var(--fz-orange);
}

.client-item-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.client-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Badges di Notifica Scadenza Scheda */
.client-expiry-badge {
  font-size: 0.60rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.sheet-status-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
}

.badge-expired {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.badge-expiring {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.badge-active {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.workout-history-card {
  background: #121214;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  transition: all 0.15s;
}

.workout-history-card:hover {
  border-color: #52525b;
  background: #18181b;
}

.workout-history-card.current-active-sheet {
  border-color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.08);
}

.expiry-alert-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.client-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.roadmap-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .roadmap-timeline {
    grid-template-columns: 1fr;
  }
}

.roadmap-card {
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  transition: all 0.15s;
}

.roadmap-card.current {
  border-color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.08);
}

.roadmap-card-season {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.roadmap-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.roadmap-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.feedback-box-panel {
  background: #141416;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feedback-diagnosis-result {
  background: #09090b;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #e4e4e7;
}

.feedback-diagnosis-result h4 {
  color: #ffffff;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

/* ==========================================================================
   PRINT STYLESHEET (PIXEL PERFECT REPRODUCTION OF AMOS CHESSA 07/04 FOTO 2)
   ========================================================================== */

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 6mm;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    font-size: 9pt !important;
  }
  header, .nav-tabs, .header-actions, .generator-layout, #db-view, #archive-view, .table-btn, .btn, .prompt-tags, .variants-bar, .col-swap, .btn-swap-variant, .no-print, .toast-container {
    display: none !important;
  }
  main {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #editor-view {
    display: block !important;
  }
  .sheet-container {
    background: #ffffff !important;
    color: #000000 !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* Header Box */
  .sheet-header-amos {
    border: 1.5px solid #000000 !important;
    background: #ffffff !important;
    margin-bottom: 8px !important;
  }
  .amos-header-left, .amos-header-center, .amos-header-right {
    border-right: 1.5px solid #000000 !important;
    background: #ffffff !important;
  }
  .amos-subrow, .amos-right-row1 {
    border-bottom: 1px solid #000000 !important;
  }
  .sheet-cell-label {
    background: #f0f0f0 !important;
    color: #000000 !important;
    border-right: 1px solid #000000 !important;
    font-weight: bold !important;
    font-size: 7.5pt !important;
  }
  .sheet-cell-val {
    border-right: 1px solid #000000 !important;
    color: #000000 !important;
    font-size: 8pt !important;
  }
  .fz-logo-emblem {
    border: 2px solid #e59866 !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .fz-monogram {
    color: #d97736 !important;
  }
  .fz-subtext {
    color: #000000 !important;
  }

  /* Unified Table */
  .sheet-table-amos {
    border: 1.5px solid #000000 !important;
    background: #ffffff !important;
  }
  .sheet-table-amos th {
    background: #ffffff !important;
    color: #000000 !important;
    border-bottom: 1.5px solid #000000 !important;
    border-right: 1px solid #000000 !important;
    font-weight: bold !important;
    font-size: 7.5pt !important;
    padding: 4px 6px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .sheet-table-amos td {
    color: #000000 !important;
    border-bottom: 1px solid #888888 !important;
    border-right: 1px solid #888888 !important;
    padding: 3px 5px !important;
    font-size: 8pt !important;
  }
  .subcol {
    border-right: 1px dashed #888888 !important;
  }

  /* Orange Divider Rows */
  .session-divider-row td {
    background: #f7c89f !important;
    color: #000000 !important;
    border-top: 1.5px solid #000000 !important;
    border-bottom: 1.5px solid #000000 !important;
    font-weight: bold !important;
    font-size: 7.5pt !important;
    padding: 4px 8px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .editable-field {
    color: #000000 !important;
    padding: 1px !important;
    font-size: 8pt !important;
  }
}

/* ==========================================================================
   LIGHT THEME (MODALITÀ CHIARA: ARANCIO, BIANCO E GRIGIO CHIARO)
   Strictly ZERO EMOJIS anywhere.
   ========================================================================== */

body.light-theme,
html.light-theme,
[data-theme="light"] {
  --bg-primary: #e8ecf2;
  --bg-secondary: #ffffff;
  --bg-tertiary: #dce2eb;
  --bg-card: #ffffff;
  --border-subtle: #cbd5e1;
  --border-strong: #94a3b8;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-white: #0f172a;

  --fz-orange: #ff6b00;
  --fz-orange-hover: #ea580c;
  --fz-orange-light: var(--fz-orange-hover);
  --fz-orange-gradient: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
}

body.light-theme {
  background-color: #e8ecf2;
  color: #0f172a;
}

/* Light Header */
body.light-theme header {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border-bottom: 2px solid #c2410c;
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.28);
}


body.light-theme .nav-tabs {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px;
}

body.light-theme .nav-tab {
  color: rgba(255, 255, 255, 0.92);
  border: 1.5px solid transparent;
}

body.light-theme .nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: transparent;
}

body.light-theme .nav-tab.active {
  background: #ffffff;
  color: var(--fz-orange-hover);
  font-weight: 800;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

body.light-theme .header-actions .btn-outline {
  background: #ffffff;
  color: var(--fz-orange-hover);
  border: 1.5px solid #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

body.light-theme .header-actions .btn-outline:hover {
  background: #fff7ed;
  color: #c2410c;
  border-color: #ffffff;
  transform: translateY(-1px);
}

body.light-theme .header-actions .theme-toggle-btn {
  background: #ffffff;
  border: 1.5px solid #ffffff;
  color: var(--fz-orange-hover);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

body.light-theme .header-actions .theme-toggle-btn:hover {
  background: #fff7ed;
  color: #c2410c;
  transform: translateY(-1px);
}

/* Light Buttons */
body.light-theme .btn {
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.light-theme .btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

body.light-theme .btn-primary {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border: 1.5px solid var(--fz-orange);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
}

body.light-theme .btn-primary:hover {
  background: linear-gradient(135deg, #ff7a1a 0%, var(--fz-orange-hover) 100%);
  border-color: var(--fz-orange);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
  transform: translateY(-1px);
}

body.light-theme .btn-outline {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
}

body.light-theme .btn-outline:hover {
  background: #fff7ed;
  border-color: var(--fz-orange);
  color: var(--fz-orange-hover);
}

body.light-theme .theme-toggle-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: var(--fz-orange);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.light-theme .theme-toggle-btn:hover {
  background: #fff7ed;
  border-color: var(--fz-orange);
  color: var(--fz-orange-hover);
  box-shadow: 0 0 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.2);
}

/* Light Panels */
body.light-theme .panel {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.light-theme .panel-header {
  border-bottom: 1.5px solid #e2e8f0;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6,
body.light-theme .panel-title,
body.light-theme #active-sheet-heading,
body.light-theme .client-item-name,
body.light-theme .exercise-card-title,
body.light-theme .roadmap-card-title,
body.light-theme .workout-history-card h3,
body.light-theme .workout-history-card span[style*="color:#fff"],
body.light-theme .workout-history-card span[style*="color: #fff"],
body.light-theme .workout-history-card span[style*="color:var(--text-primary)"],
body.light-theme .workout-history-card span[style*="color: var(--text-primary)"],
body.light-theme .database-header h2,
body.light-theme #editor-view h2,
body.light-theme #database-view h2,
body.light-theme #archive-view h2,
body.light-theme #modal-target-ex-title {
  color: #0f172a !important;
}

body.light-theme .panel-title {
  color: #0f172a !important;
  font-weight: 700;
}

/* Light Form Inputs */
body.light-theme label {
  color: #64748b;
}

body.light-theme input[type="text"],
body.light-theme input[type="number"],
body.light-theme input[type="date"],
body.light-theme select,
body.light-theme textarea {
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
}

body.light-theme select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3e%3cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3e%3c/svg%3e");
}

body.light-theme input:focus,
body.light-theme select:focus,
body.light-theme textarea:focus {
  border-color: var(--fz-orange);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(var(--fz-orange-rgb, 255,107,0), 0.15);
  outline: none;
}

/* Light Custom Apple Select & Accordion */
body.light-theme .custom-select-trigger {
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.light-theme .custom-select-trigger:hover {
  border-color: var(--fz-orange);
  background-color: #ffffff;
}

body.light-theme .custom-select-trigger.open,
body.light-theme .custom-select-trigger:focus {
  background-color: #ffffff;
  border-color: var(--fz-orange);
  box-shadow: 0 0 0 3px rgba(var(--fz-orange-rgb, 255,107,0), 0.15);
  outline: none;
}

body.light-theme .custom-select-label {
  color: #0f172a;
}

body.light-theme .custom-select-arrow {
  color: #64748b;
}

body.light-theme .custom-select-trigger.open .custom-select-arrow {
  color: var(--fz-orange);
}

body.light-theme .custom-select-dropdown {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.light-theme .custom-select-dropdown::-webkit-scrollbar-thumb {
  background: #d1d5db;
}

body.light-theme .custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

body.light-theme .custom-select-group {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

body.light-theme .custom-select-group.expanded {
  background: #ffffff;
  border-color: var(--fz-orange);
  box-shadow: 0 3px 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.08);
}

body.light-theme .custom-select-group-header:hover {
  background: #f3f4f6;
}

body.light-theme .custom-select-group-title {
  color: #0f172a;
}

body.light-theme .custom-select-group.expanded .custom-select-group-title {
  color: var(--fz-orange-hover);
}

body.light-theme .custom-select-group-count {
  background: #e5e7eb;
  color: #4b5563;
}

body.light-theme .custom-select-group.expanded .custom-select-group-count {
  background: #ffedd5;
  color: var(--fz-orange-hover);
}

body.light-theme .custom-select-group-chevron {
  color: #9ca3af;
}

body.light-theme .custom-select-group.expanded .custom-select-group-chevron {
  color: var(--fz-orange-hover);
}

body.light-theme .custom-select-group-options {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

body.light-theme .custom-select-option {
  color: #374151;
}

body.light-theme .custom-select-option:hover {
  background: #eef2f6;
  color: #0f172a;
}

body.light-theme .custom-select-option.selected {
  background: #fff7ed;
  color: #0f172a;
  border-left: 3px solid var(--fz-orange);
}

body.light-theme .custom-select-option-title {
  color: #0f172a;
}

body.light-theme .custom-select-option-desc {
  color: #6b7280;
}

body.light-theme .custom-select-option:hover .custom-select-option-desc,
body.light-theme .custom-select-option.selected .custom-select-option-desc {
  color: #374151;
}

body.light-theme .custom-select-checkmark {
  color: var(--fz-orange);
  font-weight: 800;
}

/* Light Preset Tags Box & Buttons */
body.light-theme .preset-tags-wrapper {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

body.light-theme .preset-tags-title {
  color: var(--fz-orange-hover);
  font-weight: 800;
}

body.light-theme .preset-tags-hint {
  color: #64748b;
}

body.light-theme .preset-tag-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

body.light-theme .preset-tag-btn:hover {
  background: #ffffff;
  border-color: var(--fz-orange);
  color: var(--fz-orange-hover);
}

body.light-theme .preset-tag-btn.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border: 1.5px solid var(--fz-orange);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
}

/* Light Pills & Segmented Controls */
body.light-theme .segmented-control {
  background: #e2e8f0;
  border: 1.5px solid #cbd5e1;
}

body.light-theme .segmented-control label {
  color: #475569;
}

body.light-theme .segmented-control input[type="radio"]:checked + label {
  background: #ffffff;
  color: var(--fz-orange-hover);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.light-theme .day-pill,
body.light-theme .duration-pill {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
}

body.light-theme .day-pill:hover,
body.light-theme .duration-pill:hover {
  border-color: var(--fz-orange);
  color: var(--fz-orange-hover);
  background: #fff7ed;
}

body.light-theme .day-pill.active,
body.light-theme .duration-pill.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff;
  border: 1.5px solid var(--fz-orange);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
}

body.light-theme .injury-chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
}

body.light-theme .injury-chip:hover {
  border-color: #ef4444;
  color: #dc2626;
  background: #fef2f2;
}

body.light-theme .injury-chip.selected {
  background: #fee2e2;
  border: 1.5px solid #ef4444;
  color: #b91c1c;
  font-weight: 700;
}

body.light-theme .muscle-focus-chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
}

body.light-theme .muscle-focus-chip:hover {
  border-color: var(--fz-orange);
  color: var(--fz-orange-hover);
}

body.light-theme .muscle-focus-chip.selected {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border-color: var(--fz-orange);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
}

body.light-theme .prompt-tag {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #4b5563;
}

body.light-theme .prompt-tag:hover {
  background: #fff7ed;
  color: var(--fz-orange-hover);
  border-color: var(--fz-orange);
}

/* Light Variants Selector Bar */
body.light-theme .variants-bar-container {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

body.light-theme .variant-btn {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  color: #374151;
}

body.light-theme .variant-btn:hover {
  border-color: var(--fz-orange);
  color: var(--fz-orange-hover);
}

body.light-theme .variant-btn.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff;
  border-color: var(--fz-orange);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
}

body.light-theme .variant-btn.method-btn {
  border-color: #fdba74;
  color: var(--fz-orange-hover);
  background: #fff7ed;
}

body.light-theme .variant-btn.method-btn:hover {
  border-color: var(--fz-orange-hover);
  color: #c2410c;
}

body.light-theme .variant-btn.method-btn.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff;
  border-color: var(--fz-orange-hover);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
}

/* Light Sheet Container & Amos Chessa Layout */
body.light-theme .sheet-container {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

body.light-theme .sheet-header-amos {
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
}

body.light-theme .amos-header-left {
  border-right: 1.5px solid #cbd5e1;
}

body.light-theme .amos-subrow {
  border-bottom: 1px solid #e5e7eb;
}

body.light-theme .amos-header-center {
  border-right: 1.5px solid #cbd5e1;
  background: #ffffff;
}

body.light-theme .fz-logo-emblem {
  border: 2px solid var(--fz-orange);
  background: #fff7ed;
}

body.light-theme .fz-monogram {
  color: var(--fz-orange);
  font-weight: 900;
}

body.light-theme .fz-subtext {
  color: #1e293b;
  font-weight: 700;
}

body.light-theme .amos-right-row1 {
  border-bottom: 1px solid #e5e7eb;
}

body.light-theme .sheet-cell-label {
  background: #f3f4f6;
  border-right: 1px solid #e5e7eb;
  color: #4b5563;
  font-weight: 700;
}

body.light-theme .sheet-cell-val {
  border-right: 1px solid #e5e7eb;
  color: #0f172a;
  font-weight: 600;
}

body.light-theme .editable-field {
  color: #0f172a;
}

body.light-theme .editable-field:hover,
body.light-theme .editable-field:focus {
  background: #f3f4f6;
  border-color: var(--fz-orange);
}

body.light-theme .sheet-table-amos {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
}

body.light-theme .sheet-table-amos th {
  background: #f3f4f6;
  color: #0f172a;
  border-bottom: 1.5px solid #cbd5e1;
  border-right: 1px solid #e5e7eb;
  font-weight: 700;
}

body.light-theme .sheet-table-amos td {
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  color: #0f172a;
}

body.light-theme .sheet-table-amos tr:hover {
  background: #f9fafb;
}

body.light-theme .exercise-name-input,
body.light-theme .sheet-table-amos td.col-ex input.editable-field {
  color: #0f172a;
}

body.light-theme .exercise-name-input:hover,
body.light-theme .exercise-name-input:focus,
body.light-theme .sheet-table-amos td.col-ex input.editable-field:hover,
body.light-theme .sheet-table-amos td.col-ex input.editable-field:focus {
  background: #f3f4f6;
  border-color: var(--fz-orange);
}

body.light-theme .reps-rest-input,
body.light-theme .sheet-table-amos td.col-reps input.editable-field,
body.light-theme .sheet-table-amos td.col-rest input.editable-field {
  color: #0f172a;
}

body.light-theme .subcol {
  border-right: 1px dashed #cbd5e1;
}

body.light-theme .session-divider-row {
  background: var(--fz-orange) !important;
}

body.light-theme .session-divider-row td {
  background: var(--fz-orange) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}

body.light-theme .superset-row {
  background: #fff8f3 !important;
  border-left: 3px solid var(--fz-orange);
}

body.light-theme .superset-row td {
  background: #fff8f3 !important;
}

body.light-theme .superset-badge {
  color: var(--fz-orange-hover);
  background: #ffedd5;
  border: 1px solid #fdba74;
  font-weight: 800;
}

body.light-theme .btn-swap-variant {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #4b5563;
}

body.light-theme .btn-swap-variant:hover {
  background: #fff7ed;
  color: var(--fz-orange-hover);
  border-color: var(--fz-orange);
}

body.light-theme .table-btn {
  color: #6b7280;
}

body.light-theme .table-btn:hover {
  background: #fff7ed;
  color: var(--fz-orange-hover);
  border-color: #fdba74;
}

body.light-theme .session-duration-pill {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

body.light-theme .drag-handle-wrapper:hover {
  background: rgba(249, 115, 22, 0.12);
}

body.light-theme .drag-row-number {
  color: #64748b;
}

body.light-theme .draggable-exercise-row.is-dragging {
  background: rgba(249, 115, 22, 0.08) !important;
}

body.light-theme .session-divider-row.drop-target-day {
  outline: 2px solid #0f172a !important;
  box-shadow: 0 0 12px rgba(15, 23, 42, 0.3) !important;
}

body.light-theme .safety-adaptation-banner {
  background: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

body.light-theme .safety-meta {
  color: #1f2937;
}

body.light-theme .safety-banner-body {
  color: #4b5563;
}

body.light-theme .safety-injury-item strong {
  color: #111827;
}

/* Light Database View */
body.light-theme .category-chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
}

body.light-theme .category-chip:hover {
  border-color: var(--fz-orange);
  color: var(--fz-orange-hover);
}

body.light-theme .category-chip.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border-color: var(--fz-orange);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
}

body.light-theme .exercise-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

body.light-theme .exercise-card:hover {
  border-color: var(--fz-orange);
  background: #fffcf8;
}

body.light-theme .exercise-card-title {
  color: #0f172a;
}

body.light-theme .exercise-card-badge {
  background: #e2e8f0;
  color: #475569;
}

body.light-theme .exercise-actions {
  border-top-color: #e2e8f0;
}

body.light-theme .exercise-actions .custom-select-wrapper.compact .custom-select-trigger,
body.light-theme .exercise-actions select.select-day-target {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .exercise-actions .custom-select-wrapper.compact .custom-select-label,
body.light-theme .exercise-actions .custom-select-wrapper.compact .custom-select-option-text {
  color: #0f172a;
}

/* Light Archive View */
body.light-theme .clients-sidebar {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
}

body.light-theme .client-list-item {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
}

body.light-theme .client-list-item:hover {
  background: #e8ecf2;
  border-color: var(--fz-orange);
}

body.light-theme .client-list-item.active {
  background: #fff7ed;
  border-color: var(--fz-orange);
}

body.light-theme .client-item-name {
  color: #0f172a;
}

body.light-theme .client-item-meta {
  color: #64748b;
}

body.light-theme .expiry-alert-banner {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #991b1b !important;
}

body.light-theme .expiry-alert-banner div[style*="color:#fca5a5"],
body.light-theme .expiry-alert-banner div[style*="color: #fca5a5"] {
  color: #b91c1c !important;
}

body.light-theme .expiry-alert-banner[style*="rgba(245,158,11"] {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #92400e !important;
}

body.light-theme .expiry-alert-banner div[style*="color:#fbbf24"],
body.light-theme .expiry-alert-banner div[style*="color: #fbbf24"] {
  color: #b45309 !important;
}

body.light-theme .workout-history-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
}

body.light-theme .workout-history-card:hover {
  border-color: var(--fz-orange);
  background: #fffcf8;
}

body.light-theme .workout-history-card.current-active-sheet {
  border-color: var(--fz-orange);
  background: #fff7ed;
}

body.light-theme .feedback-box-panel {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
}

body.light-theme .feedback-diagnosis-result {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #334155;
}

body.light-theme .feedback-diagnosis-result h4 {
  color: #0f172a;
}

body.light-theme .roadmap-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

body.light-theme .roadmap-card.current {
  border-color: var(--fz-orange);
  background: #fff7ed;
}

body.light-theme .roadmap-card-title {
  color: #0f172a;
}

body.light-theme .roadmap-card-desc {
  color: #4b5563;
}

/* Light Modals & Toasts */
body.light-theme .modal-overlay {
  background: rgba(15, 23, 42, 0.6);
}

body.light-theme .modal-content {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #0f172a;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

body.light-theme .modal-content h3 {
  color: #0f172a;
}

body.light-theme .variant-item {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

body.light-theme .variant-item:hover {
  background: #fff7ed;
  border-color: var(--fz-orange);
}

body.light-theme .variant-item-title {
  color: #0f172a;
}

body.light-theme .toast {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #1e293b;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   MODULO PRESA DATI A4 (SCHEDA ANAMNESI CARTACEA COMPILABILE A PENNA)
   ========================================================================== */

/* Hidden Sandbox for PDF Export */
#intake-pdf-sandbox {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 210mm;
  background: #ffffff;
  color: #000000;
  z-index: -100;
}

#intake-pdf-sandbox .a4-landscape {
  width: 297mm;
}

/* Base Sheet Container */
.intake-sheet-a4 {
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.intake-sheet-a4.a4-portrait {
  width: 210mm;
  min-height: 297mm;
  max-height: 297mm;
  padding: 5mm 7mm 4mm 7mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.intake-sheet-a4.a4-landscape {
  width: 297mm;
  min-height: 210mm;
  max-height: 210mm;
  padding: 5mm 8mm 4mm 8mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Sheet Header */
.intake-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 4px;
  margin-bottom: 5px;
}

.iph-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.iph-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.iph-brand {
  font-size: 8.5pt;
  font-weight: 900;
  color: var(--fz-orange-hover);
  letter-spacing: 0.8px;
  line-height: 1.1;
}

.iph-title {
  font-size: 11pt;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.iph-right {
  text-align: right;
}

.iph-badge {
  font-size: 7.5pt;
  font-weight: 800;
  background: #0f172a;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.5px;
}

.iph-meta {
  font-size: 6.5pt;
  font-weight: 700;
  color: #64748b;
  margin-top: 2px;
}

/* Cards Stack */
.intake-cards-stack {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.stack-5 {
  gap: 0;
  border: 1.5px solid #0f172a;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
  justify-content: space-between;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stack-7 {
  gap: 0;
  border: 1.5px solid #0f172a;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
  justify-content: space-between;
}

.stack-3 {
  gap: 5px;
  justify-content: space-between;
}

.stack-4 {
  gap: 4px;
  justify-content: space-between;
}

/* Card Container */
.intake-card {
  border: 1.5px solid #1e293b;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
  box-sizing: border-box;
  break-inside: avoid;
  page-break-inside: avoid;
}

.ic-5 {
  border: none;
  border-radius: 0;
  border-bottom: 1.5px solid #0f172a;
  box-sizing: border-box;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  padding-bottom: 0px;
}

.ic-5:last-child {
  border-bottom: none;
}

.ic-7 {
  border: none;
  border-radius: 0;
  border-bottom: 1.5px solid #0f172a;
  box-sizing: border-box;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  padding-bottom: 0px;
}

.ic-7:last-child {
  border-bottom: none;
}

.ic-3 {
  padding-bottom: 2px;
}

.ic-4 {
  padding-bottom: 1px;
}

/* Card Header Bar */
.ic-header-bar {
  background: #f1f5f9;
  border-bottom: 1.5px solid #1e293b;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 7pt;
  font-weight: 800;
  color: #0f172a;
}

.ic-header-bar.compact {
  padding: 1.5px 5px;
  font-size: 6.5pt;
}

.ic-badge {
  background: var(--fz-orange-hover);
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.ic-meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Card Body & Rows */
.ic-body {
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.ic-body.compact {
  padding: 2px 5px;
  gap: 1.5px;
}

/* Layout 5 Soci (A4 Verticale - Spaziatura Ampia & Caratteri Ingranditi) */
.ic-header-bar.compact-5 {
  padding: 3.5px 8px;
  font-size: 8pt;
  line-height: 1.25;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-bottom: 1.2px solid #cbd5e1;
}

.ic-header-bar.compact-5 .ic-header-left,
.ic-header-bar.compact-5 .ic-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ic-5 .ic-badge {
  background: var(--fz-orange-hover);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.ic-body.compact-5 {
  padding: 5px 8px 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 3px;
}

.ic-body.compact-5 .ic-row {
  gap: 6px;
  font-size: 8pt;
  line-height: 1.3;
}

.ic-body.compact-5 .ic-lbl {
  font-size: 7.8pt;
  font-weight: 800;
  color: #0f172a;
}

.ic-body.compact-5 .cb-box,
.ic-header-bar.compact-5 .cb-box {
  font-size: 7.8pt;
  font-weight: 700;
  color: #1e293b;
  margin-right: 3px;
  gap: 3px;
}

.ic-5 .cb-sq {
  width: 10.5px;
  height: 10.5px;
  min-width: 10.5px;
  min-height: 10.5px;
  border: 1.2px solid #0f172a;
  border-radius: 1.5px;
}

.ic-body.compact-5 .blank-line,
.ic-header-bar.compact-5 .blank-line {
  border-bottom: 1px dotted #475569;
  height: 15px;
  vertical-align: bottom;
}

.ic-body.compact-5 .unit {
  font-size: 7.2pt;
  color: #64748b;
  font-weight: 600;
}

.ic-body.compact-5 .ic-sub-txt {
  font-size: 7.2pt;
  color: #334155;
  font-weight: 600;
  margin-left: 3px;
}

.ic-row.ic-notes.compact-5 {
  margin-top: 2px;
}

.ic-header-bar.compact-7 {
  padding: 1.5px 6px;
  font-size: 6.4pt;
  line-height: 1.2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ic-header-bar.compact-7 .ic-header-left,
.ic-header-bar.compact-7 .ic-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ic-7 .ic-badge {
  background: var(--fz-orange-hover);
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 6.5pt;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.ic-body.compact-7 {
  padding: 2px 6px 2.5px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 1px;
}

.ic-body.compact-7 .ic-row {
  gap: 4px;
  font-size: 6.4pt;
  line-height: 1.2;
}

.ic-body.compact-7 .ic-lbl {
  font-size: 6.2pt;
  font-weight: 800;
  color: #0f172a;
}

.ic-body.compact-7 .cb-box,
.ic-header-bar.compact-7 .cb-box {
  font-size: 6.3pt;
  font-weight: 700;
  color: #1e293b;
  margin-right: 2px;
  gap: 2px;
}

.ic-7 .cb-sq {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border: 1.1px solid #0f172a;
  border-radius: 1px;
}

.ic-body.compact-7 .blank-line {
  border-bottom: 1px dotted #475569;
  height: 11px;
  vertical-align: bottom;
}

.ic-body.compact-7 .unit {
  font-size: 6pt;
  color: #64748b;
  font-weight: 600;
}

.ic-body.compact-7 .ic-sub-txt {
  font-size: 6pt;
  color: #334155;
  font-weight: 600;
  margin-left: 2px;
}

.ic-row.ic-notes.compact-7 {
  margin-top: 0px;
}

.ic-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 7pt;
  line-height: 1.25;
}

.ic-row.ic-notes {
  margin-top: 1px;
}

.ic-col {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.ic-col.grow {
  flex: 1;
}

.ic-col.grow-2 {
  flex: 2;
}

.ic-lbl {
  font-weight: 800;
  color: #0f172a;
  font-size: 6.8pt;
  letter-spacing: -0.1px;
}

.ic-body.compact .ic-lbl {
  font-size: 6.2pt;
}

.cb-box {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  font-family: inherit;
  font-size: 6.8pt;
  font-weight: 700;
  color: #1e293b;
  margin-right: 3px;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.cb-sq {
  display: inline-block;
  width: 9px;
  height: 9px;
  min-width: 9px;
  min-height: 9px;
  border: 1.2px solid #0f172a;
  border-radius: 1.5px;
  background-color: #ffffff;
  box-sizing: border-box;
  flex-shrink: 0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.ic-body.compact .cb-box,
.ic-header-bar.compact .cb-box {
  font-size: 6.3pt;
  margin-right: 2px;
  gap: 2px;
}

.ic-body.compact .cb-sq,
.ic-header-bar.compact .cb-sq {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border: 1.1px solid #0f172a;
  border-radius: 1px;
}

.blank-line {
  border-bottom: 1px dotted #475569;
  display: inline-block;
  height: 12px;
  vertical-align: bottom;
}

.blank-line.grow {
  flex: 1;
  width: 100%;
}

.unit {
  font-size: 6.5pt;
  color: #64748b;
  font-weight: 600;
}

.ic-sub-txt {
  font-size: 6.5pt;
  color: #334155;
  font-weight: 600;
  margin-left: 4px;
}

.note-line {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  font-size: 6.5pt;
  color: #475569;
}

/* Landscape 2x2 Grid */
.intake-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 5px;
  flex: 1;
}

.ic-landscape {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ic-landscape .ic-body {
  flex: 1;
  justify-content: space-between;
}

/* Single Athlete Layout */
.intake-single-athlete {
  flex: 1;
}

.ic-single {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.single-padded {
  padding: 8px 12px;
  gap: 6px;
  flex: 1;
  justify-content: space-between;
}

.single-sec-title {
  font-size: 7.8pt;
  font-weight: 900;
  color: var(--fz-orange-hover);
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 2px;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* Page Footer */
.intake-page-footer {
  border-top: 1px solid #94a3b8;
  padding-top: 3px;
  margin-top: 3px;
  display: flex;
  justify-content: space-between;
  font-size: 6pt;
  font-weight: 600;
  color: #64748b;
}

/* ==========================================================================
   MODAL STYLES PER IL MODULO PRESA DATI
   ========================================================================== */
.intake-modal-content {
  max-width: 920px;
  width: 95vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.intake-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.intake-modal-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
}

body.light-theme .intake-modal-controls {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.intake-layout-selector {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.intake-layout-pill {
  background: transparent;
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.intake-layout-pill:hover {
  border-color: var(--fz-orange);
  color: #ffffff;
}

.intake-layout-pill.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border-color: var(--fz-orange);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
}

.intake-modal-actions {
  display: flex;
  gap: 0.5rem;
}

.intake-preview-container {
  flex: 1;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  min-height: 400px;
}

body.light-theme .intake-preview-container {
  background: #cbd5e1;
}

.intake-preview-viewport {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transform-origin: top center;
  background: #ffffff;
}

/* NATIVE PRINT HANDLING */
@media print {
  body.printing-intake-mode * {
    visibility: hidden !important;
  }

  body.printing-intake-mode #intake-native-print-zone,
  body.printing-intake-mode #intake-native-print-zone * {
    visibility: visible !important;
  }

  body.printing-intake-mode #intake-native-print-zone {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  /* Modalità Stampa Tagliando QR Code Piccolo */
  body.printing-qr-mode * {
    visibility: hidden !important;
  }

  body.printing-qr-mode #athlete-qr-print-zone,
  body.printing-qr-mode #athlete-qr-print-zone * {
    visibility: visible !important;
  }

  body.printing-qr-mode #athlete-qr-print-zone {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 20px 0 !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  @page {
    size: A4 portrait;
    margin: 0mm;
  }

  body.print-landscape @page {
    size: A4 landscape;
    margin: 0mm;
  }
}

/* Print Slip QR Code Piccolo (Tagliando per Atleta) */
.print-qr-card {
  width: 290px;
  max-width: 80mm;
  padding: 14px 18px;
  border: 1.5px solid #000000;
  border-radius: 12px;
  background: #ffffff;
  color: #000000;
  text-align: center;
  margin: 10px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

.print-qr-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 6px;
}

.print-qr-logo {
  max-height: 36px;
  width: auto;
  margin-bottom: 2px;
}

.print-qr-gym-name {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #000000;
}

.print-qr-tagline {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #555555;
}

.print-qr-divider {
  width: 100%;
  height: 1px;
  background: #cccccc;
  margin: 6px 0;
}

.print-qr-athlete-info {
  margin-bottom: 8px;
}

.print-qr-athlete-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: -0.2px;
}

.print-qr-meta {
  font-size: 0.72rem;
  color: #555555;
  margin-top: 2px;
}

.print-qr-canvas-box {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto;
  padding: 6px;
  background: #ffffff;
}

.print-qr-canvas-box img,
.print-qr-canvas-box canvas {
  width: 140px;
  height: 140px;
  display: block;
  margin: 0 auto;
}

.print-qr-instructions {
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
  color: #111111;
  margin: 6px 0 4px;
}

.print-qr-footer {
  font-size: 0.62rem;
  color: #666666;
  border-top: 1px dashed #dddddd;
  padding-top: 4px;
  margin-top: 4px;
}

/* ==========================================================================
   ATHLETE SMARTPHONE VIEW & WORKOUT PLAYER (METODO A)
   Strictly ZERO EMOJIS anywhere.
   ========================================================================== */

html.is-athlete-mode #fz-access-gate,
html.is-athlete-mode #main-portal-header,
html.is-athlete-mode > body > header:not(.athlete-header),
html.is-athlete-mode main:not(#athlete-view),
body.is-athlete-mode #fz-access-gate,
body.is-athlete-mode #main-portal-header,
body.is-athlete-mode > header:not(.athlete-header),
body.is-athlete-mode main:not(#athlete-view) {
  display: none !important;
}

html.is-athlete-mode #athlete-view {
  display: block !important;
}

:root {
  --athlete-font-scale: 1;
}

.athlete-viewport {
  max-width: 640px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 120px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: calc(15px * var(--athlete-font-scale, 1));
  overflow-x: hidden;
}

.athlete-header {
  display: block !important;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #000000;
  border-bottom: 2px solid var(--fz-orange);
  box-shadow: 0 4px 18px rgba(var(--fz-orange-rgb, 255,107,0), 0.55), 0 1px 4px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
  padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  padding-bottom: 0.75rem;
  padding-left: calc(1rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1rem + env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

@media all and (display-mode: standalone) {
  .athlete-header {
    padding-top: max(54px, calc(0.75rem + env(safe-area-inset-top, 0px)));
  }
}

html.is-ios-standalone .athlete-header,
body.is-ios-standalone .athlete-header,
html.is-standalone .athlete-header,
body.is-standalone .athlete-header {
  padding-top: max(54px, calc(0.75rem + env(safe-area-inset-top, 0px)));
}

.athlete-header.header-hidden {
  transform: none !important;
}

body.light-theme .athlete-header {
  display: block !important;
  background: #ffffff;
  border-bottom: 2px solid var(--fz-orange);
  box-shadow: 0 3px 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

.athlete-header-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
}

.athlete-brand {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}

.athlete-logo-img {
  height: 34px;
  max-height: 34px;
  width: auto;
  object-fit: contain;
  display: block;
}

.athlete-header-center {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: static;
  transform: none;
}

.athlete-zoom-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  border: 1.5px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.55);
  border-radius: 8px;
  color: var(--fz-orange);
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: all 0.12s ease;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.athlete-zoom-btn::after {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -8px;
  right: -8px;
}

body.light-theme .athlete-zoom-btn {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.08);
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
  color: var(--fz-orange-hover);
}

.athlete-zoom-btn:active {
  background: var(--fz-orange);
  color: #ffffff;
  border-color: var(--fz-orange);
  transform: scale(0.92);
}

.athlete-header-right {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: 0;
  flex-shrink: 0;
}

.btn-pwa-install {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  color: var(--fz-orange);
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-pwa-install:hover {
  background: var(--fz-orange);
  color: #ffffff;
}

.athlete-theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: #1e1e24;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.athlete-theme-btn:active {
  transform: scale(0.92);
}

.athlete-theme-ball {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.athlete-theme-icon-sun {
  width: 19px;
  height: 19px;
  color: #f59e0b;
  display: block;
}

.athlete-theme-icon-moon {
  width: 19px;
  height: 19px;
  color: #0f172a;
  display: none;
}

body.light-theme .athlete-theme-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-theme .athlete-theme-icon-sun {
  display: none;
}

body.light-theme .athlete-theme-icon-moon {
  display: block;
}

/* Athlete Profile Card Minimale */
.athlete-profile-card {
  margin: 0.85rem 1rem;
  padding: 0.95rem 1.15rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

body.light-theme .athlete-profile-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.athlete-profile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.athlete-profile-identity {
  display: flex;
  flex-direction: column;
}

.athlete-name {
  font-size: calc(1.3rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.athlete-meta-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.athlete-meta-pill {
  font-size: calc(0.78rem * var(--athlete-font-scale, 1));
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 650;
  border: 1px solid var(--border-subtle);
}

body.light-theme .athlete-meta-pill {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.athlete-coach-cues {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
  font-size: calc(0.82rem * var(--athlete-font-scale, 1));
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Split Days Selector (Solo A, B, C...) */
.athlete-split-selector {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 1rem;
  margin-bottom: 1.1rem;
}

.athlete-day-btn {
  flex: 1;
  max-width: 80px;
  height: 48px;
  padding: 0;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

/* Light Theme - Day Tabs */
body.light-theme .athlete-day-btn,
[data-theme="light"] .athlete-day-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
}

body.light-theme .athlete-day-btn .athlete-day-letter,
[data-theme="light"] .athlete-day-btn .athlete-day-letter {
  color: #0f172a;
}

.athlete-day-btn.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  border-color: var(--fz-orange);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
}

body.light-theme .athlete-day-btn.active,
[data-theme="light"] .athlete-day-btn.active {
  background: var(--fz-orange) !important;
  border-color: var(--fz-orange-hover) !important;
  color: #000000 !important;
  box-shadow: 0 4px 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.35) !important;
}

body.light-theme .athlete-day-btn.active .athlete-day-letter,
[data-theme="light"] .athlete-day-btn.active .athlete-day-letter {
  color: #000000 !important;
  font-weight: 900 !important;
}

.athlete-day-letter {
  font-size: 1.4rem;
  font-weight: 900;
  font-style: italic;
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  letter-spacing: 1px;
  transform: skewX(-7deg);
  display: inline-block;
  line-height: 1;
}

/* Day Header & Progress Bar */
.athlete-day-content {
  padding: 0 1rem;
}

.athlete-day-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
  padding: 0 2px;
}

.athlete-day-title {
  font-size: calc(1.15rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.25;
}

.athlete-day-subtitle {
  font-size: calc(0.82rem * var(--athlete-font-scale, 1));
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  display: block;
  margin-top: 3px;
  letter-spacing: 0.2px;
}

.athlete-day-stats-pill {
  font-size: calc(0.75rem * var(--athlete-font-scale, 1));
  font-weight: 750;
  color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
}

.athlete-session-progress-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

body.light-theme .athlete-session-progress-wrap {
  background: #e2e8f0;
}

.athlete-session-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8c3b0d 0%, #b45309 100%);
  border-radius: 99px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .athlete-session-progress-bar {
  background: linear-gradient(90deg, #9a3412 0%, #c25e1a 100%);
}

.athlete-session-sub-stats {
  display: flex;
  justify-content: space-between;
  font-size: calc(0.75rem * var(--athlete-font-scale, 1));
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  padding: 0 2px;
}

/* Exercise Cards Mobile Minimal */
.athlete-exercise-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.athlete-ex-card {
  background: #141417; /* Grigio più scuro possibile vicino al nero, non nero puro */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.05rem;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

body.light-theme .athlete-ex-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.athlete-ex-card.superset-border {
  border-left: 4px solid var(--fz-orange);
}

.athlete-ex-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.athlete-ex-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.athlete-ex-index {
  font-size: calc(1.35rem * var(--athlete-font-scale, 1));
  font-weight: 900;
  font-style: italic;
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  color: var(--fz-orange);
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin-right: 0.35rem;
  transform: skewX(-7deg);
  display: inline-block;
  line-height: 1;
  text-shadow: 0 0 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

body.light-theme .athlete-ex-index {
  color: var(--fz-orange-hover);
  text-shadow: none;
}

.athlete-info-btn {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: var(--fz-orange);
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  font-size: calc(1.05rem * var(--athlete-font-scale, 1));
  font-weight: 900;
  font-style: italic;
  transform: skewX(-7deg);
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
  line-height: 1;
  text-shadow: 0 0 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
  display: inline-flex;
  align-items: center;
}

.athlete-info-btn:hover,
.athlete-info-btn:active {
  color: #ffa040;
  transform: skewX(-7deg) scale(1.08);
}

body.light-theme .athlete-info-btn {
  color: var(--fz-orange-hover);
  text-shadow: none;
}

.athlete-ex-name {
  font-size: calc(1.15rem * var(--athlete-font-scale, 1));
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.athlete-ex-badge {
  font-size: calc(0.68rem * var(--athlete-font-scale, 1));
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.18);
  color: var(--fz-orange);
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
  white-space: nowrap;
}

/* Layout Riquadro Esercizio con GIF a destra */
.athlete-ex-middle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.athlete-ex-middle-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.athlete-ex-middle-left .athlete-ex-details {
  margin-bottom: 0;
}

/* Miniatura GIF Esercizio */
.athlete-ex-thumb-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  min-width: 76px;
  min-height: 76px;
  border-radius: 12px;
  overflow: hidden;
  background: #09090c;
  border: 1.5px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.athlete-ex-thumb-wrap:hover,
.athlete-ex-thumb-wrap:active {
  transform: scale(1.05);
  border-color: var(--fz-orange);
  box-shadow: 0 0 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.5);
}

.athlete-ex-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.athlete-ex-thumb-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--fz-orange);
  font-size: 8px;
  font-weight: 900;
  padding: 1px 3px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
  line-height: 1;
}

/* Modale GIF Ingrandita */
.athlete-info-gif-box {
  width: 100%;
  max-width: 280px;
  height: 190px;
  margin: 0 auto 15px auto;
  border-radius: 12px;
  overflow: hidden;
  background: #09090c;
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.athlete-info-gif-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.athlete-info-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.athlete-info-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}

.athlete-info-pill.pill-target {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.athlete-info-pill.pill-equip {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  color: #ff9800;
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
}

.athlete-guide-bio-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

.athlete-guide-bio-row {
  margin-bottom: 6px;
  line-height: 1.45;
}

.athlete-guide-bio-row strong {
  color: #ff9800;
}

body.light-theme .athlete-ex-thumb-wrap {
  background: #f1f5f9;
  border-color: rgba(234, 88, 12, 0.4);
}

body.light-theme .athlete-info-gif-box {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body.light-theme .athlete-guide-bio-box {
  border-top-color: #cbd5e1;
}

body.light-theme .athlete-guide-bio-row strong {
  color: var(--fz-orange-hover);
}

.athlete-ex-details {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.athlete-detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.athlete-detail-label {
  font-size: calc(0.72rem * var(--athlete-font-scale, 1));
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.athlete-detail-val {
  font-size: calc(1.08rem * var(--athlete-font-scale, 1));
  font-weight: 800;
  color: var(--text-primary);
}

.athlete-rest-pill {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: calc(0.95rem * var(--athlete-font-scale, 1));
  font-weight: 800;
  color: var(--fz-orange);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

body.light-theme .athlete-rest-pill {
  background: #fff7ed;
  border-color: #fdba74;
}

.athlete-rest-pill:hover,
.athlete-rest-pill:active {
  background: var(--fz-orange);
  color: #ffffff;
  border-color: var(--fz-orange);
}

.athlete-timer-svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.athlete-ex-notes {
  font-size: calc(0.86rem * var(--athlete-font-scale, 1));
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border-left: 3.5px solid var(--fz-orange);
  line-height: 1.45;
}

body.light-theme .athlete-ex-notes {
  background: #f8fafc;
  border-color: var(--fz-orange);
  color: #334155;
}

/* Sequential Sets Tracker */
.athlete-sets-tracker {
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-subtle);
}

.athlete-sets-top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.athlete-sets-label {
  font-size: calc(0.72rem * var(--athlete-font-scale, 1));
  font-weight: 750;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.athlete-reset-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: calc(0.72rem * var(--athlete-font-scale, 1));
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.athlete-reset-btn:hover,
.athlete-reset-btn:active {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

.athlete-sets-grid {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.athlete-set-btn {
  flex: 1;
  min-width: 50px;
  min-height: 50px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3px 4px;
  transition: all 0.12s ease;
  position: relative;
  box-sizing: border-box;
}

.athlete-set-btn:active {
  transform: scale(0.94);
}

.athlete-set-top-num {
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  color: #000000;
  opacity: 0.85;
  text-transform: uppercase;
}

.athlete-set-main-val {
  font-size: calc(1.22rem * var(--athlete-font-scale, 1));
  font-weight: 900;
  font-style: italic;
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  transform: skewX(-7deg);
  line-height: 1;
  letter-spacing: 0.5px;
  color: #000000;
  white-space: nowrap;
}

.athlete-set-main-val small {
  font-size: 0.65em;
  font-style: normal;
  font-weight: 750;
  margin-left: 1px;
}

.athlete-set-prev-weight {
  font-size: 0.62rem;
  font-weight: 850;
  color: var(--fz-orange);
  line-height: 1;
  margin-top: 3px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.athlete-set-reps-val {
  font-size: calc(0.72rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: #000000;
  line-height: 1.1;
  margin-top: 2px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  opacity: 0.95;
  text-transform: uppercase;
}

body.light-theme .athlete-set-btn.completed .athlete-set-reps-val,
[data-theme="light"] .athlete-set-btn.completed .athlete-set-reps-val {
  color: #000000 !important;
  font-weight: 900 !important;
}

.athlete-set-btn.completed {
  background: var(--fz-orange);
  border-color: var(--fz-orange-hover);
  color: #000000;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
}

.athlete-set-btn.completed .athlete-set-single-num {
  color: #000000;
  font-weight: 900;
}

.athlete-set-btn.next-to-do {
  border-color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.14);
  color: var(--fz-orange);
  box-shadow: 0 0 0 2px rgba(var(--fz-orange-rgb, 255,107,0), 0.22);
}

.athlete-set-btn.next-to-do .athlete-set-single-num {
  color: var(--fz-orange);
  font-weight: 900;
}

.athlete-set-btn.locked {
  opacity: 0.36;
  cursor: not-allowed;
  border-style: dashed;
}

.athlete-set-btn.locked .athlete-set-prev-weight {
  color: var(--text-muted);
}

/* Light Theme - Series Buttons (Leggibilità Massima NERO / ARANCIO) */
body.light-theme .athlete-set-btn,
[data-theme="light"] .athlete-set-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
}

body.light-theme .athlete-set-btn .athlete-set-single-num,
[data-theme="light"] .athlete-set-btn .athlete-set-single-num {
  color: #0f172a;
  font-weight: 850;
}

body.light-theme .athlete-set-btn .athlete-set-prev-weight,
[data-theme="light"] .athlete-set-btn .athlete-set-prev-weight {
  color: var(--fz-orange-hover);
}

body.light-theme .athlete-set-btn.locked,
[data-theme="light"] .athlete-set-btn.locked {
  opacity: 0.45;
  background: #f1f5f9;
  border-style: dashed;
  border-color: #cbd5e1;
  color: #64748b;
}

body.light-theme .athlete-set-btn.locked .athlete-set-single-num,
[data-theme="light"] .athlete-set-btn.locked .athlete-set-single-num {
  color: #64748b;
}

body.light-theme .athlete-set-btn.next-to-do,
[data-theme="light"] .athlete-set-btn.next-to-do {
  border: 2px solid var(--fz-orange) !important;
  background: #fff7ed !important;
  color: var(--fz-orange-hover) !important;
  box-shadow: 0 0 0 2px rgba(var(--fz-orange-rgb, 255,107,0), 0.25) !important;
}

body.light-theme .athlete-set-btn.next-to-do .athlete-set-single-num,
[data-theme="light"] .athlete-set-btn.next-to-do .athlete-set-single-num {
  color: var(--fz-orange-hover) !important;
  font-weight: 900 !important;
}

body.light-theme .athlete-set-btn.completed,
[data-theme="light"] .athlete-set-btn.completed {
  background: var(--fz-orange) !important;
  border: 2px solid var(--fz-orange-hover) !important;
  color: #000000 !important;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.35) !important;
}

body.light-theme .athlete-set-btn.completed .athlete-set-top-num,
[data-theme="light"] .athlete-set-btn.completed .athlete-set-top-num {
  color: #000000 !important;
  opacity: 0.85 !important;
}

body.light-theme .athlete-set-btn.completed .athlete-set-main-val,
[data-theme="light"] .athlete-set-btn.completed .athlete-set-main-val {
  color: #000000 !important;
  font-weight: 900 !important;
}

.athlete-completed-grid {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

/* Modale Inserimento Carico Serie FZ */
.athlete-weight-modal-card {
  max-width: 380px;
  width: 90%;
  text-align: center;
  padding: 1.5rem;
  border-radius: 16px;
  background: #111114;
  border: 1.5px solid var(--fz-orange);
  box-shadow: 0 8px 32px rgba(var(--fz-orange-rgb, 255,107,0), 0.3), 0 4px 20px rgba(0, 0, 0, 0.8);
  position: relative;
}

body.light-theme .athlete-weight-modal-card {
  background: #ffffff;
  border-color: var(--fz-orange-hover);
  box-shadow: 0 8px 30px rgba(234, 88, 12, 0.25);
}

.athlete-weight-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  text-align: left;
}

.athlete-weight-modal-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--fz-orange);
  line-height: 1.2;
}

body.light-theme .athlete-weight-modal-title {
  color: var(--fz-orange-hover);
}

.athlete-weight-modal-subtitle {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.athlete-weight-prev-hint {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  text-align: center;
}

.athlete-weight-prev-hint b {
  color: var(--fz-orange);
}

.athlete-weight-input-wrap {
  margin-bottom: 1.4rem;
}

.athlete-weight-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.35rem;
}

.athlete-weight-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.athlete-weight-col .athlete-weight-input-label {
  display: block;
  font-size: 0.70rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.athlete-weight-col .athlete-weight-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.athlete-weight-col .athlete-weight-input {
  width: 88px;
  height: 52px;
  background: var(--bg-tertiary);
  border: 2px solid var(--fz-orange);
  border-radius: 12px;
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  font-size: 1.85rem;
  font-weight: 900;
  font-style: italic;
  transform: skewX(-7deg);
  color: var(--fz-orange);
  text-align: center;
  outline: none;
  box-shadow: 0 0 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.22);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.light-theme .athlete-weight-col .athlete-weight-input {
  background: #f8fafc;
  border-color: var(--fz-orange-hover);
  color: var(--fz-orange-hover);
}

.athlete-weight-col .athlete-weight-input:focus {
  border-color: #ff8533;
  box-shadow: 0 0 16px rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
}

.athlete-weight-input-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.athlete-weight-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.athlete-weight-input {
  width: 140px;
  height: 58px;
  background: var(--bg-tertiary);
  border: 2px solid var(--fz-orange);
  border-radius: 12px;
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  font-style: italic;
  transform: skewX(-7deg);
  color: var(--fz-orange);
  text-align: center;
  outline: none;
  box-shadow: 0 0 12px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.light-theme .athlete-weight-input {
  background: #f8fafc;
  border-color: var(--fz-orange-hover);
  color: var(--fz-orange-hover);
}

.athlete-weight-input:focus {
  border-color: #ff8533;
  box-shadow: 0 0 18px rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
}

.athlete-weight-unit {
  font-size: 1.05rem;
  font-weight: 900;
  font-style: italic;
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  color: var(--text-muted);
  transform: skewX(-7deg);
}

.athlete-reps-unit {
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.athlete-weight-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-weight-confirm {
  width: 100%;
  padding: 13px;
  background: var(--fz-orange);
  border: none;
  border-radius: 10px;
  color: #000000;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
}

.btn-weight-confirm:hover,
.btn-weight-confirm:active {
  background: #ffa040;
  transform: scale(0.98);
}

.btn-weight-skip {
  width: 100%;
  padding: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-weight-skip:hover,
.btn-weight-skip:active {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-weight-deselect {
  width: 100%;
  padding: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  color: #ef4444;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.athlete-completed-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border-subtle);
  position: relative;
}

.athlete-completed-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.15rem;
}

.athlete-completed-fz-stamp {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 0 1.35rem 0;
  background: none !important;
  border: none !important;
}

.athlete-completed-fz-stamp span {
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  font-size: calc(1.75rem * var(--athlete-font-scale, 1));
  font-weight: 900;
  font-style: italic;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--fz-orange);
  text-shadow: 0 0 16px rgba(var(--fz-orange-rgb, 255,107,0), 0.55), 0 2px 4px rgba(0, 0, 0, 0.7);
  transform: rotate(8deg) skewX(-6deg);
  display: inline-block;
  user-select: none;
}

body.light-theme .athlete-completed-fz-stamp span {
  color: var(--fz-orange-hover);
  text-shadow: 0 2px 10px rgba(234, 88, 12, 0.35);
}

.athlete-cardio-actions {
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-subtle);
}

.athlete-cardio-btn {
  width: 100%;
  padding: 9px 14px;
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  border: 1.5px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
  color: var(--fz-orange);
  border-radius: 8px;
  font-size: calc(0.85rem * var(--athlete-font-scale, 1));
  font-weight: 750;
  cursor: pointer;
  transition: all 0.15s ease;
}

.athlete-cardio-btn:hover,
.athlete-cardio-btn:active {
  background: var(--fz-orange);
  color: #ffffff;
}

.athlete-set-single-num {
  font-size: calc(1.15rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.athlete-set-check {
  font-size: calc(0.85rem * var(--athlete-font-scale, 1));
  font-weight: 800;
}

.athlete-set-num {
  font-size: calc(0.65rem * var(--athlete-font-scale, 1));
  font-weight: 650;
  opacity: 0.9;
}

/* Floating Rest Timer HUD - ONLY 3D Letters in Bottom-Left Corner (Zero Tab Behind, Zero Tab Below) */
.athlete-timer-hud {
  position: fixed;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  left: max(16px, calc(50% - 320px + 16px));
  right: auto;
  z-index: 998;
  pointer-events: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  max-width: 420px;
  /* Apple Fluid Spring Physics (Stesso stile dinamico della tab inferiore) */
  transition: bottom 0.45s cubic-bezier(0.34, 1.35, 0.64, 1), transform 0.45s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.athlete-viewport.has-active-timer {
  padding-bottom: 120px !important;
}

.athlete-timer-3d-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: auto;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  width: auto !important;
}

/* Solo le lettere del timer in 3D: ZERO tab sotto, ZERO tab dietro, ZERO sfondo */
.athlete-timer-3d-trigger,
.athlete-timer-glass-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 4px !important;
  margin: 0 !important;
  width: max-content;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transform-origin: bottom left;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
  transition: transform 0.45s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.athlete-timer-3d-trigger:active {
  transform: translateY(2px) scale(0.96);
}

/* Quando si scorre in basso: il timer diventa un filo piu piccolo e si posiziona un filo piu in basso */
.athlete-timer-hud.timer-scrolled-down:not(.is-expired) {
  bottom: calc(66px + env(safe-area-inset-bottom, 0px));
}

.athlete-timer-hud.timer-scrolled-down:not(.is-expired) .athlete-timer-digits-3d {
  transform: skewX(-6deg) scale(0.85);
  opacity: 0.92;
}

/* Quando si scorre verso l'alto o termina: ritorna di dimensioni normali */
.athlete-timer-hud.is-expired {
  bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
}

.athlete-timer-hud.is-expired .athlete-timer-digits-3d,
.athlete-timer-hud.is-alarm-ringing .athlete-timer-digits-3d {
  transform: skewX(-6deg) scale(1.06) !important;
  opacity: 1 !important;
  animation: timerExpiredBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes timerExpiredBounce {
  0% { transform: skewX(-6deg) scale(0.85); }
  60% { transform: skewX(-6deg) scale(1.15); }
  100% { transform: skewX(-6deg) scale(1.06); }
}

.athlete-timer-digits-3d {
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  font-size: 2.35rem;
  font-weight: 900;
  font-style: italic;
  color: #ff6b00;
  letter-spacing: 2px;
  line-height: 1;
  transform: skewX(-6deg) scale(1);
  transform-origin: bottom left;
  display: inline-block;
  /* Effetto 3D e sfumato di nero direttamente sulle lettere, nessun box */
  text-shadow:
    0 1px 0 #cc5200,
    0 2px 0 #b34400,
    0 3px 0 #8c3200,
    0 4px 0 #662200,
    0 5px 1px rgba(0, 0, 0, 0.8),
    0 6px 14px rgba(0, 0, 0, 0.95),
    0 0 16px rgba(0, 0, 0, 0.9);
  /* Stesso stile fluido Apple con molla */
  transition: transform 0.45s cubic-bezier(0.34, 1.35, 0.64, 1), opacity 0.35s ease;
}

body.light-theme .athlete-timer-digits-3d {
  color: #ea580c;
  text-shadow:
    0 1px 0 #ffffff,
    0 2px 0 #fed7aa,
    0 3px 0 #c2410c,
    0 4px 1px rgba(0, 0, 0, 0.25),
    0 6px 12px rgba(0, 0, 0, 0.2);
}

/* X rossa per fermare il suono dell'allarme (solo logo/icona X, nessuna pallina o cerchio) */
.btn-timer-stop-sound {
  width: auto;
  height: auto;
  min-width: 24px;
  min-height: 24px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #ef4444;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  flex-shrink: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: stopIconPulse 0.85s infinite alternate;
}

.btn-timer-stop-sound svg {
  display: block;
  width: 24px;
  height: 24px;
  stroke: #ef4444;
  stroke-width: 3.5;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.9)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95));
  transition: transform 0.15s ease;
}

.btn-timer-stop-sound:hover svg {
  transform: scale(1.2);
  stroke: #ff5555;
  filter: drop-shadow(0 0 12px rgba(239, 68, 68, 1)) drop-shadow(0 2px 6px rgba(0, 0, 0, 1));
}

.btn-timer-stop-sound:active svg {
  transform: scale(0.92);
}

/* Mostra garantita del tasto X rossa quando il timer e scaduto o sta suonando */
.athlete-timer-hud.is-expired #athlete-timer-stop-sound,
.athlete-timer-hud.is-alarm-ringing #athlete-timer-stop-sound {
  display: inline-flex !important;
}

@keyframes stopIconPulse {
  0% { transform: scale(0.92); filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.7)); }
  100% { transform: scale(1.14); filter: drop-shadow(0 0 14px rgba(239, 68, 68, 1)); }
}

/* Quando l'allarme sta suonando */
.athlete-timer-hud.is-alarm-ringing .athlete-timer-digits-3d {
  color: #ef4444;
  text-shadow:
    0 1px 0 #b91c1c,
    0 2px 0 #991b1b,
    0 3px 0 #7f1d1d,
    0 4px 1px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(239, 68, 68, 0.9);
  animation: timerDigitsAlarmPulse 0.8s infinite alternate;
}

@keyframes timerDigitsAlarmPulse {
  0% { transform: skewX(-6deg) scale(1); }
  100% { transform: skewX(-6deg) scale(1.06); }
}

/* Tab Impostazioni: appare sotto solo al click sul timer */
.athlete-timer-drawer {
  position: relative;
  width: calc(100vw - 28px);
  max-width: 380px;
  background: rgba(18, 18, 22, 0.96);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1.5px solid rgba(255, 107, 0, 0.40);
  border-top: 1.5px solid rgba(255, 160, 60, 0.70);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 107, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  padding: 12px 14px;
  margin-top: 10px;
  box-sizing: border-box;
  animation: drawerSlideUp 0.3s cubic-bezier(0.34, 1.35, 0.64, 1);
}

@keyframes drawerSlideUp {
  0% { opacity: 0; transform: translateY(10px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.athlete-timer-hud.is-collapsed .athlete-timer-drawer {
  display: none !important;
}

.athlete-timer-hud.is-expanded .athlete-timer-drawer {
  display: block !important;
}

body.light-theme .athlete-timer-drawer {
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid rgba(255, 107, 0, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.athlete-timer-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .athlete-timer-drawer-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.atd-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--fz-orange);
}

.atd-btn-collapse {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.light-theme .atd-btn-collapse {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.atd-btn-collapse:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* Action buttons inside drawer */
.athlete-timer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.athlete-timer-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}

body.light-theme .athlete-timer-progress {
  background: rgba(0, 0, 0, 0.1);
}

.athlete-timer-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b00, #ff9248);
  width: 100%;
  transition: width 0.4s linear;
}

.btn-timer-mod {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-timer-primary {
  background: var(--fz-orange);
  border: 1px solid var(--fz-orange);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-timer-auto {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.16);
  border: 1.5px solid var(--fz-orange);
  color: var(--fz-orange);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-timer-auto.off {
  background: var(--bg-tertiary);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

body.light-theme .btn-timer-auto {
  background: #fff7ed;
  border-color: var(--fz-orange-hover);
  color: var(--fz-orange-hover);
}

body.light-theme .btn-timer-auto.off {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

.btn-timer-sound {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.16);
  border: 1.5px solid var(--fz-orange);
  color: var(--fz-orange);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-timer-sound.off {
  background: var(--bg-tertiary);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

body.light-theme .btn-timer-sound {
  background: #fff7ed;
  border-color: var(--fz-orange-hover);
  color: var(--fz-orange-hover);
}

body.light-theme .btn-timer-sound.off {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

.btn-timer-close {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-timer-alarm {
  background: rgba(139, 92, 246, 0.16);
  border: 1.5px solid #8b5cf6;
  color: #c4b5fd;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-timer-alarm:hover {
  background: rgba(139, 92, 246, 0.28);
  border-color: #a78bfa;
}

body.light-theme .btn-timer-alarm {
  background: #f5f3ff;
  border-color: #7c3aed;
  color: #6d28d9;
}

/* Sound Picker Modal Styles */
.athlete-sound-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.8rem 0;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}

.athlete-sound-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.athlete-sound-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.athlete-sound-option.active {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.14);
  border-color: var(--fz-orange);
}

body.light-theme .athlete-sound-option {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .athlete-sound-option:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

body.light-theme .athlete-sound-option.active {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.08);
  border-color: var(--fz-orange-hover);
}

.athlete-sound-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.athlete-sound-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

body.light-theme .athlete-sound-title {
  color: #0f172a;
}

.athlete-sound-option.active .athlete-sound-title {
  color: var(--fz-orange);
}

.athlete-sound-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.athlete-sound-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sound-preview {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sound-preview:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

body.light-theme .btn-sound-preview {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #1e293b;
}

.athlete-sound-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.athlete-sound-option.active .athlete-sound-radio {
  border-color: var(--fz-orange);
  background: var(--fz-orange);
}

.athlete-sound-radio-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  display: none;
}

.athlete-sound-option.active .athlete-sound-radio-dot {
  display: block;
}

/* Athlete Exercise Header Actions & Notes */
.athlete-ex-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.athlete-notes-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: calc(0.75rem * var(--athlete-font-scale, 1));
  font-weight: 750;
  cursor: pointer;
  transition: all 0.15s ease;
}

.athlete-notes-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.athlete-notes-btn.has-note {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.14);
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
  color: var(--fz-orange);
}

body.light-theme .athlete-notes-btn.has-note {
  background: #fff7ed;
  border-color: var(--fz-orange-hover);
  color: var(--fz-orange-hover);
}

.athlete-user-note-preview {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.06);
  border: 1px dashed rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
  border-radius: 9px;
  padding: 8px 12px;
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.athlete-user-note-preview:hover {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.10);
}

body.light-theme .athlete-user-note-preview {
  background: #fffbf5;
  border-color: var(--fz-orange-hover);
}

.athlete-user-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.athlete-user-note-tag {
  font-size: calc(0.64rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: var(--fz-orange);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

body.light-theme .athlete-user-note-tag {
  color: var(--fz-orange-hover);
}

.athlete-user-note-edit {
  font-size: calc(0.64rem * var(--athlete-font-scale, 1));
  font-weight: 700;
  color: var(--text-muted);
}

.athlete-user-note-body {
  font-size: calc(0.82rem * var(--athlete-font-scale, 1));
  color: var(--text-primary);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Box Risposta / Consiglio Coach sull'Esercizio */
.athlete-coach-advice-box {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-left: 3.5px solid #8b5cf6;
  border-radius: 9px;
  padding: 10px 12px;
  margin-top: 0.55rem;
  margin-bottom: 0.55rem;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.08);
}

body.light-theme .athlete-coach-advice-box {
  background: #f5f3ff;
  border-color: #8b5cf6;
}

.athlete-coach-advice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.athlete-coach-advice-badge {
  font-size: calc(0.66rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: #a78bfa;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.light-theme .athlete-coach-advice-badge {
  color: #7c3aed;
}

.athlete-coach-advice-date {
  display: none !important;
}

.athlete-coach-advice-body {
  font-size: calc(0.82rem * var(--athlete-font-scale, 1));
  color: var(--text-primary);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Notifica pulsante Note con risposta coach */
.athlete-notes-btn.has-coach-reply {
  background: rgba(139, 92, 246, 0.18) !important;
  border-color: #8b5cf6 !important;
  color: #c4b5fd !important;
  font-weight: 800 !important;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.35);
  animation: coachReplyPulse 2.5s infinite ease-in-out;
}

@keyframes coachReplyPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 0 14px rgba(139, 92, 246, 0.65); border-color: #a78bfa; }
}

body.light-theme .athlete-notes-btn.has-coach-reply {
  background: #ede9fe !important;
  border-color: #7c3aed !important;
  color: #6d28d9 !important;
}

/* Modale Callout Consiglio Coach */
.modal-coach-advice-callout {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-left: 3px solid #8b5cf6;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.modal-coach-advice-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.modal-coach-advice-text {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Modale Note Personali */
.athlete-notes-modal-card {
  max-width: 420px;
  width: 90%;
  padding: 1.5rem;
  border-radius: 16px;
  background: #111114;
  border: 1.5px solid var(--fz-orange);
  box-shadow: 0 8px 32px rgba(var(--fz-orange-rgb, 255,107,0), 0.25), 0 4px 20px rgba(0, 0, 0, 0.8);
}

body.light-theme .athlete-notes-modal-card {
  background: #ffffff;
  border-color: var(--fz-orange-hover);
  box-shadow: 0 8px 30px rgba(234, 88, 12, 0.25);
}

.athlete-notes-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.athlete-notes-modal-title {
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--fz-orange);
  line-height: 1.2;
}

body.light-theme .athlete-notes-modal-title {
  color: var(--fz-orange-hover);
}

.athlete-notes-modal-subtitle {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.athlete-notes-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  margin-bottom: 1rem;
  transition: border-color 0.15s ease;
}

.athlete-notes-textarea:focus {
  border-color: var(--fz-orange);
}

body.light-theme .athlete-notes-textarea {
  background: #f8fafc;
}

body.light-theme .athlete-notes-textarea:focus {
  border-color: var(--fz-orange-hover);
}

.athlete-notes-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-notes-save {
  width: 100%;
  padding: 12px;
  background: var(--fz-orange);
  border: none;
  border-radius: 10px;
  color: #000000;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
  transition: all 0.15s ease;
}

.btn-notes-save:hover {
  background: #ffa040;
}

.btn-notes-delete {
  width: 100%;
  padding: 9px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  color: #ef4444;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.athlete-timer-progress {
  max-width: 640px;
  margin: 6px auto 0;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}

.athlete-timer-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--fz-orange), #10b981);
  transition: width 0.3s linear;
}

/* Share Modal Styling */
.athlete-share-card {
  max-width: 480px;
  width: 92%;
  padding: 1.5rem;
}

.share-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.share-qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
}

.share-qrcode-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.share-qrcode-box img,
.share-qrcode-box canvas {
  width: 280px;
  height: 280px;
  max-width: 100%;
  display: block;
}

.share-qr-hint {
  font-size: 0.75rem;
  color: #475569;
  margin-top: 8px;
  font-weight: 600;
  text-align: center;
}

.share-link-section {
  display: flex;
  flex-direction: column;
}

.share-input-group {
  display: flex;
  gap: 0.4rem;
}

.share-input-group input {
  flex: 1;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  padding: 0.5rem 0.65rem;
}

.share-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-whatsapp {
  background: #25D366 !important;
  color: #ffffff !important;
  border-color: #25D366 !important;
  font-weight: 700;
  text-align: center;
  display: block;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.btn-whatsapp:hover {
  background: #1eb954 !important;
  border-color: #1eb954 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Athlete Weeks Selection & History (Minimal Style)
   ========================================================================== */
.athlete-weeks-section {
  margin-top: 1.6rem;
  margin-bottom: 2rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.2rem;
}

.athlete-week-archive-banner {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
}
.athlete-week-archive-banner.incomplete {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}
body.light-theme .athlete-week-archive-banner.incomplete {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.athlete-week-archive-text {
  font-size: calc(0.82rem * var(--athlete-font-scale, 1));
  font-weight: 700;
  color: #34d399;
}
.athlete-week-archive-banner.incomplete .athlete-week-archive-text {
  color: var(--text-muted, #71717a);
}
  text-align: center;
}

.btn-archive-week {
  background: #059669;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: calc(0.8rem * var(--athlete-font-scale, 1));
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.btn-archive-week:active {
  background: #047857;
}

.athlete-weeks-bar {
  background: #141417;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

body.light-theme .athlete-weeks-bar {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.athlete-weeks-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  text-align: left;
  gap: 0.6rem;
}

.athlete-weeks-btn-title {
  font-size: calc(0.88rem * var(--athlete-font-scale, 1));
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.athlete-weeks-badge {
  font-size: calc(0.72rem * var(--athlete-font-scale, 1));
  color: var(--text-muted);
  font-weight: 600;
  margin-left: auto;
}

.athlete-weeks-chevron {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  display: inline-block;
}

.athlete-weeks-chevron.open {
  transform: rotate(180deg);
}

.athlete-weeks-dropdown {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.2);
}

body.light-theme .athlete-weeks-dropdown {
  border-top-color: rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.02);
}

.athlete-weeks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

@media (min-width: 480px) {
  .athlete-weeks-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.athlete-week-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.athlete-week-chip.completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.athlete-week-chip.current {
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
}

.athlete-week-chip-title {
  font-size: calc(0.82rem * var(--athlete-font-scale, 1));
  font-weight: 750;
  letter-spacing: 0.2px;
}

.athlete-week-chip-status {
  font-size: calc(0.68rem * var(--athlete-font-scale, 1));
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 600;
}

.athlete-week-chip.completed .athlete-week-chip-status {
  color: #34d399;
}

.athlete-week-chip.current .athlete-week-chip-status {
  color: var(--fz-orange);
}

/* History Week Detail View (data, settimana, esercizio e peso sotto) */
.athlete-week-history-view {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.2rem;
}

.athlete-week-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
  padding: 0 2px;
  gap: 0.75rem;
}

.athlete-week-history-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.athlete-week-history-title {
  font-size: calc(1.05rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: var(--text-primary);
  letter-spacing: 0.4px;
}

.athlete-week-history-date {
  font-size: calc(0.75rem * var(--athlete-font-scale, 1));
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.athlete-week-history-back-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: calc(0.76rem * var(--athlete-font-scale, 1));
  font-weight: 700;
  cursor: pointer;
}

.athlete-week-history-day {
  margin-bottom: 1.3rem;
}

.athlete-week-history-day-title {
  font-size: calc(0.85rem * var(--athlete-font-scale, 1));
  font-weight: 800;
  color: var(--fz-orange);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.65rem;
  padding-left: 2px;
}

.athlete-week-history-ex-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.athlete-week-history-ex-card {
  background: #141417;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 0.85rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body.light-theme .athlete-week-history-ex-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.athlete-week-history-ex-name {
  font-size: calc(0.92rem * var(--athlete-font-scale, 1));
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  letter-spacing: 0.2px;
}

.athlete-week-history-weights-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.athlete-week-history-set-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 7px;
  min-width: 58px;
}

body.light-theme .athlete-week-history-set-pill {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.athlete-week-history-set-pill small {
  font-size: calc(0.6rem * var(--athlete-font-scale, 1));
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

.athlete-week-history-set-pill b {
  font-size: calc(0.92rem * var(--athlete-font-scale, 1));
  font-weight: 900;
  color: var(--text-primary);
  font-style: italic;
  transform: skewX(-7deg);
  display: inline-block;
}

.athlete-week-history-set-pill b small {
  font-size: 0.68em;
  margin-left: 1px;
  color: var(--text-muted);
  font-style: normal;
}

/* ==========================================================================
   ATHLETE SMARTPHONE APP NAVIGATION (APPLE-STYLE FLOATING FROSTED GLASS PILL)
   ========================================================================== */
.athlete-bottom-nav {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) scale(1);
  transform-origin: bottom center;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 55px;
  padding: 5px 8px;
  border-radius: 9999px;
  /* Apple Liquid Frosted Glass (Trasparente, stile vetro ultra-pulito) */
  background: rgba(14, 14, 18, 0.28);
  backdrop-filter: blur(36px) saturate(220%) contrast(105%);
  -webkit-backdrop-filter: blur(36px) saturate(220%) contrast(105%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 1.5px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.50), 0 6px 16px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.32), inset 0 -1px 2px rgba(0, 0, 0, 0.30);
  box-sizing: border-box;
  max-width: calc(100vw - 32px);
  width: auto;
  margin: 0 auto;
  /* Apple Fluid Spring Physics */
  transition: transform 0.45s cubic-bezier(0.34, 1.35, 0.64, 1), bottom 0.45s cubic-bezier(0.34, 1.35, 0.64, 1), opacity 0.35s ease, padding 0.4s cubic-bezier(0.34, 1.35, 0.64, 1), height 0.4s cubic-bezier(0.34, 1.35, 0.64, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Scroll down state: shrinks smoothly into a more compact pill with Apple bounce */
.athlete-bottom-nav.nav-scrolled-down {
  transform: translateX(-50%) scale(0.88);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  opacity: 0.92;
  padding: 3px 6px;
  height: 46px;
  background: rgba(14, 14, 18, 0.38);
}

body.light-theme .athlete-bottom-nav {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-top: 1.5px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.10), 0 6px 16px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 0.95);
}

.abn-item {
  height: 44px;
  min-width: 52px;
  padding: 0 16px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color 0.25s ease, transform 0.2s cubic-bezier(0.34, 1.35, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.abn-item:hover {
  color: #ffffff;
}

.abn-item:active {
  transform: scale(0.92);
}

.abn-item.active {
  color: #ffffff;
}

body.light-theme .abn-item {
  color: #64748b;
}

body.light-theme .abn-item:hover,
body.light-theme .abn-item.active {
  color: #0f172a;
}

/* Pillola Dinamica Scorrevole Fluida Apple-Style con Spostamento Visibile, Micro-Zoom e Drag */
.abn-slider-pill {
  position: absolute;
  top: 5px;
  left: 0;
  height: 44px;
  pointer-events: none;
  z-index: 1;
  transform: translate3d(0, 0, 0);
  transform-origin: center center;
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s ease;
  will-change: transform, width;
}

/* Bolla in vetro liquido: gestisce lo stile visivo e il micro-zoom indipendente dalla traslazione */
.abn-slider-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top: 1.5px solid rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.38), 0 4px 14px rgba(0, 0, 0, 0.35);
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.5s cubic-bezier(0.34, 1.35, 0.64, 1), background 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

/* Catalog filters and on-demand animation previews stay inside each card. */
.database-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin-top: 16px; }
.database-filters > * { min-width: 0; width: 100%; }
.exercise-catalog-meta { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--text-muted); overflow-wrap: anywhere; }
.exercise-card { min-width: 0; }
.exercise-card-title { overflow-wrap: anywhere; }
.exercise-gif-preview { margin: 10px 0; }
.exercise-gif-preview summary { cursor: pointer; font-size: .82rem; }
.exercise-gif-preview img { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: 8px; margin-top: 8px; background: white; }
.exercise-gif-unavailable, #db-result-count { color: var(--text-muted); font-size: .78rem; }
#db-result-count { margin-top: 12px; }
#db-show-more { margin-top: 20px; }
#db-show-more[hidden] { display: none; }

/* Piccolissimo zoom organico della bolla durante lo spostamento tra pagine */
.abn-slider-pill.is-zooming::before {
  animation: pillGlassZoom 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pillGlassZoom {
  0% { transform: scale(0.94); }
  35% { transform: scale(1.10); }
  70% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

/* Durante il trascinamento fluido col dito da pagina a pagina */
.abn-slider-pill.is-dragging {
  transition: none !important;
}

.abn-slider-pill.is-dragging::before {
  transform: scale(1.08) !important;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.55), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.athlete-bottom-nav.nav-scrolled-down .abn-slider-pill {
  top: 3px;
  height: 38px;
}

body.light-theme .abn-slider-pill::before {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.light-theme .abn-slider-pill.is-dragging::before {
  background: rgba(0, 0, 0, 0.14);
}

.abn-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.abn-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.1;
  fill: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s cubic-bezier(0.34, 1.35, 0.64, 1), stroke 0.2s ease;
}

.abn-item.active .abn-icon {
  stroke: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
  transform: scale(1.06);
}

body.light-theme .abn-icon {
  filter: none;
}

body.light-theme .abn-item.active .abn-icon {
  stroke: #0f172a;
}

.abn-dot {
  position: absolute;
  bottom: -2px;
  right: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid rgba(18, 18, 22, 0.95);
  opacity: 0;
  transform: scale(0);
  transition: all 0.25s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.abn-item.has-unread .abn-dot {
  opacity: 1;
  transform: scale(1);
}

body.light-theme .abn-dot {
  border-color: #ffffff;
}

.athlete-subpage {
  animation: athletePageFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 1rem;
}

@keyframes athletePageFade {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   NOVITÀ SUBPAGE (AGGIORNAMENTI, CORSI SWIPER, PROMOZIONI)
   ========================================================================== */
.athlete-news-header {
  margin: 1.2rem 0 1.25rem;
}

.anh-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
  padding: 3px 8px;
  border-radius: 9999px;
  margin-bottom: 6px;
}

.anh-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: calc(1.32rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: #ffffff !important;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.anh-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: calc(0.92rem * var(--athlete-font-scale, 1));
  color: #ffffff !important;
  opacity: 0.9;
  margin-top: 5px;
  line-height: 1.45;
  font-weight: 500;
}

/* Card Aggiornamento Prossimo Scheda - Minimal Apple Glass */
.athlete-news-update-card {
  background: rgba(18, 18, 22, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 1.25rem;
  margin: 1.5rem 0 2rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

body.light-theme .athlete-news-update-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.anuc-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 0.75rem;
}

.anuc-kicker {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ff8533;
  text-transform: uppercase;
}

.anuc-main-title {
  font-size: calc(1.05rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: #ffffff !important;
  line-height: 1.25;
  letter-spacing: -0.2px;
}

body.light-theme .anuc-main-title {
  color: #0f172a !important;
}

.anuc-text {
  font-size: calc(0.86rem * var(--athlete-font-scale, 1));
  color: #f8fafc !important;
  line-height: 1.5;
  margin-bottom: 0.95rem;
  font-weight: 400;
}

.anuc-text b {
  color: #ffffff !important;
  font-weight: 750;
}

body.light-theme .anuc-text {
  color: #1e293b !important;
}

body.light-theme .anuc-text b {
  color: #0f172a !important;
}

.anuc-cycle-status {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.95rem;
}

body.light-theme .anuc-cycle-status {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.anuc-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff !important;
  margin-bottom: 0.55rem;
  letter-spacing: 0.2px;
}

body.light-theme .anuc-status-row {
  color: #0f172a !important;
}

.anuc-status-pill {
  font-size: 0.78rem;
  font-weight: 850;
  color: #ffffff !important;
  letter-spacing: 0.3px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

body.light-theme .anuc-status-pill {
  color: #0f172a !important;
}

.anuc-cycle-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 3px;
  overflow: hidden;
}

.anuc-cycle-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fz-orange), #10b981);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.anuc-advice {
  font-size: calc(0.82rem * var(--athlete-font-scale, 1));
  color: #f1f5f9 !important;
  line-height: 1.45;
  margin-bottom: 1rem;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--fz-orange);
  border-radius: 0 8px 8px 0;
}

.anuc-advice b {
  color: #ffffff !important;
  font-weight: 750;
}

body.light-theme .anuc-advice {
  color: #334155 !important;
  background: rgba(0, 0, 0, 0.03);
}

body.light-theme .anuc-advice b {
  color: #0f172a !important;
}

.anuc-btn-coach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #25D366;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 850;
  font-size: 0.84rem;
  padding: 0.72rem 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  transition: all 0.15s ease;
}

.anuc-btn-coach:active {
  transform: scale(0.97);
}

/* ==========================================================================
   3D SWIPEABLE CARD DECK (CORSI FITNESS ZONE - STILE FOTO 1)
   ========================================================================== */
.athlete-deck-section {
  margin: 1.25rem 0 2rem;
}

.ads-header {
  margin-bottom: 1rem;
  text-align: center;
}

.ads-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: calc(1.58rem * var(--athlete-font-scale, 1));
  font-weight: 900;
  color: #ffffff !important;
  letter-spacing: -0.4px;
  margin: 0;
  line-height: 1.2;
}

.deck-wrapper {
  position: relative;
  width: calc(100% - 20px);
  max-width: 350px;
  height: 520px;
  margin: 0.75rem auto 1.5rem;
  perspective: 1000px;
  user-select: none;
  touch-action: pan-y;
}

.deck-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.deck-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: rgba(18, 18, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, border-color 0.3s ease;
  will-change: transform, opacity;
  cursor: grab;
}

.deck-card:active {
  cursor: grabbing;
}

body.light-theme .deck-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.deck-card.card-active {
  z-index: 10;
  transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  opacity: 1;
  pointer-events: auto;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.75), 0 0 14px rgba(255, 255, 255, 0.06);
}

.deck-card.card-next {
  z-index: 9;
  transform: translate3d(18px, 10px, 0) scale(0.96) rotate(3.6deg);
  opacity: 0.94;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 16px rgba(255, 255, 255, 0.09);
}

.deck-card.card-next-2 {
  z-index: 8;
  transform: translate3d(32px, 20px, 0) scale(0.91) rotate(6.8deg);
  opacity: 0.84;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.75);
}

.deck-card.card-hidden {
  z-index: 5;
  transform: translate3d(44px, 28px, 0) scale(0.88) rotate(9.5deg);
  opacity: 0;
  pointer-events: none;
}

.deck-card-image-wrap {
  position: relative;
  width: calc(100% - 16px);
  margin: 9px auto 0;
  height: 298px;
  border-radius: 18px;
  overflow: hidden;
  background: #09090b;
}

.deck-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.deck-card-img-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35px;
  background: linear-gradient(to top, rgba(18, 18, 22, 0.7) 0%, transparent 100%);
  pointer-events: none;
}

body.light-theme .deck-card-img-gradient {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.7) 0%, transparent 100%);
}

.deck-card-body {
  padding: 0.85rem 1.05rem 1.05rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 0.65rem;
}

.deck-card-desc {
  font-size: calc(1.02rem * var(--athlete-font-scale, 1));
  color: #ffffff !important;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

body.light-theme .deck-card-desc {
  color: #0f172a !important;
  text-shadow: none;
  font-weight: 600;
}

.btn-deck-trial-book {
  margin-top: 0.75rem;
  width: 100%;
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 4px 16px rgba(var(--fz-orange-rgb, 255,107,0), 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-deck-trial-book:hover {
  background: var(--fz-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--fz-orange-rgb, 255,107,0), 0.48);
}

.btn-deck-trial-book:active {
  transform: scale(0.97);
}

/* ==========================================================================
   MODALE PRENOTAZIONE LEZIONE PROVA CORSI (MOBILE FIRST)
   ========================================================================== */
.athlete-booking-modal-card {
  max-width: 440px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  background: #141418;
  border: 1.5px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7);
  padding: 1.25rem;
  color: var(--text-primary);
}

body.light-theme .athlete-booking-modal-card {
  background: #ffffff;
  border-color: var(--fz-orange-hover);
  box-shadow: 0 20px 48px rgba(234, 88, 12, 0.18);
}

.tbm-header-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tbm-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1.5px solid var(--fz-orange);
  flex-shrink: 0;
}

.tbm-titles {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tbm-kicker {
  font-size: 0.62rem;
  font-weight: 850;
  color: var(--fz-orange);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.tbm-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
}

.tbm-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.tbm-section-label {
  font-size: 0.72rem;
  font-weight: 850;
  color: var(--fz-orange);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tbm-slots-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.tbm-slot-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 750;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tbm-slot-pill.active {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.2);
  border-color: var(--fz-orange);
  color: #ff8533;
  box-shadow: 0 0 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
}

.tbm-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.tbm-date-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.6rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tbm-date-card.active {
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.22);
  border-color: var(--fz-orange);
  box-shadow: 0 2px 12px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

.tbm-dc-day {
  font-size: 0.62rem;
  font-weight: 850;
  color: var(--text-muted);
  text-transform: uppercase;
}

.tbm-date-card.active .tbm-dc-day {
  color: #ff8533;
}

.tbm-dc-num {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
}

.tbm-date-card.active .tbm-dc-num {
  color: #ffffff;
}

.tbm-dc-time {
  font-size: 0.64rem;
  font-weight: 750;
  color: var(--fz-orange);
}

.tbm-input-group {
  margin-bottom: 0.85rem;
}

.tbm-input-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}

.tbm-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

body.light-theme .tbm-input {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.tbm-input:focus {
  border-color: var(--fz-orange);
}

.tbm-btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
  transition: all 0.15s ease;
  margin-top: 0.5rem;
}

.tbm-btn-submit:active {
  transform: scale(0.98);
}


/* ==========================================================================
   BANNER PUBBLICITÀ RETTANGOLARI (PROMOZIONI SOCI)
   ========================================================================== */
.athlete-banners-section {
  margin: 1.75rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.abs-header {
  margin-bottom: 0.65rem;
}

.abs-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: calc(1.32rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: #ffffff !important;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.abs-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: calc(0.92rem * var(--athlete-font-scale, 1));
  color: #ffffff !important;
  opacity: 0.9;
  margin-top: 5px;
  line-height: 1.45;
  font-weight: 500;
}

.athlete-promo-banner {
  border-radius: 14px;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  overflow: hidden;
}

.banner-gradient-orange {
  background: linear-gradient(135deg, rgba(var(--fz-orange-rgb, 255,107,0), 0.15) 0%, rgba(20, 20, 24, 0.9) 100%);
  border-left: 4px solid var(--fz-orange);
}

.banner-gradient-dark {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(20, 20, 24, 0.9) 100%);
  border-left: 4px solid #3b82f6;
}

.banner-gradient-blue {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(20, 20, 24, 0.9) 100%);
  border-left: 4px solid #10b981;
}

body.light-theme .athlete-promo-banner {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.apb-badge {
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fz-orange);
}

.banner-gradient-dark .apb-badge {
  color: #60a5fa;
}

.banner-gradient-blue .apb-badge {
  color: #10b981;
}

.apb-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: calc(1.22rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: #ffffff !important;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.apb-text {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: calc(0.98rem * var(--athlete-font-scale, 1));
  color: #ffffff !important;
  opacity: 0.95;
  line-height: 1.5;
  margin: 0;
  font-weight: 550;
}

.apb-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
  gap: 0.5rem;
}

.apb-tag {
  font-size: calc(0.78rem * var(--athlete-font-scale, 1));
  font-weight: 700;
  color: var(--text-muted);
}

.apb-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  text-decoration: none;
  font-size: calc(0.82rem * var(--athlete-font-scale, 1));
  font-weight: 800;
  padding: 0.42rem 0.85rem;
  border-radius: 9999px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

body.light-theme .apb-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a !important;
}

body.light-theme .anh-title,
body.light-theme .ads-title,
body.light-theme .abs-title {
  color: #0f172a !important;
}

body.light-theme .anh-subtitle,
body.light-theme .abs-subtitle {
  color: #475569 !important;
  opacity: 1;
}

body.light-theme .apb-title {
  color: #0f172a !important;
}

body.light-theme .apb-text {
  color: #334155 !important;
  opacity: 1;
}

.apb-btn:active {
  background: var(--fz-orange);
  color: #ffffff !important;
  border-color: var(--fz-orange);
}

/* ==========================================================================
   SEZIONE CALENDARIO EVENTI E SCADENZE (PAGINA NOVITA)
   ========================================================================== */
.athlete-calendar-card {
  background: rgba(18, 18, 22, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.25rem 1.15rem;
  margin: 1.5rem 0 2rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}

body.light-theme .athlete-calendar-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.athlete-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.athlete-calendar-month-title {
  margin: 0;
  color: #ffffff !important;
  font-size: calc(1.12rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  text-transform: capitalize;
  letter-spacing: -0.2px;
}

body.light-theme .athlete-calendar-month-title {
  color: #0f172a !important;
}

.athlete-calendar-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.athlete-calendar-nav-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.athlete-calendar-nav-btn:active {
  transform: scale(0.92);
}

body.light-theme .athlete-calendar-nav-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

body.light-theme .athlete-calendar-nav-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.athlete-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.78rem;
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

body.light-theme .athlete-calendar-weekdays {
  color: #64748b;
}

.athlete-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.athlete-calendar-day {
  padding: 6px 2px;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.athlete-calendar-day:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.athlete-calendar-day:active {
  transform: scale(0.93);
}

.athlete-calendar-day.is-today {
  background-color: rgba(255, 107, 0, 0.18);
  border: 1px solid rgba(255, 107, 0, 0.45);
  font-weight: 850;
  color: var(--fz-orange) !important;
}

body.light-theme .athlete-calendar-day {
  color: #0f172a;
}

body.light-theme .athlete-calendar-day:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .athlete-calendar-day.is-today {
  background-color: rgba(255, 107, 0, 0.14);
  border-color: rgba(255, 107, 0, 0.4);
  color: #c2410c !important;
}

/* Finestra dettagli eventi del giorno e scadenze (Responsive Card Layout) */
.athlete-calendar-events {
  margin-top: 14px;
  padding: 13px 14px;
  background: rgba(18, 18, 22, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

body.light-theme .athlete-calendar-events {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
  gap: 8px;
}

.ace-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 850;
  color: #ffffff;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.light-theme .ace-header-title {
  color: #0f172a;
}

.ace-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #94a3b8;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  line-height: 1;
}

.ace-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

body.light-theme .ace-close-btn {
  background: rgba(0, 0, 0, 0.06);
  color: #64748b;
}

body.light-theme .ace-close-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

.ace-subtitle-text {
  font-size: 0.77rem;
  color: #94a3b8;
  margin-bottom: 9px;
  line-height: 1.35;
}

body.light-theme .ace-subtitle-text {
  color: #64748b;
}

.ace-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  box-sizing: border-box;
}

/* Card strutturata per singola scadenza o evento */
.ace-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

body.light-theme .ace-card {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.ace-card-blue {
  border-left: 3.5px solid #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.ace-card-red {
  border-left: 3.5px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.ace-card-orange {
  border-left: 3.5px solid #ff6b00;
  background: rgba(255, 107, 0, 0.08);
}

.ace-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.ace-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.ace-card-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.light-theme .ace-card-title {
  color: #0f172a;
}

.ace-badge {
  font-size: 0.72rem;
  font-weight: 750;
  padding: 2.5px 8px;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

.ace-badge-blue {
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.24);
}

.ace-badge-red {
  color: #f87171;
  background: rgba(239, 68, 68, 0.24);
}

.ace-badge-orange {
  color: #fb923c;
  background: rgba(255, 107, 0, 0.24);
}

.ace-badge-green {
  color: #34d399;
  background: rgba(16, 185, 129, 0.24);
}

.ace-badge-amber {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.24);
}

.ace-badge-muted {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.18);
}

.ace-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.ace-card-date-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.81rem;
  color: #cbd5e1;
  flex-wrap: wrap;
}

body.light-theme .ace-card-date-row {
  color: #334155;
}

.ace-card-date-label {
  font-weight: 500;
  color: #94a3b8;
}

body.light-theme .ace-card-date-label {
  color: #64748b;
}

.ace-card-date-val {
  font-weight: 750;
  color: #ffffff;
}

body.light-theme .ace-card-date-val {
  color: #0f172a;
}

.ace-card-desc {
  font-size: 0.77rem;
  color: #94a3b8;
  line-height: 1.4;
  word-break: break-word;
}

body.light-theme .ace-card-desc {
  color: #64748b;
}

.ace-card-status-text {
  font-size: 0.76rem;
  font-weight: 700;
  margin-top: 1px;
}

/* ==========================================================================
   LEGENDA PALLINI CALENDARIO (BLU, ROSSO, ARANCIO)
   ========================================================================== */
.athlete-calendar-legend {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .athlete-calendar-legend {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.acl-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.acl-title {
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--fz-orange);
}

.acl-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

body.light-theme .acl-subtitle {
  color: #64748b;
}

.acl-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 520px) {
  .acl-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

.acl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.acl-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.acl-item:active {
  transform: scale(0.98);
}

body.light-theme .acl-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .acl-item:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}

.acl-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.acl-dot-blue {
  background: #2563eb;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.65);
}

.acl-dot-red {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.65);
}

.acl-dot-orange {
  background: #ff6b00;
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.65);
}

.acl-item-content {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.acl-dot-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
}

body.light-theme .acl-dot-name {
  color: #0f172a;
}

.acl-dot-desc {
  font-size: 0.74rem;
  color: #cbd5e1;
  font-weight: 500;
}

body.light-theme .acl-dot-desc {
  color: #475569;
}

.acl-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  font-style: italic;
  margin-top: 10px;
  text-align: center;
}

body.light-theme .acl-hint {
  color: #64748b;
}

/* ==========================================================================
   SEZIONE ORARI SALA PESI
   ========================================================================== */
.athlete-hours-section {
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
}

.athlete-hours-card {
  background: rgba(18, 18, 22, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.ahc-main-title {
  font-size: calc(1.4rem * var(--athlete-font-scale, 1));
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 0.9rem;
}

.ahc-title-white {
  color: #ffffff;
}

.ahc-title-orange {
  color: var(--fz-orange);
}

.ahc-timetable {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.ahc-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ahc-time-row:last-child {
  border-bottom: none;
}

.ahc-day-pill {
  background: var(--fz-orange);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 850;
  padding: 3px 11px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  display: inline-block;
}

.ahc-hours-val {
  color: #ffffff;
  font-size: calc(0.95rem * var(--athlete-font-scale, 1));
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.5px;
}

body.light-theme .athlete-hours-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

body.light-theme .ahc-title-white {
  color: #0f172a;
}

body.light-theme .ahc-hours-val {
  color: #0f172a;
}

body.light-theme .ahc-time-row {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   SEZIONE SOCIAL INSTAGRAM FITNESS ZONE
   ========================================================================== */
.athlete-instagram-follow-section {
  margin: 1.4rem 0 0.8rem;
  display: flex;
  flex-direction: column;
}

.athlete-instagram-follow-card {
  background: rgba(18, 18, 22, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aif-header-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.aif-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(253, 29, 29, 0.35);
}

.aif-ig-svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
}

.aif-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aif-title {
  color: #ffffff;
  font-size: calc(1.08rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  letter-spacing: -0.2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aif-subtitle {
  color: rgba(255, 255, 255, 0.72);
  font-size: calc(0.78rem * var(--athlete-font-scale, 1));
  line-height: 1.35;
}

.aif-btn-follow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff !important;
  font-weight: 850;
  font-size: calc(0.92rem * var(--athlete-font-scale, 1));
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
  transition: all 0.2s ease;
  cursor: pointer;
}

.aif-btn-follow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--fz-orange-rgb, 255,107,0), 0.5);
  background: linear-gradient(135deg, #ff7a1a 0%, var(--fz-orange-hover) 100%);
}

.aif-btn-follow:active {
  transform: translateY(0);
}

body.light-theme .athlete-instagram-follow-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

body.light-theme .aif-title {
  color: #0f172a;
}

body.light-theme .aif-subtitle {
  color: #64748b;
}

/* ==========================================================================
   STATISTICHE SUBPAGE (KPI, CRONOLOGIA & REGISTRO PESI)
   ========================================================================== */
.athlete-stats-header {
  margin: 1.2rem 0 1.25rem;
}

.ash-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
  padding: 3px 8px;
  border-radius: 9999px;
  margin-bottom: 6px;
}

.ash-title {
  font-size: calc(1.25rem * var(--athlete-font-scale, 1));
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.ash-subtitle {
  font-size: calc(0.80rem * var(--athlete-font-scale, 1));
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}

.athlete-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.akpi-box {
  background: #141418;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
}

body.light-theme .akpi-box {
  background: #f8fafc;
}

.akpi-val {
  font-size: calc(1.35rem * var(--athlete-font-scale, 1));
  font-weight: 900;
  color: var(--fz-orange);
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  font-style: italic;
  transform: skewX(-7deg);
  display: inline-block;
  line-height: 1.1;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-theme .akpi-val {
  color: var(--fz-orange-hover);
}

.akpi-label {
  font-size: calc(0.68rem * var(--athlete-font-scale, 1));
  font-weight: 750;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.25;
  word-break: break-word;
}

.athlete-stats-card {
  background: #141418;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1rem 0.95rem;
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

body.light-theme .athlete-stats-card {
  background: #ffffff;
}

.asc-title {
  font-size: calc(0.88rem * var(--athlete-font-scale, 1));
  font-weight: 850;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.asc-weights-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.asc-weight-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

body.light-theme .asc-weight-item {
  background: #f8fafc;
}

.asc-weight-name {
  font-size: calc(0.78rem * var(--athlete-font-scale, 1));
  font-weight: 800;
  color: var(--text-primary);
}

.asc-weight-badge {
  font-size: calc(0.85rem * var(--athlete-font-scale, 1));
  font-weight: 900;
  color: var(--fz-orange);
  font-style: italic;
  transform: skewX(-7deg);
  display: inline-block;
}

body.light-theme .asc-weight-badge {
  color: var(--fz-orange-hover);
}

/* ==========================================================================
   MOBILE OPTIMIZATION - PHONE SCREENS (max-width: 600px)
   Full responsive overhaul: header, nav, forms, pills, chips, tables,
   modals (bottom-sheet), touch targets, layout reflow.
   ========================================================================== */

/* --- Hamburger Menu Button (hidden on desktop) --- */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1.5px solid #ffffff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
}

/* --- Global Touch Improvements --- */
@media (max-width: 600px) {

  /* Touch behavior */
  button, .btn, .nav-tab, .day-pill, .duration-pill,
  .injury-chip, .muscle-focus-chip, .preset-tag-btn,
  .category-chip, .prompt-tag, .variant-btn, .variant-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Prevent iOS zoom on focus — all inputs must be 16px+ */
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* --- HEADER --- */
  header {
    padding: 0.5rem 0.75rem;
    flex-wrap: wrap;
    gap: 0.4rem;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .brand {
    padding: 0;
  }
  .header-fz-logo {
    height: 32px;
    max-height: 32px;
  }

  /* --- NAV TABS: horizontal scroll --- */
  .nav-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 0.2rem;
    padding: 3px;
    border-radius: 8px;
  }
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .nav-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.4rem 0.7rem;
    font-size: 0.72rem;
    border-radius: 6px;
    min-height: 36px;
  }

  /* --- HEADER ACTIONS: hamburger dropdown --- */
  .mobile-menu-btn {
    display: inline-flex;
  }

  .header-actions {
    position: relative;
    gap: 0.35rem;
  }

  .header-actions .btn-outline,
  .header-actions #btn-intake-pdf,
  .header-actions #btn-export-xlsx,
  .header-actions #btn-export-numbers {
    display: none;
  }

  .header-actions.mobile-open .btn-outline,
  .header-actions.mobile-open #btn-intake-pdf,
  .header-actions.mobile-open #btn-export-xlsx,
  .header-actions.mobile-open #btn-export-numbers {
    display: flex;
  }

  .header-actions.mobile-open {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
  }

  .header-actions.mobile-open .btn-outline {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 0.85rem 1.2rem;
    font-size: 0.92rem;
    border-radius: 12px;
    background: #18181b;
    color: #fff;
    border-color: #3f3f46;
  }

  .header-actions.mobile-open .theme-toggle-btn {
    position: absolute;
    bottom: 2.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
  }

  .header-actions.mobile-open .mobile-menu-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
  }

  /* --- MAIN CONTAINER --- */
  main {
    padding: 0.65rem 0.5rem;
  }

  /* --- PANELS --- */
  .panel {
    padding: 0.75rem;
    border-radius: 10px;
  }
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
  }
  .panel-header .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.78rem;
  }
  .panel-title {
    font-size: 0.72rem;
  }

  /* --- FORM GRID: single column --- */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  label {
    font-size: 0.7rem;
  }

  input[type="text"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
  }

  textarea {
    min-height: 60px;
  }

  /* --- SEGMENTED CONTROL --- */
  .segmented-control label {
    padding: 0.5rem 0.4rem;
    font-size: 0.78rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* --- DAY PILLS: 3-column grid --- */
  .days-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }
  .day-pill {
    flex: unset;
    min-width: unset;
    padding: 0.55rem 0.3rem;
    font-size: 0.74rem;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* --- DURATION PILLS: 2-column grid --- */
  .duration-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
  }
  .duration-pill {
    flex: unset;
    min-width: unset;
    padding: 0.55rem 0.3rem;
    font-size: 0.72rem;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  /* --- PRESET TAGS: wrap 2-col --- */
  .preset-tags-wrapper {
    padding: 10px;
    border-radius: 8px;
  }
  .preset-tags-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  .preset-tag-btn {
    font-size: 0.68rem;
    padding: 7px 8px;
    text-align: center;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .preset-tags-title {
    font-size: 0.66rem;
  }
  .preset-tags-hint {
    font-size: 0.64rem;
  }

  /* --- INJURY CHIPS: touch-friendly --- */
  .injury-chips-container {
    gap: 0.35rem;
  }
  .injury-chip {
    font-size: 0.7rem;
    padding: 0.45rem 0.65rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  /* --- MUSCLE FOCUS CHIPS: touch-friendly --- */
  .focus-muscle-container {
    gap: 0.35rem;
  }
  .muscle-focus-chip {
    font-size: 0.72rem;
    padding: 0.45rem 0.65rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  /* --- PROMPT TAGS --- */
  .prompt-tags {
    gap: 0.3rem;
  }
  .prompt-tag {
    font-size: 0.68rem;
    padding: 4px 8px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
  }

  /* --- GENERA BUTTON --- */
  .btn-lg {
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
    border-radius: 12px;
    min-height: 50px;
  }

  /* --- CUSTOM SELECT DROPDOWN --- */
  .custom-select-trigger {
    font-size: 16px !important;
    padding: 0.6rem 0.75rem;
    min-height: 44px;
  }
  .custom-select-dropdown {
    max-height: 250px;
  }
  .custom-select-option {
    padding: 10px 12px;
    font-size: 0.82rem;
    min-height: 44px;
  }

  /* ==========================================================================
     EDITOR VIEW (BOZZA SCHEDA) - MOBILE
     ========================================================================== */

  /* Editor header */
  #editor-view > div:first-child {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
  }
  #editor-view > div:first-child > div:last-child {
    width: 100%;
    display: flex;
    gap: 0.4rem;
  }
  #editor-view > div:first-child > div:last-child .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.76rem;
    padding: 0.55rem 0.5rem;
  }
  #active-sheet-heading {
    font-size: 0.95rem !important;
  }

  /* --- VARIANTS BAR --- */
  .variants-bar-container {
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
  }
  .variants-group-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .variants-group-header {
    min-width: unset;
  }
  .variants-group-title {
    font-size: 0.68rem;
  }
  .variants-btn-group {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.3rem;
    padding-bottom: 2px;
  }
  .variants-btn-group::-webkit-scrollbar {
    display: none;
  }
  .variant-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.4rem 0.7rem;
    font-size: 0.72rem;
    min-height: 36px;
  }

  /* --- SHEET TABLE: horizontal scroll --- */
  #sheet-editor-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sheet-header-amos {
    grid-template-columns: 1fr !important;
  }
  .amos-header-center {
    border-right: none;
    border-bottom: 1px solid #3f3f46;
  }
  .amos-header-left {
    border-right: none;
  }
  .amos-subrow {
    grid-template-columns: 60px 1fr 60px 1fr;
    font-size: 0.72rem;
  }

  .sheet-table-amos {
    min-width: 600px;
    font-size: 0.72rem;
  }
  .sheet-table-amos th {
    padding: 6px 5px;
    font-size: 0.6rem;
  }
  .sheet-table-amos td {
    padding: 3px 4px;
    font-size: 0.72rem;
  }
  .sheet-table-amos td.col-ex input.editable-field,
  .exercise-name-input {
    font-size: 0.76rem !important;
    padding: 4px 5px;
  }
  .reps-rest-input,
  .sheet-table-amos td.col-reps input.editable-field,
  .sheet-table-amos td.col-rest input.editable-field {
    font-size: 0.72rem !important;
    padding: 3px 3px;
  }
  .tracking-header-col,
  .tracking-group {
    width: 50px;
    min-width: 45px;
  }

  /* Day section headers in editor */
  .day-section-title,
  .sheet-day-header {
    font-size: 0.85rem;
    padding: 0.5rem 0.6rem;
  }

  /* ==========================================================================
     DATABASE ESERCIZI - MOBILE
     ========================================================================== */

  .database-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .database-header .btn {
    width: 100%;
    justify-content: center;
  }

  .search-box input {
    font-size: 16px !important;
    padding: 0.6rem 0.75rem;
    min-height: 44px;
  }

  /* Category chips: horizontal scroll */
  .category-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-bottom: 1rem;
  }
  .category-chips::-webkit-scrollbar {
    display: none;
  }
  .category-chip {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.4rem 0.7rem;
    font-size: 0.74rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  /* Exercise grid: single column */
  .exercise-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .exercise-card {
    padding: 0.75rem;
  }
  .exercise-card-title {
    font-size: 0.82rem;
  }

  /* ==========================================================================
     ARCHIVIO & OTTIMIZZAZIONE - MOBILE
     ========================================================================== */
  .archive-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .clients-sidebar {
    max-height: 300px;
    padding: 0.75rem;
  }
  .client-list-item {
    padding: 0.6rem 0.75rem;
  }
  .client-item-name {
    font-size: 0.85rem;
  }

  .roadmap-timeline {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .roadmap-card {
    padding: 0.65rem;
  }
  .roadmap-card-title {
    font-size: 0.78rem;
  }
  .roadmap-card-desc {
    font-size: 0.7rem;
  }

  .feedback-box-panel {
    padding: 0.85rem;
  }

  /* ==========================================================================
     MODALS - BOTTOM SHEET STYLE ON MOBILE
     ========================================================================== */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-content {
    max-width: 100%;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 1.25rem 1rem;
    max-height: 88vh;
    animation: slideUpModal 0.25s ease-out;
  }

  @keyframes slideUpModal {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .modal-content .panel-header {
    flex-direction: row;
    align-items: center;
  }

  /* Variants modal */
  .variant-item {
    padding: 0.7rem 0.85rem;
    min-height: 48px;
  }

  /* Intake sheet modal */
  .intake-modal-content {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
  }
  .intake-modal-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
  .intake-layout-selector {
    width: 100%;
    overflow-x: auto;
  }
  .intake-modal-actions {
    width: 100%;
    display: flex;
    gap: 0.4rem;
  }
  .intake-modal-actions .btn {
    flex: 1;
    justify-content: center;
  }

  /* Share modal */
  .athlete-share-card {
    max-width: 100% !important;
    border-radius: 16px 16px 0 0;
  }
  .share-action-buttons {
    flex-direction: column;
    gap: 0.4rem;
  }
  .share-action-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  .share-qrcode-box {
    max-width: 200px;
  }
  .share-input-group {
    flex-direction: column;
    gap: 0.4rem;
  }
  .share-input-group .btn {
    width: 100%;
    justify-content: center;
  }

  /* Custom exercise modal */
  #custom-exercise-modal .form-grid {
    grid-template-columns: 1fr;
  }

  /* ==========================================================================
     ACCESS GATE - MOBILE
     ========================================================================== */
  .fz-gate-card {
    padding: 1.5rem 1.25rem;
    max-width: 100%;
  }
  .fz-gate-btn {
    min-height: 50px;
  }

  /* ==========================================================================
     EDITOR VIEW - ACTION BUTTONS ROW (Bozza header)
     ========================================================================== */
  #editor-view .btn {
    font-size: 0.74rem;
    padding: 0.45rem 0.6rem;
    min-height: 38px;
  }

  /* ==========================================================================
     TOAST CONTAINER - MOBILE
     ========================================================================== */
  .toast-container {
    left: 0.5rem !important;
    right: 0.5rem !important;
    bottom: 0.5rem !important;
  }

  /* ==========================================================================
     SAFETY BANNER - MOBILE
     ========================================================================== */
  .safety-adaptation-banner {
    padding: 0.65rem 0.75rem;
  }
  .safety-banner-header {
    flex-wrap: wrap;
  }

  /* Expiry alert */
  .expiry-alert-banner {
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.76rem;
    padding: 8px 10px;
  }

} /* END @media (max-width: 600px) */

/* ==========================================================================
   TABLET ENHANCEMENTS (601px - 900px)
   ========================================================================== */
@media (min-width: 601px) and (max-width: 900px) {
  .mobile-menu-btn {
    display: none;
  }

  header {
    padding: 0.6rem 1rem;
  }

  main {
    padding: 1rem 1rem;
  }

  .nav-tab {
    font-size: 0.75rem;
    padding: 0.4rem 0.65rem;
  }

  .days-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .day-pill {
    flex: unset;
  }

  .duration-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .duration-pill {
    flex: unset;
  }

  .preset-tags-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }

  .exercise-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .roadmap-timeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   FRECCE SPOSTA SU/GIÙ - Colonna sinistra tabella
   ========================================================================== */
.move-arrows-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.move-arrow-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #71717a);
  font-size: 0.65rem;
  cursor: pointer;
  padding: 1px 6px;
  line-height: 1;
  border-radius: 3px;
  transition: all 0.12s ease;
}

.move-arrow-btn:hover {
  background: var(--accent-color);
  color: #fff;
}

.drag-row-number {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted, #71717a);
  line-height: 1;
}

/* ==========================================================================
   SPLIT PERSONALIZZATA - Selezione gruppi muscolari per giorno
   ========================================================================== */
#custom-split-container {
  margin-top: 0.35rem;
}

.custom-split-toggle-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: #111114;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  outline: none;
  box-sizing: border-box;
}

.custom-split-toggle-btn:hover {
  border-color: #52525b;
  background: #17171b;
}

.custom-split-toggle-btn.open {
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.45);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.04);
}

.cst-title-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.cst-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cst-subtitle {
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.cst-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cst-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}

.cst-status-badge.active {
  color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.14);
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

.cst-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.22s ease, color 0.18s ease;
}

.cst-chevron.open {
  transform: rotate(180deg);
  color: var(--fz-orange);
}

.custom-split-dropdown {
  margin-top: 0.45rem;
  padding: 0.75rem 0.85rem 0.35rem;
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  animation: splitFadeDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes splitFadeDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.light-theme .custom-split-toggle-btn {
  background: #ffffff;
  border-color: #cbd5e1;
}

body.light-theme .custom-split-toggle-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

body.light-theme .custom-split-toggle-btn.open {
  border-color: var(--fz-orange-hover);
  background: rgba(234, 88, 12, 0.04);
}

body.light-theme .cst-title {
  color: #0f172a;
}

body.light-theme .cst-subtitle {
  color: #64748b;
}

body.light-theme .custom-split-dropdown {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .cst-status-badge {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
}

body.light-theme .cst-status-badge.active {
  color: var(--fz-orange-hover);
  background: rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.3);
}

.split-day-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0.75rem;
}

.split-day-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.split-day-letter {
  display: none;
}

.split-day-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.5rem;
  margin-bottom: 0.35rem;
}

.split-day-card:first-child .split-day-label {
  margin-top: 0.15rem;
}

.split-muscle-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.split-muscle-chip {
  flex: 1;
  min-width: 72px;
  text-align: center;
  padding: 0.5rem 0.35rem;
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.split-muscle-chip:hover {
  border-color: var(--fz-orange);
  color: #fff;
}

.split-muscle-chip.selected,
.split-muscle-chip.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff;
  border-color: var(--fz-orange);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

body.light-theme .split-day-card {
  background: transparent;
  border: none;
}

body.light-theme .split-day-label {
  color: #64748b;
}

body.light-theme .split-muscle-chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
}

body.light-theme .split-muscle-chip:hover {
  border-color: var(--fz-orange);
  color: var(--fz-orange-hover);
  background: #fff7ed;
}

body.light-theme .split-muscle-chip.selected,
body.light-theme .split-muscle-chip.active {
  background: linear-gradient(135deg, var(--fz-orange) 0%, var(--fz-orange-hover) 100%);
  color: #ffffff;
  border: 1.5px solid var(--fz-orange);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
}

@media (max-width: 600px) {
  .split-day-card {
    padding: 0;
  }
  .split-muscle-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }
  .split-muscle-chip {
    flex: unset;
    min-width: unset;
    padding: 0.55rem 0.25rem;
    font-size: 0.72rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

/* Athlete Archive Subtabs (Schede, Carichi, Note) */
.athlete-subtabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.btn-athlete-subtab {
  background: transparent;
  border: none;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-athlete-subtab:hover {
  color: var(--text-primary, #f8fafc);
  background: rgba(255, 255, 255, 0.05);
}

.btn-athlete-subtab.active {
  color: var(--fz-orange);
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.12);
  border-bottom: 2px solid var(--fz-orange);
  border-radius: 6px 6px 0 0;
  font-weight: 700;
}

.badge-subtab-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}

/* Athlete Loads (Carichi) Cards & Badges */
.athlete-loads-card {
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.2s ease;
}

.athlete-loads-card:hover {
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
}

.athlete-loads-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.athlete-loads-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
}

.athlete-avg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(var(--fz-orange-rgb, 255,107,0), 0.2) 0%, rgba(234, 88, 12, 0.25) 100%);
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
  color: #ff8c38;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.athlete-sets-history-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.athlete-set-pill {
  display: inline-flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  text-align: center;
}

.athlete-set-pill .set-idx {
  color: var(--text-muted, #64748b);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.athlete-set-pill .set-weight {
  color: var(--text-primary, #f8fafc);
  font-size: 0.8rem;
}

.athlete-set-pill .set-date {
  color: var(--text-muted, #64748b);
  font-size: 0.62rem;
}

/* Athlete Notes Cards & AI Badges */
.athlete-notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.athlete-note-card {
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 1rem;
}

.athlete-note-card.has-issue {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.04);
}

.athlete-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.athlete-note-ex-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
}

.athlete-note-body {
  font-size: 0.85rem;
  color: var(--text-secondary, #cbd5e1);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  border-left: 3px solid var(--fz-orange);
  margin: 0.5rem 0;
  font-style: italic;
}

.athlete-note-card.has-issue .athlete-note-body {
  border-left-color: #ef4444;
}

.badge-note-alert {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.badge-note-positive {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Benchmark Banner for Athlete Player on Mobile / Desktop */
.athlete-benchmark-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.08);
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.25);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin: 0.6rem 0;
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.athlete-benchmark-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(var(--fz-orange-rgb, 255,107,0), 0.2);
  color: #ff8c38;
}

.athlete-benchmark-text {
  flex: 1;
}

.athlete-benchmark-text strong {
  color: #ff8c38;
  font-weight: 700;
}

body.light-theme .athlete-benchmark-banner {
  background: #fff7ed;
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
  color: #334155;
}

body.light-theme .athlete-benchmark-text strong {
  color: #c2410c;
}

body.light-theme .athlete-loads-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-theme .athlete-set-pill {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .athlete-note-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-theme .athlete-note-body {
  background: #f8fafc;
  color: #334155;
}

/* ==========================================================================
   ATHLETE INTERACTIVE ANATOMY BODY MAP & MUSCLE LOADS SYSTEM
   Zero emojis strictly enforced.
   ========================================================================== */
.athlete-anatomy-card {
  position: relative;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.asc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.anatomy-active-name,
.anatomy-active-tag {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fz-orange);
  white-space: nowrap;
}

.muscle-pills-bar {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin: 0.85rem 0 1.15rem 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.muscle-pills-bar::-webkit-scrollbar {
  display: none;
}

.muscle-pill-btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0.42rem 0.85rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.muscle-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.muscle-pill-btn.active {
  background: transparent;
  border-color: var(--fz-orange);
  color: var(--fz-orange);
  font-weight: 800;
}

/* ==========================================================================
   ANATOMY MAP - DUAL BODY (FRONT & BACK) PROFESSIONAL VECTOR STAGE
   Strictly ZERO emojis enforced. Pure black background.
   ========================================================================== */
.athlete-anatomy-stage {
  position: relative;
  background: #000000 !important;
  border-radius: 16px;
  padding: 0.75rem 0.5rem 0.6rem 0.5rem;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(var(--fz-orange-rgb, 255,107,0), 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9), inset 0 0 30px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.anatomy-dual-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  max-width: 360px;
  padding: 0.2rem 0;
  margin: 0 auto;
}

.anatomy-figure-col {
  flex: 1;
  max-width: 165px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.anatomy-svg {
  width: 100%;
  height: auto;
  max-height: 220px;
  display: block;
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.85));
}

.anat-base-part {
  fill: #14171f;
  stroke: #262e3d;
  stroke-width: 1.1px;
}

.muscle-part {
  fill: #191e2a;
  stroke: #2a3447;
  stroke-width: 1.2px;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.muscle-group {
  cursor: pointer;
}

.muscle-group:hover .muscle-part {
  fill: #262f40;
  stroke: #ff9d47;
  stroke-width: 1.4px;
}

/* ILLUMINATED ACTIVE MUSCLE GROUP */
.muscle-group.muscle-active .muscle-part {
  fill: url(#neonGlowFront) !important;
  stroke: #ffab57 !important;
  stroke-width: 1.8px !important;
  filter: drop-shadow(0 0 8px rgba(var(--fz-orange-rgb, 255,107,0), 0.9)) drop-shadow(0 0 16px rgba(255, 85, 0, 0.5));
}

#anatomy-back-col .muscle-group.muscle-active .muscle-part {
  fill: url(#neonGlowBack) !important;
}

.muscle-group.muscle-active {
  animation: neonMusclePulse 2.4s ease-in-out infinite;
}

@keyframes neonMusclePulse {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(var(--fz-orange-rgb, 255,107,0), 0.7));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.95)) drop-shadow(0 0 24px rgba(255, 85, 0, 0.5));
  }
}

.bb-3d-hint {
  font-size: 0.62rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.55rem;
  letter-spacing: 0.02em;
  user-select: none;
}

/* Muscle Load Details Card */
.mld-card {
  background: rgba(16, 20, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.mld-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}

.mld-group-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--fz-orange);
  letter-spacing: -0.01em;
}

.mld-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mld-kpi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mld-kpi-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.mld-kpi-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mld-exercises-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mld-exercise-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  transition: border-color 0.2s ease;
}

.mld-exercise-card:hover {
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.35);
}

.mld-ec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.mld-ec-name {
  font-size: 0.94rem;
  font-weight: 800;
  color: #ffffff;
}

.mld-ec-badge {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--fz-orange);
  white-space: nowrap;
}

.mld-ec-avg {
  font-size: 0.88rem;
  color: #ffffff;
  margin-top: 0.45rem;
  line-height: 1.45;
  font-weight: 600;
}

.mld-ec-avg b {
  color: var(--fz-orange);
  font-weight: 850;
  font-size: 0.95rem;
}

.mld-ec-sets-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.mld-ec-chip {
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.mld-empty-state {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.mld-empty-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.25rem;
}

.mld-empty-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* Light Theme overrides */
body.light-theme .athlete-anatomy-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

body.light-theme .anatomy-svg-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.03);
}

body.light-theme .body-base {
  opacity: 0.35;
}

body.light-theme .body-base ellipse,
body.light-theme .body-base path {
  fill: #e2e8f0;
  stroke: #cbd5e1;
}

body.light-theme .muscle-part {
  fill: #cbd5e1;
  stroke: #94a3b8;
}

body.light-theme .muscle-group:hover .muscle-part {
  fill: #fdba74;
}

body.light-theme .muscle-group.muscle-active .muscle-part {
  fill: var(--fz-orange-hover);
  stroke: #c2410c;
  filter: drop-shadow(0 0 5px rgba(234, 88, 12, 0.6));
}

body.light-theme .muscle-pill-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

body.light-theme .muscle-pill-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.light-theme .muscle-pill-btn.active {
  background: transparent;
  border-color: var(--fz-orange-hover);
  color: var(--fz-orange-hover);
}

body.light-theme .mld-card {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

body.light-theme .mld-group-title {
  color: var(--fz-orange-hover);
}

body.light-theme .anatomy-active-name,
body.light-theme .anatomy-active-tag {
  color: var(--fz-orange-hover);
}

body.light-theme .mld-kpi-row {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-theme .mld-kpi-val {
  color: #0f172a;
}

body.light-theme .mld-exercise-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-theme .mld-ec-name {
  color: #0f172a;
}

body.light-theme .mld-ec-avg {
  color: #0f172a;
}

body.light-theme .mld-ec-avg b {
  color: var(--fz-orange-hover);
}

body.light-theme .mld-ec-chip {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  font-weight: 700;
}

body.light-theme .mld-empty-state {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-theme .mld-empty-title {
  color: #0f172a;
}

@media (max-width: 480px) {
  .anatomy-figures-row {
    gap: 0.75rem;
  }
  .anatomy-figure-col {
    max-width: 145px;
  }
}

/* ==========================================================================
   SEZIONE TOOLS DI ALLENAMENTO - Minimal Apple Style (Zero Emoji)
   ========================================================================== */
/* Athlete Tools Mode & Integration (Matching Scheda & Novità Dimensions) */
.athlete-tools-header {
  margin: 0.75rem 0 1rem;
}

.athlete-tools-header .ash-title {
  margin: 0 0 0.85rem;
}

.tools-module-wrapper.athlete-tools-mode,
#athlete-page-tools .tools-module-wrapper {
  max-width: 100%;
  padding: 0.25rem 0 2rem;
  margin: 0;
}

#athlete-page-tools .tools-segmented-bar {
  display: flex;
  background: #121215;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#athlete-page-tools .tools-segmented-bar::-webkit-scrollbar {
  display: none;
}

#athlete-page-tools .ts-btn {
  flex: 1;
  min-width: 95px;
  padding: 0.52rem 0.65rem;
  border-radius: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.3px;
}

#athlete-page-tools .tools-card-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#athlete-page-tools .tools-card {
  background: #141418;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.1rem 1.15rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  margin-bottom: 0;
}

body.light-theme #athlete-page-tools .tools-card {
  background: #ffffff;
}

#athlete-page-tools .tools-card.tools-card-highlight {
  border-color: rgba(var(--fz-orange-rgb, 255,107,0), 0.28);
}

#athlete-page-tools .tc-hero-number {
  font-size: 2.1rem;
  margin: 0.15rem 0;
}

#athlete-page-tools .tc-barbell-visual {
  height: 48px;
  margin: 0.75rem 0 0.85rem;
}

#athlete-page-tools .timer-digits {
  font-size: 2.9rem;
  letter-spacing: -1px;
}

#athlete-page-tools .timer-display-hero {
  padding: 0.85rem 0.5rem;
}

#athlete-page-tools .timer-presets-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

#athlete-page-tools .timer-presets-row::-webkit-scrollbar {
  display: none;
}

#athlete-page-tools .timer-preset-btn {
  padding: 0.42rem 0.65rem;
  font-size: 0.76rem;
  border-radius: 8px;
  min-width: 48px;
}

#athlete-page-tools .orm-hero-card {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-top: 0.85rem;
}

#athlete-page-tools .orm-hero-value {
  font-size: 2rem;
}

#athlete-page-tools .orm-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
}

#athlete-page-tools .ramp-grid-four {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

#athlete-page-tools .ramp-phase-card {
  background: #141418;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.tools-module-wrapper {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.tools-header-card {
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.tools-badge-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.5rem;
}

.tools-main-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.4rem;
  letter-spacing: -0.5px;
}

.tools-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.45;
}

/* Segmented Control Minimale Apple */
.tools-segmented-bar {
  display: flex;
  background: #121215;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tools-segmented-bar::-webkit-scrollbar {
  display: none;
}

.ts-btn {
  flex: 1;
  min-width: 130px;
  padding: 0.65rem 0.85rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  text-align: center;
}

.ts-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.ts-btn.active {
  background: #27272a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Griglia Cards Tools */
.tools-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .tools-card-grid {
    grid-template-columns: 1fr;
  }
}

.tools-card {
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.4rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.tools-card.tools-card-highlight {
  border-color: rgba(255, 255, 255, 0.12);
  background: #0c0c0e;
}

.tools-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  gap: 0.5rem;
}

.tools-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tools-card-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tools-card-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
}

.tools-card-status.status-ok {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tools-card-status.status-warn {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tools-form-row {
  margin-bottom: 0.85rem;
}

.tools-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Stepper Input Pesi */
.tc-input-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tc-step-btn {
  background: #18181b;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tc-step-btn:hover {
  background: #27272a;
  border-color: #52525b;
}

.tc-weight-input {
  flex: 1;
  min-width: 80px;
  background: #121215;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  padding: 0.5rem 0.6rem;
  outline: none;
}

.tc-weight-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

/* Pill Barbell Selector */
.tc-pills-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tc-pill {
  background: #121215;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.tc-pill:hover {
  color: #ffffff;
  border-color: #52525b;
}

.tc-pill.active {
  background: #27272a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 700;
}

.tools-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

/* Risultato Hero Calcolatore Dischi */
.tc-result-hero {
  text-align: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
}

.tc-hero-sub {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.tc-hero-number {
  font-size: 2.8rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  margin: 0.2rem 0;
}

.tc-hero-unit {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-muted);
}

.tc-hero-summary {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

/* Visual Barbell & Discs */
.tc-barbell-visual {
  display: flex;
  align-items: center;
  height: 90px;
  background: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0 1rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.tc-bar-collar {
  width: 14px;
  height: 48px;
  background: #52525b;
  border-radius: 3px;
  flex-shrink: 0;
}

.tc-bar-sleeve {
  width: 24px;
  height: 22px;
  background: #71717a;
  flex-shrink: 0;
}

.tc-discs-stack {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 100%;
}

.tc-disc-item {
  width: 18px;
  min-height: 28px;
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tc-disc-item.small-disc {
  width: 12px;
  background: #3f3f46;
}

.tc-disc-label {
  font-size: 0.55rem;
  font-weight: 800;
  color: #ffffff;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: -0.5px;
}

.tc-bar-end {
  width: 18px;
  height: 22px;
  background: #52525b;
  border-radius: 0 3px 3px 0;
  flex-shrink: 0;
}

/* Lista Dischi per Lato */
.tc-plates-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tc-plate-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #18181b;
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}

.tc-plate-badge.micro {
  border-color: rgba(255, 255, 255, 0.18);
  background: #1f1f23;
}

.tc-pb-count {
  font-size: 0.85rem;
  font-weight: 900;
  color: #ffffff;
}

.tc-pb-val {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.tc-empty-plates {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem;
}

/* 1RM Hero */
.orm-hero-card {
  background: #121215;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  margin-top: 1.25rem;
}

.orm-hero-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.orm-hero-value {
  font-size: 3rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  margin: 0.3rem 0;
}

.orm-hero-unit {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-muted);
}

.orm-hero-models {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tools-range-slider {
  width: 100%;
  accent-color: #ffffff;
  cursor: pointer;
}

.tools-badge-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
}

/* Tavola Percentuali */
.orm-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}

.orm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.orm-table th {
  text-align: left;
  padding: 0.6rem 0.5rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  border-bottom: 1px solid var(--border-subtle);
}

.orm-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.orm-pct-cell {
  font-weight: 800;
  color: #ffffff;
}

.orm-weight-cell {
  font-weight: 800;
  color: #ffffff;
  font-size: 0.88rem;
}

.orm-reps-cell {
  color: var(--text-secondary);
}

.orm-zone-cell {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.orm-calc-btn {
  background: #18181b;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.orm-calc-btn:hover {
  background: #27272a;
  border-color: #52525b;
}

/* Smart Rest Timer */
.timer-display-hero {
  text-align: center;
  padding: 1.5rem 0 1rem;
}

.timer-digits {
  font-size: 4.5rem;
  font-weight: 900;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  line-height: 1;
}

.timer-digits.secondary {
  font-size: 3.2rem;
  color: #e4e4e7;
}

.timer-status-text {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-top: 0.65rem;
}

.timer-presets-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.timer-preset-btn {
  background: #121215;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.timer-preset-btn:hover {
  color: #ffffff;
  border-color: #52525b;
}

.timer-preset-btn.active {
  background: #27272a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.timer-controls-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.timer-main-btn {
  background: #ffffff;
  color: #09090b;
  border: none;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.16s ease;
}

.timer-main-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.timer-main-btn.running {
  background: #ef4444;
  color: #ffffff;
}

.timer-step-btn {
  background: #18181b;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
}

.timer-step-btn:hover {
  background: #27272a;
}

.timer-reset-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.timer-reset-btn:hover {
  color: #ffffff;
  border-color: #52525b;
}

/* RAMP Warm-Up Section */
.tools-ramp-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tools-card-intro {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.ramp-focus-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.ramp-focus-btn {
  background: #121215;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ramp-focus-btn:hover {
  color: #ffffff;
  border-color: #52525b;
}

.ramp-focus-btn.active {
  background: #27272a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.ramp-active-banner {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.65rem 0.85rem;
  background: #121215;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.ramp-active-banner strong {
  color: #ffffff;
}

.ramp-grid-four {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .ramp-grid-four {
    grid-template-columns: 1fr;
  }
}

.ramp-phase-card {
  background: #09090b;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.2rem;
}

.ramp-phase-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
}

.ramp-phase-letter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ramp-phase-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.ramp-phase-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ramp-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ramp-item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #121215;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ramp-item-row:hover {
  border-color: #52525b;
}

.ramp-item-row.checked {
  opacity: 0.55;
  background: #0a0a0c;
}

.ramp-checkbox {
  margin-top: 3px;
  accent-color: #ffffff;
}

.ramp-item-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
}

.ramp-item-dur {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 6px;
}

.ramp-item-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

/* Guida Biomeccanica */
.bio-quick-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bio-quick-btn {
  background: #121215;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bio-quick-btn:hover {
  color: #ffffff;
  border-color: #52525b;
}

.bio-quick-btn.active {
  background: #27272a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 700;
}

.bio-detail-section {
  margin-bottom: 1rem;
}

.bio-sec-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.bio-sec-text {
  font-size: 0.82rem;
  color: #e4e4e7;
  line-height: 1.45;
}

.bio-safety-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bio-safety-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #121215;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}

.bio-safety-num {
  font-size: 0.75rem;
  font-weight: 900;
  color: #ffffff;
  flex-shrink: 0;
  background: #27272a;
  padding: 2px 6px;
  border-radius: 4px;
}

.bio-safety-text {
  font-size: 0.78rem;
  color: #d4d4d8;
  line-height: 1.4;
}

/* ==========================================================================
   SUPPORTO LIGHT THEME PER I TOOLS
   ========================================================================== */
body.light-theme .tools-header-card,
body.light-theme .tools-card,
body.light-theme .ramp-phase-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

body.light-theme .tools-main-title,
body.light-theme .tools-card-title,
body.light-theme .tc-hero-number,
body.light-theme .orm-hero-value,
body.light-theme .timer-digits,
body.light-theme .ramp-phase-title,
body.light-theme .ramp-item-name,
body.light-theme .orm-pct-cell,
body.light-theme .orm-weight-cell {
  color: #0f172a;
}

body.light-theme .tools-segmented-bar,
body.light-theme .orm-hero-card,
body.light-theme .tc-barbell-visual,
body.light-theme .ramp-active-banner,
body.light-theme .ramp-item-row,
body.light-theme .bio-safety-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .ts-btn.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

body.light-theme .tc-step-btn,
body.light-theme .tc-pill,
body.light-theme .timer-preset-btn,
body.light-theme .ramp-focus-btn,
body.light-theme .bio-quick-btn,
body.light-theme .orm-calc-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .tc-pill.active,
body.light-theme .timer-preset-btn.active,
body.light-theme .ramp-focus-btn.active,
body.light-theme .bio-quick-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

body.light-theme .tc-weight-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .timer-main-btn {
  background: #0f172a;
  color: #ffffff;
}

body.light-theme .bio-sec-text,
body.light-theme .bio-safety-text {
  color: #334155;
}

/* ==========================================================================
   ATHLETE PROMO & SPONSOR REELS (RECTANGLES INSTAGRAM REEL STYLE)
   ========================================================================== */
.athlete-promo-container {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.25rem 2rem 0.25rem;
}

.athlete-promo-header {
  margin: 0.9rem 0 1rem 0;
  width: 100%;
  box-sizing: border-box;
}

.insta-reels-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  box-sizing: border-box;
}

.insta-reel-card {
  position: relative;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.insta-reel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.85);
}

/* La Scritta Sopra */
.insta-reel-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background: #0e0e12;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
}

.insta-reel-brand-info {
  display: flex;
  align-items: center;
}

.insta-reel-brand-title {
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.promo-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  border: 1.5px solid var(--fz-orange);
  color: #ff8533;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.8px;
  box-shadow: 0 0 14px rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
  text-transform: uppercase;
  flex-shrink: 0;
}

.promo-soon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fz-orange);
  box-shadow: 0 0 8px var(--fz-orange);
  animation: promoDotPulse 1.4s ease-in-out infinite;
}

@keyframes promoDotPulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
    box-shadow: 0 0 12px var(--fz-orange);
  }
}

/* Il Video o Foto Sotto (Rettangolo Stile Reel) */
.insta-reel-video-container {
  position: relative;
  width: 100%;
  height: 480px;
  max-height: 72vh;
  background: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .insta-reel-video-container {
    height: 430px;
  }
}

.insta-reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000000;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

/* Scorrimento Foto Bombafit (Scroll Gallery) */
.insta-reel-scroll-gallery {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.insta-reel-scroll-gallery::-webkit-scrollbar {
  display: none;
}

.insta-reel-scroll-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
}

.insta-reel-scroll-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.insta-reel-photo-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 3;
}

/* Rotazione Foto Bombafit */
.insta-reel-rotator {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000000;
}

.insta-reel-rotator-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: opacity;
}

.insta-reel-rotator-img:nth-child(1) {
  animation: promoCrossFadeA 6s ease-in-out infinite;
}

.insta-reel-rotator-img:nth-child(2) {
  animation: promoCrossFadeB 6s ease-in-out infinite;
}

@keyframes promoCrossFadeA {
  0%, 45% {
    opacity: 1;
    z-index: 2;
  }
  50%, 95% {
    opacity: 0;
    z-index: 1;
  }
  100% {
    opacity: 1;
    z-index: 2;
  }
}

@keyframes promoCrossFadeB {
  0%, 45% {
    opacity: 0;
    z-index: 1;
  }
  50%, 95% {
    opacity: 1;
    z-index: 2;
  }
  100% {
    opacity: 0;
    z-index: 1;
  }
}

/* ==========================================================================
   ATHLETE STATS - DETAILED EXERCISE LOADS ANALYTICS
   ========================================================================== */
.asc-kpi-subgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0.8rem 0 1rem 0;
  width: 100%;
  box-sizing: border-box;
}

.asc-kpi-subitem {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  box-sizing: border-box;
}

.asc-kpi-subval {
  font-size: 1rem;
  font-weight: 900;
  color: #ff8533;
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  font-style: italic;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.asc-kpi-sublbl {
  font-size: 0.58rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 3px;
  letter-spacing: 0.2px;
  line-height: 1.2;
  text-align: center;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
}

.stats-filters-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 8px 2px;
  margin-bottom: 0.6rem;
  width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.stats-filters-bar::-webkit-scrollbar {
  display: none;
}

.stats-cat-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 750;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.stats-cat-pill.active {
  background: var(--fz-orange);
  color: #ffffff;
  border-color: var(--fz-orange);
  box-shadow: 0 0 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.4);
}

.stats-search-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #09090c;
  color: #ffffff;
  font-size: 0.82rem;
  box-sizing: border-box;
}

.stats-search-input:focus {
  outline: none;
  border-color: var(--fz-orange);
  box-shadow: 0 0 10px rgba(var(--fz-orange-rgb, 255,107,0), 0.3);
}

.stats-exercise-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.asc-stat-card {
  background: #141417;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
}

.asc-sc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 0.6rem;
}

.asc-sc-name {
  font-size: 0.92rem;
  font-weight: 850;
  color: #ffffff;
  line-height: 1.3;
  word-break: break-word;
}

.asc-sc-cat-pill {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 650;
  color: var(--text-muted);
  margin-top: 2px;
}

.asc-sc-avg-badge {
  background: linear-gradient(135deg, rgba(var(--fz-orange-rgb, 255,107,0), 0.22), rgba(var(--fz-orange-rgb, 255,107,0), 0.06));
  border: 1.5px solid var(--fz-orange);
  border-radius: 10px;
  padding: 4px 8px;
  text-align: right;
  flex-shrink: 0;
  min-width: 68px;
}

.asc-sc-avg-lbl {
  display: block;
  font-size: 0.58rem;
  font-weight: 850;
  color: #ff8533;
  letter-spacing: 0.4px;
}

.asc-sc-avg-val {
  display: block;
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  font-family: 'Impact', 'Montserrat', 'Inter', system-ui, sans-serif;
  font-style: italic;
  line-height: 1.1;
}

.asc-sc-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0.75rem 0 0.6rem 0;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.asc-sc-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  box-sizing: border-box;
}

.asc-scm-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #e4e4e7;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.asc-scm-lbl {
  font-size: 0.58rem;
  color: var(--text-muted);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.asc-sc-sets-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
  width: 100%;
  box-sizing: border-box;
}

.asc-sc-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #d4d4d8;
}

/* Ottimizzazione Animazione GIF Auto-Looping */
.athlete-ex-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}



