: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;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, sans-serif; font-size: 16px; line-height: 1.6; color: var(--gray-800); background: var(--gray-50); }
a { color: var(--primary); text-decoration: none; } a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { font-weight: 600; color: var(--gray-900); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

.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: 0.5rem; 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%; }

.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: 0.5rem; 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; }

.card { background: var(--white); border-radius: 0.75rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); 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); }

.alert { padding: 1rem 1.25rem; border-radius: 0.5rem; 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 { 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; }

.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); }

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

.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); }
.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); }

.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; }
.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; text-decoration: none; }
.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); }
.main-content { flex: 1; margin-left: 260px; padding: 2rem; }

.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 { 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: 0.75rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); display: flex; align-items: flex-start; gap: 1rem; }
.stat-icon { width: 48px; height: 48px; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.stat-icon.primary { background: #EEF2FF; } .stat-icon.success { background: #ECFDF5; }
.stat-icon.warning { background: #FFFBEB; } .stat-icon.danger { background: #FEF2F2; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); } .stat-label { font-size: 0.875rem; color: var(--gray-500); }

.chat-container { display: flex; height: calc(100vh - 140px); background: var(--white); border-radius: 0.75rem; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.chat-sidebar { width: 320px; border-right: 1px solid var(--gray-200); display: flex; flex-direction: column; }
.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); text-decoration: none; color: inherit; }
.chat-list-item:hover, .chat-list-item.active { background: var(--gray-50); }
.chat-list-name { font-weight: 600; color: var(--gray-900); }
.chat-list-message { font-size: 0.875rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.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: 0.75rem; word-break: break-word; }
.message.sent .message-content { background: var(--primary); color: var(--white); }
.message.received .message-content { background: var(--gray-100); color: var(--gray-800); }
.message-time { font-size: 0.75rem; color: var(--gray-400); } .message.sent .message-time { text-align: right; }
.chat-input { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; align-items: flex-end; gap: 1rem; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.video-card { background: var(--white); border-radius: 0.75rem; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.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-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-day { background: var(--white); border-radius: 0.75rem; margin-bottom: 1rem; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.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; display: none; }
.schedule-day.expanded .schedule-day-content { display: block; }
.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; }
.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-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: 0 4px 6px -1px rgba(0,0,0,0.1); position: relative; }
.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; }
.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 { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 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; }
.hero .btn-primary { background: var(--white); color: var(--primary); }
.hero .btn-outline { border-color: var(--white); color: var(--white); }

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

.footer { background: var(--gray-900); color: var(--gray-400); padding: 2rem; text-align: center; }

.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; }
.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-area { border: 2px dashed var(--gray-300); border-radius: 0.75rem; padding: 3rem 2rem; text-align: center; cursor: pointer; }
.upload-area:hover { border-color: var(--primary); background: var(--gray-50); }

.text-center { text-align: center; } .text-muted { color: var(--gray-500); } .text-success { color: var(--success); }
.text-sm { font-size: 0.875rem; }
.mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.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; }

@media (max-width: 1024px) {
    .sidebar { display: none; } .main-content { margin-left: 0; }
    .chat-sidebar { width: 100%; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; } .hero p { font-size: 1rem; }
    .navbar-nav { display: none; }
}
