        body.qms {
            background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%) !important;
            min-height: 100vh;
            padding-top: 80px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }
        
        .calendar-container {
            max-width: 1800px;
            margin: 0 auto;
            padding: 20px;
        }
        
        /* ==================== HEADER CALENDARIO ==================== */
        .calendar-header {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 12px;
            padding: 20px 24px;
            margin-bottom: 20px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            backdrop-filter: blur(10px);
        }
        
        .calendar-title {
            font-size: 28px;
            font-weight: 800;
            color: #0f172a;
            margin: 0 0 16px 0;
            display: flex;
            align-items: center;
            gap: 12px;
            text-shadow: 0 1px 2px rgba(0,0,0,0.05);
        }
        
        .calendar-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 16px;
        }
        
        /* ==================== NAVIGATION ==================== */
        .date-navigation {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .nav-btn {
            background: white;
            border: 2px solid #1e40af;
            color: #1e40af;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 700;
            transition: all 0.2s;
            font-size: 15px;
        }
        
        .nav-btn:hover {
            background: #1e40af;
            color: white;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(30, 64, 175, 0.3);
        }
        
        .current-period {
            font-size: 20px;
            font-weight: 800;
            color: #0f172a;
            min-width: 250px;
            text-align: center;
        }
        
        /* ==================== VIEW SWITCHER ==================== */
        .view-switcher {
            display: flex;
            gap: 8px;
            background: #f1f5f9;
            padding: 4px;
            border-radius: 8px;
        }
        
        .view-btn {
            background: transparent;
            border: none;
            color: #475569;
            padding: 10px 18px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 700;
            font-size: 15px;
            transition: all 0.2s;
        }
        
        .view-btn:hover {
            color: #0f172a;
            background: rgba(59, 130, 246, 0.15);
        }
        
        .view-btn.active {
            background: white;
            color: #1e40af;
            box-shadow: 0 3px 6px rgba(0,0,0,0.15);
            font-weight: 800;
        }
        
        /* ==================== STATS CARDS ==================== */
        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-bottom: 20px;
        }
        
        .stat-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            backdrop-filter: blur(10px);
        }
        
        .stat-label {
            font-size: 13px;
            font-weight: 700;
            color: #475569;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .stat-value {
            font-size: 32px;
            font-weight: 700;
            color: #1e3a8a;
        }
        
        .stat-icon {
            font-size: 20px;
            margin-right: 8px;
        }
        
        /* ==================== CALENDARIO GRID ==================== */
        .calendar-body {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        
        /* ==================== VISTA TIMELINE (GIORNO) ==================== */
        .timeline-view {
            display: grid;
            grid-template-columns: 80px 1fr;
            position: relative;
        }
        
        .timeline-hours {
            border-right: 2px solid #e2e8f0;
            background: #f8fafc;
        }
        
        .timeline-hour {
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-bottom: 1px solid #e2e8f0;
            font-size: 13px;
            font-weight: 700;
            color: #334155;
            position: relative;
        }
        
        .timeline-grid {
            position: relative;
            background: #fafafa;
        }
        
        .timeline-slot {
            position: absolute;
            left: 4px;
            right: 4px;
            background: #3b82f6;
            color: white;
            border-radius: 6px;
            padding: 8px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        
        .timeline-slot:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            z-index: 10;
        }
        
        .timeline-slot.available {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        }
        
        .timeline-slot.partial {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
        }
        
        .timeline-slot.full {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        }
        
        /* Griglia 5 minuti */
        .timeline-grid-line {
            position: absolute;
            left: 0;
            right: 0;
            height: 0;
            border-bottom: 1px dotted #e0e0e0;
            pointer-events: none;
        }
        
        .timeline-grid-line.quarter {
            border-bottom: 1px solid #d0d0d0;
        }
        
        .timeline-grid-line.hour {
            border-bottom: 2px solid #cbd5e1;
        }
        
        /* ==================== VISTA SETTIMANA ==================== */
        .week-view {
            display: grid;
            grid-template-columns: 60px repeat(7, 1fr);
            grid-template-rows: 50px auto;
        }
        
        .week-header {
            background: #f1f5f9;
            border-bottom: 2px solid #cbd5e1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 14px;
            color: #1e3a8a;
            padding: 8px;
        }
        
        .week-day-header {
            text-align: center;
        }
        
        .week-day-number {
            display: block;
            font-size: 24px;
            margin-top: 4px;
        }
        
        .week-day-cell {
            border-right: 1px solid #e2e8f0;
            border-bottom: 1px solid #e2e8f0;
            min-height: 100px;
            padding: 8px;
            position: relative;
        }
        
        .week-time-label {
            background: #f8fafc;
            border-right: 2px solid #e2e8f0;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
            color: #334155;
        }
        
        /* ==================== VISTA MESE ==================== */
        .month-view {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 1px;
            background: #e2e8f0;
        }
        
        .month-day {
            background: white;
            min-height: 120px;
            padding: 8px;
            position: relative;
        }
        
        .month-day-number {
            font-weight: 700;
            font-size: 16px;
            color: #1e3a8a;
            margin-bottom: 8px;
        }
        
        .month-day.other-month {
            background: #f8fafc;
            opacity: 0.5;
        }
        
        .month-day.today {
            background: #eff6ff;
            border: 2px solid #3b82f6;
        }
        
        .month-slot-pill {
            background: #3b82f6;
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 600;
            margin-bottom: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .month-slot-pill:hover {
            transform: translateX(2px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        
        /* ==================== VISTA ANNO ==================== */
        .year-view {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            padding: 20px;
        }
        
        .year-month-card {
            background: white;
            border-radius: 8px;
            padding: 16px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        }
        
        .year-month-title {
            font-weight: 700;
            font-size: 16px;
            color: #1e3a8a;
            margin-bottom: 12px;
            text-align: center;
        }
        
        .year-month-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 4px;
        }
        
        .year-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .year-day:hover {
            background: #eff6ff;
            transform: scale(1.1);
        }
        
        .year-day.has-slots {
            background: #3b82f6;
            color: white;
            font-weight: 700;
        }
        
        /* ==================== LEGENDA ==================== */
        .legend {
            display: flex;
            gap: 20px;
            justify-content: center;
            padding: 16px;
            background: #f8fafc;
            border-radius: 8px;
            margin-top: 20px;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            font-weight: 700;
            color: #334155;
        }
        
        .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 4px;
        }
        
        .legend-color.available {
            background: #10b981;
        }
        
        .legend-color.partial {
            background: #f59e0b;
        }
        
        .legend-color.full {
            background: #ef4444;
        }
        
        .legend-color.closed {
            background: #94a3b8;
        }
        
        /* ==================== LOADING & EMPTY STATES ==================== */
        .loading-state,
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #1e293b;
        }
        
        .empty-state h3 {
            color: #0f172a;
            font-weight: 800;
            font-size: 24px;
            margin-bottom: 12px;
        }
        
        .empty-state p {
            color: #334155;
            font-weight: 600;
            font-size: 16px;
        }
        
        .loading-spinner {
            display: inline-block;
            width: 40px;
            height: 40px;
            border: 4px solid #e2e8f0;
            border-top-color: #3b82f6;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
