/* ========================================
   BCM AFFITTI PALESTRE - DESIGN SYSTEM
   ======================================== */

/* CSS Variables */
:root {
  --bcm-green: #0A4A28;
  --bcm-lime: #78BE20;
  --bcm-light-green: #A1CF6B;
  --bcm-white: #FFFFFF;
  --bcm-black: #1A1A1A;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   GLASSMORPHISM CARDS
   ======================================== */
.affitti-card {
  background: linear-gradient(135deg,
    rgba(10, 74, 40, 0.1) 0%,
    rgba(120, 190, 32, 0.05) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.affitti-card:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* ========================================
   BUTTONS
   ======================================== */
.affitti-btn-primary {
  background: linear-gradient(135deg, #78BE20 0%, #0A4A28 100%);
  border-radius: 12px;
  padding: 14px 28px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(120, 190, 32, 0.3);
  position: relative;
  overflow: hidden;
}

.affitti-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(120, 190, 32, 0.4);
}

.affitti-btn-primary:active {
  transform: translateY(0);
}

.affitti-btn-secondary {
  background: white;
  border: 2px solid #78BE20;
  color: #78BE20;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.affitti-btn-secondary:hover {
  background: #78BE20;
  color: white;
}

.affitti-btn-danger {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.affitti-btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ========================================
   STATUS BADGES
   ======================================== */
.badge-in-attesa {
  background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
  color: #78350F;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-approvata {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-rifiutata {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-annullata {
  background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-in_attesa {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-disdetta {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Badge compatti per mobile (pallini con iniziale) */
.badge-compact {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.badge-compact.approvata {
  background: #10B981;
}

.badge-compact.rifiutata {
  background: #EF4444;
}

.badge-compact.in_attesa {
  background: #F59E0B;
}

.badge-compact.disdetta {
  background: #8B5CF6;
}

.badge-compact.annullata {
  background: #9CA3AF;
}

/* ========================================
   SKELETON LOADING
   ======================================== */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.1) 25%,
    rgba(255,255,255,0.2) 50%,
    rgba(255,255,255,0.1) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounceSubtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.3s ease-out forwards;
}

.animate-bounce-subtle {
  animation: bounceSubtle 0.6s ease-in-out infinite;
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */
@media (prefers-color-scheme: dark) {
  .affitti-card {
    background: linear-gradient(135deg,
      rgba(10, 74, 40, 0.2) 0%,
      rgba(120, 190, 32, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .skeleton {
    background: linear-gradient(90deg,
      rgba(255,255,255,0.05) 25%,
      rgba(255,255,255,0.1) 50%,
      rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
  }
}

/* Dark mode explicit class (for toggle button) */
.dark .affitti-card {
  background: linear-gradient(135deg,
    rgba(10, 74, 40, 0.2) 0%,
    rgba(120, 190, 32, 0.1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .affitti-card {
    border-radius: 16px;
  }

  .affitti-btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
  }
}

/* ========================================
   TOAST UI CALENDAR CUSTOM THEME
   ======================================== */
.toastui-calendar-template-time {
  border-radius: 8px !important;
  padding: 8px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

/* Colori eventi calendario */
.evento-allenamento {
  background-color: #3B82F6 !important;
  border-color: #2563EB !important;
}

.evento-partita {
  background-color: #EF4444 !important;
  border-color: #DC2626 !important;
}

.evento-extra {
  background-color: #F59E0B !important;
  border-color: #D97706 !important;
}

.evento-prenotazione {
  background-color: #10B981 !important;
  border-color: #059669 !important;
}

/* ========================================
   FORMS
   ======================================== */
.affitti-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E5E7EB;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.affitti-input:focus {
  outline: none;
  border-color: #78BE20;
  box-shadow: 0 0 0 3px rgba(120, 190, 32, 0.1);
}

.affitti-input.error {
  border-color: #EF4444;
}

.affitti-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

/* ========================================
   DARK MODE
   ======================================== */
@media (prefers-color-scheme: dark) {
  .affitti-card {
    background: linear-gradient(135deg,
      rgba(10, 74, 40, 0.2) 0%,
      rgba(120, 190, 32, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .affitti-input {
    background: #1F2937;
    border-color: #374151;
    color: white;
  }

  .affitti-label {
    color: #E5E7EB;
  }
}

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {
  .affitti-card {
    border-radius: 16px;
    padding: 1rem;
  }

  .affitti-btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
  }

  .affitti-btn-secondary {
    width: 100%;
    padding: 14px;
  }
}

/* ========================================
   UTILITIES
   ======================================== */
.text-gradient-bcm {
  background: linear-gradient(135deg, #78BE20 0%, #0A4A28 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-bcm {
  background: linear-gradient(135deg, #78BE20 0%, #0A4A28 100%);
}

.hidden {
  display: none;
}

/* ========================================
   PALESTRE TABS
   ======================================== */
.palestra-tab {
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.palestra-tab:hover {
  background: rgba(120, 190, 32, 0.1);
  border-color: rgba(120, 190, 32, 0.3);
}

.palestra-tab.active {
  background: linear-gradient(135deg, #78BE20 0%, #0A4A28 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(120, 190, 32, 0.3);
}

/* ========================================
   RECURRING BOOKING INDICATOR
   ======================================== */
.badge-ricorrente {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  color: white;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.recurring-group-container {
  border-left: 3px solid #8B5CF6;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.05) 0%, transparent 100%);
  padding-left: 12px;
}

/* ========================================
   BCM PRESENZE - CUSTOM STYLES
   ======================================== */

/* Body Background */
body {
  background: linear-gradient(135deg, #0A4A28 0%, #1B5E3D 30%, #2A7A4F 60%, #78BE20 100%);
  min-height: 100vh;
}

/* Glass Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #78BE20 0%, #0A4A28 100%);
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(120, 190, 32, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(120, 190, 32, 0.4);
}

.btn-secondary {
  background: white;
  border: 2px solid #78BE20;
  color: #78BE20;
  border-radius: 12px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #78BE20;
  color: white;
  transform: translateY(-2px);
}

/* Badge Styles */
.badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: white;
}

.badge-danger {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
}

/* Tailwind-like Utilities */
.text-bcm-green {
  color: #0A4A28;
}

.text-blue-600 {
  color: #2563EB;
}

.text-green-600 {
  color: #10B981;
}

.text-yellow-600 {
  color: #F59E0B;
}

.text-red-600 {
  color: #EF4444;
}

.text-gray-600 {
  color: #6B7280;
}

.text-gray-700 {
  color: #374151;
}

.text-gray-800 {
  color: #1F2937;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 74, 40, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

.loading-overlay.hidden {
    display: none;
}

.loading-overlay p {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* Spinner */
.spinner {
    width: 64px;
    height: 64px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: #78BE20;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Gruppo Header per allenamenti condivisi */
.gruppo-header {
    background: linear-gradient(135deg, #78BE20 0%, #9AD13E 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(120, 190, 32, 0.3);
}

.gruppo-header:first-child {
    margin-top: 0;
}

/* Mobile: differentiate gruppo-header from sticky header */
@media (max-width: 768px) {
  .gruppo-header {
    background: linear-gradient(135deg, #0A4A28 0%, #1a5f3d 100%);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(10, 74, 40, 0.3);
    border-left: 4px solid #78BE20;
  }

  .gruppo-header:first-child {
    margin-top: 1rem;
  }
}

/* Atleta Card States */
.atleta-card {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 0.75rem;
}

.atleta-card:hover {
    border-color: #78BE20;
    box-shadow: 0 4px 12px rgba(120, 190, 32, 0.2);
    transform: translateY(-2px);
}

.atleta-card[data-presente="true"] {
    border-color: #10B981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, white 100%);
}

.atleta-card[data-presente="false"]:not([data-rimosso="true"]) {
    border-color: #EF4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, white 100%);
    opacity: 0.7;
}

/* Nome atleta rosso quando è assente (non rimosso) */
.atleta-card[data-presente="false"]:not([data-rimosso="true"]) span[style*="font-weight: 600"] {
    color: #EF4444 !important;
}

/* Card rimossa: grigia con bordo grigio e più opaca */
.atleta-card[data-rimosso="true"] {
    border-color: #D1D5DB !important;
    background: #F9FAFB !important;
    opacity: 0.5 !important;
}

/* Nome atleta barrato quando è rimosso */
.atleta-card[data-rimosso="true"] span[style*="font-weight: 600"] {
    text-decoration: line-through !important;
}

.atleta-card[data-ospite="true"] {
    border-left: 4px solid #8B5CF6;
}

/* Tipo Partita Card Selection */
.tipo-partita-card.active {
  border-color: #0A4A28 !important;
  background: linear-gradient(135deg, rgba(10, 74, 40, 0.1) 0%, rgba(120, 190, 32, 0.05) 100%) !important;
  box-shadow: 0 0 0 3px rgba(10, 74, 40, 0.2) !important;
}

.tipo-partita-card.active::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: #0A4A28;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.tipo-partita-card {
  position: relative;
}

/* Utility Classes */
.w-full { width: 100%; }
.mt-6 { margin-top: 1.5rem; }

/* ========================================
   UNIVERSAL HEADER COMPONENT
   ======================================== */

/* Header Container */
.bcm-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #0A4A28 0%, #1B5E3D 30%, #2A7A4F 60%, #78BE20 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bcm-header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo Section */
.bcm-header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.bcm-header-logo:hover {
  transform: scale(1.05);
}

.bcm-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.bcm-logo-text-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bcm-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bcm-welcome-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  display: none; /* Hidden by default on desktop */
}

/* Page Title (Center - Hidden on Mobile) */
.bcm-header-title {
  flex: 1;
  text-align: center;
  display: none;
}

@media (min-width: 768px) {
  .bcm-header-title {
    display: block;
  }
}

.bcm-title-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bcm-subtitle-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0.25rem 0 0 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Header Buttons Container */
.bcm-header-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Back Button */
.bcm-back-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
}

.bcm-back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.bcm-back-btn:active {
  transform: scale(0.95);
}

/* Hamburger Button */
.bcm-hamburger-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bcm-hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.bcm-hamburger-btn:active {
  transform: scale(0.95);
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Hamburger Animation (Active State) */
.bcm-hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.bcm-hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.bcm-hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Menu Overlay */
.bcm-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bcm-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Side Menu Drawer */
.bcm-side-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 380px;
  height: 100%;
  background: linear-gradient(135deg, #0A4A28 0%, #1B5E3D 30%, #2A7A4F 70%, #78BE20 100%);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.bcm-side-menu.active {
  transform: translateX(0);
}

/* Side Menu Header */
.bcm-side-menu-header {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.bcm-close-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
}

.bcm-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

.bcm-close-btn:active {
  transform: rotate(90deg) scale(0.9);
}

/* Side Menu Navigation */
.bcm-side-menu-nav {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Menu Section */
.bcm-menu-section {
  margin-bottom: 2rem;
}

.bcm-menu-section-bottom {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.bcm-menu-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
  padding-left: 0.5rem;
}

/* Menu Item */
.bcm-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 0.75rem;
  text-align: left;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bcm-menu-item:last-child {
  margin-bottom: 0;
}

.bcm-menu-item:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bcm-menu-item:active {
  transform: translateX(5px) scale(0.98);
}

.bcm-menu-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.bcm-menu-label {
  flex: 1;
}

/* Menu Item Variants */
.bcm-menu-item-logout {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

.bcm-menu-item-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

.bcm-menu-item-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

.bcm-menu-item-success:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
}

.bcm-menu-item-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

.bcm-menu-item-warning:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.5);
}

.bcm-menu-item-primary {
  background: rgba(120, 190, 32, 0.2);
  border-color: rgba(120, 190, 32, 0.4);
}

.bcm-menu-item-primary:hover {
  background: rgba(120, 190, 32, 0.3);
  border-color: rgba(120, 190, 32, 0.6);
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  .bcm-header-content {
    padding: 0.875rem 1rem;
  }

  .bcm-logo-img {
    width: 36px;
    height: 36px;
  }

  .bcm-logo-text {
    font-size: 1.125rem;
  }

  .bcm-welcome-text {
    display: block; /* Show on mobile */
    margin-top: 2px;
  }

  .bcm-header-buttons {
    gap: 0.5rem;
  }

  .bcm-back-btn {
    width: 44px;
    height: 44px;
  }

  .bcm-hamburger-btn {
    width: 44px;
    height: 44px;
  }

  .bcm-side-menu {
    width: 90%;
    max-width: none;
  }
}

@media (min-width: 1024px) {
  .bcm-side-menu {
    max-width: 420px;
  }

  .bcm-title-text {
    font-size: 1.75rem;
  }

  .bcm-subtitle-text {
    font-size: 1rem;
  }
}

/* ========================================
   STICKY INFO CARD (PRESENZE)
   ======================================== */

/* Info Card Sticky Container - Solo mobile */
@media (max-width: 768px) {
  /* Affitti card padding on mobile */
  .affitti-card {
    padding: 1rem !important;
  }

  /* Convocazione form card padding on mobile */
  #convocazione-form-container .glass-card {
    padding: 0.5rem !important;
  }

  /* Jersey badge - force circular shape on mobile */
  .jersey-badge {
    flex-shrink: 0 !important;
  }

  /* Presenza checkbox - larger icon only on mobile */
  .presenza-checkbox {
    padding: 0 !important;
    font-size: 1.75rem !important;
    min-width: 44px;
    width: 44px;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem !important;
    border: none !important;
  }

  .badge-presente {
    background: #10B981 !important;
  }

  .badge-assente {
    background: #EF4444 !important;
  }

  .badge-rimosso {
    background: #9CA3AF !important;
    color: #4B5563 !important;
  }

  /* Show only icon on mobile, hide text */
  .presenza-checkbox .mobile-icon {
    display: block;
  }

  .presenza-checkbox .desktop-text {
    display: none;
  }

  /* Athlete card actions alignment */
  .atleta-actions {
    gap: 0.75rem !important;
  }

  .bcm-info-sticky {
    position: sticky;
    top: 73px; /* Altezza header BCM mobile */
    left: 0;
    width: 100%;
    z-index: 999;
    background: linear-gradient(135deg, #78BE20 0%, #9AD13E 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 0;
  }

  .bcm-info-sticky-content {
    padding: 0.75rem 1rem;
    color: white;
  }

  .bcm-info-sticky .info-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
  }

  .bcm-info-sticky .info-orario {
    display: none; /* Nascondi orario quando sticky */
  }

  .bcm-info-sticky .info-palestra {
    font-size: 0.75rem;
    margin: 0 0 0.25rem 0;
  }

  .bcm-info-sticky .counter-container {
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

/* Desktop - card normale con border radius */
@media (min-width: 769px) {
  /* Desktop: show text, hide icon */
  .presenza-checkbox .mobile-icon {
    display: none;
  }

  .presenza-checkbox .desktop-text {
    display: inline;
  }

  .bcm-info-sticky {
    position: sticky;
    top: 73px; /* Mantieni sticky anche su desktop */
    z-index: 999;
    background: linear-gradient(135deg, #78BE20 0%, #9AD13E 100%);
    color: white;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .bcm-info-sticky-content {
    padding: 1rem 1.5rem;
    color: white;
  }

  .bcm-info-sticky .info-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
  }

  .bcm-info-sticky .info-orario {
    display: block;
    margin: 0.25rem 0;
    font-size: 0.875rem;
  }

  .bcm-info-sticky .info-palestra {
    margin: 0.25rem 0;
    font-size: 0.875rem;
  }

  .bcm-info-sticky .counter-container {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

/* ========================================
   PULSANTI PRESENZE
   ======================================== */

/* Pulsante Aggiungi Ospite */
.add-ospite-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(120, 190, 32, 0.4) !important;
  background: linear-gradient(135deg, #6AA81B 0%, #88C62B 100%) !important;
}

.add-ospite-btn:active {
  transform: translateY(0);
}

/* Pulsante Note */
.btn-note:hover {
  transform: scale(1.05);
  background: #6AA81B !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

/* ========================================
   CONVOCAZIONI COLLAPSIBLE CARDS
   ======================================== */
.convocazione-collapsible {
  overflow: hidden;
}

.convocazione-header {
  user-select: none;
}

.convocazione-header:hover {
  background: rgba(120, 190, 32, 0.05);
}

.convocazione-body {
  transition: all 0.3s ease-in-out;
}

.expand-icon {
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

/* Responsive buttons for mobile */
@media (max-width: 768px) {
  .convocazione-collapsible .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .convocazione-collapsible .grid-cols-4 button {
    font-size: 0.75rem;
    padding: 0.5rem 0.25rem;
  }

  /* Reduce card padding on mobile */
  .convocazione-collapsible.glass-card {
    padding: 0.5rem !important;
  }

  /* Badge positioning - show in second column on mobile */
  .badge-desktop {
    display: none;
  }

  .badge-mobile {
    display: block;
  }
}

/* Desktop: show badge next to title */
@media (min-width: 769px) {
  .badge-desktop {
    display: inline;
  }

  .badge-mobile {
    display: none;
  }
}

/* ============================================
   STATISTICHE VIEW - MOBILE FILTERS
   ============================================ */

/* Filters expand icon animation */
.filters-expand-icon {
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

/* Filters content animation */
.filters-content {
  transition: all 0.3s ease-in-out;
}

/* Mobile: collapsible filters */
@media (max-width: 768px) {
  .statistiche-filters-card {
    padding: 0.75rem !important;
  }

  .filters-content.hidden {
    display: none;
  }
}

/* Summary cards - centered text on mobile */
@media (max-width: 768px) {
  .statistiche-summary-cards .glass-card {
    text-align: center;
  }
}

/* ============================================
   ATLETA DETAIL VIEW - MOBILE OPTIMIZATION
   ============================================ */

/* Avatar: force circular shape */
.atleta-avatar {
  flex-shrink: 0 !important;
  min-width: 80px;
  aspect-ratio: 1;
}

@media (min-width: 769px) {
  .atleta-avatar {
    min-width: 128px;
  }
}

/* Convocazione item expand/collapse animation */
.convocazione-item-collapsible {
  overflow: hidden;
}

.convocazione-item-header {
  user-select: none;
}

.convocazione-item-body {
  transition: all 0.3s ease-in-out;
}

.convocazione-expand-icon {
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

/* ============================================
   PRESENZE LIST VIEW - MOBILE OPTIMIZATION
   ============================================ */

/* Filters expand icon animation */
.presenze-filters-expand-icon {
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

/* Filters content animation */
.presenze-filters-content {
  transition: all 0.3s ease-in-out;
}

/* Mobile: collapsible filters */
@media (max-width: 768px) {
  .presenze-filters-card {
    padding: 0.75rem !important;
  }

  .presenze-filters-content.hidden {
    display: none;
  }
}

/* Presenza card expand/collapse animation */
.presenza-card-collapsible {
  overflow: hidden;
}

.presenza-card-header {
  user-select: none;
}

.presenza-card-body {
  transition: all 0.3s ease-in-out;
}

.presenza-expand-icon {
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

/* Stats summary - centered text on mobile */
@media (max-width: 768px) {
  .presenze-stats-summary .glass-card {
    text-align: center;
  }
}

/* ============================================
   CONVOCAZIONI FORM - PARTITE CALENDARIO
   ============================================ */

/* Desktop: mostra il dropdown partite quando attivato */
@media (min-width: 769px) {
  .partite-calendario-desktop-container {
    display: block !important;
  }
}

/* Mobile: nasconde sempre il dropdown desktop */
@media (max-width: 768px) {
  .partite-calendario-desktop-container {
    display: none !important;
  }
}

/* Annata secondaria expand icon animation */
.annata-secondaria-expand-icon {
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

/* ============================================
   DASHBOARD ADMIN - MOBILE FILTERS
   ============================================ */

/* Filters expand icon animation */
.admin-filters-expand-icon {
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

/* Filters content animation */
.admin-filters-content {
  transition: all 0.3s ease-in-out;
}

/* Mobile: collapsible filters */
@media (max-width: 768px) {
  .admin-filters-card {
    padding: 0.75rem !important;
  }

  .admin-filters-content.hidden {
    display: none;
  }
}
