/* PORTALE ALLENAMENTO - Complete Stylesheet */
:root {
    --primary: #4F46E5; --primary-dark: #4338CA; --primary-light: #818CF8;
    --secondary: #10B981; --accent: #F59E0B; --danger: #EF4444; --success: #22C55E;
    --gray-900: #111827; --gray-800: #1F2937; --gray-700: #374151; --gray-600: #4B5563;
    --gray-500: #6B7280; --gray-400: #9CA3AF; --gray-300: #D1D5DB; --gray-200: #E5E7EB;
    --gray-100: #F3F4F6; --gray-50: #F9FAFB; --white: #FFFFFF;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1); --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1);
    --radius: 0.5rem; --radius-lg: 0.75rem;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); font-size: 16px; line-height: 1.6; color: var(--gray-800); background: var(--gray-50); min-height: 100vh; }
a { color: var(--primary); text-decoration: none; } a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-weight: 600; color: var(--gray-900); }
h1 { font-size: 2.5rem; } h2 { font-size: 2rem; } h3 { font-size: 1.5rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; font-size: 0.875rem; font-weight: 500; border-radius: var(--radius); border: none; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: var(--white); } .btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-success { background: var(--success); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); } .btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; } .btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--gray-700); }
.form-control { width: 100%; padding: 0.75rem 1rem; font-size: 1rem; border: 1px solid var(--gray-300); border-radius: var(--radius); background: var(--white); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B7280'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1.5rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check input { width: 1.125rem; height: 1.125rem; accent-color: var(--primary); }

/* Cards */
.card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); background: var(--gray-50); }
.card-body { padding: 1.5rem; } .card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); }

/* Alerts */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* Badge */
.badge { display: inline-flex; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 500; border-radius: 9999px; }
.badge-success { background: #D1FAE5; color: #065F46; } .badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; } .badge-primary { background: #E0E7FF; color: #3730A3; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--gray-200); }
.table th { font-weight: 600; color: var(--gray-700); background: var(--gray-50); }
.table tbody tr:hover { background: var(--gray-50); }

/* Avatar */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--gray-200); }
.avatar-lg { width: 80px; height: 80px; } .avatar-sm { width: 32px; height: 32px; }

/* Navbar */
.navbar { background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; }
.navbar-content { display: flex; align-items: center; justify-content: space-between; padding: 1rem; max-width: 1400px; margin: 0 auto; }
.navbar-brand { font-size: 1.5rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 0.5rem; }
.navbar-nav { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.nav-link { color: var(--gray-600); font-weight: 500; } .nav-link:hover, .nav-link.active { color: var(--primary); }

/* Sidebar Layout */
.layout-sidebar { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: var(--gray-900); color: var(--white); position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 50; }
.sidebar-header { padding: 1.5rem; border-bottom: 1px solid var(--gray-700); }
.sidebar-brand { color: var(--white); font-size: 1.25rem; font-weight: 700; }
.sidebar-nav { padding: 1rem 0; }
.sidebar-nav-item { padding: 0.75rem 1.5rem; display: flex; align-items: center; gap: 0.75rem; color: var(--gray-400); transition: all 0.2s; }
.sidebar-nav-item:hover, .sidebar-nav-item.active { background: var(--gray-800); color: var(--white); }
.sidebar-nav-item.active { border-right: 3px solid var(--primary); }
.sidebar-section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--gray-700); }
.sidebar-section-title { padding: 0.5rem 1.5rem; font-size: 0.75rem; text-transform: uppercase; color: var(--gray-500); letter-spacing: 0.05em; }
.main-content { flex: 1; margin-left: 260px; padding: 2rem; }

/* Page Header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.page-title { font-size: 1.75rem; margin: 0; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); padding: 1.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); display: flex; align-items: flex-start; gap: 1rem; }
.stat-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.stat-icon.primary { background: #EEF2FF; color: var(--primary); } .stat-icon.success { background: #ECFDF5; color: var(--secondary); }
.stat-icon.warning { background: #FFFBEB; color: var(--accent); } .stat-icon.danger { background: #FEF2F2; color: var(--danger); }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); } .stat-label { font-size: 0.875rem; color: var(--gray-500); }

/* Chat */
.chat-container { display: flex; height: calc(100vh - 140px); background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.chat-sidebar { width: 320px; border-right: 1px solid var(--gray-200); display: flex; flex-direction: column; }
.chat-sidebar-header { padding: 1rem; border-bottom: 1px solid var(--gray-200); }
.chat-list { flex: 1; overflow-y: auto; }
.chat-list-item { padding: 1rem; display: flex; align-items: center; gap: 0.75rem; cursor: pointer; border-bottom: 1px solid var(--gray-100); }
.chat-list-item:hover, .chat-list-item.active { background: var(--gray-50); }
.chat-list-item.active { border-left: 3px solid var(--primary); }
.chat-list-info { flex: 1; min-width: 0; }
.chat-list-name { font-weight: 600; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list-message { font-size: 0.875rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list-badge { background: var(--primary); color: var(--white); font-size: 0.75rem; padding: 0.125rem 0.5rem; border-radius: 9999px; }
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.message { max-width: 70%; display: flex; flex-direction: column; gap: 0.25rem; }
.message.sent { align-self: flex-end; } .message.received { align-self: flex-start; }
.message-content { padding: 0.75rem 1rem; border-radius: var(--radius-lg); word-break: break-word; }
.message.sent .message-content { background: var(--primary); color: var(--white); border-bottom-right-radius: 0.25rem; }
.message.received .message-content { background: var(--gray-100); color: var(--gray-800); border-bottom-left-radius: 0.25rem; }
.message-time { font-size: 0.75rem; color: var(--gray-400); } .message.sent .message-time { text-align: right; }
.message-video, .message-image { max-width: 300px; border-radius: var(--radius); overflow: hidden; }
.message-video video, .message-image img { width: 100%; display: block; }
.chat-input { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; align-items: flex-end; gap: 1rem; }
.chat-input textarea { flex: 1; resize: none; max-height: 120px; }
.chat-input-actions { display: flex; gap: 0.5rem; }

/* Video Grid */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.video-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); transition: all 0.2s; }
.video-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.video-thumbnail { position: relative; aspect-ratio: 16/9; background: var(--gray-200); }
.video-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.video-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background: rgba(0,0,0,0.7); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); }
.video-card:hover .video-play-btn { background: var(--primary); }
.video-duration { position: absolute; bottom: 0.5rem; right: 0.5rem; background: rgba(0,0,0,0.8); color: var(--white); font-size: 0.75rem; padding: 0.125rem 0.5rem; border-radius: 0.25rem; }
.video-info { padding: 1rem; } .video-title { font-weight: 600; margin-bottom: 0.25rem; } .video-meta { font-size: 0.875rem; color: var(--gray-500); }

/* Schedule */
.schedule-day { background: var(--white); border-radius: var(--radius-lg); margin-bottom: 1rem; overflow: hidden; box-shadow: var(--shadow); }
.schedule-day-header { padding: 1rem 1.5rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.schedule-day-title { font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.schedule-day-content { padding: 1rem 1.5rem; }
.exercise-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--gray-100); }
.exercise-item:last-child { border-bottom: none; }
.exercise-number { width: 32px; height: 32px; background: var(--primary); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; flex-shrink: 0; }
.exercise-info { flex: 1; } .exercise-name { font-weight: 600; margin-bottom: 0.25rem; }
.exercise-details { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.875rem; color: var(--gray-600); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; max-width: 800px; margin: 0 auto; }
.pricing-card { background: var(--white); border-radius: 1rem; padding: 2rem; text-align: center; box-shadow: var(--shadow); position: relative; transition: all 0.2s; }
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.featured { border: 2px solid var(--primary); }
.pricing-card.featured::before { content: 'Più Popolare'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--white); padding: 0.25rem 1rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.pricing-name { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.pricing-price { font-size: 3rem; font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: 0.5rem; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--gray-500); }
.pricing-features { list-style: none; margin: 2rem 0; text-align: left; }
.pricing-features li { padding: 0.5rem 0; display: flex; align-items: center; gap: 0.5rem; }
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: bold; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: var(--white); padding: 6rem 2rem; text-align: center; }
.hero h1 { font-size: 3rem; color: var(--white); margin-bottom: 1rem; }
.hero p { font-size: 1.25rem; opacity: 0.9; max-width: 600px; margin: 0 auto 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .btn-primary { background: var(--white); color: var(--primary); }
.hero .btn-outline { border-color: var(--white); color: var(--white); }

/* Features */
.features { padding: 5rem 2rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.feature-card { text-align: center; padding: 2rem; }
.feature-icon { width: 64px; height: 64px; background: var(--primary-light); color: var(--primary); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.5rem; }
.feature-card h3 { margin-bottom: 0.5rem; } .feature-card p { color: var(--gray-600); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { margin-bottom: 0.5rem; } .section-title p { color: var(--gray-600); max-width: 600px; margin: 0 auto; }

/* Footer */
.footer { background: var(--gray-900); color: var(--gray-400); padding: 3rem 2rem 1.5rem; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-brand { color: var(--white); font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.footer h4 { color: var(--white); margin-bottom: 1rem; font-size: 1rem; }
.footer-links { list-style: none; } .footer-links li { margin-bottom: 0.5rem; } .footer-links a { color: var(--gray-400); } .footer-links a:hover { color: var(--white); }
.footer-bottom { max-width: 1200px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--gray-700); text-align: center; font-size: 0.875rem; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; opacity: 0; visibility: hidden; transition: all 0.2s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: var(--white); border-radius: 1rem; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; transform: scale(0.9); transition: all 0.2s; }
.modal-overlay.active .modal { transform: scale(1); }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--gray-500); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* Upload */
.upload-area { border: 2px dashed var(--gray-300); border-radius: var(--radius-lg); padding: 3rem 2rem; text-align: center; cursor: pointer; transition: all 0.2s; }
.upload-area:hover, .upload-area.dragover { border-color: var(--primary); background: var(--gray-50); }
.upload-area p { color: var(--gray-600); margin-bottom: 0.5rem; } .upload-area small { color: var(--gray-400); }

/* Progress */
.progress { height: 8px; background: var(--gray-200); border-radius: 9999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); transition: width 0.3s; }

/* Empty State */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--gray-500); }
.empty-state h3 { color: var(--gray-700); margin-bottom: 0.5rem; }

/* Utilities */
.text-center { text-align: center; } .text-muted { color: var(--gray-500); } .text-primary { color: var(--primary); }
.text-success { color: var(--success); } .text-danger { color: var(--danger); }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .hidden { display: none !important; }

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: all 0.2s; } .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .chat-sidebar { width: 100%; position: absolute; z-index: 10; background: var(--white); transform: translateX(-100%); } .chat-sidebar.open { transform: translateX(0); }
}
@media (max-width: 768px) {
    h1 { font-size: 2rem; } h2 { font-size: 1.5rem; }
    .hero { padding: 4rem 1rem; } .hero h1 { font-size: 2rem; } .hero p { font-size: 1rem; }
    .pricing-price { font-size: 2.5rem; } .page-header { flex-direction: column; align-items: flex-start; }
    .navbar-nav { display: none; }
}
